-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIoptimizationuntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
I wonder if it makes sense in RyuJIT to optimize things like
Type type = Type.GetType("Foo.MyType"); // and, perhaps, typeof(T).Assembly.GetType
to a runtime equivalent of :
Type type = typeof(Foo.MyType); // to CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPE
Once #1378 is merged there will be getStringLiteral
API for ldstr tokens.
Example: Environment.Unix.cs (on tier1 compilation most assemblies/types most likely will be already known/loaded, e.g. via the same code but on tier0 🙂)
Or this is how we detect mono runtime:
bool isMono = typeof(object).Assembly.GetType("Mono.RuntimeStructs") != null;
ForNeVeR
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIoptimizationuntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner