Commit 1a4da971 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Stack checks in generated code for function apply is now controlled

by the check-stack flag. Changed the condition code from greater to
above_equal as the SP should be unsigned (this matches the stack
check in function entry).
Review URL: http://codereview.chromium.org/4296

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0b02000d
...@@ -517,6 +517,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { ...@@ -517,6 +517,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Eagerly check for stack-overflow before pushing all the arguments // Eagerly check for stack-overflow before pushing all the arguments
// to the stack. // to the stack.
if (FLAG_check_stack) {
Label okay; Label okay;
__ lea(ecx, Operand(esp, -3 * kPointerSize)); // receiver, limit, index __ lea(ecx, Operand(esp, -3 * kPointerSize)); // receiver, limit, index
__ mov(edx, Operand(eax)); __ mov(edx, Operand(eax));
...@@ -532,6 +533,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { ...@@ -532,6 +533,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
__ push(eax); __ push(eax);
__ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION); __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION);
__ bind(&okay); __ bind(&okay);
}
// Push current index and limit. // Push current index and limit.
const int kLimitOffset = const int kLimitOffset =
......
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