From 886a1c6469e8b4db175906b0765cf6c2a32825cf Mon Sep 17 00:00:00 2001 From: "fschneider@chromium.org" Date: Wed, 7 Mar 2012 12:04:28 +0000 Subject: [PATCH] Avoid starting a new basic block when inlining a function. Instead of creating a fresh basic block for the inlined body, I just simulate the outer environment in the middle of the current block before updating the current environment to the inlined environment and emitting the enter-inlined instruction. Review URL: https://chromiumcodereview.appspot.com/9618052 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 0c539be4b..18a62c689 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -5300,10 +5300,8 @@ bool HGraphBuilder::TryInline(CallKind call_kind, AddInstruction(context); inner_env->BindContext(context); #endif - HBasicBlock* body_entry = CreateBasicBlock(inner_env); - current_block()->Goto(body_entry); - body_entry->SetJoinId(return_id); - set_current_block(body_entry); + AddSimulate(return_id); + current_block()->UpdateEnvironment(inner_env); AddInstruction(new(zone()) HEnterInlined(target, arguments->length(), function, -- 2.34.1