Skip to content
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

🧹️🧼 Cleanup: addFuncDef/clearFuncDefs should all use a non-static pool #34

Merged
merged 18 commits into from
Feb 27, 2024

Conversation

deavmi
Copy link
Contributor

@deavmi deavmi commented Dec 9, 2023

Please see this.

- Added new interface
- Implemented new `IFuncDefStore` type
- The constructor now takes in a `TypeChecker` instance
- Implemented `addFunctionDef(Function func)`
- Added a TODO + some code for a future naming setup I want to se
- Added documentation
- Added new method `grabFunctionDef(string name)` to the API
- Added new exception type
- Added more docs for `grabFunctionDef(string name)`
- Pass in ourselves (a `IFuncDefStore`) into the `DFunctionInnerGenerator` when adding a function definition
- Implemented `grabFunctionDef(string name)` from the updated `IFuncDefStore` API
- Constructor now takes in a `IFuncDefStore`
- When we encounter a `Function` we will add it to the store of function definitions
by using the new `IFuncDefStore` (instead of the old `addFunctionDef(TypeChecker, Function)`
- Removed unused method `saveFunctionDefinitionNode(DNode funcDefNode)`
- Removed unused method `retrieveFunctionDefinitionNode(string functionAbsolutePath)`
- Removed the old method `addFunctionDef(TypeChecker tc, Function func)` (as we are now using the `IFuncDefStore`)
- Removed the `clearFuncDefs()` as we are now using the `IFuncDefStore`
- Removed the `grabFunctionDefs()` as we are now using the `IFuncDefStore`
- Removed the `FunctionData[string]` as we are now using the `IFuncDefStore`

DFunctionInnerGenerator

- Constructor now takes in a `IFuncDefStore`
- `dependencyCheck()` no lomger calls the removed `clearFuncDefs()` from the `dependency.core` module
- `dependencyCheck()` now constructs a new `IFuncDefStore` and then passes it into the `DNodeGenerator`
when dependency generation needs to occur
@deavmi deavmi self-assigned this Dec 9, 2023
- Added module-level documentation
- Documented class
- Documented module
- Documented constructor and class
- `addFunctionDef(Function func)` may now throw a `FuncDefStoreException` when you add a function that already exists
- `addFunctionDef(Function func)` now throws a `FuncDefStoreException` when you provide a `Function` that has already been added
- Moved import to the top
- Cleaned up
@deavmi
Copy link
Contributor Author

deavmi commented Dec 27, 2023

Updated with latest code from vardec_varass ✔️

@deavmi
Copy link
Contributor Author

deavmi commented Feb 27, 2024

Merging...

@deavmi deavmi merged commit c55cd74 into vardec_varass_dependency Feb 27, 2024
12 checks passed
@deavmi
Copy link
Contributor Author

deavmi commented Feb 27, 2024

Merged ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant