Document the purpose of most files

This commit is contained in:
dcodeIO
2018-03-17 23:41:48 +01:00
parent d45eb93df6
commit 5eb10d404f
30 changed files with 197 additions and 87 deletions

4
std/assembly.d.ts vendored
View File

@ -1,4 +1,6 @@
// Definitions for the "AssemblyScript" subset.
/**
* @file Environment definitions for compiling AssemblyScript to WebAssembly using asc.
*/
// Types

19
std/portable.d.ts vendored
View File

@ -1,14 +1,17 @@
// Definitions for the "portable AssemblyScript" subset.
/**
* @file Environment definitions for compiling AssemblyScript to JavaScript using tsc.
*
* Note that semantic differences require additional explicit conversions for full compatibility.
* For example, when casting an i32 to an u8, doing `<u8>(someI32 & 0xff)` will yield the same
* result when compiling to WebAssembly or JS while `<u8>someI32` alone does nothing in JS.
*
* Note that i64's are not portable (JS numbers are IEEE754 doubles with a maximum safe integer
* value of 2^53-1) and instead require a compatibility layer to work in JS as well, as for example
* {@link ./glue/js/i64.d.ts} / {@link ./glue/js/i64.js}.
*/
// Portable types
// Note that semantic differences require additional explicit conversions for full compatibility.
// For example, when casting an i32 to an u8, doing `<u8>(someI32 & 0xff)` will yield the same
// result when compiling to WebAssembly or JS while `<u8>someI32` alone does nothing in JS.
// Note that i64's are not portable (JS numbers are IEEE754 doubles with a maximum safe integer value
// of 2^53-1) and instead require a compatibility layer to work in JS as well. See: src/util/i64.ts
declare type i8 = number;
declare type i16 = number;
declare type i32 = number;

View File

@ -1,3 +1,7 @@
/**
* @file Environment implementation for compiling AssemblyScript to JavaScript using tsc.
*/
var globalScope = typeof window !== "undefined" && window || typeof global !== "undefined" && global || self;
Object.defineProperties(