mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 07:02:13 +00:00
236 lines
5.1 KiB
Plaintext
236 lines
5.1 KiB
Plaintext
(module
|
|
(type $ii (func (param i32) (result i32)))
|
|
(type $iii (func (param i32 i32) (result i32)))
|
|
(type $iiii (func (param i32 i32 i32) (result i32)))
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
|
(type $iiiiii (func (param i32 i32 i32 i32 i32) (result i32)))
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
|
(memory $0 1)
|
|
(data (i32.const 16) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s")
|
|
(data (i32.const 48) "\04\00\00\00n\00u\00l\00l")
|
|
(export "memory" (memory $0))
|
|
(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))
|
|
(func $~lib/array/Array<Array<i32>>#__get (; 1 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
|
(tee_local $0
|
|
(if (result i32)
|
|
(i32.lt_u
|
|
(get_local $1)
|
|
(i32.shr_u
|
|
(i32.load
|
|
(tee_local $0
|
|
(i32.load
|
|
(get_local $0)
|
|
)
|
|
)
|
|
)
|
|
(i32.const 2)
|
|
)
|
|
)
|
|
(i32.load offset=8
|
|
(i32.add
|
|
(get_local $0)
|
|
(i32.shl
|
|
(get_local $1)
|
|
(i32.const 2)
|
|
)
|
|
)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
)
|
|
(func $std/array-access/i32ArrayArrayElementAccess (; 2 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
|
|
(call $~lib/array/Array<Array<i32>>#__get
|
|
(call $~lib/array/Array<Array<i32>>#__get
|
|
(get_local $0)
|
|
(i32.const 0)
|
|
)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(func $std/array-access/stringArrayPropertyAccess (; 3 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
|
|
(i32.load
|
|
(call $~lib/array/Array<Array<i32>>#__get
|
|
(get_local $0)
|
|
(i32.const 0)
|
|
)
|
|
)
|
|
)
|
|
(func $~lib/internal/string/compareUnsafe (; 4 ;) (; has Stack IR ;) (type $iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
|
|
(local $5 i32)
|
|
(set_local $1
|
|
(i32.add
|
|
(get_local $0)
|
|
(i32.shl
|
|
(get_local $1)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
)
|
|
(set_local $2
|
|
(i32.add
|
|
(get_local $2)
|
|
(i32.shl
|
|
(get_local $3)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
)
|
|
(loop $continue|0
|
|
(if
|
|
(tee_local $0
|
|
(if (result i32)
|
|
(get_local $4)
|
|
(i32.eqz
|
|
(tee_local $5
|
|
(i32.sub
|
|
(i32.load16_u offset=4
|
|
(get_local $1)
|
|
)
|
|
(i32.load16_u offset=4
|
|
(get_local $2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(get_local $4)
|
|
)
|
|
)
|
|
(block
|
|
(set_local $4
|
|
(i32.sub
|
|
(get_local $4)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_local $1
|
|
(i32.add
|
|
(get_local $1)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_local $2
|
|
(i32.add
|
|
(get_local $2)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(br $continue|0)
|
|
)
|
|
)
|
|
)
|
|
(get_local $5)
|
|
)
|
|
(func $~lib/string/String#startsWith (; 5 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
|
(local $3 i32)
|
|
(local $4 i32)
|
|
(if
|
|
(i32.eqz
|
|
(get_local $0)
|
|
)
|
|
(block
|
|
(call $~lib/env/abort
|
|
(i32.const 0)
|
|
(i32.const 16)
|
|
(i32.const 239)
|
|
(i32.const 4)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
(if
|
|
(i32.eqz
|
|
(get_local $1)
|
|
)
|
|
(set_local $1
|
|
(i32.const 48)
|
|
)
|
|
)
|
|
(if
|
|
(i32.gt_s
|
|
(i32.add
|
|
(tee_local $4
|
|
(i32.load
|
|
(get_local $1)
|
|
)
|
|
)
|
|
(tee_local $3
|
|
(select
|
|
(tee_local $3
|
|
(select
|
|
(get_local $2)
|
|
(i32.const 0)
|
|
(i32.gt_s
|
|
(get_local $2)
|
|
(i32.const 0)
|
|
)
|
|
)
|
|
)
|
|
(tee_local $2
|
|
(i32.load
|
|
(get_local $0)
|
|
)
|
|
)
|
|
(i32.lt_s
|
|
(get_local $3)
|
|
(get_local $2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(get_local $2)
|
|
)
|
|
(return
|
|
(i32.const 0)
|
|
)
|
|
)
|
|
(i32.eqz
|
|
(call $~lib/internal/string/compareUnsafe
|
|
(get_local $0)
|
|
(get_local $3)
|
|
(get_local $1)
|
|
(i32.const 0)
|
|
(get_local $4)
|
|
)
|
|
)
|
|
)
|
|
(func $std/array-access/stringArrayMethodCall (; 6 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
|
|
(call $~lib/string/String#startsWith
|
|
(call $~lib/array/Array<Array<i32>>#__get
|
|
(get_local $0)
|
|
(i32.const 0)
|
|
)
|
|
(i32.const 8)
|
|
(i32.const 0)
|
|
)
|
|
)
|
|
(func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
|
|
(i32.load
|
|
(call $~lib/array/Array<Array<i32>>#__get
|
|
(call $~lib/array/Array<Array<i32>>#__get
|
|
(get_local $0)
|
|
(i32.const 0)
|
|
)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
)
|
|
(func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
|
|
(call $~lib/string/String#startsWith
|
|
(call $~lib/array/Array<Array<i32>>#__get
|
|
(call $~lib/array/Array<Array<i32>>#__get
|
|
(get_local $0)
|
|
(i32.const 0)
|
|
)
|
|
(i32.const 1)
|
|
)
|
|
(i32.const 8)
|
|
(i32.const 0)
|
|
)
|
|
)
|
|
)
|