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/ir/names.h | |
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/ir/names.h')
-rw-r--r-- | src/ir/names.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/names.h b/src/ir/names.h index 99dd3cab7..6fbb987f5 100644 --- a/src/ir/names.h +++ b/src/ir/names.h @@ -76,6 +76,10 @@ inline Name getValidFunctionName(Module& module, Name root) { return getValidName( module, root, [&](Name test) { return !module.getFunctionOrNull(test); }); } +inline Name getValidTableName(Module& module, Name root) { + return getValidName( + module, root, [&](Name test) { return !module.getTableOrNull(test); }); +} inline Name getValidEventName(Module& module, Name root) { return getValidName( module, root, [&](Name test) { return !module.getEventOrNull(test); }); |