mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-06 01:52:04 +00:00
FixedArray experimentation
This commit is contained in:
@ -348,6 +348,8 @@ export class Program extends DiagnosticEmitter {
|
||||
arrayBufferInstance: Class | null = null;
|
||||
/** Array prototype reference. */
|
||||
arrayPrototype: ClassPrototype | null = null;
|
||||
/** Fixed array prototype reference. */
|
||||
fixedArrayPrototype: ClassPrototype | null = null;
|
||||
/** String instance reference. */
|
||||
stringInstance: Class | null = null;
|
||||
/** Abort function reference, if present. */
|
||||
@ -798,6 +800,10 @@ export class Program extends DiagnosticEmitter {
|
||||
assert(element.kind == ElementKind.CLASS_PROTOTYPE);
|
||||
this.arrayPrototype = <ClassPrototype>element;
|
||||
}
|
||||
if (element = this.lookupGlobal(LibrarySymbols.FixedArray)) {
|
||||
assert(element.kind == ElementKind.CLASS_PROTOTYPE);
|
||||
this.fixedArrayPrototype = <ClassPrototype>element;
|
||||
}
|
||||
if (element = this.lookupGlobal(LibrarySymbols.abort)) {
|
||||
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
||||
this.abortInstance = this.resolver.resolveFunction(<FunctionPrototype>element, null);
|
||||
|
Reference in New Issue
Block a user