mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-22 03:01:55 +00:00
Rework resolver (#489)
* Rework IR and resolver to use nested lookup tables * Integrate types into IR * Make components prefer IR, slimmed down AST * Implement `export *` * Add `@lazy` annotation and remove `--noTreeShaking` * Add `@start` annotation and remove magic `main` * Related refactoring, cleanup and docs
This commit is contained in:
20
std/assembly/index.d.ts
vendored
20
std/assembly/index.d.ts
vendored
@ -38,8 +38,6 @@ declare type f64 = number;
|
||||
|
||||
/** Compiler target. 0 = JS, 1 = WASM32, 2 = WASM64. */
|
||||
declare const ASC_TARGET: i32;
|
||||
/** Provided noTreeshaking option. */
|
||||
declare const ASC_NO_TREESHAKING: bool;
|
||||
/** Provided noAssert option. */
|
||||
declare const ASC_NO_ASSERT: bool;
|
||||
/** Provided memoryBase option. */
|
||||
@ -354,7 +352,7 @@ declare namespace f64 {
|
||||
export function store(offset: usize, value: f64, constantOffset?: usize): void;
|
||||
}
|
||||
/** Macro type evaluating to the underlying native WebAssembly type. */
|
||||
declare type NATIVE<T> = T;
|
||||
declare type native<T> = T;
|
||||
|
||||
/** Pseudo-class representing the backing class of integer types. */
|
||||
declare class _Integer {
|
||||
@ -966,7 +964,7 @@ declare function unmanaged(constructor: Function): void;
|
||||
/** Annotates a class as being sealed / non-derivable. */
|
||||
declare function sealed(constructor: Function): void;
|
||||
|
||||
/** Annotates a method or function as always inlined. */
|
||||
/** Annotates a method, function or constant global as always inlined. */
|
||||
declare function inline(
|
||||
target: any,
|
||||
propertyKey: string,
|
||||
@ -979,3 +977,17 @@ declare function external(namespace: string, name: string): (
|
||||
propertyKey: string,
|
||||
descriptor: TypedPropertyDescriptor<any>
|
||||
) => TypedPropertyDescriptor<any> | void;
|
||||
|
||||
/** Annotates a global for lazy compilation. */
|
||||
declare function lazy(
|
||||
target: any,
|
||||
propertyKey: string,
|
||||
descriptor: TypedPropertyDescriptor<any>
|
||||
): TypedPropertyDescriptor<any> | void;
|
||||
|
||||
/** Annotates a function as the explicit start function. */
|
||||
declare function start(
|
||||
target: any,
|
||||
propertyKey: string,
|
||||
descriptor: TypedPropertyDescriptor<any>
|
||||
): TypedPropertyDescriptor<any> | void;
|
||||
|
Reference in New Issue
Block a user