-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid try/catch when generating type forwarder metadata (#69702)
The code was written before we introduced the concept of `NotFoundBehavior`. This avoids hitting first-chance exceptions when mscorlib becomes part of the closure for whatever reason. First chance exception are annoying. For context, NativeAOT currently generates type forwarder metadata for everything that had a definition generated (e.g. if System.Object is generated and mscorlib and System.Runtime is generated, we generate the metadata for System.Object and the forwarders in both S.Runtime and mscorlib). We'll want to eventually model type forwarders in the dependency graph and only generate them when needed (e.g. only if `Type.GetType("System.Object, mscorlib")` is present). It's what IL Linker now does. It's a possible future size optimization.
- Loading branch information
1 parent
e86511e
commit a014478
Showing
2 changed files
with
13 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters