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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 2734883002: ICData::NumberOfChecks is O(n) so don't call it in loops (Closed)
Patch Set: Add const Created 3 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
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d3cdc8418fb36da18f6e90f63ddd8fb341df80a6..7e88f12e77687684fab3ec84e10a51ce0aad2ac6 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -219,7 +219,7 @@ void FlowGraphTypePropagator::VisitCheckArrayBound(
void FlowGraphTypePropagator::VisitCheckClass(CheckClassInstr* check) {
- if ((check->unary_checks().NumberOfChecks() != 1) ||
+ if (!check->unary_checks().NumberOfChecksIs(1) ||
!check->Dependencies().IsNone()) {
// TODO(vegorov): If check is affected by side-effect we can still propagate
// the type further but not the cid.
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698