Set up documentation generation

This commit is contained in:
dcodeIO
2018-03-19 01:12:18 +01:00
parent c0973433d6
commit 0fef69e445
47 changed files with 523 additions and 119 deletions

5
std/assembly.d.ts vendored
View File

@ -1,6 +1,7 @@
/**
* @file Environment definitions for compiling AssemblyScript to WebAssembly using asc.
*/
* Environment definitions for compiling AssemblyScript to WebAssembly using asc.
* @module std/assembly
*//***/
// Types

View File

@ -1,9 +1,11 @@
/**
* @file Arena Memory Allocator
* Arena Memory Allocator
*
* Provides a `reset_memory` function to reset the heap to its initial state. A user has to make
* sure that there are no more references to cleared memory afterwards. Always aligns to 8 bytes.
*/
*
* @module std/assembly/allocator/arena
*//***/
import { MASK as AL_MASK } from "./common/alignment";

View File

@ -1,6 +1,7 @@
/**
* @file Buddy Memory Allocator
*/
* Buddy Memory Allocator.
* @module stdd/assembly/allocator/buddy
*//***/
/*
Copyright 2018 Evan Wallace

View File

@ -1,3 +1,8 @@
/**
* Shared alignment constants.
* @module std/assembly/allocator/common/alignment
*//***/
/** Number of alignment bits. */
export const BITS: u32 = 3;

View File

@ -1,10 +1,12 @@
/**
* @file Emscripten Memory Allocator
* Emscripten Memory Allocator.
*
* Uses Emscripten's exported _malloc and _free implementations, i.e., when linking with
* Emscripten-compiled programs that already provide these. Differs from 'system' in that their
* names are prefixed with an underscore.
*/
*
* @module std/assembly/allocator/emscripten
*//***/
declare function _malloc(size: usize): usize;
declare function _free(ptr: usize): void;

View File

@ -1,9 +1,11 @@
/**
* @file System Memory Allocator
* System Memory Allocator.
*
* Uses the environment's malloc and free implementations, i.e., when linking with other C-like
* programs that already provide these.
*/
*
* @module std/assembly/allocator/system
*//***/
declare function malloc(size: usize): usize;
declare function free(ptr: usize): void;

View File

@ -1,9 +1,11 @@
/**
* @file Two-Level Segregate Fit Memory Allocator
* Two-Level Segregate Fit Memory Allocator.
*
* A general purpose dynamic memory allocator specifically designed to meet real-time requirements.
* Always aligns to 8 bytes.
*/
*
* @module std/assembly/allocator/tlsf
*//***/
// ╒══════════════ Block size interpretation (32-bit) ═════════════╕
// 3 2 1

8
std/portable.d.ts vendored
View File

@ -1,5 +1,5 @@
/**
* @file Environment definitions for compiling AssemblyScript to JavaScript using tsc.
* 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
@ -7,8 +7,10 @@
*
* 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}.
*/
* {@link glue/js/i64} respectively {@link glue/wasm/i64}.
*
* @module std/portable
*//***/
// Portable types

View File

@ -1,6 +1,4 @@
/**
* @file Environment implementation for compiling AssemblyScript to JavaScript using tsc.
*/
/** @module std/portable *//***/
var globalScope = typeof window !== "undefined" && window || typeof global !== "undefined" && global || self;
@ -168,3 +166,5 @@ globalScope["isString"] = function isString(arg) {
};
globalScope["isArray"] = Array.isArray;
require("./portable/memory");

View File

@ -14,7 +14,6 @@
},
"files": [
"./portable.d.ts",
"./portable.js",
"./portable/memory.js"
"./portable.js"
]
}