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

Unified Diff: runtime/vm/stub_code_arm.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.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 0ccfd17aa858d38a0d2d413a743266e5eb3334f5..934653948fd0d09a62703c42d57aafe0f2267b96 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -1712,17 +1712,25 @@ void StubCode::GenerateGetStackPointerStub(Assembler* assembler) {
// R1: stack_pointer.
// R2: frame_pointer.
// R3: error object.
-// SP: address of stacktrace object.
+// SP + 0: address of stacktrace object.
+// SP + 4: isolate
// Does not return.
void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
ASSERT(kExceptionObjectReg == R0);
ASSERT(kStackTraceObjectReg == R1);
- __ mov(IP, Operand(R1)); // Stack pointer.
+ __ mov(IP, Operand(R1)); // Copy Stack pointer into IP.
__ mov(LR, Operand(R0)); // Program counter.
__ mov(R0, Operand(R3)); // Exception object.
__ ldr(R1, Address(SP, 0)); // StackTrace object.
+ __ ldr(R3, Address(SP, 4)); // Isolate.
__ mov(FP, Operand(R2)); // Frame_pointer.
- __ mov(SP, Operand(IP)); // Stack pointer.
+ __ mov(SP, Operand(IP)); // Set Stack pointer.
+ // Set the tag.
+ __ LoadImmediate(R2, VMTag::kScriptTagId);
+ __ StoreToOffset(kWord, R2, R3, Isolate::vm_tag_offset());
+ // Clear top exit frame.
+ __ LoadImmediate(R2, 0);
+ __ StoreToOffset(kWord, R2, R3, Isolate::top_exit_frame_info_offset());
__ bx(LR); // Jump to the exception handler code.
}
« no previous file with comments | « runtime/vm/stub_code.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698