Revised implicit type conversions; Initial function expression compilation

This commit is contained in:
dcodeIO
2018-02-28 01:48:01 +01:00
parent bda6cb9792
commit d4c00eaba3
36 changed files with 940 additions and 1754 deletions

View File

@ -61,14 +61,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $4
(i32.gt_u
(get_local $2)
(get_local $3)
)
(tee_local $4
(i32.gt_u
(get_local $2)
(get_local $3)
)
(i32.const 0)
)
(i32.lt_s
(grow_memory
@ -476,10 +473,7 @@
(loop $continue|0
(if
(if (result i32)
(i32.ne
(get_local $2)
(i32.const 0)
)
(get_local $2)
(i32.and
(get_local $1)
(i32.const 3)
@ -2279,17 +2273,14 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $3
(i32.le_u
(i32.add
(get_local $1)
(get_local $2)
)
(get_local $0)
(tee_local $3
(i32.le_u
(i32.add
(get_local $1)
(get_local $2)
)
(get_local $0)
)
(i32.const 0)
)
(get_local $3)
(i32.le_u
@ -2607,10 +2598,7 @@
(loop $continue|0
(if
(if (result i32)
(i32.ne
(get_local $2)
(i32.const 0)
)
(get_local $2)
(i32.eq
(i32.load8_u
(get_local $0)

View File

@ -62,14 +62,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $4
(i32.gt_u
(get_local $2)
(get_local $3)
)
(tee_local $4
(i32.gt_u
(get_local $2)
(get_local $3)
)
(i32.const 0)
)
(i32.lt_s
(grow_memory
@ -135,10 +132,7 @@
(loop $continue|0
(if
(if (result i32)
(i32.ne
(get_local $2)
(i32.const 0)
)
(get_local $2)
(i32.and
(get_local $1)
(i32.const 3)
@ -1938,17 +1932,14 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $3
(i32.le_u
(i32.add
(get_local $1)
(get_local $2)
)
(get_local $0)
(tee_local $3
(i32.le_u
(i32.add
(get_local $1)
(get_local $2)
)
(get_local $0)
)
(i32.const 0)
)
(get_local $3)
(i32.le_u

View File

@ -53,14 +53,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $4
(i32.gt_u
(get_local $2)
(get_local $3)
)
(tee_local $4
(i32.gt_u
(get_local $2)
(get_local $3)
)
(i32.const 0)
)
(i32.lt_s
(grow_memory

View File

@ -16,29 +16,23 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 2)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 2)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -62,14 +56,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 2)
)
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 2)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -137,44 +128,35 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 2)
)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 1)
)
(i32.const 1)
)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 2)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 4)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 4)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -311,29 +293,23 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 2)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 2)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -357,14 +333,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 2)
)
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 2)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -456,44 +429,35 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 2)
)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 2)
(i32.const 1)
)
(i32.const 1)
)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 2)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 4)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 2)
(i32.const 4)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -636,29 +600,23 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -682,14 +640,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -737,44 +692,35 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
(i32.const 1)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 4)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 4)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -905,29 +851,23 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -951,14 +891,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1008,44 +945,35 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
(i32.const 1)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 4)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 4)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1176,29 +1104,23 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 2)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 2)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1222,14 +1144,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 2)
)
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 2)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1277,44 +1196,35 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 2)
)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 1)
)
(i32.const 1)
)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 2)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 4)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 4)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1445,29 +1355,23 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 2)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 2)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1491,14 +1395,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 2)
)
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 2)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1546,44 +1447,35 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 2)
)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 8)
(i32.const 1)
)
(i32.const 1)
)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 2)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 4)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 8)
(i32.const 4)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1714,29 +1606,23 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1760,14 +1646,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1815,44 +1698,35 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
(i32.const 1)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 4)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 4)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -1983,29 +1857,23 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -2029,14 +1897,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 2)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
@ -2084,44 +1949,35 @@
(i32.eqz
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.and
(if (result i32)
(i32.ne
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.and
(if (result i32)
(tee_local $1
(i32.eq
(i32.const 4)
(i32.const 1)
)
(i32.const 1)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 2)
)
)
(i32.const 0)
)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 4)
(i32.const 1)
)
)
(i32.const 1)
(get_local $1)
(i32.eq
(i32.const 4)
(i32.const 4)
)
)
(i32.const 1)
)
(i32.const 0)
)
(get_local $1)
(i32.eq

View File

@ -2193,9 +2193,7 @@
(get_local $2)
(i32.const 1)
)
(i32.load offset=8
(get_local $0)
)
(get_local $3)
)
(call "$(lib)/memory/move_memory"
(i32.add
@ -2221,9 +2219,7 @@
)
(i32.sub
(i32.sub
(i32.load offset=8
(get_local $0)
)
(get_local $3)
(get_local $2)
)
(i32.const 1)

View File

@ -59,14 +59,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $4
(i32.gt_u
(get_local $2)
(get_local $3)
)
(tee_local $4
(i32.gt_u
(get_local $2)
(get_local $3)
)
(i32.const 0)
)
(i32.lt_s
(grow_memory
@ -132,10 +129,7 @@
(loop $continue|0
(if
(if (result i32)
(i32.ne
(get_local $2)
(i32.const 0)
)
(get_local $2)
(i32.and
(get_local $1)
(i32.const 3)
@ -1935,17 +1929,14 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $3
(i32.le_u
(i32.add
(get_local $1)
(get_local $2)
)
(get_local $0)
(tee_local $3
(i32.le_u
(i32.add
(get_local $1)
(get_local $2)
)
(get_local $0)
)
(i32.const 0)
)
(get_local $3)
(i32.le_u
@ -2506,9 +2497,7 @@
(get_local $2)
(i32.const 1)
)
(i32.load offset=8
(get_local $0)
)
(get_local $3)
)
(call "$(lib)/memory/move_memory"
(i32.add
@ -2534,9 +2523,7 @@
)
(i32.sub
(i32.sub
(i32.load offset=8
(get_local $0)
)
(get_local $3)
(get_local $2)
)
(i32.const 1)

View File

@ -114,10 +114,7 @@
(loop $continue|0
(if
(if (result i32)
(i32.ne
(get_local $2)
(i32.const 0)
)
(get_local $2)
(i32.eq
(i32.load8_u
(get_local $0)
@ -635,14 +632,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $6
(i32.eq
(get_local $4)
(i32.const 48)
)
(tee_local $6
(i32.eq
(get_local $4)
(i32.const 48)
)
(i32.const 0)
)
(i32.gt_s
(get_local $2)
@ -771,14 +765,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $6
(i32.lt_s
(get_local $1)
(i32.const 2)
)
(tee_local $6
(i32.lt_s
(get_local $1)
(i32.const 2)
)
(i32.const 0)
)
(get_local $6)
(i32.gt_s
@ -821,14 +812,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $6
(i32.ge_s
(get_local $4)
(i32.const 48)
)
(tee_local $6
(i32.ge_s
(get_local $4)
(i32.const 48)
)
(i32.const 0)
)
(i32.le_s
(get_local $4)
@ -847,14 +835,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $6
(i32.ge_s
(get_local $4)
(i32.const 65)
)
(tee_local $6
(i32.ge_s
(get_local $4)
(i32.const 65)
)
(i32.const 0)
)
(i32.le_s
(get_local $4)
@ -876,14 +861,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $6
(i32.ge_s
(get_local $4)
(i32.const 97)
)
(tee_local $6
(i32.ge_s
(get_local $4)
(i32.const 97)
)
(i32.const 0)
)
(i32.le_s
(get_local $4)
@ -1119,14 +1101,11 @@
(if
(i32.and
(if (result i32)
(i32.ne
(tee_local $6
(i32.eq
(get_local $3)
(i32.const 69)
)
(tee_local $6
(i32.eq
(get_local $3)
(i32.const 69)
)
(i32.const 0)
)
(get_local $6)
(i32.eq