roslyn
roslyn copied to clipboard
Reduce GetTypeByMetadataName allocations for fail-path
Fixes #64142
Per my understanding, this is the root cause of https://github.com/unoplatform/uno/issues/7506
result = scope.LookupMetadataType(ref emittedName);
Is this call going to allocate a missing symbol when lookup fails?
Refers to: src/Compilers/CSharp/Portable/Symbols/NonMissingModuleSymbol.cs:203 in 86aedd9. [](commit_id = 86aedd93cecd94e16ba18fa1d578f82a170035fb, deletion_comment = False)
CacheTopLevelMetadataType(ref emittedName, result);
It doesn't look like we want to cache null here.
Refers to: src/Compilers/CSharp/Portable/Symbols/NonMissingAssemblySymbol.cs:177 in 86aedd9. [](commit_id = 86aedd93cecd94e16ba18fa1d578f82a170035fb, deletion_comment = False)