diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 13:45:03 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 13:45:03 -0700 |
commit | 39db17f164e21473d839272db2271791259666d7 (patch) | |
tree | ce39feda53c48b3ce864de7fb980d1c217a75fc6 /src/wasm-interpreter.h | |
parent | 81e35a5fdf894232e4167a9d66c7b93ecf31ea41 (diff) | |
download | binaryen-39db17f164e21473d839272db2271791259666d7.tar.gz binaryen-39db17f164e21473d839272db2271791259666d7.tar.bz2 binaryen-39db17f164e21473d839272db2271791259666d7.zip |
load and store in interpreter/js
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 5d6130641..55caecaaa 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -19,7 +19,7 @@ public: struct ExternalInterface { virtual Literal callImport(Import* import, LiteralList& arguments) = 0; virtual Literal load(Load* load, Literal ptr) = 0; - virtual Literal store(Store* store, Literal ptr, Literal value) = 0; + virtual void store(Store* store, Literal ptr, Literal value) = 0; }; ModuleInstance(Module& wasm, ExternalInterface* externalInterface) : wasm(wasm), externalInterface(externalInterface) { @@ -179,7 +179,8 @@ public: if (ptr.breaking()) return ptr; Flow value = visit(curr->value); if (value.breaking()) return value; - return instance.externalInterface->store(curr, ptr.value, value.value); + instance.externalInterface->store(curr, ptr.value, value.value); + return value; } Flow visitConst(Const *curr) override { return Flow(curr->value); // heh |