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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 13529021: Fix guarded_cid handling: add field to list of guarded_field at LoadField creation time. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 20996)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -21,9 +21,6 @@
DEFINE_FLAG(bool, array_bounds_check_elimination, true,
"Eliminate redundant bounds checks.");
-// TODO(srdjan): Enable/remove flag once it works.
-DEFINE_FLAG(bool, inline_getter_with_guarded_cid, false,
- "Inline implict getter using guarded cid");
DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination.");
DEFINE_FLAG(int, max_polymorphic_checks, 4,
"Maximum number of polymorphic check, otherwise it is megamorphic.");
@@ -1199,10 +1196,12 @@
AbstractType::ZoneHandle(field.type()),
field.is_final());
if (field.guarded_cid() != kIllegalCid) {
+ Field* the_field = &Field::ZoneHandle(field.raw());
if (!field.is_nullable() || (field.guarded_cid() == kNullCid)) {
load->set_result_cid(field.guarded_cid());
+ guarded_fields_->Add(the_field);
}
- load->set_field(&Field::ZoneHandle(field.raw()));
+ load->set_field(the_field);
}
load->set_field_name(String::Handle(field.name()).ToCString());
@@ -1211,14 +1210,12 @@
call->RemoveEnvironment();
ReplaceCall(call, load);
- if (FLAG_inline_getter_with_guarded_cid) {
- if (load->result_cid() != kDynamicCid) {
- // Reset value types if guarded_cid was used.
- for (Value::Iterator it(load->input_use_list());
- !it.Done();
- it.Advance()) {
- it.Current()->SetReachingType(NULL);
- }
+ if (load->result_cid() != kDynamicCid) {
+ // Reset value types if guarded_cid was used.
+ for (Value::Iterator it(load->input_use_list());
+ !it.Done();
+ it.Advance()) {
+ it.Current()->SetReachingType(NULL);
}
}
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698