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
parent cbeaf7f5
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment