Skip to content

Commit cd14b29

Browse files
committed
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.
1 parent 585d246 commit cd14b29

File tree

6 files changed

+1314
-1064
lines changed

6 files changed

+1314
-1064
lines changed

dist/assemblyscript.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assemblyscript.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/builtins.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,7 +2794,7 @@ export function compileAllocate(
27942794
return module.createUnreachable();
27952795
}
27962796

2797-
var allocateInstance = (<FunctionPrototype>allocatePrototype).resolve(); // reports
2797+
var allocateInstance = compiler.resolver.resolveFunction(<FunctionPrototype>allocatePrototype, null);
27982798
if (!(allocateInstance && compiler.compileFunction(allocateInstance))) return module.createUnreachable();
27992799

28002800
compiler.currentType = classInstance.type;
@@ -2825,7 +2825,7 @@ export function compileAbort(
28252825
var abortPrototype = program.elementsLookup.get(abortInternalName); // might be intended
28262826
if (!abortPrototype || abortPrototype.kind != ElementKind.FUNCTION_PROTOTYPE) return module.createUnreachable();
28272827

2828-
var abortInstance = (<FunctionPrototype>abortPrototype).resolve(); // reports
2828+
var abortInstance = compiler.resolver.resolveFunction(<FunctionPrototype>abortPrototype, null);
28292829
if (!(abortInstance && compiler.compileFunction(abortInstance))) return module.createUnreachable();
28302830

28312831
var messageArg = message != null

0 commit comments

Comments
 (0)