Ignore:
Timestamp:
Feb 15, 2012, 5:29:12 PM (14 years ago)
Author:
[email protected]
Message:

Ensure that the DFG JIT always plants a CodeOrigin when making calls
https://bugs.webkit.org/show_bug.cgi?id=78763

Reviewed by Gavin Barraclough.

Make all calls plant a CodeOrigin prior to the actual
call. Also clobbers the Interpreter with logic to ensure
that the interpreter always plants a bytecode offset.

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGJITCompiler.h:

(CallBeginToken):
(JSC::DFG::JITCompiler::beginJSCall):
(JSC::DFG::JITCompiler::beginCall):

  • dfg/DFGRepatch.cpp:

(JSC::DFG::tryBuildGetByIDList):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • interpreter/AbstractPC.cpp:

(JSC::AbstractPC::AbstractPC):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::trueCallFrame):

  • interpreter/CallFrame.h:

(JSC::ExecState::bytecodeOffsetForNonDFGCode):
(ExecState):
(JSC::ExecState::setBytecodeOffsetForNonDFGCode):
(JSC::ExecState::codeOriginIndexForDFG):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/CallFrame.cpp

    r107499 r107860  
    9797        ReturnAddressPtr currentReturnPC = pc.jitReturnAddress();
    9898       
    99         if (!machineCodeBlock->codeOriginForReturn(currentReturnPC, codeOrigin))
    100             return this; // Not currently in inlined code.
     99        bool hasCodeOrigin = machineCodeBlock->codeOriginForReturn(currentReturnPC, codeOrigin);
     100        ASSERT_UNUSED(hasCodeOrigin, hasCodeOrigin);
    101101    } else {
    102         unsigned index = codeOriginIndexForDFGWithInlining();
    103         if (index == UINT_MAX)
    104             return this; // Not currently in inlined code.
    105        
     102        unsigned index = codeOriginIndexForDFG();
    106103        codeOrigin = machineCodeBlock->codeOrigin(index);
    107104    }
     105
     106    if (!codeOrigin.inlineCallFrame)
     107        return this; // Not currently in inlined code.
    108108   
    109109    for (InlineCallFrame* inlineCallFrame = codeOrigin.inlineCallFrame; inlineCallFrame;) {
Note: See TracChangeset for help on using the changeset viewer.