mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-24 20:21:48 +00:00
Implement function types / indirect calls / trampolines (#39)
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $iiiv (func (param i32 i32 i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global "$(lib)/allocator/arena/OFFSET" (mut i32) (i32.const 0))
|
||||
(global "$(lib)/allocator/arena/offset" (mut i32) (i32.const 0))
|
||||
(global $std/set/set (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 56))
|
||||
(memory $0 1)
|
||||
@ -34,7 +34,7 @@
|
||||
(i32.add
|
||||
(i32.add
|
||||
(tee_local $1
|
||||
(get_global "$(lib)/allocator/arena/OFFSET")
|
||||
(get_global "$(lib)/allocator/arena/offset")
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
@ -91,7 +91,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_global "$(lib)/allocator/arena/OFFSET"
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $1)
|
||||
@ -2273,7 +2273,7 @@
|
||||
)
|
||||
)
|
||||
(func $start (; 10 ;) (type $v)
|
||||
(set_global "$(lib)/allocator/arena/OFFSET"
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
(i32.and
|
||||
(i32.add
|
||||
(get_global $HEAP_BASE)
|
||||
|
Reference in New Issue
Block a user