inline single-use implementations

This commit is contained in:
dcode
2019-03-14 12:52:46 +01:00
parent 3a60638f72
commit d3ca06b7ce
7 changed files with 1195 additions and 1199 deletions

View File

@ -7,13 +7,13 @@ declare function malloc(size: usize): usize;
declare function free(ptr: usize): void;
// @ts-ignore: decorator
@unsafe @global
@unsafe @global @inline
function __memory_allocate(size: usize): usize {
return malloc(size);
}
// @ts-ignore: decorator
@unsafe @global
@unsafe @global @inline
function __memory_free(ptr: usize): void {
free(ptr);
}