-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mir: remove the tree delimiter nodes #1334
Commits on Jun 6, 2024
-
It has the same role as the `cnkBinding` node in the CGIR, that is, to group a field name and value expression in an object construction expression together. Previously, the `mnkField` and expression nodes loosely followed each other, making `mnkObjConstr` subtrees heterogenous, which complicates some traversal (or at least it will, once more traversal is tree- length-based).
Configuration menu - View commit details
-
Copy full SHA for f73bdda - Browse repository at this point
Copy the full SHA f73bddaView commit details -
replace some manual tree constructions
`mnkPathNamed`, `mnkPathVariant`, `mnkPathPosition`, and `mnkName` are all going to change shape. For better forward compatibility, dedicated construction template for them are added and used. The `ekNone` effect kind is introduced for being able to signal "no effect" when constructing a `mnkName` tree.
Configuration menu - View commit details
-
Copy full SHA for 4bdd6e4 - Browse repository at this point
Copy the full SHA 4bdd6e4View commit details -
mir: remove the
mnkEnd
delimiter nodesInstead of requiring delimiter nodes, subtree root nodes now store a their number of subnodes. Multiple subtree root nodes previously stored extra information, which is now no longer possible. Most tree traversal routines are updated accordingly, and those specific to `mnkEnd` nodes are removed. Since it's obsolete now, the `GeneralEffect` enum type is removed.
Configuration menu - View commit details
-
Copy full SHA for 37199cb - Browse repository at this point
Copy the full SHA 37199cbView commit details -
* skipping end nodes is unnecessary and wrong now * instead of iterating until an `mnkEnd` node is found, a for loop using the node count suffices
Configuration menu - View commit details
-
Copy full SHA for 89ebf14 - Browse repository at this point
Copy the full SHA 89ebf14View commit details -
A `MirBuffer` instance keeps the track of the number of the subnodes in the currently constructed tree, updating the `len` field in the root node on subtree completion. The value is saved on the stack when starting a nested subtree. For manual subtree construction (i.e., not using the `subTree` template), the `start` and `finish` procedures are provided. Since the builder manages updating the length field, manually providing the number of nodes is unnecessary (`mirgen` is updated accordingly).
Configuration menu - View commit details
-
Copy full SHA for 661aea2 - Browse repository at this point
Copy the full SHA 661aea2View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4edb64 - Browse repository at this point
Copy the full SHA c4edb64View commit details -
mir: restore the missing information
Subtree nodes no longer being able to store non-length information requires the information to be stored elsewhere. The `mnkImmediate` node is added, and used as an ad-hoc way of storing information in the tree. * call trees store whether the call modifies some global state in an immediate value in the first slot * `mnkName` trees store the tag as an immediate value in the first subnode -- `mnkTag` nodes are removed * the named-field-access trees store the field position in an `mnkField` node in the second slot * `mnkPathPos` stores the position as an immediate value in the second slot The tree construction throught the MIR processing is updated accordingly.
Configuration menu - View commit details
-
Copy full SHA for e35cc7e - Browse repository at this point
Copy the full SHA e35cc7eView commit details -
mirtrees: add and use
last
routineIt replaces the now-unavailable `findEnd` + `previous` combination.
Configuration menu - View commit details
-
Copy full SHA for fb8aacd - Browse repository at this point
Copy the full SHA fb8aacdView commit details -
update the various places where MIR is inspected
* inspection of call, path, and `mnkName` is adjusted to work with the new tree shapes * dedicated query procedures are used instead of manual indexing where sensible
Configuration menu - View commit details
-
Copy full SHA for 92c7492 - Browse repository at this point
Copy the full SHA 92c7492View commit details -
treechangesets: update
changeTree
There's no more end node that needs to be patched.
Configuration menu - View commit details
-
Copy full SHA for 9122d2e - Browse repository at this point
Copy the full SHA 9122d2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd1d639 - Browse repository at this point
Copy the full SHA fd1d639View commit details
Commits on Jun 9, 2024
-
replace manual call tree construction
Manually constructing a `mnkCall`/`mnkCheckedCall` sub-tree is prone to mistakes, and it also complicates future changes to the syntax (should any be made). `mirconstr` now provides the `rawBuildCall` template for building call trees where full control over the makeup is needed.
Configuration menu - View commit details
-
Copy full SHA for 95eda13 - Browse repository at this point
Copy the full SHA 95eda13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b4c338 - Browse repository at this point
Copy the full SHA 4b4c338View commit details
Commits on Jun 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7d8ac59 - Browse repository at this point
Copy the full SHA 7d8ac59View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6abf8f3 - Browse repository at this point
Copy the full SHA 6abf8f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d917f98 - Browse repository at this point
Copy the full SHA d917f98View commit details