Ignore:
Timestamp:
Jul 18, 2012, 5:30:34 PM (13 years ago)
Author:
[email protected]
Message:

DFG should emit inline code for property storage (re)allocation
https://bugs.webkit.org/show_bug.cgi?id=91597

Reviewed by Oliver Hunt.

This adds two new ops to the DFG IR: AllocatePropertyStorage and
ReallocatePropertyStorage. It enables these to interact properly with
CSE so that a GetPropertyStorage on something for which we have
obviously done a (Re)AllocatePropertyStorage will result in the
GetPropertyStorage being eliminated. Other than that, the code
emitted for these ops is identical to the code we were emitting in
the corresponding PutById stub.

  • dfg/DFGAbstractState.cpp:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::putStructureStoreElimination):
(JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasStructureTransitionData):

  • dfg/DFGNodeType.h:

(DFG):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(DFG):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):
(SpeculativeJIT):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • runtime/Structure.cpp:

(JSC::nextOutOfLineStorageCapacity):

  • runtime/Structure.h:

(JSC):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGNode.h

    r121717 r123052  
    633633    bool hasStructureTransitionData()
    634634    {
    635         return op() == PutStructure || op() == PhantomPutStructure;
     635        switch (op()) {
     636        case PutStructure:
     637        case PhantomPutStructure:
     638        case AllocatePropertyStorage:
     639        case ReallocatePropertyStorage:
     640            return true;
     641        default:
     642            return false;
     643        }
    636644    }
    637645   
Note: See TracChangeset for help on using the changeset viewer.