Ignore:
Timestamp:
Mar 27, 2012, 2:54:40 PM (13 years ago)
Author:
[email protected]
Message:

DFG OSR exit should not generate an exit for variables of inlinees if the
inlinees are not in scope
https://bugs.webkit.org/show_bug.cgi?id=82312

Reviewed by Oliver Hunt.

  • bytecode/CodeBlock.h:

(JSC::baselineCodeBlockForInlineCallFrame):
(JSC):
(JSC::baselineCodeBlockForOriginAndBaselineCodeBlock):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::computeNumVariablesForCodeOrigin):
(DFG):
(JSC::DFG::OSRExit::OSRExit):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOSRExit.cpp

    r108677 r112320  
    3434namespace JSC { namespace DFG {
    3535
     36static unsigned computeNumVariablesForCodeOrigin(
     37    CodeBlock* codeBlock, const CodeOrigin& codeOrigin)
     38{
     39    if (!codeOrigin.inlineCallFrame)
     40        return codeBlock->m_numCalleeRegisters;
     41    return
     42        codeOrigin.inlineCallFrame->stackOffset +
     43        baselineCodeBlockForInlineCallFrame(codeOrigin.inlineCallFrame)->m_numCalleeRegisters;
     44}
     45
    3646OSRExit::OSRExit(ExitKind kind, JSValueSource jsValueSource, MethodOfGettingAValueProfile valueProfile, MacroAssembler::Jump check, SpeculativeJIT* jit, unsigned recoveryIndex)
    3747    : m_jsValueSource(jsValueSource)
     
    4454    , m_count(0)
    4555    , m_arguments(jit->m_arguments.size())
    46     , m_variables(jit->m_variables.size())
     56    , m_variables(computeNumVariablesForCodeOrigin(jit->m_jit.graph().m_profiledBlock, jit->m_codeOriginForOSR))
    4757    , m_lastSetOperand(jit->m_lastSetOperand)
    4858{
Note: See TracChangeset for help on using the changeset viewer.