Changeset 37086 in webkit for trunk/JavaScriptCore/VM/Machine.h
- Timestamp:
- Sep 29, 2008, 5:46:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/Machine.h
r37050 r37086 103 103 JSValue* retrieveCaller(ExecState*, InternalFunction*) const; 104 104 void retrieveLastCaller(ExecState* exec, int& lineNumber, int& sourceId, UString& sourceURL, JSValue*& function) const; 105 106 static ScopeChainNode* scopeChain(const Register* r) { return r[RegisterFile::ScopeChain].scopeChain(); } 107 static CodeBlock* codeBlock(const Register* r) { return r[RegisterFile::CodeBlock].codeBlock(); } 105 108 106 109 void getArgumentsData(Register* callFrame, JSFunction*&, int& firstParameterIndex, Register*& argv, int& argc); … … 241 244 bool isJSString(JSValue* v) { return !JSImmediate::isImmediate(v) && v->asCell()->vptr() == m_jsStringVptr; } 242 245 246 ALWAYS_INLINE static void initializeCallFrame(Register* callFrame, CodeBlock*, Instruction*, ScopeChainNode*, Register* r, int returnValueRegister, int argc, JSValue* function); 247 243 248 private: 244 249 enum ExecutionFlag { Normal, InitializeAndReturn }; … … 247 252 JSValue* execute(EvalNode*, ExecState*, JSObject* thisObj, int registerOffset, ScopeChainNode*, JSValue** exception); 248 253 249 ALWAYS_INLINE static void initializeCallFrame(Register* callFrame, CodeBlock*, Instruction*, ScopeChainNode*, Register* r, int returnValueRegister, int argc, JSValue* function); 250 251 ALWAYS_INLINE static void setScopeChain(ExecState* exec, ScopeChainNode*&, ScopeChainNode*); 252 NEVER_INLINE void debug(ExecState*, ScopeChainNode*, Register*, DebugHookID, int firstLine, int lastLine); 253 254 NEVER_INLINE bool resolve(ExecState* exec, Instruction* vPC, Register* r, ScopeChainNode* scopeChain, JSValue*& exceptionValue); 255 NEVER_INLINE bool resolveSkip(ExecState* exec, Instruction* vPC, Register* r, ScopeChainNode* scopeChain, JSValue*& exceptionValue); 254 NEVER_INLINE void debug(ExecState*, Register*, DebugHookID, int firstLine, int lastLine); 255 256 NEVER_INLINE bool resolve(ExecState* exec, Instruction* vPC, Register* r, JSValue*& exceptionValue); 257 NEVER_INLINE bool resolveSkip(ExecState* exec, Instruction* vPC, Register* r, JSValue*& exceptionValue); 256 258 NEVER_INLINE bool resolveGlobal(ExecState* exec, Instruction* vPC, Register* r, JSValue*& exceptionValue); 257 NEVER_INLINE void resolveBase(ExecState* exec, Instruction* vPC, Register* r , ScopeChainNode* scopeChain);258 NEVER_INLINE bool resolveBaseAndProperty(ExecState* exec, Instruction* vPC, Register* r, ScopeChainNode* scopeChain,JSValue*& exceptionValue);259 NEVER_INLINE ScopeChainNode* createExceptionScope(ExecState* exec, const Instruction* vPC, Register* r , ScopeChainNode* scopeChain);260 261 NEVER_INLINE bool unwindCallFrame(ExecState*, JSValue*, const Instruction*&, CodeBlock*&, ScopeChainNode*&,Register*&);262 NEVER_INLINE Instruction* throwException(ExecState*, JSValue*&, const Instruction*, ScopeChainNode*&,Register*&, bool);263 NEVER_INLINE bool resolveBaseAndFunc(ExecState* exec, Instruction* vPC, Register* r, ScopeChainNode* scopeChain,JSValue*& exceptionValue);259 NEVER_INLINE void resolveBase(ExecState* exec, Instruction* vPC, Register* r); 260 NEVER_INLINE bool resolveBaseAndProperty(ExecState* exec, Instruction* vPC, Register* r, JSValue*& exceptionValue); 261 NEVER_INLINE ScopeChainNode* createExceptionScope(ExecState* exec, const Instruction* vPC, Register* r); 262 263 NEVER_INLINE bool unwindCallFrame(ExecState*, JSValue*, const Instruction*&, CodeBlock*&, Register*&); 264 NEVER_INLINE Instruction* throwException(ExecState*, JSValue*&, const Instruction*, Register*&, bool); 265 NEVER_INLINE bool resolveBaseAndFunc(ExecState* exec, Instruction* vPC, Register* r, JSValue*& exceptionValue); 264 266 265 267 Register* callFrame(ExecState*, InternalFunction*) const; 266 268 267 JSValue* privateExecute(ExecutionFlag, ExecState* = 0, RegisterFile* = 0, Register* = 0, ScopeChainNode* = 0,JSValue** exception = 0);268 269 void dumpCallFrame( ScopeChainNode*,const RegisterFile*, const Register*);269 JSValue* privateExecute(ExecutionFlag, ExecState* = 0, RegisterFile* = 0, Register* = 0, JSValue** exception = 0); 270 271 void dumpCallFrame(const RegisterFile*, const Register*); 270 272 void dumpRegisters(const RegisterFile*, const Register*); 271 273 … … 311 313 }; 312 314 315 ALWAYS_INLINE void Machine::initializeCallFrame(Register* callFrame, CodeBlock* codeBlock, Instruction* vPC, ScopeChainNode* scopeChain, Register* r, int returnValueRegister, int argc, JSValue* function) 316 { 317 callFrame[RegisterFile::CodeBlock] = codeBlock; 318 callFrame[RegisterFile::ScopeChain] = scopeChain; 319 callFrame[RegisterFile::CallerRegisters] = r; 320 callFrame[RegisterFile::ReturnPC] = vPC; 321 callFrame[RegisterFile::ReturnValueRegister] = returnValueRegister; 322 callFrame[RegisterFile::ArgumentCount] = argc; // original argument count (for the sake of the "arguments" object) 323 callFrame[RegisterFile::Callee] = function; 324 callFrame[RegisterFile::OptionalCalleeActivation] = nullJSValue; 325 callFrame[RegisterFile::OptionalCalleeArguments] = nullJSValue; 326 } 327 313 328 } // namespace JSC 314 329
Note:
See TracChangeset
for help on using the changeset viewer.