Changeset 258952 in webkit


Ignore:
Timestamp:
Mar 24, 2020 3:53:03 PM (4 years ago)
Author:
keith_miller@apple.com
Message:

Fix isEmpty AssemblyHelpers function and add isNotEmpty
https://bugs.webkit.org/show_bug.cgi?id=209507

Reviewed by Saam Barati.

This fixes the 32 version of my HasIndexedProperty patch as well
as properly names the functions for what they do.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::isEmpty):
(JSC::AssemblyHelpers::isNotEmpty):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r258901 r258952  
     12020-03-24  Keith Miller  <keith_miller@apple.com>
     2
     3        Fix isEmpty AssemblyHelpers function and add isNotEmpty
     4        https://bugs.webkit.org/show_bug.cgi?id=209507
     5
     6        Reviewed by Saam Barati.
     7
     8        This fixes the 32 version of my HasIndexedProperty patch as well
     9        as properly names the functions for what they do.
     10
     11        * dfg/DFGSpeculativeJIT.cpp:
     12        (JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):
     13        * jit/AssemblyHelpers.h:
     14        (JSC::AssemblyHelpers::isEmpty):
     15        (JSC::AssemblyHelpers::isNotEmpty):
     16
    1172020-03-23  Keith Miller  <keith_miller@apple.com>
    218
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r258901 r258952  
    1359413594
    1359513595        if (mode.isSaneChain()) {
    13596             m_jit.isEmpty(scratchGPR, resultGPR);
     13596            m_jit.isNotEmpty(scratchGPR, resultGPR);
    1359713597            break;
    1359813598        }
     
    1365613656
    1365713657        if (mode.isSaneChain()) {
    13658             m_jit.isEmpty(scratchGPR, resultGPR);
     13658            m_jit.isNotEmpty(scratchGPR, resultGPR);
    1365913659            break;
    1366013660        }
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r258901 r258952  
    965965    {
    966966#if USE(JSVALUE64)
    967         test64(NonZero, gpr, TrustedImm32(-1), dst);
     967        test64(Zero, gpr, gpr, dst);
    968968#else
    969969        compare32(Equal, gpr, TrustedImm32(JSValue::EmptyValueTag), dst);
     970#endif
     971    }
     972
     973    void isNotEmpty(GPRReg gpr, GPRReg dst)
     974    {
     975#if USE(JSVALUE64)
     976        test64(NonZero, gpr, gpr, dst);
     977#else
     978        compare32(NotEqual, gpr, TrustedImm32(JSValue::EmptyValueTag), dst);
    970979#endif
    971980    }
Note: See TracChangeset for help on using the changeset viewer.