mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 07:02:13 +00:00
149 lines
2.5 KiB
Plaintext
149 lines
2.5 KiB
Plaintext
(module
|
|
(type $ii (func (param i32) (result i32)))
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
|
(type $v (func))
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
|
(memory $0 1)
|
|
(data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s\00")
|
|
(table $0 1 funcref)
|
|
(elem (i32.const 0) $null)
|
|
(global $HEAP_BASE i32 (i32.const 24))
|
|
(export "memory" (memory $0))
|
|
(export "table" (table $0))
|
|
(export "ifThenElse" (func $if/ifThenElse))
|
|
(export "ifThen" (func $if/ifThen))
|
|
(export "ifThenElseBlock" (func $if/ifThenElseBlock))
|
|
(export "ifAlwaysReturns" (func $if/ifAlwaysReturns))
|
|
(start $start)
|
|
(func $if/ifThenElse (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
|
local.get $0
|
|
if
|
|
i32.const 1
|
|
return
|
|
else
|
|
i32.const 0
|
|
return
|
|
end
|
|
unreachable
|
|
unreachable
|
|
)
|
|
(func $if/ifThen (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
|
local.get $0
|
|
if
|
|
i32.const 1
|
|
return
|
|
end
|
|
i32.const 0
|
|
)
|
|
(func $if/ifThenElseBlock (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
|
local.get $0
|
|
if
|
|
i32.const 1
|
|
return
|
|
else
|
|
i32.const 0
|
|
return
|
|
end
|
|
unreachable
|
|
unreachable
|
|
)
|
|
(func $if/ifAlwaysReturns (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
|
local.get $0
|
|
if
|
|
i32.const 1
|
|
return
|
|
else
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 37
|
|
i32.const 4
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
unreachable
|
|
unreachable
|
|
)
|
|
(func $start (; 5 ;) (type $v)
|
|
i32.const 0
|
|
call $if/ifThenElse
|
|
i32.const 0
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 8
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
i32.const 1
|
|
call $if/ifThenElse
|
|
i32.const 1
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 9
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
i32.const 0
|
|
call $if/ifThen
|
|
i32.const 0
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 17
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
i32.const 1
|
|
call $if/ifThen
|
|
i32.const 1
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 18
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
i32.const 0
|
|
call $if/ifThenElseBlock
|
|
i32.const 0
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 30
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
i32.const 1
|
|
call $if/ifThenElseBlock
|
|
i32.const 1
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 31
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
)
|
|
(func $null (; 6 ;) (type $v)
|
|
)
|
|
)
|