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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12298034: Copy propagated type info when inserting conversion. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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_optimizer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 18669)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -224,13 +224,13 @@
Value* next_;
};
- explicit Value(Definition* definition)
+ explicit Value(Definition* definition, CompileType* type = NULL)
srdjan 2013/02/19 16:51:47 Why the optional argument? We really should avoid
: definition_(definition),
previous_use_(NULL),
next_use_(NULL),
instruction_(NULL),
use_index_(-1),
- reaching_type_(NULL) { }
+ reaching_type_(type) { }
Definition* definition() const { return definition_; }
void set_definition(Definition* definition) { definition_ = definition; }
@@ -252,6 +252,10 @@
Value* Copy() { return new Value(definition_); }
+ // This function must only be used when the new Value is dominated by
+ // the original Value.
+ Value* CopyWithType() { return new Value(definition_, reaching_type_); }
+
CompileType* Type();
void SetReachingType(CompileType* type) {
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698