mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-25 20:51:44 +00:00
Stdlib preparations
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -56,6 +58,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -818,6 +818,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -859,6 +861,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
binary/b
|
||||
binary/i
|
||||
binary/I
|
||||
|
@ -1035,6 +1035,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -1076,6 +1078,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
builtins/b
|
||||
builtins/i
|
||||
builtins/I
|
||||
|
@ -43,6 +43,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -84,6 +86,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
class/Animal
|
||||
class/Animal.MAX
|
||||
class/Animal.add
|
||||
|
@ -8,6 +8,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -49,6 +51,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
declare/external
|
||||
[program.exports]
|
||||
declare/external
|
||||
|
@ -53,6 +53,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -94,6 +96,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
do/loopDo
|
||||
do/loopDoInDo
|
||||
[program.exports]
|
||||
|
@ -38,6 +38,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -79,6 +81,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
enum/Implicit
|
||||
enum/Explicit
|
||||
enum/Mixed
|
||||
|
@ -32,6 +32,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -73,6 +75,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
export/add
|
||||
export/sub
|
||||
export/a
|
||||
|
@ -149,6 +149,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -190,6 +192,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
for/i
|
||||
[program.exports]
|
||||
|
||||
|
@ -310,6 +310,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -351,6 +353,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
../../examples/game-of-life/assembly/game-of-life/w
|
||||
../../examples/game-of-life/assembly/game-of-life/h
|
||||
../../examples/game-of-life/assembly/game-of-life/s
|
||||
|
@ -1191,6 +1191,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -1232,6 +1234,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
../../examples/i64-polyfill/assembly/i64/lo
|
||||
../../examples/i64-polyfill/assembly/i64/hi
|
||||
../../examples/i64-polyfill/assembly/i64/getLo
|
||||
|
@ -48,6 +48,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -89,6 +91,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
if/ifThenElse
|
||||
if/ifThen
|
||||
if/ifThenElseBlock
|
||||
|
@ -43,6 +43,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -84,6 +86,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
export/add
|
||||
export/sub
|
||||
export/a
|
||||
|
@ -109,6 +109,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -150,6 +152,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -141,6 +141,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -182,6 +184,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -257,6 +257,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -298,6 +300,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
logical/i
|
||||
logical/I
|
||||
logical/f
|
||||
|
@ -2055,6 +2055,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -2096,6 +2098,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
memcpy/memcpy
|
||||
memcpy/base
|
||||
memcpy/dest
|
||||
|
@ -19,6 +19,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -60,6 +62,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
namespace/Outer
|
||||
namespace/Outer.Inner
|
||||
namespace/Outer.Inner.aVar
|
||||
|
@ -331,6 +331,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -372,6 +374,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
portable-conversions/i
|
||||
portable-conversions/I
|
||||
portable-conversions/f
|
||||
|
@ -48,6 +48,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -89,6 +91,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
export/add
|
||||
export/sub
|
||||
export/a
|
||||
|
11
tests/compiler/std/array.optimized-inlined.wast
Normal file
11
tests/compiler/std/array.optimized-inlined.wast
Normal file
@ -0,0 +1,11 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(block $__inlined_func$Array.test
|
||||
(nop)
|
||||
)
|
||||
)
|
||||
)
|
12
tests/compiler/std/array.optimized.wast
Normal file
12
tests/compiler/std/array.optimized.wast
Normal file
@ -0,0 +1,12 @@
|
||||
(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)
|
||||
)
|
||||
)
|
2
tests/compiler/std/array.ts
Normal file
2
tests/compiler/std/array.ts
Normal file
@ -0,0 +1,2 @@
|
||||
// Array.fromPtr<i32>(1);
|
||||
Array.test();
|
75
tests/compiler/std/array.wast
Normal file
75
tests/compiler/std/array.wast
Normal file
@ -0,0 +1,75 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(global $HEAP_START 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]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
ctz
|
||||
popcnt
|
||||
rotl
|
||||
rotr
|
||||
abs
|
||||
max
|
||||
min
|
||||
ceil
|
||||
floor
|
||||
copysign
|
||||
nearest
|
||||
reinterpret
|
||||
sqrt
|
||||
trunc
|
||||
load
|
||||
store
|
||||
sizeof
|
||||
select
|
||||
unreachable
|
||||
current_memory
|
||||
grow_memory
|
||||
parseInt
|
||||
parseFloat
|
||||
changetype
|
||||
assert
|
||||
i8
|
||||
i16
|
||||
i32
|
||||
i64
|
||||
u8
|
||||
u16
|
||||
u32
|
||||
u64
|
||||
bool
|
||||
f32
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
Array
|
||||
Array.fromPtr
|
||||
Array.test
|
||||
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.copy
|
||||
[program.exports]
|
||||
|
||||
;)
|
119
tests/compiler/std/heap.optimized-inlined.wast
Normal file
119
tests/compiler/std/heap.optimized-inlined.wast
Normal file
@ -0,0 +1,119 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(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))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $Heap.allocate (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(current_memory)
|
||||
)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(i32.add
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(grow_memory
|
||||
(select
|
||||
(tee_local $2
|
||||
(i32.trunc_s/f64
|
||||
(f64.ceil
|
||||
(f64.div
|
||||
(f64.convert_u/i32
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 65536)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(tee_local $1
|
||||
(i32.sub
|
||||
(i32.mul
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
)
|
||||
(if
|
||||
(block (result i32)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(i32.add
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.and
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(i32.const 7)
|
||||
)
|
||||
)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(i32.add
|
||||
(i32.or
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(i32.const 7)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(get_global $HEAP_START)
|
||||
)
|
||||
(set_global $std/heap/ptr
|
||||
(call $Heap.allocate
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(block $__inlined_func$Heap.dispose
|
||||
(set_local $0
|
||||
(get_global $std/heap/ptr)
|
||||
)
|
||||
(nop)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
116
tests/compiler/std/heap.optimized.wast
Normal file
116
tests/compiler/std/heap.optimized.wast
Normal file
@ -0,0 +1,116 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(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))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $Heap.allocate (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(current_memory)
|
||||
)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(i32.add
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(grow_memory
|
||||
(select
|
||||
(tee_local $2
|
||||
(i32.trunc_s/f64
|
||||
(f64.ceil
|
||||
(f64.div
|
||||
(f64.convert_u/i32
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 65536)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(tee_local $1
|
||||
(i32.sub
|
||||
(i32.mul
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
)
|
||||
(if
|
||||
(block (result i32)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(i32.add
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.and
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(i32.const 7)
|
||||
)
|
||||
)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(i32.add
|
||||
(i32.or
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(i32.const 7)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func $Heap.dispose (; 1 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(get_global $HEAP_START)
|
||||
)
|
||||
(set_global $std/heap/ptr
|
||||
(call $Heap.allocate
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
(call $Heap.dispose
|
||||
(get_global $std/heap/ptr)
|
||||
)
|
||||
)
|
||||
)
|
2
tests/compiler/std/heap.ts
Normal file
2
tests/compiler/std/heap.ts
Normal file
@ -0,0 +1,2 @@
|
||||
let ptr: usize = Heap.allocate(10);
|
||||
Heap.dispose(ptr);
|
191
tests/compiler/std/heap.wast
Normal file
191
tests/compiler/std/heap.wast
Normal file
@ -0,0 +1,191 @@
|
||||
(module
|
||||
(type $i (func (result i32)))
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(global $heap/HEAP_OFFSET (mut i32) (i32.const 0))
|
||||
(global $heap/ALIGN_LOG2 i32 (i32.const 3))
|
||||
(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))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $Heap.allocate (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $1
|
||||
(current_memory)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(i32.add
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(grow_memory
|
||||
(select
|
||||
(tee_local $2
|
||||
(i32.trunc_s/f64
|
||||
(f64.ceil
|
||||
(f64.div
|
||||
(f64.convert_u/i32
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 65536)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(tee_local $3
|
||||
(i32.sub
|
||||
(i32.mul
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(block (result i32)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(i32.add
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
)
|
||||
(i32.const 7)
|
||||
)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(i32.add
|
||||
(i32.or
|
||||
(get_global $heap/HEAP_OFFSET)
|
||||
(i32.const 7)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(func $Heap.dispose (; 1 ;) (type $iv) (param $0 i32)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(set_global $heap/HEAP_OFFSET
|
||||
(get_global $HEAP_START)
|
||||
)
|
||||
(set_global $std/heap/ptr
|
||||
(call $Heap.allocate
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
(call $Heap.dispose
|
||||
(get_global $std/heap/ptr)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
ctz
|
||||
popcnt
|
||||
rotl
|
||||
rotr
|
||||
abs
|
||||
max
|
||||
min
|
||||
ceil
|
||||
floor
|
||||
copysign
|
||||
nearest
|
||||
reinterpret
|
||||
sqrt
|
||||
trunc
|
||||
load
|
||||
store
|
||||
sizeof
|
||||
select
|
||||
unreachable
|
||||
current_memory
|
||||
grow_memory
|
||||
parseInt
|
||||
parseFloat
|
||||
changetype
|
||||
assert
|
||||
i8
|
||||
i16
|
||||
i32
|
||||
i64
|
||||
u8
|
||||
u16
|
||||
u32
|
||||
u64
|
||||
bool
|
||||
f32
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
Array
|
||||
Array.fromPtr
|
||||
Array.test
|
||||
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.copy
|
||||
std/heap/ptr
|
||||
[program.exports]
|
||||
|
||||
;)
|
@ -147,6 +147,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -188,6 +190,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
switch/doSwitch
|
||||
switch/doSwitchDefaultFirst
|
||||
switch/doSwitchDefaultOmitted
|
||||
|
@ -35,6 +35,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -76,6 +78,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
ternary/a
|
||||
[program.exports]
|
||||
|
||||
|
@ -330,6 +330,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -371,6 +373,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
tlsf/fls
|
||||
tlsf/ffs
|
||||
tlsf/ALIGN_SIZE_LOG2
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"extends": "../../std/assembly.json",
|
||||
"include": [
|
||||
"./*.ts"
|
||||
"./**/*.ts"
|
||||
]
|
||||
}
|
||||
|
@ -623,6 +623,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -664,6 +666,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
unary/i
|
||||
unary/I
|
||||
unary/f
|
||||
|
@ -62,6 +62,8 @@
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
NaN
|
||||
Infinity
|
||||
isNaN
|
||||
isFinite
|
||||
clz
|
||||
@ -103,6 +105,7 @@
|
||||
f64
|
||||
isize
|
||||
usize
|
||||
HEAP_START
|
||||
while/loopWhile
|
||||
while/loopWhileInWhile
|
||||
[program.exports]
|
||||
|
Reference in New Issue
Block a user