Bug 496674 - Replace FORALL macros with template functions and visitors, r=gal.

This commit is contained in:
Graydon Hoare 2009-06-19 18:48:05 -07:00
parent 791b4c9a77
commit c8b2433196
2 changed files with 915 additions and 485 deletions

File diff suppressed because it is too large Load Diff

View File

@ -193,9 +193,8 @@ typedef Queue<uint16> SlotList;
class TypeMap : public Queue<uint8> {
public:
JS_REQUIRES_STACK void captureTypes(JSContext* cx, SlotList& slots, unsigned callDepth);
JS_REQUIRES_STACK void captureMissingGlobalTypes(JSContext* cx,
SlotList& slots,
JS_REQUIRES_STACK void captureTypes(JSContext* cx, JSObject* globalObj, SlotList& slots, unsigned callDepth);
JS_REQUIRES_STACK void captureMissingGlobalTypes(JSContext* cx, JSObject* globalObj, SlotList& slots,
unsigned stackSlots);
bool matches(TypeMap& other) const;
};
@ -717,6 +716,16 @@ public:
JS_REQUIRES_STACK JSRecordingStatus record_##op();
# include "jsopcode.tbl"
#undef OPDEF
friend class ImportBoxedStackSlotVisitor;
friend class ImportUnboxedStackSlotVisitor;
friend class ImportGlobalSlotVisitor;
friend class AdjustCallerGlobalTypesVisitor;
friend class AdjustCallerStackTypesVisitor;
friend class TypeCompatibilityVisitor;
friend class SelfTypeStabilityVisitor;
friend class PeerTypeStabilityVisitor;
friend class UndemoteVisitor;
};
#define TRACING_ENABLED(cx) JS_HAS_OPTION(cx, JSOPTION_JIT)
#define TRACE_RECORDER(cx) (JS_TRACE_MONITOR(cx).recorder)