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

@ -15,32 +15,16 @@
(get_global $while/n)
(block
(block
(drop
(block (result i32)
(set_local $0
(get_global $while/n)
)
(set_global $while/n
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(set_global $while/n
(i32.sub
(get_global $while/n)
(i32.const 1)
)
)
(drop
(block (result i32)
(set_local $0
(get_global $while/m)
)
(set_global $while/m
(i32.add
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(set_global $while/m
(i32.add
(get_global $while/m)
(i32.const 1)
)
)
)
@ -79,32 +63,16 @@
(get_global $while/n)
(block
(block
(drop
(block (result i32)
(set_local $0
(get_global $while/n)
)
(set_global $while/n
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(set_global $while/n
(i32.sub
(get_global $while/n)
(i32.const 1)
)
)
(drop
(block (result i32)
(set_local $0
(get_global $while/m)
)
(set_global $while/m
(i32.add
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(set_global $while/m
(i32.add
(get_global $while/m)
(i32.const 1)
)
)
(block $break|2
@ -113,32 +81,16 @@
(get_global $while/n)
(block
(block
(drop
(block (result i32)
(set_local $0
(get_global $while/n)
)
(set_global $while/n
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(set_global $while/n
(i32.sub
(get_global $while/n)
(i32.const 1)
)
)
(drop
(block (result i32)
(set_local $0
(get_global $while/o)
)
(set_global $while/o
(i32.add
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(set_global $while/o
(i32.add
(get_global $while/o)
(i32.const 1)
)
)
)
@ -291,8 +243,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