diff options
Diffstat (limited to 'test/wasm2js')
-rw-r--r-- | test/wasm2js/br.2asm.js | 4 | ||||
-rw-r--r-- | test/wasm2js/br_table.2asm.js | 4 | ||||
-rw-r--r-- | test/wasm2js/br_table_temp.2asm.js | 4 | ||||
-rw-r--r-- | test/wasm2js/br_table_temp.wast | 78 | ||||
-rw-r--r-- | test/wasm2js/conversions-modified.wast | 50 | ||||
-rw-r--r-- | test/wasm2js/float-ops.wast | 100 | ||||
-rw-r--r-- | test/wasm2js/float_literals-modified.wast | 120 | ||||
-rw-r--r-- | test/wasm2js/func-ptr-offset.wast | 4 | ||||
-rw-r--r-- | test/wasm2js/get-set-local.wast | 10 | ||||
-rw-r--r-- | test/wasm2js/i64-add-sub.wast | 4 | ||||
-rw-r--r-- | test/wasm2js/i64-ctz.wast | 4 | ||||
-rw-r--r-- | test/wasm2js/i64-lowering.wast | 20 | ||||
-rw-r--r-- | test/wasm2js/i64-rotate.wast | 4 | ||||
-rw-r--r-- | test/wasm2js/i64-select.wast | 2 | ||||
-rw-r--r-- | test/wasm2js/i64-shifts.wast | 4 | ||||
-rw-r--r-- | test/wasm2js/nested-selects.wast | 4 | ||||
-rw-r--r-- | test/wasm2js/reinterpret.wast | 4 | ||||
-rw-r--r-- | test/wasm2js/stack-modified.wast | 100 | ||||
-rw-r--r-- | test/wasm2js/unary-ops.wast | 18 | ||||
-rw-r--r-- | test/wasm2js/wasm2js.wast.asserts | 4 |
20 files changed, 271 insertions, 271 deletions
diff --git a/test/wasm2js/br.2asm.js b/test/wasm2js/br.2asm.js index bea5cf57b..eef6db45e 100644 --- a/test/wasm2js/br.2asm.js +++ b/test/wasm2js/br.2asm.js @@ -648,7 +648,7 @@ function asmFunc(global, env, buffer) { as_call_indirect_first: $35, as_call_indirect_mid: $36, as_call_indirect_last: $37, - as_set_local_value: $38, + as_local_set_value: $38, as_load_address: $39, as_loadN_address: $40, as_store_address: $41, @@ -710,7 +710,7 @@ export const as_call_indirect_func = retasmFunc.as_call_indirect_func; export const as_call_indirect_first = retasmFunc.as_call_indirect_first; export const as_call_indirect_mid = retasmFunc.as_call_indirect_mid; export const as_call_indirect_last = retasmFunc.as_call_indirect_last; -export const as_set_local_value = retasmFunc.as_set_local_value; +export const as_local_set_value = retasmFunc.as_local_set_value; export const as_load_address = retasmFunc.as_load_address; export const as_loadN_address = retasmFunc.as_loadN_address; export const as_store_address = retasmFunc.as_store_address; diff --git a/test/wasm2js/br_table.2asm.js b/test/wasm2js/br_table.2asm.js index 655e2c96f..e9ba28bc3 100644 --- a/test/wasm2js/br_table.2asm.js +++ b/test/wasm2js/br_table.2asm.js @@ -50294,7 +50294,7 @@ function asmFunc(global, env, buffer) { as_call_indirect_mid: $42, as_call_indirect_last: $43, as_call_indirect_func: $44, - as_set_local_value: $45, + as_local_set_value: $45, as_load_address: $46, as_loadN_address: $47, as_store_address: $48, @@ -50363,7 +50363,7 @@ export const as_call_indirect_first = retasmFunc.as_call_indirect_first; export const as_call_indirect_mid = retasmFunc.as_call_indirect_mid; export const as_call_indirect_last = retasmFunc.as_call_indirect_last; export const as_call_indirect_func = retasmFunc.as_call_indirect_func; -export const as_set_local_value = retasmFunc.as_set_local_value; +export const as_local_set_value = retasmFunc.as_local_set_value; export const as_load_address = retasmFunc.as_load_address; export const as_loadN_address = retasmFunc.as_loadN_address; export const as_store_address = retasmFunc.as_store_address; diff --git a/test/wasm2js/br_table_temp.2asm.js b/test/wasm2js/br_table_temp.2asm.js index 97f5950ba..66524e7e7 100644 --- a/test/wasm2js/br_table_temp.2asm.js +++ b/test/wasm2js/br_table_temp.2asm.js @@ -50290,7 +50290,7 @@ function asmFunc(global, env, buffer) { as_call_indirect_mid: $42, as_call_indirect_last: $43, as_call_indirect_func: $44, - as_set_local_value: $45, + as_local_set_value: $45, as_load_address: $46, as_loadN_address: $47, as_store_address: $48, @@ -50359,7 +50359,7 @@ export const as_call_indirect_first = retasmFunc.as_call_indirect_first; export const as_call_indirect_mid = retasmFunc.as_call_indirect_mid; export const as_call_indirect_last = retasmFunc.as_call_indirect_last; export const as_call_indirect_func = retasmFunc.as_call_indirect_func; -export const as_set_local_value = retasmFunc.as_set_local_value; +export const as_local_set_value = retasmFunc.as_local_set_value; export const as_load_address = retasmFunc.as_load_address; export const as_loadN_address = retasmFunc.as_loadN_address; export const as_store_address = retasmFunc.as_store_address; diff --git a/test/wasm2js/br_table_temp.wast b/test/wasm2js/br_table_temp.wast index 1ab685a7b..865072b28 100644 --- a/test/wasm2js/br_table_temp.wast +++ b/test/wasm2js/br_table_temp.wast @@ -21,7 +21,7 @@ (block i32 (i32.ctz (br_table 0 0 (i32.const 1) (i32.const 0)))) ) (func (export "type-i64-value") (result i32) - (i32.wrap/i64 (block i64 (i64.ctz (br_table 0 0 (i64.const 2) (i32.const 0))))) + (i32.wrap_i64 (block i64 (i64.ctz (br_table 0 0 (i64.const 2) (i32.const 0))))) ) (func (export "type-f32-value") (result f32) (block f32 (f32.neg (br_table 0 0 (f32.const 3) (i32.const 0)))) @@ -31,17 +31,17 @@ ) (func (export "empty") (param i32) (result i32) - (block (br_table 0 (get_local 0)) (return (i32.const 21))) + (block (br_table 0 (local.get 0)) (return (i32.const 21))) (i32.const 22) ) (func (export "empty-value") (param i32) (result i32) - (block i32 (br_table 0 (i32.const 33) (get_local 0)) (i32.const 31)) + (block i32 (br_table 0 (i32.const 33) (local.get 0)) (i32.const 31)) ) (func (export "singleton") (param i32) (result i32) (block (block - (br_table 1 0 (get_local 0)) + (br_table 1 0 (local.get 0)) (return (i32.const 21)) ) (return (i32.const 20)) @@ -53,7 +53,7 @@ (block i32 (drop (block i32 - (br_table 0 1 (i32.const 33) (get_local 0)) + (br_table 0 1 (i32.const 33) (local.get 0)) (return (i32.const 31)) ) ) @@ -67,7 +67,7 @@ (block (block (block - (br_table 3 2 1 0 4 (get_local 0)) + (br_table 3 2 1 0 4 (local.get 0)) (return (i32.const 99)) ) (return (i32.const 100)) @@ -83,23 +83,23 @@ (func (export "multiple-value") (param i32) (result i32) (local i32) - (set_local 1 (block i32 - (set_local 1 (block i32 - (set_local 1 (block i32 - (set_local 1 (block i32 - (set_local 1 (block i32 - (br_table 3 2 1 0 4 (i32.const 200) (get_local 0)) - (return (i32.add (get_local 1) (i32.const 99))) + (local.set 1 (block i32 + (local.set 1 (block i32 + (local.set 1 (block i32 + (local.set 1 (block i32 + (local.set 1 (block i32 + (br_table 3 2 1 0 4 (i32.const 200) (local.get 0)) + (return (i32.add (local.get 1) (i32.const 99))) )) - (return (i32.add (get_local 1) (i32.const 10))) + (return (i32.add (local.get 1) (i32.const 10))) )) - (return (i32.add (get_local 1) (i32.const 11))) + (return (i32.add (local.get 1) (i32.const 11))) )) - (return (i32.add (get_local 1) (i32.const 12))) + (return (i32.add (local.get 1) (i32.const 12))) )) - (return (i32.add (get_local 1) (i32.const 13))) + (return (i32.add (local.get 1) (i32.const 13))) )) - (i32.add (get_local 1) (i32.const 14)) + (i32.add (local.get 1) (i32.const 14)) ) (func (export "large") (param i32) (result i32) @@ -830,7 +830,7 @@ 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 - (get_local 0) + (local.get 0) ) (return (i32.const -1)) ) @@ -903,7 +903,7 @@ ) (func (export "as-return-value") (result i32) - (i32.wrap/i64 (block i64 (return (br_table 0 (i64.const 7) (i32.const 0))))) + (i32.wrap_i64 (block i64 (return (br_table 0 (i64.const 7) (i32.const 0))))) ) (func (export "as-if-cond") (result i32) @@ -918,17 +918,17 @@ (func (export "as-if-then") (param i32 i32) (result i32) (block i32 (if i32 - (get_local 0) + (local.get 0) (br_table 1 (i32.const 3) (i32.const 0)) - (get_local 1) + (local.get 1) ) ) ) (func (export "as-if-else") (param i32 i32) (result i32) (block i32 (if i32 - (get_local 0) - (get_local 1) + (local.get 0) + (local.get 1) (br_table 1 0 (i32.const 4) (i32.const 0)) ) ) @@ -937,14 +937,14 @@ (func (export "as-select-first") (param i32 i32) (result i32) (block i32 (select - (br_table 0 (i32.const 5) (i32.const 0)) (get_local 0) (get_local 1) + (br_table 0 (i32.const 5) (i32.const 0)) (local.get 0) (local.get 1) ) ) ) (func (export "as-select-second") (param i32 i32) (result i32) (block i32 (select - (get_local 0) (br_table 0 (i32.const 6) (i32.const 1)) (get_local 1) + (local.get 0) (br_table 0 (i32.const 6) (i32.const 1)) (local.get 1) ) ) ) @@ -980,7 +980,7 @@ ) (type $sig (func (param i32 i32 i32) (result i32))) - (table anyfunc (elem $f)) + (table funcref (elem $f)) (func (export "as-call_indirect-first") (result i32) (block i32 (call_indirect (type $sig) @@ -1014,10 +1014,10 @@ ) ) - (func (export "as-set_local-value") (result i32) + (func (export "as-local.set-value") (result i32) (local f32) (block i32 - (set_local 0 (br_table 0 (i32.const 17) (i32.const 1))) + (local.set 0 (br_table 0 (i32.const 17) (i32.const 1))) (i32.const -1) ) ) @@ -1027,7 +1027,7 @@ (block i32 (i32.load (br_table 0 (i32.const 2) (i32.const 1)))) ) (func (export "as-loadN-address") (result i32) - (i32.wrap/i64 (block i64 (i64.load8_s (br_table 0 (i64.const 30) (i32.const 1))))) + (i32.wrap_i64 (block i64 (i64.load8_s (br_table 0 (i64.const 30) (i32.const 1))))) ) (func (export "as-store-address") (result i32) @@ -1066,7 +1066,7 @@ ) ) (func (export "as-binary-right") (result i32) - (i32.wrap/i64 (block i64 + (i32.wrap_i64 (block i64 (i64.add (i64.const 10) (br_table 0 (i64.const 45) (i32.const 0)))) ) ) @@ -1087,7 +1087,7 @@ ) (func (export "as-convert-operand") (result i32) - (block i32 (i32.wrap/i64 (br_table 0 (i32.const 41) (i32.const 0)))) + (block i32 (i32.wrap_i64 (br_table 0 (i32.const 41) (i32.const 0)))) ) (func (export "as-grow_memory-size") (result i32) @@ -1106,7 +1106,7 @@ (drop (i32.const 4)) (i32.add (i32.const 8) - (br_table 0 1 2 (i32.const 16) (get_local 0)) + (br_table 0 1 2 (i32.const 16) (local.get 0)) ) ) ) @@ -1124,7 +1124,7 @@ (drop (block i32 (drop (i32.const 4)) - (br 0 (br_table 2 1 0 (i32.const 8) (get_local 0))) + (br 0 (br_table 2 1 0 (i32.const 8) (local.get 0))) ) ) (i32.const 16) @@ -1142,7 +1142,7 @@ (drop (block i32 (drop (i32.const 4)) - (br_if 0 (br_table 0 1 2 (i32.const 8) (get_local 0)) (i32.const 1)) + (br_if 0 (br_table 0 1 2 (i32.const 8) (local.get 0)) (i32.const 1)) (i32.const 32) ) ) @@ -1158,7 +1158,7 @@ (i32.const 1) (block i32 (drop (i32.const 2)) - (drop (br_if 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (get_local 0)))) + (drop (br_if 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (local.get 0)))) (i32.const 16) ) ) @@ -1174,7 +1174,7 @@ (drop (block i32 (drop (i32.const 4)) - (br_table 0 (br_table 0 1 2 (i32.const 8) (get_local 0)) (i32.const 1)) + (br_table 0 (br_table 0 1 2 (i32.const 8) (local.get 0)) (i32.const 1)) (i32.const 32) ) ) @@ -1190,7 +1190,7 @@ (i32.const 1) (block i32 (drop (i32.const 2)) - (br_table 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (get_local 0))) + (br_table 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (local.get 0))) (i32.const 16) ) ) @@ -1309,7 +1309,7 @@ (assert_return (invoke "as-call_indirect-last") (i32.const 22)) (assert_return (invoke "as-call_indirect-func") (i32.const 23)) -(assert_return (invoke "as-set_local-value") (i32.const 17)) +(assert_return (invoke "as-local.set-value") (i32.const 17)) (assert_return (invoke "as-load-address") (i32.const 2)) (assert_return (invoke "as-loadN-address") (i32.const 30)) diff --git a/test/wasm2js/conversions-modified.wast b/test/wasm2js/conversions-modified.wast index 4e410032b..d2f732ce5 100644 --- a/test/wasm2js/conversions-modified.wast +++ b/test/wasm2js/conversions-modified.wast @@ -1,29 +1,29 @@ (module - (func (export "i64.extend_s_i32") (param $x i32) (result i64) (i64.extend_s/i32 (get_local $x))) - (func (export "i64.extend_u_i32") (param $x i32) (result i64) (i64.extend_u/i32 (get_local $x))) - (func (export "i32.wrap_i64") (param $x i64) (result i32) (i32.wrap/i64 (get_local $x))) - (func (export "i32.trunc_s_f32") (param $x f32) (result i32) (i32.trunc_s/f32 (get_local $x))) - (func (export "i32.trunc_u_f32") (param $x f32) (result i32) (i32.trunc_u/f32 (get_local $x))) - (func (export "i32.trunc_s_f64") (param $x f64) (result i32) (i32.trunc_s/f64 (get_local $x))) - (func (export "i32.trunc_u_f64") (param $x f64) (result i32) (i32.trunc_u/f64 (get_local $x))) - (func (export "i64.trunc_s_f32") (param $x f32) (result i64) (i64.trunc_s/f32 (get_local $x))) - (func (export "i64.trunc_u_f32") (param $x f32) (result i64) (i64.trunc_u/f32 (get_local $x))) - (func (export "i64.trunc_s_f64") (param $x f64) (result i64) (i64.trunc_s/f64 (get_local $x))) - (func (export "i64.trunc_u_f64") (param $x f64) (result i64) (i64.trunc_u/f64 (get_local $x))) - (func (export "f32.convert_s_i32") (param $x i32) (result f32) (f32.convert_s/i32 (get_local $x))) - (func (export "f32.convert_s_i64") (param $x i64) (result f32) (f32.convert_s/i64 (get_local $x))) - (func (export "f64.convert_s_i32") (param $x i32) (result f64) (f64.convert_s/i32 (get_local $x))) - (func (export "f64.convert_s_i64") (param $x i64) (result f64) (f64.convert_s/i64 (get_local $x))) - (func (export "f32.convert_u_i32") (param $x i32) (result f32) (f32.convert_u/i32 (get_local $x))) - (func (export "f32.convert_u_i64") (param $x i64) (result f32) (f32.convert_u/i64 (get_local $x))) - (func (export "f64.convert_u_i32") (param $x i32) (result f64) (f64.convert_u/i32 (get_local $x))) - (func (export "f64.convert_u_i64") (param $x i64) (result f64) (f64.convert_u/i64 (get_local $x))) - (func (export "f64.promote_f32") (param $x f32) (result f64) (f64.promote/f32 (get_local $x))) - (func (export "f32.demote_f64") (param $x f64) (result f32) (f32.demote/f64 (get_local $x))) - (func (export "f32.reinterpret_i32") (param $x i32) (result f32) (f32.reinterpret/i32 (get_local $x))) - (func (export "f64.reinterpret_i64") (param $x i64) (result f64) (f64.reinterpret/i64 (get_local $x))) - (func (export "i32.reinterpret_f32") (param $x f32) (result i32) (i32.reinterpret/f32 (get_local $x))) - (func (export "i64.reinterpret_f64") (param $x f64) (result i64) (i64.reinterpret/f64 (get_local $x))) + (func (export "i64.extend_s_i32") (param $x i32) (result i64) (i64.extend_i32_s (local.get $x))) + (func (export "i64.extend_u_i32") (param $x i32) (result i64) (i64.extend_i32_u (local.get $x))) + (func (export "i32.wrap_i64") (param $x i64) (result i32) (i32.wrap_i64 (local.get $x))) + (func (export "i32.trunc_s_f32") (param $x f32) (result i32) (i32.trunc_f32_s (local.get $x))) + (func (export "i32.trunc_u_f32") (param $x f32) (result i32) (i32.trunc_f32_u (local.get $x))) + (func (export "i32.trunc_s_f64") (param $x f64) (result i32) (i32.trunc_f64_s (local.get $x))) + (func (export "i32.trunc_u_f64") (param $x f64) (result i32) (i32.trunc_f64_u (local.get $x))) + (func (export "i64.trunc_s_f32") (param $x f32) (result i64) (i64.trunc_f32_s (local.get $x))) + (func (export "i64.trunc_u_f32") (param $x f32) (result i64) (i64.trunc_f32_u (local.get $x))) + (func (export "i64.trunc_s_f64") (param $x f64) (result i64) (i64.trunc_f64_s (local.get $x))) + (func (export "i64.trunc_u_f64") (param $x f64) (result i64) (i64.trunc_f64_u (local.get $x))) + (func (export "f32.convert_s_i32") (param $x i32) (result f32) (f32.convert_i32_s (local.get $x))) + (func (export "f32.convert_s_i64") (param $x i64) (result f32) (f32.convert_i64_s (local.get $x))) + (func (export "f64.convert_s_i32") (param $x i32) (result f64) (f64.convert_i32_s (local.get $x))) + (func (export "f64.convert_s_i64") (param $x i64) (result f64) (f64.convert_i64_s (local.get $x))) + (func (export "f32.convert_u_i32") (param $x i32) (result f32) (f32.convert_i32_u (local.get $x))) + (func (export "f32.convert_u_i64") (param $x i64) (result f32) (f32.convert_i64_u (local.get $x))) + (func (export "f64.convert_u_i32") (param $x i32) (result f64) (f64.convert_i32_u (local.get $x))) + (func (export "f64.convert_u_i64") (param $x i64) (result f64) (f64.convert_i64_u (local.get $x))) + (func (export "f64.promote_f32") (param $x f32) (result f64) (f64.promote_f32 (local.get $x))) + (func (export "f32.demote_f64") (param $x f64) (result f32) (f32.demote_f64 (local.get $x))) + (func (export "f32.reinterpret_i32") (param $x i32) (result f32) (f32.reinterpret_i32 (local.get $x))) + (func (export "f64.reinterpret_i64") (param $x i64) (result f64) (f64.reinterpret_i64 (local.get $x))) + (func (export "i32.reinterpret_f32") (param $x f32) (result i32) (i32.reinterpret_f32 (local.get $x))) + (func (export "i64.reinterpret_f64") (param $x f64) (result i64) (i64.reinterpret_f64 (local.get $x))) ) (assert_return (invoke "i64.extend_s_i32" (i32.const 0)) (i64.const 0)) diff --git a/test/wasm2js/float-ops.wast b/test/wasm2js/float-ops.wast index f724149cb..363157a20 100644 --- a/test/wasm2js/float-ops.wast +++ b/test/wasm2js/float-ops.wast @@ -2,146 +2,146 @@ (func $dummy) (func (export "f32.add") (param $0 f32) (param $1 f32) (result f32) - (f32.add (get_local $0) (get_local $1))) + (f32.add (local.get $0) (local.get $1))) (func (export "f32.sub") (param $0 f32) (param $1 f32) (result f32) - (f32.sub (get_local $0) (get_local $1))) + (f32.sub (local.get $0) (local.get $1))) (func (export "f32.mul") (param $0 f32) (param $1 f32) (result f32) - (f32.mul (get_local $0) (get_local $1))) + (f32.mul (local.get $0) (local.get $1))) (func (export "f32.div") (param $0 f32) (param $1 f32) (result f32) - (f32.div (get_local $0) (get_local $1))) + (f32.div (local.get $0) (local.get $1))) (func (export "f64.add") (param $0 f64) (param $1 f64) (result f64) - (f64.add (get_local $0) (get_local $1))) + (f64.add (local.get $0) (local.get $1))) (func (export "f64.sub") (param $0 f64) (param $1 f64) (result f64) - (f64.sub (get_local $0) (get_local $1))) + (f64.sub (local.get $0) (local.get $1))) (func (export "f64.mul") (param $0 f64) (param $1 f64) (result f64) - (f64.mul (get_local $0) (get_local $1))) + (f64.mul (local.get $0) (local.get $1))) (func (export "f64.div") (param $0 f64) (param $1 f64) (result f64) - (f64.div (get_local $0) (get_local $1))) + (f64.div (local.get $0) (local.get $1))) ;; comparisons (func (export "f32.eq") (param $0 f32) (param $1 f32) (result i32) - (f32.eq (get_local $0) (get_local $1))) + (f32.eq (local.get $0) (local.get $1))) (func (export "f32.ne") (param $0 f32) (param $1 f32) (result i32) - (f32.ne (get_local $0) (get_local $1))) + (f32.ne (local.get $0) (local.get $1))) (func (export "f32.ge") (param $0 f32) (param $1 f32) (result i32) - (f32.ge (get_local $0) (get_local $1))) + (f32.ge (local.get $0) (local.get $1))) (func (export "f32.gt") (param $0 f32) (param $1 f32) (result i32) - (f32.gt (get_local $0) (get_local $1))) + (f32.gt (local.get $0) (local.get $1))) (func (export "f32.le") (param $0 f32) (param $1 f32) (result i32) - (f32.le (get_local $0) (get_local $1))) + (f32.le (local.get $0) (local.get $1))) (func (export "f32.lt") (param $0 f32) (param $1 f32) (result i32) - (f32.lt (get_local $0) (get_local $1))) + (f32.lt (local.get $0) (local.get $1))) (func (export "f64.eq") (param $0 f64) (param $1 f64) (result i32) - (f64.eq (get_local $0) (get_local $1))) + (f64.eq (local.get $0) (local.get $1))) (func (export "f64.ne") (param $0 f64) (param $1 f64) (result i32) - (f64.ne (get_local $0) (get_local $1))) + (f64.ne (local.get $0) (local.get $1))) (func (export "f64.ge") (param $0 f64) (param $1 f64) (result i32) - (f64.ge (get_local $0) (get_local $1))) + (f64.ge (local.get $0) (local.get $1))) (func (export "f64.gt") (param $0 f64) (param $1 f64) (result i32) - (f64.gt (get_local $0) (get_local $1))) + (f64.gt (local.get $0) (local.get $1))) (func (export "f64.le") (param $0 f64) (param $1 f64) (result i32) - (f64.le (get_local $0) (get_local $1))) + (f64.le (local.get $0) (local.get $1))) (func (export "f64.lt") (param $0 f64) (param $1 f64) (result i32) - (f64.lt (get_local $0) (get_local $1))) + (f64.lt (local.get $0) (local.get $1))) ;; min/max (func (export "f32.min") (param $0 f32) (param $1 f32) (result f32) - (f32.min (get_local $0) (get_local $1))) + (f32.min (local.get $0) (local.get $1))) (func (export "f32.max") (param $0 f32) (param $1 f32) (result f32) - (f32.max (get_local $0) (get_local $1))) + (f32.max (local.get $0) (local.get $1))) (func (export "f64.min") (param $0 f64) (param $1 f64) (result f64) - (f64.min (get_local $0) (get_local $1))) + (f64.min (local.get $0) (local.get $1))) (func (export "f64.max") (param $0 f64) (param $1 f64) (result f64) - (f64.max (get_local $0) (get_local $1))) + (f64.max (local.get $0) (local.get $1))) ;; promotion/demotion (func (export "f64.promote") (param $0 f32) (result f64) - (f64.promote/f32 (get_local $0))) + (f64.promote_f32 (local.get $0))) (func (export "f32.demote") (param $0 f64) (result f32) - (f32.demote/f64 (get_local $0))) + (f32.demote_f64 (local.get $0))) ;; floor/ceil (func (export "f32.floor") (param $0 f32) (result f32) - (f32.floor (get_local $0))) + (f32.floor (local.get $0))) (func (export "f32.ceil") (param $0 f32) (result f32) - (f32.ceil (get_local $0))) + (f32.ceil (local.get $0))) (func (export "f64.floor") (param $0 f64) (result f64) - (f64.floor (get_local $0))) + (f64.floor (local.get $0))) (func (export "f64.ceil") (param $0 f64) (result f64) - (f64.ceil (get_local $0))) + (f64.ceil (local.get $0))) ;; sqrt (func (export "f32.sqrt") (param $0 f32) (result f32) - (f32.sqrt (get_local $0))) + (f32.sqrt (local.get $0))) (func (export "f64.sqrt") (param $0 f64) (result f64) - (f64.sqrt (get_local $0))) + (f64.sqrt (local.get $0))) ;; copysign (func $copysign64 (param $0 f64) (param $1 f64) (result f64) - (f64.copysign (get_local $0) (get_local $1))) + (f64.copysign (local.get $0) (local.get $1))) (func $copysign32 (param $0 f32) (param $1 f32) (result f32) - (f32.copysign (get_local $0) (get_local $1))) + (f32.copysign (local.get $0) (local.get $1))) ;; float<->int (func (export "i32_to_f32") (param $0 i32) (result f32) - (f32.convert_s/i32 (get_local $0))) + (f32.convert_i32_s (local.get $0))) (func (export "i32_to_f64") (param $0 i32) (result f64) - (f64.convert_s/i32 (get_local $0))) + (f64.convert_i32_s (local.get $0))) (func (export "u32_to_f32") (param $0 i32) (result f32) - (f32.convert_u/i32 (get_local $0))) + (f32.convert_i32_u (local.get $0))) (func (export "u32_to_f64") (param $0 i32) (result f64) - (f64.convert_u/i32 (get_local $0))) + (f64.convert_i32_u (local.get $0))) (func (export "f32_to_i32") (param $0 f32) (result i32) - (i32.trunc_s/f32 (get_local $0))) + (i32.trunc_f32_s (local.get $0))) (func (export "f64_to_i32") (param $0 f64) (result i32) - (i32.trunc_s/f64 (get_local $0))) + (i32.trunc_f64_s (local.get $0))) (func (export "f32_to_u32") (param $0 f32) (result i32) - (i32.trunc_u/f32 (get_local $0))) + (i32.trunc_f32_u (local.get $0))) (func (export "f64_to_u32") (param $0 f64) (result i32) - (i32.trunc_u/f64 (get_local $0))) + (i32.trunc_f64_u (local.get $0))) (func (export "i64_to_f32") (param $0 i64) (result f32) - (f32.convert_s/i64 (get_local $0))) + (f32.convert_i64_s (local.get $0))) (func (export "i64_to_f64") (param $0 i64) (result f64) - (f64.convert_s/i64 (get_local $0))) + (f64.convert_i64_s (local.get $0))) (func (export "u64_to_f32") (param $0 i64) (result f32) - (f32.convert_u/i64 (get_local $0))) + (f32.convert_i64_u (local.get $0))) (func (export "u64_to_f64") (param $0 i64) (result f64) - (f64.convert_u/i64 (get_local $0))) + (f64.convert_i64_u (local.get $0))) (func (export "f32_to_i64") (param $0 f32) (result i32) - (i64.eq (i64.trunc_s/f32 (get_local $0)) (i64.const 0))) + (i64.eq (i64.trunc_f32_s (local.get $0)) (i64.const 0))) (func (export "f64_to_i64") (param $0 f64) (result i32) - (i64.eq (i64.trunc_s/f64 (get_local $0)) (i64.const 0))) + (i64.eq (i64.trunc_f64_s (local.get $0)) (i64.const 0))) (func (export "f32_to_u64") (param $0 f32) (result i32) - (i64.eq (i64.trunc_u/f32 (get_local $0)) (i64.const 0))) + (i64.eq (i64.trunc_f32_u (local.get $0)) (i64.const 0))) (func (export "f64_to_u64") (param $0 f64) (result i32) - (i64.eq (i64.trunc_u/f64 (get_local $0)) (i64.const 0))) + (i64.eq (i64.trunc_f64_u (local.get $0)) (i64.const 0))) ) diff --git a/test/wasm2js/float_literals-modified.wast b/test/wasm2js/float_literals-modified.wast index aed4ab603..7ffc0942d 100644 --- a/test/wasm2js/float_literals-modified.wast +++ b/test/wasm2js/float_literals-modified.wast @@ -2,76 +2,76 @@ (module ;; f32 special values - (func (export "f32.nan") (result i32) (i32.reinterpret/f32 (f32.const nan))) - (func (export "f32.positive_nan") (result i32) (i32.reinterpret/f32 (f32.const +nan))) - (func (export "f32.negative_nan") (result i32) (i32.reinterpret/f32 (f32.const -nan))) - (func (export "f32.plain_nan") (result i32) (i32.reinterpret/f32 (f32.const nan:0x400000))) - (func (export "f32.informally_known_as_plain_snan") (result i32) (i32.reinterpret/f32 (f32.const nan:0x200000))) - (func (export "f32.all_ones_nan") (result i32) (i32.reinterpret/f32 (f32.const -nan:0x7fffff))) - (func (export "f32.misc_nan") (result i32) (i32.reinterpret/f32 (f32.const nan:0x012345))) - (func (export "f32.misc_positive_nan") (result i32) (i32.reinterpret/f32 (f32.const +nan:0x304050))) - (func (export "f32.misc_negative_nan") (result i32) (i32.reinterpret/f32 (f32.const -nan:0x2abcde))) - (func (export "f32.infinity") (result i32) (i32.reinterpret/f32 (f32.const infinity))) - (func (export "f32.positive_infinity") (result i32) (i32.reinterpret/f32 (f32.const +infinity))) - (func (export "f32.negative_infinity") (result i32) (i32.reinterpret/f32 (f32.const -infinity))) + (func (export "f32.nan") (result i32) (i32.reinterpret_f32 (f32.const nan))) + (func (export "f32.positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan))) + (func (export "f32.negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan))) + (func (export "f32.plain_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x400000))) + (func (export "f32.informally_known_as_plain_snan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x200000))) + (func (export "f32.all_ones_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x7fffff))) + (func (export "f32.misc_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x012345))) + (func (export "f32.misc_positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan:0x304050))) + (func (export "f32.misc_negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x2abcde))) + (func (export "f32.infinity") (result i32) (i32.reinterpret_f32 (f32.const infinity))) + (func (export "f32.positive_infinity") (result i32) (i32.reinterpret_f32 (f32.const +infinity))) + (func (export "f32.negative_infinity") (result i32) (i32.reinterpret_f32 (f32.const -infinity))) ;; f32 numbers - (func (export "f32.zero") (result i32) (i32.reinterpret/f32 (f32.const 0x0.0p0))) - (func (export "f32.positive_zero") (result i32) (i32.reinterpret/f32 (f32.const +0x0.0p0))) - (func (export "f32.negative_zero") (result i32) (i32.reinterpret/f32 (f32.const -0x0.0p0))) - (func (export "f32.misc") (result i32) (i32.reinterpret/f32 (f32.const 0x1.921fb6p+2))) - (func (export "f32.min_positive") (result i32) (i32.reinterpret/f32 (f32.const 0x1p-149))) - (func (export "f32.min_normal") (result i32) (i32.reinterpret/f32 (f32.const 0x1p-126))) - (func (export "f32.max_finite") (result i32) (i32.reinterpret/f32 (f32.const 0x1.fffffep+127))) - (func (export "f32.max_subnormal") (result i32) (i32.reinterpret/f32 (f32.const 0x1.fffffcp-127))) - (func (export "f32.trailing_dot") (result i32) (i32.reinterpret/f32 (f32.const 0x1.p10))) + (func (export "f32.zero") (result i32) (i32.reinterpret_f32 (f32.const 0x0.0p0))) + (func (export "f32.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0x0.0p0))) + (func (export "f32.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0x0.0p0))) + (func (export "f32.misc") (result i32) (i32.reinterpret_f32 (f32.const 0x1.921fb6p+2))) + (func (export "f32.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-149))) + (func (export "f32.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-126))) + (func (export "f32.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffep+127))) + (func (export "f32.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffcp-127))) + (func (export "f32.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 0x1.p10))) ;; f32 in decimal format - (func (export "f32_dec.zero") (result i32) (i32.reinterpret/f32 (f32.const 0.0e0))) - (func (export "f32_dec.positive_zero") (result i32) (i32.reinterpret/f32 (f32.const +0.0e0))) - (func (export "f32_dec.negative_zero") (result i32) (i32.reinterpret/f32 (f32.const -0.0e0))) - (func (export "f32_dec.misc") (result i32) (i32.reinterpret/f32 (f32.const 6.28318548202514648))) - (func (export "f32_dec.min_positive") (result i32) (i32.reinterpret/f32 (f32.const 1.4013e-45))) - (func (export "f32_dec.min_normal") (result i32) (i32.reinterpret/f32 (f32.const 1.1754944e-38))) - (func (export "f32_dec.max_subnormal") (result i32) (i32.reinterpret/f32 (f32.const 1.1754942e-38))) - (func (export "f32_dec.max_finite") (result i32) (i32.reinterpret/f32 (f32.const 3.4028234e+38))) - (func (export "f32_dec.trailing_dot") (result i32) (i32.reinterpret/f32 (f32.const 1.e10))) + (func (export "f32_dec.zero") (result i32) (i32.reinterpret_f32 (f32.const 0.0e0))) + (func (export "f32_dec.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0.0e0))) + (func (export "f32_dec.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0.0e0))) + (func (export "f32_dec.misc") (result i32) (i32.reinterpret_f32 (f32.const 6.28318548202514648))) + (func (export "f32_dec.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 1.4013e-45))) + (func (export "f32_dec.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754944e-38))) + (func (export "f32_dec.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754942e-38))) + (func (export "f32_dec.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 3.4028234e+38))) + (func (export "f32_dec.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 1.e10))) ;; f64 special values - (func (export "f64.nan") (result i64) (i64.reinterpret/f64 (f64.const nan))) - (func (export "f64.positive_nan") (result i64) (i64.reinterpret/f64 (f64.const +nan))) - (func (export "f64.negative_nan") (result i64) (i64.reinterpret/f64 (f64.const -nan))) - (func (export "f64.plain_nan") (result i64) (i64.reinterpret/f64 (f64.const nan:0x8000000000000))) - (func (export "f64.informally_known_as_plain_snan") (result i64) (i64.reinterpret/f64 (f64.const nan:0x4000000000000))) - (func (export "f64.all_ones_nan") (result i64) (i64.reinterpret/f64 (f64.const -nan:0xfffffffffffff))) - (func (export "f64.misc_nan") (result i64) (i64.reinterpret/f64 (f64.const nan:0x0123456789abc))) - (func (export "f64.misc_positive_nan") (result i64) (i64.reinterpret/f64 (f64.const +nan:0x3040506070809))) - (func (export "f64.misc_negative_nan") (result i64) (i64.reinterpret/f64 (f64.const -nan:0x2abcdef012345))) - (func (export "f64.infinity") (result i64) (i64.reinterpret/f64 (f64.const infinity))) - (func (export "f64.positive_infinity") (result i64) (i64.reinterpret/f64 (f64.const +infinity))) - (func (export "f64.negative_infinity") (result i64) (i64.reinterpret/f64 (f64.const -infinity))) + (func (export "f64.nan") (result i64) (i64.reinterpret_f64 (f64.const nan))) + (func (export "f64.positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan))) + (func (export "f64.negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan))) + (func (export "f64.plain_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x8000000000000))) + (func (export "f64.informally_known_as_plain_snan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x4000000000000))) + (func (export "f64.all_ones_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0xfffffffffffff))) + (func (export "f64.misc_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x0123456789abc))) + (func (export "f64.misc_positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan:0x3040506070809))) + (func (export "f64.misc_negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0x2abcdef012345))) + (func (export "f64.infinity") (result i64) (i64.reinterpret_f64 (f64.const infinity))) + (func (export "f64.positive_infinity") (result i64) (i64.reinterpret_f64 (f64.const +infinity))) + (func (export "f64.negative_infinity") (result i64) (i64.reinterpret_f64 (f64.const -infinity))) ;; f64 numbers - (func (export "f64.zero") (result i64) (i64.reinterpret/f64 (f64.const 0x0.0p0))) - (func (export "f64.positive_zero") (result i64) (i64.reinterpret/f64 (f64.const +0x0.0p0))) - (func (export "f64.negative_zero") (result i64) (i64.reinterpret/f64 (f64.const -0x0.0p0))) - (func (export "f64.misc") (result i64) (i64.reinterpret/f64 (f64.const 0x1.921fb54442d18p+2))) - (func (export "f64.min_positive") (result i64) (i64.reinterpret/f64 (f64.const 0x0.0000000000001p-1022))) - (func (export "f64.min_normal") (result i64) (i64.reinterpret/f64 (f64.const 0x1p-1022))) - (func (export "f64.max_subnormal") (result i64) (i64.reinterpret/f64 (f64.const 0x0.fffffffffffffp-1022))) - (func (export "f64.max_finite") (result i64) (i64.reinterpret/f64 (f64.const 0x1.fffffffffffffp+1023))) - (func (export "f64.trailing_dot") (result i64) (i64.reinterpret/f64 (f64.const 0x1.p100))) + (func (export "f64.zero") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0p0))) + (func (export "f64.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0x0.0p0))) + (func (export "f64.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0x0.0p0))) + (func (export "f64.misc") (result i64) (i64.reinterpret_f64 (f64.const 0x1.921fb54442d18p+2))) + (func (export "f64.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0000000000001p-1022))) + (func (export "f64.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 0x1p-1022))) + (func (export "f64.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 0x0.fffffffffffffp-1022))) + (func (export "f64.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 0x1.fffffffffffffp+1023))) + (func (export "f64.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 0x1.p100))) ;; f64 numbers in decimal format - (func (export "f64_dec.zero") (result i64) (i64.reinterpret/f64 (f64.const 0.0e0))) - (func (export "f64_dec.positive_zero") (result i64) (i64.reinterpret/f64 (f64.const +0.0e0))) - (func (export "f64_dec.negative_zero") (result i64) (i64.reinterpret/f64 (f64.const -0.0e0))) - (func (export "f64_dec.misc") (result i64) (i64.reinterpret/f64 (f64.const 6.28318530717958623))) - (func (export "f64_dec.min_positive") (result i64) (i64.reinterpret/f64 (f64.const 4.94066e-324))) - (func (export "f64_dec.min_normal") (result i64) (i64.reinterpret/f64 (f64.const 2.2250738585072012e-308))) - (func (export "f64_dec.max_subnormal") (result i64) (i64.reinterpret/f64 (f64.const 2.2250738585072011e-308))) - (func (export "f64_dec.max_finite") (result i64) (i64.reinterpret/f64 (f64.const 1.7976931348623157e+308))) - (func (export "f64_dec.trailing_dot") (result i64) (i64.reinterpret/f64 (f64.const 1.e100))) + (func (export "f64_dec.zero") (result i64) (i64.reinterpret_f64 (f64.const 0.0e0))) + (func (export "f64_dec.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0.0e0))) + (func (export "f64_dec.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0.0e0))) + (func (export "f64_dec.misc") (result i64) (i64.reinterpret_f64 (f64.const 6.28318530717958623))) + (func (export "f64_dec.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 4.94066e-324))) + (func (export "f64_dec.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072012e-308))) + (func (export "f64_dec.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072011e-308))) + (func (export "f64_dec.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 1.7976931348623157e+308))) + (func (export "f64_dec.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 1.e100))) ) ;;(assert_return (invoke "f32.nan") (i32.const 0x7fc00000)) diff --git a/test/wasm2js/func-ptr-offset.wast b/test/wasm2js/func-ptr-offset.wast index 1c9fdff26..601cb67a4 100644 --- a/test/wasm2js/func-ptr-offset.wast +++ b/test/wasm2js/func-ptr-offset.wast @@ -1,6 +1,6 @@ (module (type $T (func (result i32))) - (table 4 anyfunc) + (table 4 funcref) (elem (i32.const 1) $t1 $t2 $t3) (func $t1 (type $T) (i32.const 1)) @@ -8,7 +8,7 @@ (func $t3 (type $T) (i32.const 3)) (func (export "call") (param i32) (result i32) - (call_indirect (type $T) (get_local $0)) + (call_indirect (type $T) (local.get $0)) ) ) diff --git a/test/wasm2js/get-set-local.wast b/test/wasm2js/get-set-local.wast index 1150c1e26..ae2a1ea9b 100644 --- a/test/wasm2js/get-set-local.wast +++ b/test/wasm2js/get-set-local.wast @@ -1,4 +1,4 @@ -;; Tests for lowering get_local and set_local. +;; Tests for lowering local.get and local.set. (module (func $dummy) @@ -7,10 +7,10 @@ (local $x i32) (local $result i64) (local $extend i64) - (set_local $x (get_local $0)) - (set_local $result (get_local $r)) - (set_local $extend (i64.extend_u/i32 (get_local $x))) - (i64.eq (get_local $extend) (get_local $result))) + (local.set $x (local.get $0)) + (local.set $result (local.get $r)) + (local.set $extend (i64.extend_i32_u (local.get $x))) + (i64.eq (local.get $extend) (local.get $result))) ) (assert_return (invoke "check_extend_ui32" (i32.const 0) diff --git a/test/wasm2js/i64-add-sub.wast b/test/wasm2js/i64-add-sub.wast index b9ab45b79..1c05a8bf0 100644 --- a/test/wasm2js/i64-add-sub.wast +++ b/test/wasm2js/i64-add-sub.wast @@ -4,10 +4,10 @@ (func $dummy) (func (export "check_add_i64") (param $0 i64) (param $1 i64) (param $r i64) (result i32) - (i64.eq (i64.add (get_local $0) (get_local $1)) (get_local $r))) + (i64.eq (i64.add (local.get $0) (local.get $1)) (local.get $r))) (func (export "check_sub_i64") (param $0 i64) (param $1 i64) (param $r i64) (result i32) - (i64.eq (i64.sub (get_local $0) (get_local $1)) (get_local $r))) + (i64.eq (i64.sub (local.get $0) (local.get $1)) (local.get $r))) ) (assert_return (invoke "check_add_i64" (i32.const 0) (i32.const 0) diff --git a/test/wasm2js/i64-ctz.wast b/test/wasm2js/i64-ctz.wast index ce3a27d89..fac8efad1 100644 --- a/test/wasm2js/i64-ctz.wast +++ b/test/wasm2js/i64-ctz.wast @@ -2,7 +2,7 @@ (export "a" (func $popcnt64)) (export "b" (func $ctz64)) (func $popcnt64 (param $0 i64) (result i64) - (i64.popcnt (get_local $0))) + (i64.popcnt (local.get $0))) (func $ctz64 (param $0 i64) (result i64) - (i64.ctz (get_local $0))) + (i64.ctz (local.get $0))) ) diff --git a/test/wasm2js/i64-lowering.wast b/test/wasm2js/i64-lowering.wast index 1276b54c6..0dab04f67 100644 --- a/test/wasm2js/i64-lowering.wast +++ b/test/wasm2js/i64-lowering.wast @@ -4,34 +4,34 @@ (func $dummy) (func (export "eq_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.eq (get_local $0) (get_local $1))) + (i64.eq (local.get $0) (local.get $1))) (func (export "ne_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.ne (get_local $0) (get_local $1))) + (i64.ne (local.get $0) (local.get $1))) (func (export "ge_s_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.ge_s (get_local $0) (get_local $1))) + (i64.ge_s (local.get $0) (local.get $1))) (func (export "gt_s_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.gt_s (get_local $0) (get_local $1))) + (i64.gt_s (local.get $0) (local.get $1))) (func (export "le_s_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.le_s (get_local $0) (get_local $1))) + (i64.le_s (local.get $0) (local.get $1))) (func (export "lt_s_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.lt_s (get_local $0) (get_local $1))) + (i64.lt_s (local.get $0) (local.get $1))) (func (export "ge_u_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.ge_u (get_local $0) (get_local $1))) + (i64.ge_u (local.get $0) (local.get $1))) (func (export "gt_u_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.gt_u (get_local $0) (get_local $1))) + (i64.gt_u (local.get $0) (local.get $1))) (func (export "le_u_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.le_u (get_local $0) (get_local $1))) + (i64.le_u (local.get $0) (local.get $1))) (func (export "lt_u_i64") (param $0 i64) (param $1 i64) (result i32) - (i64.lt_u (get_local $0) (get_local $1))) + (i64.lt_u (local.get $0) (local.get $1))) ) ;; TODO: change things so we can invoke with i64 args and automatically lower diff --git a/test/wasm2js/i64-rotate.wast b/test/wasm2js/i64-rotate.wast index 7de93b381..67abee299 100644 --- a/test/wasm2js/i64-rotate.wast +++ b/test/wasm2js/i64-rotate.wast @@ -4,9 +4,9 @@ (func $dummy) (func (export "rotl") (param $0 i64) (param $1 i64) (param $2 i64) (result i32) - (i64.eq (i64.rotl (get_local $0) (get_local $1)) (get_local $2))) + (i64.eq (i64.rotl (local.get $0) (local.get $1)) (local.get $2))) (func (export "rotr") (param $0 i64) (param $1 i64) (param $2 i64) (result i32) - (i64.eq (i64.rotr (get_local $0) (get_local $1)) (get_local $2))) + (i64.eq (i64.rotr (local.get $0) (local.get $1)) (local.get $2))) ) (assert_return (invoke "rotl" (i32.const 0) (i32.const 0) diff --git a/test/wasm2js/i64-select.wast b/test/wasm2js/i64-select.wast index 0fa2675a3..4e637d3fe 100644 --- a/test/wasm2js/i64-select.wast +++ b/test/wasm2js/i64-select.wast @@ -1,7 +1,7 @@ ;; Testing i64 select (module - (func $p (param $i i32) (result i32) (get_local $i)) + (func $p (param $i i32) (result i32) (local.get $i)) (func (param i32) (result i64) (return (select diff --git a/test/wasm2js/i64-shifts.wast b/test/wasm2js/i64-shifts.wast index d13c700ef..173f0330d 100644 --- a/test/wasm2js/i64-shifts.wast +++ b/test/wasm2js/i64-shifts.wast @@ -4,9 +4,9 @@ (func $dummy) (func (export "shl_i64") (param $0 i64) (param $1 i64) (param $2 i64) (result i32) - (i64.eq (i64.shl (get_local $0) (get_local $1)) (get_local $2))) + (i64.eq (i64.shl (local.get $0) (local.get $1)) (local.get $2))) (func (export "shr_i64") (param $0 i64) (param $1 i64) (param $2 i64) (result i32) - (i64.eq (i64.shr_s (get_local $0) (get_local $1)) (get_local $2))) + (i64.eq (i64.shr_s (local.get $0) (local.get $1)) (local.get $2))) ) (assert_return (invoke "shl_i64" (i32.const 0) (i32.const 0) diff --git a/test/wasm2js/nested-selects.wast b/test/wasm2js/nested-selects.wast index bd0263d2d..9d044ffe6 100644 --- a/test/wasm2js/nested-selects.wast +++ b/test/wasm2js/nested-selects.wast @@ -8,12 +8,12 @@ (i32.const 1) (i32.const 0) (i32.gt_s - (get_local $0) + (local.get $0) (i32.const 0) ) ) (i32.lt_s - (get_local $0) + (local.get $0) (i32.const 0) ) ) diff --git a/test/wasm2js/reinterpret.wast b/test/wasm2js/reinterpret.wast index d1431b368..9d46af8f7 100644 --- a/test/wasm2js/reinterpret.wast +++ b/test/wasm2js/reinterpret.wast @@ -2,9 +2,9 @@ (func $dummy) (func (export "i32_roundtrip") (param $0 i32) (result i32) - (i32.eq (i32.reinterpret/f32 (f32.reinterpret/i32 (get_local $0))) (get_local $0))) + (i32.eq (i32.reinterpret_f32 (f32.reinterpret_i32 (local.get $0))) (local.get $0))) (func (export "i64_roundtrip") (param $0 i64) (result i32) - (i64.eq (i64.reinterpret/f64 (f64.reinterpret/i64 (get_local $0))) (get_local $0))) + (i64.eq (i64.reinterpret_f64 (f64.reinterpret_i64 (local.get $0))) (local.get $0))) ) (assert_return (invoke "i32_roundtrip" (i32.const 0)) diff --git a/test/wasm2js/stack-modified.wast b/test/wasm2js/stack-modified.wast index 36565b80b..b3ede2380 100644 --- a/test/wasm2js/stack-modified.wast +++ b/test/wasm2js/stack-modified.wast @@ -8,30 +8,30 @@ (func $0 (; 0 ;) (type $0) (param $var$0 i64) (result i64) (local $var$1 i64) (local $var$2 i64) - (set_local $var$1 - (get_local $var$0) + (local.set $var$1 + (local.get $var$0) ) - (set_local $var$2 + (local.set $var$2 (i64.const 1) ) (block $label$1 (loop $label$2 (if (i64.eq - (get_local $var$1) + (local.get $var$1) (i64.const 0) ) (br $label$1) (block $label$5 - (set_local $var$2 + (local.set $var$2 (i64.mul - (get_local $var$1) - (get_local $var$2) + (local.get $var$1) + (local.get $var$2) ) ) - (set_local $var$1 + (local.set $var$1 (i64.sub - (get_local $var$1) + (local.get $var$1) (i64.const 1) ) ) @@ -40,35 +40,35 @@ (br $label$2) ) ) - (get_local $var$2) + (local.get $var$2) ) (func $1 (; 1 ;) (type $0) (param $var$0 i64) (result i64) (local $var$1 i64) (local $var$2 i64) - (set_local $var$1 - (get_local $var$0) + (local.set $var$1 + (local.get $var$0) ) - (set_local $var$2 + (local.set $var$2 (i64.const 1) ) (block $label$1 (loop $label$2 (if (i64.eq - (get_local $var$1) + (local.get $var$1) (i64.const 0) ) (br $label$1) (block - (set_local $var$2 + (local.set $var$2 (i64.mul - (get_local $var$1) - (get_local $var$2) + (local.get $var$1) + (local.get $var$2) ) ) - (set_local $var$1 + (local.set $var$1 (i64.sub - (get_local $var$1) + (local.get $var$1) (i64.const 1) ) ) @@ -77,35 +77,35 @@ (br $label$2) ) ) - (get_local $var$2) + (local.get $var$2) ) (func $2 (; 2 ;) (type $0) (param $var$0 i64) (result i64) (local $var$1 i64) (local $var$2 i64) - (set_local $var$1 - (get_local $var$0) + (local.set $var$1 + (local.get $var$0) ) - (set_local $var$2 + (local.set $var$2 (i64.const 1) ) (block $label$1 (loop $label$2 (if (i64.eq - (get_local $var$1) + (local.get $var$1) (i64.const 0) ) (br $label$1) (block - (set_local $var$2 + (local.set $var$2 (i64.mul - (get_local $var$1) - (get_local $var$2) + (local.get $var$1) + (local.get $var$2) ) ) - (set_local $var$1 + (local.set $var$1 (i64.sub - (get_local $var$1) + (local.get $var$1) (i64.const 1) ) ) @@ -114,35 +114,35 @@ (br $label$2) ) ) - (get_local $var$2) + (local.get $var$2) ) (func $3 (; 3 ;) (type $0) (param $var$0 i64) (result i64) (local $var$1 i64) (local $var$2 i64) - (set_local $var$1 - (get_local $var$0) + (local.set $var$1 + (local.get $var$0) ) - (set_local $var$2 + (local.set $var$2 (i64.const 1) ) (block $label$1 (loop $label$2 (if (i64.eq - (get_local $var$1) + (local.get $var$1) (i64.const 0) ) (br $label$1) (block - (set_local $var$2 + (local.set $var$2 (i64.mul - (get_local $var$1) - (get_local $var$2) + (local.get $var$1) + (local.get $var$2) ) ) - (set_local $var$1 + (local.set $var$1 (i64.sub - (get_local $var$1) + (local.get $var$1) (i64.const 1) ) ) @@ -151,35 +151,35 @@ (br $label$2) ) ) - (get_local $var$2) + (local.get $var$2) ) (func $4 (; 4 ;) (type $0) (param $var$0 i64) (result i64) (local $var$1 i64) (local $var$2 i64) - (set_local $var$1 - (get_local $var$0) + (local.set $var$1 + (local.get $var$0) ) - (set_local $var$2 + (local.set $var$2 (i64.const 1) ) (block $label$1 (loop $label$2 (if (i64.eq - (get_local $var$1) + (local.get $var$1) (i64.const 0) ) (br $label$1) (block - (set_local $var$2 + (local.set $var$2 (i64.mul - (get_local $var$1) - (get_local $var$2) + (local.get $var$1) + (local.get $var$2) ) ) - (set_local $var$1 + (local.set $var$1 (i64.sub - (get_local $var$1) + (local.get $var$1) (i64.const 1) ) ) @@ -188,7 +188,7 @@ (br $label$2) ) ) - (get_local $var$2) + (local.get $var$2) ) ) diff --git a/test/wasm2js/unary-ops.wast b/test/wasm2js/unary-ops.wast index 821a8007e..ab7c49878 100644 --- a/test/wasm2js/unary-ops.wast +++ b/test/wasm2js/unary-ops.wast @@ -2,31 +2,31 @@ (func $dummy) (func (export "i32.popcnt") (param $0 i32) (result i32) - (i32.popcnt (get_local $0))) + (i32.popcnt (local.get $0))) (func (export "check_popcnt_i64") (param $0 i64) (param $r i64) (result i32) - (i64.eq (i64.popcnt (get_local $0)) (get_local $r))) + (i64.eq (i64.popcnt (local.get $0)) (local.get $r))) (func (export "check_extend_ui32") (param $0 i32) (param $r i64) (result i32) - (i64.eq (i64.extend_u/i32 (get_local $0)) (get_local $r))) + (i64.eq (i64.extend_i32_u (local.get $0)) (local.get $r))) (func (export "check_extend_si32") (param $0 i32) (param $r i64) (result i32) - (i64.eq (i64.extend_s/i32 (get_local $0)) (get_local $r))) + (i64.eq (i64.extend_i32_s (local.get $0)) (local.get $r))) (func (export "check_eqz_i64") (param $0 i64) (result i32) - (i64.eqz (get_local $0))) + (i64.eqz (local.get $0))) (func (export "i32.clz") (param $0 i32) (result i32) - (i32.clz (get_local $0))) + (i32.clz (local.get $0))) (func (export "i32.ctz") (param $0 i32) (result i32) - (i32.ctz (get_local $0))) + (i32.ctz (local.get $0))) (func (export "check_clz_i64") (param $0 i64) (param $r i64) (result i32) - (i64.eq (i64.clz (get_local $0)) (get_local $r))) + (i64.eq (i64.clz (local.get $0)) (local.get $r))) (func (export "check_ctz_i64") (param $0 i64) (param $r i64) (result i32) - (i64.eq (i64.ctz (get_local $0)) (get_local $r))) + (i64.eq (i64.ctz (local.get $0)) (local.get $r))) ) (assert_return (invoke "i32.popcnt" (i32.const 0)) (i32.const 0)) diff --git a/test/wasm2js/wasm2js.wast.asserts b/test/wasm2js/wasm2js.wast.asserts index 353f563f2..53d6a47ad 100644 --- a/test/wasm2js/wasm2js.wast.asserts +++ b/test/wasm2js/wasm2js.wast.asserts @@ -2,8 +2,8 @@ (module (func (export "empty")) - (func (export "add") (param $x i32) (param $y i32) (result i32) (i32.add (get_local $x) (get_local $y))) - (func (export "div_s") (param $x i32) (param $y i32) (result i32) (i32.div_s (get_local $x) (get_local $y))) + (func (export "add") (param $x i32) (param $y i32) (result i32) (i32.add (local.get $x) (local.get $y))) + (func (export "div_s") (param $x i32) (param $y i32) (result i32) (i32.div_s (local.get $x) (local.get $y))) ) (assert_return (invoke "empty")) |