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

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

Issue 2230063002: [wasm] Experimental: Add support for multiple non-homogeneous tables Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-macro-gen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-interpreter.cc
diff --git a/src/wasm/wasm-interpreter.cc b/src/wasm/wasm-interpreter.cc
index aabf4105634f0de9723c6f5b88810eb4e3855c6b..49ed755e4868e62ab9f2342a4df51a4f3ef72135 100644
--- a/src/wasm/wasm-interpreter.cc
+++ b/src/wasm/wasm-interpreter.cc
@@ -1397,13 +1397,10 @@ class ThreadImpl : public WasmInterpreter::Thread {
size_t index = stack_.size() - operand.arity - 1;
DCHECK_LT(index, stack_.size());
uint32_t entry_index = stack_[index].to<uint32_t>();
- // Assume only one table for now.
- DCHECK_LE(module()->function_tables.size(), 1u);
- InterpreterCode* target = codemap()->GetIndirectCode(0, entry_index);
+ InterpreterCode* target =
+ codemap()->GetIndirectCode(operand.table_index, entry_index);
if (target == nullptr) {
return DoTrap(kTrapFuncInvalid, pc);
- } else if (target->function->sig_index != operand.index) {
- return DoTrap(kTrapFuncSigMismatch, pc);
}
DoCall(target, &pc, pc + 1 + operand.length, &limit);
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-macro-gen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698