diff options
Diffstat (limited to 'test/ctor-eval/imported-min.wast')
-rw-r--r-- | test/ctor-eval/imported-min.wast | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/ctor-eval/imported-min.wast b/test/ctor-eval/imported-min.wast index d735a5a41..48608d526 100644 --- a/test/ctor-eval/imported-min.wast +++ b/test/ctor-eval/imported-min.wast @@ -5,7 +5,7 @@ (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) (import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32)) (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) - (global $tempDoublePtrMut (mut i32) (get_global $tempDoublePtr)) + (global $tempDoublePtrMut (mut i32) (global.get $tempDoublePtr)) (export "test1" $test1) (export "test2" $test2) (export "test3" $test3) @@ -14,23 +14,23 @@ ;; stack imports are ok to use. their uses are the same as other ;; globals - must keep the same value (which means, unwind the stack) ;; here the global names are "minified" - (global $global0 (mut i32) (get_global $STACKTOP$asm2wasm$import)) - (global $global1 (mut i32) (get_global $STACK_MAX$asm2wasm$import)) + (global $global0 (mut i32) (global.get $STACKTOP$asm2wasm$import)) + (global $global1 (mut i32) (global.get $STACK_MAX$asm2wasm$import)) ;; a global initialized by an import, so bad, but ok if not used - (global $do-not-use (mut i32) (get_global $tempDoublePtr)) + (global $do-not-use (mut i32) (global.get $tempDoublePtr)) (func $test1 (local $temp i32) - (set_global $mine (i32.const 1)) - (set_local $temp (get_global $global0)) - (set_global $global0 (i32.const 1337)) ;; bad - (set_global $global0 (get_local $temp)) ;; save us - (set_global $global1 (i32.const 913370)) ;; bad - (set_global $global1 (get_local $temp)) ;; save us + (global.set $mine (i32.const 1)) + (local.set $temp (global.get $global0)) + (global.set $global0 (i32.const 1337)) ;; bad + (global.set $global0 (local.get $temp)) ;; save us + (global.set $global1 (i32.const 913370)) ;; bad + (global.set $global1 (local.get $temp)) ;; save us ;; use the stack memory - (i32.store (get_local $temp) (i32.const 1337)) + (i32.store (local.get $temp) (i32.const 1337)) (if (i32.ne - (i32.load (get_local $temp)) + (i32.load (local.get $temp)) (i32.const 1337) ) (unreachable) ;; they should be equal, never get here |