From ee86a749bf0db6c749b4487fc50fe763f73c7f39 Mon Sep 17 00:00:00 2001 From: "chunyang.dai" Date: Tue, 15 Sep 2015 04:31:13 -0700 Subject: [PATCH] X87: [builtins] Remove the weird STACK_OVERFLOW builtin. port 39604dda567b9ba9f4dcfe42f95471f30ec7cb6b (r30693). original commit message: Just use a %ThrowStackOverflow runtime function instead, which does the trick, especially since the Isolate already has a preallocated StackOverflow error for that. BUG= Review URL: https://codereview.chromium.org/1344793002 Cr-Commit-Position: refs/heads/master@{#30741} --- src/full-codegen/x87/full-codegen-x87.cc | 2 +- src/x87/builtins-x87.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc index f5d2adc..bd083ad 100644 --- a/src/full-codegen/x87/full-codegen-x87.cc +++ b/src/full-codegen/x87/full-codegen-x87.cc @@ -150,7 +150,7 @@ void FullCodeGenerator::Generate() { ExternalReference::address_of_real_stack_limit(isolate()); __ cmp(ecx, Operand::StaticVariable(stack_limit)); __ j(above_equal, &ok, Label::kNear); - __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); + __ CallRuntime(Runtime::kThrowStackOverflow, 0); __ bind(&ok); } __ mov(eax, Immediate(isolate()->factory()->undefined_value())); diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc index f955c81..745a416 100644 --- a/src/x87/builtins-x87.cc +++ b/src/x87/builtins-x87.cc @@ -522,7 +522,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm, __ SmiTag(eax); } __ push(eax); - __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); + __ CallRuntime(Runtime::kThrowStackOverflow, 0); __ bind(&okay); } @@ -660,7 +660,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { ExternalReference::address_of_real_stack_limit(masm->isolate()); __ cmp(ecx, Operand::StaticVariable(stack_limit)); __ j(above_equal, &ok); - __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); + __ CallRuntime(Runtime::kThrowStackOverflow, 0); __ bind(&ok); // If ok, push undefined as the initial value for all register file entries. @@ -1699,7 +1699,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { { FrameScope frame(masm, StackFrame::MANUAL); EnterArgumentsAdaptorFrame(masm); - __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); + __ CallRuntime(Runtime::kThrowStackOverflow, 0); __ int3(); } } -- 2.7.4