diff options
Diffstat (limited to 'JavaScriptCore/interpreter/Interpreter.h')
| -rw-r--r-- | JavaScriptCore/interpreter/Interpreter.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/JavaScriptCore/interpreter/Interpreter.h b/JavaScriptCore/interpreter/Interpreter.h index 519c508..e17b055 100644 --- a/JavaScriptCore/interpreter/Interpreter.h +++ b/JavaScriptCore/interpreter/Interpreter.h @@ -42,12 +42,12 @@ namespace JSC { class CodeBlock; - class EvalNode; - class FunctionBodyNode; + class EvalExecutable; + class FunctionExecutable; class InternalFunction; class JSFunction; class JSGlobalObject; - class ProgramNode; + class ProgramExecutable; class Register; class ScopeChainNode; class SamplingTool; @@ -95,9 +95,9 @@ namespace JSC { bool isOpcode(Opcode); - JSValue execute(ProgramNode*, CallFrame*, ScopeChainNode*, JSObject* thisObj, JSValue* exception); - JSValue execute(FunctionBodyNode*, CallFrame*, JSFunction*, JSObject* thisObj, const ArgList& args, ScopeChainNode*, JSValue* exception); - JSValue execute(EvalNode* evalNode, CallFrame* exec, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue* exception); + 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 retrieveArguments(CallFrame*, JSFunction*) const; JSValue retrieveCaller(CallFrame*, InternalFunction*) const; @@ -105,21 +105,23 @@ namespace JSC { void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc); - void setSampler(SamplingTool* sampler) { m_sampler = sampler; } - SamplingTool* sampler() { return m_sampler; } + SamplingTool* sampler() { return m_sampler.get(); } NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue); NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset, bool); NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine); + void dumpSampleData(ExecState* exec); + void startSampling(); + void stopSampling(); private: enum ExecutionFlag { Normal, InitializeAndReturn }; - CallFrameClosure prepareForRepeatCall(FunctionBodyNode*, CallFrame*, JSFunction*, int argCount, ScopeChainNode*, JSValue* exception); + CallFrameClosure prepareForRepeatCall(FunctionExecutable*, CallFrame*, JSFunction*, int argCount, ScopeChainNode*, JSValue* exception); void endRepeatCall(CallFrameClosure&); JSValue execute(CallFrameClosure&, JSValue* exception); - JSValue execute(EvalNode*, CallFrame*, JSObject* thisObject, int globalRegisterOffset, ScopeChainNode*, JSValue* exception); + JSValue execute(EvalExecutable*, CallFrame*, JSObject* thisObject, int globalRegisterOffset, ScopeChainNode*, JSValue* exception); #if USE(INTERPRETER) NEVER_INLINE bool resolve(CallFrame*, Instruction*, JSValue& exceptionValue); @@ -127,7 +129,6 @@ namespace JSC { NEVER_INLINE bool resolveGlobal(CallFrame*, Instruction*, JSValue& exceptionValue); NEVER_INLINE void resolveBase(CallFrame*, Instruction* vPC); NEVER_INLINE bool resolveBaseAndProperty(CallFrame*, Instruction*, JSValue& exceptionValue); - NEVER_INLINE bool resolveBaseAndFunc(CallFrame*, Instruction*, JSValue& exceptionValue); NEVER_INLINE ScopeChainNode* createExceptionScope(CallFrame*, const Instruction* vPC); void tryCacheGetByID(CallFrame*, CodeBlock*, Instruction*, JSValue baseValue, const Identifier& propertyName, const PropertySlot&); @@ -149,7 +150,9 @@ namespace JSC { bool isCallBytecode(Opcode opcode) { return opcode == getOpcode(op_call) || opcode == getOpcode(op_construct) || opcode == getOpcode(op_call_eval); } - SamplingTool* m_sampler; + void enableSampler(); + int m_sampleEntryDepth; + OwnPtr<SamplingTool> m_sampler; int m_reentryDepth; |
