Changeset 44344 in webkit for trunk/JavaScriptCore/interpreter
- Timestamp:
- Jun 1, 2009, 10:36:18 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/interpreter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/interpreter/CallFrame.h
r44224 r44344 96 96 static const HashTable* stringTable(CallFrame* callFrame) { return callFrame->globalData().stringTable; } 97 97 98 private:99 friend class Arguments;100 friend class JSActivation;101 friend class JSGlobalObject;102 friend class Interpreter;103 friend class JITStubs;104 friend struct CallFrameClosure;105 106 98 static CallFrame* create(Register* callFrameBase) { return static_cast<CallFrame*>(callFrameBase); } 107 99 Register* registers() { return this; } … … 112 104 Arguments* optionalCalleeArguments() const { return this[RegisterFile::OptionalCalleeArguments].arguments(); } 113 105 Instruction* returnPC() const { return this[RegisterFile::ReturnPC].vPC(); } 114 int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); }115 106 116 void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = count; }117 void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; }118 107 void setCalleeArguments(Arguments* arguments) { this[RegisterFile::OptionalCalleeArguments] = arguments; } 119 108 void setCallerFrame(CallFrame* callerFrame) { this[RegisterFile::CallerFrame] = callerFrame; } 120 void setCodeBlock(CodeBlock* codeBlock) { this[RegisterFile::CodeBlock] = codeBlock; }121 109 void setScopeChain(ScopeChainNode* scopeChain) { this[RegisterFile::ScopeChain] = scopeChain; } 122 110 … … 136 124 } 137 125 126 private: 127 friend class Arguments; 128 friend class JSActivation; 129 friend class JSGlobalObject; 130 friend class Interpreter; 131 friend struct CallFrameClosure; 132 133 int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); } 134 135 void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = count; } 136 void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; } 137 void setCodeBlock(CodeBlock* codeBlock) { this[RegisterFile::CodeBlock] = codeBlock; } 138 138 139 static const intptr_t HostCallFrameFlag = 1; 139 140 -
trunk/JavaScriptCore/interpreter/Interpreter.h
r44336 r44344 68 68 class Interpreter : public WTF::FastAllocBase { 69 69 friend class JIT; 70 friend class JITStubs;71 70 friend class CachedCall; 72 71 public: … … 109 108 SamplingTool* sampler() { return m_sampler; } 110 109 110 NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue); 111 NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset, bool); 112 NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine); 113 111 114 private: 112 115 enum ExecutionFlag { Normal, InitializeAndReturn }; … … 116 119 JSValue execute(CallFrameClosure&, JSValue* exception); 117 120 118 NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue);119 121 JSValue execute(EvalNode*, CallFrame*, JSObject* thisObject, int globalRegisterOffset, ScopeChainNode*, JSValue* exception); 120 122 121 NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine);122 123 #if USE(INTERPRETER) 123 124 NEVER_INLINE bool resolve(CallFrame*, Instruction*, JSValue& exceptionValue); … … 136 137 137 138 NEVER_INLINE bool unwindCallFrame(CallFrame*&, JSValue, unsigned& bytecodeOffset, CodeBlock*&); 138 NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset, bool);139 139 140 140 static ALWAYS_INLINE CallFrame* slideRegisterWindowForCall(CodeBlock*, RegisterFile*, CallFrame*, size_t registerOffset, int argc); -
trunk/JavaScriptCore/interpreter/Register.h
r43153 r44344 31 31 32 32 #include "JSValue.h" 33 #include <wtf/Assertions.h> 33 34 #include <wtf/VectorTraits.h> 34 35 … … 51 52 Register(); 52 53 Register(JSValue); 54 Register(Arguments*); 53 55 54 56 JSValue jsValue() const; … … 57 59 void mark(); 58 60 61 int32_t i() const; 62 void* v() const; 63 59 64 private: 60 65 friend class ExecState; 61 66 friend class Interpreter; 62 friend class JITStubs;63 67 64 68 // Only CallFrame, Interpreter, and JITStubs should use these functions. … … 67 71 68 72 Register(JSActivation*); 69 Register(Arguments*);70 73 Register(CallFrame*); 71 74 Register(CodeBlock*); … … 74 77 Register(ScopeChainNode*); 75 78 Register(Instruction*); 76 77 intptr_t i() const;78 void* v() const;79 79 80 80 JSActivation* activation() const; … … 174 174 ALWAYS_INLINE Register::Register(intptr_t i) 175 175 { 176 // See comment on 'i()' below. 177 ASSERT(i == static_cast<int32_t>(i)); 176 178 u.i = i; 177 179 } 178 180 179 ALWAYS_INLINE intptr_t Register::i() const 180 { 181 return u.i; 181 // Read 'i' as a 32-bit integer; we only use it to hold 32-bit values, 182 // and we only write 32-bits when writing the arg count from JIT code. 183 ALWAYS_INLINE int32_t Register::i() const 184 { 185 return static_cast<int32_t>(u.i); 182 186 } 183 187
Note:
See TracChangeset
for help on using the changeset viewer.