Changeset 37191 in webkit for trunk/JavaScriptCore/VM
- Timestamp:
- Oct 2, 2008, 9:22:58 AM (17 years ago)
- Location:
- trunk/JavaScriptCore/VM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/Machine.cpp
r37184 r37191 105 105 106 106 #endif // #ENABLE(CTI) 107 108 static const intptr_t HostCallFrameMask = 1;109 110 static inline Register* makeHostCallFramePointer(Register* callFrame)111 {112 return reinterpret_cast<Register*>(reinterpret_cast<intptr_t>(callFrame) | HostCallFrameMask);113 }114 115 static inline bool isHostCallFrame(Register* callFrame)116 {117 return reinterpret_cast<intptr_t>(callFrame) & HostCallFrameMask;118 }119 120 static inline Register* stripHostCallFrameBit(Register* callFrame)121 {122 return reinterpret_cast<Register*>(reinterpret_cast<intptr_t>(callFrame) & ~HostCallFrameMask);123 }124 107 125 108 // Returns the depth of the scope chain within a given call frame. -
trunk/JavaScriptCore/VM/Machine.h
r37184 r37191 315 315 ALWAYS_INLINE void Machine::initializeCallFrame(Register* callFrame, CodeBlock* codeBlock, Instruction* vPC, ScopeChainNode* scopeChain, Register* r, int returnValueRegister, int argc, JSValue* function) 316 316 { 317 ASSERT(r); // use makeHostCallFramePointer(0) to create a host call frame sentinel. 317 318 callFrame[RegisterFile::CodeBlock] = codeBlock; 318 319 callFrame[RegisterFile::ScopeChain] = scopeChain; … … 326 327 } 327 328 329 static const intptr_t HostCallFrameMask = 1; 330 331 static inline Register* makeHostCallFramePointer(Register* callFrame) 332 { 333 return reinterpret_cast<Register*>(reinterpret_cast<intptr_t>(callFrame) | HostCallFrameMask); 334 } 335 336 static inline bool isHostCallFrame(Register* callFrame) 337 { 338 return reinterpret_cast<intptr_t>(callFrame) & HostCallFrameMask; 339 } 340 341 static inline Register* stripHostCallFrameBit(Register* callFrame) 342 { 343 return reinterpret_cast<Register*>(reinterpret_cast<intptr_t>(callFrame) & ~HostCallFrameMask); 344 } 345 328 346 } // namespace JSC 329 347
Note:
See TracChangeset
for help on using the changeset viewer.