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

Unified Diff: runtime/vm/parser.h

Issue 467933002: Fix issue 20476: creating multiple LocalVariables with same name (finally_ret_val35), confuses the … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 39201)
+++ runtime/vm/parser.h (working copy)
@@ -47,6 +47,7 @@
saved_current_context_var_(NULL),
saved_entry_context_var_(NULL),
expression_temp_var_(NULL),
+ finally_return_temp_var_(NULL),
deferred_prefixes_(new ZoneGrowableArray<const LibraryPrefix*>()),
first_parameter_index_(0),
first_stack_local_index_(0),
@@ -107,6 +108,20 @@
bool has_expression_temp_var() const {
return expression_temp_var_ != NULL;
}
+
+ LocalVariable* finally_return_temp_var() const {
+ ASSERT(has_finally_return_temp_var());
+ return finally_return_temp_var_;
+ }
+ void set_finally_return_temp_var(LocalVariable* value) {
+ ASSERT(!has_finally_return_temp_var());
+ finally_return_temp_var_ = value;
+ }
+ bool has_finally_return_temp_var() const {
+ return finally_return_temp_var_ != NULL;
+ }
+ void EnsureFinallyReturnTemp();
+
static LocalVariable* CreateExpressionTempVar(intptr_t token_pos);
LocalVariable* EnsureExpressionTemp();
@@ -134,6 +149,7 @@
LocalVariable* saved_current_context_var_;
LocalVariable* saved_entry_context_var_;
LocalVariable* expression_temp_var_;
+ LocalVariable* finally_return_temp_var_;
ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes_;
int first_parameter_index_;
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698