summaryrefslogtreecommitdiff
path: root/src/tools/wasm-shell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm-shell.cpp')
-rw-r--r--src/tools/wasm-shell.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp
index 51eafb652..4b20e922b 100644
--- a/src/tools/wasm-shell.cpp
+++ b/src/tools/wasm-shell.cpp
@@ -284,9 +284,7 @@ protected:
}
}
});
- if (wasm.memory.imported()) {
- reportUnknownImport(&wasm.memory);
- }
+ ModuleUtils::iterImportedMemories(wasm, reportUnknownImport);
}
if (!invalid && id == ASSERT_TRAP) {
@@ -352,11 +350,10 @@ protected:
spectest->addExport(
builder.makeExport("table", Name::fromInt(0), ExternalKind::Table));
- spectest->memory.exists = true;
- spectest->memory.initial = 1;
- spectest->memory.max = 2;
- spectest->addExport(builder.makeExport(
- "memory", spectest->memory.name, ExternalKind::Memory));
+ Memory* memory =
+ spectest->addMemory(builder.makeMemory(Name::fromInt(0), 1, 2));
+ spectest->addExport(
+ builder.makeExport("memory", memory->name, ExternalKind::Memory));
modules["spectest"].swap(spectest);
modules["spectest"]->features = FeatureSet::All;