Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManu <manu-silicon@users.noreply.github.com>2015-11-19 10:03:32 +0300
committerManu <manu-silicon@users.noreply.github.com>2015-11-20 03:52:22 +0300
commitc73d50897f1efd55caeaab5ced4dab70bd14e02b (patch)
tree44db008a14aee8ed6e02c86124114b4a6f7d8f6f /src/JitInterface
parent6225d128ceb619e3d579986a36e20703fe7772bd (diff)
Updated formatting
Using the https://github.com/dotnet/codeformatter tool with the following command line: /rule-:FieldNames,ReadonlyFields ILCompiler.sln
Diffstat (limited to 'src/JitInterface')
-rw-r--r--src/JitInterface/src/CorInfoHelpFunc.cs40
-rw-r--r--src/JitInterface/src/CorInfoImpl.cs469
-rw-r--r--src/JitInterface/src/CorInfoTypes.cs28
3 files changed, 259 insertions, 278 deletions
diff --git a/src/JitInterface/src/CorInfoHelpFunc.cs b/src/JitInterface/src/CorInfoHelpFunc.cs
index 60cad987f..dfda16b9f 100644
--- a/src/JitInterface/src/CorInfoHelpFunc.cs
+++ b/src/JitInterface/src/CorInfoHelpFunc.cs
@@ -7,21 +7,11 @@ using System.Text;
namespace Internal.JitInterface
{
-// CorInfoHelpFunc defines the set of helpers (accessed via the ICorDynamicInfo::getHelperFtn())
-// These helpers can be called by native code which executes in the runtime.
-// Compilers can emit calls to these helpers.
-//
-// The signatures of the helpers are below (see RuntimeHelperArgumentCheck)
-//
-// NOTE: CorInfoHelpFunc is closely related to MdilHelpFunc!!!
-//
-// - changing the order of jit helper ordinals works fine
-// However:
-// - adding a jit helpers requires usually the addition of a corresponding MdilHelper
-// - removing a jit helper (or changing its arguments) should be done only sparingly
-// and needs discussion with an "MDIL person".
-// Please have a look also at the comment prepending the definition of MdilHelpFunc
-//
+ // CorInfoHelpFunc defines the set of helpers (accessed via the ICorDynamicInfo::getHelperFtn())
+ // These helpers can be called by native code which executes in the runtime.
+ // Compilers can emit calls to these helpers.
+ //
+ // The signatures of the helpers are below (see RuntimeHelperArgumentCheck)
public enum CorInfoHelpFunc
{
@@ -73,9 +63,7 @@ namespace Internal.JitInterface
CORINFO_HELP_NEWARR_1_ALIGN8, // like VC, but aligns the array start
CORINFO_HELP_STRCNS, // create a new string literal
- #if !RYUJIT_CTPBUILD
CORINFO_HELP_STRCNS_CURRENT_MODULE, // create a new string literal from the current module (used by NGen code)
- #endif
/* Object model */
CORINFO_HELP_INITCLASS, // Initialize class if not already initialized
@@ -94,7 +82,7 @@ namespace Internal.JitInterface
CORINFO_HELP_CHKCASTCLASS,
CORINFO_HELP_CHKCASTANY,
CORINFO_HELP_CHKCASTCLASS_SPECIAL, // Optimized helper for classes. Assumes that the trivial cases
- // has been taken care of by the inlined check
+ // has been taken care of by the inlined check
CORINFO_HELP_BOX,
CORINFO_HELP_BOX_NULLABLE, // special form of boxing for Nullable<T>
@@ -113,9 +101,7 @@ namespace Internal.JitInterface
CORINFO_HELP_RNGCHKFAIL, // array bounds check failed
CORINFO_HELP_OVERFLOW, // throw an overflow exception
CORINFO_HELP_THROWDIVZERO, // throw a divide by zero exception
- #if !RYUJIT_CTPBUILD
CORINFO_HELP_THROWNULLREF, // throw a null reference exception
- #endif
CORINFO_HELP_INTERNALTHROW, // Support for really fast jit
CORINFO_HELP_VERIFICATION, // Throw a VerificationException
@@ -253,9 +239,9 @@ namespace Internal.JitInterface
// These helpers are required for MDIL backward compatibility only. They are not used by current JITed code.
CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPEHANDLE_OBSOLETE, // Convert from a TypeHandle (native structure pointer) to RuntimeTypeHandle at run-time
- #if RYUJIT_CTPBUILD
+#if RYUJIT_CTPBUILD
CORINFO_HELP_METHODDESC_TO_RUNTIMEMETHODHANDLE_MAYBENULL_OBSOLETE, // Convert from a MethodDesc (native structure pointer) to RuntimeMethodHandle at run-time
- #endif
+#endif
CORINFO_HELP_METHODDESC_TO_RUNTIMEMETHODHANDLE_OBSOLETE, // Convert from a MethodDesc (native structure pointer) to RuntimeMethodHandle at run-time
CORINFO_HELP_FIELDDESC_TO_RUNTIMEFIELDHANDLE_OBSOLETE, // Convert from a FieldDesc (native structure pointer) to RuntimeFieldHandle at run-time
@@ -267,7 +253,6 @@ namespace Internal.JitInterface
CORINFO_HELP_VIRTUAL_FUNC_PTR, // look up a virtual method at run-time
//CORINFO_HELP_VIRTUAL_FUNC_PTR_LOG, // look up a virtual method at run-time, with IBC logging
- #if !RYUJIT_CTPBUILD
// Not a real helpers. Instead of taking handle arguments, these helpers point to a small stub that loads the handle argument and calls the static helper.
CORINFO_HELP_READYTORUN_NEW,
CORINFO_HELP_READYTORUN_NEWARR_1,
@@ -276,9 +261,8 @@ namespace Internal.JitInterface
CORINFO_HELP_READYTORUN_STATIC_BASE,
CORINFO_HELP_READYTORUN_VIRTUAL_FUNC_PTR,
CORINFO_HELP_READYTORUN_DELEGATE_CTOR,
- #endif
- #if REDHAWK
+#if REDHAWK
// these helpers are arbitrary since we don't have any relation to the actual CLR corinfo.h.
CORINFO_HELP_PINVOKE, // transition to preemptive mode for a pinvoke, frame in EAX
CORINFO_HELP_PINVOKE_2, // transition to preemptive mode for a pinvoke, frame in ESI / R10
@@ -317,7 +301,7 @@ namespace Internal.JitInterface
// Bartok emits code with destination in ECX rather than EDX and only ever uses EDX as the reference
// register. It also only ever specifies the checked version.
CORINFO_HELP_CHECKED_ASSIGN_REF_EDX, // EDX hold GC ptr, want do a 'mov [ECX], EDX' and inform GC
- #endif // REDHAWK
+#endif // REDHAWK
CORINFO_HELP_EE_PRESTUB, // Not real JIT helper. Used in native images.
@@ -336,7 +320,7 @@ namespace Internal.JitInterface
// Keep platform-specific helpers at the end so that the ids for the platform neutral helpers stay same accross platforms
//
- #if TARGET_X86 || _HOST_X86_ || REDHAWK // _HOST_X86_ is for altjit
+#if TARGET_X86 || _HOST_X86_ || REDHAWK // _HOST_X86_ is for altjit
// NOGC_WRITE_BARRIERS JIT helper calls
// Unchecked versions EDX is required to point into GC heap
CORINFO_HELP_ASSIGN_REF_EAX, // EAX holds GC ptr, do a 'mov [EDX], EAX' and inform GC
@@ -352,7 +336,7 @@ namespace Internal.JitInterface
CORINFO_HELP_CHECKED_ASSIGN_REF_ESI,
CORINFO_HELP_CHECKED_ASSIGN_REF_EDI,
CORINFO_HELP_CHECKED_ASSIGN_REF_EBP,
- #endif
+#endif
CORINFO_HELP_LOOP_CLONE_CHOICE_ADDR, // Return the reference to a counter to decide to take cloned path in debug stress.
CORINFO_HELP_DEBUG_LOG_LOOP_CLONING, // Print a message that a loop cloning optimization has occurred in debug mode.
diff --git a/src/JitInterface/src/CorInfoImpl.cs b/src/JitInterface/src/CorInfoImpl.cs
index 1a2900b73..1de051b66 100644
--- a/src/JitInterface/src/CorInfoImpl.cs
+++ b/src/JitInterface/src/CorInfoImpl.cs
@@ -18,22 +18,22 @@ using ILCompiler;
namespace Internal.JitInterface
{
- unsafe partial class CorInfoImpl
+ internal unsafe partial class CorInfoImpl
{
- IntPtr _comp;
+ private IntPtr _comp;
[DllImport("ryujit")]
- extern static IntPtr getJit();
+ private extern static IntPtr getJit();
- IntPtr _jit;
+ private IntPtr _jit;
[UnmanagedFunctionPointerAttribute(CallingConvention.StdCall)]
- delegate CorJitResult _compileMethod(IntPtr _this, IntPtr comp, ref CORINFO_METHOD_INFO info, uint flags,
+ private delegate CorJitResult _compileMethod(IntPtr _this, IntPtr comp, ref CORINFO_METHOD_INFO info, uint flags,
out IntPtr nativeEntry, out uint codeSize);
- _compileMethod _compile;
+ private _compileMethod _compile;
- Compilation _compilation;
+ private Compilation _compilation;
public CorInfoImpl(Compilation compilation)
{
@@ -54,7 +54,7 @@ namespace Internal.JitInterface
}
}
- struct SequencePoint
+ private struct SequencePoint
{
public string Document;
public int LineNumber;
@@ -116,7 +116,7 @@ namespace Internal.JitInterface
}
}
- int PointerSize
+ private int PointerSize
{
get
{
@@ -125,9 +125,9 @@ namespace Internal.JitInterface
}
// TODO: Free pins at the end of the compilation
- Dictionary<Object, GCHandle> _pins = new Dictionary<object, GCHandle>();
+ private Dictionary<Object, GCHandle> _pins = new Dictionary<object, GCHandle>();
- IntPtr GetPin(Object obj)
+ private IntPtr GetPin(Object obj)
{
GCHandle handle;
if (!_pins.TryGetValue(obj, out handle))
@@ -137,7 +137,7 @@ namespace Internal.JitInterface
}
return handle.AddrOfPinnedObject();
}
- void FlushPins()
+ private void FlushPins()
{
foreach (var pin in _pins)
pin.Value.Free();
@@ -159,13 +159,13 @@ namespace Internal.JitInterface
_debugLocInfos = null;
}
- Dictionary<Object, IntPtr> _objectToHandle = new Dictionary<Object, IntPtr>();
- List<Object> _handleToObject = new List<Object>();
+ private Dictionary<Object, IntPtr> _objectToHandle = new Dictionary<Object, IntPtr>();
+ private List<Object> _handleToObject = new List<Object>();
- const int handleMultipler = 8;
- const int handleBase = 0x420000;
+ private const int handleMultipler = 8;
+ private const int handleBase = 0x420000;
- IntPtr ObjectToHandle(Object obj)
+ private IntPtr ObjectToHandle(Object obj)
{
IntPtr handle;
if (!_objectToHandle.TryGetValue(obj, out handle))
@@ -177,22 +177,22 @@ namespace Internal.JitInterface
return handle;
}
- Object HandleToObject(IntPtr handle)
+ private Object HandleToObject(IntPtr handle)
{
int index = ((int)handle - handleBase) / handleMultipler;
return _handleToObject[index];
}
- MethodDesc HandleToObject(CORINFO_METHOD_STRUCT_* method) { return (MethodDesc)HandleToObject((IntPtr)method); }
- CORINFO_METHOD_STRUCT_* ObjectToHandle(MethodDesc method) { return (CORINFO_METHOD_STRUCT_*)ObjectToHandle((Object)method); }
+ private MethodDesc HandleToObject(CORINFO_METHOD_STRUCT_* method) { return (MethodDesc)HandleToObject((IntPtr)method); }
+ private CORINFO_METHOD_STRUCT_* ObjectToHandle(MethodDesc method) { return (CORINFO_METHOD_STRUCT_*)ObjectToHandle((Object)method); }
- TypeDesc HandleToObject(CORINFO_CLASS_STRUCT_* type) { return (TypeDesc)HandleToObject((IntPtr)type); }
- CORINFO_CLASS_STRUCT_* ObjectToHandle(TypeDesc type) { return (CORINFO_CLASS_STRUCT_*)ObjectToHandle((Object)type); }
+ private TypeDesc HandleToObject(CORINFO_CLASS_STRUCT_* type) { return (TypeDesc)HandleToObject((IntPtr)type); }
+ private CORINFO_CLASS_STRUCT_* ObjectToHandle(TypeDesc type) { return (CORINFO_CLASS_STRUCT_*)ObjectToHandle((Object)type); }
- FieldDesc HandleToObject(CORINFO_FIELD_STRUCT_* field) { return (FieldDesc)HandleToObject((IntPtr)field); }
- CORINFO_FIELD_STRUCT_* ObjectToHandle(FieldDesc field) { return (CORINFO_FIELD_STRUCT_*)ObjectToHandle((Object)field); }
+ private FieldDesc HandleToObject(CORINFO_FIELD_STRUCT_* field) { return (FieldDesc)HandleToObject((IntPtr)field); }
+ private CORINFO_FIELD_STRUCT_* ObjectToHandle(FieldDesc field) { return (CORINFO_FIELD_STRUCT_*)ObjectToHandle((Object)field); }
- bool Get_CORINFO_METHOD_INFO(MethodDesc method, out CORINFO_METHOD_INFO methodInfo)
+ private bool Get_CORINFO_METHOD_INFO(MethodDesc method, out CORINFO_METHOD_INFO methodInfo)
{
var methodIL = _compilation.GetMethodIL(method);
if (methodIL == null)
@@ -217,7 +217,7 @@ namespace Internal.JitInterface
return true;
}
- void Get_CORINFO_SIG_INFO(MethodSignature signature, out CORINFO_SIG_INFO sig)
+ private void Get_CORINFO_SIG_INFO(MethodSignature signature, out CORINFO_SIG_INFO sig)
{
sig.callConv = (CorInfoCallConv)0;
if (!signature.IsStatic) sig.callConv |= CorInfoCallConv.CORINFO_CALLCONV_HASTHIS;
@@ -252,7 +252,7 @@ namespace Internal.JitInterface
// }
}
- void Get_CORINFO_SIG_INFO(LocalVariableDefinition[] locals, out CORINFO_SIG_INFO sig)
+ private void Get_CORINFO_SIG_INFO(LocalVariableDefinition[] locals, out CORINFO_SIG_INFO sig)
{
sig.callConv = CorInfoCallConv.CORINFO_CALLCONV_DEFAULT;
sig._retType = (byte)CorInfoType.CORINFO_TYPE_VOID;
@@ -275,7 +275,7 @@ namespace Internal.JitInterface
sig.token = 0; // Not used by the JIT
}
- CorInfoType asCorInfoType(TypeDesc type)
+ private CorInfoType asCorInfoType(TypeDesc type)
{
if (type.IsEnum)
{
@@ -308,7 +308,7 @@ namespace Internal.JitInterface
return CorInfoType.CORINFO_TYPE_CLASS;
}
- CorInfoType asCorInfoType(TypeDesc type, out CORINFO_CLASS_STRUCT_* structType)
+ private CorInfoType asCorInfoType(TypeDesc type, out CORINFO_CLASS_STRUCT_* structType)
{
var corInfoType = asCorInfoType(type);
structType = ((corInfoType == CorInfoType.CORINFO_TYPE_CLASS) ||
@@ -317,7 +317,7 @@ namespace Internal.JitInterface
return corInfoType;
}
- CorInfoIntrinsics asCorInfoIntrinsic(IntrinsicMethodKind methodKind)
+ private CorInfoIntrinsics asCorInfoIntrinsic(IntrinsicMethodKind methodKind)
{
switch (methodKind)
{
@@ -328,7 +328,7 @@ namespace Internal.JitInterface
}
}
- MethodDesc methodFromContext(CORINFO_CONTEXT_STRUCT* contextStruct)
+ private MethodDesc methodFromContext(CORINFO_CONTEXT_STRUCT* contextStruct)
{
if (((ulong)contextStruct & (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK) == (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_CLASS)
{
@@ -340,7 +340,7 @@ namespace Internal.JitInterface
}
}
- TypeDesc typeFromContext(CORINFO_CONTEXT_STRUCT* contextStruct)
+ private TypeDesc typeFromContext(CORINFO_CONTEXT_STRUCT* contextStruct)
{
if (((ulong)contextStruct & (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK) == (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_CLASS)
{
@@ -352,7 +352,7 @@ namespace Internal.JitInterface
}
}
- uint getMethodAttribsInternal(MethodDesc method)
+ private uint getMethodAttribsInternal(MethodDesc method)
{
CorInfoFlag result = 0;
@@ -419,17 +419,17 @@ namespace Internal.JitInterface
return (uint)result;
}
- uint getMethodAttribs(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn)
+ private uint getMethodAttribs(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn)
{
return getMethodAttribsInternal(HandleToObject(ftn));
}
- void setMethodAttribs(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, CorInfoMethodRuntimeFlags attribs)
+ private void setMethodAttribs(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, CorInfoMethodRuntimeFlags attribs)
{
// TODO: Inlining
}
- void getMethodSig(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, CORINFO_SIG_INFO* sig, CORINFO_CLASS_STRUCT_* memberParent)
+ private void getMethodSig(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, CORINFO_SIG_INFO* sig, CORINFO_CLASS_STRUCT_* memberParent)
{
MethodDesc method = HandleToObject(ftn);
@@ -437,33 +437,33 @@ namespace Internal.JitInterface
}
[return: MarshalAs(UnmanagedType.I1)]
- bool getMethodInfo(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref CORINFO_METHOD_INFO info)
+ private bool getMethodInfo(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref CORINFO_METHOD_INFO info)
{
return Get_CORINFO_METHOD_INFO(HandleToObject(ftn), out info);
}
- CorInfoInline canInline(IntPtr _this, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd, ref uint pRestrictions)
+ private CorInfoInline canInline(IntPtr _this, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd, ref uint pRestrictions)
{
// TODO: Inlining
return CorInfoInline.INLINE_NEVER;
}
- void reportInliningDecision(IntPtr _this, CORINFO_METHOD_STRUCT_* inlinerHnd, CORINFO_METHOD_STRUCT_* inlineeHnd, CorInfoInline inlineResult, byte* reason)
+ private void reportInliningDecision(IntPtr _this, CORINFO_METHOD_STRUCT_* inlinerHnd, CORINFO_METHOD_STRUCT_* inlineeHnd, CorInfoInline inlineResult, byte* reason)
{
}
[return: MarshalAs(UnmanagedType.I1)]
- bool canTailCall(IntPtr _this, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* declaredCalleeHnd, CORINFO_METHOD_STRUCT_* exactCalleeHnd, [MarshalAs(UnmanagedType.I1)]bool fIsTailPrefix)
+ 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;
}
- void reportTailCallDecision(IntPtr _this, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd, [MarshalAs(UnmanagedType.I1)]bool fIsTailPrefix, CorInfoTailCall tailCallResult, byte* reason)
+ private void reportTailCallDecision(IntPtr _this, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd, [MarshalAs(UnmanagedType.I1)]bool fIsTailPrefix, CorInfoTailCall tailCallResult, byte* reason)
{
}
- void getEHinfo(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
+ private void getEHinfo(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
{
var methodIL = _compilation.GetMethodIL(HandleToObject(ftn));
@@ -477,60 +477,60 @@ namespace Internal.JitInterface
clause.ClassTokenOrOffset = (uint)((ehRegion.Kind == ILExceptionRegionKind.Filter) ? ehRegion.FilterOffset : ehRegion.ClassToken);
}
- CORINFO_CLASS_STRUCT_* getMethodClass(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
+ private CORINFO_CLASS_STRUCT_* getMethodClass(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
{
var m = HandleToObject(method);
return ObjectToHandle(m.OwningType);
}
- CORINFO_MODULE_STRUCT_* getMethodModule(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
+ private CORINFO_MODULE_STRUCT_* getMethodModule(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
{ throw new NotImplementedException("getMethodModule"); }
- void getMethodVTableOffset(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref uint offsetOfIndirection, ref uint offsetAfterIndirection)
+ private void getMethodVTableOffset(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref uint offsetOfIndirection, ref uint offsetAfterIndirection)
{ throw new NotImplementedException("getMethodVTableOffset"); }
- CorInfoIntrinsics getIntrinsicID(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
+ private CorInfoIntrinsics getIntrinsicID(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
{
var md = HandleToObject(method);
return asCorInfoIntrinsic(IntrinsicMethods.GetIntrinsicMethodClassification(md));
}
[return: MarshalAs(UnmanagedType.I1)]
- bool isInSIMDModule(IntPtr _this, CORINFO_CLASS_STRUCT_* classHnd)
+ private bool isInSIMDModule(IntPtr _this, CORINFO_CLASS_STRUCT_* classHnd)
{
// TODO: SIMD
return false;
}
- CorInfoUnmanagedCallConv getUnmanagedCallConv(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
+ private CorInfoUnmanagedCallConv getUnmanagedCallConv(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
{ throw new NotImplementedException("getUnmanagedCallConv"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool pInvokeMarshalingRequired(IntPtr _this, CORINFO_METHOD_STRUCT_* method, CORINFO_SIG_INFO* callSiteSig)
+ private bool pInvokeMarshalingRequired(IntPtr _this, CORINFO_METHOD_STRUCT_* method, CORINFO_SIG_INFO* callSiteSig)
{ throw new NotImplementedException("pInvokeMarshalingRequired"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool satisfiesMethodConstraints(IntPtr _this, CORINFO_CLASS_STRUCT_* parent, CORINFO_METHOD_STRUCT_* method)
+ private bool satisfiesMethodConstraints(IntPtr _this, CORINFO_CLASS_STRUCT_* parent, CORINFO_METHOD_STRUCT_* method)
{ throw new NotImplementedException("satisfiesMethodConstraints"); }
[return: MarshalAs(UnmanagedType.Bool)]
- 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)
+ 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"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool isDelegateCreationAllowed(IntPtr _this, CORINFO_CLASS_STRUCT_* delegateHnd, CORINFO_METHOD_STRUCT_* calleeHnd)
+ private bool isDelegateCreationAllowed(IntPtr _this, CORINFO_CLASS_STRUCT_* delegateHnd, CORINFO_METHOD_STRUCT_* calleeHnd)
{
return true;
}
- CorInfoInstantiationVerification isInstantiationOfVerifiedGeneric(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
+ private CorInfoInstantiationVerification isInstantiationOfVerifiedGeneric(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
{ throw new NotImplementedException("isInstantiationOfVerifiedGeneric"); }
- void initConstraintsForVerification(IntPtr _this, CORINFO_METHOD_STRUCT_* method, [MarshalAs(UnmanagedType.Bool)] ref bool pfHasCircularClassConstraints, [MarshalAs(UnmanagedType.Bool)] ref bool pfHasCircularMethodConstraint)
+ 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"); }
- CorInfoCanSkipVerificationResult canSkipMethodVerification(IntPtr _this, CORINFO_METHOD_STRUCT_* ftnHandle)
+ private CorInfoCanSkipVerificationResult canSkipMethodVerification(IntPtr _this, CORINFO_METHOD_STRUCT_* ftnHandle)
{ throw new NotImplementedException("canSkipMethodVerification"); }
- void methodMustBeLoadedBeforeCodeIsRun(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
+ private void methodMustBeLoadedBeforeCodeIsRun(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
{
}
- CORINFO_METHOD_STRUCT_* mapMethodDeclToMethodImpl(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
+ private CORINFO_METHOD_STRUCT_* mapMethodDeclToMethodImpl(IntPtr _this, CORINFO_METHOD_STRUCT_* method)
{ throw new NotImplementedException("mapMethodDeclToMethodImpl"); }
- void getGSCookie(IntPtr _this, GSCookie* pCookieVal, GSCookie** ppCookieVal)
+ private void getGSCookie(IntPtr _this, GSCookie* pCookieVal, GSCookie** ppCookieVal)
{
// TODO: fully implement GS cookies
@@ -545,7 +545,7 @@ namespace Internal.JitInterface
}
}
- void resolveToken(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken)
+ private void resolveToken(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken)
{
var methodIL = (MethodIL)HandleToObject((IntPtr)pResolvedToken.tokenScope);
@@ -582,13 +582,13 @@ namespace Internal.JitInterface
pResolvedToken.cbMethodSpec = 0;
}
- void findSig(IntPtr _this, CORINFO_MODULE_STRUCT_* module, uint sigTOK, CORINFO_CONTEXT_STRUCT* context, CORINFO_SIG_INFO* sig)
+ private void findSig(IntPtr _this, CORINFO_MODULE_STRUCT_* module, uint sigTOK, CORINFO_CONTEXT_STRUCT* context, CORINFO_SIG_INFO* sig)
{
var methodIL = (MethodIL)HandleToObject((IntPtr)module);
Get_CORINFO_SIG_INFO((MethodSignature)methodIL.GetObject((int)sigTOK), out *sig);
}
- void findCallSiteSig(IntPtr _this, CORINFO_MODULE_STRUCT_* module, uint methTOK, CORINFO_CONTEXT_STRUCT* context, CORINFO_SIG_INFO* sig)
+ private void findCallSiteSig(IntPtr _this, CORINFO_MODULE_STRUCT_* module, uint methTOK, CORINFO_CONTEXT_STRUCT* context, CORINFO_SIG_INFO* sig)
{
// TODO: dynamic scopes
// TODO: verification
@@ -596,7 +596,7 @@ namespace Internal.JitInterface
Get_CORINFO_SIG_INFO(((MethodDesc)methodIL.GetObject((int)methTOK)).Signature, out *sig);
}
- CORINFO_CLASS_STRUCT_* getTokenTypeAsHandle(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken)
+ private CORINFO_CLASS_STRUCT_* getTokenTypeAsHandle(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken)
{
WellKnownType result = WellKnownType.RuntimeTypeHandle;
@@ -613,50 +613,50 @@ namespace Internal.JitInterface
return ObjectToHandle(_compilation.TypeSystemContext.GetWellKnownType(result));
}
- CorInfoCanSkipVerificationResult canSkipVerification(IntPtr _this, CORINFO_MODULE_STRUCT_* module)
+ private CorInfoCanSkipVerificationResult canSkipVerification(IntPtr _this, CORINFO_MODULE_STRUCT_* module)
{ throw new NotImplementedException("canSkipVerification"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool isValidToken(IntPtr _this, CORINFO_MODULE_STRUCT_* module, uint metaTOK)
+ private bool isValidToken(IntPtr _this, CORINFO_MODULE_STRUCT_* module, uint metaTOK)
{ throw new NotImplementedException("isValidToken"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool isValidStringRef(IntPtr _this, CORINFO_MODULE_STRUCT_* module, uint metaTOK)
+ private bool isValidStringRef(IntPtr _this, CORINFO_MODULE_STRUCT_* module, uint metaTOK)
{ throw new NotImplementedException("isValidStringRef"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool shouldEnforceCallvirtRestriction(IntPtr _this, CORINFO_MODULE_STRUCT_* scope)
+ private bool shouldEnforceCallvirtRestriction(IntPtr _this, CORINFO_MODULE_STRUCT_* scope)
{ throw new NotImplementedException("shouldEnforceCallvirtRestriction"); }
- CorInfoType asCorInfoType(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private CorInfoType asCorInfoType(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
var type = HandleToObject(cls);
return asCorInfoType(type);
}
- byte* getClassName(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private byte* getClassName(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
var type = HandleToObject(cls);
return (byte*)GetPin(StringToUTF8(type.ToString()));
}
- 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)
+ 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"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool isValueClass(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private bool isValueClass(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
return HandleToObject(cls).IsValueType;
}
[return: MarshalAs(UnmanagedType.Bool)]
- bool canInlineTypeCheckWithObjectVTable(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private bool canInlineTypeCheckWithObjectVTable(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{ throw new NotImplementedException("canInlineTypeCheckWithObjectVTable"); }
- uint getClassAttribs(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private uint getClassAttribs(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
TypeDesc type = HandleToObject(cls);
return getClassAttribsInternal(type);
}
- uint getClassAttribsInternal(TypeDesc type)
+ private uint getClassAttribsInternal(TypeDesc type)
{
// TODO: This method needs to implement:
// 1. GenericParameterType: CORINFO_FLG_GENERIC_TYPE_VARIABLE
@@ -685,7 +685,7 @@ namespace Internal.JitInterface
// if (type.IsUnsafeValueType)
// result |= CorInfoFlag.CORINFO_FLG_UNSAFE_VALUECLASS;
}
-
+
if (type.IsDelegate)
result |= CorInfoFlag.CORINFO_FLG_DELEGATE;
@@ -707,43 +707,43 @@ namespace Internal.JitInterface
[return: MarshalAs(UnmanagedType.Bool)]
- bool isStructRequiringStackAllocRetBuf(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ 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;
}
- CORINFO_MODULE_STRUCT_* getClassModule(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private CORINFO_MODULE_STRUCT_* getClassModule(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{ throw new NotImplementedException("getClassModule"); }
- CORINFO_ASSEMBLY_STRUCT_* getModuleAssembly(IntPtr _this, CORINFO_MODULE_STRUCT_* mod)
+ private CORINFO_ASSEMBLY_STRUCT_* getModuleAssembly(IntPtr _this, CORINFO_MODULE_STRUCT_* mod)
{ throw new NotImplementedException("getModuleAssembly"); }
- byte* getAssemblyName(IntPtr _this, CORINFO_ASSEMBLY_STRUCT_* assem)
+ private byte* getAssemblyName(IntPtr _this, CORINFO_ASSEMBLY_STRUCT_* assem)
{ throw new NotImplementedException("getAssemblyName"); }
- void* LongLifetimeMalloc(IntPtr _this, UIntPtr sz)
+ private void* LongLifetimeMalloc(IntPtr _this, UIntPtr sz)
{
return (void*)Marshal.AllocCoTaskMem((int)sz);
}
- void LongLifetimeFree(IntPtr _this, void* obj)
+ private void LongLifetimeFree(IntPtr _this, void* obj)
{
Marshal.FreeCoTaskMem((IntPtr)obj);
}
- byte* getClassModuleIdForStatics(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, CORINFO_MODULE_STRUCT_** pModule, void** ppIndirection)
+ private byte* getClassModuleIdForStatics(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, CORINFO_MODULE_STRUCT_** pModule, void** ppIndirection)
{ throw new NotImplementedException("getClassModuleIdForStatics"); }
- uint getClassSize(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private uint getClassSize(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
TypeDesc type = HandleToObject(cls);
return (uint)type.GetElementSize();
}
- uint getClassAlignmentRequirement(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, [MarshalAs(UnmanagedType.Bool)]bool fDoubleAlignHint)
+ private uint getClassAlignmentRequirement(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, [MarshalAs(UnmanagedType.Bool)]bool fDoubleAlignHint)
{ throw new NotImplementedException("getClassAlignmentRequirement"); }
- int GatherClassGCLayout(TypeDesc type, byte* gcPtrs)
+ private int GatherClassGCLayout(TypeDesc type, byte* gcPtrs)
{
int result = 0;
@@ -801,7 +801,7 @@ namespace Internal.JitInterface
return result;
}
- uint getClassGClayout(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, byte* gcPtrs)
+ private uint getClassGClayout(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, byte* gcPtrs)
{
uint result = 0;
@@ -824,7 +824,7 @@ namespace Internal.JitInterface
return result;
}
- uint getClassNumInstanceFields(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private uint getClassNumInstanceFields(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
TypeDesc type = HandleToObject(cls);
@@ -838,7 +838,7 @@ namespace Internal.JitInterface
return result;
}
- CORINFO_FIELD_STRUCT_* getFieldInClass(IntPtr _this, CORINFO_CLASS_STRUCT_* clsHnd, int num)
+ private CORINFO_FIELD_STRUCT_* getFieldInClass(IntPtr _this, CORINFO_CLASS_STRUCT_* clsHnd, int num)
{
TypeDesc classWithFields = HandleToObject(clsHnd);
@@ -860,20 +860,20 @@ namespace Internal.JitInterface
}
[return: MarshalAs(UnmanagedType.Bool)]
- bool checkMethodModifier(IntPtr _this, CORINFO_METHOD_STRUCT_* hMethod, byte* modifier, [MarshalAs(UnmanagedType.Bool)]bool fOptional)
+ private bool checkMethodModifier(IntPtr _this, CORINFO_METHOD_STRUCT_* hMethod, byte* modifier, [MarshalAs(UnmanagedType.Bool)]bool fOptional)
{ throw new NotImplementedException("checkMethodModifier"); }
- CorInfoHelpFunc getNewHelper(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle)
+ private CorInfoHelpFunc getNewHelper(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle)
{ throw new NotImplementedException("getNewHelper"); }
- CorInfoHelpFunc getNewArrHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* arrayCls)
+ private CorInfoHelpFunc getNewArrHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* arrayCls)
{ throw new NotImplementedException("getNewArrHelper"); }
- CorInfoHelpFunc getCastingHelper(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, [MarshalAs(UnmanagedType.I1)]bool fThrowing)
+ private CorInfoHelpFunc getCastingHelper(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, [MarshalAs(UnmanagedType.I1)]bool fThrowing)
{ throw new NotImplementedException("getCastingHelper"); }
- CorInfoHelpFunc getSharedCCtorHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* clsHnd)
+ private CorInfoHelpFunc getSharedCCtorHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* clsHnd)
{ throw new NotImplementedException("getSharedCCtorHelper"); }
- CorInfoHelpFunc getSecurityPrologHelper(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn)
+ private CorInfoHelpFunc getSecurityPrologHelper(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn)
{ throw new NotImplementedException("getSecurityPrologHelper"); }
- CORINFO_CLASS_STRUCT_* getTypeForBox(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private CORINFO_CLASS_STRUCT_* getTypeForBox(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
var type = HandleToObject(cls);
@@ -882,21 +882,21 @@ namespace Internal.JitInterface
return ObjectToHandle(typeForBox);
}
- CorInfoHelpFunc getBoxHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private CorInfoHelpFunc getBoxHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
var type = HandleToObject(cls);
return type.IsNullable ? CorInfoHelpFunc.CORINFO_HELP_BOX_NULLABLE : CorInfoHelpFunc.CORINFO_HELP_BOX;
}
- CorInfoHelpFunc getUnBoxHelper(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ 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;
}
- void getReadyToRunHelper(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CorInfoHelpFunc id, ref CORINFO_CONST_LOOKUP pLookup)
+ private void getReadyToRunHelper(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CorInfoHelpFunc id, ref CORINFO_CONST_LOOKUP pLookup)
{
pLookup.accessType = InfoAccessType.IAT_VALUE;
@@ -953,10 +953,10 @@ namespace Internal.JitInterface
}
}
- byte* getHelperName(IntPtr _this, CorInfoHelpFunc helpFunc)
+ private byte* getHelperName(IntPtr _this, CorInfoHelpFunc helpFunc)
{ throw new NotImplementedException("getHelperName"); }
- CorInfoInitClassResult initClass(IntPtr _this, CORINFO_FIELD_STRUCT_* field, CORINFO_METHOD_STRUCT_* method, CORINFO_CONTEXT_STRUCT* context, [MarshalAs(UnmanagedType.Bool)]bool speculative)
+ 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);
@@ -1013,14 +1013,14 @@ namespace Internal.JitInterface
return CorInfoInitClassResult.CORINFO_INITCLASS_USE_HELPER;
}
- void classMustBeLoadedBeforeCodeIsRun(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private void classMustBeLoadedBeforeCodeIsRun(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
}
- CORINFO_CLASS_STRUCT_* getBuiltinClass(IntPtr _this, CorInfoClassId classId)
+ private CORINFO_CLASS_STRUCT_* getBuiltinClass(IntPtr _this, CorInfoClassId classId)
{ throw new NotImplementedException("getBuiltinClass"); }
- CorInfoType getTypeForPrimitiveValueClass(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private CorInfoType getTypeForPrimitiveValueClass(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
var type = HandleToObject(cls);
@@ -1031,17 +1031,17 @@ namespace Internal.JitInterface
}
[return: MarshalAs(UnmanagedType.Bool)]
- bool canCast(IntPtr _this, CORINFO_CLASS_STRUCT_* child, CORINFO_CLASS_STRUCT_* parent)
+ private bool canCast(IntPtr _this, CORINFO_CLASS_STRUCT_* child, CORINFO_CLASS_STRUCT_* parent)
{ throw new NotImplementedException("canCast"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool areTypesEquivalent(IntPtr _this, CORINFO_CLASS_STRUCT_* cls1, CORINFO_CLASS_STRUCT_* cls2)
+ private bool areTypesEquivalent(IntPtr _this, CORINFO_CLASS_STRUCT_* cls1, CORINFO_CLASS_STRUCT_* cls2)
{ throw new NotImplementedException("areTypesEquivalent"); }
- CORINFO_CLASS_STRUCT_* mergeClasses(IntPtr _this, CORINFO_CLASS_STRUCT_* cls1, CORINFO_CLASS_STRUCT_* cls2)
+ private CORINFO_CLASS_STRUCT_* mergeClasses(IntPtr _this, CORINFO_CLASS_STRUCT_* cls1, CORINFO_CLASS_STRUCT_* cls2)
{ throw new NotImplementedException("mergeClasses"); }
- CORINFO_CLASS_STRUCT_* getParentType(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private CORINFO_CLASS_STRUCT_* getParentType(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{ throw new NotImplementedException("getParentType"); }
- CorInfoType getChildType(IntPtr _this, CORINFO_CLASS_STRUCT_* clsHnd, ref CORINFO_CLASS_STRUCT_* clsRet)
+ private CorInfoType getChildType(IntPtr _this, CORINFO_CLASS_STRUCT_* clsHnd, ref CORINFO_CLASS_STRUCT_* clsRet)
{
CorInfoType result = CorInfoType.CORINFO_TYPE_UNDEF;
@@ -1058,20 +1058,20 @@ namespace Internal.JitInterface
}
[return: MarshalAs(UnmanagedType.Bool)]
- bool satisfiesClassConstraints(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private bool satisfiesClassConstraints(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{ throw new NotImplementedException("satisfiesClassConstraints"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool isSDArray(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private bool isSDArray(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{
var td = HandleToObject(cls);
return td.IsSzArray;
}
- uint getArrayRank(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private uint getArrayRank(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{ throw new NotImplementedException("getArrayRank"); }
- void* getArrayInitializationData(IntPtr _this, CORINFO_FIELD_STRUCT_* field, uint size)
+ private void* getArrayInitializationData(IntPtr _this, CORINFO_FIELD_STRUCT_* field, uint size)
{
var fd = HandleToObject(field);
@@ -1085,13 +1085,13 @@ namespace Internal.JitInterface
return (void*)ObjectToHandle(_compilation.GetFieldRvaData(fd));
}
- CorInfoIsAccessAllowedResult canAccessClass(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle, ref CORINFO_HELPER_DESC pAccessHelper)
+ private CorInfoIsAccessAllowedResult canAccessClass(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle, ref CORINFO_HELPER_DESC pAccessHelper)
{
// TODO: Access check
return CorInfoIsAccessAllowedResult.CORINFO_ACCESS_ALLOWED;
}
- byte* getFieldName(IntPtr _this, CORINFO_FIELD_STRUCT_* ftn, byte** moduleName)
+ private byte* getFieldName(IntPtr _this, CORINFO_FIELD_STRUCT_* ftn, byte** moduleName)
{
var field = HandleToObject(ftn);
if (moduleName != null)
@@ -1102,19 +1102,19 @@ namespace Internal.JitInterface
return (byte*)GetPin(StringToUTF8(field.Name));
}
- CORINFO_CLASS_STRUCT_* getFieldClass(IntPtr _this, CORINFO_FIELD_STRUCT_* field)
+ private CORINFO_CLASS_STRUCT_* getFieldClass(IntPtr _this, CORINFO_FIELD_STRUCT_* field)
{
var fieldDesc = HandleToObject(field);
return ObjectToHandle(fieldDesc.OwningType);
}
- CorInfoType getFieldType(IntPtr _this, CORINFO_FIELD_STRUCT_* field, ref CORINFO_CLASS_STRUCT_* structType, CORINFO_CLASS_STRUCT_* memberParent)
+ private CorInfoType getFieldType(IntPtr _this, CORINFO_FIELD_STRUCT_* field, ref CORINFO_CLASS_STRUCT_* structType, CORINFO_CLASS_STRUCT_* memberParent)
{
var fieldDesc = HandleToObject(field);
return asCorInfoType(fieldDesc.FieldType, out structType);
}
- uint getFieldOffset(IntPtr _this, CORINFO_FIELD_STRUCT_* field)
+ private uint getFieldOffset(IntPtr _this, CORINFO_FIELD_STRUCT_* field)
{
var fieldDesc = HandleToObject(field);
@@ -1124,10 +1124,10 @@ namespace Internal.JitInterface
}
[return: MarshalAs(UnmanagedType.I1)]
- bool isWriteBarrierHelperRequired(IntPtr _this, CORINFO_FIELD_STRUCT_* field)
+ private bool isWriteBarrierHelperRequired(IntPtr _this, CORINFO_FIELD_STRUCT_* field)
{ throw new NotImplementedException("isWriteBarrierHelperRequired"); }
- void getFieldInfo(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle, CORINFO_ACCESS_FLAGS flags, ref CORINFO_FIELD_INFO pResult)
+ private void getFieldInfo(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle, CORINFO_ACCESS_FLAGS flags, ref CORINFO_FIELD_INFO pResult)
{
#if DEBUG
// In debug, write some bogus data to the struct to ensure we have filled everything
@@ -1194,12 +1194,12 @@ namespace Internal.JitInterface
}
[return: MarshalAs(UnmanagedType.I1)]
- bool isFieldStatic(IntPtr _this, CORINFO_FIELD_STRUCT_* fldHnd)
+ private bool isFieldStatic(IntPtr _this, CORINFO_FIELD_STRUCT_* fldHnd)
{
return HandleToObject(fldHnd).IsStatic;
}
- void getBoundaries(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref uint cILOffsets, ref uint* pILOffsets, BoundaryTypes* implicitBoundaries)
+ private void getBoundaries(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref uint cILOffsets, ref uint* pILOffsets, BoundaryTypes* implicitBoundaries)
{
// TODO: Debugging
cILOffsets = 0;
@@ -1209,7 +1209,7 @@ namespace Internal.JitInterface
// Create a DebugLocInfo which is a table from native offset to sourece line.
// using native to il offset (pMap) and il to source line (_sequencePoints).
- void setBoundaries(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, uint cMap, OffsetMapping* pMap)
+ private void setBoundaries(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, uint cMap, OffsetMapping* pMap)
{
Debug.Assert(_debugLocInfos == null);
// No interest if sequencePoints is not populated before.
@@ -1245,12 +1245,13 @@ namespace Internal.JitInterface
}
}
- if (debugLocInfos.Count > 0) {
+ if (debugLocInfos.Count > 0)
+ {
_debugLocInfos = debugLocInfos.ToArray();
}
}
- void getVars(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref uint cVars, ILVarInfo** vars, [MarshalAs(UnmanagedType.U1)] ref bool extendOthers)
+ private void getVars(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref uint cVars, ILVarInfo** vars, [MarshalAs(UnmanagedType.U1)] ref bool extendOthers)
{
// TODO: Debugging
@@ -1260,27 +1261,27 @@ namespace Internal.JitInterface
// Just tell the JIT to extend everything.
extendOthers = true;
}
- void setVars(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, uint cVars, NativeVarInfo* vars)
+ private void setVars(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, uint cVars, NativeVarInfo* vars)
{
// TODO: Debugging
}
- void* allocateArray(IntPtr _this, uint cBytes)
+ private void* allocateArray(IntPtr _this, uint cBytes)
{
- return (void *)Marshal.AllocCoTaskMem((int)cBytes);
+ return (void*)Marshal.AllocCoTaskMem((int)cBytes);
}
- void freeArray(IntPtr _this, void* array)
+ private void freeArray(IntPtr _this, void* array)
{
Marshal.FreeCoTaskMem((IntPtr)array);
}
- CORINFO_ARG_LIST_STRUCT_* getArgNext(IntPtr _this, CORINFO_ARG_LIST_STRUCT_* args)
+ private CORINFO_ARG_LIST_STRUCT_* getArgNext(IntPtr _this, CORINFO_ARG_LIST_STRUCT_* args)
{
return (CORINFO_ARG_LIST_STRUCT_*)((int)args + 1);
}
- CorInfoTypeWithMod getArgType(IntPtr _this, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args, ref CORINFO_CLASS_STRUCT_* vcTypeRet)
+ private CorInfoTypeWithMod getArgType(IntPtr _this, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args, ref CORINFO_CLASS_STRUCT_* vcTypeRet)
{
int index = (int)args;
Object sigObj = HandleToObject((IntPtr)sig->pSig);
@@ -1298,14 +1299,14 @@ namespace Internal.JitInterface
{
LocalVariableDefinition[] locals = (LocalVariableDefinition[])sigObj;
TypeDesc type = locals[index].Type;
-
+
CorInfoType corInfoType = asCorInfoType(type, out vcTypeRet);
return (CorInfoTypeWithMod)corInfoType | (locals[index].IsPinned ? CorInfoTypeWithMod.CORINFO_TYPE_MOD_PINNED : 0);
}
}
- CORINFO_CLASS_STRUCT_* getArgClass(IntPtr _this, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args)
+ private CORINFO_CLASS_STRUCT_* getArgClass(IntPtr _this, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args)
{
int index = (int)args;
Object sigObj = HandleToObject((IntPtr)sig->pSig);
@@ -1324,26 +1325,26 @@ namespace Internal.JitInterface
}
}
- CorInfoType getHFAType(IntPtr _this, CORINFO_CLASS_STRUCT_* hClass)
+ private CorInfoType getHFAType(IntPtr _this, CORINFO_CLASS_STRUCT_* hClass)
{ throw new NotImplementedException("getHFAType"); }
- HRESULT GetErrorHRESULT(IntPtr _this, _EXCEPTION_POINTERS* pExceptionPointers)
+ private HRESULT GetErrorHRESULT(IntPtr _this, _EXCEPTION_POINTERS* pExceptionPointers)
{ throw new NotImplementedException("GetErrorHRESULT"); }
- uint GetErrorMessage(IntPtr _this, short* buffer, uint bufferLength)
+ private uint GetErrorMessage(IntPtr _this, short* buffer, uint bufferLength)
{ throw new NotImplementedException("GetErrorMessage"); }
- int FilterException(IntPtr _this, _EXCEPTION_POINTERS* pExceptionPointers)
+ private int FilterException(IntPtr _this, _EXCEPTION_POINTERS* pExceptionPointers)
{
return 0; // EXCEPTION_CONTINUE_SEARCH
}
- void HandleException(IntPtr _this, _EXCEPTION_POINTERS* pExceptionPointers)
+ private void HandleException(IntPtr _this, _EXCEPTION_POINTERS* pExceptionPointers)
{ throw new NotImplementedException("HandleException"); }
- void ThrowExceptionForJitResult(IntPtr _this, HRESULT result)
+ private void ThrowExceptionForJitResult(IntPtr _this, HRESULT result)
{ throw new NotImplementedException("ThrowExceptionForJitResult"); }
- void ThrowExceptionForHelper(IntPtr _this, ref CORINFO_HELPER_DESC throwHelper)
+ private void ThrowExceptionForHelper(IntPtr _this, ref CORINFO_HELPER_DESC throwHelper)
{ throw new NotImplementedException("ThrowExceptionForHelper"); }
- void getEEInfo(IntPtr _this, ref CORINFO_EE_INFO pEEInfoOut)
+ private void getEEInfo(IntPtr _this, ref CORINFO_EE_INFO pEEInfoOut)
{
pEEInfoOut = new CORINFO_EE_INFO();
@@ -1363,15 +1364,15 @@ namespace Internal.JitInterface
}
[return: MarshalAs(UnmanagedType.LPWStr)]
- string getJitTimeLogFilename(IntPtr _this)
+ private string getJitTimeLogFilename(IntPtr _this)
{
return null;
}
- mdToken getMethodDefFromMethod(IntPtr _this, CORINFO_METHOD_STRUCT_* hMethod)
+ private mdToken getMethodDefFromMethod(IntPtr _this, CORINFO_METHOD_STRUCT_* hMethod)
{ throw new NotImplementedException("getMethodDefFromMethod"); }
- static byte[] StringToUTF8(string s)
+ private static byte[] StringToUTF8(string s)
{
int byteCount = Encoding.UTF8.GetByteCount(s);
byte[] bytes = new byte[byteCount + 1];
@@ -1379,7 +1380,7 @@ namespace Internal.JitInterface
return bytes;
}
- byte* getMethodName(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, byte** moduleName)
+ private byte* getMethodName(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, byte** moduleName)
{
MethodDesc method = HandleToObject(ftn);
@@ -1387,23 +1388,23 @@ namespace Internal.JitInterface
{
EcmaType ecmaType = method.OwningType.GetTypeDefinition() as EcmaType;
if (ecmaType != null)
- *moduleName = (byte *)GetPin(StringToUTF8(ecmaType.Name));
+ *moduleName = (byte*)GetPin(StringToUTF8(ecmaType.Name));
else
*moduleName = (byte*)GetPin(StringToUTF8("unknown"));
}
- return (byte *)GetPin(StringToUTF8(method.Name));
+ return (byte*)GetPin(StringToUTF8(method.Name));
}
- uint getMethodHash(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn)
+ private uint getMethodHash(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn)
{
return (uint)HandleToObject(ftn).GetHashCode();
}
- byte* findNameOfToken(IntPtr _this, CORINFO_MODULE_STRUCT_* moduleHandle, mdToken token, byte* szFQName, UIntPtr FQNameCapacity)
+ private byte* findNameOfToken(IntPtr _this, CORINFO_MODULE_STRUCT_* moduleHandle, mdToken token, byte* szFQName, UIntPtr FQNameCapacity)
{ throw new NotImplementedException("findNameOfToken"); }
- bool getSystemVAmd64PassStructInRegisterDescriptor(IntPtr _this, CORINFO_CLASS_STRUCT_* structHnd, SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr)
+ private bool getSystemVAmd64PassStructInRegisterDescriptor(IntPtr _this, CORINFO_CLASS_STRUCT_* structHnd, SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr)
{
TypeDesc type = HandleToObject(structHnd);
@@ -1430,21 +1431,21 @@ namespace Internal.JitInterface
return true;
}
- int getIntConfigValue(IntPtr _this, String name, int defaultValue)
+ private int getIntConfigValue(IntPtr _this, String name, int defaultValue)
{ throw new NotImplementedException("getIntConfigValue"); }
- short* getStringConfigValue(IntPtr _this, String name)
+ private short* getStringConfigValue(IntPtr _this, String name)
{ throw new NotImplementedException("getStringConfigValue"); }
- void freeStringConfigValue(IntPtr _this, short* value)
+ private void freeStringConfigValue(IntPtr _this, short* value)
{ throw new NotImplementedException("freeStringConfigValue"); }
- uint getThreadTLSIndex(IntPtr _this, ref void* ppIndirection)
+ private uint getThreadTLSIndex(IntPtr _this, ref void* ppIndirection)
{ throw new NotImplementedException("getThreadTLSIndex"); }
- void* getInlinedCallFrameVptr(IntPtr _this, ref void* ppIndirection)
+ private void* getInlinedCallFrameVptr(IntPtr _this, ref void* ppIndirection)
{ throw new NotImplementedException("getInlinedCallFrameVptr"); }
- int* getAddrOfCaptureThreadGlobal(IntPtr _this, ref void* ppIndirection)
+ private int* getAddrOfCaptureThreadGlobal(IntPtr _this, ref void* ppIndirection)
{ throw new NotImplementedException("getAddrOfCaptureThreadGlobal"); }
- SIZE_T* getAddrModuleDomainID(IntPtr _this, CORINFO_MODULE_STRUCT_* module)
+ private SIZE_T* getAddrModuleDomainID(IntPtr _this, CORINFO_MODULE_STRUCT_* module)
{ throw new NotImplementedException("getAddrModuleDomainID"); }
- void* getHelperFtn(IntPtr _this, CorInfoHelpFunc ftnNum, ref void* ppIndirection)
+ private void* getHelperFtn(IntPtr _this, CorInfoHelpFunc ftnNum, ref void* ppIndirection)
{
JitHelperId id;
@@ -1516,29 +1517,29 @@ namespace Internal.JitInterface
return (void*)ObjectToHandle(_compilation.GetJitHelper(id));
}
- void getFunctionEntryPoint(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref CORINFO_CONST_LOOKUP pResult, CORINFO_ACCESS_FLAGS accessFlags)
+ private void getFunctionEntryPoint(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref CORINFO_CONST_LOOKUP pResult, CORINFO_ACCESS_FLAGS accessFlags)
{ throw new NotImplementedException("getFunctionEntryPoint"); }
- void getFunctionFixedEntryPoint(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref CORINFO_CONST_LOOKUP pResult)
+ private void getFunctionFixedEntryPoint(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref CORINFO_CONST_LOOKUP pResult)
{ throw new NotImplementedException("getFunctionFixedEntryPoint"); }
- void* getMethodSync(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref void* ppIndirection)
+ private void* getMethodSync(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, ref void* ppIndirection)
{ throw new NotImplementedException("getMethodSync"); }
- CorInfoHelpFunc getLazyStringLiteralHelper(IntPtr _this, CORINFO_MODULE_STRUCT_* handle)
+ private CorInfoHelpFunc getLazyStringLiteralHelper(IntPtr _this, CORINFO_MODULE_STRUCT_* handle)
{
// TODO: Lazy string literal helper
return CorInfoHelpFunc.CORINFO_HELP_UNDEF;
}
- CORINFO_MODULE_STRUCT_* embedModuleHandle(IntPtr _this, CORINFO_MODULE_STRUCT_* handle, ref void* ppIndirection)
+ private CORINFO_MODULE_STRUCT_* embedModuleHandle(IntPtr _this, CORINFO_MODULE_STRUCT_* handle, ref void* ppIndirection)
{ throw new NotImplementedException("embedModuleHandle"); }
- CORINFO_CLASS_STRUCT_* embedClassHandle(IntPtr _this, CORINFO_CLASS_STRUCT_* handle, ref void* ppIndirection)
+ private CORINFO_CLASS_STRUCT_* embedClassHandle(IntPtr _this, CORINFO_CLASS_STRUCT_* handle, ref void* ppIndirection)
{ throw new NotImplementedException("embedClassHandle"); }
- CORINFO_METHOD_STRUCT_* embedMethodHandle(IntPtr _this, CORINFO_METHOD_STRUCT_* handle, ref void* ppIndirection)
+ private CORINFO_METHOD_STRUCT_* embedMethodHandle(IntPtr _this, CORINFO_METHOD_STRUCT_* handle, ref void* ppIndirection)
{ throw new NotImplementedException("embedMethodHandle"); }
- CORINFO_FIELD_STRUCT_* embedFieldHandle(IntPtr _this, CORINFO_FIELD_STRUCT_* handle, ref void* ppIndirection)
+ private CORINFO_FIELD_STRUCT_* embedFieldHandle(IntPtr _this, CORINFO_FIELD_STRUCT_* handle, ref void* ppIndirection)
{ throw new NotImplementedException("embedFieldHandle"); }
- void embedGenericHandle(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, [MarshalAs(UnmanagedType.Bool)]bool fEmbedParent, ref CORINFO_GENERICHANDLE_RESULT pResult)
+ private void embedGenericHandle(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, [MarshalAs(UnmanagedType.Bool)]bool fEmbedParent, ref CORINFO_GENERICHANDLE_RESULT pResult)
{
#if DEBUG
// In debug, write some bogus data to the struct to ensure we have filled everything
@@ -1593,18 +1594,18 @@ namespace Internal.JitInterface
// Workaround for struct return marshaling bug on Windows.
// Delete once https://github.com/dotnet/corert/issues/162 is fixed
- bool IsWindows()
+ private bool IsWindows()
{
return Path.DirectorySeparatorChar == '\\';
}
- void getLocationOfThisType_Windows(IntPtr _this, CORINFO_LOOKUP_KIND* result, CORINFO_METHOD_STRUCT_* context)
+ private void getLocationOfThisType_Windows(IntPtr _this, CORINFO_LOOKUP_KIND* result, CORINFO_METHOD_STRUCT_* context)
{
*result = getLocationOfThisType(_this, context);
}
// End of workaround
- CORINFO_LOOKUP_KIND getLocationOfThisType(IntPtr _this, CORINFO_METHOD_STRUCT_* context)
+ private CORINFO_LOOKUP_KIND getLocationOfThisType(IntPtr _this, CORINFO_METHOD_STRUCT_* context)
{
CORINFO_LOOKUP_KIND result = new CORINFO_LOOKUP_KIND();
result.needsRuntimeLookup = false;
@@ -1615,21 +1616,21 @@ namespace Internal.JitInterface
return result;
}
- void* getPInvokeUnmanagedTarget(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref void* ppIndirection)
+ private void* getPInvokeUnmanagedTarget(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref void* ppIndirection)
{ throw new NotImplementedException("getPInvokeUnmanagedTarget"); }
- void* getAddressOfPInvokeFixup(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref void* ppIndirection)
+ private void* getAddressOfPInvokeFixup(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref void* ppIndirection)
{ throw new NotImplementedException("getAddressOfPInvokeFixup"); }
- void* GetCookieForPInvokeCalliSig(IntPtr _this, CORINFO_SIG_INFO* szMetaSig, ref void* ppIndirection)
+ private void* GetCookieForPInvokeCalliSig(IntPtr _this, CORINFO_SIG_INFO* szMetaSig, ref void* ppIndirection)
{ throw new NotImplementedException("GetCookieForPInvokeCalliSig"); }
[return: MarshalAs(UnmanagedType.I1)]
- bool canGetCookieForPInvokeCalliSig(IntPtr _this, CORINFO_SIG_INFO* szMetaSig)
+ private bool canGetCookieForPInvokeCalliSig(IntPtr _this, CORINFO_SIG_INFO* szMetaSig)
{ throw new NotImplementedException("canGetCookieForPInvokeCalliSig"); }
- CORINFO_JUST_MY_CODE_HANDLE_* getJustMyCodeHandle(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref CORINFO_JUST_MY_CODE_HANDLE_** ppIndirection)
+ private CORINFO_JUST_MY_CODE_HANDLE_* getJustMyCodeHandle(IntPtr _this, CORINFO_METHOD_STRUCT_* method, ref CORINFO_JUST_MY_CODE_HANDLE_** ppIndirection)
{ throw new NotImplementedException("getJustMyCodeHandle"); }
- void GetProfilingHandle(IntPtr _this, [MarshalAs(UnmanagedType.Bool)] ref bool pbHookFunction, ref void* pProfilerHandle, [MarshalAs(UnmanagedType.Bool)] ref bool pbIndirectedHandles)
+ private void GetProfilingHandle(IntPtr _this, [MarshalAs(UnmanagedType.Bool)] ref bool pbHookFunction, ref void* pProfilerHandle, [MarshalAs(UnmanagedType.Bool)] ref bool pbIndirectedHandles)
{ throw new NotImplementedException("GetProfilingHandle"); }
- void getCallInfo(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle, CORINFO_CALLINFO_FLAGS flags, ref CORINFO_CALL_INFO pResult)
+ private void getCallInfo(IntPtr _this, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle, CORINFO_CALLINFO_FLAGS flags, ref CORINFO_CALL_INFO pResult)
{
#if DEBUG
// In debug, write some bogus data to the struct to ensure we have filled everything
@@ -1772,8 +1773,8 @@ namespace Internal.JitInterface
if (!directCall)
{
- pResult.codePointerOrStubLookup.constLookup.addr =
- (void *)ObjectToHandle(_compilation.GetReadyToRunHelper(ReadyToRunHelperId.VirtualCall, targetMethod));
+ pResult.codePointerOrStubLookup.constLookup.addr =
+ (void*)ObjectToHandle(_compilation.GetReadyToRunHelper(ReadyToRunHelperId.VirtualCall, targetMethod));
if ((pResult.methodFlags & (uint)CorInfoFlag.CORINFO_FLG_DELEGATE_INVOKE) != 0)
{
@@ -1801,65 +1802,65 @@ namespace Internal.JitInterface
}
[return: MarshalAs(UnmanagedType.Bool)]
- bool canAccessFamily(IntPtr _this, CORINFO_METHOD_STRUCT_* hCaller, CORINFO_CLASS_STRUCT_* hInstanceType)
+ private bool canAccessFamily(IntPtr _this, CORINFO_METHOD_STRUCT_* hCaller, CORINFO_CLASS_STRUCT_* hInstanceType)
{ throw new NotImplementedException("canAccessFamily"); }
[return: MarshalAs(UnmanagedType.Bool)]
- bool isRIDClassDomainID(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
+ private bool isRIDClassDomainID(IntPtr _this, CORINFO_CLASS_STRUCT_* cls)
{ throw new NotImplementedException("isRIDClassDomainID"); }
- uint getClassDomainID(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, ref void* ppIndirection)
+ private uint getClassDomainID(IntPtr _this, CORINFO_CLASS_STRUCT_* cls, ref void* ppIndirection)
{ throw new NotImplementedException("getClassDomainID"); }
- void* getFieldAddress(IntPtr _this, CORINFO_FIELD_STRUCT_* field, ref void* ppIndirection)
+ private void* getFieldAddress(IntPtr _this, CORINFO_FIELD_STRUCT_* field, ref void* ppIndirection)
{ throw new NotImplementedException("getFieldAddress"); }
- IntPtr getVarArgsHandle(IntPtr _this, CORINFO_SIG_INFO* pSig, ref void* ppIndirection)
+ private IntPtr getVarArgsHandle(IntPtr _this, CORINFO_SIG_INFO* pSig, ref void* ppIndirection)
{ throw new NotImplementedException("getVarArgsHandle"); }
[return: MarshalAs(UnmanagedType.I1)]
- bool canGetVarArgsHandle(IntPtr _this, CORINFO_SIG_INFO* pSig)
+ private bool canGetVarArgsHandle(IntPtr _this, CORINFO_SIG_INFO* pSig)
{ throw new NotImplementedException("canGetVarArgsHandle"); }
- InfoAccessType constructStringLiteral(IntPtr _this, CORINFO_MODULE_STRUCT_* module, mdToken metaTok, ref void* ppValue)
+ private InfoAccessType constructStringLiteral(IntPtr _this, CORINFO_MODULE_STRUCT_* module, mdToken metaTok, ref void* ppValue)
{
- MethodIL methodIL = (MethodIL) HandleToObject((IntPtr)module);
+ MethodIL methodIL = (MethodIL)HandleToObject((IntPtr)module);
object literal = methodIL.GetObject((int)metaTok);
- ppValue = (void*) ObjectToHandle(literal);
+ ppValue = (void*)ObjectToHandle(literal);
return InfoAccessType.IAT_PPVALUE;
}
- InfoAccessType emptyStringLiteral(IntPtr _this, ref void* ppValue)
+ private InfoAccessType emptyStringLiteral(IntPtr _this, ref void* ppValue)
{ throw new NotImplementedException("emptyStringLiteral"); }
- uint getFieldThreadLocalStoreID(IntPtr _this, CORINFO_FIELD_STRUCT_* field, ref void* ppIndirection)
+ private uint getFieldThreadLocalStoreID(IntPtr _this, CORINFO_FIELD_STRUCT_* field, ref void* ppIndirection)
{ throw new NotImplementedException("getFieldThreadLocalStoreID"); }
- void setOverride(IntPtr _this, IntPtr pOverride, CORINFO_METHOD_STRUCT_* currentMethod)
+ private void setOverride(IntPtr _this, IntPtr pOverride, CORINFO_METHOD_STRUCT_* currentMethod)
{ throw new NotImplementedException("setOverride"); }
- void addActiveDependency(IntPtr _this, CORINFO_MODULE_STRUCT_* moduleFrom, CORINFO_MODULE_STRUCT_* moduleTo)
+ private void addActiveDependency(IntPtr _this, CORINFO_MODULE_STRUCT_* moduleFrom, CORINFO_MODULE_STRUCT_* moduleTo)
{ throw new NotImplementedException("addActiveDependency"); }
- CORINFO_METHOD_STRUCT_* GetDelegateCtor(IntPtr _this, CORINFO_METHOD_STRUCT_* methHnd, CORINFO_CLASS_STRUCT_* clsHnd, CORINFO_METHOD_STRUCT_* targetMethodHnd, ref DelegateCtorArgs pCtorData)
+ 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"); }
- void MethodCompileComplete(IntPtr _this, CORINFO_METHOD_STRUCT_* methHnd)
+ private void MethodCompileComplete(IntPtr _this, CORINFO_METHOD_STRUCT_* methHnd)
{ throw new NotImplementedException("MethodCompileComplete"); }
- void* getTailCallCopyArgsThunk(IntPtr _this, CORINFO_SIG_INFO* pSig, CorInfoHelperTailCallSpecialHandling flags)
+ private void* getTailCallCopyArgsThunk(IntPtr _this, CORINFO_SIG_INFO* pSig, CorInfoHelperTailCallSpecialHandling flags)
{ throw new NotImplementedException("getTailCallCopyArgsThunk"); }
- delegate IntPtr _ClrVirtualAlloc(IntPtr lpAddress, IntPtr dwSize, uint flAllocationType, uint flProtect);
- static IntPtr ClrVirtualAlloc(IntPtr lpAddress, IntPtr dwSize, uint flAllocationType, uint flProtect)
+ private delegate IntPtr _ClrVirtualAlloc(IntPtr lpAddress, IntPtr dwSize, uint flAllocationType, uint flProtect);
+ private static IntPtr ClrVirtualAlloc(IntPtr lpAddress, IntPtr dwSize, uint flAllocationType, uint flProtect)
{
return Marshal.AllocCoTaskMem((int)dwSize);
}
- _ClrVirtualAlloc _clrVirtualAlloc;
+ private _ClrVirtualAlloc _clrVirtualAlloc;
- delegate bool _ClrVirtualFree(IntPtr lpAddress, IntPtr dwSize, uint dwFreeType);
- static bool ClrVirtualFree(IntPtr lpAddress, IntPtr dwSize, uint dwFreeType)
+ private delegate bool _ClrVirtualFree(IntPtr lpAddress, IntPtr dwSize, uint dwFreeType);
+ private static bool ClrVirtualFree(IntPtr lpAddress, IntPtr dwSize, uint dwFreeType)
{
Marshal.FreeCoTaskMem(lpAddress);
return true;
}
- _ClrVirtualFree _clrVirtualFree;
+ private _ClrVirtualFree _clrVirtualFree;
- IntPtr _memoryManager;
+ private IntPtr _memoryManager;
- void* getMemoryManager(IntPtr _this)
+ private void* getMemoryManager(IntPtr _this)
{
if (_memoryManager != new IntPtr(0))
- return (void *)_memoryManager;
+ return (void*)_memoryManager;
int vtableSlots = 14;
IntPtr* vtable = (IntPtr*)Marshal.AllocCoTaskMem(sizeof(IntPtr) * vtableSlots);
@@ -1875,25 +1876,25 @@ namespace Internal.JitInterface
return (void*)(_memoryManager = instance);
}
- byte[] _code;
- byte[] _coldCode;
+ private byte[] _code;
+ private byte[] _coldCode;
- int _roDataAlignment;
- byte[] _roData;
+ private int _roDataAlignment;
+ private byte[] _roData;
- int _numFrameInfos;
- int _usedFrameInfos;
- FrameInfo[] _frameInfos;
+ private int _numFrameInfos;
+ private int _usedFrameInfos;
+ private FrameInfo[] _frameInfos;
- Dictionary<int, SequencePoint> _sequencePoints;
- DebugLocInfo[] _debugLocInfos;
+ private Dictionary<int, SequencePoint> _sequencePoints;
+ private DebugLocInfo[] _debugLocInfos;
- void allocMem(IntPtr _this, uint hotCodeSize, uint coldCodeSize, uint roDataSize, uint xcptnsCount, CorJitAllocMemFlag flag, ref void* hotCodeBlock, ref void* coldCodeBlock, ref void* roDataBlock)
+ private void allocMem(IntPtr _this, uint hotCodeSize, uint coldCodeSize, uint roDataSize, uint xcptnsCount, CorJitAllocMemFlag flag, ref void* hotCodeBlock, ref void* coldCodeBlock, ref void* roDataBlock)
{
- hotCodeBlock = (void *)GetPin(_code = new byte[hotCodeSize]);
+ hotCodeBlock = (void*)GetPin(_code = new byte[hotCodeSize]);
if (coldCodeSize != 0)
- coldCodeBlock = (void *)GetPin(_coldCode = new byte[coldCodeSize]);
+ coldCodeBlock = (void*)GetPin(_coldCode = new byte[coldCodeSize]);
if (roDataSize != 0)
{
@@ -1919,12 +1920,12 @@ namespace Internal.JitInterface
}
}
- void reserveUnwindInfo(IntPtr _this, [MarshalAs(UnmanagedType.Bool)]bool isFunclet, [MarshalAs(UnmanagedType.Bool)]bool isColdCode, uint unwindSize)
+ private void reserveUnwindInfo(IntPtr _this, [MarshalAs(UnmanagedType.Bool)]bool isFunclet, [MarshalAs(UnmanagedType.Bool)]bool isColdCode, uint unwindSize)
{
_numFrameInfos++;
}
- void allocUnwindInfo(IntPtr _this, byte* pHotCode, byte* pColdCode, uint startOffset, uint endOffset, uint unwindSize, byte* pUnwindBlock, CorJitFuncKind funcKind)
+ private void allocUnwindInfo(IntPtr _this, byte* pHotCode, byte* pColdCode, uint startOffset, uint endOffset, uint unwindSize, byte* pUnwindBlock, CorJitFuncKind funcKind)
{
FrameInfo frameInfo = new FrameInfo();
frameInfo.StartOffset = (int)startOffset;
@@ -1939,35 +1940,35 @@ namespace Internal.JitInterface
_frameInfos[_usedFrameInfos++] = frameInfo;
}
- void* allocGCInfo(IntPtr _this, UIntPtr size)
+ private void* allocGCInfo(IntPtr _this, UIntPtr size)
{
// TODO: GC Info
- return (void *)GetPin(new byte[(int)size]);
+ return (void*)GetPin(new byte[(int)size]);
}
- void yieldExecution(IntPtr _this)
+ private void yieldExecution(IntPtr _this)
{
// Nothing to do
}
- void setEHcount(IntPtr _this, uint cEH)
+ private void setEHcount(IntPtr _this, uint cEH)
{
// TODO: EH
}
- void setEHinfo(IntPtr _this, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
+ private void setEHinfo(IntPtr _this, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
{
// TODO: EH
}
[return: MarshalAs(UnmanagedType.Bool)]
- bool logMsg(IntPtr _this, uint level, byte* fmt, IntPtr args)
+ private bool logMsg(IntPtr _this, uint level, byte* fmt, IntPtr args)
{
// Console.WriteLine(Marshal.PtrToStringAnsi((IntPtr)fmt));
return false;
}
- int doAssert(IntPtr _this, byte* szFile, int iLine, byte* szExpr)
+ private int doAssert(IntPtr _this, byte* szFile, int iLine, byte* szExpr)
{
Log.WriteLine(Marshal.PtrToStringAnsi((IntPtr)szFile) + ":" + iLine);
Log.WriteLine(Marshal.PtrToStringAnsi((IntPtr)szExpr));
@@ -1975,22 +1976,22 @@ namespace Internal.JitInterface
return 1;
}
- void reportFatalError(IntPtr _this, CorJitResult result)
+ private void reportFatalError(IntPtr _this, CorJitResult result)
{ throw new NotImplementedException("reportFatalError"); }
- HRESULT allocBBProfileBuffer(IntPtr _this, uint count, ref ProfileBuffer* profileBuffer)
+ private HRESULT allocBBProfileBuffer(IntPtr _this, uint count, ref ProfileBuffer* profileBuffer)
{ throw new NotImplementedException("allocBBProfileBuffer"); }
- HRESULT getBBProfileData(IntPtr _this, CORINFO_METHOD_STRUCT_* ftnHnd, ref uint count, ref ProfileBuffer* profileBuffer, ref uint numRuns)
+ private HRESULT getBBProfileData(IntPtr _this, CORINFO_METHOD_STRUCT_* ftnHnd, ref uint count, ref ProfileBuffer* profileBuffer, ref uint numRuns)
{ throw new NotImplementedException("getBBProfileData"); }
- void recordCallSite(IntPtr _this, uint instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_STRUCT_* methodHandle)
+ private void recordCallSite(IntPtr _this, uint instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_STRUCT_* methodHandle)
{
}
- List<Relocation> _relocs;
+ private List<Relocation> _relocs;
- BlockType findKnownBlock(void *location, out int offset)
+ private BlockType findKnownBlock(void* location, out int offset)
{
- fixed (byte * pCode = _code)
+ fixed (byte* pCode = _code)
{
if (pCode <= (byte*)location && (byte*)location < pCode + _code.Length)
{
@@ -2027,7 +2028,7 @@ namespace Internal.JitInterface
return BlockType.Unknown;
}
- void recordRelocation(IntPtr _this, void* location, void* target, ushort fRelocType, ushort slotNum, int addlDelta)
+ private void recordRelocation(IntPtr _this, void* location, void* target, ushort fRelocType, ushort slotNum, int addlDelta)
{
Relocation reloc;
@@ -2061,7 +2062,7 @@ namespace Internal.JitInterface
_relocs.Add(reloc);
}
- ushort getRelocTypeHint(IntPtr _this, void* target)
+ private ushort getRelocTypeHint(IntPtr _this, void* target)
{
if (_compilation.TypeSystemContext.Target.Architecture == TargetArchitecture.X64)
return (ushort)ILCompiler.DependencyAnalysis.RelocType.IMAGE_REL_BASED_REL32;
@@ -2069,10 +2070,10 @@ namespace Internal.JitInterface
return UInt16.MaxValue;
}
- void getModuleNativeEntryPointRange(IntPtr _this, ref void* pStart, ref void* pEnd)
+ private void getModuleNativeEntryPointRange(IntPtr _this, ref void* pStart, ref void* pEnd)
{ throw new NotImplementedException("getModuleNativeEntryPointRange"); }
- uint getExpectedTargetArchitecture(IntPtr _this)
+ private uint getExpectedTargetArchitecture(IntPtr _this)
{
return 0x8664; // AMD64
}
diff --git a/src/JitInterface/src/CorInfoTypes.cs b/src/JitInterface/src/CorInfoTypes.cs
index 585834816..f03758a58 100644
--- a/src/JitInterface/src/CorInfoTypes.cs
+++ b/src/JitInterface/src/CorInfoTypes.cs
@@ -19,7 +19,7 @@ namespace Internal.JitInterface
{
internal static unsafe CORINFO_METHOD_STRUCT_* Construct(int i)
{
- return (CORINFO_METHOD_STRUCT_*)((i+1) << 4);
+ return (CORINFO_METHOD_STRUCT_*)((i + 1) << 4);
}
internal static unsafe int GetValue(CORINFO_METHOD_STRUCT_* val)
@@ -32,7 +32,7 @@ namespace Internal.JitInterface
{
internal static unsafe CORINFO_FIELD_STRUCT_* Construct(int i)
{
- return (CORINFO_FIELD_STRUCT_*)((i+1) << 4);
+ return (CORINFO_FIELD_STRUCT_*)((i + 1) << 4);
}
internal static unsafe int GetValue(CORINFO_FIELD_STRUCT_* val)
{
@@ -44,7 +44,7 @@ namespace Internal.JitInterface
{
internal static unsafe CORINFO_CLASS_STRUCT_* Construct(int i)
{
- return (CORINFO_CLASS_STRUCT_*)((i+1) << 4);
+ return (CORINFO_CLASS_STRUCT_*)((i + 1) << 4);
}
internal static unsafe int GetValue(CORINFO_CLASS_STRUCT_* val)
@@ -61,7 +61,7 @@ namespace Internal.JitInterface
{
internal static unsafe CORINFO_MODULE_STRUCT_* Construct(int i)
{
- return (CORINFO_MODULE_STRUCT_*)((i+1) << 4);
+ return (CORINFO_MODULE_STRUCT_*)((i + 1) << 4);
}
internal static unsafe int GetValue(CORINFO_MODULE_STRUCT_* val)
{
@@ -157,12 +157,12 @@ namespace Internal.JitInterface
public mdToken token;
public CorInfoType retType { get { return (CorInfoType)_retType; } set { _retType = (byte)value; } }
- CorInfoCallConv getCallConv() { return (CorInfoCallConv)((callConv & CorInfoCallConv.CORINFO_CALLCONV_MASK)); }
- bool hasThis() { return ((callConv & CorInfoCallConv.CORINFO_CALLCONV_HASTHIS) != 0); }
- bool hasExplicitThis() { return ((callConv & CorInfoCallConv.CORINFO_CALLCONV_EXPLICITTHIS) != 0); }
- uint totalILArgs() { return (uint)(numArgs + (hasThis() ? 1 : 0)); }
- bool isVarArg() { return ((getCallConv() == CorInfoCallConv.CORINFO_CALLCONV_VARARG) || (getCallConv() == CorInfoCallConv.CORINFO_CALLCONV_NATIVEVARARG)); }
- bool hasTypeArg() { return ((callConv & CorInfoCallConv.CORINFO_CALLCONV_PARAMTYPE) != 0); }
+ private CorInfoCallConv getCallConv() { return (CorInfoCallConv)((callConv & CorInfoCallConv.CORINFO_CALLCONV_MASK)); }
+ private bool hasThis() { return ((callConv & CorInfoCallConv.CORINFO_CALLCONV_HASTHIS) != 0); }
+ private bool hasExplicitThis() { return ((callConv & CorInfoCallConv.CORINFO_CALLCONV_EXPLICITTHIS) != 0); }
+ private uint totalILArgs() { return (uint)(numArgs + (hasThis() ? 1 : 0)); }
+ private bool isVarArg() { return ((getCallConv() == CorInfoCallConv.CORINFO_CALLCONV_VARARG) || (getCallConv() == CorInfoCallConv.CORINFO_CALLCONV_NATIVEVARARG)); }
+ private bool hasTypeArg() { return ((callConv & CorInfoCallConv.CORINFO_CALLCONV_PARAMTYPE) != 0); }
};
//----------------------------------------------------------------------------
@@ -412,10 +412,9 @@ namespace Internal.JitInterface
CORINFO_GENERICS_CTXT_FROM_METHODDESC |
CORINFO_GENERICS_CTXT_FROM_METHODTABLE),
CORINFO_GENERICS_CTXT_KEEP_ALIVE = 0x00000100, // Keep the generics context alive throughout the method even if there is no explicit use, and report its location to the CLR
-
}
- enum CorInfoIntrinsics
+ internal enum CorInfoIntrinsics
{
CORINFO_INTRINSIC_Sin,
CORINFO_INTRINSIC_Cos,
@@ -563,7 +562,7 @@ namespace Internal.JitInterface
// these are the attribute flags for fields and methods (getMethodAttribs)
[Flags]
- enum CorInfoFlag : uint
+ internal enum CorInfoFlag : uint
{
// CORINFO_FLG_UNUSED = 0x00000001,
// CORINFO_FLG_UNUSED = 0x00000002,
@@ -1030,7 +1029,6 @@ namespace Internal.JitInterface
// Used by Ready-to-Run
public CORINFO_CONST_LOOKUP instParamLookup;
-
}
@@ -1087,7 +1085,6 @@ namespace Internal.JitInterface
// Used by Ready-to-Run
public CORINFO_CONST_LOOKUP fieldLookup;
-
};
// System V struct passing
@@ -1155,7 +1152,6 @@ namespace Internal.JitInterface
CALL_SITE = 0x04, // This is a call site.
NATIVE_END_OFFSET_UNKNOWN = 0x08, // Indicates a epilog endpoint
CALL_INSTRUCTION = 0x10 // The actual instruction of a call.
-
};
public struct OffsetMapping