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

Changeset 173534 in webkit


Ignore:
Timestamp:
Sep 11, 2014, 1:04:38 PM (12 years ago)
Author:
fpizlo@apple.com
Message:

REGRESSION (r172129): Vine pages load as blank
​https://bugs.webkit.org/show_bug.cgi?id=136655
rdar://problem/18281215

Reviewed by Michael Saboff.

If lastNode is something that is subject to DCE, then removing the Phantom's reference to something
that lastNode references means that the thing being referenced may no longer be kept alive for OSR.
Teach PhantomRemovalPhase that it's only safe to do this if lastNode is a Phantom. That's probably too
conservative, but that's fine since this is mainly just an optimization to make the IR sane to read and
reasonably compact; it's OK if we miss cases here.

  • dfg/DFGPhantomRemovalPhase.cpp:

(JSC::DFG::PhantomRemovalPhase::run):

  • tests/stress/remove-phantom-after-setlocal.js: Added.
Location:
trunk/Source/JavaScriptCore
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r173531 r173534  
     12014-09-11  Filip Pizlo  <fpizlo@apple.com>
     2
     3        REGRESSION (r172129): Vine pages load as blank
     4        https://bugs.webkit.org/show_bug.cgi?id=136655
     5        rdar://problem/18281215
     6
     7        Reviewed by Michael Saboff.
     8       
     9        If lastNode is something that is subject to DCE, then removing the Phantom's reference to something
     10        that lastNode references means that the thing being referenced may no longer be kept alive for OSR.
     11        Teach PhantomRemovalPhase that it's only safe to do this if lastNode is a Phantom. That's probably too
     12        conservative, but that's fine since this is mainly just an optimization to make the IR sane to read and
     13        reasonably compact; it's OK if we miss cases here.
     14
     15        * dfg/DFGPhantomRemovalPhase.cpp:
     16        (JSC::DFG::PhantomRemovalPhase::run):
     17        * tests/stress/remove-phantom-after-setlocal.js: Added.
     18
    1192014-09-11  Bear Travis  <betravis@adobe.com>
    220
  • trunk/Source/JavaScriptCore/dfg/DFGPhantomRemovalPhase.cpp

    r173069 r173534  
    9494            unsigned sourceIndex = 0;
    9595            unsigned targetIndex = 0;
    96             Node* lastNode = nullptr;
    9796            while (sourceIndex < block->size()) {
    9897                Node* node = block->at(sourceIndex++);
    9998                switch (node->op()) {
    10099                case Phantom: {
    101                     if (lastNode && (lastNode->origin.forExit != node->origin.forExit || (lastNode->flags() & NodeHasVarArgs)))
    102                         lastNode = nullptr;
     100                    Node* lastNode = nullptr;
     101                    if (sourceIndex > 1) {
     102                        lastNode = block->at(sourceIndex - 2);
     103                        if (lastNode->op() != Phantom
     104                            || lastNode->origin.forExit != node->origin.forExit)
     105                            lastNode = nullptr;
     106                    }
    103107                    for (unsigned i = 0; i < AdjacencyList::Size; ++i) {
    104108                        Edge edge = node->children.child(i);
    … …  
    162166                    break;
    163167                }
    164                 lastNode = node;
     168               
    165169                block->at(targetIndex++) = node;
    166170            }
Note: See TracChangeset for help on using the changeset viewer.