⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 119464 in webkit


Ignore:
Timestamp:
Jun 4, 2012, 11:40:48 PM (14 years ago)
Author:
fpizlo@apple.com
Message:

DFG CFG simplification should correct the variables at the head of the predecessor block
https://bugs.webkit.org/show_bug.cgi?id=88284

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • dfg/DFGCFGSimplificationPhase.cpp:

(JSC::DFG::CFGSimplificationPhase::mergeBlocks):

LayoutTests:

  • fast/js/dfg-constant-fold-first-local-read-after-block-merge-expected.txt: Added.
  • fast/js/dfg-constant-fold-first-local-read-after-block-merge.html: Added.
  • fast/js/script-tests/dfg-constant-fold-first-local-read-after-block-merge.js: Added.

(foo):
(bar):

Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r119462 r119464  
     12012-06-04  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG CFG simplification should correct the variables at the head of the predecessor block
     4        https://bugs.webkit.org/show_bug.cgi?id=88284
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * fast/js/dfg-constant-fold-first-local-read-after-block-merge-expected.txt: Added.
     9        * fast/js/dfg-constant-fold-first-local-read-after-block-merge.html: Added.
     10        * fast/js/script-tests/dfg-constant-fold-first-local-read-after-block-merge.js: Added.
     11        (foo):
     12        (bar):
     13
    1142012-06-04  Emil A Eklund  <eae@chromium.org>
    215
  • trunk/Source/JavaScriptCore/ChangeLog

    r119453 r119464  
     12012-06-04  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG CFG simplification should correct the variables at the head of the predecessor block
     4        https://bugs.webkit.org/show_bug.cgi?id=88284
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * dfg/DFGCFGSimplificationPhase.cpp:
     9        (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
     10
    1112012-06-04  Geoffrey Garen  <ggaren@apple.com>
    212
  • trunk/Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp

    r118323 r119464  
    633633                NodeIndex atFirstIndex = firstBlock->variablesAtTail.operand(node.local());
    634634                m_graph.changeEdge(node.children.child1(), Edge(skipGetLocal(atFirstIndex)), node.shouldGenerate());
     635               
     636                if (node.op() != GetLocal)
     637                    break;
     638               
     639                NodeIndex atFirstHeadIndex = firstBlock->variablesAtHead.operand(node.local());
     640                if (atFirstHeadIndex == NoNode)
     641                    break;
     642               
     643                if (m_graph[atFirstHeadIndex].op() != Phi)
     644                    break;
     645               
     646                firstBlock->variablesAtHead.operand(node.local()) = nodeIndex;
    635647                break;
    636648            }
Note: See TracChangeset for help on using the changeset viewer.