mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-04 00:51:51 +00:00
aliased makeCallInline, unmanaged rt alloc
This commit is contained in:
@ -354,6 +354,8 @@ export class Program extends DiagnosticEmitter {
|
||||
abortInstance: Function | null = null;
|
||||
/** Runtime allocation function. */
|
||||
allocateInstance: Function | null = null;
|
||||
/** Unmanaged allocation function. */
|
||||
allocateUnmanagedInstance: Function | null = null;
|
||||
/** Runtime reallocation function. */
|
||||
reallocateInstance: Function | null = null;
|
||||
/** Runtime discard function. */
|
||||
@ -804,6 +806,10 @@ export class Program extends DiagnosticEmitter {
|
||||
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
||||
this.allocateInstance = this.resolver.resolveFunction(<FunctionPrototype>element, null);
|
||||
}
|
||||
if (element = this.lookupGlobal(LibrarySymbols.ALLOCATE_UNMANAGED)) {
|
||||
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
||||
this.allocateUnmanagedInstance = this.resolver.resolveFunction(<FunctionPrototype>element, null);
|
||||
}
|
||||
if (element = this.lookupGlobal(LibrarySymbols.REALLOCATE)) {
|
||||
assert(element.kind == ElementKind.FUNCTION_PROTOTYPE);
|
||||
this.reallocateInstance = this.resolver.resolveFunction(<FunctionPrototype>element, null);
|
||||
|
Reference in New Issue
Block a user