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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 304703002: Split GuardField into GuardFieldType and GuardFieldLength instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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_compiler.cc ('k') | runtime/vm/flow_graph_type_propagator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 2eb069e5ff2356fdb11ee9cb705b95a24d328732..1dc4c07e246291cedad321ac6cac4cb1d684df78 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -4529,7 +4529,17 @@ bool FlowGraphOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr,
if (field.guarded_cid() != kDynamicCid) {
InsertBefore(instr,
- new(isolate()) GuardFieldInstr(
+ new(isolate()) GuardFieldClassInstr(
+ new(isolate()) Value(instr->ArgumentAt(1)),
+ field,
+ instr->deopt_id()),
+ instr->env(),
+ FlowGraph::kEffect);
+ }
+
+ if (field.needs_length_check()) {
+ InsertBefore(instr,
+ new(isolate()) GuardFieldLengthInstr(
new(isolate()) Value(instr->ArgumentAt(1)),
field,
instr->deopt_id()),
@@ -7882,7 +7892,9 @@ void ConstantPropagator::VisitCheckStackOverflow(
void ConstantPropagator::VisitCheckClass(CheckClassInstr* instr) { }
-void ConstantPropagator::VisitGuardField(GuardFieldInstr* instr) { }
+void ConstantPropagator::VisitGuardFieldClass(GuardFieldClassInstr* instr) { }
+
+void ConstantPropagator::VisitGuardFieldLength(GuardFieldLengthInstr* instr) { }
void ConstantPropagator::VisitCheckSmi(CheckSmiInstr* instr) { }
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_type_propagator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698