Add Scope Analysis #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the compiler only constructs the core AST out of source code. In order to move forward with compilation, it is necessary to resolve symbol accesses and closures. These tasks are more or less related to each other, and so I think they should be done in one stage.
The closure conversion step should take a tree of Core AST and produce a new tree of objects identical in structure to the Core AST but:
... and any other information required to compile closures and symbol accesses.
Upon further consideration, I have decided that this way of handling closures is not appropriate. Reasons for this include:
I have instead decided to implement a simple dynamic linked list approach to environments. This approach is much simpler to implement, and the previous approach practically degenerates into a linked list when all functions are unary anyway.
Finish Closure Conversionto Add Scope Analysis