268 references to RuntimeAugments
System.Private.CoreLib (78)
Internal\IntrinsicSupport\ComparerHelpers.cs (4)
59if (RuntimeAugments.IsNullable(t)) 61RuntimeTypeHandle nullableType = RuntimeAugments.GetNullableType(t); 85bool success = RuntimeAugments.TypeLoaderCallbacks.TryGetConstructedGenericTypeForComponents(openComparerType, new RuntimeTypeHandle[] { comparerTypeArgument }, out comparerType); 91return RuntimeAugments.RawNewObject(comparerType);
Internal\IntrinsicSupport\EqualityComparerHelpers.cs (4)
72if (RuntimeAugments.IsNullable(t)) 74RuntimeTypeHandle nullableType = RuntimeAugments.GetNullableType(t); 98bool success = RuntimeAugments.TypeLoaderCallbacks.TryGetConstructedGenericTypeForComponents(openComparerType, new RuntimeTypeHandle[] { comparerTypeArgument }, out comparerType); 104return RuntimeAugments.RawNewObject(comparerType);
Internal\Reflection\Augments\ReflectionAugments.cs (2)
448info = create(RuntimeAugments.GetEnumUnderlyingType(type.TypeHandle), unsortedNames, unsortedValues, isFlags); 509RuntimeAugments.EnsureClassConstructorRun(pStaticClassConstructionContext);
Internal\Reflection\Core\Execution\MethodBaseInvoker.cs (1)
59if (!RuntimeAugments.IsAssignable(thisObject, declaringTypeHandle))
Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs (2)
144foreach (TypeManagerHandle module in RuntimeAugments.GetLoadedModules()) 178foreach (TypeManagerHandle module in RuntimeAugments.GetLoadedModules())
Internal\Runtime\CompilerHelpers\SharedCodeHelpers.cs (1)
31bool success = RuntimeAugments.TypeLoaderCallbacks.TryGetOwningTypeForMethodDictionary(pDictionary, out RuntimeTypeHandle th);
Internal\Runtime\CompilerServices\OpenMethodResolver.cs (1)
70_nonVirtualOpenInvokeCodePointer = RuntimeAugments.TypeLoaderCallbacks.ConvertUnboxingFunctionPointerToUnderlyingNonUnboxingPointer(codePointer, declaringType);
Internal\Runtime\ThreadStatics.cs (1)
137gcDesc = Internal.Runtime.Augments.RuntimeAugments.TypeLoaderCallbacks.GetThreadStaticGCDescForDynamicType(typeManager, typeTlsIndex);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\TypeLoader\ExternalReferencesTable.cs (2)
25if (!RuntimeAugments.FindBlob(typeManager, (int)blobId, (IntPtr)(void*)&pBlob, (IntPtr)(void*)&cbBlob)) 62return RuntimeAugments.CreateRuntimeTypeHandle(GetIntPtrFromIndex(index));
System\ActivatorImplementation.cs (4)
37if (RuntimeAugments.IsNullable(typeHandle)) 40return RuntimeAugments.RawNewObject(typeHandle); 90if (RuntimeAugments.IsNullable(typeHandle)) 93return RuntimeAugments.RawNewObject(typeHandle);
System\Array.NativeAot.cs (4)
73return RuntimeAugments.NewArray(elementType.MakeArrayType().TypeHandle, pLengths[0]); 115return RuntimeAugments.NewArray(arrayTypeHandle, pLengths[0]); 262IntPtr constructorEntryPoint = RuntimeAugments.TypeLoaderCallbacks.TryGetDefaultConstructorForType(new RuntimeTypeHandle(pElementEEType)); 266IntPtr constructorFtn = RuntimeAugments.TypeLoaderCallbacks.ConvertUnboxingFunctionPointerToUnderlyingNonUnboxingPointer(constructorEntryPoint, new RuntimeTypeHandle(pElementEEType));
System\Delegate.cs (6)
312functionPointer = RuntimeAugments.GetCodeTarget(realTargetData->MethodFunctionPointer); 317nint unboxedPointer = RuntimeAugments.GetCodeTarget(ldftnResult); 319unboxedPointer = RuntimeAugments.GetTargetOfUnboxingAndInstantiatingStub(ldftnResult); 323return RuntimeAugments.StackTraceCallbacksIfAvailable?.TryGetDiagnosticMethodInfoFromStartAddress(functionPointer); 393RuntimeAugments.EnsureMethodTableSafeToAllocate(delegateEEType); 417RuntimeAugments.EnsureMethodTableSafeToAllocate(delegateEEType);
System\Diagnostics\DiagnosticMethodInfo.NativeAot.cs (1)
30? RuntimeAugments.StackTraceCallbacksIfAvailable?.TryGetDiagnosticMethodInfoFromStartAddress(startAddress)
System\Diagnostics\StackFrame.NativeAot.cs (2)
122StackTraceMetadataCallbacks stackTraceCallbacks = RuntimeAugments.StackTraceCallbacksIfAvailable; 131string moduleFullFileName = RuntimeAugments.TryGetFullPathToApplicationModule(_ipAddress, out IntPtr moduleBase);
System\Reflection\Runtime\FieldInfos\NativeFormat\NativeFormatRuntimeFieldInfo.cs (1)
131return RuntimeAugments.TypeLoaderCallbacks.GetRuntimeFieldHandleForComponents(
System\Reflection\Runtime\General\MetadataReaderExtensions.NativeFormat.cs (8)
173value = RuntimeAugments.Box(enumType.TypeHandle, (IntPtr)(&v)); 182value = RuntimeAugments.Box(enumType.TypeHandle, (IntPtr)(&v)); 191value = RuntimeAugments.Box(enumType.TypeHandle, (IntPtr)(&v)); 200value = RuntimeAugments.Box(enumType.TypeHandle, (IntPtr)(&v)); 209value = RuntimeAugments.Box(enumType.TypeHandle, (IntPtr)(&v)); 218value = RuntimeAugments.Box(enumType.TypeHandle, (IntPtr)(&v)); 227value = RuntimeAugments.Box(enumType.TypeHandle, (IntPtr)(&v)); 236value = RuntimeAugments.Box(enumType.TypeHandle, (IntPtr)(&v));
System\Reflection\Runtime\MethodInfos\CustomMethodInvoker.cs (1)
46convertedArguments[i] = RuntimeAugments.CheckArgument(arguments[i], _parameterTypes[i].TypeHandle, binderBundle);
System\Reflection\Runtime\MethodInfos\NativeFormat\NativeFormatMethodCommon.cs (1)
204return RuntimeAugments.TypeLoaderCallbacks.GetRuntimeMethodHandleForComponents(
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (1)
420if (RuntimeAugments.IsAssignableFrom(dstType.TypeHandle, srcType.TypeHandle))
System\Reflection\Runtime\TypeInfos\NativeFormat\NativeFormatRuntimeNamedTypeInfo.cs (1)
48return Internal.Runtime.Augments.RuntimeAugments.IsByRefLike(typeHandle);
System\Reflection\Runtime\TypeInfos\RuntimeArrayTypeInfo.cs (5)
81return RuntimeAugments.NewMultiDimArray(arrayType.TypeHandle, lengths, null); 157return RuntimeAugments.NewMultiDimArray(arrayType.TypeHandle, lengths, lowerBounds); 216RuntimeAugments.SetArrayValue(array, indices, value); 299RuntimeTypeHandle projectionTypeHandleForArrays = RuntimeAugments.ProjectionTypeForArrays; 311Array jaggedArray = RuntimeAugments.NewArray(arrayType.TypeHandle, length);
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (6)
86if (RuntimeAugments.TryGetBaseType(typeHandle, out baseTypeHandle)) 200if (RuntimeAugments.IsInterface(typeHandle)) 203if (!RuntimeAugments.IsInterface(interfaceTypeHandle)) 206if (!RuntimeAugments.IsAssignableFrom(interfaceTypeHandle, typeHandle)) 316if (RuntimeAugments.IsAssignableFrom(toTypeHandle, fromTypeHandle)) 803if (RuntimeAugments.TryGetBaseType(typeHandle, out baseTypeHandle))
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (2)
344RuntimeAugments.EnsureMethodTableSafeToAllocate(mt); 379RuntimeAugments.EnsureMethodTableSafeToAllocate(mt);
System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (8)
19private static readonly object s_thunkPoolHeap = RuntimeAugments.CreateThunksHeap(RuntimeImports.GetInteropCommonStubAddress()); 45thunk = RuntimeAugments.AllocateThunk(s_thunkPoolHeap); 46RuntimeAugments.SetThunkData(s_thunkPoolHeap, thunk, (nint)genericContext, result); 50RuntimeAugments.FreeThunk(s_thunkPoolHeap, thunk); 98bool result = RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, value, out nint context, out nint target); 105bool result1 = RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, value1, out nint context1, out nint target1); 108bool result2 = RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, value2, out nint context2, out nint target2); 120bool result = RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, value, out nint context, out nint target);
System\Runtime\InteropServices\PInvokeMarshal.cs (5)
114Thunk = RuntimeAugments.AllocateThunk(s_thunkPoolHeap); 143RuntimeAugments.SetThunkData(s_thunkPoolHeap, Thunk, ContextData, pTarget); 171RuntimeAugments.FreeThunk(s_thunkPoolHeap, Thunk); 183RuntimeAugments.CreateThunksHeap(RuntimeImports.GetInteropCommonStubAddress()), 206if (s_thunkPoolHeap != null && RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, ptr, out pContext, out pTarget))
System\Runtime\InteropServices\TypeMapLazyDictionary.NativeAot.cs (2)
24foreach (TypeManagerHandle module in RuntimeAugments.GetLoadedModules()) 67foreach (TypeManagerHandle module in RuntimeAugments.GetLoadedModules())
System\Runtime\TypeLoaderExports.cs (2)
111=> RuntimeAugments.TypeLoaderCallbacks.ResolveGenericVirtualMethodTarget(new RuntimeTypeHandle((MethodTable*)context), *(RuntimeMethodHandle*)&signature)); 141RuntimeAugments.TypeLoaderCallbacks.GenericLookupFromContextAndSignature(context, signature, out auxResult)
System.Private.Reflection.Execution (91)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (25)
39if (RuntimeAugments.IsGenericType(typeHandle)) 40return RuntimeAugments.GetGenericDefinition(typeHandle); 70Debug.Assert(!RuntimeAugments.IsGenericType(runtimeTypeHandle)); 108if (RuntimeAugments.IsGenericTypeDefinition(elementTypeHandle)) 130if (RuntimeAugments.IsGenericTypeDefinition(elementTypeHandle)) 197if (RuntimeAugments.IsGenericTypeDefinition(genericTypeArgumentHandles[i])) 358if (RuntimeAugments.IsAssignableFrom(dstType, srcType)) 363if (!dstTypeDef.IsNull() && RuntimeAugments.IsGenericType(srcType)) 376if (!RuntimeAugments.TryGetBaseType(srcType, out srcType)) 476canonOriginalLdFtnResult = RuntimeAugments.GetCodeTarget(realTargetData->MethodFunctionPointer); 481canonOriginalLdFtnResult = RuntimeAugments.GetCodeTarget(originalLdFtnResult); 534if (RuntimeAugments.IsGenericType(declaringTypeHandle)) 535declaringTypeHandle = RuntimeAugments.GetGenericDefinition(declaringTypeHandle); 587if (RuntimeAugments.IsValueType(declaringTypeHandle)) 589IntPtr targetAddress = RuntimeAugments.GetCodeTarget(entryMethodEntrypoint); 655RuntimeAugments.GetCodeTarget(entryMethodEntrypoint) == canonOriginalLdFtnResult || 677declaringTypeHandle = RuntimeAugments.CreateRuntimeTypeHandle(instantiationArgument); 734int fieldOffsetDelta = RuntimeAugments.IsValueType(declaringTypeHandle) ? IntPtr.Size : 0; 736return RuntimeAugments.IsValueType(fieldTypeHandle) ? 739(RuntimeAugments.IsUnmanagedPointerType(fieldTypeHandle) || RuntimeAugments.IsFunctionPointerType(fieldTypeHandle)) ? 753if (RuntimeAugments.IsGenericType(declaringTypeHandle)) 784return RuntimeAugments.IsValueType(fieldTypeHandle) ? 786(RuntimeAugments.IsUnmanagedPointerType(fieldTypeHandle) || RuntimeAugments.IsFunctionPointerType(fieldTypeHandle)) ?
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.Runtime.cs (2)
76if (RuntimeAugments.IsGenericType(typeHandle)) 78typeDefHandle = RuntimeAugments.GetGenericDefinition(typeHandle);
Internal\Reflection\Execution\FieldAccessors\InstanceFieldAccessor.cs (9)
21public sealed override int Offset => OffsetPlusHeader - RuntimeAugments.ObjectHeaderSize; 27if (!RuntimeAugments.IsAssignable(obj, this.DeclaringTypeHandle)) 34if (RuntimeAugments.IsValueType(this.DeclaringTypeHandle)) 58if (!RuntimeAugments.IsAssignable(obj, this.DeclaringTypeHandle)) 60value = RuntimeAugments.CheckArgument(value, this.FieldTypeHandle, binderBundle); 66if (RuntimeAugments.IsValueType(this.DeclaringTypeHandle)) 74value = RuntimeAugments.CheckArgumentForDirectFieldAccess(value, this.FieldTypeHandle); 84if (!RuntimeAugments.IsAssignable(obj, this.DeclaringTypeHandle)) 86value = RuntimeAugments.CheckArgumentForDirectFieldAccess(value, this.FieldTypeHandle);
Internal\Reflection\Execution\FieldAccessors\PointerTypeFieldAccessorForInstanceFields.cs (4)
20return RuntimeAugments.LoadPointerTypeField(obj, OffsetPlusHeader, this.FieldTypeHandle); 25return RuntimeAugments.LoadPointerTypeFieldValueFromValueType(typedReference, this.Offset, this.FieldTypeHandle); 31RuntimeAugments.StoreValueTypeField(obj, OffsetPlusHeader, value, value.GetType().TypeHandle); 37RuntimeAugments.StoreValueTypeFieldValueIntoValueType(typedReference, this.Offset, value, value.GetType().TypeHandle);
Internal\Reflection\Execution\FieldAccessors\PointerTypeFieldAccessorForStaticFields.cs (10)
24object gcStaticsRegion = RuntimeAugments.LoadReferenceTypeField(StaticsBase); 25return RuntimeAugments.LoadPointerTypeField(gcStaticsRegion, FieldOffset, FieldTypeHandle); 29return RuntimeAugments.LoadPointerTypeField(StaticsBase + FieldOffset, FieldTypeHandle); 33object threadStaticRegion = RuntimeAugments.GetThreadStaticBase(StaticsBase); 34return RuntimeAugments.LoadPointerTypeField(threadStaticRegion, FieldOffset, FieldTypeHandle); 43object gcStaticsRegion = RuntimeAugments.LoadReferenceTypeField(StaticsBase); 44RuntimeAugments.StoreValueTypeField(gcStaticsRegion, FieldOffset, value, value.GetType().TypeHandle); 48RuntimeAugments.StoreValueTypeField(StaticsBase + FieldOffset, value, value.GetType().TypeHandle); 53object threadStaticsRegion = RuntimeAugments.GetThreadStaticBase(StaticsBase); 54RuntimeAugments.StoreValueTypeField(threadStaticsRegion, FieldOffset, value, value.GetType().TypeHandle);
Internal\Reflection\Execution\FieldAccessors\ReferenceTypeFieldAccessorForInstanceFields.cs (4)
19return RuntimeAugments.LoadReferenceTypeField(obj, OffsetPlusHeader); 24return RuntimeAugments.LoadReferenceTypeFieldValueFromValueType(typedReference, this.Offset); 29RuntimeAugments.StoreReferenceTypeField(obj, OffsetPlusHeader, value); 34RuntimeAugments.StoreReferenceTypeFieldValueIntoValueType(typedReference, this.Offset, value);
Internal\Reflection\Execution\FieldAccessors\ReferenceTypeFieldAccessorForStaticFields.cs (10)
24object gcStaticsRegion = RuntimeAugments.LoadReferenceTypeField(StaticsBase); 25return RuntimeAugments.LoadReferenceTypeField(gcStaticsRegion, FieldOffset); 29return RuntimeAugments.LoadReferenceTypeField(StaticsBase + FieldOffset); 33object threadStaticRegion = RuntimeAugments.GetThreadStaticBase(StaticsBase); 34return RuntimeAugments.LoadReferenceTypeField(threadStaticRegion, FieldOffset); 41object gcStaticsRegion = RuntimeAugments.LoadReferenceTypeField(StaticsBase); 42RuntimeAugments.StoreReferenceTypeField(gcStaticsRegion, FieldOffset, value); 47RuntimeAugments.StoreReferenceTypeField(StaticsBase + FieldOffset, value); 52object threadStaticsRegion = RuntimeAugments.GetThreadStaticBase(StaticsBase); 53RuntimeAugments.StoreReferenceTypeField(threadStaticsRegion, FieldOffset, value);
Internal\Reflection\Execution\FieldAccessors\StaticFieldAccessor.cs (3)
29RuntimeAugments.EnsureClassConstructorRun(_cctorContext); 41RuntimeAugments.EnsureClassConstructorRun(_cctorContext); 52RuntimeAugments.EnsureClassConstructorRun(_cctorContext);
Internal\Reflection\Execution\FieldAccessors\ValueTypeFieldAccessorForInstanceFields.cs (4)
19return RuntimeAugments.LoadValueTypeField(obj, OffsetPlusHeader, this.FieldTypeHandle); 24return RuntimeAugments.LoadValueTypeFieldValueFromValueType(typedReference, this.Offset, this.FieldTypeHandle); 29RuntimeAugments.StoreValueTypeField(obj, OffsetPlusHeader, value, this.FieldTypeHandle); 34RuntimeAugments.StoreValueTypeFieldValueIntoValueType(typedReference, this.Offset, value, this.FieldTypeHandle);
Internal\Reflection\Execution\FieldAccessors\ValueTypeFieldAccessorForStaticFields.cs (10)
24object gcStaticsRegion = RuntimeAugments.LoadReferenceTypeField(StaticsBase); 25return RuntimeAugments.LoadValueTypeField(gcStaticsRegion, FieldOffset, FieldTypeHandle); 29return RuntimeAugments.LoadValueTypeField(StaticsBase + FieldOffset, FieldTypeHandle); 33object threadStaticRegion = RuntimeAugments.GetThreadStaticBase(StaticsBase); 34return RuntimeAugments.LoadValueTypeField(threadStaticRegion, FieldOffset, FieldTypeHandle); 41object gcStaticsRegion = RuntimeAugments.LoadReferenceTypeField(StaticsBase); 42RuntimeAugments.StoreValueTypeField(gcStaticsRegion, FieldOffset, value, FieldTypeHandle); 46RuntimeAugments.StoreValueTypeField(StaticsBase + FieldOffset, value, FieldTypeHandle); 51object threadStaticsRegion = RuntimeAugments.GetThreadStaticBase(StaticsBase); 52RuntimeAugments.StoreValueTypeField(threadStaticsRegion, FieldOffset, value, FieldTypeHandle);
Internal\Reflection\Execution\FieldAccessors\WritableStaticFieldAccessor.cs (2)
24value = RuntimeAugments.CheckArgument(value, FieldTypeHandle, binderBundle); 36value = RuntimeAugments.CheckArgumentForDirectFieldAccess(value, FieldTypeHandle);
Internal\Reflection\Execution\MethodInvokers\InstanceMethodInvoker.cs (3)
27if (RuntimeAugments.IsByRefLike(declaringTypeHandle)) 33_allocatorMethod = (delegate*<nint, object>)RuntimeAugments.GetAllocateObjectHelperForType(declaringTypeHandle); 135return RuntimeAugments.CreateDelegate(
Internal\Reflection\Execution\MethodInvokers\MethodInvokerWithMethodInvokeInfo.cs (1)
23return RuntimeAugments.CreateDelegate(
Internal\Reflection\Execution\MethodInvokers\VirtualMethodInvoker.cs (3)
29return RuntimeAugments.CreateDelegate( 39return RuntimeAugments.CreateDelegate( 141if (RuntimeAugments.IsInterface(_declaringTypeHandle))
Internal\Reflection\Extensions\NonPortable\DelegateMethodInfoRetriever.cs (1)
20IntPtr originalLdFtnResult = RuntimeAugments.GetDelegateLdFtnResult(del, out RuntimeTypeHandle typeOfFirstParameterIfInstanceDelegate, out bool isOpenResolver);
System.Private.StackTraceMetadata (3)
Internal\StackTraceMetadata\StackTraceMetadata.cs (3)
43RuntimeAugments.InitializeStackTraceMetadataSupport(new StackTraceMetadataCallbacksImpl()); 55IntPtr moduleStartAddress = RuntimeAugments.GetOSModuleFromPointer(methodStartAddress); 188IntPtr moduleStartAddress = RuntimeAugments.GetOSModuleFromPointer(methodStartAddress);
System.Private.TypeLoader (96)
Internal\Runtime\TypeLoader\CanonicallyEquivalentEntryLocator.cs (4)
23if (RuntimeAugments.IsGenericType(typeToFind)) 25_genericDefinition = RuntimeAugments.GetGenericInstantiation(typeToFind, out _genericArgs); 71if (RuntimeAugments.IsGenericType(other)) 75otherGenericDefinition = RuntimeAugments.GetGenericInstantiation(other, out otherGenericArgs);
Internal\Runtime\TypeLoader\EETypeCreator.cs (4)
342object obj = RuntimeAugments.RawNewObject(((MethodTable*)state.GcStaticDesc)->ToRuntimeTypeHandle()); 343gcStaticData = RuntimeAugments.RhHandleAlloc(obj, GCHandleType.Normal); 361RuntimeAugments.RhHandleFree(gcStaticData); 444return RuntimeAugments.GetGCDescSize(pTemplateEEType->ToRuntimeTypeHandle());
Internal\Runtime\TypeLoader\GenericDictionaryCell.cs (7)
37if (RuntimeAugments.IsNullable(th)) 102return RuntimeAugments.NewInterfaceDispatchCell(builder.GetRuntimeTypeHandle(InterfaceType), Slot); 126IntPtr result = RuntimeAugments.ResolveStaticDispatchOnType( 163IntPtr result = RuntimeAugments.ResolveDispatchOnType( 353return RuntimeAugments.GetAllocateObjectHelperForType(th); 360return RuntimeAugments.GetAllocateObjectHelperForType(th); 387result = RuntimeAugments.GetFallbackDefaultConstructor();
Internal\Runtime\TypeLoader\ModuleList.cs (5)
62return RuntimeAugments.FindBlob(Handle, (int)blobId, new IntPtr(ppBlob), new IntPtr(pcbBlob)); 75return RuntimeAugments.FindBlob(Handle, (int)blobId, new IntPtr(ppBlob), new IntPtr(pcbBlob)); 255int loadedModuleCount = RuntimeAugments.GetLoadedModules(null); 257int loadedModuleCountUpdated = RuntimeAugments.GetLoadedModules(loadedModuleHandles); 271if (RuntimeAugments.FindBlob(loadedModuleHandles[newModuleIndex], (int)ReflectionMapBlob.EmbeddedMetadata, new IntPtr(&pBlob), new IntPtr(&cbBlob)))
Internal\Runtime\TypeLoader\NativeLayoutInterfacesAlgorithm.cs (1)
21int totalInterfaces = RuntimeAugments.GetInterfaceCount(state.TemplateType.RuntimeTypeHandle);
Internal\Runtime\TypeLoader\NoMetadataRuntimeInterfacesAlgorithm.cs (2)
18int numInterfaces = RuntimeAugments.GetInterfaceCount(type.RuntimeTypeHandle); 22RuntimeTypeHandle itfHandle = RuntimeAugments.GetInterface(type.RuntimeTypeHandle, i);
Internal\Runtime\TypeLoader\TypeBuilder.cs (2)
1045if (RuntimeAugments.IsGenericType(declaringTypeHandle)) 1055TypeDesc typeContext = typeSystemContext.ResolveRuntimeTypeHandle(RuntimeAugments.CreateRuntimeTypeHandle(context));
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.ConstructedGenericTypesLookup.cs (3)
122RuntimeTypeHandle parsedTypeDefinitionHandle = RuntimeAugments.GetGenericDefinition(tentativeType); 130RuntimeTypeHandle parsedArg = RuntimeAugments.GetGenericArgument(tentativeType, i); 270Debug.Assert(RuntimeAugments.IsGenericType(runtimeTypeHandle));
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.cs (12)
117RuntimeAugments.InitializeLookups(new Callbacks()); 201if (RuntimeAugments.FindBlob(moduleHandle, (int)ReflectionMapBlob.NativeLayoutInfo, new IntPtr(&pBlob), new IntPtr(&cbBlob))) 246if (!RuntimeAugments.IsDynamicType(returnTypeHandle) 259if (RuntimeAugments.IsDynamicType(h)) 300if (!RuntimeAugments.IsDynamicType(elementTypeHandle) && 329if (!RuntimeAugments.IsDynamicType(pointeeTypeHandle) && 358if (!RuntimeAugments.IsDynamicType(pointeeTypeHandle) && 452targetMethod = RuntimeAugments.GetTargetOfUnboxingAndInstantiatingStub(maybeInstantiatingAndUnboxingStub); 464IntPtr nonUnboxingTarget = RuntimeAugments.GetCodeTarget(functionPointerDescriptor->MethodFunctionPointer); 466Debug.Assert(nonUnboxingTarget == RuntimeAugments.GetCodeTarget(nonUnboxingTarget)); 473IntPtr exactTarget = RuntimeAugments.GetCodeTarget(unboxingFunctionPointer); 474if (RuntimeAugments.IsGenericType(declaringType))
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.FieldAccess.cs (1)
60foreach (NativeFormatModuleInfo mappingTableModule in ModuleList.EnumerateModules(RuntimeAugments.GetModuleFromTypeHandle(declaringTypeHandle)))
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.GVMResolution.cs (6)
157if (RuntimeAugments.IsGenericType(typeHandle)) 158return RuntimeAugments.GetGenericDefinition(typeHandle); 187isDefaultInterfaceMethodImplementation = RuntimeAugments.IsInterface(targetTypeHandle); 257if (!RuntimeAugments.IsGenericTypeDefinition(targetTypeHandle)) 341foreach (NativeFormatModuleInfo module in ModuleList.EnumerateModules(RuntimeAugments.GetModuleFromTypeHandle(openTargetTypeHandle))) 470foreach (NativeFormatModuleInfo module in ModuleList.EnumerateModules(RuntimeAugments.GetModuleFromTypeHandle(openTargetTypeHandle)))
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.LdTokenResultLookup.cs (2)
198MetadataReader reader = ModuleList.Instance.GetMetadataReaderForModule(RuntimeAugments.GetModuleFromTypeHandle(declaringTypeHandle)); 217MetadataReader reader = ModuleList.Instance.GetMetadataReaderForModule(RuntimeAugments.GetModuleFromTypeHandle(declaringTypeHandle));
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.Metadata.cs (14)
108foreach (NativeFormatModuleInfo module in ModuleList.EnumerateModules(RuntimeAugments.GetModuleFromTypeHandle(runtimeTypeHandle))) 226RuntimeTypeHandle foundArrayElementType = RuntimeAugments.GetRelatedParameterTypeHandle(foundArrayType); 228&& rank == RuntimeAugments.GetArrayRankOrMinusOneForSzArray(foundArrayType)) 270RuntimeTypeHandle foundElementType = RuntimeAugments.GetRelatedParameterTypeHandle(foundParameterizedType); 305if (RuntimeAugments.GetFunctionPointerParameterCount(foundTypeHandle) != parameterHandles.Length) 308if (!RuntimeAugments.GetFunctionPointerReturnType(foundTypeHandle).Equals(returnTypeHandle)) 311if (RuntimeAugments.IsUnmanagedFunctionPointerType(foundTypeHandle) != isUnmanaged) 315if (!parameterHandles[i].Equals(RuntimeAugments.GetFunctionPointerParameterType(foundTypeHandle, i))) 334if (RuntimeAugments.IsDynamicType(typeHandle)) 353var moduleHandle = RuntimeAugments.GetModuleFromTypeHandle(typeHandle); 441foreach (NativeFormatModuleInfo module in ModuleList.EnumerateModules(RuntimeAugments.GetModuleFromTypeHandle(runtimeTypeHandle))) 554if (!RuntimeAugments.TryGetBaseType(declaringTypeOfVirtualInvoke, out declaringTypeOfVirtualInvoke)) 646foreach (NativeFormatModuleInfo module in ModuleList.EnumerateModules(RuntimeAugments.GetModuleFromTypeHandle(declaringTypeHandle))) 719dictionary = RuntimeAugments.GetPointerFromTypeHandle(_declaringTypeHandle);
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.StaticsLookup.cs (2)
156result = (uint)RuntimeAugments.GetHighestStaticThreadStaticIndex(typeManagerHandle); 227TypeManagerHandle moduleHandle = RuntimeAugments.GetModuleFromTypeHandle(instantiatedType);
Internal\TypeSystem\CanonTypes.Runtime.cs (1)
18SetRuntimeTypeHandleUnsafe(RuntimeAugments.GetCanonType());
Internal\TypeSystem\RuntimeNoMetadataType.cs (1)
117if (!RuntimeAugments.TryGetBaseType(RuntimeTypeHandle, out baseTypeHandle))
Internal\TypeSystem\ThrowHelper.cs (9)
4using CoreLibThrow = Internal.Runtime.Augments.RuntimeAugments; 14CoreLibThrow.ThrowTypeLoadExceptionWithArgument(id, typeName, assemblyName, messageArg); 19CoreLibThrow.ThrowTypeLoadException(id, typeName, assemblyName); 24CoreLibThrow.ThrowMissingMethodException(ExceptionStringID.MissingMethod, Format.Method(owningType, methodName, signature)); 29CoreLibThrow.ThrowMissingFieldException(ExceptionStringID.MissingField, Format.Field(owningType, fieldName)); 34CoreLibThrow.ThrowFileNotFoundException(id, fileName); 39CoreLibThrow.ThrowInvalidProgramException(ExceptionStringID.InvalidProgramDefault); 44CoreLibThrow.ThrowInvalidProgramExceptionWithArgument(id, Format.Method(method)); 49CoreLibThrow.ThrowBadImageFormatException(ExceptionStringID.BadImageFormatGeneric);
Internal\TypeSystem\TypeSystemContext.Runtime.cs (18)
86if (key.IsUnmanaged != RuntimeAugments.IsUnmanagedFunctionPointerType(value) 87|| key.ParameterTypes.Length != RuntimeAugments.GetFunctionPointerParameterCount(value) 88|| !key.ReturnType.Equals(RuntimeAugments.GetFunctionPointerReturnType(value))) 92if (!key.ParameterTypes[i].Equals(RuntimeAugments.GetFunctionPointerParameterType(value, i))) 191else if (RuntimeAugments.IsGenericTypeDefinition(rtth)) 203else if (RuntimeAugments.IsGenericType(rtth)) 207typeDefRuntimeTypeHandle = RuntimeAugments.GetGenericInstantiation(rtth, out genericArgRuntimeTypeHandles); 213else if (RuntimeAugments.IsArrayType(rtth)) 215RuntimeTypeHandle elementTypeHandle = RuntimeAugments.GetRelatedParameterTypeHandle(rtth); 225else if (RuntimeAugments.IsUnmanagedPointerType(rtth)) 227RuntimeTypeHandle targetTypeHandle = RuntimeAugments.GetRelatedParameterTypeHandle(rtth); 231else if (RuntimeAugments.IsFunctionPointerType(rtth)) 233RuntimeTypeHandle returnTypeHandle = RuntimeAugments.GetFunctionPointerReturnType(rtth); 234RuntimeTypeHandle[] parameterHandles = RuntimeAugments.GetFunctionPointerParameterTypes(rtth); 235bool isUnmanaged = RuntimeAugments.IsUnmanagedFunctionPointerType(rtth); 245else if (RuntimeAugments.IsByRefType(rtth)) 247RuntimeTypeHandle targetTypeHandle = RuntimeAugments.GetRelatedParameterTypeHandle(rtth); 474Debug.Assert(RuntimeAugments.IsGenericTypeDefinition(nmTypeDef.RuntimeTypeHandle));
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\TypeLoader\ExternalReferencesTable.cs (2)
25if (!RuntimeAugments.FindBlob(typeManager, (int)blobId, (IntPtr)(void*)&pBlob, (IntPtr)(void*)&cbBlob)) 62return RuntimeAugments.CreateRuntimeTypeHandle(GetIntPtrFromIndex(index));