unify mem/ref interface

This commit is contained in:
dcode
2019-03-27 17:21:52 +01:00
parent a3095478a3
commit e36722f2e6
66 changed files with 3501 additions and 3490 deletions

View File

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