changetype builtin; some namespace parsing; more stdlib ideas; compiler options for asc

This commit is contained in:
dcodeIO
2017-12-08 04:03:44 +01:00
parent 59dafc8d22
commit bbb57baecb
62 changed files with 636 additions and 469 deletions

20
std/heap.ts Normal file
View File

@ -0,0 +1,20 @@
/// <reference path="../assembly.d.ts" />
/** A static class representing the heap. */
declare class Heap {
/** Allocates a chunk of memory and returns a pointer to it. */
static allocate(size: usize): usize;
/** Disposes a chunk of memory by its pointer. */
static dispose(ptr: usize): void;
/** Gets the amount of used heap space, in bytes. */
static get used(): usize;
/** Gets the amount of free heap space, in bytes. */
static get free(): usize;
/** Gets the size of the heap, in bytes. */
static get size(): usize;
}