assemblyscript/tests/compiler/nonNullAssertion.untouched.wat

151 lines
3.6 KiB
Plaintext
Raw Normal View History

2019-01-30 09:56:13 +01:00
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$i (func (result i32)))
2019-03-17 12:25:54 +01:00
(type $FUNCSIG$v (func))
2019-01-30 09:56:13 +01:00
(memory $0 0)
(table $0 1 funcref)
2019-01-30 09:56:13 +01:00
(elem (i32.const 0) $null)
(global $~lib/argc (mut i32) (i32.const 0))
(global $~lib/memory/HEAP_BASE i32 (i32.const 8))
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-17 12:25:54 +01:00
(func $nonNullAssertion/testVar (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
2019-01-30 09:56:13 +01:00
)
2019-03-17 12:25:54 +01:00
(func $nonNullAssertion/testObj (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
2019-01-30 09:56:13 +01:00
i32.load
)
2019-03-17 12:25:54 +01:00
(func $nonNullAssertion/testProp (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
2019-01-30 09:56:13 +01:00
i32.load
)
2019-03-17 12:25:54 +01:00
(func $nonNullAssertion/testArr (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
2019-01-30 09:56:13 +01:00
(local $2 i32)
local.get $0
2019-03-17 12:25:54 +01:00
local.tee $1
i32.load offset=4
i32.const 0
2019-01-30 09:56:13 +01:00
i32.const 2
2019-03-17 12:25:54 +01:00
i32.shl
local.tee $2
i32.add
i32.const -1
local.get $2
local.get $1
i32.load offset=8
2019-01-30 09:56:13 +01:00
i32.lt_u
2019-03-17 12:25:54 +01:00
select
i32.load
2019-01-30 09:56:13 +01:00
)
2019-03-17 12:25:54 +01:00
(func $nonNullAssertion/testElem (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
2019-01-30 09:56:13 +01:00
(local $2 i32)
local.get $0
2019-03-17 12:25:54 +01:00
local.tee $1
i32.load offset=4
i32.const 0
2019-01-30 09:56:13 +01:00
i32.const 2
2019-03-17 12:25:54 +01:00
i32.shl
local.tee $2
i32.add
i32.const -1
local.get $2
local.get $1
i32.load offset=8
2019-01-30 09:56:13 +01:00
i32.lt_u
2019-03-17 12:25:54 +01:00
select
i32.load
2019-01-30 09:56:13 +01:00
)
2019-03-17 12:25:54 +01:00
(func $nonNullAssertion/testAll (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0
2019-03-17 12:25:54 +01:00
local.tee $1
i32.load offset=4
2019-01-30 09:56:13 +01:00
i32.const 0
2019-03-17 12:25:54 +01:00
i32.const 2
i32.shl
local.tee $2
i32.add
i32.const -1
local.get $2
local.get $1
i32.load offset=8
i32.lt_u
select
i32.load
2019-01-30 09:56:13 +01:00
i32.load
)
2019-03-17 12:25:54 +01:00
(func $nonNullAssertion/testAll2 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0
2019-03-17 12:25:54 +01:00
local.tee $1
i32.load offset=4
2019-01-30 09:56:13 +01:00
i32.const 0
2019-03-17 12:25:54 +01:00
i32.const 2
i32.shl
local.tee $2
i32.add
i32.const -1
local.get $2
local.get $1
i32.load offset=8
i32.lt_u
select
i32.load
2019-01-30 09:56:13 +01:00
i32.load
)
2019-03-17 12:25:54 +01:00
(func $nonNullAssertion/testFn (; 7 ;) (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-17 12:25:54 +01:00
(func $nonNullAssertion/testFn2 (; 8 ;) (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-17 12:25:54 +01:00
(func $nonNullAssertion/testRet (; 9 ;) (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-17 12:25:54 +01:00
(func $nonNullAssertion/testObjFn (; 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
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-17 12:25:54 +01:00
(func $nonNullAssertion/testObjRet (; 11 ;) (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-17 12:25:54 +01:00
(func $null (; 12 ;) (type $FUNCSIG$v)
2019-01-30 09:56:13 +01:00
)
)