diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/execution-results.h | 4 | ||||
-rw-r--r-- | src/tools/wasm-ctor-eval.cpp | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h index eb302b4b2..78cc5af1f 100644 --- a/src/tools/execution-results.h +++ b/src/tools/execution-results.h @@ -84,7 +84,7 @@ public: if (!exportedTable) { throwEmptyException(); } - Index index = arguments[0].geti32(); + auto index = arguments[0].getUnsigned(); if (index >= tables[exportedTable].size()) { throwEmptyException(); } @@ -93,7 +93,7 @@ public: if (!exportedTable) { throwEmptyException(); } - Index index = arguments[0].geti32(); + auto index = arguments[0].getUnsigned(); if (index >= tables[exportedTable].size()) { throwEmptyException(); } diff --git a/src/tools/wasm-ctor-eval.cpp b/src/tools/wasm-ctor-eval.cpp index 499c1bf6c..52c83b053 100644 --- a/src/tools/wasm-ctor-eval.cpp +++ b/src/tools/wasm-ctor-eval.cpp @@ -290,7 +290,7 @@ struct CtorEvalExternalInterface : EvallingModuleRunner::ExternalInterface { // We assume the table is not modified FIXME Literals callTable(Name tableName, - Index index, + Address index, HeapType sig, Literals& arguments, Type result, @@ -363,12 +363,13 @@ struct CtorEvalExternalInterface : EvallingModuleRunner::ExternalInterface { return wasm->getTableOrNull(tableName)->initial; } - Literal tableLoad(Name tableName, Index index) override { + Literal tableLoad(Name tableName, Address index) override { throw FailToEvalException("table.get: TODO"); } // called during initialization - void tableStore(Name tableName, Index index, const Literal& value) override { + void + tableStore(Name tableName, Address index, const Literal& value) override { // We allow stores to the table during initialization, but not after, as we // assume the table does not change at runtime. // TODO: Allow table changes by updating the table later like we do with the |