mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 14:31:28 +00:00
Set up documentation generation
This commit is contained in:
5
std/assembly.d.ts
vendored
5
std/assembly.d.ts
vendored
@ -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
|
||||
|
||||
|
@ -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";
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/**
|
||||
* @file Buddy Memory Allocator
|
||||
*/
|
||||
* Buddy Memory Allocator.
|
||||
* @module stdd/assembly/allocator/buddy
|
||||
*//***/
|
||||
|
||||
/*
|
||||
Copyright 2018 Evan Wallace
|
||||
|
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* Shared alignment constants.
|
||||
* @module std/assembly/allocator/common/alignment
|
||||
*//***/
|
||||
|
||||
/** Number of alignment bits. */
|
||||
export const BITS: u32 = 3;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
8
std/portable.d.ts
vendored
@ -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
|
||||
|
||||
|
@ -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");
|
||||
|
@ -14,7 +14,6 @@
|
||||
},
|
||||
"files": [
|
||||
"./portable.d.ts",
|
||||
"./portable.js",
|
||||
"./portable/memory.js"
|
||||
"./portable.js"
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user