Changeset 44344 in webkit for trunk/JavaScriptCore/interpreter/Register.h
- Timestamp:
- Jun 1, 2009, 10:36:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.