julia
4e923b3c - [JuliaLowering] Misc. cleanup: `symboliclabel`, `flatten_blocks` (#61166)

Commit
17 days ago
[JuliaLowering] Misc. cleanup: `symboliclabel`, `flatten_blocks` (#61166) Misc: - Use `_typeof_captured_variable` in closure conversion - Don't erase `ex.toplevel_pure` in scope resolution - Add and use `flatten_blocks` to make debug output more readable. - Remove zero-argument return from the validator and a new macro (has never been an accepted form in flisp lowering). Fixups to #60481 and #61016 - Consistently use symbolic labels in break/continue instead of identifiers - Symbolic labels don't participate in scope resolution, so don't need to be special-cased - Clean up break/continue desugaring. Claude seems quite confused as to what forms can show up where. I can sympathize, and will hopefully have that written down sometime this week. - Remove provenance-preserving `@label` macro---I could fix the mistakes, it's just certain that we need everything to work without them, and having them was masking some problems. - Naming it `loop-cont`/`loop-exit` in the normal macro and `loop_cont`/`loop_exit` was pretty devious For future reference, these are the invariants we have and want to maintain: - The expansion of any macro in syntax_macros.jl should be equal to `expr_to_est(equivalent_old_expansion)` (modulo scope layer nonsense) - The result of Expr-macro expansion should always be lowerable by JuliaLowering - The reverse is nearly true, but requires implementation of scope_layer/name-mangling equivalence - If we see a tree in desugaring, we know it passed `valid_st1` and went through `est_to_dst`; no other forms are possible
Author
Parents
Loading