mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 23:12:19 +00:00
25 lines
525 B
Plaintext
25 lines
525 B
Plaintext
(module
|
|
(type $ii (func (param i32) (result i32)))
|
|
(memory $0 1)
|
|
(export "ifThenElse" (func $if/ifThenElse))
|
|
(export "ifThen" (func $if/ifThen))
|
|
(export "ifThenElseBlock" (func $if/ifThenElse))
|
|
(export "memory" (memory $0))
|
|
(func $if/ifThenElse (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
|
(if (result i32)
|
|
(get_local $0)
|
|
(i32.const 1)
|
|
(i32.const 0)
|
|
)
|
|
)
|
|
(func $if/ifThen (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
|
(if
|
|
(get_local $0)
|
|
(return
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(i32.const 0)
|
|
)
|
|
)
|