Revision: 10954
Author:   [email protected]
Date:     Wed Mar  7 04:04:28 2012
Log:      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
http://code.google.com/p/v8/source/detail?r=10954

Modified:
 /branches/bleeding_edge/src/hydrogen.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Tue Mar  6 02:57:54 2012
+++ /branches/bleeding_edge/src/hydrogen.cc     Wed Mar  7 04:04:28 2012
@@ -5300,10 +5300,8 @@
   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,

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to