Pad the environment with 0 rather than the receiver to avoid influencing the represen...
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Sep 2013 11:34:05 +0000 (11:34 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Sep 2013 11:34:05 +0000 (11:34 +0000)
R=titzer@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23707055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen.cc

index caa595b..50882a8 100644 (file)
@@ -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();