Restructure how functions are handled in the IR and codegen to eliminate function inlining #1823
Labels
big
this task is hard and will take a while
blocked
compiler: ir
IRgen and sway-ir including optimization passes
enhancement
New feature or request
P: medium
Once #1824 goes in, we will have the option to support recursive functions. But, in order to do so, we will need to make changes to the IR and codegen.
Blocked by:
The IR would like to organise a program into a tree. Instructions gathered into blocks, gathered into functions, gathered into modules. So having distinct functions and all their meta available to IR would be beneficial structurally and analytically.
To the best of my knowledge, the debugger is mostly interested in attributing spans to instructions, but being able to resolve full paths of symbols to instructions is important to set breakpoints (or inspect memory values). Without the absolute naming of functions this becomes impossible. @Dentosal knows more.
Originally posted by @otrho in #1557 (comment)
The text was updated successfully, but these errors were encountered: