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

Unified Diff: src/arm64/builtins-arm64.cc

Issue 1360953003: [runtime] Remove weird pushing of something on StackOverflow. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test failures. Created 5 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 | « src/arm/builtins-arm.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/builtins-arm64.cc
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
index 53cf0eccbdd64470ff85ff63194596f740150859..afa3b077f1da228a2acfa44e2fca13e64013ca36 100644
--- a/src/arm64/builtins-arm64.cc
+++ b/src/arm64/builtins-arm64.cc
@@ -721,17 +721,13 @@ enum IsTagged { kArgcIsSmiTagged, kArgcIsUntaggedInt };
// Clobbers x10, x15; preserves all other registers.
-static void Generate_CheckStackOverflow(MacroAssembler* masm,
- const int calleeOffset, Register argc,
+static void Generate_CheckStackOverflow(MacroAssembler* masm, Register argc,
IsTagged argc_is_tagged) {
- Register function = x15;
-
// Check the stack for overflow.
// We are not trying to catch interruptions (e.g. debug break and
// preemption) here, so the "real stack limit" is checked.
Label enough_stack_space;
__ LoadRoot(x10, Heap::kRealStackLimitRootIndex);
- __ Ldr(function, MemOperand(fp, calleeOffset));
// Make x10 the space we have left. The stack might already be overflowed
// here which will cause x10 to become negative.
// TODO(jbramley): Check that the stack usage here is safe.
@@ -744,12 +740,6 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
__ Cmp(x10, Operand(argc, LSL, kPointerSizeLog2));
}
__ B(gt, &enough_stack_space);
- // There is not enough stack space, so use a builtin to throw an appropriate
- // error.
- if (argc_is_tagged == kArgcIsUntaggedInt) {
- __ SmiTag(argc);
- }
- __ Push(function, argc);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
// We should never return from the APPLY_OVERFLOW builtin.
if (__ emit_debug_code()) {
@@ -798,13 +788,8 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
__ Push(function, receiver);
// Check if we have enough stack space to push all arguments.
- // The function is the first thing that was pushed above after entering
- // the internal frame.
- const int kFunctionOffset =
- InternalFrameConstants::kCodeOffset - kPointerSize;
// Expects argument count in eax. Clobbers ecx, edx, edi.
- Generate_CheckStackOverflow(masm, kFunctionOffset, argc,
- kArgcIsUntaggedInt);
+ Generate_CheckStackOverflow(masm, argc, kArgcIsUntaggedInt);
// Copy arguments to the stack in a loop, in reverse order.
// x3: argc.
@@ -1395,7 +1380,7 @@ static void Generate_ApplyHelper(MacroAssembler* masm, bool targetIsArgument) {
}
Register argc = x0;
- Generate_CheckStackOverflow(masm, kFunctionOffset, argc, kArgcIsSmiTagged);
+ Generate_CheckStackOverflow(masm, argc, kArgcIsSmiTagged);
// Push current limit, index and receiver.
__ Mov(x1, 0); // Initial index.
@@ -1466,7 +1451,7 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
CALL_FUNCTION);
Register argc = x0;
- Generate_CheckStackOverflow(masm, kFunctionOffset, argc, kArgcIsSmiTagged);
+ Generate_CheckStackOverflow(masm, argc, kArgcIsSmiTagged);
// Push current limit and index & constructor function as callee.
__ Mov(x1, 0); // Initial index.
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698