forked from AssemblyScript/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
37 lines (30 loc) · 1.23 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Memory manager
declare function __alloc(size: usize): usize;
declare function __realloc(ptr: usize, size: usize): usize;
declare function __free(ptr: usize): void;
declare function __reset(): void;
// Garbage collector
declare function __new(size: usize, id: u32): usize;
declare function __renew(ptr: usize, size: usize): usize;
declare function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void;
declare function __collect(): void;
// Runtime type info
declare function __typeinfo(id: u32): u32;
// Visitors
declare function __visit(ptr: usize, cookie: i32): void;
declare function __visit_globals(cookie: u32): void;
declare function __visit_members(ptr: usize, cookie: u32): void;
// Allocation helpers
declare function __newBuffer(size: usize, id: u32, data?: usize): usize;
declare function __newArray(length: i32, alignLog2: usize, id: u32, data?: usize): usize;
// Finalization
declare function __finalize(ptr: usize): void;
// Debugging
declare const ASC_RTRACE: bool;
declare const ASC_PROFILE: bool;
// Incremental GC constants
declare const ASC_GC_GRANULARITY: i32;
declare const ASC_GC_SWEEPFACTOR: i32;
declare const ASC_GC_IDLEFACTOR: i32;
declare const ASC_GC_MARKCOST: i32;
declare const ASC_GC_SWEEPCOST: i32;