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

Unified Diff: src/mips64/code-stubs-mips64.cc

Issue 988463002: MIPS: [turbofan] Implement throwing exceptions into TurboFan code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/code-stubs-mips64.cc
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
index a9f04dffc59eeef68bb110323ed7c59f4b896969..9127f99ea383186505df9458426cfb95e10173ac 100644
--- a/src/mips64/code-stubs-mips64.cc
+++ b/src/mips64/code-stubs-mips64.cc
@@ -5081,7 +5081,6 @@ static void CallApiFunctionAndReturn(
}
Label promote_scheduled_exception;
- Label exception_handled;
Label delete_allocated_handles;
Label leave_exit_frame;
Label return_value_loaded;
@@ -5102,13 +5101,8 @@ static void CallApiFunctionAndReturn(
__ ld(at, MemOperand(s3, kLimitOffset));
__ Branch(&delete_allocated_handles, ne, s1, Operand(at));
- // Check if the function scheduled an exception.
+ // Leave the API exit frame.
__ bind(&leave_exit_frame);
- __ LoadRoot(a4, Heap::kTheHoleValueRootIndex);
- __ li(at, Operand(ExternalReference::scheduled_exception_address(isolate)));
- __ ld(a5, MemOperand(at));
- __ Branch(&promote_scheduled_exception, ne, a4, Operand(a5));
- __ bind(&exception_handled);
bool restore_context = context_restore_operand != NULL;
if (restore_context) {
@@ -5120,15 +5114,20 @@ static void CallApiFunctionAndReturn(
} else {
__ li(s0, Operand(stack_space));
}
- __ LeaveExitFrame(false, s0, !restore_context, EMIT_RETURN,
+ __ LeaveExitFrame(false, s0, !restore_context, NO_EMIT_RETURN,
stack_space_offset != kInvalidStackOffset);
+
+ // Check if the function scheduled an exception.
+ __ LoadRoot(a4, Heap::kTheHoleValueRootIndex);
+ __ li(at, Operand(ExternalReference::scheduled_exception_address(isolate)));
+ __ ld(a5, MemOperand(at));
+ __ Branch(&promote_scheduled_exception, ne, a4, Operand(a5));
+
+ __ Ret();
+
+ // Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
- {
- FrameScope frame(masm, StackFrame::INTERNAL);
- __ CallExternalReference(
- ExternalReference(Runtime::kPromoteScheduledException, isolate), 0);
- }
- __ jmp(&exception_handled);
+ __ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698