Changeset 52343 in webkit for trunk/JavaScriptCore/interpreter/CallFrame.h
- Timestamp:
- Dec 18, 2009, 2:18:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/interpreter/CallFrame.h
r51672 r52343 111 111 Instruction* returnPC() const { return this[RegisterFile::ReturnPC].vPC(); } 112 112 113 void setCalleeArguments(JSValue arguments) { this[RegisterFile::OptionalCalleeArguments] = arguments; }114 void setCallerFrame(CallFrame* callerFrame) { this[RegisterFile::CallerFrame] = callerFrame; }115 void setScopeChain(ScopeChainNode* scopeChain) { this[RegisterFile::ScopeChain] = scopeChain; }113 void setCalleeArguments(JSValue arguments) { static_cast<Register*>(this)[RegisterFile::OptionalCalleeArguments] = arguments; } 114 void setCallerFrame(CallFrame* callerFrame) { static_cast<Register*>(this)[RegisterFile::CallerFrame] = callerFrame; } 115 void setScopeChain(ScopeChainNode* scopeChain) { static_cast<Register*>(this)[RegisterFile::ScopeChain] = scopeChain; } 116 116 117 117 ALWAYS_INLINE void init(CodeBlock* codeBlock, Instruction* vPC, ScopeChainNode* scopeChain, … … 123 123 setScopeChain(scopeChain); 124 124 setCallerFrame(callerFrame); 125 this[RegisterFile::ReturnPC] = vPC; // This is either an Instruction* or a pointer into JIT generated code stored as an Instruction*.126 this[RegisterFile::ReturnValueRegister] = Register::withInt(returnValueRegister);125 static_cast<Register*>(this)[RegisterFile::ReturnPC] = vPC; // This is either an Instruction* or a pointer into JIT generated code stored as an Instruction*. 126 static_cast<Register*>(this)[RegisterFile::ReturnValueRegister] = Register::withInt(returnValueRegister); 127 127 setArgumentCount(argc); // original argument count (for the sake of the "arguments" object) 128 128 setCallee(function); … … 141 141 142 142 private: 143 void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = Register::withInt(count); }144 void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; }145 void setCodeBlock(CodeBlock* codeBlock) { this[RegisterFile::CodeBlock] = codeBlock; }143 void setArgumentCount(int count) { static_cast<Register*>(this)[RegisterFile::ArgumentCount] = Register::withInt(count); } 144 void setCallee(JSFunction* callee) { static_cast<Register*>(this)[RegisterFile::Callee] = callee; } 145 void setCodeBlock(CodeBlock* codeBlock) { static_cast<Register*>(this)[RegisterFile::CodeBlock] = codeBlock; } 146 146 147 147 static const intptr_t HostCallFrameFlag = 1;
Note:
See TracChangeset
for help on using the changeset viewer.