| 1613 | } |
| 1614 | |
| 1615 | addTable( |
| 1616 | type, initial_size, max_size = undefined, init_expr = undefined, |
| 1617 | is_shared = false, is_table64 = false) { |
| 1618 | if (type == kWasmI32 || type == kWasmI64 || type == kWasmF32 || |
| 1619 | type == kWasmF64 || type == kWasmS128 || type == kWasmVoid) { |
| 1620 | throw new Error('Tables must be of a reference type'); |
| 1621 | } |
| 1622 | if (init_expr != undefined) checkExpr(init_expr); |
| 1623 | let table = new WasmTableBuilder( |
| 1624 | this, type, initial_size, max_size, init_expr, is_shared, is_table64); |
| 1625 | table.index = this.tables.length + this.num_imported_tables; |
| 1626 | this.tables.push(table); |
| 1627 | return table; |
| 1628 | } |
| 1629 | |
| 1630 | addTable64( |
| 1631 | type, initial_size, max_size = undefined, init_expr = undefined, |