Context of this change: subgraphs are not buying us anything and they complicate the implementation. I'm in the process of getting rid of them completely.
On Mon, Feb 21, 2011 at 4:41 PM, <[email protected]> wrote: > Reviewers: Mads Ager, > > > http://codereview.chromium.org/6541060/diff/4/src/hydrogen.cc > File src/hydrogen.cc (left): > > http://codereview.chromium.org/6541060/diff/4/src/hydrogen.cc#oldcode529 > src/hydrogen.cc:529: const ZoneList<BreakContinueInfo*>* infos = > break_continue_info(); > Before, we kept this zone-allocated list of blocks ending with break or > continue, per subgraph. We searched it when we built a breakable > statement's graph to find all the breaks or continues, to allocate basic > blocks where necessary, and to set join ids. > > Now, break and continue is resolved immediately when seen. An annoying > wrinkle is that we can't set the join id until after all the > predecessors are added (I'd like to get rid of that, too). > > http://codereview.chromium.org/6541060/diff/4/src/hydrogen.cc#oldcode562 > src/hydrogen.cc:562: body->ResolveContinue(statement); > This call was actually unnecessary, because all the callers of > AppendEndless already did it. > > http://codereview.chromium.org/6541060/diff/4/src/hydrogen.cc#oldcode2116 > src/hydrogen.cc:2116: old_subgraph_->AddBreakContinueInfo(subgraph_); > Here we copied all the unhandled breaks and continues to the subgraph > captured by this scope. > > This was unsafe: we risked losing break or continue wherever the current > subgraph was changed without using a subgraph scope. > > It was also wasteful, potentially copying a list every time we used a > subgraph scope for something other than a breakable target. > > http://codereview.chromium.org/6541060/diff/4/src/hydrogen.cc > File src/hydrogen.cc (right): > > http://codereview.chromium.org/6541060/diff/4/src/hydrogen.cc#newcode505 > src/hydrogen.cc:505: void HSubgraph::ResolveContinue(IterationStatement* > statement, > I have tried to keep these helpers and their use as close as possible to > the original. There is further refactoring to be done on subgraphs. > > http://codereview.chromium.org/6541060/diff/4/src/hydrogen.cc#newcode526 > src/hydrogen.cc:526: void HSubgraph::AppendEndless(HSubgraph* body, > Everywhere we used to call ResolveContinue or BundleBreak, we now have > the block already in hand and just pass it in. > > Description: > Change the translation of break/continue into Hydrogen. > > Resolve break and continue when we see them, rather then deferring > them until later. > > Please review this at http://codereview.chromium.org/6541060/ > > SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32 > > Affected files: > M src/hydrogen.h > M src/hydrogen.cc > > > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
