Changeset 203130 in webkit


Ignore:
Timestamp:
Jul 12, 2016, 3:06:20 PM (9 years ago)
Author:
mark.lam@apple.com
Message:

More stack limit and reserved zone renaming.
https://bugs.webkit.org/show_bug.cgi?id=159690

Rubber-stamped by Geoffrey Garen.

We should rename the following:

osStackLimitWithReserve => softStackLimit
reservedZoneSize => softReservedZoneSize
errorModeReservedZoneSize => reservedZoneSize

  • API/tests/PingPongStackOverflowTest.cpp:

(testPingPongStackOverflow):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):

  • interpreter/CLoopStack.cpp:

(JSC::CLoopStack::CLoopStack):
(JSC::CLoopStack::grow):
(JSC::CLoopStack::releaseExcessCapacity):
(JSC::CLoopStack::addToCommittedByteCount):
(JSC::CLoopStack::setSoftReservedZoneSize):
(JSC::CLoopStack::setReservedZoneSize): Deleted.

  • interpreter/CLoopStack.h:

(JSC::CLoopStack::size):

  • interpreter/CLoopStackInlines.h:

(JSC::CLoopStack::shrink):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):

  • jit/SetupVarargsFrame.cpp:

(JSC::emitSetupVarargsFrameFastCase):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ErrorHandlingScope.cpp:

(JSC::ErrorHandlingScope::ErrorHandlingScope):
(JSC::ErrorHandlingScope::~ErrorHandlingScope):

  • runtime/ErrorHandlingScope.h:
  • runtime/Options.h:
  • runtime/RegExp.cpp:

(JSC::RegExp::finishCreation):
(JSC::RegExp::compile):
(JSC::RegExp::compileMatchOnly):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::setStackPointerAtVMEntry):
(JSC::VM::updateSoftReservedZoneSize):
(JSC::VM::updateStackLimit):
(JSC::VM::updateReservedZoneSize): Deleted.

  • runtime/VM.h:

(JSC::VM::stackPointerAtVMEntry):
(JSC::VM::softReservedZoneSize):
(JSC::VM::softStackLimit):
(JSC::VM::addressOfSoftStackLimit):
(JSC::VM::cloopStackLimit):
(JSC::VM::setCLoopStackLimit):
(JSC::VM::isSafeToRecurse):
(JSC::VM::reservedZoneSize): Deleted.
(JSC::VM::osStackLimitWithReserve): Deleted.
(JSC::VM::addressOfOSStackLimitWithReserve): Deleted.

  • runtime/VMInlines.h:

(JSC::VM::ensureStackCapacityFor):

  • wasm/WASMFunctionCompiler.h:

(JSC::WASMFunctionCompiler::startFunction):

Location:
trunk/Source/JavaScriptCore
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp

    r189454 r203130  
    121121    Options::initialize(); // Ensure options is initialized first.
    122122
     123    auto origSoftReservedZoneSize = Options::softReservedZoneSize();
    123124    auto origReservedZoneSize = Options::reservedZoneSize();
    124     auto origErrorModeReservedZoneSize = Options::errorModeReservedZoneSize();
    125125    auto origUseLLInt = Options::useLLInt();
    126126    auto origMaxPerThreadStackUsage = Options::maxPerThreadStackUsage();
    127127
    128     Options::reservedZoneSize() = 128 * KB;
    129     Options::errorModeReservedZoneSize() = 64 * KB;
     128    Options::softReservedZoneSize() = 128 * KB;
     129    Options::reservedZoneSize() = 64 * KB;
    130130#if ENABLE(JIT)
    131131    // Normally, we want to disable the LLINT to force the use of JITted code which is necessary for
     
    159159
    160160    unsigned stackSize = 32 * KB;
    161     Options::maxPerThreadStackUsage() = stackSize + Options::reservedZoneSize();
     161    Options::maxPerThreadStackUsage() = stackSize + Options::softReservedZoneSize();
    162162
    163163    exception = nullptr;
     
    174174    }
    175175
     176    Options::softReservedZoneSize() = origSoftReservedZoneSize;
    176177    Options::reservedZoneSize() = origReservedZoneSize;
    177     Options::errorModeReservedZoneSize() = origErrorModeReservedZoneSize;
    178178    Options::useLLInt() = origUseLLInt;
    179179    Options::maxPerThreadStackUsage() = origMaxPerThreadStackUsage;
  • TabularUnified trunk/Source/JavaScriptCore/ChangeLog

    r203115 r203130  
     12016-07-12  Mark Lam  <mark.lam@apple.com>
     2
     3        More stack limit and reserved zone renaming.
     4        https://bugs.webkit.org/show_bug.cgi?id=159690
     5
     6        Rubber-stamped by Geoffrey Garen.
     7
     8        We should rename the following:
     9            osStackLimitWithReserve => softStackLimit
     10            reservedZoneSize => softReservedZoneSize
     11            errorModeReservedZoneSize => reservedZoneSize
     12
     13        * API/tests/PingPongStackOverflowTest.cpp:
     14        (testPingPongStackOverflow):
     15        * dfg/DFGJITCompiler.cpp:
     16        (JSC::DFG::JITCompiler::compile):
     17        (JSC::DFG::JITCompiler::compileFunction):
     18        * ftl/FTLLowerDFGToB3.cpp:
     19        (JSC::FTL::DFG::LowerDFGToB3::lower):
     20        * interpreter/CLoopStack.cpp:
     21        (JSC::CLoopStack::CLoopStack):
     22        (JSC::CLoopStack::grow):
     23        (JSC::CLoopStack::releaseExcessCapacity):
     24        (JSC::CLoopStack::addToCommittedByteCount):
     25        (JSC::CLoopStack::setSoftReservedZoneSize):
     26        (JSC::CLoopStack::setReservedZoneSize): Deleted.
     27        * interpreter/CLoopStack.h:
     28        (JSC::CLoopStack::size):
     29        * interpreter/CLoopStackInlines.h:
     30        (JSC::CLoopStack::shrink):
     31        * jit/JIT.cpp:
     32        (JSC::JIT::compileWithoutLinking):
     33        * jit/SetupVarargsFrame.cpp:
     34        (JSC::emitSetupVarargsFrameFastCase):
     35        * llint/LLIntSlowPaths.cpp:
     36        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
     37        * llint/LowLevelInterpreter.asm:
     38        * llint/LowLevelInterpreter32_64.asm:
     39        * llint/LowLevelInterpreter64.asm:
     40        * runtime/ErrorHandlingScope.cpp:
     41        (JSC::ErrorHandlingScope::ErrorHandlingScope):
     42        (JSC::ErrorHandlingScope::~ErrorHandlingScope):
     43        * runtime/ErrorHandlingScope.h:
     44        * runtime/Options.h:
     45        * runtime/RegExp.cpp:
     46        (JSC::RegExp::finishCreation):
     47        (JSC::RegExp::compile):
     48        (JSC::RegExp::compileMatchOnly):
     49        * runtime/VM.cpp:
     50        (JSC::VM::VM):
     51        (JSC::VM::setStackPointerAtVMEntry):
     52        (JSC::VM::updateSoftReservedZoneSize):
     53        (JSC::VM::updateStackLimit):
     54        (JSC::VM::updateReservedZoneSize): Deleted.
     55        * runtime/VM.h:
     56        (JSC::VM::stackPointerAtVMEntry):
     57        (JSC::VM::softReservedZoneSize):
     58        (JSC::VM::softStackLimit):
     59        (JSC::VM::addressOfSoftStackLimit):
     60        (JSC::VM::cloopStackLimit):
     61        (JSC::VM::setCLoopStackLimit):
     62        (JSC::VM::isSafeToRecurse):
     63        (JSC::VM::reservedZoneSize): Deleted.
     64        (JSC::VM::osStackLimitWithReserve): Deleted.
     65        (JSC::VM::addressOfOSStackLimitWithReserve): Deleted.
     66        * runtime/VMInlines.h:
     67        (JSC::VM::ensureStackCapacityFor):
     68        * wasm/WASMFunctionCompiler.h:
     69        (JSC::WASMFunctionCompiler::startFunction):
     70
    1712016-07-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
    272
  • TabularUnified trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp

    r203006 r203130  
    343343    // Plant a check that sufficient space is available in the JSStack.
    344344    addPtr(TrustedImm32(virtualRegisterForLocal(m_graph.requiredRegisterCountForExecutionAndExit() - 1).offset() * sizeof(Register)), GPRInfo::callFrameRegister, GPRInfo::regT1);
    345     Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
     345    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), GPRInfo::regT1);
    346346
    347347    addPtr(TrustedImm32(m_graph.stackPointerOffset() * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister);
     
    406406    // Plant a check that sufficient space is available in the JSStack.
    407407    addPtr(TrustedImm32(virtualRegisterForLocal(m_graph.requiredRegisterCountForExecutionAndExit() - 1).offset() * sizeof(Register)), GPRInfo::callFrameRegister, GPRInfo::regT1);
    408     Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
     408    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), GPRInfo::regT1);
    409409
    410410    // Move the stack pointer down to accommodate locals
  • TabularUnified trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r203006 r203130  
    190190        // Stack Overflow Check.
    191191        unsigned exitFrameSize = m_graph.requiredRegisterCountForExit() * sizeof(Register);
    192         MacroAssembler::AbsoluteAddress addressOfStackLimit(vm().addressOfOSStackLimitWithReserve());
     192        MacroAssembler::AbsoluteAddress addressOfStackLimit(vm().addressOfSoftStackLimit());
    193193        PatchpointValue* stackOverflowHandler = m_out.patchpoint(Void);
    194194        CallSiteIndex callSiteIndex = callSiteIndexForCodeOrigin(m_ftlState, CodeOrigin(0));
  • TabularUnified trunk/Source/JavaScriptCore/interpreter/CLoopStack.cpp

    r203081 r203130  
    5555    , m_topCallFrame(vm.topCallFrame)
    5656    , m_end(0)
    57     , m_reservedZoneSizeInRegisters(0)
     57    , m_softReservedZoneSizeInRegisters(0)
    5858{
    5959    size_t capacity = Options::maxPerThreadStackUsage();
     
    7979bool CLoopStack::grow(Register* newTopOfStack)
    8080{
    81     Register* newTopOfStackWithReservedZone = newTopOfStack - m_reservedZoneSizeInRegisters;
     81    Register* newTopOfStackWithReservedZone = newTopOfStack - m_softReservedZoneSizeInRegisters;
    8282
    8383    // If we have already committed enough memory to satisfy this request,
     
    127127void CLoopStack::releaseExcessCapacity()
    128128{
    129     Register* highAddressWithReservedZone = highAddress() - m_reservedZoneSizeInRegisters;
     129    Register* highAddressWithReservedZone = highAddress() - m_softReservedZoneSizeInRegisters;
    130130    ptrdiff_t delta = reinterpret_cast<char*>(highAddressWithReservedZone) - reinterpret_cast<char*>(m_commitTop);
    131131    m_reservation.decommit(m_commitTop, delta);
     
    141141}
    142142
    143 void CLoopStack::setReservedZoneSize(size_t reservedZoneSize)
     143void CLoopStack::setSoftReservedZoneSize(size_t reservedZoneSize)
    144144{
    145     m_reservedZoneSizeInRegisters = reservedZoneSize / sizeof(Register);
    146     if (m_commitTop >= (m_end + 1) - m_reservedZoneSizeInRegisters)
     145    m_softReservedZoneSizeInRegisters = reservedZoneSize / sizeof(Register);
     146    if (m_commitTop >= (m_end + 1) - m_softReservedZoneSizeInRegisters)
    147147        grow(m_end + 1);
    148148}
  • TabularUnified trunk/Source/JavaScriptCore/interpreter/CLoopStack.h

    r203081 r203130  
    6868        size_t size() const { return highAddress() - lowAddress(); }
    6969
    70         void setReservedZoneSize(size_t);
     70        void setSoftReservedZoneSize(size_t);
    7171
    7272        inline Register* topOfStack();
     
    105105        PageReservation m_reservation;
    106106        Register* m_lastStackTop;
    107         ptrdiff_t m_reservedZoneSizeInRegisters;
     107        ptrdiff_t m_softReservedZoneSizeInRegisters;
    108108
    109109        friend class LLIntOffsetsExtractor;
  • TabularUnified trunk/Source/JavaScriptCore/interpreter/CLoopStackInlines.h

    r203081 r203130  
    6565    // assign the constant to a local variable, and use the local instead.
    6666    ptrdiff_t maxExcessCapacity = CLoopStack::maxExcessCapacity;
    67     ptrdiff_t maxExcessInRegisters = std::max(maxExcessCapacity, m_reservedZoneSizeInRegisters);
     67    ptrdiff_t maxExcessInRegisters = std::max(maxExcessCapacity, m_softReservedZoneSizeInRegisters);
    6868    if (m_end == baseOfStack() && (highAddress() - m_commitTop) >= maxExcessInRegisters)
    6969        releaseExcessCapacity();
  • TabularUnified trunk/Source/JavaScriptCore/jit/JIT.cpp

    r203006 r203130  
    600600
    601601    addPtr(TrustedImm32(stackPointerOffsetFor(m_codeBlock) * sizeof(Register)), callFrameRegister, regT1);
    602     Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), regT1);
     602    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), regT1);
    603603
    604604    move(regT1, stackPointerRegister);
  • TabularUnified trunk/Source/JavaScriptCore/jit/SetupVarargsFrame.cpp

    r203053 r203130  
    8383    emitSetVarargsFrame(jit, scratchGPR1, true, numUsedSlotsGPR, scratchGPR2);
    8484
    85     slowCase.append(jit.branchPtr(CCallHelpers::Above, CCallHelpers::AbsoluteAddress(jit.vm()->addressOfOSStackLimitWithReserve()), scratchGPR2));
     85    slowCase.append(jit.branchPtr(CCallHelpers::Above, CCallHelpers::AbsoluteAddress(jit.vm()->addressOfSoftStackLimit()), scratchGPR2));
    8686
    8787    // Initialize ArgumentCount.
  • TabularUnified trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r203081 r203130  
    484484
    485485#if ENABLE(JIT)
    486     dataLogF("Current end is at %p.\n", exec->vm().osStackLimitWithReserve());
     486    dataLogF("Current end is at %p.\n", exec->vm().softStackLimit());
    487487#else
    488488    dataLogF("Current end is at %p.\n", exec->vm().cloopStackLimit());
  • TabularUnified trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r202992 r203130  
    955955        bpbeq VM::m_cloopStackLimit[t2], t0, .stackHeightOK
    956956    else
    957         bpbeq VM::m_osStackLimitWithReserve[t2], t0, .stackHeightOK
     957        bpbeq VM::m_softStackLimit[t2], t0, .stackHeightOK
    958958    end
    959959
  • TabularUnified trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r202992 r203130  
    156156        bpaeq t3, VM::m_cloopStackLimit[vm], .stackHeightOK
    157157    else
    158         bpaeq t3, VM::m_osStackLimitWithReserve[vm], .stackHeightOK
     158        bpaeq t3, VM::m_softStackLimit[vm], .stackHeightOK
    159159    end
    160160
  • TabularUnified trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

    r202992 r203130  
    144144        bpaeq t3, VM::m_cloopStackLimit[vm], .stackHeightOK
    145145    else
    146         bpaeq t3, VM::m_osStackLimitWithReserve[vm], .stackHeightOK
     146        bpaeq t3, VM::m_softStackLimit[vm], .stackHeightOK
    147147    end
    148148
  • TabularUnified trunk/Source/JavaScriptCore/runtime/ErrorHandlingScope.cpp

    r203081 r203130  
    3636{
    3737    RELEASE_ASSERT(m_vm.stackPointerAtVMEntry());
    38     size_t newReservedZoneSize = Options::errorModeReservedZoneSize();
    39     m_savedReservedZoneSize = m_vm.updateReservedZoneSize(newReservedZoneSize);
     38    size_t newSoftReservedZoneSize = Options::reservedZoneSize();
     39    m_savedSoftReservedZoneSize = m_vm.updateSoftReservedZoneSize(newSoftReservedZoneSize);
    4040}
    4141
     
    4343{
    4444    RELEASE_ASSERT(m_vm.stackPointerAtVMEntry());
    45     m_vm.updateReservedZoneSize(m_savedReservedZoneSize);
     45    m_vm.updateSoftReservedZoneSize(m_savedSoftReservedZoneSize);
    4646}
    4747
  • TabularUnified trunk/Source/JavaScriptCore/runtime/ErrorHandlingScope.h

    r163027 r203130  
    3737private:
    3838    VM& m_vm;
    39     size_t m_savedReservedZoneSize;
     39    size_t m_savedSoftReservedZoneSize;
    4040};
    4141
  • TabularUnified trunk/Source/JavaScriptCore/runtime/Options.h

    r202650 r203130  
    113113    v(bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \
    114114    \
    115     v(unsigned, maxPerThreadStackUsage, 4 * MB, Normal, nullptr) \
    116     v(unsigned, reservedZoneSize, 128 * KB, Normal, nullptr) \
    117     v(unsigned, errorModeReservedZoneSize, 64 * KB, Normal, nullptr) \
     115    v(unsigned, maxPerThreadStackUsage, 4 * MB, Normal, "Max allowed stack usage by the VM") \
     116    v(unsigned, softReservedZoneSize, 128 * KB, Normal, "The amount of stack JSC usually reserves for host code.") \
     117    v(unsigned, reservedZoneSize, 64 * KB, Normal, "This is the amount of stack JSC guarantees for client and VM code.") \
    118118    \
    119119    v(bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \
  • TabularUnified trunk/Source/JavaScriptCore/runtime/RegExp.cpp

    r202992 r203130  
    223223{
    224224    Base::finishCreation(vm);
    225     Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm.osStackLimitWithReserve());
     225    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm.softStackLimit());
    226226    if (m_constructionError)
    227227        m_state = ParseError;
     
    265265    ConcurrentJITLocker locker(m_lock);
    266266   
    267     Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->osStackLimitWithReserve());
     267    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->softStackLimit());
    268268    if (m_constructionError) {
    269269        RELEASE_ASSERT_NOT_REACHED();
     
    318318    ConcurrentJITLocker locker(m_lock);
    319319   
    320     Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->osStackLimitWithReserve());
     320    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->softStackLimit());
    321321    if (m_constructionError) {
    322322        RELEASE_ASSERT_NOT_REACHED();
  • TabularUnified trunk/Source/JavaScriptCore/runtime/VM.cpp

    r203081 r203130  
    198198    interpreter = new Interpreter(*this);
    199199    StackBounds stack = wtfThreadData().stack();
    200     updateReservedZoneSize(Options::reservedZoneSize());
     200    updateSoftReservedZoneSize(Options::softReservedZoneSize());
    201201    setLastStackTop(stack.origin());
    202202
     
    614614}
    615615
    616 size_t VM::updateReservedZoneSize(size_t reservedZoneSize)
    617 {
    618     size_t oldReservedZoneSize = m_reservedZoneSize;
    619     m_reservedZoneSize = reservedZoneSize;
     616size_t VM::updateSoftReservedZoneSize(size_t softReservedZoneSize)
     617{
     618    size_t oldSoftReservedZoneSize = m_currentSoftReservedZoneSize;
     619    m_currentSoftReservedZoneSize = softReservedZoneSize;
    620620#if !ENABLE(JIT)
    621     interpreter->cloopStack().setReservedZoneSize(reservedZoneSize);
     621    interpreter->cloopStack().setSoftReservedZoneSize(softReservedZoneSize);
    622622#endif
    623623
    624624    updateStackLimit();
    625625
    626     return oldReservedZoneSize;
     626    return oldSoftReservedZoneSize;
    627627}
    628628
     
    655655{
    656656#if PLATFORM(WIN)
    657     void* lastOSStackLimitWithReserve = m_osStackLimitWithReserve;
     657    void* lastSoftStackLimit = m_softStackLimit;
    658658#endif
    659659
     
    661661        ASSERT(wtfThreadData().stack().isGrowingDownward());
    662662        char* startOfStack = reinterpret_cast<char*>(m_stackPointerAtVMEntry);
    663         m_osStackLimitWithReserve = wtfThreadData().stack().recursionLimit(startOfStack, Options::maxPerThreadStackUsage(), m_reservedZoneSize);
     663        m_softStackLimit = wtfThreadData().stack().recursionLimit(startOfStack, Options::maxPerThreadStackUsage(), m_currentSoftReservedZoneSize);
    664664    } else {
    665         m_osStackLimitWithReserve = wtfThreadData().stack().recursionLimit(m_reservedZoneSize);
     665        m_softStackLimit = wtfThreadData().stack().recursionLimit(m_currentSoftReservedZoneSize);
    666666    }
    667667
    668668#if PLATFORM(WIN)
    669     if (lastOSStackLimitWithReserve != m_osStackLimitWithReserve)
    670         preCommitStackMemory(m_osStackLimitWithReserve);
     669    if (lastSoftStackLimit != m_softStackLimit)
     670        preCommitStackMemory(m_softStackLimit);
    671671#endif
    672672}
  • TabularUnified trunk/Source/JavaScriptCore/runtime/VM.h

    r203081 r203130  
    460460    void setStackPointerAtVMEntry(void*);
    461461
    462     size_t reservedZoneSize() const { return m_reservedZoneSize; }
    463     size_t updateReservedZoneSize(size_t reservedZoneSize);
     462    size_t softReservedZoneSize() const { return m_currentSoftReservedZoneSize; }
     463    size_t updateSoftReservedZoneSize(size_t softReservedZoneSize);
    464464
    465465    static size_t committedStackByteCount();
    466466    inline bool ensureStackCapacityFor(Register* newTopOfStack);
    467467
    468     void* osStackLimitWithReserve() { return m_osStackLimitWithReserve; }
    469     void** addressOfOSStackLimitWithReserve() { return &m_osStackLimitWithReserve; }
     468    void* softStackLimit() { return m_softStackLimit; }
     469    void** addressOfSoftStackLimit() { return &m_softStackLimit; }
    470470#if !ENABLE(JIT)
    471471    void* cloopStackLimit() { return m_cloopStackLimit; }
     
    477477        ASSERT(wtfThreadData().stack().isGrowingDownward());
    478478        int8_t* curr = reinterpret_cast<int8_t*>(&curr);
    479         int8_t* limit = reinterpret_cast<int8_t*>(m_osStackLimitWithReserve);
     479        int8_t* limit = reinterpret_cast<int8_t*>(m_softStackLimit);
    480480        return curr >= limit && static_cast<size_t>(curr - limit) >= neededStackInBytes;
    481481    }
     
    649649
    650650    void* m_stackPointerAtVMEntry;
    651     size_t m_reservedZoneSize;
    652     void* m_osStackLimitWithReserve { nullptr };
     651    size_t m_currentSoftReservedZoneSize;
     652    void* m_softStackLimit { nullptr };
    653653#if !ENABLE(JIT)
    654654    void* m_cloopStackLimit { nullptr };
  • TabularUnified trunk/Source/JavaScriptCore/runtime/VMInlines.h

    r203081 r203130  
    4141#if ENABLE(JIT)
    4242    ASSERT(wtfThreadData().stack().isGrowingDownward());
    43     return newTopOfStack >= m_osStackLimitWithReserve;
     43    return newTopOfStack >= m_softStackLimit;
    4444#else
    4545    return interpreter->cloopStack().ensureCapacityFor(newTopOfStack);
  • TabularUnified trunk/Source/JavaScriptCore/wasm/WASMFunctionCompiler.h

    r203006 r203130  
    136136
    137137        addPtr(TrustedImm32(-m_calleeSaveSpace - WTF::roundUpToMultipleOf(stackAlignmentRegisters(), m_stackHeight) * sizeof(StackSlot) - maxFrameExtentForSlowPathCall), GPRInfo::callFrameRegister, GPRInfo::regT1);
    138         m_stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
     138        m_stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), GPRInfo::regT1);
    139139
    140140        move(GPRInfo::regT1, stackPointerRegister);
Note: See TracChangeset for help on using the changeset viewer.