Internal\Runtime\Augments\RuntimeAugments.cs (24)
71return RuntimeImports.RhNewObject(typeHandle.ToMethodTable());
85Debug.Assert(!mt->ContainsGCPointers || RuntimeImports.RhGetGCDescSize(mt) != 0);
100return RuntimeImports.RhNewArray(mt, count);
158RuntimeImports.RhUnbox(value, ref element, elementMT);
162RuntimeImports.RhCheckArrayStore(array, value);
171return RuntimeImports.RhGetNewObjectHelper(type.ToMethodTable());
209return RuntimeImports.RhGetOSModuleFromPointer(pointerVal);
214return RuntimeImports.RhFindBlob(typeManager, (uint)blobId, (byte**)ppbBlob, (uint*)pcbBlob);
234RuntimeImports.RhUnbox(fieldValue, ref *(byte*)address, fieldType.ToMethodTable());
253RuntimeImports.RhUnbox(fieldValue, ref address, fieldType.ToMethodTable());
299RuntimeImports.RhUnbox(fieldValue, ref Unsafe.Add<byte>(ref typedReference.Value, fieldOffset), fieldTypeHandle.ToMethodTable());
346RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.ThreadStaticRegion, out int length);
441return RuntimeImports.AreTypesAssignable(srcEEType, dstEEType);
464return RuntimeImports.RhGetGCDescSize(typeHandle.ToMethodTable());
479IntPtr cell = RuntimeImports.RhNewInterfaceDispatchCell(interfaceTypeHandle.ToMethodTable(), slotNumber);
542IntPtr result = RuntimeImports.RhResolveStaticDispatchOnType(instanceType.ToMethodTable(), interfaceType.ToMethodTable(), checked((ushort)slot), &genericContextPtr);
552return RuntimeImports.RhResolveDispatchOnType(instanceType.ToMethodTable(), interfaceType.ToMethodTable(), checked((ushort)slot));
627return RuntimeImports.AreTypesAssignable(srcEEType, dstType.ToMethodTable());
651moduleBase = RuntimeImports.RhGetOSModuleFromPointer(ip);
659int numUtf8Chars = RuntimeImports.RhGetModuleFileName(ip, out pModuleNameUtf8);
672return RuntimeImports.RhGetCodeTarget(functionPointer);
677return RuntimeImports.RhGetTargetOfUnboxingAndInstantiatingStub(functionPointer);
731return RuntimeImports.RhHandleAlloc(value, type);
736RuntimeImports.RhHandleFree(handle);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\CompilerHelpers\StartupCodeHelpers.cs (11)
33RuntimeImports.RhpRegisterOsModule(osModule);
42s_moduleGCStaticsSpines = RuntimeImports.RhHandleAlloc(gcStaticBaseSpines, GCHandleType.Normal);
95TypeManagerHandle handle = RuntimeImports.RhpCreateTypeManager(osModule, pModuleHeaders[i], pClasslibFunctions, nClasslibFunctions);
98IntPtr dehydratedDataSection = RuntimeImports.RhGetModuleSection(
127TypeManagerSlot* section = (TypeManagerSlot*)RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.TypeManagerIndirection, out length);
132IntPtr staticsSection = RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.GCStaticRegion, out length);
146IntPtr frozenObjectSection = RuntimeImports.RhGetModuleSection(typeManager, ReadyToRunSectionType.FrozenObjectRegion, out length);
156if (RuntimeImports.RhRegisterFrozenSegment((void*)segmentStart, (nuint)length, (nuint)length, (nuint)length) == IntPtr.Zero)
173var pInitializers = (byte*)RuntimeImports.RhGetModuleSection(typeManager, section, out int length);
210RuntimeImports.RhAllocateNewObject(
227RuntimeImports.RhBulkMoveWithWriteBarrier(ref obj.GetRawData(), ref *(byte*)pPreInitDataAddr, obj.GetRawObjectDataSize());
System\Array.NativeAot.cs (12)
162Array ret = RuntimeImports.RhNewVariableSizeObject(eeType, (int)totalLength);
220Array ret = RuntimeImports.RhNewArray(pEEType, pDimensions[0]);
252return RuntimeImports.RhNewArray(elementType.MakeArrayType().TypeHandle.ToMethodTable(), pDimensions[0]);
304if (RuntimeImports.AreTypesAssignable(sourceElementEEType, destinationElementEEType))
313if (RuntimeImports.AreTypesAssignable(sourceElementEEType, destinationElementEEType))
322if (RuntimeImports.AreTypesAssignable(sourceElementEEType, destinationElementEEType))
324else if (RuntimeImports.AreTypesAssignable(destinationElementEEType, sourceElementEEType)) // V extends IV. Copying from IV to V, or Object to V.
353if (RuntimeImports.AreTypesAssignable(sourceElementEEType, destinationElementEEType))
357if (RuntimeImports.AreTypesAssignable(destinationElementEEType, sourceElementEEType))
414Debug.Assert(value == null || RuntimeImports.AreTypesAssignable(value.GetMethodTable(), pElementEEType));
416RuntimeImports.RhUnbox(value, ref element, pElementEEType);
426RuntimeImports.RhCheckArrayStore(this, value);
System\GC.NativeAot.cs (47)
86return RuntimeImports.RhGetGeneration(obj);
91return RuntimeImports.RhGetGenerationSize(gen);
96return RuntimeImports.RhGetLastGCPercentTimeInGC();
112object? obj = RuntimeImports.RhHandleGet(wo.WeakHandle);
117return RuntimeImports.RhGetGeneration(obj);
130RuntimeImports.RhCollect(-1, InternalGCCollectionMode.Blocking);
195RuntimeImports.RhCollect(generation, (InternalGCCollectionMode)iInternalModes, lowMemoryPressure ? Interop.BOOL.TRUE : Interop.BOOL.FALSE);
226if (!RuntimeImports.RhRegisterForFullGCNotification(maxGenerationThreshold, largeObjectHeapThreshold))
239return (GCNotificationStatus)RuntimeImports.RhWaitForFullGCApproach(-1);
252return (GCNotificationStatus)RuntimeImports.RhWaitForFullGCApproach(millisecondsTimeout);
262return (GCNotificationStatus)RuntimeImports.RhWaitForFullGCComplete(-1);
275return (GCNotificationStatus)RuntimeImports.RhWaitForFullGCComplete(millisecondsTimeout);
285if (!RuntimeImports.RhCancelFullGCNotification())
329EnableNoGCRegionCallbackStatus status = (EnableNoGCRegionCallbackStatus)RuntimeImports.RhEnableNoGCRegionCallback(pWorkItem, totalSize);
430(StartNoGCRegionStatus)RuntimeImports.RhStartNoGCRegion(
458EndNoGCRegionStatus status = (EndNoGCRegionStatus)RuntimeImports.RhEndNoGCRegion();
479RuntimeImports.RhWaitForPendingFinalizers(Thread.ReentrantWaitsEnabled);
486RuntimeImports.RhSuppressFinalize(obj);
493RuntimeImports.RhReRegisterForFinalize(obj);
506get { return RuntimeImports.RhGetMaxGcGeneration(); }
513return RuntimeImports.RhGetGcCollectionCount(generation, false);
630long heapOver3 = RuntimeImports.RhGetCurrentObjSize() / 3;
640if ((RuntimeImports.RhGetGCNow() - RuntimeImports.RhGetLastGCStartTime(2)) > (RuntimeImports.RhGetLastGCDuration(2) * 5))
642RuntimeImports.RhCollect(2, InternalGCCollectionMode.NonBlocking);
656private static unsafe void ConfigCallback(void* configurationContext, byte* name, byte* publicKey, RuntimeImports.GCConfigurationType type, long data)
675case RuntimeImports.GCConfigurationType.Int64:
679case RuntimeImports.GCConfigurationType.StringUtf8:
686case RuntimeImports.GCConfigurationType.Boolean:
704RuntimeImports.RhEnumerateConfigurationValues(&context, &ConfigCallback);
722long size = RuntimeImports.RhGetGcTotalMemory();
740long newSize = RuntimeImports.RhGetGcTotalMemory();
752return RuntimeImports.RhRegisterFrozenSegment((void*)sectionAddress, (nuint)sectionSize, (nuint)sectionSize, (nuint)sectionSize);
757RuntimeImports.RhUnregisterFrozenSegment(segmentHandle);
762return RuntimeImports.RhGetAllocatedBytesForCurrentThread();
767return precise ? RuntimeImports.RhGetTotalAllocatedBytesPrecise() : RuntimeImports.RhGetTotalAllocatedBytes();
794RuntimeImports.RhGetMemoryInfo(ref data.GetRawData(), kind);
800return RuntimeImports.RhGetGCSegmentSize();
842RuntimeImports.RhAllocateNewArray(MethodTable.Of<T[]>(), (uint)length, (uint)flags, &array);
869RuntimeImports.RhAllocateNewArray(MethodTable.Of<T[]>(), (uint)length, (uint)flags, &array);
878return new TimeSpan(RuntimeImports.RhGetTotalPauseDuration());
891RuntimeImports.GCHeapHardLimitInfo heapHardLimitInfo = new RuntimeImports.GCHeapHardLimitInfo
902RefreshMemoryStatus status = (RefreshMemoryStatus)RuntimeImports.RhRefreshMemoryLimit(heapHardLimitInfo);
915return RuntimeImports.RhGetGenerationBudget(generation);