Rename jsdbg.{h,cpp} to vm/Debugger.{h,cpp}. This addresses a review comment from brendan in bug 627829 comment 42.
authorJason Orendorff <jorendorff@mozilla.com>
Wed, 27 Jul 2011 18:03:34 -0500
changeset 75228 4ebca9c44e56db78fddf6ada10d86a048ade8a99
parent 75227 8c3a259cccf38ff521ae78f2f044e00ec701db85
child 75229 c533a2d26f53bdac8f8888b3ff6fb66aa7ff33eb
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
bugs627829
milestone8.0a1
Rename jsdbg.{h,cpp} to vm/Debugger.{h,cpp}. This addresses a review comment from brendan in bug 627829 comment 42.
js/src/Makefile.in
js/src/jscntxt.h
js/src/jscompartment.cpp
js/src/jsdbg.cpp
js/src/jsdbg.h
js/src/jsdbgapi.cpp
js/src/jsdbgapi.h
js/src/jsfun.cpp
js/src/jsgc.cpp
js/src/jsinterp.cpp
js/src/jsscript.cpp
js/src/jsxdrapi.cpp
js/src/methodjit/InvokeHelpers.cpp
js/src/methodjit/StubCalls.cpp
js/src/vm/Debugger.cpp
js/src/vm/Debugger.h
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -135,17 +135,16 @@ CPPSRCS		= \
 		jsarray.cpp \
 		jsatom.cpp \
 		jsbool.cpp \
 		jsclone.cpp \
 		jscntxt.cpp \
 		jscompartment.cpp \
 		jsdate.cpp \
 		jsdbgapi.cpp \
-		jsdbg.cpp \
 		jsdhash.cpp \
 		jsdtoa.cpp \
 		jsemit.cpp \
 		jsexn.cpp \
 		jsfriendapi.cpp \
 		jsfun.cpp \
 		jsgc.cpp \
 		jsgcmark.cpp \
@@ -180,16 +179,17 @@ CPPSRCS		= \
 		jstypedarray.cpp \
 		jsutil.cpp \
 		jsweakmap.cpp \
 		jswrapper.cpp \
 		jsxdrapi.cpp \
 		jsxml.cpp \
 		prmjtime.cpp \
 		sharkctl.cpp \
+		Debugger.cpp \
 		GlobalObject.cpp \
 		Stack.cpp \
 		String.cpp \
 		ParseMaps.cpp \
 		$(NULL)
 
 # Changes to internal header files, used externally, massively slow down
 # browser builds.  Don't add new files here unless you know what you're
@@ -268,17 +268,18 @@ VPATH		+= \
 		$(srcdir)/vm \
 		$(srcdir)/frontend \
 		$(NULL)
 
 EXPORTS_NAMESPACES = vm
 
 EXPORTS_vm = \
 		ArgumentsObject.h \
-		GlobalObject.h	 \
+		Debugger.h \
+		GlobalObject.h \
 		Stack.h \
 		String.h \
 		StringObject.h \
 		$(NULL)
 
 ###############################################
 # BEGIN include sources for low-level code shared with Gecko
 #
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -545,17 +545,17 @@ struct JSRuntime {
     void *              rtLockOwner;
 #endif
 
     /* Used to synchronize down/up state change; protected by gcLock. */
     PRCondVar           *stateChange;
 
     /*
      * Lock serializing watchPointList accesses, and count of all mutations to
-     * watchPointList made by debugger threads.  To keep the code simple, we
+     * watchPointList made by debugger threads. To keep the code simple, we
      * define debuggerMutations for the thread-unsafe case too.
      */
     PRLock              *debuggerLock;
 
     JSThread::Map       threads;
 #endif /* JS_THREADSAFE */
     uint32              debuggerMutations;
 
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -35,30 +35,30 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "jscntxt.h"
 #include "jscompartment.h"
-#include "jsdbg.h"
 #include "jsgc.h"
 #include "jsgcmark.h"
 #include "jsiter.h"
 #include "jsmath.h"
 #include "jsproxy.h"
 #include "jsscope.h"
 #include "jstracer.h"
 #include "jswrapper.h"
 #include "assembler/wtf/Platform.h"
 #include "yarr/BumpPointerAllocator.h"
 #include "methodjit/MethodJIT.h"
 #include "methodjit/PolyIC.h"
 #include "methodjit/MonoIC.h"
+#include "vm/Debugger.h"
 
 #include "jsgcinlines.h"
 #include "jsscopeinlines.h"
 
 #if ENABLE_YARR_JIT
 #include "assembler/jit/ExecutableAllocator.h"
 #endif
 
@@ -813,17 +813,17 @@ JSCompartment::markBreakpointsIterativel
         // Mark jsdbgapi state if any. But if we know the scriptObject, put off
         // marking trap state until we know the scriptObject is live.
         if (site->trapHandler && (!site->scriptObject || site->scriptObject->isMarked())) {
             if (site->trapClosure.isObject() && !site->trapClosure.toObject().isMarked())
                 markedAny = true;
             MarkValue(trc, site->trapClosure, "trap closure");
         }
 
-        // Mark jsdbg breakpoints. If either the debugger or the script is
+        // Mark js::Debugger breakpoints. If either the debugger or the script is
         // collected, then the breakpoint is collected along with it. So do not
         // mark the handler in that case.
         //
         // If scriptObject is non-null, examine it to see if the script will be
         // collected. If scriptObject is null, then site->script is an eval
         // script on the stack, so it is definitely live.
         //
         if (!site->scriptObject || site->scriptObject->isMarked()) {
--- a/js/src/jsdbgapi.cpp
+++ b/js/src/jsdbgapi.cpp
@@ -46,32 +46,32 @@
 #include "jstypes.h"
 #include "jsstdint.h"
 #include "jsutil.h"
 #include "jsclist.h"
 #include "jshashtable.h"
 #include "jsapi.h"
 #include "jscntxt.h"
 #include "jsversion.h"
-#include "jsdbg.h"
 #include "jsdbgapi.h"
 #include "jsemit.h"
 #include "jsfun.h"
 #include "jsgc.h"
 #include "jsgcmark.h"
 #include "jsinterp.h"
 #include "jslock.h"
 #include "jsobj.h"
 #include "jsopcode.h"
 #include "jsparse.h"
 #include "jsscope.h"
 #include "jsscript.h"
 #include "jsstaticcheck.h"
 #include "jsstr.h"
 #include "jswrapper.h"
+#include "vm/Debugger.h"
 
 #include "jsatominlines.h"
 #include "jsdbgapiinlines.h"
 #include "jsobjinlines.h"
 #include "jsinterpinlines.h"
 #include "jsscopeinlines.h"
 #include "jsscriptinlines.h"
 
--- a/js/src/jsdbgapi.h
+++ b/js/src/jsdbgapi.h
@@ -514,17 +514,17 @@ extern JS_PUBLIC_API(JSBool)
 JS_StartProfiling();
 
 extern JS_PUBLIC_API(void)
 JS_StopProfiling();
 
 extern JS_PUBLIC_API(JSBool)
 JS_DefineProfilingFunctions(JSContext *cx, JSObject *obj);
 
-/* Defined in jsdbg.cpp. */
+/* Defined in vm/Debugger.cpp. */
 extern JS_PUBLIC_API(JSBool)
 JS_DefineDebuggerObject(JSContext *cx, JSObject *obj);
 
 #ifdef MOZ_CALLGRIND
 
 extern JS_FRIEND_API(JSBool)
 js_StopCallgrind(JSContext *cx, uintN argc, jsval *vp);
 
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -47,17 +47,16 @@
 #include "jsbit.h"
 #include "jsutil.h"
 #include "jsapi.h"
 #include "jsarray.h"
 #include "jsatom.h"
 #include "jsbool.h"
 #include "jsbuiltins.h"
 #include "jscntxt.h"
-#include "jsdbg.h"
 #include "jsversion.h"
 #include "jsemit.h"
 #include "jsfun.h"
 #include "jsgc.h"
 #include "jsgcmark.h"
 #include "jsinterp.h"
 #include "jslock.h"
 #include "jsnum.h"
@@ -68,16 +67,17 @@
 #include "jsproxy.h"
 #include "jsscan.h"
 #include "jsscope.h"
 #include "jsscript.h"
 #include "jsstr.h"
 #include "jsexn.h"
 #include "jsstaticcheck.h"
 #include "jstracer.h"
+#include "vm/Debugger.h"
 
 #if JS_HAS_GENERATORS
 # include "jsiter.h"
 #endif
 
 #if JS_HAS_XDR
 # include "jsxdrapi.h"
 #endif
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -59,17 +59,16 @@
 #include "jsprf.h"
 #include "jsapi.h"
 #include "jsatom.h"
 #include "jscompartment.h"
 #include "jscrashreport.h"
 #include "jscrashformat.h"
 #include "jscntxt.h"
 #include "jsversion.h"
-#include "jsdbg.h"
 #include "jsdbgapi.h"
 #include "jsexn.h"
 #include "jsfun.h"
 #include "jsgc.h"
 #include "jsgcchunk.h"
 #include "jsgcmark.h"
 #include "jshashtable.h"
 #include "jsinterp.h"
@@ -85,16 +84,17 @@
 #include "jsstaticcheck.h"
 #include "jsweakmap.h"
 #if JS_HAS_XML_SUPPORT
 #include "jsxml.h"
 #endif
 
 #include "methodjit/MethodJIT.h"
 #include "vm/String.h"
+#include "vm/Debugger.h"
 
 #include "jsobjinlines.h"
 
 #include "vm/String-inl.h"
 
 #ifdef MOZ_VALGRIND
 # define JS_VALGRIND
 #endif
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -51,17 +51,16 @@
 #include "jsprf.h"
 #include "jsapi.h"
 #include "jsarray.h"
 #include "jsatom.h"
 #include "jsbool.h"
 #include "jscntxt.h"
 #include "jsdate.h"
 #include "jsversion.h"
-#include "jsdbg.h"
 #include "jsdbgapi.h"
 #include "jsfun.h"
 #include "jsgc.h"
 #include "jsgcmark.h"
 #include "jsinterp.h"
 #include "jsiter.h"
 #include "jslock.h"
 #include "jsnum.h"
@@ -76,25 +75,26 @@
 #include "jstracer.h"
 #include "jslibmath.h"
 #include "jsvector.h"
 #ifdef JS_METHODJIT
 #include "methodjit/MethodJIT.h"
 #include "methodjit/MethodJIT-inl.h"
 #include "methodjit/Logging.h"
 #endif
+#include "vm/Debugger.h"
+
 #include "jsatominlines.h"
 #include "jsinterpinlines.h"
 #include "jsobjinlines.h"
 #include "jsprobes.h"
 #include "jspropertycacheinlines.h"
 #include "jsscopeinlines.h"
 #include "jsscriptinlines.h"
 #include "jsopcodeinlines.h"
-
 #include "vm/Stack-inl.h"
 #include "vm/String-inl.h"
 
 #if JS_HAS_XML_SUPPORT
 #include "jsxml.h"
 #endif
 
 #include "jsautooplen.h"
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -45,17 +45,16 @@
 #include "jstypes.h"
 #include "jsstdint.h"
 #include "jsutil.h"
 #include "jsprf.h"
 #include "jsapi.h"
 #include "jsatom.h"
 #include "jscntxt.h"
 #include "jsversion.h"
-#include "jsdbg.h"
 #include "jsdbgapi.h"
 #include "jsemit.h"
 #include "jsfun.h"
 #include "jsgc.h"
 #include "jsgcmark.h"
 #include "jsinterp.h"
 #include "jslock.h"
 #include "jsnum.h"
@@ -63,16 +62,17 @@
 #include "jsparse.h"
 #include "jsscope.h"
 #include "jsscript.h"
 #include "jstracer.h"
 #if JS_HAS_XDR
 #include "jsxdrapi.h"
 #endif
 #include "methodjit/MethodJIT.h"
+#include "vm/Debugger.h"
 
 #include "jsobjinlines.h"
 #include "jsscriptinlines.h"
 
 using namespace js;
 using namespace js::gc;
 
 namespace js {
--- a/js/src/jsxdrapi.cpp
+++ b/js/src/jsxdrapi.cpp
@@ -44,22 +44,22 @@
 #include <string.h>
 #include "jstypes.h"
 #include "jsstdint.h"
 #include "jsutil.h"
 #include "jsdhash.h"
 #include "jsprf.h"
 #include "jsapi.h"
 #include "jscntxt.h"
-#include "jsdbg.h"
 #include "jsnum.h"
 #include "jsobj.h"              /* js_XDRObject */
 #include "jsscript.h"           /* js_XDRScript */
 #include "jsstr.h"
 #include "jsxdrapi.h"
+#include "vm/Debugger.h"
 
 #include "jsobjinlines.h"
 
 using namespace js;
 
 #ifdef DEBUG
 #define DBG(x) x
 #else
--- a/js/src/methodjit/InvokeHelpers.cpp
+++ b/js/src/methodjit/InvokeHelpers.cpp
@@ -53,17 +53,17 @@
 #include "jstypes.h"
 #include "methodjit/StubCalls.h"
 #include "jstracer.h"
 #include "jspropertycache.h"
 #include "methodjit/MonoIC.h"
 #include "jsanalyze.h"
 #include "methodjit/BaseCompiler.h"
 #include "methodjit/ICRepatcher.h"
-#include "jsdbg.h"
+#include "vm/Debugger.h"
 
 #include "jsinterpinlines.h"
 #include "jspropertycacheinlines.h"
 #include "jsscopeinlines.h"
 #include "jsscriptinlines.h"
 #include "jsobjinlines.h"
 #include "jscntxtinlines.h"
 #include "jsatominlines.h"
--- a/js/src/methodjit/StubCalls.cpp
+++ b/js/src/methodjit/StubCalls.cpp
@@ -37,25 +37,25 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "jscntxt.h"
 #include "jsscope.h"
 #include "jsobj.h"
 #include "jslibmath.h"
-#include "jsdbg.h"
 #include "jsiter.h"
 #include "jsnum.h"
 #include "jsxml.h"
 #include "jsstaticcheck.h"
 #include "jsbool.h"
 #include "assembler/assembler/MacroAssemblerCodeRef.h"
 #include "jsiter.h"
 #include "jstypes.h"
+#include "vm/Debugger.h"
 #include "vm/String.h"
 #include "methodjit/Compiler.h"
 #include "methodjit/StubCalls.h"
 
 #include "jsinterpinlines.h"
 #include "jspropertycache.h"
 #include "jspropertycacheinlines.h"
 #include "jsscopeinlines.h"
rename from js/src/jsdbg.cpp
rename to js/src/vm/Debugger.cpp
--- a/js/src/jsdbg.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -34,17 +34,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "jsdbg.h"
+#include "vm/Debugger.h"
 #include "jsapi.h"
 #include "jscntxt.h"
 #include "jsemit.h"
 #include "jsgcmark.h"
 #include "jsobj.h"
 #include "jstl.h"
 #include "jswrapper.h"
 #include "jsinterpinlines.h"
rename from js/src/jsdbg.h
rename to js/src/vm/Debugger.h
--- a/js/src/jsdbg.h
+++ b/js/src/vm/Debugger.h
@@ -34,18 +34,18 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef jsdbg_h__
-#define jsdbg_h__
+#ifndef Debugger_h__
+#define Debugger_h__
 
 #include "jsapi.h"
 #include "jsclist.h"
 #include "jscntxt.h"
 #include "jscompartment.h"
 #include "jsgc.h"
 #include "jshashtable.h"
 #include "jsweakmap.h"
@@ -98,18 +98,18 @@ class Debugger {
         FrameMap;
     FrameMap frames;
 
     /* The map from debuggee objects to their Debugger.Object instances. */
     typedef WeakMap<JSObject *, JSObject *, DefaultHasher<JSObject *>, CrossCompartmentMarkPolicy>
         ObjectWeakMap;
     ObjectWeakMap objects;
 
-    /* An ephemeral map from script-holding objects to Debugger.Script */
     /*
+     * An ephemeral map from script-holding objects to Debugger.Script
      * instances.
      */
     typedef WeakMap<JSObject *, JSObject *, DefaultHasher<JSObject *>, CrossCompartmentMarkPolicy>
         ScriptWeakMap;
 
     /*
      * Map of Debugger.Script instances for garbage-collected JSScripts. For
      * function scripts, the key is the compiler-created, internal JSFunction;
@@ -265,17 +265,17 @@ class Debugger {
     static inline void onLeaveFrame(JSContext *cx);
     static inline JSTrapStatus onDebuggerStatement(JSContext *cx, js::Value *vp);
     static inline JSTrapStatus onExceptionUnwind(JSContext *cx, js::Value *vp);
     static inline void onNewScript(JSContext *cx, JSScript *script, JSObject *obj,
                                    NewScriptKind kind);
     static inline void onDestroyScript(JSScript *script);
     static JSTrapStatus onTrap(JSContext *cx, Value *vp);
 
-    /**************************************** Functions for use by jsdbg.cpp. */
+    /************************************* Functions for use by Debugger.cpp. */
 
     inline bool observesEnterFrame() const;
     inline bool observesNewScript() const;
     inline bool observesScope(JSObject *obj) const;
     inline bool observesFrame(StackFrame *fp) const;
 
     /*
      * Precondition: *vp is a value from a debuggee compartment and cx is in
@@ -508,9 +508,9 @@ Debugger::onDestroyScript(JSScript *scri
 }
 
 extern JSBool
 EvaluateInScope(JSContext *cx, JSObject *scobj, StackFrame *fp, const jschar *chars,
                 uintN length, const char *filename, uintN lineno, Value *rval);
 
 }
 
-#endif /* jsdbg_h__ */
+#endif /* Debugger_h__ */