mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 22:41:27 +00:00
Rename lib prefix to '~lib' (parens aren't valid); Add built-in alignof<T>; Prepare for ArrayBufferView
This commit is contained in:
@ -2,14 +2,14 @@
|
||||
(type $ifi (func (param i32 f32) (result i32)))
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $v (func))
|
||||
(global "$(lib)/allocator/arena/startOffset" (mut i32) (i32.const 0))
|
||||
(global "$(lib)/allocator/arena/offset" (mut i32) (i32.const 0))
|
||||
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
|
||||
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
|
||||
(global $std/new/aClass (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func "$(lib)/allocator/arena/allocate_memory" (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $~lib/allocator/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -29,7 +29,7 @@
|
||||
(i32.add
|
||||
(i32.add
|
||||
(tee_local $1
|
||||
(get_global "$(lib)/allocator/arena/offset")
|
||||
(get_global $~lib/allocator/arena/offset)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
@ -86,7 +86,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
(set_global $~lib/allocator/arena/offset
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $1)
|
||||
@ -103,7 +103,7 @@
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $2
|
||||
(call "$(lib)/allocator/arena/allocate_memory"
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
@ -129,7 +129,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(set_global "$(lib)/allocator/arena/startOffset"
|
||||
(set_global $~lib/allocator/arena/startOffset
|
||||
(i32.and
|
||||
(i32.add
|
||||
(get_global $HEAP_BASE)
|
||||
@ -138,8 +138,8 @@
|
||||
(i32.const -8)
|
||||
)
|
||||
)
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
(get_global "$(lib)/allocator/arena/startOffset")
|
||||
(set_global $~lib/allocator/arena/offset
|
||||
(get_global $~lib/allocator/arena/startOffset)
|
||||
)
|
||||
(set_global $std/new/aClass
|
||||
(call $std/new/AClass#constructor
|
||||
|
Reference in New Issue
Block a user