2017-12-27 02:37:53 +01:00
|
|
|
(module
|
|
|
|
(type $i (func (result i32)))
|
2018-02-04 07:51:40 +01:00
|
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
2017-12-27 02:37:53 +01:00
|
|
|
(type $iv (func (param i32)))
|
|
|
|
(type $v (func))
|
2018-11-08 08:04:24 +01:00
|
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
2018-10-11 08:49:08 +02:00
|
|
|
(memory $0 1)
|
|
|
|
(data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00")
|
2018-11-08 08:04:24 +01:00
|
|
|
(table $0 1 anyfunc)
|
2018-10-11 08:49:08 +02:00
|
|
|
(elem (i32.const 0) $null)
|
2017-12-27 02:37:53 +01:00
|
|
|
(global $getter-setter/Foo._bar (mut i32) (i32.const 0))
|
2018-05-14 16:55:55 +02:00
|
|
|
(global $HEAP_BASE i32 (i32.const 44))
|
2017-12-27 02:37:53 +01:00
|
|
|
(export "memory" (memory $0))
|
2018-10-11 08:49:08 +02:00
|
|
|
(export "table" (table $0))
|
2017-12-27 02:37:53 +01:00
|
|
|
(start $start)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $getter-setter/Foo.get:bar (; 1 ;) (type $i) (result i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
get_global $getter-setter/Foo._bar
|
2017-12-27 02:37:53 +01:00
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $getter-setter/Foo.set:bar (; 2 ;) (type $iv) (param $0 i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
get_local $0
|
|
|
|
set_global $getter-setter/Foo._bar
|
2017-12-27 02:37:53 +01:00
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $start (; 3 ;) (type $v)
|
2018-11-08 08:04:24 +01:00
|
|
|
call $getter-setter/Foo.get:bar
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 13
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 1
|
|
|
|
call $getter-setter/Foo.set:bar
|
|
|
|
call $getter-setter/Foo.get:bar
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 15
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
block (result i32)
|
|
|
|
i32.const 2
|
|
|
|
call $getter-setter/Foo.set:bar
|
|
|
|
call $getter-setter/Foo.get:bar
|
|
|
|
end
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 16
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2017-12-27 02:37:53 +01:00
|
|
|
)
|
2018-09-17 01:48:35 +02:00
|
|
|
(func $null (; 4 ;) (type $v)
|
|
|
|
)
|
2017-12-27 02:37:53 +01:00
|
|
|
)
|