summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.c
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-10-24 14:02:18 -0700
committerBen Smith <binji@chromium.org>2016-11-03 13:05:36 -0700
commit5a1be55f5a50c1df5cdce6412a589bafa5fab1df (patch)
treeec4f75ff60d7363331dc45e615eb07d199e0f2da /src/wasm-interpreter.c
parentfe4f7d4f0d85826f8babbda76607654380cfc050 (diff)
downloadwabt-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.c')
-rw-r--r--src/wasm-interpreter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-interpreter.c b/src/wasm-interpreter.c
index 574dcc66..70b4bd1c 100644
--- a/src/wasm-interpreter.c
+++ b/src/wasm-interpreter.c
@@ -180,7 +180,7 @@ WasmInterpreterResult wasm_push_thread_value(WasmInterpreterThread* thread,
WasmInterpreterExport* wasm_get_interpreter_export_by_name(
WasmInterpreterModule* module,
- WasmStringSlice* name) {
+ const WasmStringSlice* name) {
int field_index =
wasm_find_binding_index_by_name(&module->export_bindings, name);
if (field_index < 0)
@@ -232,7 +232,7 @@ void wasm_destroy_interpreter_thread(WasmAllocator* allocator,
#define F32_SIG_MASK 0x7fffff
#define F32_SIGN_MASK 0x80000000U
-static WASM_INLINE WasmBool is_nan_f32(uint32_t f32_bits) {
+WASM_INLINE WasmBool is_nan_f32(uint32_t f32_bits) {
return (f32_bits > F32_INF && f32_bits < F32_NEG_ZERO) ||
(f32_bits > F32_NEG_INF);
}
@@ -297,7 +297,7 @@ static WASM_INLINE WasmBool is_in_range_i64_trunc_u_f32(uint32_t f32_bits) {
#define F64_SIG_MASK 0xfffffffffffffULL
#define F64_SIGN_MASK 0x8000000000000000ULL
-static WASM_INLINE WasmBool is_nan_f64(uint64_t f64_bits) {
+WASM_INLINE WasmBool is_nan_f64(uint64_t f64_bits) {
return (f64_bits > F64_INF && f64_bits < F64_NEG_ZERO) ||
(f64_bits > F64_NEG_INF);
}