Commit 7bbfe5c8 authored by titzer's avatar titzer Committed by Commit bot

[wasm] Compare wasm signatures against SMI constants for more efficient check.

R=ahaas@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2429833002
Cr-Commit-Position: refs/heads/master@{#40403}
parent b6c152e9
......@@ -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);
}
......
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