-
Mike Stanton authored
While investigating loop peeling, I found that relatively simple code like "if (x) { throw new Error('oh hai'); }" in a loop would fail to peel. The reason is that the call (new Error(...)) was recorded by loop analysis as being inside the loop but the only usage was in the throw, which we currently model as being outside of the loop. We have a regime that inserts LoopExit nodes to mark control exits from the loops, and LoopExitValues that are meant to mark exiting values. This wasn't done because of a bug in the bytecode graph builder VisitThrow() method -- it used the *out* liveness to construct the appropriate loop exit nodes, and it's more appropriate to use the *in* liveness. This addressed the concern. It doesn't fix bug 7099, but is a step on the way. Bug: v8:7099 Change-Id: Iaeea794843166063a55c6917e7b0ad4341581261 Reviewed-on: https://chromium-review.googlesource.com/793834Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#49690}
44d71893