summaryrefslogtreecommitdiff
path: root/src/wasm-shell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-shell.cpp')
-rw-r--r--src/wasm-shell.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wasm-shell.cpp b/src/wasm-shell.cpp
index 81e6112ce..1f8d1373c 100644
--- a/src/wasm-shell.cpp
+++ b/src/wasm-shell.cpp
@@ -35,12 +35,6 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
}
}
- jmp_buf trapState;
-
- void trap() {
- longjmp(trapState, 1);
- }
-
Literal callImport(Import *import, ModuleInstance::LiteralList& arguments) override {
if (import->name == PRINT) {
for (auto argument : arguments) {
@@ -97,6 +91,12 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
default: abort();
}
}
+
+ jmp_buf trapState;
+
+ void trap() override {
+ longjmp(trapState, 1);
+ }
};
int main(int argc, char **argv) {