Bug 750907 - Move the marking declarations out of jsgcmark.h and into a header with minimal dependencies. r=billm

--HG--
rename : js/src/jsgcmark.cpp => js/src/gc/Marking.cpp
rename : js/src/jsgcmark.h => js/src/gc/Marking.h
extra : rebase_source : 2829c44da4316ceb6af0f4627158e337dd6ba28a
This commit is contained in:
Jeff Walden 2012-05-01 14:30:18 -07:00
parent 649aa9d53e
commit 860db51b6d
41 changed files with 80 additions and 51 deletions

View File

@ -118,7 +118,6 @@ CPPSRCS = \
jsfriendapi.cpp \
jsfun.cpp \
jsgc.cpp \
jsgcmark.cpp \
jscrashreport.cpp \
jshash.cpp \
jsinfer.cpp \
@ -172,6 +171,7 @@ CPPSRCS = \
RegExpObject.cpp \
RegExpStatics.cpp \
RegExp.cpp \
Marking.cpp \
Memory.cpp \
Statistics.cpp \
StringBuffer.cpp \

View File

@ -43,10 +43,10 @@
#include "builtin/MapObject.h"
#include "jscntxt.h"
#include "jsgcmark.h"
#include "jsiter.h"
#include "jsobj.h"
#include "gc/Marking.h"
#include "vm/GlobalObject.h"
#include "vm/MethodGuard.h"
#include "vm/Stack.h"

View File

@ -65,7 +65,6 @@
#include "jsversion.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jsiter.h"
#include "jslock.h"
@ -80,6 +79,7 @@
#include "frontend/FoldConstants.h"
#include "frontend/ParseMaps.h"
#include "frontend/TokenStream.h"
#include "gc/Marking.h"
#if JS_HAS_XML_SUPPORT
#include "jsxml.h"

View File

@ -40,9 +40,8 @@
#ifndef jsgc_barrier_inl_h___
#define jsgc_barrier_inl_h___
#include "jsgcmark.h"
#include "gc/Barrier.h"
#include "gc/Marking.h"
#include "vm/ObjectImpl-inl.h"
#include "vm/String-inl.h"

View File

@ -247,7 +247,6 @@ struct Shape;
class BaseShape;
namespace types { struct TypeObject; }
typedef HeapPtr<JSAtom> HeapPtrAtom;
typedef HeapPtr<JSObject> HeapPtrObject;
typedef HeapPtr<JSFunction> HeapPtrFunction;
typedef HeapPtr<JSString> HeapPtrString;

View File

@ -4,16 +4,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "jsgcmark.h"
#include "jsprf.h"
#include "jsscope.h"
#include "jsstr.h"
#include "gc/Marking.h"
#include "methodjit/MethodJIT.h"
#include "jsobjinlines.h"
#include "jsscopeinlines.h"
#include "vm/String-inl.h"
#include "methodjit/MethodJIT.h"
/*
* There are two mostly separate mark paths. The first is a fast path used
@ -30,7 +31,7 @@
* like tail recursion elimination that method also implements the scanning of
* objects. For other GC things it uses helper methods.
*
* Most of the marking code outside jsgcmark uses functions like MarkObject,
* Most of the marking code outside Marking.cpp uses functions like MarkObject,
* MarkString, etc. These functions check if an object is in the compartment
* currently being GCed. If it is, they call PushMarkStack. Roots are pushed
* this way as well as pointers traversed inside trace hooks (for things like

View File

@ -4,18 +4,36 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef jsgcmark_h___
#define jsgcmark_h___
#ifndef gc_marking_h___
#define gc_marking_h___
#include "jsgc.h"
#include "jscntxt.h"
#include "jscompartment.h"
#include "jslock.h"
#include "gc/Barrier.h"
#include "js/TemplateLib.h"
extern "C" {
struct JSContext;
struct JSFunction;
struct JSObject;
struct JSScript;
}
class JSAtom;
class JSLinearString;
namespace js {
class ArgumentsObject;
class BaseShape;
class GlobalObject;
class UnownedBaseShape;
struct Shape;
template<class, typename> class HeapPtr;
namespace gc {
/*** Object Marking ***/
@ -68,6 +86,8 @@ DeclMarker(TypeObject, types::TypeObject)
DeclMarker(XML, JSXML)
#endif
#undef DeclMarker
/*** Externally Typed Marking ***/
/*
@ -261,4 +281,4 @@ CallTracer(JSTracer *trc, void *thing, JSGCTraceKind kind);
} /* namespace js */
#endif
#endif /* gc_marking_h___ */

View File

@ -65,7 +65,6 @@
#include "jsexn.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jsiter.h"
#include "jslock.h"
@ -91,6 +90,7 @@
#include "builtin/RegExp.h"
#include "frontend/BytecodeCompiler.h"
#include "frontend/BytecodeEmitter.h"
#include "gc/Marking.h"
#include "gc/Memory.h"
#include "js/MemoryMetrics.h"
#include "yarr/BumpPointerAllocator.h"

View File

@ -115,7 +115,6 @@
#include "jsversion.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jsiter.h"
#include "jslock.h"
@ -127,6 +126,7 @@
#include "methodjit/StubCalls.h"
#include "methodjit/StubCalls-inl.h"
#include "gc/Marking.h"
#include "vm/ArgumentsObject.h"
#include "vm/MethodGuard.h"
#include "vm/NumericConversions.h"

View File

@ -54,7 +54,6 @@
#include "jsatom.h"
#include "jscntxt.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jslock.h"
#include "jsnum.h"
#include "jsstr.h"
@ -62,6 +61,7 @@
#include "jsxml.h"
#include "frontend/Parser.h"
#include "gc/Marking.h"
#include "jsstrinlines.h"
#include "jsatominlines.h"

View File

@ -51,6 +51,7 @@
#include "gc/Barrier.h"
#include "js/HashTable.h"
#include "vm/String.h"
struct JSIdArray {
int length;

View File

@ -65,7 +65,6 @@
#include "jsexn.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsiter.h"
#include "jslock.h"
#include "jsmath.h"
@ -81,6 +80,7 @@
# include "assembler/assembler/MacroAssembler.h"
# include "methodjit/MethodJIT.h"
#endif
#include "gc/Marking.h"
#include "frontend/TokenStream.h"
#include "frontend/ParseMaps.h"
#include "yarr/BumpPointerAllocator.h"

View File

@ -41,7 +41,6 @@
#include "jscntxt.h"
#include "jscompartment.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsiter.h"
#include "jsmath.h"
#include "jsproxy.h"
@ -50,6 +49,7 @@
#include "jswrapper.h"
#include "assembler/wtf/Platform.h"
#include "gc/Marking.h"
#include "js/MemoryMetrics.h"
#include "methodjit/MethodJIT.h"
#include "methodjit/PolyIC.h"

View File

@ -54,7 +54,6 @@
#include "jsdbgapi.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jslock.h"
#include "jsobj.h"
@ -65,6 +64,7 @@
#include "jswatchpoint.h"
#include "jswrapper.h"
#include "gc/Marking.h"
#include "frontend/BytecodeEmitter.h"
#include "frontend/Parser.h"
#include "vm/Debugger.h"

View File

@ -55,7 +55,6 @@
#include "jsexn.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jsnum.h"
#include "jsobj.h"
@ -64,6 +63,7 @@
#include "jsscript.h"
#include "jswrapper.h"
#include "gc/Marking.h"
#include "vm/GlobalObject.h"
#include "vm/StringBuffer.h"

View File

@ -55,7 +55,6 @@
#include "jsexn.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jslock.h"
#include "jsnum.h"
@ -70,6 +69,7 @@
#include "frontend/BytecodeCompiler.h"
#include "frontend/BytecodeEmitter.h"
#include "frontend/TokenStream.h"
#include "gc/Marking.h"
#include "vm/Debugger.h"
#include "vm/MethodGuard.h"
#include "vm/ScopeObject.h"

View File

@ -91,7 +91,6 @@
#include "jsexn.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jsiter.h"
#include "jslock.h"
@ -108,6 +107,7 @@
#endif
#include "frontend/Parser.h"
#include "gc/Marking.h"
#include "gc/Memory.h"
#include "methodjit/MethodJIT.h"
#include "vm/Debugger.h"

View File

@ -44,7 +44,6 @@
#include "jsexn.h"
#include "jsfriendapi.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinfer.h"
#include "jsmath.h"
#include "jsnum.h"
@ -56,6 +55,7 @@
#include "jsiter.h"
#include "frontend/TokenStream.h"
#include "gc/Marking.h"
#include "js/MemoryMetrics.h"
#include "methodjit/MethodJIT.h"
#include "methodjit/Retcon.h"

View File

@ -42,9 +42,10 @@
#include "jsarray.h"
#include "jsanalyze.h"
#include "jscompartment.h"
#include "jsgcmark.h"
#include "jsinfer.h"
#include "jsprf.h"
#include "gc/Marking.h"
#include "vm/GlobalObject.h"
#include "vm/Stack-inl.h"

View File

@ -60,7 +60,6 @@
#include "jsdbgapi.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jsiter.h"
#include "jslock.h"
@ -73,6 +72,7 @@
#include "jsstr.h"
#include "jslibmath.h"
#include "gc/Marking.h"
#include "frontend/BytecodeEmitter.h"
#ifdef JS_METHODJIT
#include "methodjit/MethodJIT.h"

View File

@ -54,7 +54,6 @@
#include "jsexn.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jsiter.h"
#include "jslock.h"
@ -71,6 +70,7 @@
#include "ds/Sort.h"
#include "frontend/TokenStream.h"
#include "gc/Marking.h"
#include "vm/GlobalObject.h"
#include "jsinferinlines.h"

View File

@ -58,7 +58,6 @@
#include "jsversion.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jsiter.h"
#include "jslock.h"
@ -81,6 +80,7 @@
#include "frontend/BytecodeCompiler.h"
#include "frontend/BytecodeEmitter.h"
#include "frontend/Parser.h"
#include "gc/Marking.h"
#include "js/MemoryMetrics.h"
#include "vm/StringBuffer.h"
#include "vm/Xdr.h"

View File

@ -48,7 +48,6 @@
#include "jsbool.h"
#include "jscntxt.h"
#include "jsfun.h"
#include "jsgcmark.h"
#include "jsiter.h"
#include "jslock.h"
#include "jsnum.h"
@ -63,8 +62,8 @@
#include "jswrapper.h"
#include "gc/Barrier.h"
#include "gc/Marking.h"
#include "js/TemplateLib.h"
#include "vm/BooleanObject.h"
#include "vm/GlobalObject.h"
#include "vm/NumberObject.h"

View File

@ -43,13 +43,13 @@
#include "jsapi.h"
#include "jscntxt.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsprvtd.h"
#include "jsnum.h"
#include "jsobj.h"
#include "jsproxy.h"
#include "jsscope.h"
#include "gc/Marking.h"
#include "vm/MethodGuard.h"
#include "jsatominlines.h"

View File

@ -47,11 +47,11 @@
#include "jscntxt.h"
#include "jsdbgapi.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsobj.h"
#include "jsscope.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "gc/Marking.h"
#include "vm/ArgumentsObject.h"
#include "vm/ScopeObject.h"
#include "vm/StringObject.h"

View File

@ -55,7 +55,6 @@
#include "jsdbgapi.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jslock.h"
#include "jsnum.h"
@ -63,6 +62,7 @@
#include "jsscope.h"
#include "jsscript.h"
#include "gc/Marking.h"
#include "frontend/BytecodeEmitter.h"
#include "frontend/Parser.h"
#include "js/MemoryMetrics.h"

View File

@ -53,13 +53,13 @@
#include "jscntxt.h"
#include "jsversion.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "jslock.h"
#include "jsnum.h"
#include "jsobj.h"
#include "jstypedarray.h"
#include "gc/Marking.h"
#include "vm/GlobalObject.h"
#include "vm/NumericConversions.h"

View File

@ -37,9 +37,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "jswatchpoint.h"
#include "jsatom.h"
#include "jsgcmark.h"
#include "jswatchpoint.h"
#include "gc/Marking.h"
#include "jsobjinlines.h"
using namespace js;

View File

@ -45,9 +45,9 @@
#include "jsfriendapi.h"
#include "jsgc.h"
#include "jsobj.h"
#include "jsgcmark.h"
#include "jsweakmap.h"
#include "gc/Marking.h"
#include "vm/GlobalObject.h"
#include "jsgcinlines.h"

View File

@ -46,8 +46,8 @@
#include "jsfriendapi.h"
#include "jscntxt.h"
#include "jsobj.h"
#include "jsgcmark.h"
#include "gc/Marking.h"
#include "js/HashTable.h"
namespace js {

View File

@ -41,18 +41,19 @@
#include "jsapi.h"
#include "jscntxt.h"
#include "jscompartment.h"
#include "jsexn.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsiter.h"
#include "jsnum.h"
#include "jswrapper.h"
#include "methodjit/PolyIC.h"
#include "methodjit/MonoIC.h"
#ifdef JS_METHODJIT
# include "assembler/jit/ExecutableAllocator.h"
#endif
#include "jscompartment.h"
#include "gc/Marking.h"
#include "methodjit/PolyIC.h"
#include "methodjit/MonoIC.h"
#include "jsobjinlines.h"

View File

@ -57,7 +57,6 @@
#include "jscntxt.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jslock.h"
#include "jsnum.h"
#include "jsobj.h"
@ -69,6 +68,7 @@
#include "frontend/Parser.h"
#include "frontend/TokenStream.h"
#include "gc/Marking.h"
#include "vm/GlobalObject.h"
#include "vm/MethodGuard.h"
#include "vm/StringBuffer.h"

View File

@ -40,8 +40,8 @@
#include "Logging.h"
#include "assembler/jit/ExecutableAllocator.h"
#include "assembler/assembler/RepatchBuffer.h"
#include "gc/Marking.h"
#include "js/MemoryMetrics.h"
#include "jsgcmark.h"
#include "BaseAssembler.h"
#include "Compiler.h"
#include "MonoIC.h"

View File

@ -45,13 +45,13 @@
#include "jsobj.h"
#include "jslibmath.h"
#include "jsiter.h"
#include "jsgcmark.h"
#include "jsnum.h"
#include "jsxml.h"
#include "jsbool.h"
#include "assembler/assembler/MacroAssemblerCodeRef.h"
#include "jstypes.h"
#include "gc/Marking.h"
#include "vm/Debugger.h"
#include "vm/NumericConversions.h"
#include "vm/String.h"

View File

@ -42,7 +42,6 @@
#include "vm/Debugger.h"
#include "jsapi.h"
#include "jscntxt.h"
#include "jsgcmark.h"
#include "jsnum.h"
#include "jsobj.h"
#include "jswrapper.h"
@ -54,6 +53,7 @@
#include "frontend/BytecodeCompiler.h"
#include "frontend/BytecodeEmitter.h"
#include "gc/Marking.h"
#include "methodjit/Retcon.h"
#include "js/Vector.h"

View File

@ -13,9 +13,9 @@
#include "jscell.h"
#include "jscompartment.h"
#include "jsgc.h"
#include "jsgcmark.h"
#include "jsinterp.h"
#include "gc/Marking.h"
#include "js/TemplateLib.h"
#include "ObjectImpl.h"

View File

@ -42,9 +42,9 @@
#define RegExpStatics_h__
#include "jscntxt.h"
#include "jsgcmark.h"
#include "gc/Barrier.h"
#include "gc/Marking.h"
#include "js/Vector.h"
#include "vm/MatchPairs.h"

View File

@ -39,7 +39,7 @@
* ***** END LICENSE BLOCK ***** */
#include "jscntxt.h"
#include "jsgcmark.h"
#include "gc/Marking.h"
#include "methodjit/MethodJIT.h"
#include "Stack.h"

View File

@ -42,9 +42,9 @@
#define String_inl_h__
#include "jscntxt.h"
#include "jsgcmark.h"
#include "jsprobes.h"
#include "gc/Marking.h"
#include "String.h"
#include "jsgcinlines.h"

View File

@ -40,7 +40,7 @@
#include "mozilla/RangedPtr.h"
#include "jsgcmark.h"
#include "gc/Marking.h"
#include "String.h"
#include "String-inl.h"

View File

@ -47,6 +47,8 @@
#include "jscell.h"
#include "jsfriendapi.h"
#include "gc/Barrier.h"
class JSString;
class JSDependentString;
class JSExtensibleString;
@ -673,6 +675,10 @@ class JSAtom : public JSFixedString
JS_STATIC_ASSERT(sizeof(JSAtom) == sizeof(JSString));
namespace js {
typedef HeapPtr<JSAtom> HeapPtrAtom;
}
class JSInlineAtom : public JSInlineString /*, JSAtom */
{
/*