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

Unified Diff: src/codegen-ia32.cc

Issue 14422: Introduced a TempAssign utility because I just couldn't watch this anymore. Y... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years 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/utils.h » ('j') | src/utils.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 958)
+++ src/codegen-ia32.cc (working copy)
@@ -2057,10 +2057,9 @@
}
// Generate code for the statements in the try block.
- bool was_inside_try = is_inside_try_;
- is_inside_try_ = true;
- VisitStatements(node->try_block()->statements());
- is_inside_try_ = was_inside_try;
+ { TempAssign<bool> temp(&is_inside_try_, true);
+ VisitStatements(node->try_block()->statements());
+ }
// Stop the introduced shadowing and count the number of required unlinks.
// After shadowing stops, the original labels are unshadowed and the
@@ -2155,10 +2154,9 @@
}
// Generate code for the statements in the try block.
- bool was_inside_try = is_inside_try_;
- is_inside_try_ = true;
- VisitStatements(node->try_block()->statements());
- is_inside_try_ = was_inside_try;
+ { TempAssign<bool> temp(&is_inside_try_, true);
+ VisitStatements(node->try_block()->statements());
+ }
// Stop the introduced shadowing and count the number of required unlinks.
// After shadowing stops, the original labels are unshadowed and the
« no previous file with comments | « no previous file | src/utils.h » ('j') | src/utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698