Changeset 182444 in webkit


Ignore:
Timestamp:
Apr 6, 2015 3:48:00 PM (9 years ago)
Author:
mark.lam@apple.com
Message:

In the 64-bit DFG and FTL, Array::Double case for HasIndexedProperty should set its result to true when all is well.
<https://webkit.org/b/143396>

Reviewed by Filip Pizlo.

The DFG was neglecting to set the result boolean. The FTL was setting it with
an inverted value. Both of these are now resolved.

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileHasIndexedProperty):

  • tests/stress/for-in-array-mode.js: Added.

(.):
(test):

Location:
trunk/Source/JavaScriptCore
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r182433 r182444  
     12015-04-06  Mark Lam  <mark.lam@apple.com>
     2
     3        In the 64-bit DFG and FTL, Array::Double case for HasIndexedProperty should set its result to true when all is well.
     4        <https://webkit.org/b/143396>
     5
     6        Reviewed by Filip Pizlo.
     7
     8        The DFG was neglecting to set the result boolean.  The FTL was setting it with
     9        an inverted value.  Both of these are now resolved.
     10
     11        * dfg/DFGSpeculativeJIT64.cpp:
     12        (JSC::DFG::SpeculativeJIT::compile):
     13        * ftl/FTLLowerDFGToLLVM.cpp:
     14        (JSC::FTL::LowerDFGToLLVM::compileHasIndexedProperty):
     15        * tests/stress/for-in-array-mode.js: Added.
     16        (.):
     17        (test):
     18
    1192015-04-06  Yusuke Suzuki  <utatane.tea@gmail.com>
    220
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r182433 r182444  
    44914491            m_jit.loadDouble(MacroAssembler::BaseIndex(storageGPR, indexGPR, MacroAssembler::TimesEight), scratchFPR);
    44924492            slowCases.append(m_jit.branchDouble(MacroAssembler::DoubleNotEqualOrUnordered, scratchFPR, scratchFPR));
     4493            moveTrueTo(resultGPR);
    44934494            break;
    44944495        }
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp

    r182433 r182444  
    47094709            LBasicBlock lastNext = m_out.appendTo(checkHole, slowCase);
    47104710            LValue doubleValue = m_out.loadDouble(baseIndex(heap, storage, index, m_node->child2()));
    4711             ValueFromBlock checkHoleResult = m_out.anchor(
    4712                 m_out.doubleNotEqualOrUnordered(doubleValue, doubleValue));
    4713             m_out.branch(checkHoleResult.value(), rarely(slowCase), usually(continuation));
     4711            ValueFromBlock checkHoleResult = m_out.anchor(m_out.doubleEqual(doubleValue, doubleValue));
     4712            m_out.branch(checkHoleResult.value(), usually(continuation), rarely(slowCase));
    47144713           
    47154714            m_out.appendTo(slowCase, continuation);
Note: See TracChangeset for help on using the changeset viewer.