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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 2429833002: [wasm] Compare wasm signatures against SMI constants for more efficient check. (Closed)
Patch Set: Created 4 years, 2 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/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index b6dc62be9394dc3cd98372021721a3ab96853a1f..49b3817ffbff0a89b96a63837a9c227f1e0889b5 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2177,9 +2177,8 @@ Node* WasmGraphBuilder::CallIndirect(uint32_t index, Node** args, Node*** rets,
*effect_, *control_);
int32_t key = module_->module->function_tables[0].map.Find(sig);
DCHECK_GE(key, 0);
- Node* sig_match =
- graph()->NewNode(machine->Word32Equal(),
- BuildChangeSmiToInt32(load_sig), Int32Constant(key));
+ Node* sig_match = graph()->NewNode(machine->WordEqual(), load_sig,
+ jsgraph()->SmiConstant(key));
trap_->AddTrapIfFalse(wasm::kTrapFuncSigMismatch, sig_match, position);
}
« 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