Add a 'call_indirect' builtin to emit arbitrary calls (might trap at runtime); Optimize 'for' loop compilation a bit

This commit is contained in:
dcodeIO
2018-05-25 15:59:17 +02:00
parent 51ede113dd
commit 7ad13f9d65
47 changed files with 3311 additions and 22111 deletions

View File

@@ -10,7 +10,7 @@
(func $start (; 1 ;) (type $v)
(local $0 i32)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $0)
@@ -23,14 +23,14 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(block $break|1
(set_local $0
(i32.const 0)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.ge_s
(get_local $0)
@@ -43,7 +43,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(call $scoped/fn