Diff
Modified: trunk/Source/_javascript_Core/API/tests/PingPongStackOverflowTest.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/API/tests/PingPongStackOverflowTest.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/API/tests/PingPongStackOverflowTest.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -120,13 +120,13 @@
JSC::initializeThreading();
Options::initialize(); // Ensure options is initialized first.
+ auto origSoftReservedZoneSize = Options::softReservedZoneSize();
auto origReservedZoneSize = Options::reservedZoneSize();
- auto origErrorModeReservedZoneSize = Options::errorModeReservedZoneSize();
auto origUseLLInt = Options::useLLInt();
auto origMaxPerThreadStackUsage = Options::maxPerThreadStackUsage();
- Options::reservedZoneSize() = 128 * KB;
- Options::errorModeReservedZoneSize() = 64 * KB;
+ Options::softReservedZoneSize() = 128 * KB;
+ Options::reservedZoneSize() = 64 * KB;
#if ENABLE(JIT)
// Normally, we want to disable the LLINT to force the use of JITted code which is necessary for
// reproducing the regression in https://bugs.webkit.org/show_bug.cgi?id=148749. However, we only
@@ -158,7 +158,7 @@
JSStringRelease(PingPongStackOverflowObjectString);
unsigned stackSize = 32 * KB;
- Options::maxPerThreadStackUsage() = stackSize + Options::reservedZoneSize();
+ Options::maxPerThreadStackUsage() = stackSize + Options::softReservedZoneSize();
exception = nullptr;
scriptResult = JSEvaluateScript(context, script, nullptr, nullptr, 1, &exception);
@@ -173,8 +173,8 @@
printf("PASS: PingPongStackOverflow test.\n");
}
+ Options::softReservedZoneSize() = origSoftReservedZoneSize;
Options::reservedZoneSize() = origReservedZoneSize;
- Options::errorModeReservedZoneSize() = origErrorModeReservedZoneSize;
Options::useLLInt() = origUseLLInt;
Options::maxPerThreadStackUsage() = origMaxPerThreadStackUsage;
Modified: trunk/Source/_javascript_Core/ChangeLog (203129 => 203130)
--- trunk/Source/_javascript_Core/ChangeLog 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-07-12 22:06:20 UTC (rev 203130)
@@ -1,3 +1,73 @@
+2016-07-12 Mark Lam <[email protected]>
+
+ 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):
+
2016-07-12 Gyuyoung Kim <[email protected]>
Remove ENABLE_CSS3_TEXT_LINE_BREAK flag
Modified: trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -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->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
+ Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), 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->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
+ Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), 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 (203129 => 203130)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -189,7 +189,7 @@
// Stack Overflow Check.
unsigned exitFrameSize = m_graph.requiredRegisterCountForExit() * sizeof(Register);
- MacroAssembler::AbsoluteAddress addressOfStackLimit(vm().addressOfOSStackLimitWithReserve());
+ MacroAssembler::AbsoluteAddress addressOfStackLimit(vm().addressOfSoftStackLimit());
PatchpointValue* stackOverflowHandler = m_out.patchpoint(Void);
CallSiteIndex callSiteIndex = callSiteIndexForCodeOrigin(m_ftlState, CodeOrigin(0));
stackOverflowHandler->appendSomeRegister(m_callFrame);
Modified: trunk/Source/_javascript_Core/interpreter/CLoopStack.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/interpreter/CLoopStack.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/interpreter/CLoopStack.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -54,7 +54,7 @@
: m_vm(vm)
, m_topCallFrame(vm.topCallFrame)
, m_end(0)
- , m_reservedZoneSizeInRegisters(0)
+ , m_softReservedZoneSizeInRegisters(0)
{
size_t capacity = Options::maxPerThreadStackUsage();
ASSERT(capacity && isPageAligned(capacity));
@@ -78,7 +78,7 @@
bool CLoopStack::grow(Register* newTopOfStack)
{
- Register* newTopOfStackWithReservedZone = newTopOfStack - m_reservedZoneSizeInRegisters;
+ Register* newTopOfStackWithReservedZone = newTopOfStack - m_softReservedZoneSizeInRegisters;
// If we have already committed enough memory to satisfy this request,
// just update the end pointer and return.
@@ -126,7 +126,7 @@
void CLoopStack::releaseExcessCapacity()
{
- Register* highAddressWithReservedZone = highAddress() - m_reservedZoneSizeInRegisters;
+ Register* highAddressWithReservedZone = highAddress() - m_softReservedZoneSizeInRegisters;
ptrdiff_t delta = reinterpret_cast<char*>(highAddressWithReservedZone) - reinterpret_cast<char*>(m_commitTop);
m_reservation.decommit(m_commitTop, delta);
addToCommittedByteCount(-delta);
@@ -140,10 +140,10 @@
committedBytesCount += byteCount;
}
-void CLoopStack::setReservedZoneSize(size_t reservedZoneSize)
+void CLoopStack::setSoftReservedZoneSize(size_t reservedZoneSize)
{
- m_reservedZoneSizeInRegisters = reservedZoneSize / sizeof(Register);
- if (m_commitTop >= (m_end + 1) - m_reservedZoneSizeInRegisters)
+ m_softReservedZoneSizeInRegisters = reservedZoneSize / sizeof(Register);
+ if (m_commitTop >= (m_end + 1) - m_softReservedZoneSizeInRegisters)
grow(m_end + 1);
}
Modified: trunk/Source/_javascript_Core/interpreter/CLoopStack.h (203129 => 203130)
--- trunk/Source/_javascript_Core/interpreter/CLoopStack.h 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/interpreter/CLoopStack.h 2016-07-12 22:06:20 UTC (rev 203130)
@@ -67,7 +67,7 @@
size_t size() const { return highAddress() - lowAddress(); }
- void setReservedZoneSize(size_t);
+ void setSoftReservedZoneSize(size_t);
inline Register* topOfStack();
@@ -104,7 +104,7 @@
Register* m_commitTop;
PageReservation m_reservation;
Register* m_lastStackTop;
- ptrdiff_t m_reservedZoneSizeInRegisters;
+ ptrdiff_t m_softReservedZoneSizeInRegisters;
friend class LLIntOffsetsExtractor;
};
Modified: trunk/Source/_javascript_Core/interpreter/CLoopStackInlines.h (203129 => 203130)
--- trunk/Source/_javascript_Core/interpreter/CLoopStackInlines.h 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/interpreter/CLoopStackInlines.h 2016-07-12 22:06:20 UTC (rev 203130)
@@ -64,7 +64,7 @@
// 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.
ptrdiff_t maxExcessCapacity = CLoopStack::maxExcessCapacity;
- ptrdiff_t maxExcessInRegisters = std::max(maxExcessCapacity, m_reservedZoneSizeInRegisters);
+ ptrdiff_t maxExcessInRegisters = std::max(maxExcessCapacity, m_softReservedZoneSizeInRegisters);
if (m_end == baseOfStack() && (highAddress() - m_commitTop) >= maxExcessInRegisters)
releaseExcessCapacity();
}
Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/jit/JIT.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -599,7 +599,7 @@
}
addPtr(TrustedImm32(stackPointerOffsetFor(m_codeBlock) * sizeof(Register)), callFrameRegister, regT1);
- Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfOSStackLimitWithReserve()), regT1);
+ Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), regT1);
move(regT1, stackPointerRegister);
checkStackPointerAlignment();
Modified: trunk/Source/_javascript_Core/jit/SetupVarargsFrame.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/jit/SetupVarargsFrame.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/jit/SetupVarargsFrame.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -82,7 +82,7 @@
emitSetVarargsFrame(jit, scratchGPR1, true, numUsedSlotsGPR, scratchGPR2);
- slowCase.append(jit.branchPtr(CCallHelpers::Above, CCallHelpers::AbsoluteAddress(jit.vm()->addressOfOSStackLimitWithReserve()), scratchGPR2));
+ slowCase.append(jit.branchPtr(CCallHelpers::Above, CCallHelpers::AbsoluteAddress(jit.vm()->addressOfSoftStackLimit()), scratchGPR2));
// Initialize ArgumentCount.
jit.store32(scratchGPR1, CCallHelpers::Address(scratchGPR2, CallFrameSlot::argumentCount * static_cast<int>(sizeof(Register)) + PayloadOffset));
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -483,7 +483,7 @@
dataLogF("Num vars = %u.\n", exec->codeBlock()->m_numVars);
#if ENABLE(JIT)
- dataLogF("Current end is at %p.\n", exec->vm().osStackLimitWithReserve());
+ dataLogF("Current end is at %p.\n", exec->vm().softStackLimit());
#else
dataLogF("Current end is at %p.\n", exec->vm().cloopStackLimit());
#endif
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (203129 => 203130)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2016-07-12 22:06:20 UTC (rev 203130)
@@ -954,7 +954,7 @@
if C_LOOP
bpbeq VM::m_cloopStackLimit[t2], t0, .stackHeightOK
else
- bpbeq VM::m_osStackLimitWithReserve[t2], t0, .stackHeightOK
+ bpbeq VM::m_softStackLimit[t2], t0, .stackHeightOK
end
# Stack height check failed - need to call a slow_path.
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (203129 => 203130)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2016-07-12 22:06:20 UTC (rev 203130)
@@ -155,7 +155,7 @@
if C_LOOP
bpaeq t3, VM::m_cloopStackLimit[vm], .stackHeightOK
else
- bpaeq t3, VM::m_osStackLimitWithReserve[vm], .stackHeightOK
+ bpaeq t3, VM::m_softStackLimit[vm], .stackHeightOK
end
if C_LOOP
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (203129 => 203130)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2016-07-12 22:06:20 UTC (rev 203130)
@@ -143,7 +143,7 @@
if C_LOOP
bpaeq t3, VM::m_cloopStackLimit[vm], .stackHeightOK
else
- bpaeq t3, VM::m_osStackLimitWithReserve[vm], .stackHeightOK
+ bpaeq t3, VM::m_softStackLimit[vm], .stackHeightOK
end
if C_LOOP
Modified: trunk/Source/_javascript_Core/runtime/ErrorHandlingScope.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/runtime/ErrorHandlingScope.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/runtime/ErrorHandlingScope.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -35,14 +35,14 @@
: m_vm(vm)
{
RELEASE_ASSERT(m_vm.stackPointerAtVMEntry());
- size_t newReservedZoneSize = Options::errorModeReservedZoneSize();
- m_savedReservedZoneSize = m_vm.updateReservedZoneSize(newReservedZoneSize);
+ size_t newSoftReservedZoneSize = Options::reservedZoneSize();
+ m_savedSoftReservedZoneSize = m_vm.updateSoftReservedZoneSize(newSoftReservedZoneSize);
}
ErrorHandlingScope::~ErrorHandlingScope()
{
RELEASE_ASSERT(m_vm.stackPointerAtVMEntry());
- m_vm.updateReservedZoneSize(m_savedReservedZoneSize);
+ m_vm.updateSoftReservedZoneSize(m_savedSoftReservedZoneSize);
}
} // namespace JSC
Modified: trunk/Source/_javascript_Core/runtime/ErrorHandlingScope.h (203129 => 203130)
--- trunk/Source/_javascript_Core/runtime/ErrorHandlingScope.h 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/runtime/ErrorHandlingScope.h 2016-07-12 22:06:20 UTC (rev 203130)
@@ -36,7 +36,7 @@
JS_EXPORT_PRIVATE ~ErrorHandlingScope();
private:
VM& m_vm;
- size_t m_savedReservedZoneSize;
+ size_t m_savedSoftReservedZoneSize;
};
} // namespace JSC
Modified: trunk/Source/_javascript_Core/runtime/Options.h (203129 => 203130)
--- trunk/Source/_javascript_Core/runtime/Options.h 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/runtime/Options.h 2016-07-12 22:06:20 UTC (rev 203130)
@@ -112,9 +112,9 @@
\
v(bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \
\
- v(unsigned, maxPerThreadStackUsage, 4 * MB, Normal, nullptr) \
- v(unsigned, reservedZoneSize, 128 * KB, Normal, nullptr) \
- v(unsigned, errorModeReservedZoneSize, 64 * KB, Normal, nullptr) \
+ v(unsigned, maxPerThreadStackUsage, 4 * MB, Normal, "Max allowed stack usage by the VM") \
+ v(unsigned, softReservedZoneSize, 128 * KB, Normal, "The amount of stack JSC usually reserves for host code.") \
+ v(unsigned, reservedZoneSize, 64 * KB, Normal, "This is the amount of stack JSC guarantees for client and VM code.") \
\
v(bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \
v(unsigned, jitMemoryReservationSize, 0, Normal, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \
Modified: trunk/Source/_javascript_Core/runtime/RegExp.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/runtime/RegExp.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/runtime/RegExp.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -222,7 +222,7 @@
void RegExp::finishCreation(VM& vm)
{
Base::finishCreation(vm);
- Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm.osStackLimitWithReserve());
+ Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm.softStackLimit());
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->osStackLimitWithReserve());
+ Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->softStackLimit());
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->osStackLimitWithReserve());
+ Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm->softStackLimit());
if (m_constructionError) {
RELEASE_ASSERT_NOT_REACHED();
#if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (203129 => 203130)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2016-07-12 22:06:20 UTC (rev 203130)
@@ -197,7 +197,7 @@
{
interpreter = new Interpreter(*this);
StackBounds stack = wtfThreadData().stack();
- updateReservedZoneSize(Options::reservedZoneSize());
+ updateSoftReservedZoneSize(Options::softReservedZoneSize());
setLastStackTop(stack.origin());
// Need to be careful to keep everything consistent here
@@ -613,17 +613,17 @@
updateStackLimit();
}
-size_t VM::updateReservedZoneSize(size_t reservedZoneSize)
+size_t VM::updateSoftReservedZoneSize(size_t softReservedZoneSize)
{
- size_t oldReservedZoneSize = m_reservedZoneSize;
- m_reservedZoneSize = reservedZoneSize;
+ size_t oldSoftReservedZoneSize = m_currentSoftReservedZoneSize;
+ m_currentSoftReservedZoneSize = softReservedZoneSize;
#if !ENABLE(JIT)
- interpreter->cloopStack().setReservedZoneSize(reservedZoneSize);
+ interpreter->cloopStack().setSoftReservedZoneSize(softReservedZoneSize);
#endif
updateStackLimit();
- return oldReservedZoneSize;
+ return oldSoftReservedZoneSize;
}
#if PLATFORM(WIN)
@@ -654,20 +654,20 @@
inline void VM::updateStackLimit()
{
#if PLATFORM(WIN)
- void* lastOSStackLimitWithReserve = m_osStackLimitWithReserve;
+ void* lastSoftStackLimit = m_softStackLimit;
#endif
if (m_stackPointerAtVMEntry) {
ASSERT(wtfThreadData().stack().isGrowingDownward());
char* startOfStack = reinterpret_cast<char*>(m_stackPointerAtVMEntry);
- m_osStackLimitWithReserve = wtfThreadData().stack().recursionLimit(startOfStack, Options::maxPerThreadStackUsage(), m_reservedZoneSize);
+ m_softStackLimit = wtfThreadData().stack().recursionLimit(startOfStack, Options::maxPerThreadStackUsage(), m_currentSoftReservedZoneSize);
} else {
- m_osStackLimitWithReserve = wtfThreadData().stack().recursionLimit(m_reservedZoneSize);
+ m_softStackLimit = wtfThreadData().stack().recursionLimit(m_currentSoftReservedZoneSize);
}
#if PLATFORM(WIN)
- if (lastOSStackLimitWithReserve != m_osStackLimitWithReserve)
- preCommitStackMemory(m_osStackLimitWithReserve);
+ if (lastSoftStackLimit != m_softStackLimit)
+ preCommitStackMemory(m_softStackLimit);
#endif
}
Modified: trunk/Source/_javascript_Core/runtime/VM.h (203129 => 203130)
--- trunk/Source/_javascript_Core/runtime/VM.h 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2016-07-12 22:06:20 UTC (rev 203130)
@@ -459,14 +459,14 @@
void* stackPointerAtVMEntry() const { return m_stackPointerAtVMEntry; }
void setStackPointerAtVMEntry(void*);
- size_t reservedZoneSize() const { return m_reservedZoneSize; }
- size_t updateReservedZoneSize(size_t reservedZoneSize);
+ size_t softReservedZoneSize() const { return m_currentSoftReservedZoneSize; }
+ size_t updateSoftReservedZoneSize(size_t softReservedZoneSize);
static size_t committedStackByteCount();
inline bool ensureStackCapacityFor(Register* newTopOfStack);
- void* osStackLimitWithReserve() { return m_osStackLimitWithReserve; }
- void** addressOfOSStackLimitWithReserve() { return &m_osStackLimitWithReserve; }
+ void* softStackLimit() { return m_softStackLimit; }
+ void** addressOfSoftStackLimit() { return &m_softStackLimit; }
#if !ENABLE(JIT)
void* cloopStackLimit() { return m_cloopStackLimit; }
void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; }
@@ -476,7 +476,7 @@
{
ASSERT(wtfThreadData().stack().isGrowingDownward());
int8_t* curr = reinterpret_cast<int8_t*>(&curr);
- int8_t* limit = reinterpret_cast<int8_t*>(m_osStackLimitWithReserve);
+ int8_t* limit = reinterpret_cast<int8_t*>(m_softStackLimit);
return curr >= limit && static_cast<size_t>(curr - limit) >= neededStackInBytes;
}
@@ -648,8 +648,8 @@
#endif
void* m_stackPointerAtVMEntry;
- size_t m_reservedZoneSize;
- void* m_osStackLimitWithReserve { nullptr };
+ size_t m_currentSoftReservedZoneSize;
+ void* m_softStackLimit { nullptr };
#if !ENABLE(JIT)
void* m_cloopStackLimit { nullptr };
#endif
Modified: trunk/Source/_javascript_Core/runtime/VMInlines.h (203129 => 203130)
--- trunk/Source/_javascript_Core/runtime/VMInlines.h 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/runtime/VMInlines.h 2016-07-12 22:06:20 UTC (rev 203130)
@@ -40,7 +40,7 @@
{
#if ENABLE(JIT)
ASSERT(wtfThreadData().stack().isGrowingDownward());
- return newTopOfStack >= m_osStackLimitWithReserve;
+ return newTopOfStack >= m_softStackLimit;
#else
return interpreter->cloopStack().ensureCapacityFor(newTopOfStack);
#endif
Modified: trunk/Source/_javascript_Core/wasm/WASMFunctionCompiler.h (203129 => 203130)
--- trunk/Source/_javascript_Core/wasm/WASMFunctionCompiler.h 2016-07-12 21:51:19 UTC (rev 203129)
+++ trunk/Source/_javascript_Core/wasm/WASMFunctionCompiler.h 2016-07-12 22:06:20 UTC (rev 203130)
@@ -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->addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
+ m_stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), GPRInfo::regT1);
move(GPRInfo::regT1, stackPointerRegister);
checkStackPointerAlignment();