Ignore:
Timestamp:
Aug 1, 2016, 3:20:49 PM (9 years ago)
Author:
[email protected]
Message:

Rationalize varargs stack overflow checks
https://bugs.webkit.org/show_bug.cgi?id=160425

Reviewed by Michael Saboff.

  • ftl/FTLLink.cpp:

(JSC::FTL::link): AboveOrEqual 0 is a tautology. The code meant GreaterThanOrEqual, since the error code is -1.

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::arityCheckFor): Use roundUpToMultipleOf(), which is almost certainly what we meant when we said %.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ftl/FTLLink.cpp

    r203006 r203990  
    141141        CCallHelpers::Call callArityCheck = jit.call();
    142142
    143         auto noException = jit.branch32(CCallHelpers::AboveOrEqual, GPRInfo::returnValueGPR, CCallHelpers::TrustedImm32(0));
     143        auto noException = jit.branch32(CCallHelpers::GreaterThanOrEqual, GPRInfo::returnValueGPR, CCallHelpers::TrustedImm32(0));
    144144        jit.copyCalleeSavesToVMEntryFrameCalleeSavesBuffer();
    145145        jit.move(CCallHelpers::TrustedImmPtr(jit.vm()), GPRInfo::argumentGPR0);
     
    149149        noException.link(&jit);
    150150
    151 #if !ASSERT_DISABLED
    152         jit.load64(vm.addressOfException(), GPRInfo::regT1);
    153         jit.jitAssertIsNull(GPRInfo::regT1);
    154 #endif
     151        if (!ASSERT_DISABLED) {
     152            jit.load64(vm.addressOfException(), GPRInfo::regT1);
     153            jit.jitAssertIsNull(GPRInfo::regT1);
     154        }
    155155
    156156        jit.move(GPRInfo::returnValueGPR, GPRInfo::argumentGPR0);
Note: See TracChangeset for help on using the changeset viewer.