Ignore:
Timestamp:
Aug 12, 2011, 4:27:45 PM (14 years ago)
Author:
[email protected]
Message:

DFG JIT has inconsistent use of boxDouble and unboxDouble,
inconsistent use of assertions regarding doubles, and those
assertions are not turned on in debug builds
https://bugs.webkit.org/show_bug.cgi?id=66160

Reviewed by Gavin Barraclough.

JIT assertions are now turned on in debug builds. JIT
assertions are now used for boxing and unboxing doubles, and boxing
and unboxing no longer involves code duplication.

  • dfg/DFGJITCodeGenerator.cpp:

(JSC::DFG::JITCodeGenerator::fillDouble):

  • dfg/DFGJITCodeGenerator.h:

(JSC::DFG::JITCodeGenerator::boxDouble):
(JSC::DFG::JITCodeGenerator::unboxDouble):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::fillNumericToDouble):
(JSC::DFG::GeneralizedRegister::moveTo):
(JSC::DFG::GeneralizedRegister::swapWith):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::boxDouble):
(JSC::DFG::JITCompiler::unboxDouble):

  • dfg/DFGNode.h:
  • dfg/DFGNonSpeculativeJIT.cpp:

(JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
(JSC::DFG::NonSpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::convertToDouble):

File:
1 edited

Legend:

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

    r92986 r93010  
    242242        // First, if we get here we have a double encoded as a JSValue
    243243        m_jit.move(jsValueGpr, tempGpr);
    244         m_jit.addPtr(GPRInfo::tagTypeNumberRegister, tempGpr);
    245         m_jit.movePtrToDouble(tempGpr, fpr);
     244        unboxDouble(tempGpr, fpr);
    246245        JITCompiler::Jump hasUnboxedDouble = m_jit.jump();
    247246
     
    394393   
    395394    m_jit.move(value, tmp);
    396     m_jit.addPtr(GPRInfo::tagTypeNumberRegister, tmp);
    397     m_jit.movePtrToDouble(tmp, result);
     395    unboxDouble(tmp, result);
    398396   
    399397    JITCompiler::Jump done = m_jit.jump();
Note: See TracChangeset for help on using the changeset viewer.