diff options
author | Abbas Mashayekh <martianboy2005@gmail.com> | 2021-02-10 01:17:28 +0330 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 13:47:28 -0800 |
commit | 3da8b08ecd57f5662bebc69ea73bf59e1928341e (patch) | |
tree | 2902eedc161579eaf37a1aed463de95916eee703 /src/passes/PostEmscripten.cpp | |
parent | a12a8250da24aa5b5787bf89562b243fdc514302 (diff) | |
download | binaryen-3da8b08ecd57f5662bebc69ea73bf59e1928341e.tar.gz binaryen-3da8b08ecd57f5662bebc69ea73bf59e1928341e.tar.bz2 binaryen-3da8b08ecd57f5662bebc69ea73bf59e1928341e.zip |
[reference-types] remove single table restriction in IR (#3517)
Adds support for modules with multiple tables. Adds a field for the table name to `CallIndirect` and updates the C/JS APIs accordingly.
Diffstat (limited to 'src/passes/PostEmscripten.cpp')
-rw-r--r-- | src/passes/PostEmscripten.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/PostEmscripten.cpp b/src/passes/PostEmscripten.cpp index d57d849da..35e2b9a8b 100644 --- a/src/passes/PostEmscripten.cpp +++ b/src/passes/PostEmscripten.cpp @@ -61,13 +61,13 @@ struct PostEmscripten : public Pass { hasInvokes = true; } } - if (!hasInvokes) { + if (!hasInvokes || module->tables.empty()) { return; } // Next, see if the Table is flat, which we need in order to see where // invokes go statically. (In dynamic linking, the table is not flat, // and we can't do this.) - TableUtils::FlatTable flatTable(module->table); + TableUtils::FlatTable flatTable(*module->tables[0]); if (!flatTable.valid) { return; } |