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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 12298034: Copy propagated type info when inserting conversion. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « no previous file | runtime/vm/intermediate_language.h » ('j') | runtime/vm/intermediate_language.h » ('J')
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 18669)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -234,19 +234,19 @@
(use->Type()->ToCid() == kDoubleCid));
const intptr_t deopt_id = (deopt_target != NULL) ?
deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
- converted = new UnboxIntegerInstr(new Value(use->definition()), deopt_id);
+ converted = new UnboxIntegerInstr(use->CopyWithType(), deopt_id);
} else if ((from == kUnboxedMint) && (to == kTagged)) {
- converted = new BoxIntegerInstr(new Value(use->definition()));
+ converted = new BoxIntegerInstr(use->CopyWithType());
} else if (from == kUnboxedMint && to == kUnboxedDouble) {
// Convert by boxing/unboxing.
// TODO(fschneider): Implement direct unboxed mint-to-double conversion.
- BoxIntegerInstr* boxed = new BoxIntegerInstr(new Value(use->definition()));
+ BoxIntegerInstr* boxed = new BoxIntegerInstr(use->CopyWithType());
InsertBefore(insert_before, boxed, NULL, Definition::kValue);
const intptr_t deopt_id = (deopt_target != NULL) ?
deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
converted = new UnboxDoubleInstr(new Value(boxed), deopt_id);
} else if ((from == kUnboxedDouble) && (to == kTagged)) {
- converted = new BoxDoubleInstr(new Value(use->definition()), NULL);
+ converted = new BoxDoubleInstr(use->CopyWithType(), NULL);
} else if ((from == kTagged) && (to == kUnboxedDouble)) {
const intptr_t deopt_id = (deopt_target != NULL) ?
deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
@@ -261,7 +261,7 @@
InsertBefore(insert_before, double_const, NULL, Definition::kValue);
converted = new UnboxDoubleInstr(new Value(double_const), deopt_id);
} else {
- converted = new UnboxDoubleInstr(new Value(use->definition()), deopt_id);
+ converted = new UnboxDoubleInstr(use->CopyWithType(), deopt_id);
}
}
ASSERT(converted != NULL);
@@ -933,7 +933,7 @@
Value* left = call->ArgumentAt(0)->value();
Value* right = call->ArgumentAt(1)->value();
- // Check that either left or right are not a smi. Result or a
+ // Check that either left or right are not a smi. Result of a
// binary operation with two smis is a smi not a double.
InsertBefore(call,
new CheckEitherNonSmiInstr(left->Copy(),
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | runtime/vm/intermediate_language.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698