Ignore:
Timestamp:
Sep 13, 2013, 4:18:19 PM (12 years ago)
Author:
[email protected]
Message:

DFG AI assumes that ToThis can never return non-object if it is passed an object, and operationToThis will get the wrong value of isStrictMode() if there's inlining
https://bugs.webkit.org/show_bug.cgi?id=121330

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg and Oliver Hunt.

Also print whether a function is strict mode in debug dumps.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpAssumingJITType):

  • bytecode/CodeOrigin.cpp:

(JSC::InlineCallFrame::dumpInContext):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::::executeEffects):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

Tools:

Reviewed by Mark Hahnenberg and Oliver Hunt.

We should run tests even if they don't have expected files yet.

  • Scripts/run-layout-jsc:

LayoutTests:

Reviewed by Mark Hahnenberg and Oliver Hunt.

  • js/dfg-strict-mode-to-this-expected.txt: Added.
  • js/dfg-strict-mode-to-this.html: Added.
  • js/jsc-test-list:
  • js/script-tests/dfg-strict-mode-to-this.js: Added.

(thingy.bar):
(thingy.foo):
(thingy):

File:
1 edited

Legend:

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

    r155711 r155730  
    35163516            TrustedImm32(FinalObjectType)));
    35173517        m_jit.move(thisValueGPR, tempGPR);
     3518        J_DFGOperation_EJ function;
     3519        if (m_jit.graph().executableFor(node->codeOrigin)->isStrictMode())
     3520            function = operationToThisStrict;
     3521        else
     3522            function = operationToThis;
    35183523        addSlowPathGenerator(
    3519             slowPathCall(slowCases, this, operationToThis, tempGPR, thisValueGPR));
     3524            slowPathCall(slowCases, this, function, tempGPR, thisValueGPR));
    35203525
    35213526        jsValueResult(tempGPR, node);
Note: See TracChangeset for help on using the changeset viewer.