blob: 7b2ac618ec12e7a94c0a2761a4c9d5d07d551404 [file] [log] [blame] [edit]
(module
(type $none_=>_none (func))
(import "env" "global-1" (global $g1 i32))
(global $g2 i32 (global.get $g1))
(func $foo (type $none_=>_none)
(drop
(global.get $g1)
)
(drop
(global.get $g1)
)
)
)
(module
(type $none_=>_none (func))
(import "env" "global-1" (global $g1 i32))
(global $g2 i32 (global.get $g1))
(global $g3 i32 (global.get $g2))
(global $g4 i32 (global.get $g3))
(func $foo (type $none_=>_none)
(drop
(global.get $g1)
)
(drop
(global.get $g1)
)
(drop
(global.get $g1)
)
(drop
(global.get $g1)
)
)
)
(module
(import "env" "global-1" (global $g1 i32))
(global $g2 i32 (global.get $g1))
)
(module
(type $none_=>_none (func))
(import "env" "global-1" (global $g1 i32))
(global $g2 i32 (global.get $g1))
(func $foo (type $none_=>_none)
(drop
(unreachable)
)
)
)
(module
(import "env" "global-1" (global $g1 i32))
(global $g2 (mut i32) (global.get $g1))
(export "global-2" (global $g2))
)
(module
(type $none_=>_none (func))
(global $g1 i32 (i32.const 1))
(global $g2 i32 (i32.const 1))
(global $g3 f64 (f64.const -3.4))
(global $g4 f64 (f64.const -2.8))
(global $g5 i32 (i32.const 2))
(global $g6 i32 (i32.const 2))
(global $g7 i32 (i32.const 3))
(global $g8 i32 (i32.const 3))
(global $g9 i32 (i32.const 4))
(global $ga (mut i32) (i32.const 4))
(global $gb i32 (i32.const 5))
(global $gc i32 (i32.const 5))
(func $foo (type $none_=>_none)
(drop
(i32.const 1)
)
(drop
(i32.const 1)
)
(drop
(f64.const -3.4)
)
(drop
(f64.const -2.8)
)
(drop
(i32.const 2)
)
(drop
(i32.const 2)
)
(drop
(i32.const 3)
)
(drop
(i32.const 3)
)
(drop
(i32.const 4)
)
(drop
(global.get $ga)
)
(drop
(i32.const 5)
)
(drop
(i32.const 5)
)
(global.set $ga
(i32.const 6)
)
)
)
(module
(type $i32_=>_i32 (func (param i32) (result i32)))
(global $g1 (mut i32) (i32.const 1))
(global $g2 (mut i32) (i32.const 1))
(func $f (type $i32_=>_i32) (param $x i32) (result i32)
(global.set $g1
(i32.const 100)
)
(global.set $g2
(local.get $x)
)
(if
(local.get $x)
(return
(i32.const 0)
)
)
(local.set $x
(i32.add
(global.get $g1)
(global.get $g2)
)
)
(if
(local.get $x)
(return
(i32.const 1)
)
)
(global.set $g1
(i32.const 200)
)
(global.set $g2
(local.get $x)
)
(local.set $x
(i32.add
(i32.const 200)
(global.get $g2)
)
)
(local.get $x)
)
)
(module
(type $i32_=>_i32 (func (param i32) (result i32)))
(global $g1 (mut i32) (i32.const 1))
(global $g2 (mut i32) (i32.const 1))
(func $f (type $i32_=>_i32) (param $x i32) (result i32)
(global.set $g1
(i32.const 100)
)
(global.set $g2
(local.get $x)
)
(local.set $x
(i32.add
(i32.add
(i32.const 100)
(i32.const 100)
)
(global.get $g2)
)
)
(local.get $x)
)
)
(module
(type $i32_=>_i32 (func (param i32) (result i32)))
(global $g1 (mut i32) (i32.const 1))
(global $g2 i32 (i32.const 1))
(func $no (type $i32_=>_i32) (param $x i32) (result i32)
(global.set $g1
(i32.const 100)
)
(drop
(call $no
(i32.const 200)
)
)
(global.get $g1)
)
(func $no2 (type $i32_=>_i32) (param $x i32) (result i32)
(global.set $g1
(i32.const 100)
)
(global.set $g1
(local.get $x)
)
(global.get $g1)
)
(func $yes (type $i32_=>_i32) (param $x i32) (result i32)
(global.set $g1
(i32.const 100)
)
(drop
(local.get $x)
)
(i32.const 100)
)
)
(module
(type $none_=>_none (func))
(import "env" "global-1" (global $g1 externref))
(global $g2 externref (global.get $g1))
(global $g3 externref (ref.null noextern))
(func $test1 (type $none_=>_none)
(drop
(global.get $g1)
)
(drop
(global.get $g1)
)
)
(func $test2 (type $none_=>_none)
(drop
(ref.null noextern)
)
)
)
(module
(type $none_=>_none (func))
(global $write-only i32 (i32.const 1))
(func $foo (type $none_=>_none)
(drop
(i32.const 2)
)
)
)