shfty-elysian / elysian-legacy

Field function compiler
0 stars 0 forks source link

Use references instead of inline function definitions when generating IR #107

Open Shfty opened 1 year ago

Shfty commented 1 year ago

Currently, AsIR implementors supply a list of concrete function definitions inside functions. This results in a lot of duplication for functions shared between multiple dependents, which then has to be deduplicated via hashing before codegen.

This should be refactored to use FunctionIdentifier instead of duplicating FunctionDefinition. This should also allow for a simplified API surface, since dependencies and concrete functions can be split across different AsIR functions.