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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 805443003: Partially revert r42319 to pacify tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 956797c49bf934dbaad44a68e0871532cf068a4b..8f2bc4cfc34ed63491cf9b6eb3abe04ec6656b29 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -2065,7 +2065,13 @@ Definition* UnboxIntegerInstr::Canonicalize(FlowGraph* flow_graph) {
box_defn->value()->CopyWithType(),
(representation() == kUnboxedInt32) ?
GetDeoptId() : Isolate::kNoDeoptId);
- if ((representation() == kUnboxedInt32) && is_truncating()) {
+ // TODO(vegorov): marking resulting converted as truncating when
+ // unboxing can't deoptimize is a work-around missing
+ // deoptimization environment in case when we insert converter after
+ // EliminateEnvironments and there is mismatch between predicates
+ // UnboxIntConverterInstr::CanDeoptimize and UnboxInt32::CanDeoptimize.
+ if ((representation() == kUnboxedInt32) &&
+ (is_truncating() || !CanDeoptimize())) {
converter->mark_truncating();
}
flow_graph->InsertBefore(this, converter, env(), FlowGraph::kValue);
« 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