Ignore:
Timestamp:
Jan 25, 2012, 10:27:43 AM (14 years ago)
Author:
[email protected]
Message:

Inlining breaks call frame walking when the walking is done from outside the inlinee,
but inside a code block that had inlining
https://bugs.webkit.org/show_bug.cgi?id=76978
<rdar://problem/10720904>

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::codeOriginForReturn):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::trueCallerFrame):

LayoutTests:

  • fast/js/dfg-inline-arguments-use-from-uninlined-code-expected.txt: Added.
  • fast/js/dfg-inline-arguments-use-from-uninlined-code.html: Added.
  • fast/js/script-tests/dfg-inline-arguments-use-from-uninlined-code.js: Added.

(foo):
(fuzz):
(bar):
(baz):

File:
1 edited

Legend:

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

    r99148 r105894  
    9292    // caller, and rematerialize it. Do so for the entire inline stack.
    9393   
    94     CodeOrigin codeOrigin = machineCaller->codeBlock()->codeOriginForReturn(returnPC());
     94    ReturnAddressPtr currentReturnPC = returnPC();
     95    CodeBlock* machineCodeBlock = machineCaller->codeBlock();
     96   
     97    CodeOrigin codeOrigin;
     98    if (!machineCodeBlock->codeOriginForReturn(currentReturnPC, codeOrigin))
     99        return machineCaller; // Not currently in inlined code, so machineCaller == trueCaller
    95100   
    96101    for (InlineCallFrame* inlineCallFrame = codeOrigin.inlineCallFrame; inlineCallFrame;) {
Note: See TracChangeset for help on using the changeset viewer.