Define a "table" concept.

"Table" is to WebAssembly tables as "Heap" is to WebAssembly linear
memories.
This commit is contained in:
Dan Gohman
2018-05-20 07:48:46 -07:00
parent cd75176f10
commit 1b30265c5c
23 changed files with 500 additions and 16 deletions

View File

@@ -377,10 +377,12 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
// `index` is the index of the function's signature and `table_index` is the index of
// the table to search the function in.
let (sigref, num_args) = state.get_indirect_sig(builder.func, index, environ);
let table = state.get_table(builder.func, table_index, environ);
let callee = state.pop1();
let call = environ.translate_call_indirect(
builder.cursor(),
table_index as TableIndex,
table,
index as SignatureIndex,
sigref,
callee,