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

Unified Diff: runtime/vm/scopes.h

Issue 34413007: Implement type checks for switch expression (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/parser.cc ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.h
===================================================================
--- runtime/vm/scopes.h (revision 28998)
+++ runtime/vm/scopes.h (working copy)
@@ -27,7 +27,7 @@
: token_pos_(token_pos),
name_(name),
owner_(NULL),
- type_(type),
+ type_(&type),
regis 2013/10/22 23:17:20 Why change this now? We usually do not store a poi
hausner 2013/10/22 23:22:18 Because I have to change the type of a variable af
const_value_(NULL),
is_final_(false),
is_captured_(false),
@@ -45,7 +45,11 @@
owner_ = owner;
}
- const AbstractType& type() const { return type_; }
+ const AbstractType& type() const { return *type_; }
+ void set_type(const AbstractType& value) {
+ ASSERT(value.IsZoneHandle());
+ type_ = &value;
+ }
bool is_final() const { return is_final_; }
void set_is_final() { is_final_ = true; }
@@ -101,7 +105,7 @@
const String& name_;
LocalScope* owner_; // Local scope declaring this variable.
- const AbstractType& type_; // Declaration type of local variable.
+ const AbstractType* type_; // Declaration type of local variable.
const Instance* const_value_; // NULL or compile-time const value.
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698