mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-26 21:21:54 +00:00
Built-in abs/min/max for integers; For-loop fixes
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(block $break$1.1
|
||||
(set_global $for/i
|
||||
(i32.const 0)
|
||||
@ -30,12 +31,120 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(get_global $for/i)
|
||||
(i32.const 10)
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(get_global $for/i)
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $break$2.1
|
||||
(block
|
||||
(set_local $0
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(loop $continue$2.1
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $0)
|
||||
(i32.const 10)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue$2.1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(block $break$3.1
|
||||
(nop)
|
||||
(loop $continue$3.1
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_global $for/i)
|
||||
(i32.const 0)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_global $for/i
|
||||
(i32.sub
|
||||
(get_global $for/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue$3.1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(get_global $for/i)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $break$4.1
|
||||
(nop)
|
||||
(loop $continue$4.1
|
||||
(if
|
||||
(i32.const 1)
|
||||
(block
|
||||
(if
|
||||
(i32.eq
|
||||
(get_global $for/i)
|
||||
(i32.const 10)
|
||||
)
|
||||
(br $break$4.1)
|
||||
)
|
||||
(set_global $for/i
|
||||
(i32.add
|
||||
(get_global $for/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue$4.1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(block $break$5.1
|
||||
(nop)
|
||||
(loop $continue$5.1
|
||||
(if
|
||||
(i32.const 1)
|
||||
(block
|
||||
(if
|
||||
(i32.eq
|
||||
(block (result i32)
|
||||
(set_global $for/i
|
||||
(i32.sub
|
||||
(get_global $for/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_global $for/i)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(br $break$5.1)
|
||||
)
|
||||
(nop)
|
||||
(br $continue$5.1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
|
Reference in New Issue
Block a user