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_type_propagator.cc

Issue 2856543002: Use off-heap data for class check instructions (Closed)
Patch Set: Created 3 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
Index: runtime/vm/flow_graph_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index 9617c03b3480e0c38da4ba21e4a48e71c1708757..13e31a181d7b7ac8551502c286c4d637f6bf2ff5 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -226,15 +226,18 @@ void FlowGraphTypePropagator::VisitCheckArrayBound(
void FlowGraphTypePropagator::VisitCheckClass(CheckClassInstr* check) {
- if (!check->unary_checks().NumberOfChecksIs(1) ||
- !check->Dependencies().IsNone()) {
+ if (!check->targets().IsMonomorphic()) {
+ return;
+ }
+
+ if (!check->Dependencies().IsNone()) {
// TODO(vegorov): If check is affected by side-effect we can still propagate
// the type further but not the cid.
return;
}
SetCid(check->value()->definition(),
- check->unary_checks().GetReceiverClassIdAt(0));
+ check->targets().MonomorphicReceiverCid());
}
@@ -473,7 +476,7 @@ void FlowGraphTypePropagator::StrengthenAssertWith(Instruction* check) {
ASSERT(check->IsCheckClass());
check_clone = new CheckClassInstr(
assert->value()->Copy(zone()), assert->env()->deopt_id(),
- check->AsCheckClass()->unary_checks(), check->token_pos());
+ check->AsCheckClass()->targets(), check->token_pos());
check_clone->AsCheckClass()->set_licm_hoisted(
check->AsCheckClass()->licm_hoisted());
}

Powered by Google App Engine
This is Rietveld 408576698