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

@ -5,6 +5,7 @@
(export "memory" (memory $0))
(start $start)
(func $start (; 0 ;) (type $v)
(local $0 i32)
(if
(i32.eqz
(i32.const 1)
@ -13,13 +14,26 @@
)
(if
(i32.eqz
(i32.eq
(i32.const 1)
(i32.const 1)
)
(unreachable)
)
(if
(i32.eqz
(i32.gt_s
(i32.const 1)
(i32.const 0)
)
)
(unreachable)
)
(if
(f64.eq
(f64.const 0.5)
(f64.const 0)
)
(unreachable)
)
(if
(i32.eqz
(f64.gt
@ -29,6 +43,35 @@
)
(unreachable)
)
(if
(i64.eqz
(i64.const 4294967296)
)
(unreachable)
)
(if
(i32.eqz
(i64.gt_s
(i64.const 4294967296)
(i64.const 1)
)
)
(unreachable)
)
(if
(i32.eqz
(if (result i32)
(i32.eqz
(tee_local $0
(i32.const 1)
)
)
(unreachable)
(get_local $0)
)
)
(unreachable)
)
)
)
(;
@ -59,8 +102,6 @@
FUNCTION_PROTOTYPE: unreachable
FUNCTION_PROTOTYPE: current_memory
FUNCTION_PROTOTYPE: grow_memory
FUNCTION_PROTOTYPE: parseInt
FUNCTION_PROTOTYPE: parseFloat
FUNCTION_PROTOTYPE: changetype
FUNCTION_PROTOTYPE: assert
FUNCTION_PROTOTYPE: i8