summaryrefslogtreecommitdiff
path: root/src/tools/wasm-ctor-eval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm-ctor-eval.cpp')
-rw-r--r--src/tools/wasm-ctor-eval.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/tools/wasm-ctor-eval.cpp b/src/tools/wasm-ctor-eval.cpp
index 189ce9f71..54324ae5a 100644
--- a/src/tools/wasm-ctor-eval.cpp
+++ b/src/tools/wasm-ctor-eval.cpp
@@ -343,17 +343,16 @@ struct CtorEvalExternalInterface : EvallingModuleInstance::ExternalInterface {
std::to_string(index));
}
- Literal tableGet(Name tableName, Index index) {
- throw FailToEvalException("table.get: TODO");
+ Index tableSize(Name tableName) override {
+ throw FailToEvalException("table size");
}
- void tableSet(Name tableName, Index index, const Literal& value) {
- throw FailToEvalException("table.set: TODO");
+ Literal tableLoad(Name tableName, Index index) override {
+ throw FailToEvalException("table.get: TODO");
}
- Literal tableSize(Name tableName) {
- throw FailToEvalException("table.size: TODO");
- }
+ // called during initialization
+ void tableStore(Name tableName, Index index, const Literal& value) override {}
int8_t load8s(Address addr) override { return doLoad<int8_t>(addr); }
uint8_t load8u(Address addr) override { return doLoad<uint8_t>(addr); }
@@ -377,12 +376,15 @@ struct CtorEvalExternalInterface : EvallingModuleInstance::ExternalInterface {
doStore<int64_t>(addr, value);
}
- // called during initialization, but we don't keep track of a table
- void tableStore(Name tableName, Address addr, const Literal& value) override {
+ bool growMemory(Address /*oldSize*/, Address /*newSize*/) override {
+ throw FailToEvalException("grow memory");
}
- bool growMemory(Address /*oldSize*/, Address newSize) override {
- throw FailToEvalException("grow memory");
+ bool growTable(Name /*name*/,
+ const Literal& /*value*/,
+ Index /*oldSize*/,
+ Index /*newSize*/) override {
+ throw FailToEvalException("grow table");
}
void trap(const char* why) override {