-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More systemantic treatment of bindings
Introduce `Bindings` and `BindingInfo` structs, as better system and naming to replace the `var_info` dict and `next_var_id` ref. Introduce a new kind `K"BindingId"` - an integer handle for an entity (variable, constant, etc). Normally these are generated from `NameKey` (`name,scope_layer`) pairs written in the user's program. But they can also be generated programmatically by the `ssavar()` function, or by `new_mutable_var()`. This should allow proper "gensym" bindings from macros, without needing to rely on the generation of unique names via name mangling. In this system, `SSAValue` is just a particular kind of binding, relegated to a low level IR concept which has invariants which can, in principle, be checked or inferred by the variable analysis pass.
- Loading branch information
Showing
10 changed files
with
197 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.