2018-02-28 01:48:01 +01:00
|
|
|
(module
|
|
|
|
(type $ii (func (param i32) (result i32)))
|
2018-03-12 14:06:39 +01:00
|
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
2018-02-28 01:48:01 +01:00
|
|
|
(type $v (func))
|
2018-03-19 01:22:19 +01:00
|
|
|
(type $i (func (result i32)))
|
2018-05-21 18:48:29 +02:00
|
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
2018-03-12 14:06:39 +01:00
|
|
|
(global $function-expression/f1 (mut i32) (i32.const 0))
|
2018-04-17 16:04:29 +02:00
|
|
|
(global $~argc (mut i32) (i32.const 0))
|
2018-03-12 14:06:39 +01:00
|
|
|
(global $function-expression/f2 (mut i32) (i32.const 1))
|
|
|
|
(global $function-expression/f3 (mut i32) (i32.const 2))
|
2018-03-19 01:22:19 +01:00
|
|
|
(global $function-expression/f4 (mut i32) (i32.const 3))
|
|
|
|
(table 4 4 anyfunc)
|
|
|
|
(elem (i32.const 0) $start~anonymous|0 $start~anonymous|0 $start~someName|2 $start~anonymous|3)
|
2018-02-28 01:48:01 +01:00
|
|
|
(memory $0 1)
|
2018-05-14 16:55:55 +02:00
|
|
|
(data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s")
|
2018-02-28 01:48:01 +01:00
|
|
|
(export "memory" (memory $0))
|
2018-03-23 15:12:03 +01:00
|
|
|
(export "table" (table $0))
|
2018-03-03 18:38:38 +01:00
|
|
|
(start $start)
|
2018-03-12 14:06:39 +01:00
|
|
|
(func $start~anonymous|0 (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
2018-02-28 01:48:01 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-03-12 14:06:39 +01:00
|
|
|
(func $start~someName|2 (; 2 ;) (type $v)
|
2018-02-28 01:48:01 +01:00
|
|
|
(nop)
|
|
|
|
)
|
2018-03-19 01:22:19 +01:00
|
|
|
(func $start~anonymous|3 (; 3 ;) (type $i) (result i32)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(func $start (; 4 ;) (type $v)
|
2018-06-09 14:05:33 +02:00
|
|
|
(set_global $~argc
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-12 14:06:39 +01:00
|
|
|
(if
|
2018-06-09 14:05:33 +02:00
|
|
|
(i32.ne
|
|
|
|
(call_indirect (type $ii)
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 1)
|
2018-06-09 14:05:33 +02:00
|
|
|
(get_global $function-expression/f1)
|
2018-03-12 14:06:39 +01:00
|
|
|
)
|
2018-06-09 14:05:33 +02:00
|
|
|
(i32.const 1)
|
2018-03-03 18:38:38 +01:00
|
|
|
)
|
2018-03-12 14:06:39 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 4)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-03-03 18:38:38 +01:00
|
|
|
)
|
2018-06-09 14:05:33 +02:00
|
|
|
(set_global $~argc
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-12 14:06:39 +01:00
|
|
|
(if
|
2018-06-09 14:05:33 +02:00
|
|
|
(i32.ne
|
|
|
|
(call_indirect (type $ii)
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 2)
|
2018-06-09 14:05:33 +02:00
|
|
|
(get_global $function-expression/f2)
|
2018-03-12 14:06:39 +01:00
|
|
|
)
|
2018-06-09 14:05:33 +02:00
|
|
|
(i32.const 2)
|
2018-03-03 18:38:38 +01:00
|
|
|
)
|
2018-03-12 14:06:39 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 9)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
)
|
2018-04-17 16:04:29 +02:00
|
|
|
(set_global $~argc
|
2018-03-24 09:46:22 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-03-12 14:06:39 +01:00
|
|
|
(call_indirect (type $v)
|
|
|
|
(get_global $function-expression/f3)
|
|
|
|
)
|
2018-06-09 14:05:33 +02:00
|
|
|
(set_global $~argc
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-03-19 01:22:19 +01:00
|
|
|
(if
|
2018-06-09 14:05:33 +02:00
|
|
|
(i32.ne
|
|
|
|
(call_indirect (type $i)
|
|
|
|
(get_global $function-expression/f4)
|
2018-03-19 01:22:19 +01:00
|
|
|
)
|
2018-06-09 14:05:33 +02:00
|
|
|
(i32.const 1)
|
2018-03-19 01:22:19 +01:00
|
|
|
)
|
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-03-19 01:22:19 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-03-19 01:22:19 +01:00
|
|
|
(i32.const 16)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
)
|
2018-03-03 18:38:38 +01:00
|
|
|
)
|
2018-02-28 01:48:01 +01:00
|
|
|
)
|