diff options
Diffstat (limited to 'src/wasm-validator.h')
-rw-r--r-- | src/wasm-validator.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h index e23221337..1d3b5c41b 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -394,7 +394,15 @@ public: break; } } - shouldBeTrue(found, name, "module exports must be found"); + shouldBeTrue(found, name, "module function exports must be found"); + } else if (exp->kind == Export::Global) { + shouldBeTrue(curr->checkGlobal(name), name, "module global exports must be found"); + } else if (exp->kind == Export::Table) { + shouldBeTrue(name == Name("0") || name == curr->table.name, name, "module table exports must be found"); + } else if (exp->kind == Export::Memory) { + shouldBeTrue(name == Name("0") || name == curr->memory.name, name, "module memory exports must be found"); + } else { + WASM_UNREACHABLE(); } Name exportName = exp->name; shouldBeFalse(exportNames.count(exportName) > 0, exportName, "module exports must be unique"); |