mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 17:31:29 +00:00
Refactor resolve infrastructure to its own file
This has become a little clumsy over time. Doesn't hurt to have it in its own place to get a grasp of it more easily.
This commit is contained in:
@ -2794,7 +2794,7 @@ export function compileAllocate(
|
||||
return module.createUnreachable();
|
||||
}
|
||||
|
||||
var allocateInstance = (<FunctionPrototype>allocatePrototype).resolve(); // reports
|
||||
var allocateInstance = compiler.resolver.resolveFunction(<FunctionPrototype>allocatePrototype, null);
|
||||
if (!(allocateInstance && compiler.compileFunction(allocateInstance))) return module.createUnreachable();
|
||||
|
||||
compiler.currentType = classInstance.type;
|
||||
@ -2825,7 +2825,7 @@ export function compileAbort(
|
||||
var abortPrototype = program.elementsLookup.get(abortInternalName); // might be intended
|
||||
if (!abortPrototype || abortPrototype.kind != ElementKind.FUNCTION_PROTOTYPE) return module.createUnreachable();
|
||||
|
||||
var abortInstance = (<FunctionPrototype>abortPrototype).resolve(); // reports
|
||||
var abortInstance = compiler.resolver.resolveFunction(<FunctionPrototype>abortPrototype, null);
|
||||
if (!(abortInstance && compiler.compileFunction(abortInstance))) return module.createUnreachable();
|
||||
|
||||
var messageArg = message != null
|
||||
|
Reference in New Issue
Block a user