mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 22:41:27 +00:00
Add a 'call_indirect' builtin to emit arbitrary calls (might trap at runtime); Optimize 'for' loop compilation a bit
This commit is contained in:
2
std/assembly.d.ts
vendored
2
std/assembly.d.ts
vendored
@ -267,6 +267,8 @@ declare function offsetof<T>(fieldName?: string): usize;
|
||||
declare function changetype<T>(value: any): T;
|
||||
/** Explicitly requests no bounds checks on the provided expression. Useful for array accesses. */
|
||||
declare function unchecked<T>(value: T): T;
|
||||
/** Creates a `call_indirect` instruction, calling the specified target by index with the specified arguments. */
|
||||
declare function call_indirect<T>(target: Function | u32, ...args: any[]): T;
|
||||
/** Tests if a 32-bit or 64-bit float is `NaN`. */
|
||||
declare function isNaN<T = f32 | f64>(value: T): bool;
|
||||
/** Tests if a 32-bit or 64-bit float is finite, that is not `NaN` or +/-`Infinity`. */
|
||||
|
@ -80,6 +80,8 @@ export declare function assert<T>(isTrueish: T, message?: string): T;
|
||||
|
||||
export declare function unchecked<T>(expr: T): T;
|
||||
|
||||
export declare function call_indirect<T>(target: void, ...args: void[]): T;
|
||||
|
||||
export declare function i8(value: void): i8;
|
||||
export namespace i8 {
|
||||
export const MIN_VALUE: i8 = -128;
|
||||
|
Reference in New Issue
Block a user