Unified continue/break labels with binaryen labels; Module-level global exports

This commit is contained in:
dcodeIO
2017-12-06 17:47:48 +01:00
parent f045975a4b
commit 29468846ab
23 changed files with 192 additions and 148 deletions

View File

@ -10,7 +10,7 @@
(set_global $for/i
(i32.const 0)
)
(loop $continue$1.1
(loop $continue|1.1
(if
(i32.lt_s
(get_global $for/i)
@ -23,7 +23,7 @@
(i32.const 1)
)
)
(br $continue$1.1)
(br $continue|1.1)
)
)
)
@ -37,7 +37,7 @@
(set_local $0
(i32.const 0)
)
(loop $continue$2.1
(loop $continue|2.1
(if
(i32.lt_s
(get_local $0)
@ -50,11 +50,11 @@
(i32.const 1)
)
)
(br $continue$2.1)
(br $continue|2.1)
)
)
)
(loop $continue$3.1
(loop $continue|3.1
(if
(i32.gt_s
(get_global $for/i)
@ -67,7 +67,7 @@
(i32.const 1)
)
)
(br $continue$3.1)
(br $continue|3.1)
)
)
)
@ -75,9 +75,9 @@
(get_global $for/i)
(unreachable)
)
(block $break$4.1
(loop $continue$4.1
(br_if $break$4.1
(block $break|4.1
(loop $continue|4.1
(br_if $break|4.1
(i32.eq
(get_global $for/i)
(i32.const 10)
@ -89,17 +89,17 @@
(i32.const 1)
)
)
(br $continue$4.1)
(br $continue|4.1)
)
)
(loop $continue$5.1
(loop $continue|5.1
(set_global $for/i
(i32.sub
(get_global $for/i)
(i32.const 1)
)
)
(br_if $continue$5.1
(br_if $continue|5.1
(get_global $for/i)
)
)