Changeset 44743 in webkit for trunk/JavaScriptCore/jit/JIT.h


Ignore:
Timestamp:
Jun 16, 2009, 3:20:35 PM (16 years ago)
Author:
[email protected]
Message:

2009-06-16 Sam Weinig <[email protected]>

Reviewed by Oliver Hunt.

Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
it for each type of stub using the return address to find the correct
offset.

  • jit/JIT.cpp: (JSC::JIT::JIT):
  • jit/JIT.h: (JSC::JIT::compileGetByIdProto): (JSC::JIT::compileGetByIdSelfList): (JSC::JIT::compileGetByIdProtoList): (JSC::JIT::compileGetByIdChainList): (JSC::JIT::compileGetByIdChain): (JSC::JIT::compilePutByIdTransition): (JSC::JIT::compileCTIMachineTrampolines): (JSC::JIT::compilePatchGetArrayLength):
  • jit/JITStubCall.h: (JSC::JITStubCall::call):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JIT.h

    r44705 r44743  
    338338        {
    339339            JIT jit(globalData, codeBlock);
     340#if ENABLE(OPCODE_SAMPLING)
     341            jit->m_bytecodeIndex = jit->m_codeBlock->getCallReturnOffset(returnAddress.value());
     342#endif
    340343            jit.privateCompileGetByIdProto(stubInfo, structure, prototypeStructure, cachedOffset, returnAddress, callFrame);
    341344        }
     
    344347        {
    345348            JIT jit(globalData, codeBlock);
     349#if ENABLE(OPCODE_SAMPLING)
     350            jit->m_bytecodeIndex = jit->m_codeBlock->getCallReturnOffset(returnAddress.value());
     351#endif
    346352            jit.privateCompileGetByIdSelfList(stubInfo, polymorphicStructures, currentIndex, structure, cachedOffset);
    347353        }
     
    349355        {
    350356            JIT jit(globalData, codeBlock);
     357#if ENABLE(OPCODE_SAMPLING)
     358            jit->m_bytecodeIndex = jit->m_codeBlock->getCallReturnOffset(returnAddress.value());
     359#endif
    351360            jit.privateCompileGetByIdProtoList(stubInfo, prototypeStructureList, currentIndex, structure, prototypeStructure, cachedOffset, callFrame);
    352361        }
     
    354363        {
    355364            JIT jit(globalData, codeBlock);
     365#if ENABLE(OPCODE_SAMPLING)
     366            jit->m_bytecodeIndex = jit->m_codeBlock->getCallReturnOffset(returnAddress.value());
     367#endif
    356368            jit.privateCompileGetByIdChainList(stubInfo, prototypeStructureList, currentIndex, structure, chain, count, cachedOffset, callFrame);
    357369        }
     
    360372        {
    361373            JIT jit(globalData, codeBlock);
     374#if ENABLE(OPCODE_SAMPLING)
     375            jit->m_bytecodeIndex = jit->m_codeBlock->getCallReturnOffset(returnAddress.value());
     376#endif
    362377            jit.privateCompileGetByIdChain(stubInfo, structure, chain, count, cachedOffset, returnAddress, callFrame);
    363378        }
     
    366381        {
    367382            JIT jit(globalData, codeBlock);
     383#if ENABLE(OPCODE_SAMPLING)
     384            jit->m_bytecodeIndex = jit->m_codeBlock->getCallReturnOffset(returnAddress.value());
     385#endif
    368386            jit.privateCompilePutByIdTransition(stubInfo, oldStructure, newStructure, cachedOffset, chain, returnAddress);
    369387        }
     
    372390        {
    373391            JIT jit(globalData);
     392#if ENABLE(OPCODE_SAMPLING)
     393            jit->m_bytecodeIndex = jit->m_codeBlock->getCallReturnOffset(returnAddress.value());
     394#endif
    374395            jit.privateCompileCTIMachineTrampolines(executablePool, globalData, ctiArrayLengthTrampoline, ctiStringLengthTrampoline, ctiVirtualCallPreLink, ctiVirtualCallLink, ctiVirtualCall, ctiNativeCallThunk);
    375396        }
     
    382403        {
    383404            JIT jit(globalData, codeBlock);
     405#if ENABLE(OPCODE_SAMPLING)
     406            jit->m_bytecodeIndex = jit->m_codeBlock->getCallReturnOffset(returnAddress.value());
     407#endif
    384408            return jit.privateCompilePatchGetArrayLength(returnAddress);
    385409        }
Note: See TracChangeset for help on using the changeset viewer.