Ignore:
Timestamp:
Oct 25, 2012, 6:57:07 PM (13 years ago)
Author:
[email protected]
Message:

DFG Arrayify elimination should replace it with GetButterfly rather than Phantom
https://bugs.webkit.org/show_bug.cgi?id=100441

Reviewed by Oliver Hunt and Gavin Barraclough.

Source/JavaScriptCore:

Made array profiler's to-string helper behave correctly.

Made Arrayify elimination do the right thing (convert to GetButterfly).

Made CFA's interference analysis track clobbered array modes correctly, mostly by
simplifying the machinery.

  • bytecode/ArrayProfile.cpp:

(JSC::arrayModesToString):

  • dfg/DFGAbstractState.cpp:

(JSC::DFG::AbstractState::execute):

  • dfg/DFGAbstractValue.h:

(JSC::DFG::AbstractValue::clobberArrayModes):
(AbstractValue):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

LayoutTests:

  • fast/js/dfg-arrayify-elimination-expected.txt: Added.
  • fast/js/dfg-arrayify-elimination.html: Added.
  • fast/js/jsc-test-list:
  • fast/js/script-tests/dfg-arrayify-elimination.js: Added.

(foo):

File:
1 edited

Legend:

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

    r131982 r132554  
    103103            }
    104104               
    105             case CheckArray:
    106             case Arrayify: {
     105            case CheckArray: {
    107106                if (!modeAlreadyChecked(m_state.forNode(node.child1()), node.arrayMode()))
    108107                    break;
     
    113112            }
    114113               
     114            case Arrayify: {
     115                if (!modeAlreadyChecked(m_state.forNode(node.child1()), node.arrayMode()))
     116                    break;
     117                ASSERT(node.refCount() >= 1);
     118                node.setOpAndDefaultFlags(GetButterfly);
     119                m_graph.deref(nodeIndex);
     120                eliminated = true;
     121                break;
     122            }
     123
    115124            default:
    116125                break;
Note: See TracChangeset for help on using the changeset viewer.