Changeset 39577 in webkit for trunk/JavaScriptCore/bytecode/CodeBlock.h
- Timestamp:
- Jan 3, 2009, 10:19:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/CodeBlock.h
r39366 r39577 152 152 153 153 struct PC { 154 PC( void* nativePC, unsigned bytecodeIndex)155 : nativePC (nativePC)154 PC(ptrdiff_t nativePCOffset, unsigned bytecodeIndex) 155 : nativePCOffset(nativePCOffset) 156 156 , bytecodeIndex(bytecodeIndex) 157 157 { 158 158 } 159 160 void* nativePC;159 160 ptrdiff_t nativePCOffset; 161 161 unsigned bytecodeIndex; 162 162 }; … … 174 174 } 175 175 176 inline void* getNativePC(PC* pc)176 inline ptrdiff_t getNativePCOffset(PC* pc) 177 177 { 178 return pc->nativePC ;178 return pc->nativePCOffset; 179 179 } 180 180 … … 300 300 unsigned getBytecodeIndex(void* nativePC) 301 301 { 302 return binaryChop<PC, void*, getNativePC>(m_pcVector.begin(), m_pcVector.size(), nativePC)->bytecodeIndex; 302 ptrdiff_t nativePCOffset = reinterpret_cast<void**>(nativePC) - reinterpret_cast<void**>(m_jitCode.code); 303 return binaryChop<PC, ptrdiff_t, getNativePCOffset>(m_pcVector.begin(), m_pcVector.size(), nativePCOffset)->bytecodeIndex; 303 304 } 304 305
Note:
See TracChangeset
for help on using the changeset viewer.