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

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 395233002: Move some isolate state setup from C++ code to JumpToExceptionHandler stub (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_mips.cc
diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
index 62d3b6787c1daca2e6dd1abbb488751d7bfab1a2..db6ca354a5e4e9106bc97f6a75f2a34e1d0151a3 100644
--- a/runtime/vm/stub_code_mips.cc
+++ b/runtime/vm/stub_code_mips.cc
@@ -1929,6 +1929,7 @@ void StubCode::GenerateGetStackPointerStub(Assembler* assembler) {
// A2: frame_pointer.
// A3: error object.
// SP + 4*kWordSize: address of stacktrace object.
+// SP + 5*kWordSize: address of isolate.
// Does not return.
void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
ASSERT(kExceptionObjectReg == V0);
@@ -1938,6 +1939,13 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
// the last of five arguments, so it is first pushed on the stack.
__ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object.
__ mov(FP, A2); // Frame_pointer.
+ __ lw(A3, Address(SP, 5 * kWordSize)); // Isolate.
+ // Set tag.
+ __ LoadImmediate(A2, VMTag::kScriptTagId);
+ __ sw(A2, Address(A3, Isolate::vm_tag_offset()));
+ // Clear top exit frame.
+ __ sw(ZR, Address(A3, Isolate::top_exit_frame_info_offset()));
+
__ jr(A0); // Jump to the exception handler code.
__ delay_slot()->mov(SP, A1); // Stack pointer.
}
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698