From 67ae444f292fd38511679a77957b4953cb7b9dc8 Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Mon, 30 Sep 2019 22:18:13 +0000 Subject: [PATCH] [vm/compiler] Revert flow graph check on push arguments Rationale: Does not seem all parts of IR were ready for this check https://github.com/dart-lang/sdk/issues/38577 Change-Id: Ibf32f1338f36f86039564989c4fa1e991e5cc1cc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119484 Reviewed-by: Alexander Aprelev Commit-Queue: Aart Bik --- .../vm/compiler/backend/flow_graph_checker.cc | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/runtime/vm/compiler/backend/flow_graph_checker.cc b/runtime/vm/compiler/backend/flow_graph_checker.cc index a603ce2e5b7..0bbb995bf74 100644 --- a/runtime/vm/compiler/backend/flow_graph_checker.cc +++ b/runtime/vm/compiler/backend/flow_graph_checker.cc @@ -106,21 +106,6 @@ static bool IsControlFlow(Instruction* instruction) { instruction->IsStop() || instruction->IsTailCall(); } -// Asserts push arguments appear in environment at the right place. -static void AssertPushArgsInEnv(Definition* call) { - Environment* env = call->env(); - if (env != nullptr) { - const intptr_t env_count = env->Length(); - const intptr_t arg_count = call->ArgumentCount(); - ASSERT(arg_count <= env_count); - const intptr_t env_base = env_count - arg_count; - for (intptr_t i = 0; i < arg_count; i++) { - ASSERT(call->PushArgumentAt(i) == - env->ValueAt(env_base + i)->definition()); - } - } -} - void FlowGraphChecker::VisitBlocks() { const GrowableArray& preorder = flow_graph_->preorder(); const GrowableArray& postorder = flow_graph_->postorder(); @@ -410,7 +395,6 @@ void FlowGraphChecker::VisitRedefinition(RedefinitionInstr* def) { } void FlowGraphChecker::VisitInstanceCall(InstanceCallInstr* call) { - AssertPushArgsInEnv(call); // Force-optimized functions may not have instance calls inside them because // we do not reset ICData for these. ASSERT(!flow_graph_->function().ForceOptimize());