Also lint stdlib

This commit is contained in:
dcodeIO
2018-02-25 23:21:32 +01:00
parent ae05006d21
commit 9ef8b162a9
30 changed files with 506 additions and 461 deletions

View File

@ -3,8 +3,7 @@ var globalScope = typeof window !== "undefined" && window || typeof global !== "
var HEAP = new Uint8Array(0);
var HEAP_OFFSET = 0;
globalScope["allocate_memory"] =
function allocate_memory(size) {
globalScope["allocate_memory"] = function allocate_memory(size) {
if (!(size >>>= 0))
return 0;
if (HEAP_OFFSET + size > HEAP.length) {
@ -18,25 +17,21 @@ function allocate_memory(size) {
return ptr;
};
globalScope["free_memory"] =
function free_memory(ptr) {
globalScope["free_memory"] = function free_memory(ptr) {
// TODO
};
globalScope["move_memory"] =
function move_memory(dest, src, n) {
globalScope["move_memory"] = function move_memory(dest, src, n) {
HEAP.copyWithin(dest, src, src + n);
};
globalScope["store"] =
function store(ptr, val, off) {
globalScope["store"] = function store(ptr, val, off) {
if (typeof off === "number")
ptr += off;
HEAP[ptr] = val;
};
globalScope["load"] =
function load(ptr) {
globalScope["load"] = function load(ptr) {
if (typeof off === "number")
ptr += off;
return HEAP[ptr];

View File

@ -1,9 +0,0 @@
{
"extends": "../portable.json",
"compilerOptions": {
"diagnostics": true
},
"include": [
"./**/*.ts"
]
}