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

Unified Diff: src/arm/full-codegen-arm.cc

Issue 10537078: Preserve error message during finally block in try..finally. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 | « no previous file | src/assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index 2a5887a953c8124ae817f6c464dcc4d95392f0b8..a3d85f6295a6479d567ec77ea50dd987ba03834a 100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -4508,6 +4508,28 @@ void FullCodeGenerator::ExitFinallyBlock() {
}
+void FullCodeGenerator::SavePendingMessage() {
+ ASSERT(!result_register().is(r1));
+ // Store pending message while executing finally block upon exception.
+ ExternalReference pending_message_obj =
+ ExternalReference::address_of_pending_message_obj(isolate());
+ __ mov(ip, Operand(pending_message_obj));
+ __ ldr(r1, MemOperand(ip));
+ __ push(r1);
+}
+
+
+void FullCodeGenerator::RestorePendingMessage() {
+ ASSERT(!result_register().is(r1));
+ // Restore pending message if cleared by executing the finally block.
+ __ pop(r1);
+ ExternalReference pending_message_obj =
+ ExternalReference::address_of_pending_message_obj(isolate());
+ __ mov(ip, Operand(pending_message_obj));
+ __ str(r1, MemOperand(ip));
+}
+
+
#undef __
#define __ ACCESS_MASM(masm())
« no previous file with comments | « no previous file | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698