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

Unified Diff: runtime/vm/stub_code_arm64.cc

Issue 396463003: 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
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index d6c165ff3de002cfe4784dcf2b369ef414b1b328..ace945e080d4f231b05f73519bd2233667df0975 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -1795,6 +1795,7 @@ void StubCode::GenerateGetStackPointerStub(Assembler* assembler) {
// R2: frame_pointer.
// R3: error object.
// R4: address of stacktrace object.
+// R5: isolate.
// Does not return.
void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
ASSERT(kExceptionObjectReg == R0);
@@ -1804,6 +1805,12 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
__ mov(FP, R2); // Frame_pointer.
__ mov(R0, R3); // Exception object.
__ mov(R1, R4); // StackTrace object.
+ __ mov(CTX, R5); // Isolate.
regis 2014/07/14 20:00:34 Why not use R5 below?
Cutch 2014/07/14 21:32:07 Done.
+ // Set the tag.
+ __ LoadImmediate(R2, VMTag::kScriptTagId, kNoPP);
+ __ StoreToOffset(R2, CTX, Isolate::vm_tag_offset(), kNoPP);
+ // Clear top exit frame.
+ __ StoreToOffset(ZR, CTX, Isolate::top_exit_frame_info_offset(), kNoPP);
__ ret(); // Jump to the exception handler code.
}

Powered by Google App Engine
This is Rietveld 408576698