mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-03 00:21:52 +00:00
More tests and fixes (unary, binary, globals)
This commit is contained in:
79
tests/compiler/do.wast
Normal file
79
tests/compiler/do.wast
Normal file
@ -0,0 +1,79 @@
|
||||
(module
|
||||
(type $iv (func (param i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(func $do/loopDo (; 0 ;) (type $iv) (param $0 i32)
|
||||
(block $break$1.1
|
||||
(loop $continue$1.1
|
||||
(block
|
||||
(set_local $0
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(br_if $continue$1.1
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $do/loopDoInDo (; 1 ;) (type $iv) (param $0 i32)
|
||||
(block $break$1.1
|
||||
(loop $continue$1.1
|
||||
(block
|
||||
(set_local $0
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(block $break$1.2
|
||||
(loop $continue$1.2
|
||||
(block
|
||||
(set_local $0
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(br_if $continue$1.2
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(br_if $continue$1.1
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
clz
|
||||
ctz
|
||||
popcnt
|
||||
rotl
|
||||
rotr
|
||||
abs
|
||||
ceil
|
||||
copysign
|
||||
floor
|
||||
max
|
||||
min
|
||||
nearest
|
||||
sqrt
|
||||
trunc
|
||||
isNaN
|
||||
isFinite
|
||||
do/loopDo
|
||||
do/loopDoInDo
|
||||
[program.exports]
|
||||
do/loopDo
|
||||
do/loopDoInDo
|
||||
;)
|
Reference in New Issue
Block a user