assemblyscript/tests/compiler/std/arraybuffer.untouched.wat
2019-05-23 13:20:10 +02:00

2097 lines
37 KiB
Plaintext

(module
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$viii (func (param i32 i32 i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00")
(data (i32.const 56) "&\00\00\00\01\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00")
(data (i32.const 112) "$\00\00\00\01\00\00\00\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00")
(data (i32.const 168) "\08\00\00\00\01\00\00\00\00\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00")
(data (i32.const 192) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00")
(table $0 1 funcref)
(elem (i32.const 0) $null)
(global $~lib/rt/stub/startOffset (mut i32) (i32.const 0))
(global $~lib/rt/stub/offset (mut i32) (i32.const 0))
(global $std/arraybuffer/buffer (mut i32) (i32.const 0))
(global $std/arraybuffer/sliced (mut i32) (i32.const 0))
(global $std/arraybuffer/arr8 (mut i32) (i32.const 0))
(global $~lib/argc (mut i32) (i32.const 0))
(global $~lib/heap/HEAP_BASE i32 (i32.const 240))
(export "memory" (memory $0))
(start $start)
(func $~lib/rt/stub/__alloc (; 1 ;) (type $FUNCSIG$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)
(local $8 i32)
local.get $0
i32.const 1073741808
i32.gt_u
if
unreachable
end
global.get $~lib/rt/stub/offset
i32.const 16
i32.add
local.set $2
local.get $2
local.get $0
local.tee $3
i32.const 1
local.tee $4
local.get $3
local.get $4
i32.gt_u
select
i32.add
i32.const 15
i32.add
i32.const 15
i32.const -1
i32.xor
i32.and
local.set $5
memory.size
local.set $6
local.get $5
local.get $6
i32.const 16
i32.shl
i32.gt_u
if
local.get $5
local.get $2
i32.sub
i32.const 65535
i32.add
i32.const 65535
i32.const -1
i32.xor
i32.and
i32.const 16
i32.shr_u
local.set $3
local.get $6
local.tee $4
local.get $3
local.tee $7
local.get $4
local.get $7
i32.gt_s
select
local.set $4
local.get $4
memory.grow
i32.const 0
i32.lt_s
if
local.get $3
memory.grow
i32.const 0
i32.lt_s
if
unreachable
end
end
end
local.get $5
global.set $~lib/rt/stub/offset
local.get $2
i32.const 16
i32.sub
local.set $8
local.get $8
local.get $1
i32.store offset=8
local.get $8
local.get $0
i32.store offset=12
local.get $2
)
(func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i64)
block $~lib/util/memory/memset|inlined.0
local.get $0
local.set $5
local.get $1
local.set $4
local.get $2
local.set $3
local.get $3
i32.eqz
if
br $~lib/util/memory/memset|inlined.0
end
local.get $5
local.get $4
i32.store8
local.get $5
local.get $3
i32.add
i32.const 1
i32.sub
local.get $4
i32.store8
local.get $3
i32.const 2
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
local.get $5
i32.const 1
i32.add
local.get $4
i32.store8
local.get $5
i32.const 2
i32.add
local.get $4
i32.store8
local.get $5
local.get $3
i32.add
i32.const 2
i32.sub
local.get $4
i32.store8
local.get $5
local.get $3
i32.add
i32.const 3
i32.sub
local.get $4
i32.store8
local.get $3
i32.const 6
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
local.get $5
i32.const 3
i32.add
local.get $4
i32.store8
local.get $5
local.get $3
i32.add
i32.const 4
i32.sub
local.get $4
i32.store8
local.get $3
i32.const 8
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
i32.const 0
local.get $5
i32.sub
i32.const 3
i32.and
local.set $6
local.get $5
local.get $6
i32.add
local.set $5
local.get $3
local.get $6
i32.sub
local.set $3
local.get $3
i32.const -4
i32.and
local.set $3
i32.const -1
i32.const 255
i32.div_u
local.get $4
i32.const 255
i32.and
i32.mul
local.set $7
local.get $5
local.get $7
i32.store
local.get $5
local.get $3
i32.add
i32.const 4
i32.sub
local.get $7
i32.store
local.get $3
i32.const 8
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
local.get $5
i32.const 4
i32.add
local.get $7
i32.store
local.get $5
i32.const 8
i32.add
local.get $7
i32.store
local.get $5
local.get $3
i32.add
i32.const 12
i32.sub
local.get $7
i32.store
local.get $5
local.get $3
i32.add
i32.const 8
i32.sub
local.get $7
i32.store
local.get $3
i32.const 24
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
local.get $5
i32.const 12
i32.add
local.get $7
i32.store
local.get $5
i32.const 16
i32.add
local.get $7
i32.store
local.get $5
i32.const 20
i32.add
local.get $7
i32.store
local.get $5
i32.const 24
i32.add
local.get $7
i32.store
local.get $5
local.get $3
i32.add
i32.const 28
i32.sub
local.get $7
i32.store
local.get $5
local.get $3
i32.add
i32.const 24
i32.sub
local.get $7
i32.store
local.get $5
local.get $3
i32.add
i32.const 20
i32.sub
local.get $7
i32.store
local.get $5
local.get $3
i32.add
i32.const 16
i32.sub
local.get $7
i32.store
i32.const 24
local.get $5
i32.const 4
i32.and
i32.add
local.set $6
local.get $5
local.get $6
i32.add
local.set $5
local.get $3
local.get $6
i32.sub
local.set $3
local.get $7
i64.extend_i32_u
local.get $7
i64.extend_i32_u
i64.const 32
i64.shl
i64.or
local.set $8
block $break|0
loop $continue|0
local.get $3
i32.const 32
i32.ge_u
if
local.get $5
local.get $8
i64.store
local.get $5
i32.const 8
i32.add
local.get $8
i64.store
local.get $5
i32.const 16
i32.add
local.get $8
i64.store
local.get $5
i32.const 24
i32.add
local.get $8
i64.store
local.get $3
i32.const 32
i32.sub
local.set $3
local.get $5
i32.const 32
i32.add
local.set $5
br $continue|0
end
end
end
end
)
(func $~lib/rt/stub/__retain (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
)
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
local.get $1
i32.const 1073741808
i32.gt_u
if
i32.const 24
i32.const 72
i32.const 56
i32.const 42
call $~lib/builtins/abort
unreachable
end
local.get $1
i32.const 0
call $~lib/rt/stub/__alloc
local.set $2
local.get $2
i32.const 0
local.get $1
call $~lib/memory/memory.fill
local.get $2
call $~lib/rt/stub/__retain
)
(func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 16
i32.sub
i32.load offset=12
)
(func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
block $~lib/util/memory/memmove|inlined.0
local.get $0
local.set $5
local.get $1
local.set $4
local.get $2
local.set $3
local.get $5
local.get $4
i32.eq
if
br $~lib/util/memory/memmove|inlined.0
end
local.get $5
local.get $4
i32.lt_u
if
local.get $4
i32.const 7
i32.and
local.get $5
i32.const 7
i32.and
i32.eq
if
block $break|0
loop $continue|0
local.get $5
i32.const 7
i32.and
if
local.get $3
i32.eqz
if
br $~lib/util/memory/memmove|inlined.0
end
local.get $3
i32.const 1
i32.sub
local.set $3
block (result i32)
local.get $5
local.tee $6
i32.const 1
i32.add
local.set $5
local.get $6
end
block (result i32)
local.get $4
local.tee $6
i32.const 1
i32.add
local.set $4
local.get $6
end
i32.load8_u
i32.store8
br $continue|0
end
end
end
block $break|1
loop $continue|1
local.get $3
i32.const 8
i32.ge_u
if
local.get $5
local.get $4
i64.load
i64.store
local.get $3
i32.const 8
i32.sub
local.set $3
local.get $5
i32.const 8
i32.add
local.set $5
local.get $4
i32.const 8
i32.add
local.set $4
br $continue|1
end
end
end
end
block $break|2
loop $continue|2
local.get $3
if
block (result i32)
local.get $5
local.tee $6
i32.const 1
i32.add
local.set $5
local.get $6
end
block (result i32)
local.get $4
local.tee $6
i32.const 1
i32.add
local.set $4
local.get $6
end
i32.load8_u
i32.store8
local.get $3
i32.const 1
i32.sub
local.set $3
br $continue|2
end
end
end
else
local.get $4
i32.const 7
i32.and
local.get $5
i32.const 7
i32.and
i32.eq
if
block $break|3
loop $continue|3
local.get $5
local.get $3
i32.add
i32.const 7
i32.and
if
local.get $3
i32.eqz
if
br $~lib/util/memory/memmove|inlined.0
end
local.get $5
local.get $3
i32.const 1
i32.sub
local.tee $3
i32.add
local.get $4
local.get $3
i32.add
i32.load8_u
i32.store8
br $continue|3
end
end
end
block $break|4
loop $continue|4
local.get $3
i32.const 8
i32.ge_u
if
local.get $3
i32.const 8
i32.sub
local.set $3
local.get $5
local.get $3
i32.add
local.get $4
local.get $3
i32.add
i64.load
i64.store
br $continue|4
end
end
end
end
block $break|5
loop $continue|5
local.get $3
if
local.get $5
local.get $3
i32.const 1
i32.sub
local.tee $3
i32.add
local.get $4
local.get $3
i32.add
i32.load8_u
i32.store8
br $continue|5
end
end
end
end
end
)
(func $~lib/arraybuffer/ArrayBuffer#slice (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
local.get $0
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
local.set $3
local.get $1
i32.const 0
i32.lt_s
if (result i32)
local.get $3
local.get $1
i32.add
local.tee $4
i32.const 0
local.tee $5
local.get $4
local.get $5
i32.gt_s
select
else
local.get $1
local.tee $4
local.get $3
local.tee $5
local.get $4
local.get $5
i32.lt_s
select
end
local.set $1
local.get $2
i32.const 0
i32.lt_s
if (result i32)
local.get $3
local.get $2
i32.add
local.tee $4
i32.const 0
local.tee $5
local.get $4
local.get $5
i32.gt_s
select
else
local.get $2
local.tee $4
local.get $3
local.tee $5
local.get $4
local.get $5
i32.lt_s
select
end
local.set $2
local.get $2
local.get $1
i32.sub
local.tee $4
i32.const 0
local.tee $5
local.get $4
local.get $5
i32.gt_s
select
local.set $6
local.get $6
i32.const 0
call $~lib/rt/stub/__alloc
local.set $7
local.get $7
local.get $0
local.get $1
i32.add
local.get $6
call $~lib/memory/memory.copy
local.get $7
call $~lib/rt/stub/__retain
)
(func $~lib/rt/stub/__skippedRelease (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
)
(func $~lib/rt/stub/__release (; 9 ;) (type $FUNCSIG$vi) (param $0 i32)
nop
)
(func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array<i32>> (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0
if
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
end
i32.const 0
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
)
(func $~lib/arraybuffer/ArrayBuffer.isView<usize> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
if
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
return
end
end
i32.const 0
)
(func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0
if
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 1
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
end
i32.const 0
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
)
(func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0
if
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 1
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
end
i32.const 0
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
)
(func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0
if
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 0
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
block (result i32)
local.get $0
drop
i32.const 1
end
if
i32.const 1
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
return
end
end
i32.const 0
local.set $1
local.get $0
call $~lib/rt/stub/__release
local.get $1
)
(func $~lib/rt/stub/__retainRelease (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
)
(func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
local.get $1
i32.const 1073741808
local.get $2
i32.shr_u
i32.gt_u
if
i32.const 24
i32.const 72
i32.const 14
i32.const 56
call $~lib/builtins/abort
unreachable
end
local.get $1
local.get $2
i32.shl
local.tee $1
i32.const 0
call $~lib/rt/stub/__alloc
local.set $3
block (result i32)
local.get $0
i32.eqz
if
i32.const 12
i32.const 2
call $~lib/rt/stub/__alloc
call $~lib/rt/stub/__retain
local.set $0
end
local.get $0
i32.const 0
i32.store
local.get $0
i32.const 0
i32.store offset=4
local.get $0
i32.const 0
i32.store offset=8
local.get $0
end
local.tee $4
local.get $4
i32.load
local.get $3
call $~lib/rt/stub/__retainRelease
i32.store
local.get $0
local.get $3
i32.store offset=4
local.get $0
local.get $1
i32.store offset=8
local.get $0
)
(func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
local.get $0
if (result i32)
local.get $0
else
i32.const 12
i32.const 5
call $~lib/rt/stub/__alloc
call $~lib/rt/stub/__retain
end
local.get $1
i32.const 0
call $~lib/arraybuffer/ArrayBufferView#constructor
local.tee $2
local.set $0
local.get $0
)
(func $~lib/rt/__allocArray (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
i32.const 16
local.get $2
call $~lib/rt/stub/__alloc
local.set $4
local.get $0
local.get $1
i32.shl
local.set $5
local.get $5
i32.const 0
call $~lib/rt/stub/__alloc
local.set $6
local.get $4
local.get $6
call $~lib/rt/stub/__retain
i32.store
local.get $4
local.get $6
i32.store offset=4
local.get $4
local.get $5
i32.store offset=8
local.get $4
local.get $0
i32.store offset=12
local.get $3
if
local.get $6
local.get $3
local.get $5
call $~lib/memory/memory.copy
end
local.get $4
)
(func $~lib/typedarray/Int32Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
local.get $0
if (result i32)
local.get $0
else
i32.const 12
i32.const 9
call $~lib/rt/stub/__alloc
call $~lib/rt/stub/__retain
end
local.get $1
i32.const 2
call $~lib/arraybuffer/ArrayBufferView#constructor
local.tee $2
local.set $0
local.get $0
)
(func $~lib/dataview/DataView#constructor (; 20 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
local.get $1
call $~lib/rt/stub/__retain
drop
local.get $3
i32.const 1073741808
i32.gt_u
local.get $2
local.get $3
i32.add
local.get $1
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.gt_u
i32.or
if
local.get $1
call $~lib/rt/stub/__release
block
i32.const 24
i32.const 208
i32.const 21
i32.const 6
call $~lib/builtins/abort
unreachable
unreachable
end
unreachable
end
block (result i32)
local.get $0
i32.eqz
if
i32.const 12
i32.const 15
call $~lib/rt/stub/__alloc
call $~lib/rt/stub/__retain
local.set $0
end
local.get $0
i32.const 0
i32.store
local.get $0
i32.const 0
i32.store offset=4
local.get $0
i32.const 0
i32.store offset=8
local.get $0
end
local.tee $4
local.get $4
i32.load
local.get $1
call $~lib/rt/stub/__retainRelease
i32.store
local.get $1
local.get $2
i32.add
local.set $5
local.get $0
local.get $5
i32.store offset=4
local.get $0
local.get $3
i32.store offset=8
local.get $0
)
(func $~lib/typedarray/Uint8Array#get:buffer (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.load
call $~lib/rt/stub/__retain
)
(func $~lib/dataview/DataView#constructor|trampoline (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
block $2of2
block $1of2
block $0of2
block $outOfRange
global.get $~lib/argc
i32.const 1
i32.sub
br_table $0of2 $1of2 $2of2 $outOfRange
end
unreachable
end
i32.const 0
local.set $2
end
local.get $1
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
local.set $3
end
local.get $0
local.get $1
local.get $2
local.get $3
call $~lib/dataview/DataView#constructor
)
(func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
global.get $~lib/heap/HEAP_BASE
i32.const 15
i32.add
i32.const 15
i32.const -1
i32.xor
i32.and
global.set $~lib/rt/stub/startOffset
global.get $~lib/rt/stub/startOffset
global.set $~lib/rt/stub/offset
i32.const 0
i32.const 8
call $~lib/arraybuffer/ArrayBuffer#constructor
global.set $std/arraybuffer/buffer
global.get $std/arraybuffer/buffer
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 8
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 3
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/buffer
i32.const 0
i32.const 1073741808
call $~lib/arraybuffer/ArrayBuffer#slice
global.set $std/arraybuffer/sliced
global.get $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 8
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 7
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
global.get $std/arraybuffer/buffer
i32.ne
i32.eqz
if
i32.const 0
i32.const 128
i32.const 8
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
global.get $std/arraybuffer/buffer
i32.const 1
i32.const 1073741808
call $~lib/arraybuffer/ArrayBuffer#slice
call $~lib/rt/stub/__skippedRelease
global.set $std/arraybuffer/sliced
global.get $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 7
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 12
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
global.get $std/arraybuffer/buffer
i32.const -1
i32.const 1073741808
call $~lib/arraybuffer/ArrayBuffer#slice
call $~lib/rt/stub/__skippedRelease
global.set $std/arraybuffer/sliced
global.get $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 1
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 16
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
global.get $std/arraybuffer/buffer
i32.const 1
i32.const 3
call $~lib/arraybuffer/ArrayBuffer#slice
call $~lib/rt/stub/__skippedRelease
global.set $std/arraybuffer/sliced
global.get $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 2
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 20
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
global.get $std/arraybuffer/buffer
i32.const 1
i32.const -1
call $~lib/arraybuffer/ArrayBuffer#slice
call $~lib/rt/stub/__skippedRelease
global.set $std/arraybuffer/sliced
global.get $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 6
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 24
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
global.get $std/arraybuffer/buffer
i32.const -3
i32.const -1
call $~lib/arraybuffer/ArrayBuffer#slice
call $~lib/rt/stub/__skippedRelease
global.set $std/arraybuffer/sliced
global.get $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 2
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 28
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
global.get $std/arraybuffer/buffer
i32.const -4
i32.const 42
call $~lib/arraybuffer/ArrayBuffer#slice
call $~lib/rt/stub/__skippedRelease
global.set $std/arraybuffer/sliced
global.get $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 4
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 32
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
global.get $std/arraybuffer/buffer
i32.const 42
i32.const 1073741808
call $~lib/arraybuffer/ArrayBuffer#slice
call $~lib/rt/stub/__skippedRelease
global.set $std/arraybuffer/sliced
global.get $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
i32.const 0
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 36
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/sliced
i32.const 0
i32.ne
i32.eqz
if
i32.const 0
i32.const 128
i32.const 37
i32.const 0
call $~lib/builtins/abort
unreachable
end
i32.const 0
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array<i32>>
i32.eqz
i32.eqz
if
i32.const 0
i32.const 128
i32.const 39
i32.const 0
call $~lib/builtins/abort
unreachable
end
i32.const 0
call $~lib/arraybuffer/ArrayBuffer.isView<usize>
i32.eqz
i32.eqz
if
i32.const 0
i32.const 128
i32.const 40
i32.const 0
call $~lib/builtins/abort
unreachable
end
i32.const 0
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>
i32.eqz
i32.eqz
if
i32.const 0
i32.const 128
i32.const 41
i32.const 0
call $~lib/builtins/abort
unreachable
end
i32.const 0
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>
i32.eqz
i32.eqz
if
i32.const 0
i32.const 128
i32.const 42
i32.const 0
call $~lib/builtins/abort
unreachable
end
i32.const 0
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView>
i32.eqz
i32.eqz
if
i32.const 0
i32.const 128
i32.const 43
i32.const 0
call $~lib/builtins/abort
unreachable
end
i32.const 0
i32.const 1
call $~lib/typedarray/Uint8Array#constructor
global.set $std/arraybuffer/arr8
i32.const 2
i32.const 2
i32.const 3
i32.const 184
call $~lib/rt/__allocArray
call $~lib/rt/stub/__retain
local.tee $1
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array<i32>>
i32.eqz
i32.eqz
if
i32.const 0
i32.const 128
i32.const 46
i32.const 0
call $~lib/builtins/abort
unreachable
end
global.get $std/arraybuffer/arr8
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>
i32.eqz
if
i32.const 0
i32.const 128
i32.const 47
i32.const 0
call $~lib/builtins/abort
unreachable
end
i32.const 0
i32.const 1
call $~lib/typedarray/Int32Array#constructor
local.tee $0
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>
i32.eqz
if
i32.const 0
i32.const 128
i32.const 48
i32.const 0
call $~lib/builtins/abort
unreachable
end
block (result i32)
i32.const 1
global.set $~lib/argc
i32.const 0
global.get $std/arraybuffer/arr8
call $~lib/typedarray/Uint8Array#get:buffer
local.tee $2
i32.const 0
i32.const 0
call $~lib/dataview/DataView#constructor|trampoline
local.tee $3
end
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView>
i32.eqz
if
i32.const 0
i32.const 128
i32.const 49
i32.const 0
call $~lib/builtins/abort
unreachable
end
local.get $0
call $~lib/rt/stub/__release
local.get $1
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $3
call $~lib/rt/stub/__release
)
(func $start (; 24 ;) (type $FUNCSIG$v)
call $start:std/arraybuffer
)
(func $null (; 25 ;) (type $FUNCSIG$v)
)
)