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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 12529008: Collect type feedback for fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 7 years, 9 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
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 722118679d35815d476a1d829997d076067ae833..7a87922f03a16a4ddce767ee728678a3379afc80 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2595,8 +2595,20 @@ void EffectGraphVisitor::VisitStoreInstanceFieldNode(
type,
dst_name);
}
- StoreInstanceFieldInstr* store = new StoreInstanceFieldInstr(
- node->field(), for_instance.value(), store_value, kEmitStoreBarrier);
+
+ store_value = Bind(BuildStoreExprTemp(store_value));
+ GuardFieldInstr* guard =
+ new GuardFieldInstr(store_value,
+ node->field(),
+ Isolate::Current()->GetNextDeoptId());
+ AddInstruction(guard);
+
+ store_value = Bind(BuildLoadExprTemp());
+ StoreInstanceFieldInstr* store =
+ new StoreInstanceFieldInstr(node->field(),
+ for_instance.value(),
+ store_value,
+ kEmitStoreBarrier);
ReturnDefinition(store);
}

Powered by Google App Engine
This is Rietveld 408576698