Commit 29914b6b authored by whesse@chromium.org's avatar whesse@chromium.org

Remove --check-stack flag from V8.

Review URL: http://codereview.chromium.org/338017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 299a491d
......@@ -1122,7 +1122,6 @@ void CodeGenerator::Branch(bool if_true, JumpTarget* target) {
void CodeGenerator::CheckStack() {
VirtualFrame::SpilledScope spilled_scope;
if (FLAG_check_stack) {
Comment cmnt(masm_, "[ check stack");
__ LoadRoot(ip, Heap::kStackLimitRootIndex);
// Put the lr setup instruction in the delay slot. kInstrSize is added to
......@@ -1137,7 +1136,6 @@ void CodeGenerator::CheckStack() {
RelocInfo::CODE_TARGET),
LeaveCC,
lo);
}
}
......
......@@ -63,15 +63,13 @@ void FastCodeGenerator::Generate(FunctionLiteral* fun) {
if (locals_count > 0) {
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
}
if (FLAG_check_stack) {
__ LoadRoot(r2, Heap::kStackLimitRootIndex);
}
for (int i = 0; i < locals_count; i++) {
__ push(ip);
}
}
if (FLAG_check_stack) {
// Check the stack for overflow or break request.
// Put the lr setup instruction in the delay slot. The kInstrSize is
// added to the implicit 8 byte offset that always applies to operations
// with pc and gives a return address 12 bytes down.
......@@ -84,7 +82,6 @@ void FastCodeGenerator::Generate(FunctionLiteral* fun) {
RelocInfo::CODE_TARGET),
LeaveCC,
lo);
}
{ Comment cmnt(masm_, "[ Declarations");
VisitDeclarations(fun->scope()->declarations());
......
......@@ -1100,14 +1100,12 @@ void RegExpMacroAssemblerARM::CheckPreemption() {
void RegExpMacroAssemblerARM::CheckStackLimit() {
if (FLAG_check_stack) {
ExternalReference stack_limit =
ExternalReference::address_of_regexp_stack_limit();
__ mov(r0, Operand(stack_limit));
__ ldr(r0, MemOperand(r0));
__ cmp(backtrack_stackpointer(), Operand(r0));
SafeCall(&stack_overflow_label_, ls);
}
}
......
......@@ -146,13 +146,11 @@ void VirtualFrame::AllocateStackSlots() {
// Initialize stack slots with 'undefined' value.
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
}
if (FLAG_check_stack) {
__ LoadRoot(r2, Heap::kStackLimitRootIndex);
}
for (int i = 0; i < count; i++) {
__ push(ip);
}
if (FLAG_check_stack) {
// Check the stack for overflow or a break request.
// Put the lr setup instruction in the delay slot. The kInstrSize is added
// to the implicit 8 byte offset that always applies to operations with pc
// and gives a return address 12 bytes down.
......@@ -165,10 +163,10 @@ void VirtualFrame::AllocateStackSlots() {
RelocInfo::CODE_TARGET),
LeaveCC,
lo);
}
}
void VirtualFrame::SaveContextRegister() {
UNIMPLEMENTED();
}
......
......@@ -132,8 +132,6 @@ DEFINE_bool(stack_trace_on_abort, true,
// codegen-ia32.cc / codegen-arm.cc
DEFINE_bool(trace, false, "trace function calls")
DEFINE_bool(defer_negation, true, "defer negation operation")
DEFINE_bool(check_stack, true,
"check stack for overflow, interrupt, breakpoint")
// codegen.cc
DEFINE_bool(lazy, true, "use lazy compilation")
......
......@@ -520,7 +520,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
__ push(Operand(ebp, 2 * kPointerSize)); // push arguments
__ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION);
if (FLAG_check_stack) {
// Check the stack for overflow or a break request.
// We need to catch preemptions right here, otherwise an unlucky preemption
// could show up as a failed apply.
ExternalReference stack_guard_limit =
......@@ -561,7 +561,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
__ push(eax);
__ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION);
__ bind(&okay);
}
// End of stack check.
// Push current index and limit.
const int kLimitOffset =
......
......@@ -2203,14 +2203,12 @@ void DeferredStackCheck::Generate() {
void CodeGenerator::CheckStack() {
if (FLAG_check_stack) {
DeferredStackCheck* deferred = new DeferredStackCheck;
ExternalReference stack_guard_limit =
ExternalReference::address_of_stack_guard_limit();
__ cmp(esp, Operand::StaticVariable(stack_guard_limit));
deferred->Branch(below);
deferred->BindExit();
}
}
......
......@@ -1093,7 +1093,6 @@ void RegExpMacroAssemblerIA32::CheckPreemption() {
void RegExpMacroAssemblerIA32::CheckStackLimit() {
if (FLAG_check_stack) {
Label no_stack_overflow;
ExternalReference stack_limit =
ExternalReference::address_of_regexp_stack_limit();
......@@ -1103,7 +1102,6 @@ void RegExpMacroAssemblerIA32::CheckStackLimit() {
SafeCall(&stack_overflow_label_);
__ bind(&no_stack_overflow);
}
}
......
......@@ -318,7 +318,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
__ push(Operand(rbp, kArgumentsOffset));
__ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION);
if (FLAG_check_stack) {
// Check the stack for overflow or a break request.
// We need to catch preemptions right here, otherwise an unlucky preemption
// could show up as a failed apply.
Label retry_preemption;
......@@ -358,7 +358,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
__ push(rax);
__ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION);
__ bind(&okay);
}
// End of stack check.
// Push current index and limit.
const int kLimitOffset =
......
......@@ -852,12 +852,10 @@ void DeferredStackCheck::Generate() {
void CodeGenerator::CheckStack() {
if (FLAG_check_stack) {
DeferredStackCheck* deferred = new DeferredStackCheck;
__ CompareRoot(rsp, Heap::kStackLimitRootIndex);
deferred->Branch(below);
deferred->BindExit();
}
}
......
......@@ -1209,7 +1209,6 @@ void RegExpMacroAssemblerX64::CheckPreemption() {
void RegExpMacroAssemblerX64::CheckStackLimit() {
if (FLAG_check_stack) {
Label no_stack_overflow;
ExternalReference stack_limit =
ExternalReference::address_of_regexp_stack_limit();
......@@ -1220,7 +1219,6 @@ void RegExpMacroAssemblerX64::CheckStackLimit() {
SafeCall(&stack_overflow_label_);
__ bind(&no_stack_overflow);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment