Changeset 145828 in webkit


Ignore:
Timestamp:
Mar 14, 2013 10:40:16 AM (11 years ago)
Author:
fpizlo@apple.com
Message:

DFG bytecode parser is too aggressive about getting rid of GetLocals on captured variables
https://bugs.webkit.org/show_bug.cgi?id=112287
<rdar://problem/13342340>

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finalizeUnconditionally):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::getLocal):

LayoutTests:

  • fast/js/dfg-captured-var-get-local-expected.txt: Added.
  • fast/js/dfg-captured-var-get-local.html: Added.
  • fast/js/jsc-test-list:
  • fast/js/script-tests/dfg-captured-var-get-local.js: Added.

(foo):

Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r145823 r145828  
     12013-03-13  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG bytecode parser is too aggressive about getting rid of GetLocals on captured variables
     4        https://bugs.webkit.org/show_bug.cgi?id=112287
     5        <rdar://problem/13342340>
     6
     7        Reviewed by Oliver Hunt.
     8
     9        * fast/js/dfg-captured-var-get-local-expected.txt: Added.
     10        * fast/js/dfg-captured-var-get-local.html: Added.
     11        * fast/js/jsc-test-list:
     12        * fast/js/script-tests/dfg-captured-var-get-local.js: Added.
     13        (foo):
     14
    1152013-03-14  Andrey Kosyakov  <caseq@chromium.org>
    216
  • trunk/LayoutTests/fast/js/jsc-test-list

    r145628 r145828  
    9797fast/js/dfg-branch-logical-not-peephole-around-osr-exit
    9898fast/js/dfg-branch-not-fail
     99fast/js/dfg-captured-var-get-local
    99100fast/js/dfg-cfa-merge-with-dead-use-at-tail
    100101fast/js/dfg-cfg-simplify-eliminate-set-local-type-check-then-branch-not-null
  • trunk/Source/JavaScriptCore/ChangeLog

    r145768 r145828  
     12013-03-13  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG bytecode parser is too aggressive about getting rid of GetLocals on captured variables
     4        https://bugs.webkit.org/show_bug.cgi?id=112287
     5        <rdar://problem/13342340>
     6
     7        Reviewed by Oliver Hunt.
     8
     9        * bytecode/CodeBlock.cpp:
     10        (JSC::CodeBlock::dumpBytecode):
     11        (JSC::CodeBlock::finalizeUnconditionally):
     12        * dfg/DFGByteCodeParser.cpp:
     13        (JSC::DFG::ByteCodeParser::getLocal):
     14
    1152013-03-13  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r145000 r145828  
    540540        static_cast<unsigned long>(instructions().size() * sizeof(Instruction)),
    541541        m_numParameters, m_numCalleeRegisters, m_numVars);
    542     if (symbolTable() && symbolTable()->captureCount())
    543         out.printf("; %d captured var(s)", symbolTable()->captureCount());
     542    if (symbolTable() && symbolTable()->captureCount()) {
     543        out.printf(
     544            "; %d captured var(s) (from r%d to r%d, inclusive)",
     545            symbolTable()->captureCount(), symbolTable()->captureStart(), symbolTable()->captureEnd() - 1);
     546    }
    544547    if (usesArguments()) {
    545548        out.printf(
     
    23322335       
    23332336        if (DFG::shouldShowDisassembly()) {
    2334             dataLog(*this, "will be jettisoned because of the following dead references:\n");
     2337            dataLog(*this, " will be jettisoned because of the following dead references:\n");
    23352338            for (unsigned i = 0; i < m_dfgData->transitions.size(); ++i) {
    23362339                WeakReferenceTransition& transition = m_dfgData->transitions[i];
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r145000 r145828  
    298298            variable->mergeIsCaptured(isCaptured);
    299299           
    300             switch (node->op()) {
    301             case GetLocal:
    302                 return node;
    303             case SetLocal:
    304                 return node->child1().node();
    305             default:
    306                 break;
     300            if (!isCaptured) {
     301                switch (node->op()) {
     302                case GetLocal:
     303                    return node;
     304                case SetLocal:
     305                    return node->child1().node();
     306                default:
     307                    break;
     308                }
    307309            }
    308310        } else {
Note: See TracChangeset for help on using the changeset viewer.