2018-01-13 23:38:07 +01:00
|
|
|
(module
|
2018-02-02 03:07:54 +01:00
|
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
2018-01-13 23:38:07 +01:00
|
|
|
(type $iii (func (param i32 i32) (result i32)))
|
|
|
|
(type $iiiv (func (param i32 i32 i32)))
|
|
|
|
(type $v (func))
|
2018-02-02 03:07:54 +01:00
|
|
|
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
2018-01-13 23:38:07 +01:00
|
|
|
(global $std/carray/arr (mut i32) (i32.const 0))
|
2018-02-14 09:18:43 +01:00
|
|
|
(global $HEAP_BASE i32 (i32.const 36))
|
2018-01-13 23:38:07 +01:00
|
|
|
(memory $0 1)
|
2018-02-14 09:18:43 +01:00
|
|
|
(data (i32.const 4) "\0d\00\00\00s\00t\00d\00/\00c\00a\00r\00r\00a\00y\00.\00t\00s\00")
|
2018-01-13 23:38:07 +01:00
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
2018-02-02 03:07:54 +01:00
|
|
|
(func "$(lib)/array/CArray#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
|
|
|
;;@ (lib)/array.ts:173:4
|
2018-01-14 02:30:20 +01:00
|
|
|
(if
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:173:8
|
2018-01-14 02:30:20 +01:00
|
|
|
(i32.lt_s
|
|
|
|
(get_local $1)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:173:16
|
2018-01-14 02:30:20 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:174:6
|
2018-01-14 02:30:20 +01:00
|
|
|
(unreachable)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:175:71
|
2018-01-13 23:38:07 +01:00
|
|
|
(return
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:175:11
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.load
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:175:19
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:175:45
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.mul
|
|
|
|
(get_local $1)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:175:60
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(func "$(lib)/array/CArray#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
|
|
|
;;@ (lib)/array.ts:180:4
|
2018-01-14 02:30:20 +01:00
|
|
|
(if
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:180:8
|
2018-01-14 02:30:20 +01:00
|
|
|
(i32.lt_s
|
|
|
|
(get_local $1)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:180:16
|
2018-01-14 02:30:20 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:181:6
|
2018-01-14 02:30:20 +01:00
|
|
|
(unreachable)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:182:4
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.store
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:182:13
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:182:39
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.mul
|
|
|
|
(get_local $1)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:182:54
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ (lib)/array.ts:182:67
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_local $2)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(func $start (; 3 ;) (type $v)
|
2018-01-13 23:38:07 +01:00
|
|
|
(local $0 i32)
|
|
|
|
(set_global $std/carray/arr
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:6:23
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $HEAP_BASE)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:8:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:8:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
|
|
|
(i32.load
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:8:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $HEAP_BASE)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:8:31
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 8)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:9:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:9:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
|
|
|
(i32.load
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:9:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global $HEAP_BASE)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:9:29
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:9:35
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 9)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:11:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:11:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
2018-02-02 03:07:54 +01:00
|
|
|
(call "$(lib)/array/CArray#__get"
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $std/carray/arr)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:11:11
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:11:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 11)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:12:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:12:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
2018-02-02 03:07:54 +01:00
|
|
|
(call "$(lib)/array/CArray#__get"
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $std/carray/arr)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:12:11
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:12:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 12)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:14:0
|
|
|
|
(call "$(lib)/array/CArray#__set"
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $std/carray/arr)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:14:4
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 0)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:14:9
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 42)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:15:0
|
|
|
|
(call "$(lib)/array/CArray#__set"
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $std/carray/arr)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:15:4
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 1)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:15:9
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 24)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:17:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:17:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
|
|
|
(i32.load
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:17:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $HEAP_BASE)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:17:31
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 42)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 17)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:18:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:18:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
|
|
|
(i32.load
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:18:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global $HEAP_BASE)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:18:29
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:18:35
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 24)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 18)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:20:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:20:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
2018-02-02 03:07:54 +01:00
|
|
|
(call "$(lib)/array/CArray#__get"
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $std/carray/arr)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:20:11
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:20:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 42)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 20)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:21:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:21:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
2018-02-02 03:07:54 +01:00
|
|
|
(call "$(lib)/array/CArray#__get"
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $std/carray/arr)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:21:11
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:21:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 24)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 21)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:23:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:23:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
|
|
|
(block (result i32)
|
2018-02-02 03:07:54 +01:00
|
|
|
(call "$(lib)/array/CArray#__set"
|
|
|
|
;;@ std/carray.ts:23:8
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $std/carray/arr)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:23:12
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 3)
|
|
|
|
(tee_local $0
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:23:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 9000)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:23:26
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 9000)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 23)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:25:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:25:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
|
|
|
(i32.load
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:25:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global $HEAP_BASE)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:25:29
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 12)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:25:36
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 9000)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 25)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:26:0
|
2018-01-13 23:38:07 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:26:7
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.eq
|
2018-02-02 03:07:54 +01:00
|
|
|
(call "$(lib)/array/CArray#__get"
|
2018-01-13 23:38:07 +01:00
|
|
|
(get_global $std/carray/arr)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:26:11
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 3)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
;;@ std/carray.ts:26:17
|
2018-01-13 23:38:07 +01:00
|
|
|
(i32.const 9000)
|
|
|
|
)
|
|
|
|
)
|
2018-02-02 03:07:54 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-02 03:07:54 +01:00
|
|
|
(i32.const 26)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-13 23:38:07 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|