Chromium Code Reviews

Unified Diff: src/ia32/full-codegen-ia32.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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/full-codegen.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/full-codegen-ia32.cc
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
index 9727ea01ec625886aa6a5833d602a65bc9dedbfb..2542b2d297d162ad2f252100e53bf4f8b44f33f1 100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -4492,6 +4492,26 @@ void FullCodeGenerator::ExitFinallyBlock() {
}
+void FullCodeGenerator::SavePendingMessage() {
+ ASSERT(!result_register().is(edx));
+ // Store pending message while executing finally block upon exception.
+ ExternalReference pending_message_obj =
+ ExternalReference::address_of_pending_message_obj(isolate());
+ __ mov(edx, Operand::StaticVariable(pending_message_obj));
+ __ push(edx);
+}
+
+
+void FullCodeGenerator::RestorePendingMessage() {
+ ASSERT(!result_register().is(edx));
+ // Restore pending message if cleared by executing the finally block.
+ __ pop(edx);
+ ExternalReference pending_message_obj =
+ ExternalReference::address_of_pending_message_obj(isolate());
+ __ mov(Operand::StaticVariable(pending_message_obj), edx);
+}
+
+
#undef __
#define __ ACCESS_MASM(masm())
« no previous file with comments | « src/full-codegen.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine