1 write to _compilation
ILCompiler.RyuJit (1)
JitInterface\CorInfoImpl.RyuJit.cs (1)
46
_compilation
= compilation;
182 references to _compilation
ILCompiler.RyuJit (182)
JitInterface\CorInfoImpl.RyuJit.cs (110)
59
MethodDesc asyncResumptionStub =
_compilation
.TypeSystemContext.GetAsyncResumptionStub(MethodBeingCompiled,
_compilation
.TypeSystemContext.GeneratedAssembly.GetGlobalModuleType());
61
entryPoint = (void*)ObjectToHandle(
_compilation
.NodeFactory.MethodEntrypoint(asyncResumptionStub));
70
methodIL ??=
_compilation
.GetMethodIL(MethodBeingCompiled);
89
IEETypeNode expectedeetype =
_compilation
.NecessaryTypeSymbolIfPossible(eetype.Type);
258
if (
_compilation
.NeedsRuntimeLookup(helperId, entity))
260
GenericDictionaryLookup genericLookup =
_compilation
.ComputeGenericLookup(callerHandle, helperId, entity);
314
ISymbolNode constLookup =
_compilation
.ComputeConstantLookup(helperId, entity);
337
pLookup = CreateConstLookupToSymbol(
_compilation
.NodeFactory.ReadyToRunHelper(helperId, type));
407
targetOfLookup =
_compilation
.TypeSystemContext.GetMethodForRuntimeDeterminedType(directMethod.GetTypicalMethodDefinition(), (RuntimeDeterminedType)constrainedType);
409
targetOfLookup =
_compilation
.TypeSystemContext.GetMethodForInstantiatedType(directMethod.GetTypicalMethodDefinition(), (InstantiatedType)constrainedType);
433
DelegateCreationInfo delegateInfo =
_compilation
.GetDelegateCtor(delegateTypeDesc, targetMethod, constrainedType, isLdvirtftn);
456
pLookup.constLookup = CreateConstLookupToSymbol(
_compilation
.NodeFactory.ReadyToRunHelper(ReadyToRunHelperId.DelegateCtor, delegateInfo));
610
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFast"u8));
612
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFinalizable"u8));
614
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFastAlign8"u8));
616
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFinalizableAlign8"u8));
618
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFastMisalign"u8));
623
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewPtrArrayFast"u8));
625
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewArrayFastAlign8"u8));
627
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewArrayFast"u8));
630
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpStackProbe"u8));
633
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpGcPoll"u8));
768
return
_compilation
.NodeFactory.MethodEntrypoint(
_compilation
.NodeFactory.TypeSystemContext.GetCoreLibEntryPoint("System"u8, "Type"u8, "GetTypeFromMethodTable"u8, null));
770
return
_compilation
.NodeFactory.MethodEntrypoint(
_compilation
.NodeFactory.TypeSystemContext.GetCoreLibEntryPoint("Internal.Runtime.CompilerHelpers"u8, "SharedCodeHelpers"u8, "GetClassHandleFromMethodParam"u8, null));
776
return
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpResolveInterfaceMethodFast"u8));
793
return
_compilation
.NodeFactory.ExternIndirectFunctionSymbol(new Utf8String("__guard_check_icall_fptr"u8));
795
return
_compilation
.NodeFactory.ExternIndirectFunctionSymbol(new Utf8String("__guard_dispatch_icall_fptr"u8));
803
JitHelper.GetEntryPoint(
_compilation
.TypeSystemContext, id, out mangledName, out methodDesc);
808
entryPoint =
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String(mangledName));
810
entryPoint =
_compilation
.NodeFactory.MethodEntrypoint(methodDesc);
827
pResult = CreateConstLookupToSymbol(
_compilation
.NodeFactory.MethodEntrypoint(method));
868
stringObject =
_compilation
.NodeFactory.SerializedStringObject("");
873
stringObject =
_compilation
.NodeFactory.SerializedStringObject((string)literal);
963
var typeSymbol =
_compilation
.NecessaryTypeSymbolIfPossible(type);
965
RelocType rel = (
_compilation
.NodeFactory.Target.IsWindows) ?
1068
_debugInfo =
_compilation
.GetDebugInfo(methodIL);
1076
return
_compilation
.NodeFactory.ReadyToRunHelperFromTypeLookup(helperId, helperArgument, callerHandle.OwningType);
1080
return
_compilation
.NodeFactory.ReadyToRunHelperFromDictionaryLookup(helperId, helperArgument, callerHandle);
1100
||
_compilation
.TypeSystemContext.IsGenericArrayInterfaceType(type))
1174
if (elementType.GetElementSize().AsInt ==
_compilation
.TypeSystemContext.Target.PointerSize)
1194
_compilation
.DetectGenericCycles(methodIL.OwningMethod, method);
1197
return
_compilation
.NodeFactory.MethodEntrypointOrTentativeMethod(method, isUnboxingThunk);
1284
_compilation
.NodeFactory.MetadataManager.NoteOverridingMethod(method, directMethod);
1372
canDevirt =
_compilation
.IsEffectivelySealed(targetMethod);
1419
lookupMethod =
_compilation
.TypeSystemContext.GetMethodForRuntimeDeterminedType(targetMethod.GetTypicalMethodDefinition(), (RuntimeDeterminedType)runtimeDeterminedConstrainedType);
1421
lookupMethod =
_compilation
.TypeSystemContext.GetMethodForInstantiatedType(targetMethod.GetTypicalMethodDefinition(), (InstantiatedType)runtimeDeterminedConstrainedType);
1470
CreateConstLookupToSymbol(
_compilation
.NodeFactory.FatFunctionPointer(targetMethod));
1483
targetMethod =
_compilation
.ExpandIntrinsicForCallsite(targetMethod, methodIL.OwningMethod);
1498
_compilation
.NodeFactory.StringAllocator(targetMethod)
1534
instParam =
_compilation
.NodeFactory.MethodGenericDictionary(concreteMethod);
1539
instParam =
_compilation
.NodeFactory.ConstructedTypeSymbol(concreteMethod.OwningType);
1576
if (!
_compilation
.NeedsRuntimeLookup(constrainedHelperId, constrainedCallInfo))
1596
MethodDesc targetOfLookup =
_compilation
.GetTargetOfGenericVirtualMethodCall((MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken));
1598
_compilation
.DetectGenericCycles(
1633
_compilation
.NodeFactory.InterfaceDispatchCell(targetMethod
1662
pResult->codePointerOrStubLookup.constLookup = CreateConstLookupToSymbol(
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("NYI_LDVIRTFTN"u8)));
1676
_compilation
.NodeFactory.ReadyToRunHelper(ReadyToRunHelperId.ResolveVirtualFunction, slotDefiningMethod));
1708
ISymbolNode typeHandleSymbol =
_compilation
.NecessaryTypeSymbolIfPossible(type);
1814
DictionaryLayoutNode contextLayout =
_compilation
.NodeFactory.GenericDictionaryLayout(
1823
helperId =
_compilation
.GetLdTokenHelperForType(td);
1840
RuntimeMethodHandleNode methodHandleSymbol =
_compilation
.NodeFactory.RuntimeMethodHandle(method);
1858
int pointerSize =
_compilation
.TypeSystemContext.Target.PointerSize;
1864
Debug.Assert(!methodDesc.CanMethodBeInSealedVTable(
_compilation
.NodeFactory));
1871
int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(
_compilation
.NodeFactory, methodDesc, owningType);
1877
if (
_compilation
.NeedsSlotUseTracking(owningType))
1878
(_additionalDependencies ??= new ILCompiler.DependencyAnalysisFramework.DependencyNodeCore<NodeFactory>.DependencyList()).Add(
_compilation
.NodeFactory.VirtualMethodUse(methodDesc), "Virtual method call");
1931
Utf8String externName = new Utf8String(
_compilation
.PInvokeILProvider.GetDirectCallExternName(md));
1932
externName =
_compilation
.NodeFactory.NameMangler.NodeMangler.ExternMethod(externName, md);
1934
pLookup = CreateConstLookupToSymbol(
_compilation
.NodeFactory.ExternFunctionSymbol(externName));
1941
*ppCookieVal = (IntPtr*)ObjectToHandle(
_compilation
.NodeFactory.ExternVariable(new Utf8String("__security_cookie"u8)));
1958
MethodDesc stub =
_compilation
.PInvokeILProvider.GetCalliStub(
1974
if (
_compilation
.HasLazyStaticConstructor(owningType) && !((MetadataType)owningType).IsBeforeFieldInit)
1994
MethodDesc stub =
_compilation
.PInvokeILProvider.GetCalliStub(
2007
if (
_compilation
.GetMethodIL(method) is Internal.IL.Stubs.PInvokeILStubMethodIL stub)
2031
if (
_compilation
.TypeSystemContext.Target.Architecture == TargetArchitecture.ARM)
2077
return (int*)ObjectToHandle(
_compilation
.NodeFactory.ExternVariable(new Utf8String("RhpTrapThreads"u8)));
2101
fieldOffset +=
_compilation
.NodeFactory.ThreadStaticBaseOffset(mt);
2115
ISymbolNode node =
_compilation
.GetFieldRvaData(field);
2120
if (
_compilation
.HasLazyStaticConstructor(field.OwningType))
2155
helper =
_compilation
.NodeFactory.ReadyToRunHelperFromTypeLookup(
2161
helper =
_compilation
.NodeFactory.ReadyToRunHelperFromDictionaryLookup(
2187
ISortableSymbolNode index =
_compilation
.NodeFactory.TypeThreadStaticIndex(field.OwningType);
2193
if (
_compilation
.HasLazyStaticConstructor(field.OwningType))
2204
else if (!
_compilation
.HasLazyStaticConstructor(field.OwningType))
2211
baseAddr =
_compilation
.NodeFactory.TypeGCStaticsSymbol(field.OwningType);
2216
baseAddr =
_compilation
.NodeFactory.TypeNonGCStaticsSymbol(field.OwningType);
2237
_compilation
.NodeFactory.ReadyToRunHelper(helperId, field.OwningType));
2246
if (
_compilation
.IsInitOnly(field))
2270
if (
_compilation
.TypeSystemContext.IsArrayVariantCastable(type))
2277
return !
_compilation
.CanReferenceConstructedTypeOrCanonicalFormOfType(type)
2278
&& (type == canonType || !
_compilation
.CanReferenceConstructedMethodTable(canonType));
2300
if (
_compilation
.IsEffectivelySealed(type))
2306
TypeDesc[] implClasses =
_compilation
.GetImplementingClasses(type);
2334
if (!field.IsThreadStatic &&
_compilation
.IsInitOnly(field) && field.OwningType is MetadataType owningType)
2341
PreinitializationManager preinitManager =
_compilation
.NodeFactory.PreinitializationManager;
2347
int targetPtrSize =
_compilation
.TypeSystemContext.Target.PointerSize;
2363
if (value.GetRawData(
_compilation
.NodeFactory, out object data))
2412
int strDataOffset =
_compilation
.TypeSystemContext.Target.PointerSize + sizeof(int); // 12 on 64bit
2439
return ObjectToHandle(
_compilation
.NecessaryRuntimeTypeIfPossible(type));
2465
addr.addr = (void*)ObjectToHandle(
_compilation
.NodeFactory.TypeNonGCStaticsSymbol(type));
2467
offset = -NonGCStaticsNode.GetClassConstructorContextSize(
_compilation
.NodeFactory.Target);
2477
addr.addr = (void*)ObjectToHandle(
_compilation
.NodeFactory.TypeGCStaticsSymbol(type));
2482
addr.addr = (void*)ObjectToHandle(
_compilation
.NodeFactory.TypeNonGCStaticsSymbol(type));
2490
pInfo->tlsIndexObject = CreateConstLookupToSymbol(
_compilation
.NodeFactory.ExternDataSymbol(new Utf8String("_tls_index"u8)));
2491
pInfo->tlsRootObject = CreateConstLookupToSymbol(
_compilation
.NodeFactory.TlsRoot);
2492
pInfo->threadStaticBaseSlow = CreateConstLookupToSymbol(
_compilation
.NodeFactory.HelperEntrypoint(HelperEntrypoint.GetInlinedThreadStaticBaseSlow));
2493
pInfo->tlsGetAddrFtnPtr = CreateConstLookupToSymbol(
_compilation
.NodeFactory.ExternFunctionSymbol(new Utf8String("__tls_get_addr"u8)));
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (72)
187
return
_compilation
.Logger;
410
if (
_compilation
.TypeSystemContext.Target.Architecture != TargetArchitecture.ARM64
411
&&
_compilation
.TypeSystemContext.Target.Architecture != TargetArchitecture.LoongArch64
412
&&
_compilation
.TypeSystemContext.Target.Architecture != TargetArchitecture.RiscV64)
449
_compilation
.NodeFactory.Target.MinimumFunctionAlignment :
450
_compilation
.NodeFactory.Target.OptimumFunctionAlignment;
578
CodeBasedDependencyAlgorithm.AddDependenciesDueToMethodCodePresence(ref _additionalDependencies,
_compilation
.NodeFactory, MethodBeingCompiled, methodIL);
638
return
_compilation
.TypeSystemContext.Target.PointerSize;
998
if (
_compilation
.TypeSystemContext.Target.Architecture == TargetArchitecture.X86)
1108
if (
_compilation
.IsEffectivelySealed(method.GetUnboxedMethod()))
1113
if (
_compilation
.IsEffectivelySealed(method))
1227
method =
_compilation
.TypeSystemContext.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), (InstantiatedType)type);
1253
MethodDesc instantiatedMethod =
_compilation
.TypeSystemContext.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), instantiatedCtxType);
1256
instantiatedMethod =
_compilation
.TypeSystemContext.GetInstantiatedMethod(instantiatedMethod, method.Instantiation);
1265
if (!
_compilation
.CanInline(MethodBeingCompiled, method))
1268
MethodIL methodIL = method.IsUnboxingThunk() ? null :
_compilation
.GetMethodIL(method);
1297
var calleeIL =
_compilation
.GetMethodIL(calleeMethod);
1306
if (
_compilation
.CanInline(callerMethod, calleeMethod))
1330
var methodIL =
_compilation
.GetMethodIL(HandleToObject(ftn));
1377
decl =
_compilation
.TypeSystemContext.GetMethodForInstantiatedType(decl.GetTypicalMethodDefinition(), (InstantiatedType)ownerTypeDesc);
1381
MethodDesc originalImpl =
_compilation
.ResolveVirtualMethod(decl, objType, out info->detail);
1521
MethodILScope scope = jitInterface.
_compilation
.GetMethodIL(methodWithToken.Method);
1603
MetadataType placeholderType =
_compilation
.TypeSystemContext.SystemModule.GetType("System"u8, "SZGenericArrayEnumerator`1"u8, throwIfNotFound: false);
1807
result =
_compilation
.TypeSystemContext.GetAsyncVariantMethod((MethodDesc)result);
1882
_compilation
.TypeSystemContext.EnsureLoadableMethod(method);
1895
_compilation
.NodeFactory.MetadataManager.GetDependenciesDueToAccess(ref _additionalDependencies,
_compilation
.NodeFactory, (MethodIL)methodIL, method);
1909
?
_compilation
.TypeSystemContext.GetAsyncVariantMethod(method)
1940
_compilation
.TypeSystemContext.EnsureLoadableType(owningClass);
1944
_compilation
.NodeFactory.MetadataManager.GetDependenciesDueToAccess(ref _additionalDependencies,
_compilation
.NodeFactory, (MethodIL)methodIL, field);
1971
_compilation
.TypeSystemContext.EnsureLoadableType(type);
1990
if (
_compilation
.IsFatPointerCandidate(methodIL.OwningMethod, methodSig))
2019
return ObjectToHandle(
_compilation
.TypeSystemContext.GetWellKnownType(result));
2187
if (
_compilation
.IsEffectivelySealed(type))
2766
!
_compilation
.HasLazyStaticConstructor(type)
2866
return ObjectToHandle(
_compilation
.TypeSystemContext.GetWellKnownType(WellKnownType.Object));
2869
return ObjectToHandle(
_compilation
.TypeSystemContext.GetWellKnownType(WellKnownType.TypedReference));
2872
return ObjectToHandle(
_compilation
.TypeSystemContext.GetWellKnownType(WellKnownType.RuntimeTypeHandle));
2875
return ObjectToHandle(
_compilation
.TypeSystemContext.GetWellKnownType(WellKnownType.RuntimeFieldHandle));
2878
return ObjectToHandle(
_compilation
.TypeSystemContext.GetWellKnownType(WellKnownType.RuntimeMethodHandle));
2881
ThrowHelper.ThrowTypeLoadException("System", "RuntimeArgumentHandle",
_compilation
.TypeSystemContext.SystemModule);
2885
return ObjectToHandle(
_compilation
.TypeSystemContext.GetWellKnownType(WellKnownType.String));
2888
return ObjectToHandle(
_compilation
.TypeSystemContext.SystemModule.GetKnownType("System"u8, "RuntimeType"u8));
3083
return
_compilation
.IsEffectivelySealed(type);
3197
return (void*)ObjectToHandle(
_compilation
.GetFieldRvaData(fd));
3461
if (
_compilation
.NodeFactory.Target.IsWasm)
3466
else if (
_compilation
.NodeFactory.Target.IsWindows)
3476
pEEInfoOut.osType = TargetToOs(
_compilation
.NodeFactory.Target);
3481
DefType continuation =
_compilation
.TypeSystemContext.ContinuationType;
3487
DefType asyncHelpers =
_compilation
.TypeSystemContext.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "AsyncHelpers"u8);
3508
return ObjectToHandle(
_compilation
.TypeSystemContext.GetContinuationType(gcMapBuilder.ToGCMap()));
3658
HandleToObject(structHnd),
_compilation
.TypeSystemContext.Target.Architecture);
3939
=> (chunk.flags & CorJitAllocMemFlag.CORJIT_ALLOCMEM_HAS_POINTERS_TO_CODE) != 0 && !
_compilation
.TypeSystemContext.Target.IsWindows;
4078
var target =
_compilation
.TypeSystemContext.Target;
4345
switch (
_compilation
.TypeSystemContext.Target.Architecture)
4362
TargetArchitecture arch =
_compilation
.TypeSystemContext.Target.Architecture;
4429
return owningMetadataType.Module ==
_compilation
.TypeSystemContext.SystemModule;
4438
flags.InstructionSetFlags.Add(
_compilation
.InstructionSetSupport.OptimisticFlags);
4445
TargetArchitecture targetArchitecture =
_compilation
.TypeSystemContext.Target.Architecture;
4452
Debug.Assert(
_compilation
.InstructionSetSupport.IsInstructionSetSupported(InstructionSet.X86_X86Base));
4456
Debug.Assert(
_compilation
.InstructionSetSupport.IsInstructionSetSupported(InstructionSet.ARM64_AdvSimd));
4460
if (targetArchitecture == TargetArchitecture.ARM && !
_compilation
.TypeSystemContext.Target.IsWindows)
4512
|| (
_compilation
.TypeSystemContext.IsSpecialUnboxingThunk(this.MethodBeingCompiled) &&
_compilation
.TypeSystemContext.GetTargetOfSpecialUnboxingThunk(this.MethodBeingCompiled).IsAsyncCall())
4513
|| (
_compilation
.TypeSystemContext.IsDefaultInterfaceMethodImplementationInstantiationThunk(this.MethodBeingCompiled) &&
_compilation
.TypeSystemContext.GetTargetOfDefaultInterfaceMethodImplementationInstantiationThunk(this.MethodBeingCompiled).IsAsyncCall())
4621
PgoSchemaElem[] pgoResultsSchemas =
_compilation
.ProfileData[methodDesc]?.SchemaData;
4632
,
_compilation
.CanReferenceConstructedMethodTable
4727
instructionSet = InstructionSetFlags.ConvertToImpliedInstructionSetForVectorInstructionSets(
_compilation
.TypeSystemContext.Target.Architecture, instructionSet);
4729
Debug.Assert(!
_compilation
.InstructionSetSupport.NonSpecifiableFlags.HasInstructionSet(instructionSet));
4731
return supportEnabled ?
_compilation
.InstructionSetSupport.IsInstructionSetSupported(instructionSet) : false;