mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-23 19:51:47 +00:00
Builtins rewrite with type parameter inference; Small integer math optimizations; Switchify
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user