Ignore:
Timestamp:
Sep 11, 2013, 2:24:34 PM (12 years ago)
Author:
[email protected]
Message:

VariableAccessData::flushFormat() should be the universal way of deciding how to speculate on stores to locals and how locals are formatted
https://bugs.webkit.org/show_bug.cgi?id=121142

Reviewed by Geoffrey Garen.

Make everyone rely on VariableAccessData::flushFormat() instead of trying to
compute that information from scratch. The FTL already used flushFormat(), now
the DFG does, too.

  • dfg/DFGArgumentPosition.h:

(JSC::DFG::ArgumentPosition::someVariable):
(JSC::DFG::ArgumentPosition::flushFormat):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::performNodeCSE):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupSetLocalsInBlock):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::mergeStateAtTail):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::noticeOSREntry):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInlineStart):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGValueSource.h:

(JSC::DFG::ValueSource::forFlushFormat):

  • dfg/DFGVariableAccessDataDump.cpp:

(JSC::DFG::VariableAccessDataDump::dump):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileSetLocal):

File:
1 edited

Legend:

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

    r153121 r155564  
    3232
    3333#include "DFGCommon.h"
     34#include "DFGFlushFormat.h"
    3435#include "DFGMinifiedID.h"
    3536#include "DataFormat.h"
     
    128129    }
    129130   
    130     static ValueSource forSpeculation(SpeculatedType prediction)
    131     {
    132         if (isInt32Speculation(prediction))
     131    static ValueSource forFlushFormat(FlushFormat format)
     132    {
     133        switch (format) {
     134        case DeadFlush:
     135            return ValueSource(SourceIsDead);
     136        case FlushedJSValue:
     137            return ValueSource(ValueInJSStack);
     138        case FlushedDouble:
     139            return ValueSource(DoubleInJSStack);
     140        case FlushedInt32:
    133141            return ValueSource(Int32InJSStack);
    134         if (isCellSpeculation(prediction))
     142        case FlushedCell:
    135143            return ValueSource(CellInJSStack);
    136         if (isBooleanSpeculation(prediction))
     144        case FlushedBoolean:
    137145            return ValueSource(BooleanInJSStack);
    138         return ValueSource(ValueInJSStack);
     146        }
     147        RELEASE_ASSERT_NOT_REACHED();
     148        return ValueSource();
    139149    }
    140150   
Note: See TracChangeset for help on using the changeset viewer.