mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 01:11:32 +00:00
Reintroduce builtin decorator so these can appear anywhere in stdlib again
Avoids wrapping an undocumented function within 'memory.size' for example.
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $i (func (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||
@ -161,15 +160,7 @@
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32)
|
||||
(current_memory)
|
||||
)
|
||||
(func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(grow_memory
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -201,14 +192,14 @@
|
||||
)
|
||||
(i32.shl
|
||||
(tee_local $2
|
||||
(call $~lib/memory/memory.size)
|
||||
(current_memory)
|
||||
)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(call $~lib/memory/memory.grow
|
||||
(grow_memory
|
||||
(select
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
@ -236,7 +227,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(call $~lib/memory/memory.grow
|
||||
(grow_memory
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.const 0)
|
||||
@ -255,12 +246,12 @@
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(call $~lib/allocator/arena/__memory_allocate
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String#toUTF8 (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $~lib/string/String#toUTF8 (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -546,15 +537,15 @@
|
||||
)
|
||||
(get_local $5)
|
||||
)
|
||||
(func $~lib/allocator/arena/__memory_free (; 7 ;) (type $iv) (param $0 i32)
|
||||
(func $~lib/allocator/arena/__memory_free (; 5 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $~lib/memory/memory.free (; 8 ;) (type $iv) (param $0 i32)
|
||||
(func $~lib/memory/memory.free (; 6 ;) (type $iv) (param $0 i32)
|
||||
(call $~lib/allocator/arena/__memory_free
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $start (; 9 ;) (type $v)
|
||||
(func $start (; 7 ;) (type $v)
|
||||
(set_global $~lib/allocator/arena/startOffset
|
||||
(i32.const 64)
|
||||
)
|
||||
|
Reference in New Issue
Block a user