diff options
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/comutilnative.cpp | 31 | ||||
-rw-r--r-- | src/vm/comutilnative.h | 2 | ||||
-rw-r--r-- | src/vm/ecalllist.h | 28 | ||||
-rw-r--r-- | src/vm/ilmarshalers.cpp | 8 | ||||
-rw-r--r-- | src/vm/jithelpers.cpp | 12 | ||||
-rw-r--r-- | src/vm/jitinterface.h | 5 | ||||
-rw-r--r-- | src/vm/marshalnative.cpp | 182 | ||||
-rw-r--r-- | src/vm/marshalnative.h | 7 | ||||
-rw-r--r-- | src/vm/metasig.h | 2 | ||||
-rw-r--r-- | src/vm/mscorlib.h | 2 |
10 files changed, 44 insertions, 235 deletions
diff --git a/src/vm/comutilnative.cpp b/src/vm/comutilnative.cpp index 15bde67f2f..7ca48ffc59 100644 --- a/src/vm/comutilnative.cpp +++ b/src/vm/comutilnative.cpp @@ -850,37 +850,6 @@ FCIMPL1(FC_BOOL_RET, Buffer::IsPrimitiveTypeArray, ArrayBase *arrayUNSAFE) } FCIMPLEND -// Gets a particular byte out of the array. The array can't be an array of Objects - it -// must be a primitive array. -FCIMPL2(FC_UINT8_RET, Buffer::GetByte, ArrayBase *arrayUNSAFE, INT32 index) -{ - FCALL_CONTRACT; - - _ASSERTE(arrayUNSAFE != NULL); - _ASSERTE(index >=0 && index < ((INT32)(arrayUNSAFE->GetComponentSize() * arrayUNSAFE->GetNumComponents()))); - - UINT8 bData = *((BYTE*)arrayUNSAFE->GetDataPtr() + index); - return bData; -} -FCIMPLEND - -// Sets a particular byte in an array. The array can't be an array of Objects - it -// must be a primitive array. -// -// Semantically the bData argment is of type BYTE but FCallCheckSignature expects the -// type to be UINT8 and raises an error if this isn't this case when -// COMPlus_ConsistencyCheck is set. -FCIMPL3(VOID, Buffer::SetByte, ArrayBase *arrayUNSAFE, INT32 index, UINT8 bData) -{ - FCALL_CONTRACT; - - _ASSERTE(arrayUNSAFE != NULL); - _ASSERTE(index >=0 && index < ((INT32)(arrayUNSAFE->GetComponentSize() * arrayUNSAFE->GetNumComponents()))); - - *((BYTE*)arrayUNSAFE->GetDataPtr() + index) = (BYTE) bData; -} -FCIMPLEND - // Returns the length in bytes of an array containing // primitive type elements FCIMPL1(INT32, Buffer::ByteLength, ArrayBase* arrayUNSAFE) diff --git a/src/vm/comutilnative.h b/src/vm/comutilnative.h index c604811c9e..7f51e23db2 100644 --- a/src/vm/comutilnative.h +++ b/src/vm/comutilnative.h @@ -80,8 +80,6 @@ public: // This method from one primitive array to another based // upon an offset into each an a byte count. static FCDECL5(VOID, BlockCopy, ArrayBase *src, int srcOffset, ArrayBase *dst, int dstOffset, int count); - static FCDECL2(FC_UINT8_RET, GetByte, ArrayBase *arrayUNSAFE, INT32 index); - static FCDECL3(VOID, SetByte, ArrayBase *arrayUNSAFE, INT32 index, UINT8 bData); static FCDECL1(FC_BOOL_RET, IsPrimitiveTypeArray, ArrayBase *arrayUNSAFE); static FCDECL1(INT32, ByteLength, ArrayBase *arrayUNSAFE); diff --git a/src/vm/ecalllist.h b/src/vm/ecalllist.h index 89ed6fa95e..5fce2000eb 100644 --- a/src/vm/ecalllist.h +++ b/src/vm/ecalllist.h @@ -220,10 +220,6 @@ FCFuncStart(gSystem_RuntimeType) #endif // defined(FEATURE_COMINTEROP) FCFuncEnd() -FCFuncStart(gJitHelpers) - FCFuncElement("UnsafeSetArrayElement", JitHelpers::UnsafeSetArrayElement) -FCFuncEnd() - FCFuncStart(gCOMTypeHandleFuncs) FCFuncElement("CreateInstance", RuntimeTypeHandle::CreateInstance) FCFuncElement("CreateCaInstance", RuntimeTypeHandle::CreateCaInstance) @@ -750,7 +746,8 @@ FCFuncStart(gArrayFuncs) FCIntrinsicSig("GetLength", &gsig_IM_Int_RetInt, ArrayNative::GetLength, CORINFO_INTRINSIC_Array_GetDimLength) FCFuncElement("get_Length", ArrayNative::GetLengthNoRank) FCFuncElement("get_LongLength", ArrayNative::GetLongLengthNoRank) - FCFuncElement("GetDataPtrOffsetInternal", ArrayNative::GetDataPtrOffsetInternal) + FCFuncElement("GetRawArrayData", ArrayNative::GetRawArrayData) + FCFuncElement("GetElementSize", ArrayNative::GetElementSize) FCFuncElement("Initialize", ArrayNative::Initialize) FCFuncElement("Copy", ArrayNative::ArrayCopy) FCFuncElement("GetRawArrayGeometry", ArrayNative::GetRawArrayGeometry) @@ -766,8 +763,6 @@ FCFuncEnd() FCFuncStart(gBufferFuncs) FCFuncElement("BlockCopy", Buffer::BlockCopy) - FCFuncElement("_GetByte", Buffer::GetByte) - FCFuncElement("_SetByte", Buffer::SetByte) FCFuncElement("IsPrimitiveTypeArray", Buffer::IsPrimitiveTypeArray) FCFuncElement("_ByteLength", Buffer::ByteLength) #ifdef _TARGET_ARM_ @@ -814,9 +809,10 @@ FCFuncStart(gInteropMarshalFuncs) FCFuncElement("SetLastWin32Error", MarshalNative::SetLastWin32Error) FCFuncElement("SizeOfHelper", MarshalNative::SizeOfClass) FCFuncElement("GetSystemMaxDBCSCharSize", MarshalNative::GetSystemMaxDBCSCharSize) + FCFuncElement("StructureToPtr", MarshalNative::StructureToPtr) FCFuncElement("PtrToStructureHelper", MarshalNative::PtrToStructureHelper) FCFuncElement("DestroyStructure", MarshalNative::DestroyStructure) - FCFuncElement("UnsafeAddrOfPinnedArrayElement", MarshalNative::FCUnsafeAddrOfPinnedArrayElement) + FCFuncElement("IsPinnable", MarshalNative::IsPinnable) FCFuncElement("GetExceptionCode", ExceptionNative::GetExceptionCode) FCFuncElement("GetExceptionPointers", ExceptionNative::GetExceptionPointers) QCFuncElement("GetHINSTANCE", COMModule::GetHINSTANCE) @@ -824,9 +820,6 @@ FCFuncStart(gInteropMarshalFuncs) FCFuncElement("OffsetOfHelper", MarshalNative::OffsetOfHelper) QCFuncElement("InternalPrelink", MarshalNative::Prelink) - FCFuncElement("CopyToNative", MarshalNative::CopyToNative) - FCFuncElement("CopyToManaged", MarshalNative::CopyToManaged) - FCFuncElement("StructureToPtr", MarshalNative::StructureToPtr) FCFuncElement("ThrowExceptionForHRInternal", MarshalNative::ThrowExceptionForHR) FCFuncElement("GetExceptionForHRInternal", MarshalNative::GetExceptionForHR) FCFuncElement("GetDelegateForFunctionPointerInternal", MarshalNative::GetDelegateForFunctionPointerInternal) @@ -873,15 +866,8 @@ FCFuncStart(gInteropNativeLibraryFuncs) QCFuncElement("GetSymbol", NativeLibraryNative::GetSymbol) FCFuncEnd() -FCFuncStart(gArrayWithOffsetFuncs) - FCFuncElement("CalculateCount", MarshalNative::CalculateCount) -FCFuncEnd() - #ifdef FEATURE_COMINTEROP - - - #ifdef FEATURE_COMINTEROP_MANAGED_ACTIVATION FCFuncStart(gRegistrationFuncs) FCFuncElement("RegisterTypeForComClientsNative", RegisterTypeForComClientsNative) @@ -952,7 +938,7 @@ FCFuncStart(gOverlappedFuncs) FCFuncElement("GetOverlappedFromNative", GetOverlappedFromNative) FCFuncEnd() -FCFuncStart(gCompilerFuncs) +FCFuncStart(gRuntimeHelpers) FCFuncElement("GetObjectValue", ObjectNative::GetObjectValue) FCIntrinsic("InitializeArray", ArrayNative::InitializeArray, CORINFO_INTRINSIC_InitializeArray) FCFuncElement("_RunClassConstructor", ReflectionInvocation::RunClassConstructor) @@ -1217,7 +1203,6 @@ FCClassElement("ApplicationModel", "System", gApplicationModelFuncs) #endif FCClassElement("ArgIterator", "System", gVarArgFuncs) FCClassElement("Array", "System", gArrayFuncs) -FCClassElement("ArrayWithOffset", "System.Runtime.InteropServices", gArrayWithOffsetFuncs) FCClassElement("Assembly", "System.Reflection", gAssemblyFuncs) FCClassElement("AssemblyBuilder", "System.Reflection.Emit", gAssemblyBuilderFuncs) @@ -1256,7 +1241,6 @@ FCClassElement("IReflect", "System.Reflection", gStdMngIReflectFuncs) FCClassElement("InterfaceMarshaler", "System.StubHelpers", gInterfaceMarshalerFuncs) #endif FCClassElement("Interlocked", "System.Threading", gInterlockedFuncs) -FCClassElement("JitHelpers", "System.Runtime.CompilerServices", gJitHelpers) FCClassElement("LoaderAllocatorScout", "System.Reflection", gLoaderAllocatorFuncs) FCClassElement("ManifestBasedResourceGroveler", "System.Resources", gManifestBasedResourceGrovelerFuncs) FCClassElement("Marshal", "System.Runtime.InteropServices", gInteropMarshalFuncs) @@ -1304,7 +1288,7 @@ FCClassElement("RuntimeAssembly", "System.Reflection", gRuntimeAssemblyFuncs) FCClassElement("RuntimeClass", "System.Runtime.InteropServices.WindowsRuntime", gRuntimeClassFuncs) #endif // FEATURE_COMINTEROP FCClassElement("RuntimeFieldHandle", "System", gCOMFieldHandleNewFuncs) -FCClassElement("RuntimeHelpers", "System.Runtime.CompilerServices", gCompilerFuncs) +FCClassElement("RuntimeHelpers", "System.Runtime.CompilerServices", gRuntimeHelpers) FCClassElement("RuntimeImports", "System.Runtime", gRuntimeImportsFuncs) FCClassElement("RuntimeMethodHandle", "System", gRuntimeMethodHandle) FCClassElement("RuntimeModule", "System.Reflection", gCOMModuleFuncs) diff --git a/src/vm/ilmarshalers.cpp b/src/vm/ilmarshalers.cpp index ea39f94fd4..7abfc019f3 100644 --- a/src/vm/ilmarshalers.cpp +++ b/src/vm/ilmarshalers.cpp @@ -3464,10 +3464,8 @@ void ILArrayWithOffsetMarshaler::EmitConvertSpaceAndContentsCLRToNativeTemp(ILCo EmitLoadNativeValue(pslILEmit); // dest pslILEmit->EmitLDLOC(m_dwPinnedLocalNum); + pslILEmit->EmitCALL(METHOD__ARRAY__GET_RAW_ARRAY_DATA, 1, 1); pslILEmit->EmitCONV_I(); - pslILEmit->EmitLDLOC(m_dwPinnedLocalNum); - pslILEmit->EmitCALL(METHOD__ARRAY__GET_DATA_PTR_OFFSET_INTERNAL, 1, 1); - pslILEmit->EmitADD(); // TODO Phase5: Use UnsafeAddrOfPinnedArrayElement EmitLoadManagedValue(pslILEmit); pslILEmit->EmitLDFLD(tokArrayWithOffset_m_offset); @@ -3510,10 +3508,8 @@ void ILArrayWithOffsetMarshaler::EmitConvertContentsNativeToCLR(ILCodeStream* ps pslILEmit->EmitSTLOC(m_dwPinnedLocalNum); pslILEmit->EmitLDLOC(m_dwPinnedLocalNum); + pslILEmit->EmitCALL(METHOD__ARRAY__GET_RAW_ARRAY_DATA, 1, 1); pslILEmit->EmitCONV_I(); - pslILEmit->EmitLDLOC(m_dwPinnedLocalNum); - pslILEmit->EmitCALL(METHOD__ARRAY__GET_DATA_PTR_OFFSET_INTERNAL, 1, 1); - pslILEmit->EmitADD(); // TODO Phase5: Use UnsafeAddrOfPinnedArrayElement pslILEmit->EmitLDLOC(m_dwOffsetLocalNum); pslILEmit->EmitADD(); // dest diff --git a/src/vm/jithelpers.cpp b/src/vm/jithelpers.cpp index e60ffaeca1..d0e0b4463b 100644 --- a/src/vm/jithelpers.cpp +++ b/src/vm/jithelpers.cpp @@ -5741,18 +5741,6 @@ Thread * __stdcall JIT_InitPInvokeFrame(InlinedCallFrame *pFrame, PTR_VOID StubS // //======================================================================== -FCIMPL3(void, JitHelpers::UnsafeSetArrayElement, PtrArray* pPtrArrayUNSAFE, INT32 index, Object* objectUNSAFE) { - FCALL_CONTRACT; - - PTRARRAYREF pPtrArray = (PTRARRAYREF)pPtrArrayUNSAFE; - OBJECTREF object = (OBJECTREF)objectUNSAFE; - - _ASSERTE(index < (INT32)pPtrArray->GetNumComponents()); - - pPtrArray->SetAt(index, object); -} -FCIMPLEND - #ifdef _TARGET_ARM_ // This function is used from the FCallMemcpy for GC polling EXTERN_C VOID FCallMemCpy_GCPoll() diff --git a/src/vm/jitinterface.h b/src/vm/jitinterface.h index 136888e6c8..82bf31b65a 100644 --- a/src/vm/jitinterface.h +++ b/src/vm/jitinterface.h @@ -1707,11 +1707,6 @@ CORINFO_GENERIC_HANDLE JIT_GenericHandleWorker(MethodDesc *pMD, void ClearJitGenericHandleCache(AppDomain *pDomain); -class JitHelpers { -public: - static FCDECL3(void, UnsafeSetArrayElement, PtrArray* pPtrArray, INT32 index, Object* object); -}; - CORJIT_FLAGS GetDebuggerCompileFlags(Module* pModule, CORJIT_FLAGS flags); bool __stdcall TrackAllocationsEnabled(); diff --git a/src/vm/marshalnative.cpp b/src/vm/marshalnative.cpp index e2b248289b..95ff46001a 100644 --- a/src/vm/marshalnative.cpp +++ b/src/vm/marshalnative.cpp @@ -255,6 +255,38 @@ FCIMPL2(VOID, MarshalNative::DestroyStructure, LPVOID ptr, ReflectClassBaseObjec } FCIMPLEND +FCIMPL1(FC_BOOL_RET, MarshalNative::IsPinnable, Object* obj) +{ + FCALL_CONTRACT; + + VALIDATEOBJECT(obj); + + if (obj == NULL) + FC_RETURN_BOOL(TRUE); + + if (obj->GetMethodTable() == g_pStringClass) + FC_RETURN_BOOL(TRUE); + + if (obj->GetMethodTable()->IsArray()) + { + BASEARRAYREF asArray = (BASEARRAYREF)ObjectToOBJECTREF(obj); + if (CorTypeInfo::IsPrimitiveType(asArray->GetArrayElementType())) + FC_RETURN_BOOL(TRUE); + + TypeHandle th = asArray->GetArrayElementTypeHandle(); + if (!th.IsTypeDesc()) + { + MethodTable *pMT = th.AsMethodTable(); + if (pMT->IsValueType() && pMT->IsBlittable()) + FC_RETURN_BOOL(TRUE); + } + + FC_RETURN_BOOL(FALSE); + } + + FC_RETURN_BOOL(obj->GetMethodTable()->IsBlittable()); +} +FCIMPLEND /************************************************************************ * PInvoke.SizeOf(Class) @@ -297,22 +329,6 @@ FCIMPLEND /************************************************************************ - * PInvoke.UnsafeAddrOfPinnedArrayElement(Array arr, int index) - */ - -FCIMPL2(LPVOID, MarshalNative::FCUnsafeAddrOfPinnedArrayElement, ArrayBase *arr, INT32 index) -{ - FCALL_CONTRACT; - - if (!arr) - FCThrowArgumentNull(W("arr")); - - return (arr->GetDataPtr() + (index*arr->GetComponentSize())); -} -FCIMPLEND - - -/************************************************************************ * PInvoke.OffsetOfHelper(Class, Field) */ FCIMPL1(UINT32, MarshalNative::OffsetOfHelper, ReflectFieldObject *pFieldUNSAFE) @@ -474,92 +490,6 @@ FCIMPL0(UINT32, MarshalNative::GetSystemMaxDBCSCharSize) } FCIMPLEND - -/************************************************************************ - * Handles all PInvoke.Copy(array source, ....) methods. - */ -FCIMPL4(void, MarshalNative::CopyToNative, Object* psrcUNSAFE, INT32 startindex, LPVOID pdst, INT32 length) -{ - CONTRACTL - { - FCALL_CHECK; - PRECONDITION(CheckPointer(pdst, NULL_OK)); - } - CONTRACTL_END; - - // The BCL code guarantees that Array will be passed in - _ASSERTE(!psrcUNSAFE || psrcUNSAFE->GetMethodTable()->IsArray()); - - BASEARRAYREF psrc = (BASEARRAYREF)(OBJECTREF)psrcUNSAFE; - - HELPER_METHOD_FRAME_BEGIN_1(psrc); - - if (pdst == NULL) - COMPlusThrowArgumentNull(W("destination")); - if (psrc == NULL) - COMPlusThrowArgumentNull(W("source")); - - SIZE_T numelem = psrc->GetNumComponents(); - - if (startindex < 0 || length < 0 || (SIZE_T)startindex + (SIZE_T)length > numelem) - { - COMPlusThrow(kArgumentOutOfRangeException, IDS_EE_COPY_OUTOFRANGE); - } - - SIZE_T componentsize = psrc->GetComponentSize(); - - memcpyNoGCRefs(pdst, - componentsize*startindex + (BYTE*)(psrc->GetDataPtr()), - componentsize*length); - - HELPER_METHOD_FRAME_END(); -} -FCIMPLEND - -FCIMPL4(void, MarshalNative::CopyToManaged, LPVOID psrc, Object* pdstUNSAFE, INT32 startindex, INT32 length) -{ - CONTRACTL - { - FCALL_CHECK; - PRECONDITION(CheckPointer(psrc, NULL_OK)); - } - CONTRACTL_END; - - // The BCL code guarantees that Array will be passed in - _ASSERTE(!pdstUNSAFE || pdstUNSAFE->GetMethodTable()->IsArray()); - - BASEARRAYREF pdst = (BASEARRAYREF)(OBJECTREF)pdstUNSAFE; - - HELPER_METHOD_FRAME_BEGIN_1(pdst); - - if (pdst == NULL) - COMPlusThrowArgumentNull(W("destination")); - if (psrc == NULL) - COMPlusThrowArgumentNull(W("source")); - if (startindex < 0) - COMPlusThrowArgumentOutOfRange(W("startIndex"), W("ArgumentOutOfRange_Count")); - if (length < 0) - COMPlusThrowArgumentOutOfRange(W("length"), W("ArgumentOutOfRange_NeedNonNegNum")); - - SIZE_T numelem = pdst->GetNumComponents(); - - if ((SIZE_T)startindex + (SIZE_T)length > numelem) - { - COMPlusThrow(kArgumentOutOfRangeException, IDS_EE_COPY_OUTOFRANGE); - } - - SIZE_T componentsize = pdst->GetComponentSize(); - - _ASSERTE(CorTypeInfo::IsPrimitiveType(pdst->GetArrayElementTypeHandle().GetInternalCorElementType())); - memcpyNoGCRefs(componentsize*startindex + (BYTE*)(pdst->GetDataPtr()), - psrc, - componentsize*length); - - HELPER_METHOD_FRAME_END(); -} -FCIMPLEND - - /************************************************************************ * PInvoke.GetLastWin32Error */ @@ -696,7 +626,6 @@ FCIMPL3(VOID, MarshalNative::GCHandleInternalSet, OBJECTHANDLE handle, Object *o OBJECTREF objRef(obj); HELPER_METHOD_FRAME_BEGIN_1(objRef); - //<TODO>@todo: If the handle is pinned check the object type.</TODO> if (isPinned) { ValidatePinnedObject(objRef); @@ -718,7 +647,6 @@ FCIMPL4(Object*, MarshalNative::GCHandleInternalCompareExchange, OBJECTHANDLE ha LPVOID ret = NULL; HELPER_METHOD_FRAME_BEGIN_RET_NOPOLL(); - //<TODO>@todo: If the handle is pinned check the object type.</TODO> if (isPinned) ValidatePinnedObject(newObjref); @@ -766,52 +694,6 @@ FCIMPL1(INT32, MarshalNative::GCHandleInternalGetHandleType, OBJECTHANDLE handle } FCIMPLEND -FCIMPL1(INT32, MarshalNative::CalculateCount, ArrayWithOffsetData* pArrayWithOffset) -{ - FCALL_CONTRACT; - - INT32 uRetVal = 0; - BASEARRAYREF arrayObj = pArrayWithOffset->m_Array; - HELPER_METHOD_FRAME_BEGIN_RET_1(arrayObj); - - SIZE_T cbTotalSize = 0; - - if (arrayObj != NULL) - { - if (!(arrayObj->GetMethodTable()->IsArray())) - COMPlusThrow(kArgumentException, IDS_EE_NOTISOMORPHIC); - if (arrayObj->GetMethodTable()->IsMultiDimArray()) - COMPlusThrow(kArgumentException, IDS_EE_NOTISOMORPHIC); - - ValidatePinnedObject(arrayObj); - } - - if (arrayObj == NULL) - { - if (pArrayWithOffset->m_cbOffset != 0) - COMPlusThrow(kIndexOutOfRangeException, IDS_EE_ARRAYWITHOFFSETOVERFLOW); - - goto lExit; - } - - cbTotalSize = arrayObj->GetNumComponents() * arrayObj->GetComponentSize(); - - if (cbTotalSize > MAX_SIZE_FOR_INTEROP) - COMPlusThrow(kArgumentException, IDS_EE_STRUCTARRAYTOOLARGE); - - if (pArrayWithOffset->m_cbOffset > (INT32)cbTotalSize) - COMPlusThrow(kIndexOutOfRangeException, IDS_EE_ARRAYWITHOFFSETOVERFLOW); - - uRetVal = (INT32)cbTotalSize - pArrayWithOffset->m_cbOffset; - _ASSERTE(uRetVal >= 0); - -lExit: ; - HELPER_METHOD_FRAME_END(); - return uRetVal; -} -FCIMPLEND - - //==================================================================== // *** Interop Helpers *** //==================================================================== diff --git a/src/vm/marshalnative.h b/src/vm/marshalnative.h index 85be41a86b..53a9966218 100644 --- a/src/vm/marshalnative.h +++ b/src/vm/marshalnative.h @@ -49,21 +49,18 @@ public: static FCDECL1(int, GetHRForException, Object* eUNSAFE); static FCDECL1(int, GetHRForException_WinRT, Object* eUNSAFE); - static FCDECL4(void, CopyToNative, Object* psrcUNSAFE, INT32 startindex, LPVOID pdst, INT32 length); - static FCDECL4(void, CopyToManaged, LPVOID psrc, Object* pdstUNSAFE, INT32 startindex, INT32 length); static FCDECL2(UINT32, SizeOfClass, ReflectClassBaseObject* refClass, CLR_BOOL throwIfNotMarshalable); - static FCDECL2(LPVOID, FCUnsafeAddrOfPinnedArrayElement, ArrayBase *arr, INT32 index); - static FCDECL1(UINT32, OffsetOfHelper, ReflectFieldObject* pFieldUNSAFE); static FCDECL0(int, GetLastWin32Error); static FCDECL1(void, SetLastWin32Error, int error); - static FCDECL1(INT32, CalculateCount, ArrayWithOffsetData* pRef); static FCDECL3(VOID, StructureToPtr, Object* pObjUNSAFE, LPVOID ptr, CLR_BOOL fDeleteOld); static FCDECL3(VOID, PtrToStructureHelper, LPVOID ptr, Object* pObjIn, CLR_BOOL allowValueClasses); static FCDECL2(VOID, DestroyStructure, LPVOID ptr, ReflectClassBaseObject* refClassUNSAFE); + static FCDECL1(FC_BOOL_RET, IsPinnable, Object* obj); + //==================================================================== // map a fiber cookie from the hosting APIs into a managed Thread object //==================================================================== diff --git a/src/vm/metasig.h b/src/vm/metasig.h index cbac116bd3..e8327fc020 100644 --- a/src/vm/metasig.h +++ b/src/vm/metasig.h @@ -515,7 +515,7 @@ DEFINE_METASIG_T(SM(RuntimeTypeHandle_RetIntPtr, g(RT_TYPE_HANDLE), I)) DEFINE_METASIG_T(SM(RuntimeMethodHandle_RetIntPtr, g(METHOD_HANDLE), I)) DEFINE_METASIG_T(SM(IntPtr_Type_RetDelegate, I C(TYPE), C(DELEGATE))) - +DEFINE_METASIG(IM(RetRefByte, _, r(b))) DEFINE_METASIG_T(IM(Type_RetArrObj, C(TYPE) F, a(j))) DEFINE_METASIG(IM(Bool_RetVoid, F, v)) DEFINE_METASIG_T(IM(BindingFlags_RetArrFieldInfo, g(BINDING_FLAGS), a(C(FIELD_INFO)))) diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h index 94acf84f58..95819d95b6 100644 --- a/src/vm/mscorlib.h +++ b/src/vm/mscorlib.h @@ -92,7 +92,7 @@ DEFINE_CLASS(ARGUMENT_HANDLE, System, RuntimeArgumentHandl DEFINE_CLASS(ARRAY, System, Array) DEFINE_PROPERTY(ARRAY, LENGTH, Length, Int) -DEFINE_METHOD(ARRAY, GET_DATA_PTR_OFFSET_INTERNAL, GetDataPtrOffsetInternal, IM_RetInt) +DEFINE_METHOD(ARRAY, GET_RAW_ARRAY_DATA, GetRawArrayData, IM_RetRefByte) DEFINE_CLASS(ARRAY_WITH_OFFSET, Interop, ArrayWithOffset) DEFINE_FIELD(ARRAY_WITH_OFFSET, M_ARRAY, m_array) |