private bool canAccessFamily(IntPtr _this, CORINFO_METHOD_STRUCT_* hCaller, CORINFO_CLASS_STRUCT_* hInstanceType) { throw new NotImplementedException("canAccessFamily"); }
private CorInfoHelpFunc getNewArrHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* arrayCls) { throw new NotImplementedException("getNewArrHelper"); }
private CORINFO_CLASS_STRUCT_* getTypeForBox(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { var type = HandleToObject(cls); var typeForBox = type.IsNullable ? type.Instantiation[0] : type; return ObjectToHandle(typeForBox); }
private uint getClassAlignmentRequirement(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, [MarshalAs(UnmanagedType.Bool)]bool fDoubleAlignHint) { throw new NotImplementedException("getClassAlignmentRequirement"); }
private uint getClassNumInstanceFields(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { TypeDesc type = HandleToObject(cls); uint result = 0; foreach (var field in type.GetFields()) { if (!field.IsStatic) result++; } return result; }
private bool isStructRequiringStackAllocRetBuf(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { // Disable this optimization. It has limited value (only kicks in on x86, and only for less common structs), // causes bugs and introduces odd ABI differences not compatible with ReadyToRun. return false; }
private byte* getClassModuleIdForStatics(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, CORINFO_MODULE_STRUCT_** pModule, void** ppIndirection) { throw new NotImplementedException("getClassModuleIdForStatics"); }
private void getMethodSig(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, CORINFO_SIG_INFO* sig, CORINFO_CLASS_STRUCT_* memberParent) { MethodDesc method = HandleToObject(ftn); Get_CORINFO_SIG_INFO(method.Signature, out *sig); }
private bool isInSIMDModule(IntPtr _this, CORINFO_CLASS_STRUCT_* classHnd) { // TODO: SIMD return false; }
private TypeDesc HandleToObject(CORINFO_CLASS_STRUCT_* type) { return (TypeDesc)HandleToObject((IntPtr)type); }
private CorInfoType asCorInfoType(TypeDesc type, out CORINFO_CLASS_STRUCT_* structType) { var corInfoType = asCorInfoType(type); structType = ((corInfoType == CorInfoType.CORINFO_TYPE_CLASS) || (corInfoType == CorInfoType.CORINFO_TYPE_VALUECLASS) || (corInfoType == CorInfoType.CORINFO_TYPE_BYREF)) ? ObjectToHandle(type) : null; return corInfoType; }
private CORINFO_METHOD_STRUCT_* GetDelegateCtor(IntPtr _this, CORINFO_METHOD_STRUCT_* methHnd, CORINFO_CLASS_STRUCT_* clsHnd, CORINFO_METHOD_STRUCT_* targetMethodHnd, ref DelegateCtorArgs pCtorData) { throw new NotImplementedException("GetDelegateCtor"); }
private uint getClassDomainID(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, ref void* ppIndirection) { throw new NotImplementedException("getClassDomainID"); }
private bool isRIDClassDomainID(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { throw new NotImplementedException("isRIDClassDomainID"); }
private bool canInlineTypeCheckWithObjectVTable(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { throw new NotImplementedException("canInlineTypeCheckWithObjectVTable"); }
private bool satisfiesMethodConstraints(IntPtr _this, CORINFO_CLASS_STRUCT_* parent, CORINFO_METHOD_STRUCT_* method) { throw new NotImplementedException("satisfiesMethodConstraints"); }
private uint getClassAttribs(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { TypeDesc type = HandleToObject(cls); return getClassAttribsInternal(type); }
private bool isCompatibleDelegate(IntPtr _this, CORINFO_CLASS_STRUCT_* objCls, CORINFO_CLASS_STRUCT_* methodParentCls, CORINFO_METHOD_STRUCT_* method, CORINFO_CLASS_STRUCT_* delegateCls, [MarshalAs(UnmanagedType.Bool)] ref bool pfIsOpenDelegate) { throw new NotImplementedException("isCompatibleDelegate"); }
private CORINFO_MODULE_STRUCT_* getClassModule(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { throw new NotImplementedException("getClassModule"); }
private bool isDelegateCreationAllowed(IntPtr _this, CORINFO_CLASS_STRUCT_* delegateHnd, CORINFO_METHOD_STRUCT_* calleeHnd) { return true; }
private uint getClassSize(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { TypeDesc type = HandleToObject(cls); return (uint)type.GetElementSize(); }
private CorInfoType asCorInfoType(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { var type = HandleToObject(cls); return asCorInfoType(type); }
private uint getClassGClayout(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, byte* gcPtrs) { uint result = 0; MetadataType type = (MetadataType)HandleToObject(cls); Debug.Assert(type.IsValueType); int pointerSize = PointerSize; int ptrsCount = AlignmentHelper.AlignUp(type.InstanceByteCount, pointerSize) / pointerSize; // Assume no GC pointers at first for (int i = 0; i < ptrsCount; i++) gcPtrs[i] = (byte)CorInfoGCType.TYPE_GC_NONE; if (type.ContainsPointers) { result = (uint)GatherClassGCLayout(type, gcPtrs); } return result; }
private byte* getClassName(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { var type = HandleToObject(cls); return (byte*)GetPin(StringToUTF8(type.ToString())); }
private CORINFO_FIELD_STRUCT_* getFieldInClass(IntPtr _this, CORINFO_CLASS_STRUCT_* clsHnd, int num) { TypeDesc classWithFields = HandleToObject(clsHnd); int iCurrentFoundField = -1; foreach (var field in classWithFields.GetFields()) { if (field.IsStatic) continue; ++iCurrentFoundField; if (iCurrentFoundField == num) { return ObjectToHandle(field); } } // We could not find the field that was searched for. throw new InvalidOperationException(); }
private int appendClassName(IntPtr _this, short** ppBuf, ref int pnBufLen, CORINFO_CLASS_STRUCT_* cls, [MarshalAs(UnmanagedType.Bool)]bool fNamespace, [MarshalAs(UnmanagedType.Bool)]bool fFullInst, [MarshalAs(UnmanagedType.Bool)]bool fAssembly) { throw new NotImplementedException("appendClassName"); }
private CorInfoHelpFunc getSharedCCtorHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* clsHnd) { throw new NotImplementedException("getSharedCCtorHelper"); }
private bool isValueClass(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { return HandleToObject(cls).IsValueType; }
private CorInfoHelpFunc getUnBoxHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* cls) { var type = HandleToObject(cls); return type.IsNullable ? CorInfoHelpFunc.CORINFO_HELP_UNBOX_NULLABLE : CorInfoHelpFunc.CORINFO_HELP_UNBOX; }
private CORINFO_CLASS_STRUCT_* embedClassHandle(IntPtr _this, CORINFO_CLASS_STRUCT_* handle, ref void* ppIndirection) { throw new NotImplementedException("embedClassHandle"); }