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

Unified Diff: runtime/vm/aot_optimizer.cc

Issue 2639273003: Fix environment mismatch in AOT inlining. (Closed)
Patch Set: clean up Created 3 years, 11 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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698