Index: runtime/vm/stub_code_arm.cc |
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc |
index 3dbd41b90bc391519dc79c163357dd5a2455f796..e29b0d5cc9104f8665760d6569709062cc104aea 100644 |
--- a/runtime/vm/stub_code_arm.cc |
+++ b/runtime/vm/stub_code_arm.cc |
@@ -1685,7 +1685,8 @@ 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); |
@@ -1694,8 +1695,15 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
__ mov(LR, Operand(R0)); // Program counter. |
__ mov(R0, Operand(R3)); // Exception object. |
__ ldr(R1, Address(SP, 0)); // StackTrace object. |
+ __ ldr(CTX, Address(SP, 4)); // Isolate. |
regis
2014/07/14 20:00:34
Are you sure it is OK to trash the CTX register? I
Cutch
2014/07/14 21:32:07
Done.
|
__ mov(FP, Operand(R2)); // Frame_pointer. |
__ mov(SP, Operand(IP)); // Stack pointer. |
+ // Set the tag. |
+ __ LoadImmediate(R2, VMTag::kScriptTagId); |
+ __ StoreToOffset(kWord, R2, CTX, Isolate::vm_tag_offset()); |
+ // Clear top exit frame. |
+ __ LoadImmediate(R2, 0); |
+ __ StoreToOffset(kWord, R2, CTX, Isolate::top_exit_frame_info_offset()); |
__ bx(LR); // Jump to the exception handler code. |
} |