Title: [202992] trunk/Source/_javascript_Core
Revision
202992
Author
[email protected]
Date
2016-07-08 10:54:38 -0700 (Fri, 08 Jul 2016)

Log Message

Rename jsCPUStackLimit to osStackLimitWithReserve and jsEmulatedStackLimit to cloopStackLimit.
https://bugs.webkit.org/show_bug.cgi?id=159544

Reviewed by Geoffrey Garen.

This patch does the following refactoring:
1. Rename jsCPUStackLimit to osStackLimitWithReserve.
2. Rename jsEmulatedStackLimit to cloopStackLimit.
2. Remove llintStackLimit (which previously is either an alias for
   jsCPUStackLimit or jsEmulatedStackLimit depending on whether we have a JIT or
   C Loop build).  Instead, we'll change the LLINT to conditionally use the
   osStackLimitWithReserve or cloopStackLimit.

There are no semantic changes.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
* interpreter/JSStack.cpp:
(JSC::JSStack::JSStack):
(JSC::JSStack::growSlowCase):
(JSC::JSStack::lowAddress):
(JSC::JSStack::highAddress):
* interpreter/JSStack.h:
* interpreter/JSStackInlines.h:
(JSC::JSStack::ensureCapacityFor):
(JSC::JSStack::shrink):
(JSC::JSStack::grow):
(JSC::JSStack::setCLoopStackLimit):
(JSC::JSStack::setJSEmulatedStackLimit): Deleted.
* 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/RegExp.cpp:
(JSC::RegExp::finishCreation):
(JSC::RegExp::compile):
(JSC::RegExp::compileMatchOnly):
* runtime/VM.cpp:
(JSC::VM::updateStackLimit):
* runtime/VM.h:
(JSC::VM::reservedZoneSize):
(JSC::VM::osStackLimitWithReserve):
(JSC::VM::addressOfOSStackLimitWithReserve):
(JSC::VM::cloopStackLimit):
(JSC::VM::setCLoopStackLimit):
(JSC::VM::isSafeToRecurse):
(JSC::VM::jsCPUStackLimit): Deleted.
(JSC::VM::addressOfJSCPUStackLimit): Deleted.
(JSC::VM::jsEmulatedStackLimit): Deleted.
(JSC::VM::setJSEmulatedStackLimit): Deleted.
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::startFunction):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (202991 => 202992)


--- trunk/Source/_javascript_Core/ChangeLog	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-07-08 17:54:38 UTC (rev 202992)
@@ -1,3 +1,66 @@
+2016-07-08  Mark Lam  <[email protected]>
+
+        Rename jsCPUStackLimit to osStackLimitWithReserve and jsEmulatedStackLimit to cloopStackLimit.
+        https://bugs.webkit.org/show_bug.cgi?id=159544
+
+        Reviewed by Geoffrey Garen.
+
+        This patch does the following refactoring:
+        1. Rename jsCPUStackLimit to osStackLimitWithReserve.
+        2. Rename jsEmulatedStackLimit to cloopStackLimit.
+        2. Remove llintStackLimit (which previously is either an alias for
+           jsCPUStackLimit or jsEmulatedStackLimit depending on whether we have a JIT or
+           C Loop build).  Instead, we'll change the LLINT to conditionally use the
+           osStackLimitWithReserve or cloopStackLimit.
+
+        There are no semantic changes.
+
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::compile):
+        (JSC::DFG::JITCompiler::compileFunction):
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::lower):
+        * interpreter/JSStack.cpp:
+        (JSC::JSStack::JSStack):
+        (JSC::JSStack::growSlowCase):
+        (JSC::JSStack::lowAddress):
+        (JSC::JSStack::highAddress):
+        * interpreter/JSStack.h:
+        * interpreter/JSStackInlines.h:
+        (JSC::JSStack::ensureCapacityFor):
+        (JSC::JSStack::shrink):
+        (JSC::JSStack::grow):
+        (JSC::JSStack::setCLoopStackLimit):
+        (JSC::JSStack::setJSEmulatedStackLimit): Deleted.
+        * 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/RegExp.cpp:
+        (JSC::RegExp::finishCreation):
+        (JSC::RegExp::compile):
+        (JSC::RegExp::compileMatchOnly):
+        * runtime/VM.cpp:
+        (JSC::VM::updateStackLimit):
+        * runtime/VM.h:
+        (JSC::VM::reservedZoneSize):
+        (JSC::VM::osStackLimitWithReserve):
+        (JSC::VM::addressOfOSStackLimitWithReserve):
+        (JSC::VM::cloopStackLimit):
+        (JSC::VM::setCLoopStackLimit):
+        (JSC::VM::isSafeToRecurse):
+        (JSC::VM::jsCPUStackLimit): Deleted.
+        (JSC::VM::addressOfJSCPUStackLimit): Deleted.
+        (JSC::VM::jsEmulatedStackLimit): Deleted.
+        (JSC::VM::setJSEmulatedStackLimit): Deleted.
+        * wasm/WASMFunctionCompiler.h:
+        (JSC::WASMFunctionCompiler::startFunction):
+
 2016-07-08  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r202799.

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (202991 => 202992)


--- trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2016-07-08 17:54:38 UTC (rev 202992)
@@ -342,7 +342,7 @@
 
     // Plant a check that sufficient space is available in the JSStack.
     addPtr(TrustedImm32(virtualRegisterForLocal(m_graph.requiredRegisterCountForExecutionAndExit() - 1).offset() * sizeof(Register)), GPRInfo::callFrameRegister, GPRInfo::regT1);
-    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfJSCPUStackLimit()), GPRInfo::regT1);
+    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
 
     addPtr(TrustedImm32(m_graph.stackPointerOffset() * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister);
     checkStackPointerAlignment();
@@ -405,7 +405,7 @@
     Label fromArityCheck(this);
     // Plant a check that sufficient space is available in the JSStack.
     addPtr(TrustedImm32(virtualRegisterForLocal(m_graph.requiredRegisterCountForExecutionAndExit() - 1).offset() * sizeof(Register)), GPRInfo::callFrameRegister, GPRInfo::regT1);
-    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfJSCPUStackLimit()), GPRInfo::regT1);
+    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
 
     // Move the stack pointer down to accommodate locals
     addPtr(TrustedImm32(m_graph.stackPointerOffset() * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister);

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (202991 => 202992)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2016-07-08 17:54:38 UTC (rev 202992)
@@ -189,7 +189,7 @@
 
         // Stack Overflow Check.
         unsigned exitFrameSize = m_graph.requiredRegisterCountForExit() * sizeof(Register);
-        MacroAssembler::AbsoluteAddress addressOfStackLimit(vm().addressOfJSCPUStackLimit());
+        MacroAssembler::AbsoluteAddress addressOfStackLimit(vm().addressOfOSStackLimitWithReserve());
         PatchpointValue* stackOverflowHandler = m_out.patchpoint(Void);
         CallSiteIndex callSiteIndex = callSiteIndexForCodeOrigin(m_ftlState, CodeOrigin(0));
         stackOverflowHandler->appendSomeRegister(m_callFrame);

Modified: trunk/Source/_javascript_Core/interpreter/JSStack.cpp (202991 => 202992)


--- trunk/Source/_javascript_Core/interpreter/JSStack.cpp	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/interpreter/JSStack.cpp	2016-07-08 17:54:38 UTC (rev 202992)
@@ -62,7 +62,7 @@
     ASSERT(capacity && isPageAligned(capacity));
 
     m_reservation = PageReservation::reserve(WTF::roundUpToMultipleOf(commitSize(), capacity), OSAllocator::JSVMStackPages);
-    setJSEmulatedStackLimit(highAddress());
+    setCLoopStackLimit(highAddress());
     m_commitTop = highAddress();
     
     m_lastStackTop = baseOfStack();
@@ -87,7 +87,7 @@
     // If we have already committed enough memory to satisfy this request,
     // just update the end pointer and return.
     if (newTopOfStackWithReservedZone >= m_commitTop) {
-        setJSEmulatedStackLimit(newTopOfStack);
+        setCLoopStackLimit(newTopOfStack);
         return true;
     }
 
@@ -104,7 +104,7 @@
     m_reservation.commit(newCommitTop, delta);
     addToCommittedByteCount(delta);
     m_commitTop = newCommitTop;
-    setJSEmulatedStackLimit(newTopOfStack);
+    setCLoopStackLimit(newTopOfStack);
     return true;
 }
 
@@ -156,7 +156,7 @@
 Register* JSStack::lowAddress() const
 {
     ASSERT(wtfThreadData().stack().isGrowingDownward());
-    return reinterpret_cast<Register*>(m_vm.jsCPUStackLimit());
+    return reinterpret_cast<Register*>(m_vm.osStackLimitWithReserve());
 }
 
 Register* JSStack::highAddress() const

Modified: trunk/Source/_javascript_Core/interpreter/JSStack.h (202991 => 202992)


--- trunk/Source/_javascript_Core/interpreter/JSStack.h	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/interpreter/JSStack.h	2016-07-08 17:54:38 UTC (rev 202992)
@@ -130,7 +130,7 @@
         void releaseExcessCapacity();
         void addToCommittedByteCount(long);
 
-        void setJSEmulatedStackLimit(Register* newTopOfStack);
+        void setCLoopStackLimit(Register* newTopOfStack);
 #endif // !ENABLE(JIT)
 
         VM& m_vm;

Modified: trunk/Source/_javascript_Core/interpreter/JSStackInlines.h (202991 => 202992)


--- trunk/Source/_javascript_Core/interpreter/JSStackInlines.h	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/interpreter/JSStackInlines.h	2016-07-08 17:54:38 UTC (rev 202992)
@@ -39,7 +39,7 @@
     return grow(newTopOfStack);
 #else
     ASSERT(wtfThreadData().stack().isGrowingDownward());
-    return newTopOfStack >= m_vm.jsCPUStackLimit();
+    return newTopOfStack >= m_vm.osStackLimitWithReserve();
 #endif
 }
 
@@ -62,7 +62,7 @@
     Register* newEnd = newTopOfStack - 1;
     if (newEnd >= m_end)
         return;
-    setJSEmulatedStackLimit(newTopOfStack);
+    setCLoopStackLimit(newTopOfStack);
     // Note: Clang complains of an unresolved linkage to maxExcessCapacity if
     // invoke std::max() with it as an argument. To work around this, we first
     // assign the constant to a local variable, and use the local instead.
@@ -80,11 +80,11 @@
     return growSlowCase(newTopOfStack);
 }
 
-inline void JSStack::setJSEmulatedStackLimit(Register* newTopOfStack)
+inline void JSStack::setCLoopStackLimit(Register* newTopOfStack)
 {
     Register* newEnd = newTopOfStack - 1;
     m_end = newEnd;
-    m_vm.setJSEmulatedStackLimit(newTopOfStack);
+    m_vm.setCLoopStackLimit(newTopOfStack);
 }
 
 #endif // !ENABLE(JIT)

Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (202991 => 202992)


--- trunk/Source/_javascript_Core/jit/JIT.cpp	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp	2016-07-08 17:54:38 UTC (rev 202992)
@@ -599,7 +599,7 @@
     }
 
     addPtr(TrustedImm32(stackPointerOffsetFor(m_codeBlock) * sizeof(Register)), callFrameRegister, regT1);
-    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfJSCPUStackLimit()), regT1);
+    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), regT1);
 
     move(regT1, stackPointerRegister);
     checkStackPointerAlignment();

Modified: trunk/Source/_javascript_Core/jit/SetupVarargsFrame.cpp (202991 => 202992)


--- trunk/Source/_javascript_Core/jit/SetupVarargsFrame.cpp	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/jit/SetupVarargsFrame.cpp	2016-07-08 17:54:38 UTC (rev 202992)
@@ -82,7 +82,7 @@
     
     emitSetVarargsFrame(jit, scratchGPR1, true, numUsedSlotsGPR, scratchGPR2);
 
-    slowCase.append(jit.branchPtr(CCallHelpers::Above, CCallHelpers::AbsoluteAddress(jit.vm()->addressOfJSCPUStackLimit()), scratchGPR2));
+    slowCase.append(jit.branchPtr(CCallHelpers::Above, CCallHelpers::AbsoluteAddress(jit.vm()->osStackLimitWithReserve()), scratchGPR2));
 
     // Initialize ArgumentCount.
     jit.store32(scratchGPR1, CCallHelpers::Address(scratchGPR2, JSStack::ArgumentCount * static_cast<int>(sizeof(Register)) + PayloadOffset));

Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (202991 => 202992)


--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2016-07-08 17:54:38 UTC (rev 202992)
@@ -484,9 +484,9 @@
     dataLogF("Num vars = %u.\n", exec->codeBlock()->m_numVars);
 
 #if ENABLE(JIT)
-    dataLogF("Current end is at %p.\n", exec->vm().jsCPUStackLimit());
+    dataLogF("Current end is at %p.\n", exec->vm().osStackLimitWithReserve());
 #else
-    dataLogF("Current end is at %p.\n", exec->vm().jsEmulatedStackLimit());
+    dataLogF("Current end is at %p.\n", exec->vm().cloopStackLimit());
 #endif
 
 #endif

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (202991 => 202992)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2016-07-08 17:54:38 UTC (rev 202992)
@@ -951,7 +951,11 @@
     getFrameRegisterSizeForCodeBlock(t1, t0)
     subp cfr, t0, t0
     loadp CodeBlock::m_vm[t1], t2
-    bpbeq VM::m_llintStackLimit[t2], t0, .stackHeightOK
+    if C_LOOP
+        bpbeq VM::m_cloopStackLimit[t2], t0, .stackHeightOK
+    else
+        bpbeq VM::m_osStackLimitWithReserve[t2], t0, .stackHeightOK
+    end
 
     # Stack height check failed - need to call a slow_path.
     # Set up temporary stack pointer for call including callee saves

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (202991 => 202992)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2016-07-08 17:54:38 UTC (rev 202992)
@@ -152,7 +152,11 @@
     # Ensure that we have enough additional stack capacity for the incoming args,
     # and the frame for the JS code we're executing. We need to do this check
     # before we start copying the args from the protoCallFrame below.
-    bpaeq t3, VM::m_llintStackLimit[vm], .stackHeightOK
+    if C_LOOP
+        bpaeq t3, VM::m_cloopStackLimit[vm], .stackHeightOK
+    else
+        bpaeq t3, VM::m_osStackLimitWithReserve[vm], .stackHeightOK
+    end
 
     if C_LOOP
         move entry, t4

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (202991 => 202992)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2016-07-08 17:54:38 UTC (rev 202992)
@@ -140,7 +140,11 @@
     # Ensure that we have enough additional stack capacity for the incoming args,
     # and the frame for the JS code we're executing. We need to do this check
     # before we start copying the args from the protoCallFrame below.
-    bpaeq t3, VM::m_llintStackLimit[vm], .stackHeightOK
+    if C_LOOP
+        bpaeq t3, VM::m_cloopStackLimit[vm], .stackHeightOK
+    else
+        bpaeq t3, VM::m_osStackLimitWithReserve[vm], .stackHeightOK
+    end
 
     if C_LOOP
         move entry, t4

Modified: trunk/Source/_javascript_Core/runtime/RegExp.cpp (202991 => 202992)


--- trunk/Source/_javascript_Core/runtime/RegExp.cpp	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/runtime/RegExp.cpp	2016-07-08 17:54:38 UTC (rev 202992)
@@ -222,7 +222,7 @@
 void RegExp::finishCreation(VM& vm)
 {
     Base::finishCreation(vm);
-    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm.jsCPUStackLimit());
+    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm.osStackLimitWithReserve());
     if (m_constructionError)
         m_state = ParseError;
     else
@@ -264,7 +264,7 @@
 {
     ConcurrentJITLocker locker(m_lock);
     
-    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->jsCPUStackLimit());
+    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->osStackLimitWithReserve());
     if (m_constructionError) {
         RELEASE_ASSERT_NOT_REACHED();
 #if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)
@@ -317,7 +317,7 @@
 {
     ConcurrentJITLocker locker(m_lock);
     
-    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->jsCPUStackLimit());
+    Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->osStackLimitWithReserve());
     if (m_constructionError) {
         RELEASE_ASSERT_NOT_REACHED();
 #if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)

Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (202991 => 202992)


--- trunk/Source/_javascript_Core/runtime/VM.cpp	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp	2016-07-08 17:54:38 UTC (rev 202992)
@@ -650,20 +650,20 @@
 inline void VM::updateStackLimit()
 {
 #if PLATFORM(WIN)
-    void* lastJSCPUStackLimit = m_jsCPUStackLimit;
+    void* lastOSStackLimitWithReserve = m_osStackLimitWithReserve;
 #endif
 
     if (m_stackPointerAtVMEntry) {
         ASSERT(wtfThreadData().stack().isGrowingDownward());
         char* startOfStack = reinterpret_cast<char*>(m_stackPointerAtVMEntry);
-        m_jsCPUStackLimit = wtfThreadData().stack().recursionLimit(startOfStack, Options::maxPerThreadStackUsage(), m_reservedZoneSize);
+        m_osStackLimitWithReserve = wtfThreadData().stack().recursionLimit(startOfStack, Options::maxPerThreadStackUsage(), m_reservedZoneSize);
     } else {
-        m_jsCPUStackLimit = wtfThreadData().stack().recursionLimit(m_reservedZoneSize);
+        m_osStackLimitWithReserve = wtfThreadData().stack().recursionLimit(m_reservedZoneSize);
     }
 
 #if PLATFORM(WIN)
-    if (lastJSCPUStackLimit != m_jsCPUStackLimit)
-        preCommitStackMemory(m_jsCPUStackLimit);
+    if (lastOSStackLimitWithReserve != m_osStackLimitWithReserve)
+        preCommitStackMemory(m_osStackLimitWithReserve);
 #endif
 }
 

Modified: trunk/Source/_javascript_Core/runtime/VM.h (202991 => 202992)


--- trunk/Source/_javascript_Core/runtime/VM.h	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/runtime/VM.h	2016-07-08 17:54:38 UTC (rev 202992)
@@ -461,11 +461,11 @@
     size_t reservedZoneSize() const { return m_reservedZoneSize; }
     size_t updateReservedZoneSize(size_t reservedZoneSize);
 
-    void* jsCPUStackLimit() { return m_jsCPUStackLimit; }
-    void** addressOfJSCPUStackLimit() { return &m_jsCPUStackLimit; }
+    void* osStackLimitWithReserve() { return m_osStackLimitWithReserve; }
+    void** addressOfOSStackLimitWithReserve() { return &m_osStackLimitWithReserve; }
 #if !ENABLE(JIT)
-    void* jsEmulatedStackLimit() { return m_jsEmulatedStackLimit; }
-    void setJSEmulatedStackLimit(void* limit) { m_jsEmulatedStackLimit = limit; }
+    void* cloopStackLimit() { return m_cloopStackLimit; }
+    void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; }
 #endif
 
     bool isSafeToRecurse(size_t neededStackInBytes = 0) const
@@ -472,7 +472,7 @@
     {
         ASSERT(wtfThreadData().stack().isGrowingDownward());
         int8_t* curr = reinterpret_cast<int8_t*>(&curr);
-        int8_t* limit = reinterpret_cast<int8_t*>(m_jsCPUStackLimit);
+        int8_t* limit = reinterpret_cast<int8_t*>(m_osStackLimitWithReserve);
         return curr >= limit && static_cast<size_t>(curr - limit) >= neededStackInBytes;
     }
 
@@ -645,17 +645,9 @@
 
     void* m_stackPointerAtVMEntry;
     size_t m_reservedZoneSize;
-#if ENABLE(JIT)
-    union {
-        void* m_jsCPUStackLimit { nullptr };
-        void* m_llintStackLimit;
-    };
-#else
-    void* m_jsCPUStackLimit { nullptr };
-    union {
-        void* m_jsEmulatedStackLimit { nullptr };
-        void* m_llintStackLimit;
-    };
+    void* m_osStackLimitWithReserve { nullptr };
+#if !ENABLE(JIT)
+    void* m_cloopStackLimit { nullptr };
 #endif
     void* m_lastStackTop;
 

Modified: trunk/Source/_javascript_Core/wasm/WASMFunctionCompiler.h (202991 => 202992)


--- trunk/Source/_javascript_Core/wasm/WASMFunctionCompiler.h	2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/_javascript_Core/wasm/WASMFunctionCompiler.h	2016-07-08 17:54:38 UTC (rev 202992)
@@ -135,7 +135,7 @@
         m_beginLabel = label();
 
         addPtr(TrustedImm32(-m_calleeSaveSpace - WTF::roundUpToMultipleOf(stackAlignmentRegisters(), m_stackHeight) * sizeof(StackSlot) - maxFrameExtentForSlowPathCall), GPRInfo::callFrameRegister, GPRInfo::regT1);
-        m_stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfJSCPUStackLimit()), GPRInfo::regT1);
+        m_stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
 
         move(GPRInfo::regT1, stackPointerRegister);
         checkStackPointerAlignment();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to