1
Fork 0

Use a separate interner type for UniqueTypeId

Using symbol::Interner makes it very easy to mixup UniqueTypeId symbols
with the global interner. In fact the Debug implementation of
UniqueTypeId did exactly this.

Using a separate interner type also avoids prefilling the interner with
unused symbols and allow for optimizing the symbol interner for parallel
access without negatively affecting the single threaded module codegen.
This commit is contained in:
bjorn3 2021-08-08 17:24:30 +02:00
parent c7dbe7a830
commit 8c7840e8cb
5 changed files with 61 additions and 11 deletions

View file

@ -215,7 +215,7 @@ fn symbols_with_errors(input: TokenStream) -> (TokenStream, Vec<syn::Error>) {
}
impl Interner {
pub fn fresh() -> Self {
pub(crate) fn fresh() -> Self {
Interner::prefill(&[
#prefill_stream
])