1 write to _compilation
ILCompiler.RyuJit (1)
JitInterface\CorInfoImpl.RyuJit.cs (1)
46_compilation = compilation;
187 references to _compilation
ILCompiler.RyuJit (187)
JitInterface\CorInfoImpl.RyuJit.cs (114)
59MethodDesc asyncResumptionStub = _compilation.TypeSystemContext.GetAsyncResumptionStub(MethodBeingCompiled, _compilation.TypeSystemContext.GeneratedAssembly.GetGlobalModuleType()); 61entryPoint = (void*)ObjectToHandle(_compilation.NodeFactory.MethodEntrypoint(asyncResumptionStub)); 70methodIL ??= _compilation.GetMethodIL(MethodBeingCompiled); 89IEETypeNode expectedeetype = _compilation.NecessaryTypeSymbolIfPossible(eetype.Type); 263if (_compilation.NeedsRuntimeLookup(helperId, entity)) 265GenericDictionaryLookup genericLookup = _compilation.ComputeGenericLookup(callerHandle, helperId, entity); 319ISymbolNode constLookup = _compilation.ComputeConstantLookup(helperId, entity); 342pLookup = CreateConstLookupToSymbol(_compilation.NodeFactory.ReadyToRunHelper(helperId, type)); 412targetOfLookup = _compilation.TypeSystemContext.GetMethodForRuntimeDeterminedType(directMethod.GetTypicalMethodDefinition(), (RuntimeDeterminedType)constrainedType); 414targetOfLookup = _compilation.TypeSystemContext.GetMethodForInstantiatedType(directMethod.GetTypicalMethodDefinition(), (InstantiatedType)constrainedType); 438DelegateCreationInfo delegateInfo = _compilation.GetDelegateCtor(delegateTypeDesc, targetMethod, constrainedType, isLdvirtftn); 461pLookup.constLookup = CreateConstLookupToSymbol(_compilation.NodeFactory.ReadyToRunHelper(ReadyToRunHelperId.DelegateCtor, delegateInfo)); 612return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFast"u8)); 614return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFinalizable"u8)); 616return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFastAlign8"u8)); 618return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFinalizableAlign8"u8)); 620return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewFastMisalign"u8)); 625return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewPtrArrayFast"u8)); 627return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewArrayFastAlign8"u8)); 629return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpNewArrayFast"u8)); 632return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpStackProbe"u8)); 635return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpGcPoll"u8)); 770return _compilation.NodeFactory.MethodEntrypoint(_compilation.NodeFactory.TypeSystemContext.GetCoreLibEntryPoint("System"u8, "Type"u8, "GetTypeFromMethodTable"u8, null)); 772return _compilation.NodeFactory.MethodEntrypoint(_compilation.NodeFactory.TypeSystemContext.GetCoreLibEntryPoint("Internal.Runtime.CompilerHelpers"u8, "SharedCodeHelpers"u8, "GetClassHandleFromMethodParam"u8, null)); 778if ((_compilation._compilationOptions & RyuJitCompilationOptions.ControlFlowGuardAnnotations) != 0 780&& _compilation.NodeFactory.TypeSystemContext.Target.Architecture != TargetArchitecture.X86) 781return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpInterfaceDispatchGuarded"u8)); 782return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpInterfaceDispatch"u8)); 784return _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("RhpResolveInterfaceMethodFast"u8)); 801return _compilation.NodeFactory.ExternIndirectFunctionSymbol(new Utf8String("__guard_check_icall_fptr"u8)); 803return _compilation.NodeFactory.ExternIndirectFunctionSymbol(new Utf8String("__guard_dispatch_icall_fptr"u8)); 811JitHelper.GetEntryPoint(_compilation.TypeSystemContext, id, out mangledName, out methodDesc); 816entryPoint = _compilation.NodeFactory.ExternFunctionSymbol(new Utf8String(mangledName)); 818entryPoint = _compilation.NodeFactory.MethodEntrypoint(methodDesc); 835pResult = CreateConstLookupToSymbol(_compilation.NodeFactory.MethodEntrypoint(method)); 876stringObject = _compilation.NodeFactory.SerializedStringObject(""); 881stringObject = _compilation.NodeFactory.SerializedStringObject((string)literal); 971var typeSymbol = _compilation.NecessaryTypeSymbolIfPossible(type); 973RelocType rel = (_compilation.NodeFactory.Target.IsWindows) ? 1076_debugInfo = _compilation.GetDebugInfo(methodIL); 1084return _compilation.NodeFactory.ReadyToRunHelperFromTypeLookup(helperId, helperArgument, callerHandle.OwningType); 1088return _compilation.NodeFactory.ReadyToRunHelperFromDictionaryLookup(helperId, helperArgument, callerHandle); 1108|| _compilation.TypeSystemContext.IsGenericArrayInterfaceType(type)) 1182if (elementType.GetElementSize().AsInt == _compilation.TypeSystemContext.Target.PointerSize) 1202_compilation.DetectGenericCycles(methodIL.OwningMethod, method); 1205return _compilation.NodeFactory.MethodEntrypointOrTentativeMethod(method, isUnboxingThunk); 1292_compilation.NodeFactory.MetadataManager.NoteOverridingMethod(method, directMethod); 1380canDevirt = _compilation.IsEffectivelySealed(targetMethod); 1427lookupMethod = _compilation.TypeSystemContext.GetMethodForRuntimeDeterminedType(targetMethod.GetTypicalMethodDefinition(), (RuntimeDeterminedType)runtimeDeterminedConstrainedType); 1429lookupMethod = _compilation.TypeSystemContext.GetMethodForInstantiatedType(targetMethod.GetTypicalMethodDefinition(), (InstantiatedType)runtimeDeterminedConstrainedType); 1478CreateConstLookupToSymbol(_compilation.NodeFactory.FatFunctionPointer(targetMethod)); 1491targetMethod = _compilation.ExpandIntrinsicForCallsite(targetMethod, methodIL.OwningMethod); 1506_compilation.NodeFactory.StringAllocator(targetMethod) 1542instParam = _compilation.NodeFactory.MethodGenericDictionary(concreteMethod); 1547instParam = _compilation.NodeFactory.ConstructedTypeSymbol(concreteMethod.OwningType); 1584if (!_compilation.NeedsRuntimeLookup(constrainedHelperId, constrainedCallInfo)) 1604MethodDesc targetOfLookup = _compilation.GetTargetOfGenericVirtualMethodCall((MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken)); 1606_compilation.DetectGenericCycles( 1641_compilation.NodeFactory.InterfaceDispatchCell(targetMethod 1670pResult->codePointerOrStubLookup.constLookup = CreateConstLookupToSymbol(_compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("NYI_LDVIRTFTN"u8))); 1684_compilation.NodeFactory.ReadyToRunHelper(ReadyToRunHelperId.ResolveVirtualFunction, slotDefiningMethod)); 1714ISymbolNode typeHandleSymbol = _compilation.NecessaryTypeSymbolIfPossible(type); 1820DictionaryLayoutNode contextLayout = _compilation.NodeFactory.GenericDictionaryLayout( 1829helperId = _compilation.GetLdTokenHelperForType(td); 1846RuntimeMethodHandleNode methodHandleSymbol = _compilation.NodeFactory.RuntimeMethodHandle(method); 1864int pointerSize = _compilation.TypeSystemContext.Target.PointerSize; 1870Debug.Assert(!methodDesc.CanMethodBeInSealedVTable(_compilation.NodeFactory)); 1877int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(_compilation.NodeFactory, methodDesc, owningType); 1883if (_compilation.NeedsSlotUseTracking(owningType)) 1884(_additionalDependencies ??= new ILCompiler.DependencyAnalysisFramework.DependencyNodeCore<NodeFactory>.DependencyList()).Add(_compilation.NodeFactory.VirtualMethodUse(methodDesc), "Virtual method call"); 1937Utf8String externName = new Utf8String(_compilation.PInvokeILProvider.GetDirectCallExternName(md)); 1938externName = _compilation.NodeFactory.NameMangler.NodeMangler.ExternMethod(externName, md); 1940pLookup = CreateConstLookupToSymbol(_compilation.NodeFactory.ExternFunctionSymbol(externName)); 1947*ppCookieVal = (IntPtr*)ObjectToHandle(_compilation.NodeFactory.ExternVariable(new Utf8String("__security_cookie"u8))); 1964MethodDesc stub = _compilation.PInvokeILProvider.GetCalliStub( 1980if (_compilation.HasLazyStaticConstructor(owningType) && !((MetadataType)owningType).IsBeforeFieldInit) 2000MethodDesc stub = _compilation.PInvokeILProvider.GetCalliStub( 2013if (_compilation.GetMethodIL(method) is Internal.IL.Stubs.PInvokeILStubMethodIL stub) 2037if (_compilation.TypeSystemContext.Target.Architecture == TargetArchitecture.ARM) 2083return (int*)ObjectToHandle(_compilation.NodeFactory.ExternVariable(new Utf8String("RhpTrapThreads"u8))); 2107fieldOffset += _compilation.NodeFactory.ThreadStaticBaseOffset(mt); 2121ISymbolNode node = _compilation.GetFieldRvaData(field); 2126if (_compilation.HasLazyStaticConstructor(field.OwningType)) 2161helper = _compilation.NodeFactory.ReadyToRunHelperFromTypeLookup( 2167helper = _compilation.NodeFactory.ReadyToRunHelperFromDictionaryLookup( 2193ISortableSymbolNode index = _compilation.NodeFactory.TypeThreadStaticIndex(field.OwningType); 2199if (_compilation.HasLazyStaticConstructor(field.OwningType)) 2210else if (!_compilation.HasLazyStaticConstructor(field.OwningType)) 2217baseAddr = _compilation.NodeFactory.TypeGCStaticsSymbol(field.OwningType); 2222baseAddr = _compilation.NodeFactory.TypeNonGCStaticsSymbol(field.OwningType); 2243_compilation.NodeFactory.ReadyToRunHelper(helperId, field.OwningType)); 2252if (_compilation.IsInitOnly(field)) 2276if (_compilation.TypeSystemContext.IsArrayVariantCastable(type)) 2283return !_compilation.CanReferenceConstructedTypeOrCanonicalFormOfType(type) 2284&& (type == canonType || !_compilation.CanReferenceConstructedMethodTable(canonType)); 2306if (_compilation.IsEffectivelySealed(type)) 2312TypeDesc[] implClasses = _compilation.GetImplementingClasses(type); 2340if (!field.IsThreadStatic && _compilation.IsInitOnly(field) && field.OwningType is MetadataType owningType) 2347PreinitializationManager preinitManager = _compilation.NodeFactory.PreinitializationManager; 2353int targetPtrSize = _compilation.TypeSystemContext.Target.PointerSize; 2369if (value.GetRawData(_compilation.NodeFactory, out object data)) 2418int strDataOffset = _compilation.TypeSystemContext.Target.PointerSize + sizeof(int); // 12 on 64bit 2445return ObjectToHandle(_compilation.NecessaryRuntimeTypeIfPossible(type)); 2471addr.addr = (void*)ObjectToHandle(_compilation.NodeFactory.TypeNonGCStaticsSymbol(type)); 2473offset = -NonGCStaticsNode.GetClassConstructorContextSize(_compilation.NodeFactory.Target); 2483addr.addr = (void*)ObjectToHandle(_compilation.NodeFactory.TypeGCStaticsSymbol(type)); 2488addr.addr = (void*)ObjectToHandle(_compilation.NodeFactory.TypeNonGCStaticsSymbol(type)); 2496pInfo->tlsIndexObject = CreateConstLookupToSymbol(_compilation.NodeFactory.ExternDataSymbol(new Utf8String("_tls_index"u8))); 2497pInfo->tlsRootObject = CreateConstLookupToSymbol(_compilation.NodeFactory.TlsRoot); 2498pInfo->threadStaticBaseSlow = CreateConstLookupToSymbol(_compilation.NodeFactory.HelperEntrypoint(HelperEntrypoint.GetInlinedThreadStaticBaseSlow)); 2499pInfo->tlsGetAddrFtnPtr = CreateConstLookupToSymbol(_compilation.NodeFactory.ExternFunctionSymbol(new Utf8String("__tls_get_addr"u8)));
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (73)
189return _compilation.Logger; 412if (_compilation.TypeSystemContext.Target.Architecture != TargetArchitecture.ARM64 413&& _compilation.TypeSystemContext.Target.Architecture != TargetArchitecture.LoongArch64 414&& _compilation.TypeSystemContext.Target.Architecture != TargetArchitecture.RiscV64) 451_compilation.NodeFactory.Target.MinimumFunctionAlignment : 452_compilation.NodeFactory.Target.OptimumFunctionAlignment; 580CodeBasedDependencyAlgorithm.AddDependenciesDueToMethodCodePresence(ref _additionalDependencies, _compilation.NodeFactory, MethodBeingCompiled, methodIL); 640return _compilation.TypeSystemContext.Target.PointerSize; 998if (_compilation.TypeSystemContext.Target.Architecture == TargetArchitecture.X86) 1108if (_compilation.IsEffectivelySealed(method.GetUnboxedMethod())) 1113if (_compilation.IsEffectivelySealed(method)) 1227method = _compilation.TypeSystemContext.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), (InstantiatedType)type); 1253MethodDesc instantiatedMethod = _compilation.TypeSystemContext.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), instantiatedCtxType); 1256instantiatedMethod = _compilation.TypeSystemContext.GetInstantiatedMethod(instantiatedMethod, method.Instantiation); 1265if (!_compilation.CanInline(MethodBeingCompiled, method)) 1269MethodIL methodIL = method.IsUnboxingThunk() ? null : _compilation.GetMethodIL(method); 1298var calleeIL = _compilation.GetMethodIL(calleeMethod); 1307if (_compilation.CanInline(callerMethod, calleeMethod)) 1331var methodIL = _compilation.GetMethodIL(HandleToObject(ftn)); 1377decl = _compilation.TypeSystemContext.GetMethodForInstantiatedType(decl.GetTypicalMethodDefinition(), (InstantiatedType)ownerTypeDesc); 1381MethodDesc originalImpl = _compilation.ResolveVirtualMethod(decl, objType, out info->detail); 1520MethodILScope scope = jitInterface._compilation.GetMethodIL(methodWithToken.Method); 1580MetadataType placeholderType = _compilation.TypeSystemContext.SystemModule.GetType("System"u8, "SZGenericArrayEnumerator`1"u8, throwIfNotFound: false); 1784result = _compilation.TypeSystemContext.GetAsyncVariantMethod((MethodDesc)result); 1859_compilation.TypeSystemContext.EnsureLoadableMethod(method); 1872_compilation.NodeFactory.MetadataManager.GetDependenciesDueToAccess(ref _additionalDependencies, _compilation.NodeFactory, (MethodIL)methodIL, method); 1878? _compilation.TypeSystemContext.GetAsyncVariantMethod(method) 1909_compilation.TypeSystemContext.EnsureLoadableType(owningClass); 1913_compilation.NodeFactory.MetadataManager.GetDependenciesDueToAccess(ref _additionalDependencies, _compilation.NodeFactory, (MethodIL)methodIL, field); 1940_compilation.TypeSystemContext.EnsureLoadableType(type); 1986if (_compilation.IsFatPointerCandidate(methodIL.OwningMethod, methodSig)) 2015return ObjectToHandle(_compilation.TypeSystemContext.GetWellKnownType(result)); 2183if (_compilation.IsEffectivelySealed(type)) 2762!_compilation.HasLazyStaticConstructor(type) 2862return ObjectToHandle(_compilation.TypeSystemContext.GetWellKnownType(WellKnownType.Object)); 2865return ObjectToHandle(_compilation.TypeSystemContext.GetWellKnownType(WellKnownType.TypedReference)); 2868return ObjectToHandle(_compilation.TypeSystemContext.GetWellKnownType(WellKnownType.RuntimeTypeHandle)); 2871return ObjectToHandle(_compilation.TypeSystemContext.GetWellKnownType(WellKnownType.RuntimeFieldHandle)); 2874return ObjectToHandle(_compilation.TypeSystemContext.GetWellKnownType(WellKnownType.RuntimeMethodHandle)); 2877ThrowHelper.ThrowTypeLoadException("System", "RuntimeArgumentHandle", _compilation.TypeSystemContext.SystemModule); 2881return ObjectToHandle(_compilation.TypeSystemContext.GetWellKnownType(WellKnownType.String)); 2884return ObjectToHandle(_compilation.TypeSystemContext.SystemModule.GetKnownType("System"u8, "RuntimeType"u8)); 3079return _compilation.IsEffectivelySealed(type); 3193return (void*)ObjectToHandle(_compilation.GetFieldRvaData(fd)); 3459if (_compilation.NodeFactory.Target.IsWasm) 3464else if (_compilation.NodeFactory.Target.IsWindows) 3474pEEInfoOut.osType = TargetToOs(_compilation.NodeFactory.Target); 3479DefType continuation = _compilation.TypeSystemContext.ContinuationType; 3485DefType asyncHelpers = _compilation.TypeSystemContext.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "AsyncHelpers"u8); 3511CompilerTypeSystemContext context = _compilation.TypeSystemContext; 3559return ObjectToHandle(_compilation.TypeSystemContext.GetContinuationType(gcMapBuilder.ToGCMap())); 3709HandleToObject(structHnd), _compilation.TypeSystemContext.Target.Architecture); 3990=> (chunk.flags & CorJitAllocMemFlag.CORJIT_ALLOCMEM_HAS_POINTERS_TO_CODE) != 0 && !_compilation.TypeSystemContext.Target.IsWindows; 4129var target = _compilation.TypeSystemContext.Target; 4397switch (_compilation.TypeSystemContext.Target.Architecture) 4414TargetArchitecture arch = _compilation.TypeSystemContext.Target.Architecture; 4481return owningMetadataType.Module == _compilation.TypeSystemContext.SystemModule; 4490flags.InstructionSetFlags.Add(_compilation.InstructionSetSupport.OptimisticFlags); 4500TargetArchitecture targetArchitecture = _compilation.TypeSystemContext.Target.Architecture; 4507Debug.Assert(_compilation.InstructionSetSupport.IsInstructionSetSupported(InstructionSet.X86_X86Base)); 4511Debug.Assert(_compilation.InstructionSetSupport.IsInstructionSetSupported(InstructionSet.ARM64_AdvSimd)); 4515if (targetArchitecture == TargetArchitecture.ARM && !_compilation.TypeSystemContext.Target.IsWindows) 4567|| (_compilation.TypeSystemContext.IsSpecialUnboxingThunk(this.MethodBeingCompiled) && _compilation.TypeSystemContext.GetTargetOfSpecialUnboxingThunk(this.MethodBeingCompiled).IsAsyncCall()) 4568|| (_compilation.TypeSystemContext.IsDefaultInterfaceMethodImplementationInstantiationThunk(this.MethodBeingCompiled) && _compilation.TypeSystemContext.GetTargetOfDefaultInterfaceMethodImplementationInstantiationThunk(this.MethodBeingCompiled).IsAsyncCall()) 4676PgoSchemaElem[] pgoResultsSchemas = _compilation.ProfileData[methodDesc]?.SchemaData; 4687, _compilation.CanReferenceConstructedMethodTable 4782instructionSet = InstructionSetFlags.ConvertToImpliedInstructionSetForVectorInstructionSets(_compilation.TypeSystemContext.Target.Architecture, instructionSet); 4784Debug.Assert(!_compilation.InstructionSetSupport.NonSpecifiableFlags.HasInstructionSet(instructionSet)); 4786return supportEnabled ? _compilation.InstructionSetSupport.IsInstructionSetSupported(instructionSet) : false;