From: Santiago Fernandez Madero Date: Thu, 2 Feb 2017 04:23:06 +0000 (-0800) Subject: Adding some missing APIs on core that where added to N.S 2.0 (dotnet/coreclr#9203) X-Git-Tag: submit/tizen/20210909.063632~11030^2~8247 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9520773b0e5160557fcf4d178f5fe58027eab82;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Adding some missing APIs on core that where added to N.S 2.0 (dotnet/coreclr#9203) Adding missing apis on .NET Core. Commit migrated from https://github.com/dotnet/coreclr/commit/91b83215400d1d441de2ee957db3f7c1fed13eec --- diff --git a/src/coreclr/src/mscorlib/model.xml b/src/coreclr/src/mscorlib/model.xml index 53a7f38..3c12877 100644 --- a/src/coreclr/src/mscorlib/model.xml +++ b/src/coreclr/src/mscorlib/model.xml @@ -5551,6 +5551,7 @@ + @@ -5558,6 +5559,7 @@ + @@ -7285,6 +7287,7 @@ + @@ -9043,7 +9046,15 @@ - + + + + + + + + + @@ -11112,7 +11123,15 @@ - + + + + + + + + + diff --git a/src/coreclr/src/mscorlib/src/System/ArgIterator.cs b/src/coreclr/src/mscorlib/src/System/ArgIterator.cs index c5bc379..83a60b9 100644 --- a/src/coreclr/src/mscorlib/src/System/ArgIterator.cs +++ b/src/coreclr/src/mscorlib/src/System/ArgIterator.cs @@ -16,6 +16,19 @@ namespace System { [StructLayout(LayoutKind.Sequential)] public struct ArgIterator { + private IntPtr ArgCookie; // Cookie from the EE. + + // The SigPointer structure consists of the following members. (Note: this is an inline native SigPointer data type) + private IntPtr sigPtr; // Pointer to remaining signature. + private IntPtr sigPtrLen; // Remaining length of the pointer + + // Note, sigPtrLen is actually a DWORD, but on 64bit systems this structure becomes + // 8-byte aligned, which requires us to pad it. + + private IntPtr ArgPtr; // Pointer to remaining args. + private int RemainingArgs; // # of remaining args. + +#if VARARGS_ENABLED //The JIT doesn't support Varargs calling convention. [MethodImplAttribute(MethodImplOptions.InternalCall)] private extern ArgIterator(IntPtr arglist); @@ -34,7 +47,6 @@ namespace System { // This is much like the C va_start macro [CLSCompliant(false)] - public unsafe ArgIterator(RuntimeArgumentHandle arglist, void* ptr) : this(arglist.Value, ptr) { } @@ -121,17 +133,54 @@ namespace System { { throw new NotSupportedException(Environment.GetResourceString("NotSupported_NYI")); } +#else + public ArgIterator(RuntimeArgumentHandle arglist) + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } - private IntPtr ArgCookie; // Cookie from the EE. + [CLSCompliant(false)] + public unsafe ArgIterator(RuntimeArgumentHandle arglist, void* ptr) + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } - // The SigPointer structure consists of the following members. (Note: this is an inline native SigPointer data type) - private IntPtr sigPtr; // Pointer to remaining signature. - private IntPtr sigPtrLen; // Remaining length of the pointer + public void End() + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } - // Note, sigPtrLen is actually a DWORD, but on 64bit systems this structure becomes - // 8-byte aligned, which requires us to pad it. - - private IntPtr ArgPtr; // Pointer to remaining args. - private int RemainingArgs; // # of remaining args. + public override bool Equals(Object o) + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } + + public override int GetHashCode() + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } + + [System.CLSCompliantAttribute(false)] + public System.TypedReference GetNextArg() + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } + + [System.CLSCompliantAttribute(false)] + public System.TypedReference GetNextArg(System.RuntimeTypeHandle rth) + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } + + public unsafe System.RuntimeTypeHandle GetNextArgType() + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } + + public int GetRemainingCount() + { + throw new PlatformNotSupportedException(); //The JIT requires work to enable ArgIterator see: https://github.com/dotnet/coreclr/issues/9204. + } +#endif //VARARGS_ENABLED } } diff --git a/src/coreclr/src/vm/ecalllist.h b/src/coreclr/src/vm/ecalllist.h index 50f0189..25e29e0 100644 --- a/src/coreclr/src/vm/ecalllist.h +++ b/src/coreclr/src/vm/ecalllist.h @@ -373,10 +373,8 @@ FCFuncEnd() FCFuncStart(gTypedReferenceFuncs) FCFuncElement("InternalToObject", ReflectionInvocation::TypedReferenceToObject) -#ifndef FEATURE_CORECLR FCFuncElement("InternalSetTypedReference", ReflectionInvocation::SetTypedReference) FCFuncElement("InternalMakeTypedReference", ReflectionInvocation::MakeTypedReference) -#endif FCFuncEnd() FCFuncStart(gSystem_Type) @@ -568,12 +566,8 @@ FCFuncEnd() FCFuncStart(gCOMFieldHandleNewFuncs) FCFuncElement("GetValue", RuntimeFieldHandle::GetValue) FCFuncElement("SetValue", RuntimeFieldHandle::SetValue) -#ifndef FEATURE_CORECLR FCFuncElement("GetValueDirect", RuntimeFieldHandle::GetValueDirect) -#endif -#ifdef FEATURE_SERIALIZATION FCFuncElement("SetValueDirect", RuntimeFieldHandle::SetValueDirect) -#endif FCFuncElement("GetName", RuntimeFieldHandle::GetName) FCFuncElement("_GetUtf8Name", RuntimeFieldHandle::GetUtf8Name) FCFuncElement("MatchesNameHash", RuntimeFieldHandle::MatchesNameHash) @@ -1812,13 +1806,11 @@ FCFuncEnd() FCFuncStart(gVarArgFuncs) FCFuncElementSig(COR_CTOR_METHOD_NAME, &gsig_IM_IntPtr_PtrVoid_RetVoid, VarArgsNative::Init2) -#ifndef FEATURE_CORECLR FCFuncElementSig(COR_CTOR_METHOD_NAME, &gsig_IM_IntPtr_RetVoid, VarArgsNative::Init) FCFuncElement("GetRemainingCount", VarArgsNative::GetRemainingCount) FCFuncElement("_GetNextArgType", VarArgsNative::GetNextArgType) FCFuncElement("FCallGetNextArg", VarArgsNative::DoGetNextArg) FCFuncElement("InternalGetNextArg", VarArgsNative::GetNextArg2) -#endif // FEATURE_CORECLR FCFuncEnd() FCFuncStart(gMonitorFuncs)