Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 99c3c22f8afb6fe3ca4154e6fe9b64d67685a70d..6ee5d15e5da536d8f807609be5c1045c089a2d7c 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -4493,14 +4493,55 @@ void FullCodeGenerator::EnterFinallyBlock() { |
ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
STATIC_ASSERT(kSmiTag == 0); |
__ add(r1, r1, Operand(r1)); // Convert to smi. |
+ |
+ // Store result register while executing finally block. |
+ __ push(r1); |
+ |
+ // Store pending message while executing finally block. |
+ ExternalReference pending_message_obj = |
+ ExternalReference::address_of_pending_message_obj(isolate()); |
+ __ mov(ip, Operand(pending_message_obj)); |
+ __ ldr(r1, MemOperand(ip)); |
+ __ push(r1); |
+ |
+ ExternalReference has_pending_message = |
+ ExternalReference::address_of_has_pending_message(isolate()); |
+ __ mov(ip, Operand(has_pending_message)); |
+ __ ldr(r1, MemOperand(ip)); |
+ __ push(r1); |
+ |
+ ExternalReference pending_message_script = |
+ ExternalReference::address_of_pending_message_script(isolate()); |
+ __ mov(ip, Operand(pending_message_script)); |
+ __ ldr(r1, MemOperand(ip)); |
__ push(r1); |
} |
void FullCodeGenerator::ExitFinallyBlock() { |
ASSERT(!result_register().is(r1)); |
+ // Restore pending message from stack. |
+ __ pop(r1); |
+ ExternalReference pending_message_script = |
+ ExternalReference::address_of_pending_message_script(isolate()); |
+ __ mov(ip, Operand(pending_message_script)); |
+ __ str(r1, MemOperand(ip)); |
+ |
+ __ pop(r1); |
+ ExternalReference has_pending_message = |
+ ExternalReference::address_of_has_pending_message(isolate()); |
+ __ mov(ip, Operand(has_pending_message)); |
+ __ str(r1, MemOperand(ip)); |
+ |
+ __ pop(r1); |
+ ExternalReference pending_message_obj = |
+ ExternalReference::address_of_pending_message_obj(isolate()); |
+ __ mov(ip, Operand(pending_message_obj)); |
+ __ str(r1, MemOperand(ip)); |
+ |
// Restore result register from stack. |
__ pop(r1); |
+ |
// Uncook return address and return. |
__ pop(result_register()); |
ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |