Add NMODL support for multiple INITIAL blocks - #3589
Merged
Conversation
Contributor
|
✔️ b09e48a -> artifacts URL |
Contributor
|
✔️ 1a91380 -> artifacts URL |
|
✔️ b09e48a -> Azure artifacts URL |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3589 +/- ##
==========================================
+ Coverage 68.46% 68.47% +0.01%
==========================================
Files 685 686 +1
Lines 116721 116754 +33
==========================================
+ Hits 79914 79949 +35
+ Misses 36807 36805 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JCGoran
marked this pull request as ready for review
September 2, 2025 17:16
nrnhines
reviewed
Sep 2, 2025
nrnhines
approved these changes
Sep 3, 2025
|
|
✔️ 83e5638 -> Azure artifacts URL |
Contributor
|
✔️ 83e5638 -> artifacts URL |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #3588.
The implementation of
MergeInitialBlocksVisitorbasically does the following:blocks_to_deletestatementsstatementsin itblocks_to_deletefrom the ASTpasses --nmodl-astis enabled, write a file<modfile>.<number>.merge_initial_block.modSome remarks (for future reference):
collect_nodesdoesn't actually collectNodes, but rather (a vector of) instances of its parent class,Ast. This means that we can't directly pass it toProgram'serase_node. As a workaround, one can use the following idiom (whereis_<some_type>is one of the methods here):Astclass doesn't appear to implementoperator==so we can't compare values at the AST level, but only at the level of NMODL