diff --git a/src/hydrogen.cc b/src/hydrogen.cc index caa595bfeb..50882a8a7f 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -6153,7 +6153,8 @@ void HOptimizedGraphBuilder::HandlePolymorphicCallNamed( // Because the deopt may be the only path in the polymorphic call, make sure // that the environment stack matches the depth on deopt that it otherwise // would have had after a successful call. - Drop(argument_count - (ast_context()->IsEffect() ? 0 : 1)); + Drop(argument_count); + if (!ast_context()->IsEffect()) Push(graph()->GetConstant0()); FinishExitWithHardDeoptimization("Unknown map in polymorphic call", join); } else { HValue* context = environment()->context();