| 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(),
|
|
|