Commit 6e170c9f authored by aseemgarg's avatar aseemgarg Committed by Commit bot

[wasm] remove extra nops in asm-wasm

R=bradnelson@chromium.org,titzer@chromium.org
BUG=v8:4203
LOG=Y

Review-Url: https://codereview.chromium.org/1982293002
Cr-Commit-Position: refs/heads/master@{#36282}
parent b9bfbcb5
......@@ -187,7 +187,6 @@ class AsmWasmBuilderImpl : public AstVisitor {
}
}
DCHECK(i >= 0);
current_function_builder_->Emit(kExprNop);
current_function_builder_->EmitWithU8(kExprBr, ARITY_0);
current_function_builder_->EmitVarInt(block_distance);
}
......@@ -211,7 +210,6 @@ class AsmWasmBuilderImpl : public AstVisitor {
}
}
DCHECK(i >= 0);
current_function_builder_->Emit(kExprNop);
current_function_builder_->EmitWithU8(kExprBr, ARITY_0);
current_function_builder_->EmitVarInt(block_distance);
}
......@@ -263,13 +261,11 @@ class AsmWasmBuilderImpl : public AstVisitor {
current_function_builder_->Emit(kExprI32Eq);
current_function_builder_->Emit(kExprIf);
DCHECK(case_to_block.find(node->begin) != case_to_block.end());
current_function_builder_->Emit(kExprNop);
current_function_builder_->EmitWithU8(kExprBr, ARITY_0);
current_function_builder_->EmitVarInt(1 + if_depth +
case_to_block.at(node->begin));
current_function_builder_->Emit(kExprEnd);
} else {
current_function_builder_->Emit(kExprNop);
if (node->begin != 0) {
VisitVariableProxy(tag);
current_function_builder_->EmitI32Const(node->begin);
......@@ -342,7 +338,6 @@ class AsmWasmBuilderImpl : public AstVisitor {
root->begin == root->end) {
current_function_builder_->EmitWithU8(kExprBr, ARITY_0);
current_function_builder_->EmitVarInt(default_block);
current_function_builder_->Emit(kExprNop);
}
}
for (int i = 0; i < case_count; i++) {
......
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