mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-20 10:16:37 +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,12 +1,10 @@
|
||||
export namespace memory {
|
||||
|
||||
export function size(): i32 {
|
||||
return __memory_size(); // tslint:disable-line
|
||||
}
|
||||
@builtin
|
||||
export declare function size(): i32;
|
||||
|
||||
export function grow(pages: i32): i32 {
|
||||
return __memory_grow(pages); // tslint:disable-line
|
||||
}
|
||||
@builtin
|
||||
export declare function grow(pages: i32): i32;
|
||||
|
||||
export function fill(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset
|
||||
if (isDefined(__memory_fill)) { __memory_fill(dest, c, n); return; } // tslint:disable-line
|
||||
|
Reference in New Issue
Block a user