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/DFGInPlaceAbstractState.cpp

    r155480 r155564  
    312312            // The block sets the variable, and potentially refines it, both
    313313            // before and after setting it.
    314             if (node->variableAccessData()->shouldUseDoubleFormat()) {
    315                 // FIXME: This unnecessarily loses precision.
    316                 source.setType(SpecDouble);
    317             } else
    318                 source = forNode(node->child1());
     314            source = forNode(node->child1());
     315            if (node->variableAccessData()->flushFormat() == FlushedDouble) {
     316                ASSERT(!(source.m_type & ~SpecNumber));
     317                ASSERT(!!(source.m_type & ~SpecDouble) == !!(source.m_type & SpecInt32));
     318                if (!(source.m_type & ~SpecDouble)) {
     319                    source.merge(SpecInt48AsDouble);
     320                    source.filter(SpecDouble);
     321                }
     322            }
    319323#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
    320324            dataLogF("          Setting to ");
Note: See TracChangeset for help on using the changeset viewer.