Skip to content

add StatNameJoinPool #10516

@jmarantz

Description

@jmarantz

Currently SymbolTable::join() is cumbersome to call, as it returns a StoragePtr, from which you can construct a StatName. The StatName is valid as long as the StoragePtr is.

Those semantics are what they are, but I think all the call-sites for SymbolTable::join would be cleaner if their were a pool-like wrapper:

class StatNameJoinPool {
public:
  StatNameJoinPool(SymbolTable& symbol_table);
 `StatName join(const std::vector<StatName>& parts);
};

again the StatNameJoinPool would need to outlive the StatNames created with it, but I think this would be more intuitive at call-sites.

Metadata

Metadata

Assignees

Labels

area/statsstalestalebot believes this issue/PR has not been touched recentlytech debt

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions