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

@ -152,7 +152,7 @@
(i64.const 12)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i64.eqz
@ -175,7 +175,7 @@
(i64.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(i64.shl
@ -208,7 +208,7 @@
(i64.const 12)
)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.eqz
(i64.eqz
@ -231,7 +231,7 @@
(i64.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(i64.shl
@ -247,7 +247,7 @@
)
)
(block $break|2
(loop $loop|2
(loop $repeat|2
(br_if $break|2
(i32.le_s
(get_local $3)
@ -289,7 +289,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(if
@ -316,7 +316,7 @@
)
)
(block $break|3
(loop $loop|3
(loop $repeat|3
(br_if $break|3
(i32.eqz
(i64.eqz
@ -339,7 +339,7 @@
(i64.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(return
@ -581,7 +581,7 @@
(i32.const 9)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.shr_u
(get_local $3)
@ -600,7 +600,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(i32.shl
@ -631,7 +631,7 @@
(i32.const 9)
)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.shr_u
(get_local $3)
@ -650,7 +650,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(i32.shl
@ -664,7 +664,7 @@
)
)
(block $break|2
(loop $loop|2
(loop $repeat|2
(br_if $break|2
(i32.le_s
(get_local $4)
@ -706,7 +706,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(if
@ -733,7 +733,7 @@
)
)
(block $break|3
(loop $loop|3
(loop $repeat|3
(br_if $break|3
(i32.shr_u
(get_local $2)
@ -752,7 +752,7 @@
(i32.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(return