mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-14 15:31:31 +00:00
More stdlib setup
This commit is contained in:
@ -1,11 +0,0 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(block $__inlined_func$Array.test
|
||||
(nop)
|
||||
)
|
||||
)
|
||||
)
|
@ -1,12 +1,4 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $Array.test (; 0 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(call $Array.test)
|
||||
)
|
||||
)
|
||||
|
@ -1,2 +1 @@
|
||||
// Array.fromPtr<i32>(1);
|
||||
Array.test();
|
||||
|
@ -1,14 +1,7 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $Array.test (; 0 ;) (type $v)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(call $Array.test)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
@ -55,21 +48,30 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
HEAP_BASE
|
||||
Array
|
||||
Array.fromPtr
|
||||
Array.test
|
||||
Error
|
||||
RangeError
|
||||
heap/ALIGN_LOG2
|
||||
heap/ALIGN_SIZE
|
||||
heap/ALIGN_MASK
|
||||
heap/HEAP_OFFSET
|
||||
Heap
|
||||
Heap.allocate
|
||||
Heap.dispose
|
||||
Heap.get_used
|
||||
Heap.get_free
|
||||
Heap.get_size
|
||||
Heap.allocate
|
||||
Heap.dispose
|
||||
Heap.copy
|
||||
Map
|
||||
Set
|
||||
String
|
||||
[program.exports]
|
||||
|
||||
Array
|
||||
Error
|
||||
RangeError
|
||||
Heap
|
||||
Map
|
||||
Set
|
||||
String
|
||||
;)
|
||||
|
@ -4,7 +4,7 @@
|
||||
(type $v (func))
|
||||
(global $heap/HEAP_OFFSET (mut i32) (i32.const 0))
|
||||
(global $std/heap/ptr (mut i32) (i32.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
@ -100,7 +100,7 @@
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(get_global $HEAP_START)
|
||||
(get_global $HEAP_BASE)
|
||||
)
|
||||
(set_global $std/heap/ptr
|
||||
(call $Heap.allocate
|
||||
|
@ -4,7 +4,7 @@
|
||||
(type $v (func))
|
||||
(global $heap/HEAP_OFFSET (mut i32) (i32.const 0))
|
||||
(global $std/heap/ptr (mut i32) (i32.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
@ -102,7 +102,7 @@
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(get_global $HEAP_START)
|
||||
(get_global $HEAP_BASE)
|
||||
)
|
||||
(set_global $std/heap/ptr
|
||||
(call $Heap.allocate
|
||||
|
@ -8,7 +8,7 @@
|
||||
(global $heap/ALIGN_SIZE i32 (i32.const 8))
|
||||
(global $heap/ALIGN_MASK i32 (i32.const 7))
|
||||
(global $std/heap/ptr (mut i32) (i32.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
@ -113,7 +113,7 @@
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(get_global $HEAP_START)
|
||||
(get_global $HEAP_BASE)
|
||||
)
|
||||
(set_global $std/heap/ptr
|
||||
(call $Heap.allocate
|
||||
@ -170,22 +170,31 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
HEAP_BASE
|
||||
Array
|
||||
Array.fromPtr
|
||||
Array.test
|
||||
Error
|
||||
RangeError
|
||||
heap/ALIGN_LOG2
|
||||
heap/ALIGN_SIZE
|
||||
heap/ALIGN_MASK
|
||||
heap/HEAP_OFFSET
|
||||
Heap
|
||||
Heap.allocate
|
||||
Heap.dispose
|
||||
Heap.get_used
|
||||
Heap.get_free
|
||||
Heap.get_size
|
||||
Heap.allocate
|
||||
Heap.dispose
|
||||
Heap.copy
|
||||
Map
|
||||
Set
|
||||
String
|
||||
std/heap/ptr
|
||||
[program.exports]
|
||||
|
||||
Array
|
||||
Error
|
||||
RangeError
|
||||
Heap
|
||||
Map
|
||||
Set
|
||||
String
|
||||
;)
|
||||
|
Reference in New Issue
Block a user