private HRESULT getBBProfileData(IntPtr _this, CORINFO_METHOD_STRUCT_* ftnHnd, ref uint count, ref ProfileBuffer* profileBuffer, ref uint numRuns) { throw new NotImplementedException("getBBProfileData"); }
private bool checkMethodModifier(IntPtr _this, CORINFO_METHOD_STRUCT_* hMethod, byte* modifier, [MarshalAs(UnmanagedType.Bool)]bool fOptional) { throw new NotImplementedException("checkMethodModifier"); }
private CorInfoHelpFunc getSecurityPrologHelper(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn) { throw new NotImplementedException("getSecurityPrologHelper"); }
private void initConstraintsForVerification(IntPtr _this, CORINFO_METHOD_STRUCT_* method, [MarshalAs(UnmanagedType.Bool)] ref bool pfHasCircularClassConstraints, [MarshalAs(UnmanagedType.Bool)] ref bool pfHasCircularMethodConstraint) { throw new NotImplementedException("isInstantiationOfVerifiedGeneric"); }
private void methodMustBeLoadedBeforeCodeIsRun(IntPtr _this, CORINFO_METHOD_STRUCT_* method) { }
private bool satisfiesMethodConstraints(IntPtr _this, CORINFO_CLASS_STRUCT_* parent, CORINFO_METHOD_STRUCT_* method) { throw new NotImplementedException("satisfiesMethodConstraints"); }
private bool isDelegateCreationAllowed(IntPtr _this, CORINFO_CLASS_STRUCT_* delegateHnd, CORINFO_METHOD_STRUCT_* calleeHnd) { return true; }
private CorInfoInline canInline(IntPtr _this, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd, ref uint pRestrictions) { // TODO: Inlining return CorInfoInline.INLINE_NEVER; }
private void reportInliningDecision(IntPtr _this, CORINFO_METHOD_STRUCT_* inlinerHnd, CORINFO_METHOD_STRUCT_* inlineeHnd, CorInfoInline inlineResult, byte* reason) { }
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 getMethodInfo(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref CORINFO_METHOD_INFO info) { return Get_CORINFO_METHOD_INFO(HandleToObject(ftn), out info); }
private void setMethodAttribs(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, CorInfoMethodRuntimeFlags attribs) { // TODO: Inlining }
private uint getMethodAttribs(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn) { return getMethodAttribsInternal(HandleToObject(ftn)); }
private void recordCallSite(IntPtr _this, uint instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_STRUCT_* methodHandle) { }
private CorInfoUnmanagedCallConv getUnmanagedCallConv(IntPtr _this, CORINFO_METHOD_STRUCT_* method) { throw new NotImplementedException("getUnmanagedCallConv"); }
private bool canTailCall(IntPtr _this, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* declaredCalleeHnd, CORINFO_METHOD_STRUCT_* exactCalleeHnd, [MarshalAs(UnmanagedType.I1)]bool fIsTailPrefix) { // No restrictions on tailcalls return true; }
private bool pInvokeMarshalingRequired(IntPtr _this, CORINFO_METHOD_STRUCT_* method, CORINFO_SIG_INFO* callSiteSig) { throw new NotImplementedException("pInvokeMarshalingRequired"); }
private void reportTailCallDecision(IntPtr _this, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd, [MarshalAs(UnmanagedType.I1)]bool fIsTailPrefix, CorInfoTailCall tailCallResult, byte* reason) { }
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 void getEHinfo(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, uint EHnumber, ref CORINFO_EH_CLAUSE clause) { var methodIL = _compilation.GetMethodIL(HandleToObject(ftn)); var ehRegion = methodIL.GetExceptionRegions()[EHnumber]; clause.Flags = (CORINFO_EH_CLAUSE_FLAGS)ehRegion.Kind; clause.TryOffset = (uint)ehRegion.TryOffset; clause.TryLength = (uint)ehRegion.TryLength; clause.HandlerOffset = (uint)ehRegion.HandlerOffset; clause.HandlerLength = (uint)ehRegion.HandlerLength; clause.ClassTokenOrOffset = (uint)((ehRegion.Kind == ILExceptionRegionKind.Filter) ? ehRegion.FilterOffset : ehRegion.ClassToken); }
private CorInfoInstantiationVerification isInstantiationOfVerifiedGeneric(IntPtr _this, CORINFO_METHOD_STRUCT_* method) { throw new NotImplementedException("isInstantiationOfVerifiedGeneric"); }
private CORINFO_CLASS_STRUCT_* getMethodClass(IntPtr _this, CORINFO_METHOD_STRUCT_* method) { var m = HandleToObject(method); return ObjectToHandle(m.OwningType); }
private CorInfoCanSkipVerificationResult canSkipMethodVerification(IntPtr _this, CORINFO_METHOD_STRUCT_* ftnHandle) { throw new NotImplementedException("canSkipMethodVerification"); }
private CORINFO_MODULE_STRUCT_* getMethodModule(IntPtr _this, CORINFO_METHOD_STRUCT_* method) { throw new NotImplementedException("getMethodModule"); }
private CORINFO_METHOD_STRUCT_* mapMethodDeclToMethodImpl(IntPtr _this, CORINFO_METHOD_STRUCT_* method) { throw new NotImplementedException("mapMethodDeclToMethodImpl"); }
private void getMethodVTableOffset(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref uint offsetOfIndirection, ref uint offsetAfterIndirection) { throw new NotImplementedException("getMethodVTableOffset"); }
private CorInfoHelpFunc getNewHelper(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle) { throw new NotImplementedException("getNewHelper"); }
private CorInfoIntrinsics getIntrinsicID(IntPtr _this, CORINFO_METHOD_STRUCT_* method) { var md = HandleToObject(method); return asCorInfoIntrinsic(IntrinsicMethods.GetIntrinsicMethodClassification(md)); }
private CorInfoInitClassResult initClass(IntPtr _this, CORINFO_FIELD_STRUCT_* field, CORINFO_METHOD_STRUCT_* method, CORINFO_CONTEXT_STRUCT* context, [MarshalAs(UnmanagedType.Bool)]bool speculative) { FieldDesc fd = field == null ? null : HandleToObject(field); Debug.Assert(fd == null || fd.IsStatic); MethodDesc md = HandleToObject(method); TypeDesc type = fd != null ? fd.OwningType : typeFromContext(context); if (!type.HasStaticConstructor) { return CorInfoInitClassResult.CORINFO_INITCLASS_NOT_REQUIRED; } MetadataType typeToInit = (MetadataType)type; if (typeToInit.IsModuleType) { // For both jitted and ngen code the global class is always considered initialized return CorInfoInitClassResult.CORINFO_INITCLASS_NOT_REQUIRED; } if (fd == null) { if (typeToInit.IsBeforeFieldInit) { // We can wait for field accesses to run .cctor return CorInfoInitClassResult.CORINFO_INITCLASS_NOT_REQUIRED; } // Run .cctor on statics & constructors if (md.Signature.IsStatic) { // Except don't class construct on .cctor - it would be circular if (md.IsStaticConstructor) { return CorInfoInitClassResult.CORINFO_INITCLASS_NOT_REQUIRED; } } else if (!md.IsConstructor && !typeToInit.IsValueType) { // According to the spec, we should be able to do this optimization for both reference and valuetypes. // To maintain backward compatibility, we are doing it for reference types only. // For instance methods of types with precise-initialization // semantics, we can assume that the .ctor triggerred the // type initialization. // This does not hold for NULL "this" object. However, the spec does // not require that case to work. return CorInfoInitClassResult.CORINFO_INITCLASS_NOT_REQUIRED; } } // TODO: before giving up and asking to generate a helper call, check to see if this is some pattern we can // prove doesn't need initclass anymore because we initialized it earlier. return CorInfoInitClassResult.CORINFO_INITCLASS_USE_HELPER; }
private MethodDesc HandleToObject(CORINFO_METHOD_STRUCT_* method) { return (MethodDesc)HandleToObject((IntPtr)method); }