Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: src/wasm/asm-wasm-builder.cc

Issue 1982293002: [wasm] remove extra nops in asm-wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/asm-wasm-builder.cc
diff --git a/src/wasm/asm-wasm-builder.cc b/src/wasm/asm-wasm-builder.cc
index 99f06e4a66d9b130456f7d60f005daef8724eabb..365c9db81e4d517cbbca39b2cc6eac036c291275 100644
--- a/src/wasm/asm-wasm-builder.cc
+++ b/src/wasm/asm-wasm-builder.cc
@@ -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++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698