Changeset 129943 in webkit for trunk/Source/JavaScriptCore/dfg


Ignore:
Timestamp:
Sep 28, 2012, 1:38:40 PM (13 years ago)
Author:
[email protected]
Message:

DFGStructureHoistingPhase SetLocal assumes StructureTransitionWatchpoint has a structure set
https://bugs.webkit.org/show_bug.cgi?id=97810

Reviewed by Mark Hahnenberg.

No tests because this can't happen in ToT: the structure check hoisting phase runs before any
CFA or folding, so the only StructureTransitionWatchpoints it will see are the ones inserted
by the parser. But the parser will only insert StructureTransitinWatchpoints on constants, which
will not be subject to SetLocals.

Still, it would be good to fix this in case things changed.

  • dfg/DFGStructureCheckHoistingPhase.cpp:

(JSC::DFG::StructureCheckHoistingPhase::run):

File:
1 edited

Legend:

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

    r129588 r129943  
    123123                            continue;
    124124                        switch (subNode.op()) {
    125                         case CheckStructure:
     125                        case CheckStructure: {
     126                            if (subNode.child1().index() != source)
     127                                break;
     128                           
     129                            noticeStructureCheck(variable, subNode.structureSet());
     130                            break;
     131                        }
    126132                        case StructureTransitionWatchpoint: {
    127133                            if (subNode.child1().index() != source)
    128134                                break;
    129135                           
    130                             noticeStructureCheck(variable, subNode.structureSet());
     136                            noticeStructureCheck(variable, subNode.structure());
    131137                            break;
    132138                        }
Note: See TracChangeset for help on using the changeset viewer.