mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-13 23:11:41 +00:00
Implicitly alias stdlib exports as program globals, see #8
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
@global
|
||||
export class Array<T> {
|
||||
|
||||
private ptr: usize;
|
||||
@ -39,7 +38,6 @@ export class Array<T> {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@global
|
||||
@struct
|
||||
export class CArray<T> {
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
@global
|
||||
export class Error {
|
||||
|
||||
name: string = "Error";
|
||||
@ -10,7 +9,6 @@ export class Error {
|
||||
}
|
||||
}
|
||||
|
||||
@global
|
||||
export class RangeError extends Error {
|
||||
name: string = "RangeError";
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ var HEAP_OFFSET: usize = HEAP_BASE; // HEAP_BASE is a constant generated by the
|
||||
|
||||
// TODO: maybe tlsf
|
||||
|
||||
@global
|
||||
export class Heap {
|
||||
|
||||
static get used(): usize { return HEAP_OFFSET - HEAP_BASE; }
|
||||
|
@ -1,4 +1,3 @@
|
||||
@global
|
||||
export class Map<K,V> {
|
||||
// TODO
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
@global
|
||||
class RegExp {
|
||||
export class RegExp {
|
||||
|
||||
// @binding(CALL_NEW, [ STRING, STRING], OBJECT_HANDLE)
|
||||
constructor(pattern: string, flags: string = "") { throw new Error("unreachable"); }
|
||||
|
@ -1,4 +1,3 @@
|
||||
@global
|
||||
export class Set<T> {
|
||||
// TODO
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
const EMPTY: String = changetype<String>("");
|
||||
|
||||
@global
|
||||
export class String {
|
||||
// [key: number]: string;
|
||||
|
||||
@ -197,13 +196,11 @@ function isWhiteSpaceOrLineTerminator(c: u16): bool {
|
||||
}
|
||||
}
|
||||
|
||||
// @global
|
||||
// @binding(CALL, [ STRING, PASS_THRU ], PASS_THRU)
|
||||
export function parseInt(str: string, radix: i32 = 10): f64 {
|
||||
throw new Error("not implemented");
|
||||
}
|
||||
|
||||
// @global
|
||||
// @binding(CALL, [ STRING ], PASS_THRU)
|
||||
export function parseFloat(str: string): f64 {
|
||||
throw new Error("not implemented");
|
||||
|
Reference in New Issue
Block a user