assemblyscript/tests/compiler/std/string-utf8.untouched.wat
2018-11-08 08:04:24 +01:00

2624 lines
46 KiB
Plaintext

(module
(type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $iii (func (param i32 i32) (result i32)))
(type $iiiv (func (param i32 i32 i32)))
(type $iv (func (param i32)))
(type $iiiiii (func (param i32 i32 i32 i32 i32) (result i32)))
(type $v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\06\00\00\00\01\d87\dch\00i\00R\d8b\df")
(data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00")
(data (i32.const 64) "\00\00\00\00")
(data (i32.const 72) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00")
(data (i32.const 104) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00")
(data (i32.const 160) "\02\00\00\00\01\d87\dc")
(data (i32.const 168) "\02\00\00\00h\00i\00")
(data (i32.const 176) "\02\00\00\00R\d8b\df")
(data (i32.const 184) "\01\00\00\00\00\00")
(table $0 1 anyfunc)
(elem (i32.const 0) $null)
(global $~lib/internal/allocator/AL_BITS i32 (i32.const 3))
(global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8))
(global $~lib/internal/allocator/AL_MASK i32 (i32.const 7))
(global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824))
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
(global $std/string-utf8/str (mut i32) (i32.const 8))
(global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4))
(global $std/string-utf8/len (mut i32) (i32.const 0))
(global $std/string-utf8/ptr (mut i32) (i32.const 0))
(global $~lib/internal/string/MAX_LENGTH i32 (i32.const 536870910))
(global $HEAP_BASE i32 (i32.const 192))
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $~lib/string/String#get:lengthUTF8 (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
i32.const 1
set_local $1
i32.const 0
set_local $2
get_local $0
i32.load
set_local $3
block $break|0
loop $continue|0
get_local $2
get_local $3
i32.lt_u
if
block
get_local $0
get_local $2
i32.const 1
i32.shl
i32.add
i32.load16_u offset=4
set_local $4
get_local $4
i32.const 128
i32.lt_u
if
get_local $1
i32.const 1
i32.add
set_local $1
get_local $2
i32.const 1
i32.add
set_local $2
else
get_local $4
i32.const 2048
i32.lt_u
if
get_local $1
i32.const 2
i32.add
set_local $1
get_local $2
i32.const 1
i32.add
set_local $2
else
get_local $4
i32.const 64512
i32.and
i32.const 55296
i32.eq
tee_local $5
if (result i32)
get_local $2
i32.const 1
i32.add
get_local $3
i32.lt_u
else
get_local $5
end
tee_local $5
if (result i32)
get_local $0
get_local $2
i32.const 1
i32.add
i32.const 1
i32.shl
i32.add
i32.load16_u offset=4
i32.const 64512
i32.and
i32.const 56320
i32.eq
else
get_local $5
end
if
get_local $1
i32.const 4
i32.add
set_local $1
get_local $2
i32.const 2
i32.add
set_local $2
else
get_local $1
i32.const 3
i32.add
set_local $1
get_local $2
i32.const 1
i32.add
set_local $2
end
end
end
end
br $continue|0
end
end
end
get_local $1
)
(func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
get_local $0
get_global $~lib/internal/allocator/MAX_SIZE_32
i32.gt_u
if
unreachable
end
get_global $~lib/allocator/arena/offset
set_local $1
get_local $1
get_local $0
tee_local $2
i32.const 1
tee_local $3
get_local $2
get_local $3
i32.gt_u
select
i32.add
get_global $~lib/internal/allocator/AL_MASK
i32.add
get_global $~lib/internal/allocator/AL_MASK
i32.const -1
i32.xor
i32.and
set_local $4
current_memory
set_local $5
get_local $4
get_local $5
i32.const 16
i32.shl
i32.gt_u
if
get_local $4
get_local $1
i32.sub
i32.const 65535
i32.add
i32.const 65535
i32.const -1
i32.xor
i32.and
i32.const 16
i32.shr_u
set_local $2
get_local $5
tee_local $3
get_local $2
tee_local $6
get_local $3
get_local $6
i32.gt_s
select
set_local $3
get_local $3
grow_memory
i32.const 0
i32.lt_s
if
get_local $2
grow_memory
i32.const 0
i32.lt_s
if
unreachable
end
end
end
get_local $4
set_global $~lib/allocator/arena/offset
get_local $1
)
(func $~lib/string/String#toUTF8 (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
block $~lib/memory/memory.allocate|inlined.0 (result i32)
get_local $0
call $~lib/string/String#get:lengthUTF8
set_local $1
get_local $1
call $~lib/allocator/arena/__memory_allocate
br $~lib/memory/memory.allocate|inlined.0
end
set_local $2
i32.const 0
set_local $3
get_local $0
i32.load
set_local $4
i32.const 0
set_local $5
block $break|0
loop $continue|0
get_local $3
get_local $4
i32.lt_u
if
block
get_local $0
get_local $3
i32.const 1
i32.shl
i32.add
i32.load16_u offset=4
set_local $1
get_local $1
i32.const 128
i32.lt_u
if
get_local $2
get_local $5
i32.add
get_local $1
i32.store8
get_local $5
i32.const 1
i32.add
set_local $5
get_local $3
i32.const 1
i32.add
set_local $3
else
get_local $1
i32.const 2048
i32.lt_u
if
get_local $2
get_local $5
i32.add
set_local $6
get_local $6
get_local $1
i32.const 6
i32.shr_u
i32.const 192
i32.or
i32.store8
get_local $6
get_local $1
i32.const 63
i32.and
i32.const 128
i32.or
i32.store8 offset=1
get_local $5
i32.const 2
i32.add
set_local $5
get_local $3
i32.const 1
i32.add
set_local $3
else
get_local $2
get_local $5
i32.add
set_local $6
get_local $1
i32.const 64512
i32.and
i32.const 55296
i32.eq
tee_local $7
if (result i32)
get_local $3
i32.const 1
i32.add
get_local $4
i32.lt_u
else
get_local $7
end
if
get_local $0
get_local $3
i32.const 1
i32.add
i32.const 1
i32.shl
i32.add
i32.load16_u offset=4
set_local $7
get_local $7
i32.const 64512
i32.and
i32.const 56320
i32.eq
if
i32.const 65536
get_local $1
i32.const 1023
i32.and
i32.const 10
i32.shl
i32.add
get_local $7
i32.const 1023
i32.and
i32.add
set_local $1
get_local $6
get_local $1
i32.const 18
i32.shr_u
i32.const 240
i32.or
i32.store8
get_local $6
get_local $1
i32.const 12
i32.shr_u
i32.const 63
i32.and
i32.const 128
i32.or
i32.store8 offset=1
get_local $6
get_local $1
i32.const 6
i32.shr_u
i32.const 63
i32.and
i32.const 128
i32.or
i32.store8 offset=2
get_local $6
get_local $1
i32.const 63
i32.and
i32.const 128
i32.or
i32.store8 offset=3
get_local $5
i32.const 4
i32.add
set_local $5
get_local $3
i32.const 2
i32.add
set_local $3
br $continue|0
end
end
get_local $6
get_local $1
i32.const 12
i32.shr_u
i32.const 224
i32.or
i32.store8
get_local $6
get_local $1
i32.const 6
i32.shr_u
i32.const 63
i32.and
i32.const 128
i32.or
i32.store8 offset=1
get_local $6
get_local $1
i32.const 63
i32.and
i32.const 128
i32.or
i32.store8 offset=2
get_local $5
i32.const 3
i32.add
set_local $5
get_local $3
i32.const 1
i32.add
set_local $3
end
end
end
br $continue|0
end
end
end
get_local $2
get_local $5
i32.add
i32.const 0
i32.store8
get_local $2
)
(func $~lib/internal/string/allocateUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
get_local $0
i32.const 0
i32.gt_s
tee_local $1
if (result i32)
get_local $0
get_global $~lib/internal/string/MAX_LENGTH
i32.le_s
else
get_local $1
end
i32.eqz
if
i32.const 0
i32.const 104
i32.const 14
i32.const 2
call $~lib/env/abort
unreachable
end
block $~lib/memory/memory.allocate|inlined.2 (result i32)
get_global $~lib/internal/string/HEADER_SIZE
get_local $0
i32.const 1
i32.shl
i32.add
set_local $1
get_local $1
call $~lib/allocator/arena/__memory_allocate
br $~lib/memory/memory.allocate|inlined.2
end
set_local $2
get_local $2
get_local $0
i32.store
get_local $2
)
(func $~lib/internal/memory/memcpy (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
block $break|0
loop $continue|0
get_local $2
if (result i32)
get_local $1
i32.const 3
i32.and
else
get_local $2
end
if
block
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
get_local $2
i32.const 1
i32.sub
set_local $2
end
br $continue|0
end
end
end
get_local $0
i32.const 3
i32.and
i32.const 0
i32.eq
if
block $break|1
loop $continue|1
get_local $2
i32.const 16
i32.ge_u
if
block
get_local $0
get_local $1
i32.load
i32.store
get_local $0
i32.const 4
i32.add
get_local $1
i32.const 4
i32.add
i32.load
i32.store
get_local $0
i32.const 8
i32.add
get_local $1
i32.const 8
i32.add
i32.load
i32.store
get_local $0
i32.const 12
i32.add
get_local $1
i32.const 12
i32.add
i32.load
i32.store
get_local $1
i32.const 16
i32.add
set_local $1
get_local $0
i32.const 16
i32.add
set_local $0
get_local $2
i32.const 16
i32.sub
set_local $2
end
br $continue|1
end
end
end
get_local $2
i32.const 8
i32.and
if
get_local $0
get_local $1
i32.load
i32.store
get_local $0
i32.const 4
i32.add
get_local $1
i32.const 4
i32.add
i32.load
i32.store
get_local $0
i32.const 8
i32.add
set_local $0
get_local $1
i32.const 8
i32.add
set_local $1
end
get_local $2
i32.const 4
i32.and
if
get_local $0
get_local $1
i32.load
i32.store
get_local $0
i32.const 4
i32.add
set_local $0
get_local $1
i32.const 4
i32.add
set_local $1
end
get_local $2
i32.const 2
i32.and
if
get_local $0
get_local $1
i32.load16_u
i32.store16
get_local $0
i32.const 2
i32.add
set_local $0
get_local $1
i32.const 2
i32.add
set_local $1
end
get_local $2
i32.const 1
i32.and
if
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
end
return
end
get_local $2
i32.const 32
i32.ge_u
if
block $break|2
block $case2|2
block $case1|2
block $case0|2
get_local $0
i32.const 3
i32.and
set_local $5
get_local $5
i32.const 1
i32.eq
br_if $case0|2
get_local $5
i32.const 2
i32.eq
br_if $case1|2
get_local $5
i32.const 3
i32.eq
br_if $case2|2
br $break|2
end
block
get_local $1
i32.load
set_local $3
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
get_local $2
i32.const 3
i32.sub
set_local $2
block $break|3
loop $continue|3
get_local $2
i32.const 17
i32.ge_u
if
block
get_local $1
i32.const 1
i32.add
i32.load
set_local $4
get_local $0
get_local $3
i32.const 24
i32.shr_u
get_local $4
i32.const 8
i32.shl
i32.or
i32.store
get_local $1
i32.const 5
i32.add
i32.load
set_local $3
get_local $0
i32.const 4
i32.add
get_local $4
i32.const 24
i32.shr_u
get_local $3
i32.const 8
i32.shl
i32.or
i32.store
get_local $1
i32.const 9
i32.add
i32.load
set_local $4
get_local $0
i32.const 8
i32.add
get_local $3
i32.const 24
i32.shr_u
get_local $4
i32.const 8
i32.shl
i32.or
i32.store
get_local $1
i32.const 13
i32.add
i32.load
set_local $3
get_local $0
i32.const 12
i32.add
get_local $4
i32.const 24
i32.shr_u
get_local $3
i32.const 8
i32.shl
i32.or
i32.store
get_local $1
i32.const 16
i32.add
set_local $1
get_local $0
i32.const 16
i32.add
set_local $0
get_local $2
i32.const 16
i32.sub
set_local $2
end
br $continue|3
end
end
end
br $break|2
unreachable
end
unreachable
end
block
get_local $1
i32.load
set_local $3
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
get_local $2
i32.const 2
i32.sub
set_local $2
block $break|4
loop $continue|4
get_local $2
i32.const 18
i32.ge_u
if
block
get_local $1
i32.const 2
i32.add
i32.load
set_local $4
get_local $0
get_local $3
i32.const 16
i32.shr_u
get_local $4
i32.const 16
i32.shl
i32.or
i32.store
get_local $1
i32.const 6
i32.add
i32.load
set_local $3
get_local $0
i32.const 4
i32.add
get_local $4
i32.const 16
i32.shr_u
get_local $3
i32.const 16
i32.shl
i32.or
i32.store
get_local $1
i32.const 10
i32.add
i32.load
set_local $4
get_local $0
i32.const 8
i32.add
get_local $3
i32.const 16
i32.shr_u
get_local $4
i32.const 16
i32.shl
i32.or
i32.store
get_local $1
i32.const 14
i32.add
i32.load
set_local $3
get_local $0
i32.const 12
i32.add
get_local $4
i32.const 16
i32.shr_u
get_local $3
i32.const 16
i32.shl
i32.or
i32.store
get_local $1
i32.const 16
i32.add
set_local $1
get_local $0
i32.const 16
i32.add
set_local $0
get_local $2
i32.const 16
i32.sub
set_local $2
end
br $continue|4
end
end
end
br $break|2
unreachable
end
unreachable
end
block
get_local $1
i32.load
set_local $3
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
get_local $2
i32.const 1
i32.sub
set_local $2
block $break|5
loop $continue|5
get_local $2
i32.const 19
i32.ge_u
if
block
get_local $1
i32.const 3
i32.add
i32.load
set_local $4
get_local $0
get_local $3
i32.const 8
i32.shr_u
get_local $4
i32.const 24
i32.shl
i32.or
i32.store
get_local $1
i32.const 7
i32.add
i32.load
set_local $3
get_local $0
i32.const 4
i32.add
get_local $4
i32.const 8
i32.shr_u
get_local $3
i32.const 24
i32.shl
i32.or
i32.store
get_local $1
i32.const 11
i32.add
i32.load
set_local $4
get_local $0
i32.const 8
i32.add
get_local $3
i32.const 8
i32.shr_u
get_local $4
i32.const 24
i32.shl
i32.or
i32.store
get_local $1
i32.const 15
i32.add
i32.load
set_local $3
get_local $0
i32.const 12
i32.add
get_local $4
i32.const 8
i32.shr_u
get_local $3
i32.const 24
i32.shl
i32.or
i32.store
get_local $1
i32.const 16
i32.add
set_local $1
get_local $0
i32.const 16
i32.add
set_local $0
get_local $2
i32.const 16
i32.sub
set_local $2
end
br $continue|5
end
end
end
br $break|2
unreachable
end
unreachable
end
end
get_local $2
i32.const 16
i32.and
if
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
end
get_local $2
i32.const 8
i32.and
if
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
end
get_local $2
i32.const 4
i32.and
if
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
end
get_local $2
i32.const 2
i32.and
if
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
end
get_local $2
i32.const 1
i32.and
if
block (result i32)
get_local $0
tee_local $5
i32.const 1
i32.add
set_local $0
get_local $5
end
block (result i32)
get_local $1
tee_local $5
i32.const 1
i32.add
set_local $1
get_local $5
end
i32.load8_u
i32.store8
end
)
(func $~lib/internal/memory/memmove (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
get_local $0
get_local $1
i32.eq
if
return
end
get_local $1
get_local $2
i32.add
get_local $0
i32.le_u
tee_local $3
if (result i32)
get_local $3
else
get_local $0
get_local $2
i32.add
get_local $1
i32.le_u
end
if
get_local $0
get_local $1
get_local $2
call $~lib/internal/memory/memcpy
return
end
get_local $0
get_local $1
i32.lt_u
if
get_local $1
i32.const 7
i32.and
get_local $0
i32.const 7
i32.and
i32.eq
if
block $break|0
loop $continue|0
get_local $0
i32.const 7
i32.and
if
block
get_local $2
i32.eqz
if
return
end
get_local $2
i32.const 1
i32.sub
set_local $2
block (result i32)
get_local $0
tee_local $3
i32.const 1
i32.add
set_local $0
get_local $3
end
block (result i32)
get_local $1
tee_local $3
i32.const 1
i32.add
set_local $1
get_local $3
end
i32.load8_u
i32.store8
end
br $continue|0
end
end
end
block $break|1
loop $continue|1
get_local $2
i32.const 8
i32.ge_u
if
block
get_local $0
get_local $1
i64.load
i64.store
get_local $2
i32.const 8
i32.sub
set_local $2
get_local $0
i32.const 8
i32.add
set_local $0
get_local $1
i32.const 8
i32.add
set_local $1
end
br $continue|1
end
end
end
end
block $break|2
loop $continue|2
get_local $2
if
block
block (result i32)
get_local $0
tee_local $3
i32.const 1
i32.add
set_local $0
get_local $3
end
block (result i32)
get_local $1
tee_local $3
i32.const 1
i32.add
set_local $1
get_local $3
end
i32.load8_u
i32.store8
get_local $2
i32.const 1
i32.sub
set_local $2
end
br $continue|2
end
end
end
else
get_local $1
i32.const 7
i32.and
get_local $0
i32.const 7
i32.and
i32.eq
if
block $break|3
loop $continue|3
get_local $0
get_local $2
i32.add
i32.const 7
i32.and
if
block
get_local $2
i32.eqz
if
return
end
get_local $0
get_local $2
i32.const 1
i32.sub
tee_local $2
i32.add
get_local $1
get_local $2
i32.add
i32.load8_u
i32.store8
end
br $continue|3
end
end
end
block $break|4
loop $continue|4
get_local $2
i32.const 8
i32.ge_u
if
block
get_local $2
i32.const 8
i32.sub
set_local $2
get_local $0
get_local $2
i32.add
get_local $1
get_local $2
i32.add
i64.load
i64.store
end
br $continue|4
end
end
end
end
block $break|5
loop $continue|5
get_local $2
if
get_local $0
get_local $2
i32.const 1
i32.sub
tee_local $2
i32.add
get_local $1
get_local $2
i32.add
i32.load8_u
i32.store8
br $continue|5
end
end
end
end
)
(func $~lib/allocator/arena/__memory_free (; 7 ;) (type $iv) (param $0 i32)
nop
)
(func $~lib/string/String.fromUTF8 (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
get_local $1
i32.const 1
i32.lt_u
if
i32.const 64
return
end
i32.const 0
set_local $2
block $~lib/memory/memory.allocate|inlined.1 (result i32)
get_local $1
i32.const 1
i32.shl
set_local $3
get_local $3
call $~lib/allocator/arena/__memory_allocate
br $~lib/memory/memory.allocate|inlined.1
end
set_local $4
i32.const 0
set_local $5
block $break|0
loop $continue|0
get_local $2
get_local $1
i32.lt_u
if
block
get_local $0
block (result i32)
get_local $2
tee_local $3
i32.const 1
i32.add
set_local $2
get_local $3
end
i32.add
i32.load8_u
set_local $3
get_local $3
i32.const 128
i32.lt_u
if
get_local $4
get_local $5
i32.add
get_local $3
i32.store16
get_local $5
i32.const 2
i32.add
set_local $5
else
get_local $3
i32.const 191
i32.gt_u
tee_local $6
if (result i32)
get_local $3
i32.const 224
i32.lt_u
else
get_local $6
end
if
get_local $2
i32.const 1
i32.add
get_local $1
i32.le_u
i32.eqz
if
i32.const 0
i32.const 72
i32.const 510
i32.const 8
call $~lib/env/abort
unreachable
end
get_local $4
get_local $5
i32.add
get_local $3
i32.const 31
i32.and
i32.const 6
i32.shl
get_local $0
block (result i32)
get_local $2
tee_local $6
i32.const 1
i32.add
set_local $2
get_local $6
end
i32.add
i32.load8_u
i32.const 63
i32.and
i32.or
i32.store16
get_local $5
i32.const 2
i32.add
set_local $5
else
get_local $3
i32.const 239
i32.gt_u
tee_local $6
if (result i32)
get_local $3
i32.const 365
i32.lt_u
else
get_local $6
end
if
get_local $2
i32.const 3
i32.add
get_local $1
i32.le_u
i32.eqz
if
i32.const 0
i32.const 72
i32.const 514
i32.const 8
call $~lib/env/abort
unreachable
end
get_local $3
i32.const 7
i32.and
i32.const 18
i32.shl
get_local $0
block (result i32)
get_local $2
tee_local $6
i32.const 1
i32.add
set_local $2
get_local $6
end
i32.add
i32.load8_u
i32.const 63
i32.and
i32.const 12
i32.shl
i32.or
get_local $0
block (result i32)
get_local $2
tee_local $6
i32.const 1
i32.add
set_local $2
get_local $6
end
i32.add
i32.load8_u
i32.const 63
i32.and
i32.const 6
i32.shl
i32.or
get_local $0
block (result i32)
get_local $2
tee_local $6
i32.const 1
i32.add
set_local $2
get_local $6
end
i32.add
i32.load8_u
i32.const 63
i32.and
i32.or
i32.const 65536
i32.sub
set_local $3
get_local $4
get_local $5
i32.add
i32.const 55296
get_local $3
i32.const 10
i32.shr_u
i32.add
i32.store16
get_local $5
i32.const 2
i32.add
set_local $5
get_local $4
get_local $5
i32.add
i32.const 56320
get_local $3
i32.const 1023
i32.and
i32.add
i32.store16
get_local $5
i32.const 2
i32.add
set_local $5
else
get_local $2
i32.const 2
i32.add
get_local $1
i32.le_u
i32.eqz
if
i32.const 0
i32.const 72
i32.const 526
i32.const 8
call $~lib/env/abort
unreachable
end
get_local $4
get_local $5
i32.add
get_local $3
i32.const 15
i32.and
i32.const 12
i32.shl
get_local $0
block (result i32)
get_local $2
tee_local $6
i32.const 1
i32.add
set_local $2
get_local $6
end
i32.add
i32.load8_u
i32.const 63
i32.and
i32.const 6
i32.shl
i32.or
get_local $0
block (result i32)
get_local $2
tee_local $6
i32.const 1
i32.add
set_local $2
get_local $6
end
i32.add
i32.load8_u
i32.const 63
i32.and
i32.or
i32.store16
get_local $5
i32.const 2
i32.add
set_local $5
end
end
end
end
br $continue|0
end
end
end
get_local $2
get_local $1
i32.eq
i32.eqz
if
i32.const 0
i32.const 72
i32.const 535
i32.const 4
call $~lib/env/abort
unreachable
end
get_local $5
i32.const 1
i32.shr_u
call $~lib/internal/string/allocateUnsafe
set_local $7
block $~lib/memory/memory.copy|inlined.0
get_local $7
get_global $~lib/internal/string/HEADER_SIZE
i32.add
set_local $3
get_local $3
get_local $4
get_local $5
call $~lib/internal/memory/memmove
end
block $~lib/memory/memory.free|inlined.0
block
get_local $4
call $~lib/allocator/arena/__memory_free
br $~lib/memory/memory.free|inlined.0
unreachable
end
unreachable
end
get_local $7
)
(func $~lib/internal/string/compareUnsafe (; 9 ;) (type $iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
i32.const 0
set_local $5
get_local $0
get_local $1
i32.const 1
i32.shl
i32.add
set_local $6
get_local $2
get_local $3
i32.const 1
i32.shl
i32.add
set_local $7
block $break|0
loop $continue|0
get_local $4
if (result i32)
get_local $6
i32.load16_u offset=4
get_local $7
i32.load16_u offset=4
i32.sub
tee_local $5
i32.eqz
else
get_local $4
end
if
block
get_local $4
i32.const 1
i32.sub
set_local $4
get_local $6
i32.const 1
i32.add
set_local $6
get_local $7
i32.const 1
i32.add
set_local $7
end
br $continue|0
end
end
end
get_local $5
)
(func $~lib/string/String.__eq (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
get_local $0
get_local $1
i32.eq
if
i32.const 1
return
end
get_local $0
i32.const 0
i32.eq
tee_local $2
if (result i32)
get_local $2
else
get_local $1
i32.const 0
i32.eq
end
if
i32.const 0
return
end
get_local $0
i32.load
set_local $3
get_local $3
get_local $1
i32.load
i32.ne
if
i32.const 0
return
end
get_local $0
i32.const 0
get_local $1
i32.const 0
get_local $3
call $~lib/internal/string/compareUnsafe
i32.eqz
)
(func $start (; 11 ;) (type $v)
(local $0 i32)
get_global $HEAP_BASE
get_global $~lib/internal/allocator/AL_MASK
i32.add
get_global $~lib/internal/allocator/AL_MASK
i32.const -1
i32.xor
i32.and
set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset
get_global $std/string-utf8/str
call $~lib/string/String#get:lengthUTF8
set_global $std/string-utf8/len
get_global $std/string-utf8/len
i32.const 11
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 7
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/str
call $~lib/string/String#toUTF8
set_global $std/string-utf8/ptr
get_global $std/string-utf8/ptr
i32.load8_u
i32.const 240
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 11
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=1
i32.const 144
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 12
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=2
i32.const 144
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 13
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=3
i32.const 183
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 14
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=4
i32.const 104
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 15
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=5
i32.const 105
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 16
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=6
i32.const 240
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 17
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=7
i32.const 164
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 18
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=8
i32.const 173
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 19
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=9
i32.const 162
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 20
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.load8_u offset=10
i32.const 0
i32.eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 21
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.const 0
call $~lib/string/String.fromUTF8
i32.const 64
call $~lib/string/String.__eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 23
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
get_global $std/string-utf8/len
i32.const 1
i32.sub
call $~lib/string/String.fromUTF8
get_global $std/string-utf8/str
call $~lib/string/String.__eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 24
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.const 4
call $~lib/string/String.fromUTF8
i32.const 160
call $~lib/string/String.__eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 25
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.const 4
i32.add
i32.const 2
call $~lib/string/String.fromUTF8
i32.const 168
call $~lib/string/String.__eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 26
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.const 6
i32.add
i32.const 4
call $~lib/string/String.fromUTF8
i32.const 176
call $~lib/string/String.__eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 27
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $std/string-utf8/ptr
i32.const 10
i32.add
i32.const 1
call $~lib/string/String.fromUTF8
i32.const 184
call $~lib/string/String.__eq
i32.eqz
if
i32.const 0
i32.const 24
i32.const 28
i32.const 0
call $~lib/env/abort
unreachable
end
block $~lib/memory/memory.free|inlined.1
get_global $std/string-utf8/ptr
set_local $0
block
get_local $0
call $~lib/allocator/arena/__memory_free
br $~lib/memory/memory.free|inlined.1
unreachable
end
unreachable
end
)
(func $null (; 12 ;) (type $v)
)
)