diff options
author | Ben Smith <binji@chromium.org> | 2016-10-24 14:02:18 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-11-03 13:05:36 -0700 |
commit | 5a1be55f5a50c1df5cdce6412a589bafa5fab1df (patch) | |
tree | ec4f75ff60d7363331dc45e615eb07d199e0f2da /src/wasm-interpreter.h | |
parent | fe4f7d4f0d85826f8babbda76607654380cfc050 (diff) | |
download | wabt-5a1be55f5a50c1df5cdce6412a589bafa5fab1df.tar.gz wabt-5a1be55f5a50c1df5cdce6412a589bafa5fab1df.tar.bz2 wabt-5a1be55f5a50c1df5cdce6412a589bafa5fab1df.zip |
Use a new format for the spec JSON writer/parser
The previous spec JSON format was defined around modules. This is
because the previous spec tests would only run assertions on the most
recently read module. In addition, the previous spec writer would write
the assertions as new exported functions in the module, and run those.
The primary reason for doing this was to allow for passing/returning i64
values, which was necessary to test in a JavaScript host.
Now that the primary host for running the spec tests is wasm-interp, we
no longer need do bundle assertions into the module. Also, some of the
new spec tests allow running exported functions on a module that is not
the most-recently-read module.
The new spec test format is now defined around commands. The commands
map directly to the spec format commands, e.g. `module`,
`assert_invalid`, `assert_trap`, etc.
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 2b470348..4cbb1ff8 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -53,7 +53,12 @@ struct WasmStream; /* expected type */ \ V(TRAP_HOST_RESULT_TYPE_MISMATCH, "host result type mismatch") \ /* we called an import function, but it didn't complete succesfully */ \ - V(TRAP_HOST_TRAPPED, "host function trapped") + V(TRAP_HOST_TRAPPED, "host function trapped") \ + /* we attempted to call a function with the an argument list that doesn't \ + * match the function signature */ \ + V(ARGUMENT_TYPE_MISMATCH, "argument type mismatch") \ + /* we tried to call an exported function by name that doesn't exist */ \ + V(UNKNOWN_EXPORTED_FUNCTION, "unknown exported function") typedef enum WasmInterpreterResult { #define V(name, str) WASM_INTERPRETER_##name, @@ -259,6 +264,9 @@ typedef struct WasmInterpreterThreadOptions { } WasmInterpreterThreadOptions; WASM_EXTERN_C_BEGIN +WasmBool is_nan_f32(uint32_t f32_bits); +WasmBool is_nan_f64(uint64_t f64_bits); + void wasm_init_interpreter_environment(WasmAllocator* allocator, WasmInterpreterEnvironment* env); void wasm_destroy_interpreter_environment(WasmAllocator* allocator, @@ -291,7 +299,7 @@ void wasm_disassemble_module(WasmInterpreterEnvironment* env, WasmInterpreterExport* wasm_get_interpreter_export_by_name( WasmInterpreterModule* module, - WasmStringSlice* name); + const WasmStringSlice* name); WASM_EXTERN_C_END #endif /* WASM_INTERPRETER_H_ */ |