Fix 'static readonly' not being recognized as constant anymore, see #44

This commit is contained in:
dcodeIO
2018-03-19 19:36:39 +01:00
parent 5323e64af9
commit fea8e65a41
22 changed files with 2391 additions and 2368 deletions

View File

@ -9,7 +9,8 @@
import { MASK as AL_MASK } from "./common/alignment";
var offset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK;
var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK;
var offset: usize = startOffset;
@global
export function allocate_memory(size: usize): usize {
@ -37,5 +38,5 @@ export function free_memory(ptr: usize): void {
@global
export function reset_memory(): void {
offset = (HEAP_BASE + AL_MASK) & ~AL_MASK;
offset = startOffset;
}