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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 760013002: Avoid checking for uses in try-blocks, when optimizing a function without try-catch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: removed redundant if-statement Created 6 years, 1 month 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 | « no previous file | 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 41991)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -717,15 +717,17 @@
ConvertUse(it.Current(), from_rep);
}
- for (Value::Iterator it(def->env_use_list());
- !it.Done();
- it.Advance()) {
- Value* use = it.Current();
- if (use->instruction()->MayThrow() &&
- use->instruction()->GetBlock()->InsideTryBlock()) {
- // Environment uses at calls inside try-blocks must be converted to
- // tagged representation.
- ConvertEnvironmentUse(it.Current(), from_rep);
+ if (flow_graph()->graph_entry()->SuccessorCount() > 1) {
+ for (Value::Iterator it(def->env_use_list());
+ !it.Done();
+ it.Advance()) {
+ Value* use = it.Current();
+ if (use->instruction()->MayThrow() &&
+ use->instruction()->GetBlock()->InsideTryBlock()) {
+ // Environment uses at calls inside try-blocks must be converted to
+ // tagged representation.
+ ConvertEnvironmentUse(it.Current(), from_rep);
+ }
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698