Commit 94ca3b68 authored by Jochen Eisinger's avatar Jochen Eisinger Committed by Commit Bot

Don't rewrite unreachable statements

I'd like to change the parser to not create those AST nodes in
the first place. To get there, I'm skipping visiting of those nodes
in the existing visitors.

With this change, there is only one visitor in asm-to-wasm left that
actually visits those nodes, and seemingly depends on it.

R=adamk@chromium.org
BUG=v8:6312

Change-Id: I0837fdd97cf4c1baefa2d7fd76eddd90ad00b1df
Reviewed-on: https://chromium-review.googlesource.com/493167Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45044}
parent e393093a
......@@ -31,7 +31,7 @@ void AstExpressionRewriter::VisitDeclarations(Declaration::List* declarations) {
void AstExpressionRewriter::VisitStatements(ZoneList<Statement*>* statements) {
for (int i = 0; i < statements->length(); i++) {
AST_REWRITE_LIST_ELEMENT(Statement, statements, i);
// Not stopping when a jump statement is found.
if (statements->at(i)->IsJump()) break;
}
}
......
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