refactor(semantic)!: Do not expose CompactStr from Reference#3985
refactor(semantic)!: Do not expose CompactStr from Reference#3985
CompactStr from Reference#3985Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
CodSpeed Performance ReportMerging #3985 will not alter performanceComparing Summary
|
|
Handling out |
|
@DonIsaac Just to say, in my view we shouldn't be using Please see oxc-project/backlog#32 which is a work-in-progress shopping list of various optimizations we could make to semantic. But... my intent is to review all the code which uses There's plenty of room for improvement, but in my view, at this point it'll be more fruitful to tackle it as a whole with a defined roadmap, rather than making lots of incremental changes. However... if you're keen to get busy on this, I'm pretty sure replacing |

Changes
Reference::name()to return a&strinstead of a&CompactStr. As such, it is technically a breaking change. I scanned through Rolldown to see how they useReferences, and I do not think this PR will break anything.Doing this will give us flexibility to change the representation of a reference name in the future. I'm thinking of making this an
Rc<CompactStr>or something similar to reduce allocations within semantic.