| Index: runtime/vm/flow_graph_optimizer.cc
|
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
|
| index 701e32bac0dbc710e1ae1227c7d121e65d21f847..f300a302d388bc9ef6f784ee60e3dbf1bc2c3d90 100644
|
| --- a/runtime/vm/flow_graph_optimizer.cc
|
| +++ b/runtime/vm/flow_graph_optimizer.cc
|
| @@ -101,7 +101,7 @@ void FlowGraphOptimizer::InsertConversionsFor(Definition* def) {
|
| instr,
|
| CreateConversion(from_rep, to_rep, def, deopt_target),
|
| use->instruction()->env(),
|
| - BindInstr::kUsed);
|
| + Definition::kValue);
|
|
|
| use->set_definition(converted);
|
| }
|
| @@ -315,7 +315,7 @@ void FlowGraphOptimizer::AddCheckClass(BindInstr* instr,
|
| const ICData& unary_checks =
|
| ICData::ZoneHandle(comp->ic_data()->AsUnaryClassChecks());
|
| CheckClassComp* check = new CheckClassComp(value, comp, unary_checks);
|
| - InsertBefore(instr, check, instr->env(), BindInstr::kUnused);
|
| + InsertBefore(instr, check, instr->env(), Definition::kEffect);
|
| }
|
|
|
|
|
| @@ -342,7 +342,7 @@ bool FlowGraphOptimizer::TryReplaceWithArrayOp(BindInstr* instr,
|
| InsertBefore(instr,
|
| new CheckSmiComp(index->Copy(), comp->deopt_id()),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| // Insert array bounds check.
|
| InsertBefore(instr,
|
| new CheckArrayBoundComp(array->Copy(),
|
| @@ -350,7 +350,7 @@ bool FlowGraphOptimizer::TryReplaceWithArrayOp(BindInstr* instr,
|
| class_id,
|
| comp),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| Computation* array_op = NULL;
|
| if (op_kind == Token::kINDEX) {
|
| array_op = new LoadIndexedComp(array, index, class_id);
|
| @@ -374,7 +374,7 @@ BindInstr* FlowGraphOptimizer::InsertBefore(Instruction* instr,
|
| BindInstr::UseKind use_kind) {
|
| BindInstr* bind = new BindInstr(use_kind, comp);
|
| if (env != NULL) env->CopyTo(bind);
|
| - if (use_kind == BindInstr::kUsed) {
|
| + if (use_kind == Definition::kValue) {
|
| bind->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
|
| }
|
| bind->InsertBefore(instr);
|
| @@ -388,7 +388,7 @@ BindInstr* FlowGraphOptimizer::InsertAfter(Instruction* instr,
|
| BindInstr::UseKind use_kind) {
|
| BindInstr* bind = new BindInstr(use_kind, comp);
|
| if (env != NULL) env->CopyTo(bind);
|
| - if (use_kind == BindInstr::kUsed) {
|
| + if (use_kind == Definition::kValue) {
|
| bind->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
|
| }
|
| bind->InsertAfter(instr);
|
| @@ -461,7 +461,7 @@ bool FlowGraphOptimizer::TryReplaceWithBinaryOp(BindInstr* instr,
|
| right->Copy(),
|
| comp),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
|
|
| UnboxedDoubleBinaryOpComp* double_bin_op =
|
| new UnboxedDoubleBinaryOpComp(op_kind,
|
| @@ -493,11 +493,11 @@ bool FlowGraphOptimizer::TryReplaceWithBinaryOp(BindInstr* instr,
|
| InsertBefore(instr,
|
| new CheckSmiComp(left->Copy(), comp->deopt_id()),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| InsertBefore(instr,
|
| new CheckSmiComp(right->Copy(), comp->deopt_id()),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| BinarySmiOpComp* bin_op = new BinarySmiOpComp(op_kind,
|
| comp,
|
| left,
|
| @@ -523,7 +523,7 @@ bool FlowGraphOptimizer::TryReplaceWithUnaryOp(BindInstr* instr,
|
| InsertBefore(instr,
|
| new CheckSmiComp(value->Copy(), comp->deopt_id()),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| unary_op = new UnarySmiOpComp(op_kind,
|
| (op_kind == Token::kNEGATE) ? comp : NULL,
|
| value);
|
| @@ -807,12 +807,12 @@ static void HandleRelationalOp(FlowGraphOptimizer* optimizer,
|
| instr,
|
| new CheckSmiComp(comp->left()->Copy(), comp->deopt_id()),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| optimizer->InsertBefore(
|
| instr,
|
| new CheckSmiComp(comp->right()->Copy(), comp->deopt_id()),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| comp->set_operands_class_id(kSmiCid);
|
| } else if (ShouldSpecializeForDouble(ic_data)) {
|
| comp->set_operands_class_id(kDoubleCid);
|
| @@ -855,12 +855,12 @@ static void HandleEqualityCompare(FlowGraphOptimizer* optimizer,
|
| instr,
|
| new CheckSmiComp(comp->left()->Copy(), comp->deopt_id()),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| optimizer->InsertBefore(
|
| instr,
|
| new CheckSmiComp(comp->right()->Copy(), comp->deopt_id()),
|
| instr->env(),
|
| - BindInstr::kUnused);
|
| + Definition::kEffect);
|
| comp->set_receiver_class_id(kSmiCid);
|
| } else if ((class_ids[0] == kDoubleCid) && (class_ids[1] == kDoubleCid)) {
|
| comp->set_receiver_class_id(kDoubleCid);
|
|
|