Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: src/builtins-ia32.cc

Issue 4296: Stack checks in generated code for function apply is now controlled... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins-ia32.cc
===================================================================
--- src/builtins-ia32.cc (revision 380)
+++ src/builtins-ia32.cc (working copy)
@@ -517,21 +517,23 @@
// Eagerly check for stack-overflow before pushing all the arguments
// to the stack.
- Label okay;
- __ lea(ecx, Operand(esp, -3 * kPointerSize)); // receiver, limit, index
- __ mov(edx, Operand(eax));
- __ shl(edx, kPointerSizeLog2 - kSmiTagSize);
- __ sub(ecx, Operand(edx));
- ExternalReference stack_guard_limit_address =
- ExternalReference::address_of_stack_guard_limit();
- __ cmp(ecx, Operand::StaticVariable(stack_guard_limit_address));
- __ j(greater, &okay, taken);
+ if (true && FLAG_check_stack) {
bak 2008/09/26 09:25:50 Please remove true &&. It does not add much.
Søren Thygesen Gjesse 2008/09/26 10:33:15 Sorry about that - testing leftover.
+ Label okay;
+ __ lea(ecx, Operand(esp, -3 * kPointerSize)); // receiver, limit, index
+ __ mov(edx, Operand(eax));
+ __ shl(edx, kPointerSizeLog2 - kSmiTagSize);
+ __ sub(ecx, Operand(edx));
+ ExternalReference stack_guard_limit_address =
+ ExternalReference::address_of_stack_guard_limit();
+ __ cmp(ecx, Operand::StaticVariable(stack_guard_limit_address));
+ __ j(above_equal, &okay, taken);
- // Too bad: Out of stack space.
- __ push(Operand(ebp, 4 * kPointerSize)); // push this
- __ push(eax);
- __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION);
- __ bind(&okay);
+ // Too bad: Out of stack space.
+ __ push(Operand(ebp, 4 * kPointerSize)); // push this
+ __ push(eax);
+ __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION);
+ __ bind(&okay);
+ }
// Push current index and limit.
const int kLimitOffset =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698