diff options
Diffstat (limited to 'JavaScriptCore/interpreter/Interpreter.h')
| -rw-r--r-- | JavaScriptCore/interpreter/Interpreter.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/JavaScriptCore/interpreter/Interpreter.h b/JavaScriptCore/interpreter/Interpreter.h index e17b055..2bc403e 100644 --- a/JavaScriptCore/interpreter/Interpreter.h +++ b/JavaScriptCore/interpreter/Interpreter.h @@ -44,7 +44,6 @@ namespace JSC { class CodeBlock; class EvalExecutable; class FunctionExecutable; - class InternalFunction; class JSFunction; class JSGlobalObject; class ProgramExecutable; @@ -64,7 +63,7 @@ namespace JSC { WillExecuteStatement }; - enum { MaxMainThreadReentryDepth = 256, MaxSecondaryThreadReentryDepth = 32 }; + enum { MaxLargeThreadReentryDepth = 256, MaxSmallThreadReentryDepth = 32 }; class Interpreter : public FastAllocBase { friend class JIT; @@ -76,7 +75,7 @@ namespace JSC { Opcode getOpcode(OpcodeID id) { - #if HAVE(COMPUTED_GOTO) + #if ENABLE(COMPUTED_GOTO_INTERPRETER) return m_opcodeTable[id]; #else return id; @@ -85,7 +84,7 @@ namespace JSC { OpcodeID getOpcodeID(Opcode opcode) { - #if HAVE(COMPUTED_GOTO) + #if ENABLE(COMPUTED_GOTO_INTERPRETER) ASSERT(isOpcode(opcode)); return m_opcodeIDTable.get(opcode); #else @@ -94,20 +93,21 @@ namespace JSC { } bool isOpcode(Opcode); - - JSValue execute(ProgramExecutable*, CallFrame*, ScopeChainNode*, JSObject* thisObj, JSValue* exception); - JSValue execute(FunctionExecutable*, CallFrame*, JSFunction*, JSObject* thisObj, const ArgList& args, ScopeChainNode*, JSValue* exception); - JSValue execute(EvalExecutable* evalNode, CallFrame* exec, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue* exception); + + JSValue execute(ProgramExecutable*, CallFrame*, ScopeChainNode*, JSObject* thisObj); + JSValue executeCall(CallFrame*, JSObject* function, CallType, const CallData&, JSValue thisValue, const ArgList&); + JSObject* executeConstruct(CallFrame*, JSObject* function, ConstructType, const ConstructData&, const ArgList&); + JSValue execute(EvalExecutable* evalNode, CallFrame* exec, JSObject* thisObj, ScopeChainNode* scopeChain); JSValue retrieveArguments(CallFrame*, JSFunction*) const; - JSValue retrieveCaller(CallFrame*, InternalFunction*) const; + JSValue retrieveCaller(CallFrame*, JSFunction*) const; void retrieveLastCaller(CallFrame*, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue& function) const; void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc); SamplingTool* sampler() { return m_sampler.get(); } - NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue); + NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset); NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset, bool); NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine); @@ -117,16 +117,17 @@ namespace JSC { private: enum ExecutionFlag { Normal, InitializeAndReturn }; - CallFrameClosure prepareForRepeatCall(FunctionExecutable*, CallFrame*, JSFunction*, int argCount, ScopeChainNode*, JSValue* exception); + CallFrameClosure prepareForRepeatCall(FunctionExecutable*, CallFrame*, JSFunction*, int argCount, ScopeChainNode*); void endRepeatCall(CallFrameClosure&); - JSValue execute(CallFrameClosure&, JSValue* exception); + JSValue execute(CallFrameClosure&); - JSValue execute(EvalExecutable*, CallFrame*, JSObject* thisObject, int globalRegisterOffset, ScopeChainNode*, JSValue* exception); + JSValue execute(EvalExecutable*, CallFrame*, JSObject* thisObject, int globalRegisterOffset, ScopeChainNode*); -#if USE(INTERPRETER) +#if ENABLE(INTERPRETER) NEVER_INLINE bool resolve(CallFrame*, Instruction*, JSValue& exceptionValue); NEVER_INLINE bool resolveSkip(CallFrame*, Instruction*, JSValue& exceptionValue); NEVER_INLINE bool resolveGlobal(CallFrame*, Instruction*, JSValue& exceptionValue); + NEVER_INLINE bool resolveGlobalDynamic(CallFrame*, Instruction*, JSValue& exceptionValue); NEVER_INLINE void resolveBase(CallFrame*, Instruction* vPC); NEVER_INLINE bool resolveBaseAndProperty(CallFrame*, Instruction*, JSValue& exceptionValue); NEVER_INLINE ScopeChainNode* createExceptionScope(CallFrame*, const Instruction* vPC); @@ -135,15 +136,15 @@ namespace JSC { void uncacheGetByID(CodeBlock*, Instruction* vPC); void tryCachePutByID(CallFrame*, CodeBlock*, Instruction*, JSValue baseValue, const PutPropertySlot&); void uncachePutByID(CodeBlock*, Instruction* vPC); -#endif +#endif // ENABLE(INTERPRETER) NEVER_INLINE bool unwindCallFrame(CallFrame*&, JSValue, unsigned& bytecodeOffset, CodeBlock*&); static ALWAYS_INLINE CallFrame* slideRegisterWindowForCall(CodeBlock*, RegisterFile*, CallFrame*, size_t registerOffset, int argc); - static CallFrame* findFunctionCallFrame(CallFrame*, InternalFunction*); + static CallFrame* findFunctionCallFrame(CallFrame*, JSFunction*); - JSValue privateExecute(ExecutionFlag, RegisterFile*, CallFrame*, JSValue* exception); + JSValue privateExecute(ExecutionFlag, RegisterFile*, CallFrame*); void dumpCallFrame(CallFrame*); void dumpRegisters(CallFrame*); @@ -158,7 +159,7 @@ namespace JSC { RegisterFile m_registerFile; -#if HAVE(COMPUTED_GOTO) +#if ENABLE(COMPUTED_GOTO_INTERPRETER) Opcode m_opcodeTable[numOpcodeIDs]; // Maps OpcodeID => Opcode for compiling HashMap<Opcode, OpcodeID> m_opcodeIDTable; // Maps Opcode => OpcodeID for decompiling #endif |
