Builtins rewrite with type parameter inference; Small integer math optimizations; Switchify

This commit is contained in:
dcodeIO
2018-01-10 13:09:05 +01:00
parent 0de05b543b
commit fc777b3a89
64 changed files with 4894 additions and 1620 deletions

View File

@ -87,28 +87,39 @@
)
(block
(set_local $2
(i32.add
(i32.and
(i32.add
(i32.add
(i32.add
(i32.add
(i32.add
(i32.add
(i32.load8_u
(i32.add
(i32.mul
(get_local $3)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(tee_local $2
(select
(i32.sub
(get_local $1)
(i32.const 1)
)
(get_local $6)
(get_local $1)
(i32.add
(i32.load8_u
(i32.add
(i32.mul
(get_local $3)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(tee_local $2
(select
(i32.sub
(get_local $1)
(i32.const 1)
)
(get_local $6)
(get_local $1)
)
)
)
)
(i32.load8_u
(i32.add
(i32.mul
(get_local $3)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(get_local $1)
)
)
)
@ -118,29 +129,29 @@
(get_local $3)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(get_local $1)
(tee_local $7
(select
(i32.const 0)
(i32.add
(get_local $1)
(i32.const 1)
)
(i32.eq
(get_local $1)
(get_local $6)
)
)
)
)
)
)
(i32.load8_u
(i32.add
(i32.mul
(get_local $3)
(get_local $0)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(tee_local $7
(select
(i32.const 0)
(i32.add
(get_local $1)
(i32.const 1)
)
(i32.eq
(get_local $1)
(get_local $6)
)
)
)
(get_local $2)
)
)
)
@ -150,17 +161,17 @@
(get_local $0)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(get_local $2)
(get_local $7)
)
)
)
(i32.load8_u
(i32.add
(i32.mul
(get_local $0)
(get_local $4)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(get_local $7)
(get_local $2)
)
)
)
@ -170,7 +181,7 @@
(get_local $4)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(get_local $2)
(get_local $1)
)
)
)
@ -180,19 +191,11 @@
(get_local $4)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(get_local $1)
(get_local $7)
)
)
)
(i32.load8_u
(i32.add
(i32.mul
(get_local $4)
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
)
(get_local $7)
)
)
(i32.const 255)
)
)
(if