Skip to content

Commit 072cdb5

Browse files
committed
[Profiler] Clean up CounterExpr allocation
Use a BumpPtrAllocator instead of a linked list, and allocate internally within the CounterExpr so we can just pass about values instead of pointers and references. This allows us to eliminate `CounterExpr::Ref`. Unfortunately this means we can no longer store CounterExprs in the SourceMappingRegions for nodes, as we were previously using pointers to propagate updates the counters made after the region was popped. Instead we now have to query the `CounterMap`. But IMO this is a worthwhile tradeoff for code that's easier to reason about.
1 parent 959e5de commit 072cdb5

File tree

1 file changed

+142
-122
lines changed

1 file changed

+142
-122
lines changed

0 commit comments

Comments
 (0)