Chromium Code Reviews| Index: runtime/vm/aot_optimizer.cc |
| diff --git a/runtime/vm/aot_optimizer.cc b/runtime/vm/aot_optimizer.cc |
| index 526cbe97e9b9998cc50c3b89e14ec717c3f922d9..3a95c77754ab858f747df732c0ca5d8302863cc1 100644 |
| --- a/runtime/vm/aot_optimizer.cc |
| +++ b/runtime/vm/aot_optimizer.cc |
| @@ -715,10 +715,10 @@ bool AotOptimizer::TryReplaceWithEqualityOp(InstanceCallInstr* call, |
| ConstantInstr* left_const = left->AsConstant(); |
| if ((right_const != NULL && right_const->value().IsNull()) || |
| (left_const != NULL && left_const->value().IsNull())) { |
| - StrictCompareInstr* comp = new (Z) |
| - StrictCompareInstr(call->token_pos(), Token::kEQ_STRICT, |
| - new (Z) Value(left), new (Z) Value(right), |
| - false); // No number check. |
| + StrictCompareInstr* comp = new (Z) StrictCompareInstr( |
| + call->token_pos(), Token::kEQ_STRICT, new (Z) Value(left), |
| + new (Z) Value(right), false, // No number check. |
|
Vyacheslav Egorov (Google)
2017/05/23 12:00:00
better maybe write this comment /* number_check =
|
| + Thread::Current()->GetNextDeoptId()); |
|
Vyacheslav Egorov (Google)
2017/05/23 12:00:00
I think this can be kNoDeoptId
We should probably
|
| ReplaceCall(call, comp); |
| return true; |
| } |
| @@ -1449,10 +1449,10 @@ void AotOptimizer::ReplaceWithInstanceOf(InstanceCallInstr* call) { |
| ConstantInstr* cid = |
| flow_graph()->GetConstant(Smi::Handle(Z, Smi::New(type_cid))); |
| - StrictCompareInstr* check_cid = |
| - new (Z) StrictCompareInstr(call->token_pos(), Token::kEQ_STRICT, |
| - new (Z) Value(left_cid), new (Z) Value(cid), |
| - false); // No number check. |
| + StrictCompareInstr* check_cid = new (Z) StrictCompareInstr( |
| + call->token_pos(), Token::kEQ_STRICT, new (Z) Value(left_cid), |
| + new (Z) Value(cid), false, // No number check. |
| + Thread::Current()->GetNextDeoptId()); |
|
Vyacheslav Egorov (Google)
2017/05/23 12:00:00
Ditto.
|
| ReplaceCall(call, check_cid); |
| return; |
| } |