From 138eacd5aff01b8d61871ce4829f2a12f25ce393 Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Thu, 19 Sep 2013 14:47:15 +0000 Subject: [PATCH] Reenable polymorphic getter inlining. R=titzer@chromium.org Review URL: https://chromiumcodereview.appspot.com/24134003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hydrogen.cc b/src/hydrogen.cc index ed757eb..824a3cd 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -4712,7 +4712,7 @@ void HOptimizedGraphBuilder::HandlePolymorphicLoadNamedField( set_current_block(if_true); HInstruction* load = BuildLoadMonomorphic( - &info, object, compare, ast_id, return_id, false); + &info, object, compare, ast_id, return_id, FLAG_polymorphic_inlining); if (load == NULL) { if (HasStackOverflow()) return; } else { @@ -4732,6 +4732,10 @@ void HOptimizedGraphBuilder::HandlePolymorphicLoadNamedField( // know about and do not want to handle ones we've never seen. Otherwise // use a generic IC. if (count == types->length() && FLAG_deoptimize_uncommon_cases) { + // Because the deopt may be the only path in the polymorphic load, make sure + // that the environment stack matches the depth on deopt that it otherwise + // would have had after a successful load. + if (!ast_context()->IsEffect()) Push(graph()->GetConstant0()); FinishExitWithHardDeoptimization("Unknown map in polymorphic load", join); } else { HValue* context = environment()->context(); -- 2.7.4