2018-06-27 19:03:39 +02:00
|
|
|
(module
|
|
|
|
(type $iii (func (param i32 i32) (result i32)))
|
|
|
|
(type $v (func))
|
2018-10-11 08:49:08 +02:00
|
|
|
(memory $0 0)
|
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)
|
2018-06-27 19:03:39 +02:00
|
|
|
(global $main/code (mut i32) (i32.const 0))
|
2018-07-20 16:49:27 +02:00
|
|
|
(global $~started (mut i32) (i32.const 0))
|
2018-06-27 19:03:39 +02:00
|
|
|
(export "memory" (memory $0))
|
2018-10-11 08:49:08 +02:00
|
|
|
(export "table" (table $0))
|
2018-07-18 23:49:32 +02:00
|
|
|
(export "main" (func $main/main))
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $main/main (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
|
|
|
get_global $~started
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
call $start
|
|
|
|
i32.const 1
|
|
|
|
set_global $~started
|
|
|
|
end
|
|
|
|
get_global $main/code
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $start (; 1 ;) (type $v)
|
|
|
|
i32.const 1
|
|
|
|
set_global $main/code
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $null (; 2 ;) (type $v)
|
|
|
|
nop
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|