| Index: runtime/vm/aot_optimizer.cc
|
| diff --git a/runtime/vm/aot_optimizer.cc b/runtime/vm/aot_optimizer.cc
|
| index f630aae7fbe44ed635c232d7c57451d04bc590f5..57ff3497f321817c97a1e1441ded188be773471e 100644
|
| --- a/runtime/vm/aot_optimizer.cc
|
| +++ b/runtime/vm/aot_optimizer.cc
|
| @@ -1572,7 +1572,14 @@ void AotOptimizer::ReplaceWithInstanceOf(InstanceCallInstr* call) {
|
| new (Z) StaticCallInstr(call->token_pos(), target,
|
| Object::null_array(), // argument_names
|
| args, call->deopt_id());
|
| + Environment* copy = call->env()->DeepCopy(
|
| + Z, call->env()->Length() - call->ArgumentCount());
|
| + for (intptr_t i = 0; i < args->length(); ++i) {
|
| + copy->PushValue(new (Z) Value((*args)[i]->value()->definition()));
|
| + }
|
| + call->RemoveEnvironment();
|
| ReplaceCall(call, new_call);
|
| + copy->DeepCopyTo(Z, new_call);
|
| return;
|
| }
|
| }
|
|
|