[RFC] IntraModule Namespaces
See original GitHub issueProvide an API for scoping temporary and non-temporary names within modules.
Related to #535
Proposed API:
// Prefix only temporaries
withTempPrefix("_COV") { ... }
// Prefix all identifiers
withPrefix("jacklib") { ... }
I’m not sure if the user should be expected to give the _
prefix, or if we should mandate that for “temporaries”. It’s currently used by Firrtl as the heuristic for determining which name to delete when constant propagating.
-
Type of issue
- Bug report
- Feature request
- Other enhancement
-
What is the use case for changing the behavior?
Improve internal naming stability. This is particularly relevant for libraries where we would like library code generation to have minimal impact on the names of everything else.
Potential use cases: Assertion coverage library, ECO support (it is absolutely critical to minimize impact on surrounding code for ECOs, I think Firrtl support is also necessary here).
- Impact
- no functional change
- API addition (no impact on existing code)
- API modification
- unknown
IMO changes to name generation are API modifications, but increasing stability should be strictly a good thing.
- Development Phase
- request
- proposal
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:10 (10 by maintainers)
Top GitHub Comments
@edwardcwang I think that seems pretty reasonable
Why not something like