sizeof, load and store builtins

This commit is contained in:
dcodeIO
2017-12-04 02:00:48 +01:00
parent 017efc71b6
commit 63a67e7c67
17 changed files with 214 additions and 44 deletions

6
src/glue/js.d.ts vendored
View File

@ -11,6 +11,6 @@ declare type f32 = number;
declare type f64 = number;
declare type bool = boolean;
// Raw memory access (here: Binaryen memory, T=u8)
declare function store<T>(ptr: usize, val: u8): void;
declare function load<T>(ptr: usize): u8;
// Raw memory access (here: Binaryen memory)
declare function store<T = u8>(ptr: usize, val: T): void;
declare function load<T = u8>(ptr: usize): T;