Ignore:
Timestamp:
Sep 21, 2013, 10:40:35 AM (12 years ago)
Author:
[email protected]
Message:

Get rid of IsInlinedCodeTag and its associated methods since it's unused
https://bugs.webkit.org/show_bug.cgi?id=121737

Source/JavaScriptCore:

Reviewed by Sam Weinig.

This was meant to be easy, but I kept wondering if it was safe to remove the
inline call frame check in Arguments::tearOff(). The check was clearly dead
since the bit wasn't being set anywhere.

It turns out that the unwindCallFrame() function was relying on tearOff()
doing the right thing for inlined code, but it wasn't even passing it an
inline call frame. I fixed this by having unwindCallFrame() inlining check,
while also making sure that the code uses the right operand index for the
arguments register.

  • interpreter/CallFrame.h:
  • interpreter/CallFrameInlines.h:
  • interpreter/Interpreter.cpp:

(JSC::unwindCallFrame):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::r):

  • interpreter/StackVisitor.h:
  • runtime/Arguments.cpp:

(JSC::Arguments::tearOff):

LayoutTests:

Reviewed by Sam Weinig.

  • js/dfg-inline-arguments-capture-throw-exception-expected.txt: Added.
  • js/dfg-inline-arguments-capture-throw-exception.html: Added.
  • js/script-tests/dfg-inline-arguments-capture-throw-exception.js: Added.

(foo):
(bar):
(makeF):
(recurse):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/Arguments.cpp

    r156079 r156229  
    327327    }
    328328
    329     if (!callFrame->isInlinedFrame()) {
    330         for (size_t i = 0; i < m_numArguments; ++i)
    331             trySetArgument(callFrame->vm(), i, callFrame->argumentAfterCapture(i));
    332         return;
    333     }
    334 
    335     tearOffForInlineCallFrame(
    336         callFrame->vm(), callFrame->registers(), callFrame->inlineCallFrame());
     329    for (size_t i = 0; i < m_numArguments; ++i)
     330        trySetArgument(callFrame->vm(), i, callFrame->argumentAfterCapture(i));
    337331}
    338332
Note: See TracChangeset for help on using the changeset viewer.