Changeset 34838 in webkit for trunk/JavaScriptCore/VM/Machine.h
- Timestamp:
- Jun 27, 2008, 3:35:33 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/Machine.h
r34781 r34838 31 31 32 32 #include "Opcode.h" 33 #include "RegisterFile Stack.h"33 #include "RegisterFile.h" 34 34 #include <kjs/list.h> 35 35 #include <wtf/HashMap.h> … … 41 41 class ExecState; 42 42 class FunctionBodyNode; 43 class Instruction; 44 class JSFunction; 43 45 class ProgramNode; 44 46 class Register; 45 47 class RegisterFile; 46 class RegisterFileStack;47 48 class ScopeChainNode; 48 49 … … 60 61 class Machine { 61 62 public: 62 enum {63 CallerCodeBlock = 0,64 ReturnVPC,65 CallerScopeChain,66 CallerRegisterOffset,67 ReturnValueRegister,68 ArgumentStartRegister,69 ArgumentCount,70 CalledAsConstructor,71 Callee,72 OptionalCalleeActivation,73 CallFrameHeaderSize74 };75 76 enum { ProgramCodeThisRegister = -1 };77 78 63 Machine(); 79 64 65 RegisterFile& registerFile() { return m_registerFile; } 66 80 67 Opcode getOpcode(OpcodeID id) 81 68 { … … 98 85 99 86 bool isOpcode(Opcode opcode); 100 101 JSValue* execute(ProgramNode*, ExecState*, ScopeChainNode*, JSObject* thisObj, RegisterFileStack*, JSValue** exception); 102 JSValue* execute(FunctionBodyNode*, ExecState*, JSFunction*, JSObject* thisObj, const ArgList& args, RegisterFileStack*, ScopeChainNode*, JSValue** exception); 103 JSValue* execute(EvalNode*, ExecState*, JSObject* thisObj, RegisterFile*, int registerOffset, ScopeChainNode*, JSValue** exception); 104 JSValue* execute(EvalNode*, ExecState*, JSObject* thisObj, RegisterFileStack*, ScopeChainNode*, JSValue** exception); 87 88 JSValue* execute(ProgramNode*, ExecState*, ScopeChainNode*, JSObject* thisObj, JSValue** exception); 89 JSValue* execute(FunctionBodyNode*, ExecState*, JSFunction*, JSObject* thisObj, const ArgList& args, ScopeChainNode*, JSValue** exception); 90 JSValue* execute(EvalNode* evalNode, ExecState* exec, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue** exception) 91 { 92 return execute(evalNode, exec, thisObj, m_registerFile.size(), scopeChain, exception); 93 } 105 94 106 95 JSValue* retrieveArguments(ExecState*, JSFunction*) const; … … 109 98 void getFunctionAndArguments(Register** registerBase, Register* callFrame, JSFunction*&, Register*& argv, int& argc); 110 99 100 void mark(Heap* heap) { m_registerFile.mark(heap); } 101 111 102 private: 112 103 enum ExecutionFlag { Normal, InitializeAndReturn }; 104 105 friend NEVER_INLINE JSValue* callEval(ExecState* exec, JSObject* thisObj, ScopeChainNode* scopeChain, RegisterFile*, Register* r, int argv, int argc, JSValue*& exceptionValue); 106 JSValue* execute(EvalNode*, ExecState*, JSObject* thisObj, int registerOffset, ScopeChainNode*, JSValue** exception); 113 107 114 108 ALWAYS_INLINE void setScopeChain(ExecState* exec, ScopeChainNode*&, ScopeChainNode*); … … 125 119 void dumpRegisters(const CodeBlock*, RegisterFile*, const Register*); 126 120 127 bool isGlobalCallFrame(Register** registerBase, const Register* r) const { return (*registerBase) == r; } 121 int m_reentryDepth; 122 RegisterFile m_registerFile; 128 123 129 int m_reentryDepth;130 124 #if HAVE(COMPUTED_GOTO) 131 125 Opcode m_opcodeTable[numOpcodeIDs]; // Maps OpcodeID => Opcode for compiling
Note:
See TracChangeset
for help on using the changeset viewer.