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..31cd10c7288eaca8fb4f8fd64c20b0af4b5f9967 100644 |
--- a/runtime/vm/stub_code_arm.cc |
+++ b/runtime/vm/stub_code_arm.cc |
@@ -1712,7 +1712,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); |
@@ -1721,8 +1722,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. |
__ mov(FP, Operand(R2)); // Frame_pointer. |
__ mov(SP, Operand(IP)); // Stack pointer. |
siva
2014/07/14 20:13:12
The comment here is confusing, stack pointer is be
Cutch
2014/07/14 21:32:08
I've cleaned up the comments to make it more clear
|
+ // 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()); |
siva
2014/07/14 20:13:12
Not sure if using CTX like this is a good idea it
Cutch
2014/07/14 21:32:08
AFAIK Setting CTX is not part of the contract of j
|
__ bx(LR); // Jump to the exception handler code. |
} |