2018-04-05 02:23:03 +02:00
|
|
|
(module
|
2018-09-13 23:10:49 +02:00
|
|
|
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
2019-03-18 16:09:49 +01:00
|
|
|
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
2019-03-01 00:01:23 +01:00
|
|
|
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
|
|
|
(type $FUNCSIG$v (func))
|
|
|
|
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
|
2018-11-08 08:04:24 +01:00
|
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
2018-04-05 02:23:03 +02:00
|
|
|
(memory $0 1)
|
2019-03-18 16:09:49 +01:00
|
|
|
(data (i32.const 8) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
|
|
|
|
(data (i32.const 48) "\01")
|
|
|
|
(data (i32.const 56) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s")
|
|
|
|
(data (i32.const 96) "\01\00\00\00\08\00\00\00n\00u\00l\00l")
|
2019-02-05 17:12:10 +01:00
|
|
|
(table $0 1 funcref)
|
2018-10-11 08:49:08 +02:00
|
|
|
(elem (i32.const 0) $null)
|
2018-07-18 23:49:32 +02:00
|
|
|
(export "memory" (memory $0))
|
2018-10-11 08:49:08 +02:00
|
|
|
(export "table" (table $0))
|
2018-04-05 02:23:03 +02:00
|
|
|
(export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess))
|
|
|
|
(export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess))
|
|
|
|
(export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall))
|
|
|
|
(export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess))
|
|
|
|
(export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall))
|
2019-03-27 16:10:59 +01:00
|
|
|
(func $~lib/array/Array<~lib/array/Array<i32>>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-03-22 15:43:07 +01:00
|
|
|
local.get $1
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=12
|
|
|
|
i32.ge_u
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 16
|
2019-04-04 02:25:22 +02:00
|
|
|
i32.const 96
|
2019-03-22 15:43:07 +01:00
|
|
|
i32.const 45
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2019-03-18 16:09:49 +01:00
|
|
|
local.get $1
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.load offset=8
|
2019-03-18 16:09:49 +01:00
|
|
|
i32.const 2
|
|
|
|
i32.shr_u
|
|
|
|
i32.ge_u
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 16
|
2019-04-04 02:25:22 +02:00
|
|
|
i32.const 99
|
2019-03-18 16:09:49 +01:00
|
|
|
i32.const 61
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.load offset=4
|
2019-03-18 16:09:49 +01:00
|
|
|
local.get $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.add
|
|
|
|
i32.load
|
2018-04-05 02:23:03 +02:00
|
|
|
)
|
2019-03-22 15:43:07 +01:00
|
|
|
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
|
|
i32.const 1
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=8
|
|
|
|
i32.const 2
|
|
|
|
i32.shr_u
|
|
|
|
i32.ge_u
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 16
|
2019-04-04 02:25:22 +02:00
|
|
|
i32.const 99
|
2019-03-22 15:43:07 +01:00
|
|
|
i32.const 61
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 4
|
|
|
|
i32.add
|
|
|
|
i32.load
|
|
|
|
)
|
|
|
|
(func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-03-17 12:25:54 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
2019-03-27 16:10:59 +01:00
|
|
|
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
2019-03-22 15:43:07 +01:00
|
|
|
call $~lib/array/Array<i32>#__get
|
2019-03-18 16:09:49 +01:00
|
|
|
)
|
2019-03-22 15:43:07 +01:00
|
|
|
(func $std/array-access/stringArrayPropertyAccess (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-03-18 16:09:49 +01:00
|
|
|
i32.const 0
|
2019-03-27 16:10:59 +01:00
|
|
|
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.const 8
|
|
|
|
i32.sub
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 1
|
|
|
|
i32.shr_u
|
2018-04-05 02:23:03 +02:00
|
|
|
)
|
2019-03-22 15:43:07 +01:00
|
|
|
(func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
2019-02-28 18:26:04 +01:00
|
|
|
(local $3 i32)
|
2018-09-13 23:10:49 +02:00
|
|
|
(local $4 i32)
|
2019-03-18 16:09:49 +01:00
|
|
|
i32.const 56
|
2019-02-28 18:26:04 +01:00
|
|
|
local.set $3
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.shl
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $1
|
2018-11-08 08:04:24 +01:00
|
|
|
loop $continue|0
|
2019-02-28 18:26:04 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
if (result i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.load16_u
|
2019-02-28 18:26:04 +01:00
|
|
|
local.get $3
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.load16_u
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $4
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eqz
|
|
|
|
else
|
2019-02-28 18:26:04 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
|
|
|
if
|
2019-02-28 18:26:04 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-02-28 18:26:04 +01:00
|
|
|
local.set $2
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2018-11-19 13:23:45 +02:00
|
|
|
i32.const 2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $1
|
2019-02-28 18:26:04 +01:00
|
|
|
local.get $3
|
2018-11-19 13:23:45 +02:00
|
|
|
i32.const 2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
2019-02-28 18:26:04 +01:00
|
|
|
local.set $3
|
2018-11-08 08:04:24 +01:00
|
|
|
br $continue|0
|
|
|
|
end
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $4
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
2019-03-22 15:43:07 +01:00
|
|
|
(func $~lib/string/String#startsWith (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2018-09-13 23:10:49 +02:00
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
2018-04-05 02:23:03 +02:00
|
|
|
(local $3 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-03-18 16:09:49 +01:00
|
|
|
i32.const 64
|
2019-04-05 01:59:01 +02:00
|
|
|
i32.const 178
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 4
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2019-03-18 16:09:49 +01:00
|
|
|
i32.const 52
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.load
|
|
|
|
i32.const 1
|
|
|
|
i32.shr_u
|
|
|
|
local.tee $1
|
|
|
|
local.set $2
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.const 8
|
|
|
|
i32.sub
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 1
|
|
|
|
i32.shr_u
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.lt_s
|
|
|
|
select
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $3
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.gt_s
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
return
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $3
|
2019-03-17 12:25:54 +01:00
|
|
|
local.get $2
|
|
|
|
call $~lib/util/string/compareImpl
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eqz
|
2018-04-05 02:23:03 +02:00
|
|
|
)
|
2019-03-22 15:43:07 +01:00
|
|
|
(func $std/array-access/stringArrayMethodCall (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-03-17 12:25:54 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
2019-03-27 16:10:59 +01:00
|
|
|
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
2018-11-08 08:04:24 +01:00
|
|
|
call $~lib/string/String#startsWith
|
2018-04-05 02:23:03 +02:00
|
|
|
)
|
2019-03-22 15:43:07 +01:00
|
|
|
(func $std/array-access/stringArrayArrayPropertyAccess (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-03-17 12:25:54 +01:00
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.const 0
|
2019-03-27 16:10:59 +01:00
|
|
|
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
2019-03-18 16:09:49 +01:00
|
|
|
i32.const 1
|
2019-03-27 16:10:59 +01:00
|
|
|
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
2019-03-17 12:25:54 +01:00
|
|
|
i32.const 8
|
|
|
|
i32.sub
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 1
|
|
|
|
i32.shr_u
|
2018-04-05 02:23:03 +02:00
|
|
|
)
|
2019-03-22 15:43:07 +01:00
|
|
|
(func $std/array-access/stringArrayArrayMethodCall (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-03-17 12:25:54 +01:00
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.const 0
|
2019-03-27 16:10:59 +01:00
|
|
|
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
2019-03-18 16:09:49 +01:00
|
|
|
i32.const 1
|
2019-03-27 16:10:59 +01:00
|
|
|
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
2018-11-08 08:04:24 +01:00
|
|
|
call $~lib/string/String#startsWith
|
2018-04-05 02:23:03 +02:00
|
|
|
)
|
2019-03-22 15:43:07 +01:00
|
|
|
(func $null (; 10 ;) (type $FUNCSIG$v)
|
2018-11-08 08:04:24 +01:00
|
|
|
nop
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2018-04-05 02:23:03 +02:00
|
|
|
)
|