mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 01:41:30 +00:00
Fix continue labels in 'for' loops skipping the incrementor
This commit is contained in:
@ -1632,35 +1632,33 @@
|
||||
(i32.const 8388608)
|
||||
)
|
||||
(block (result i32)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 9)
|
||||
(block $break|0
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 9)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
(i32.eqz
|
||||
(loop $loop|0
|
||||
(br_if $break|0
|
||||
(i32.shr_u
|
||||
(get_local $3)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|0)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $loop|0)
|
||||
)
|
||||
)
|
||||
(i32.shl
|
||||
@ -1684,35 +1682,33 @@
|
||||
(i32.const 8388608)
|
||||
)
|
||||
(block (result i32)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 9)
|
||||
(block $break|1
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 9)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
(i32.eqz
|
||||
(loop $loop|1
|
||||
(br_if $break|1
|
||||
(i32.shr_u
|
||||
(get_local $3)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $6
|
||||
(i32.sub
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(set_local $6
|
||||
(i32.sub
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|1)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $loop|1)
|
||||
)
|
||||
)
|
||||
(i32.shl
|
||||
@ -1725,50 +1721,50 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|2
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(get_local $6)
|
||||
(block $break|2
|
||||
(loop $loop|2
|
||||
(br_if $break|2
|
||||
(i32.le_s
|
||||
(get_local $4)
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(tee_local $3
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(get_local $5)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(tee_local $3
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(get_local $5)
|
||||
)
|
||||
(i32.const 31)
|
||||
)
|
||||
(i32.const 31)
|
||||
)
|
||||
(block
|
||||
(br_if $folding-inner0
|
||||
(i32.eqz
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
)
|
||||
(block
|
||||
(br_if $folding-inner0
|
||||
(i32.eqz
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
(set_local $2
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|2)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $loop|2)
|
||||
)
|
||||
)
|
||||
(if
|
||||
@ -1794,29 +1790,27 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|3
|
||||
(if
|
||||
(i32.eqz
|
||||
(block $break|3
|
||||
(loop $loop|3
|
||||
(br_if $break|3
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|3)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $loop|3)
|
||||
)
|
||||
)
|
||||
(return
|
||||
@ -3256,35 +3250,37 @@
|
||||
(i64.const 4503599627370496)
|
||||
)
|
||||
(block (result i64)
|
||||
(set_local $4
|
||||
(i64.shl
|
||||
(get_local $2)
|
||||
(i64.const 12)
|
||||
(block $break|0
|
||||
(set_local $4
|
||||
(i64.shl
|
||||
(get_local $2)
|
||||
(i64.const 12)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
(i64.eqz
|
||||
(i64.shr_u
|
||||
(loop $loop|0
|
||||
(br_if $break|0
|
||||
(i32.eqz
|
||||
(i64.eqz
|
||||
(i64.shr_u
|
||||
(get_local $4)
|
||||
(i64.const 63)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(i64.shl
|
||||
(get_local $4)
|
||||
(i64.const 63)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(i64.shl
|
||||
(get_local $4)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|0)
|
||||
)
|
||||
(br $loop|0)
|
||||
)
|
||||
)
|
||||
(i64.shl
|
||||
@ -3310,35 +3306,37 @@
|
||||
(i64.const 4503599627370496)
|
||||
)
|
||||
(block (result i64)
|
||||
(set_local $4
|
||||
(i64.shl
|
||||
(get_local $5)
|
||||
(i64.const 12)
|
||||
(block $break|1
|
||||
(set_local $4
|
||||
(i64.shl
|
||||
(get_local $5)
|
||||
(i64.const 12)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
(i64.eqz
|
||||
(i64.shr_u
|
||||
(loop $loop|1
|
||||
(br_if $break|1
|
||||
(i32.eqz
|
||||
(i64.eqz
|
||||
(i64.shr_u
|
||||
(get_local $4)
|
||||
(i64.const 63)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $6
|
||||
(i32.sub
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(i64.shl
|
||||
(get_local $4)
|
||||
(i64.const 63)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $6
|
||||
(i32.sub
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(i64.shl
|
||||
(get_local $4)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|1)
|
||||
)
|
||||
(br $loop|1)
|
||||
)
|
||||
)
|
||||
(i64.shl
|
||||
@ -3353,50 +3351,50 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|2
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $6)
|
||||
(block $break|2
|
||||
(loop $loop|2
|
||||
(br_if $break|2
|
||||
(i32.le_s
|
||||
(get_local $3)
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i64.eqz
|
||||
(i64.shr_u
|
||||
(tee_local $4
|
||||
(i64.sub
|
||||
(get_local $2)
|
||||
(get_local $5)
|
||||
)
|
||||
(if
|
||||
(i64.eqz
|
||||
(i64.shr_u
|
||||
(tee_local $4
|
||||
(i64.sub
|
||||
(get_local $2)
|
||||
(get_local $5)
|
||||
)
|
||||
(i64.const 63)
|
||||
)
|
||||
(i64.const 63)
|
||||
)
|
||||
(block
|
||||
(br_if $folding-inner0
|
||||
(i64.eqz
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
)
|
||||
(block
|
||||
(br_if $folding-inner0
|
||||
(i64.eqz
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i64.shl
|
||||
(get_local $2)
|
||||
(i64.const 1)
|
||||
(set_local $2
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|2)
|
||||
)
|
||||
(set_local $2
|
||||
(i64.shl
|
||||
(get_local $2)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $loop|2)
|
||||
)
|
||||
)
|
||||
(if
|
||||
@ -3422,29 +3420,31 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|3
|
||||
(if
|
||||
(i64.eqz
|
||||
(i64.shr_u
|
||||
(block $break|3
|
||||
(loop $loop|3
|
||||
(br_if $break|3
|
||||
(i32.eqz
|
||||
(i64.eqz
|
||||
(i64.shr_u
|
||||
(get_local $2)
|
||||
(i64.const 52)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i64.shl
|
||||
(get_local $2)
|
||||
(i64.const 52)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i64.shl
|
||||
(get_local $2)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|3)
|
||||
)
|
||||
(br $loop|3)
|
||||
)
|
||||
)
|
||||
(return
|
||||
|
Reference in New Issue
Block a user