🧹🧼 Cleanup: Remove root from DNodeGenerator #175

Open
opened 2024-05-07 10:37:57 +01:00 by deavmi · 7 comments
Owner

Purpose ✍️

There is a root variable which is set when we run generalPass(...) on either a Module or Function but it is only actually used when we are calling addFunctionDef to the IFuncDefStore, something of this kind can be derived right there as it is in the Function's module-container resolution stage that sets root in the first place.

## Purpose ✍️ There is a `root` variable which is set when we run `generalPass(...)` on either a `Module` or `Function` **but** it is only actually used when we are calling `addFunctionDef` to the `IFuncDefStore`, something of this kind can be derived right there as it is in the `Function`'s module-container resolution stage that sets `root` in the first place.
deavmi changed title from Remove root from DNodeGenerator to 🧹🧼 Cleanup: Remove root from DNodeGenerator 2024-05-07 10:38:10 +01:00
deavmi added the
dependency
qol
labels 2024-05-07 10:38:20 +01:00
deavmi added this to the Clean ups milestone 2024-05-07 10:38:23 +01:00
deavmi self-assigned this 2024-05-07 10:38:27 +01:00
deavmi added this to the Dependency tree, type-checking and codegen project 2024-05-07 10:38:29 +01:00
deavmi started working 2024-05-07 10:38:36 +01:00
deavmi added the due date 2024-05-11 2024-05-07 10:38:39 +01:00
deavmi modified the due date from 2024-05-11 to 2024-05-08 2024-05-07 10:38:45 +01:00
Author
Owner

DNodeGenerator

  • Removed root
DNodeGenerator - Removed `root`
Author
Owner

Purpose ✍️

There is a root variable which is set when we run generalPass(...) on either a Module or Function but it is only actually used when we are calling addFunctionDef to the IFuncDefStore, something of this kind can be derived right there as it is in the Function's module-container resolution stage that sets root in the first place.

It gets pooled ONLY for the reason to call .entity on it, so it has nothing to do with dependency nodes per say, just the Module itself of which access to is wanted.

> ## Purpose ✍️ > > There is a `root` variable which is set when we run `generalPass(...)` on either a `Module` or `Function` **but** it is only actually used when we are calling `addFunctionDef` to the `IFuncDefStore`, something of this kind can be derived right there as it is in the `Function`'s module-container resolution stage that sets `root` in the first place. It gets `pooled` **ONLY** for the reason to call `.entity` on it, so it has nothing to do with _dependency nodes_ per say, just the `Module` itself of which access to is wanted.
Author
Owner

DNodeGenerator

  • When processing a Function (a function definition) discover the Module by which it is contained in on the spot
DNodeGenerator - When processing a `Function` (a function definition) discover the `Module` by which it is contained in on the spot
Author
Owner

DNodeGenerator

  • Removed all code in generalPass(...) which tried to set the root DNode
DNodeGenerator - Removed all code in `generalPass(...)` which tried to set the `root` DNode
Author
Owner

Testing now

Testing now
Author
Owner

Testing now

Works. Now to check the Github.

> Testing now Works. Now to check the Github.
Author
Owner

CI/CD passes

CI/CD passes ✅
deavmi stopped working 2024-05-07 10:48:22 +01:00
9 minutes 46 seconds
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Total Time Spent: 9 minutes 46 seconds
deavmi
9 minutes 46 seconds
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

2024-05-08

Dependencies

No dependencies set.

Reference: tlang/tlang#175
No description provided.