assemblyscript/tests/compiler/nonNullAssertion.untouched.wat

148 lines
4.2 KiB
Plaintext
Raw Normal View History

2019-01-30 09:56:13 +01:00
(module
(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)))
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$i (func (result i32)))
2019-03-17 12:25:54 +01:00
(type $FUNCSIG$v (func))
2019-03-18 16:09:49 +01:00
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00")
(table $0 1 funcref)
2019-01-30 09:56:13 +01:00
(elem (i32.const 0) $null)
2019-03-18 16:09:49 +01:00
(global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0))
(global $~lib/runtime/HEADER_SIZE i32 (i32.const 8))
(global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049))
(global $~lib/argc (mut i32) (i32.const 0))
2019-03-18 16:09:49 +01:00
(global $~lib/memory/HEAP_BASE i32 (i32.const 44))
2019-01-30 09:56:13 +01:00
(export "memory" (memory $0))
(export "table" (table $0))
(export "testVar" (func $nonNullAssertion/testVar))
(export "testObj" (func $nonNullAssertion/testObj))
(export "testProp" (func $nonNullAssertion/testProp))
(export "testArr" (func $nonNullAssertion/testArr))
(export "testElem" (func $nonNullAssertion/testElem))
(export "testAll" (func $nonNullAssertion/testAll))
(export "testAll2" (func $nonNullAssertion/testAll2))
(export "testFn" (func $nonNullAssertion/testFn))
(export "testFn2" (func $nonNullAssertion/testFn2))
(export "testRet" (func $nonNullAssertion/testRet))
(export "testObjFn" (func $nonNullAssertion/testObjFn))
(export "testObjRet" (func $nonNullAssertion/testObjRet))
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
2019-01-30 09:56:13 +01:00
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
2019-01-30 09:56:13 +01:00
i32.load
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
2019-01-30 09:56:13 +01:00
i32.load
)
2019-03-18 16:09:49 +01:00
(func $~lib/array/Array<Foo>#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $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-03-19 15:43:05 +01:00
i32.const 69
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
2019-01-30 09:56:13 +01:00
i32.const 2
2019-03-17 12:25:54 +01:00
i32.shl
i32.add
i32.load
2019-01-30 09:56:13 +01:00
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
2019-03-17 12:25:54 +01:00
i32.const 0
2019-03-18 16:09:49 +01:00
call $~lib/array/Array<Foo>#__get
)
(func $~lib/array/Array<Foo | null>#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
2019-03-17 12:25:54 +01:00
local.get $1
2019-03-18 16:09:49 +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-03-19 15:43:05 +01:00
i32.const 69
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
2019-03-17 12:25:54 +01:00
i32.const 2
i32.shl
i32.add
2019-01-30 09:56:13 +01:00
i32.load
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
2019-01-30 09:56:13 +01:00
i32.const 0
2019-03-18 16:09:49 +01:00
call $~lib/array/Array<Foo | null>#__get
)
(func $nonNullAssertion/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 0
call $~lib/array/Array<Foo | null>#__get
2019-03-17 12:25:54 +01:00
i32.load
2019-03-18 16:09:49 +01:00
)
(func $nonNullAssertion/testAll2 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 0
call $~lib/array/Array<Foo | null>#__get
2019-01-30 09:56:13 +01:00
i32.load
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-01-30 09:56:13 +01:00
i32.const 0
global.set $~lib/argc
local.get $0
call_indirect (type $FUNCSIG$i)
2019-01-30 09:56:13 +01:00
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testFn2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-01-30 09:56:13 +01:00
(local $1 i32)
local.get $0
local.set $1
2019-01-30 09:56:13 +01:00
i32.const 0
global.set $~lib/argc
local.get $1
call_indirect (type $FUNCSIG$i)
2019-01-30 09:56:13 +01:00
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testRet (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-01-30 09:56:13 +01:00
i32.const 0
global.set $~lib/argc
local.get $0
call_indirect (type $FUNCSIG$i)
2019-01-30 09:56:13 +01:00
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testObjFn (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-01-30 09:56:13 +01:00
i32.const 0
global.set $~lib/argc
local.get $0
2019-01-30 09:56:13 +01:00
i32.load offset=4
call_indirect (type $FUNCSIG$i)
2019-01-30 09:56:13 +01:00
)
2019-03-18 16:09:49 +01:00
(func $nonNullAssertion/testObjRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-01-30 09:56:13 +01:00
i32.const 0
global.set $~lib/argc
local.get $0
2019-01-30 09:56:13 +01:00
i32.load offset=4
call_indirect (type $FUNCSIG$i)
2019-01-30 09:56:13 +01:00
)
2019-03-18 16:09:49 +01:00
(func $null (; 15 ;) (type $FUNCSIG$v)
2019-01-30 09:56:13 +01:00
)
)