blob: 53cebfea17c8e73c4d2151eb55d9a2b3f7b937d6 [file] [log] [blame] [edit]
(module
(type $struct (struct (field i32)))
(type $anyref_=>_none (func (param anyref)))
(type $none_=>_i32 (func (result i32)))
(type $none_=>_none (func))
(import "import" "import" (func $import (type $anyref_=>_none) (param anyref)))
(global $ctor-eval$global_5 (ref $struct) (struct.new $struct
(i32.const 42)
))
(global $global2 (mut (ref null $struct)) (global.get $ctor-eval$global_5))
(global $global1 (ref $struct) (struct.new $struct
(i32.const 1337)
))
(global $ctor-eval$global_4 (ref $struct) (struct.new $struct
(i32.const 99)
))
(export "test1" (func $0_3))
(export "keepalive" (func $1))
(func $1 (type $none_=>_i32) (result i32)
(i32.add
(struct.get $struct 0
(global.get $global1)
)
(struct.get $struct 0
(global.get $global2)
)
)
)
(func $0_3 (type $none_=>_none)
(local $0 (ref $struct))
(local.set $0
(global.get $ctor-eval$global_4)
)
(call $import
(ref.null none)
)
(call $import
(local.get $0)
)
)
)