Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

using System;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;

namespace Internal.Runtime.InteropServices
{
[UnsupportedOSPlatform("browser")]
internal static class ComActivator
{
/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/vm/corelib.h
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,12 @@ DEFINE_CLASS(CALLCONV_SUPPRESSGCTRANSITION, CompilerServices, CallConvSup
DEFINE_CLASS(CALLCONV_MEMBERFUNCTION, CompilerServices, CallConvMemberFunction)
DEFINE_CLASS(CALLCONV_SWIFT, CompilerServices, CallConvSwift)

#if !defined(TARGET_WASM) || !defined(FOR_ILLINK)
DEFINE_CLASS(SWIFT_SELF, Swift, SwiftSelf)
DEFINE_CLASS(SWIFT_SELF_T, Swift, SwiftSelf`1)
DEFINE_CLASS(SWIFT_ERROR, Swift, SwiftError)
DEFINE_CLASS(SWIFT_INDIRECT_RESULT, Swift, SwiftIndirectResult)
#endif // !defined(TARGET_WASM) || !defined(FOR_ILLINK)

DEFINE_CLASS(SAFE_HANDLE, Interop, SafeHandle)
DEFINE_FIELD(SAFE_HANDLE, HANDLE, handle)
Expand Down Expand Up @@ -1177,7 +1179,9 @@ DEFINE_METHOD(HANDLE_MARSHALER, CONVERT_SAFEHANDLE_TO_NATIVE,ConvertSaf
DEFINE_METHOD(HANDLE_MARSHALER, THROW_SAFEHANDLE_FIELD_CHANGED, ThrowSafeHandleFieldChanged, SM_RetVoid)
DEFINE_METHOD(HANDLE_MARSHALER, THROW_CRITICALHANDLE_FIELD_CHANGED, ThrowCriticalHandleFieldChanged, SM_RetVoid)

#if !defined(TARGET_WASM) || !defined(FOR_ILLINK)
DEFINE_CLASS(COMVARIANT, Marshalling, ComVariant)
#endif // !defined(TARGET_WASM) || !defined(FOR_ILLINK)

DEFINE_CLASS(SZARRAYHELPER, System, SZArrayHelper)
// Note: The order of methods here has to match order they are implemented on the interfaces in
Expand Down
8 changes: 8 additions & 0 deletions src/coreclr/vm/rexcep.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,19 @@ DEFINE_EXCEPTION(g_SystemNS, InvalidCastException, false, C
DEFINE_EXCEPTION(g_InteropNS, InvalidComObjectException, false, COR_E_INVALIDCOMOBJECT)
#endif //FEATURE_COMINTEROP
DEFINE_EXCEPTION(g_ReflectionNS, InvalidFilterCriteriaException, false, COR_E_INVALIDFILTERCRITERIA)
#if !defined(TARGET_WASM) || !defined(FOR_ILLINK)
DEFINE_EXCEPTION(g_InteropNS, InvalidOleVariantTypeException, false, COR_E_INVALIDOLEVARIANTTYPE)
#endif // !defined(TARGET_WASM) || !defined(FOR_ILLINK)

DEFINE_EXCEPTION(g_SystemNS, InvalidOperationException, false, COR_E_INVALIDOPERATION)

DEFINE_EXCEPTION(g_SystemNS, InvalidProgramException, false, COR_E_INVALIDPROGRAM)

DEFINE_EXCEPTION(g_IONS, IOException, false, COR_E_IO, CTL_E_DEVICEIOERROR, STD_CTL_SCODE(31036), STD_CTL_SCODE(31037))

#if !defined(TARGET_WASM) || !defined(FOR_ILLINK)
DEFINE_EXCEPTION(g_InteropNS, MarshalDirectiveException, false, COR_E_MARSHALDIRECTIVE)
#endif // !defined(TARGET_WASM) || !defined(FOR_ILLINK)
DEFINE_EXCEPTION(g_SystemNS, MethodAccessException, false, COR_E_METHODACCESS, META_E_CA_FRIENDS_SN_REQUIRED)
DEFINE_EXCEPTION(g_SystemNS, MemberAccessException, false, COR_E_MEMBERACCESS)
DEFINE_EXCEPTION(g_SystemNS, MissingFieldException, false, COR_E_MISSINGFIELD)
Expand Down Expand Up @@ -258,9 +262,13 @@ DEFINE_EXCEPTION(g_SystemNS, UnauthorizedAccessException, true, C
DEFINE_EXCEPTION(g_SecurityNS, VerificationException, false, COR_E_VERIFICATION)


#if !defined(TARGET_WASM) || !defined(FOR_ILLINK)
DEFINE_EXCEPTION(g_InteropNS, COMException, false, E_FAIL)
#ifdef FEATURE_COMINTEROP
DEFINE_EXCEPTION(g_InteropNS, ExternalException, false, E_FAIL)
#endif //FEATURE_COMINTEROP
DEFINE_EXCEPTION(g_InteropNS, SEHException, false, E_FAIL)
#endif // !defined(TARGET_WASM) || !defined(FOR_ILLINK)
DEFINE_EXCEPTION(g_SystemNS, NotImplementedException, false, E_NOTIMPL)

DEFINE_EXCEPTION(g_SystemNS, OutOfMemoryException, false, E_OUTOFMEMORY, CTL_E_OUTOFMEMORY, STD_CTL_SCODE(31001))
Expand Down
10 changes: 9 additions & 1 deletion src/coreclr/vm/wasm/callhelpers-pinvoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ extern "C" {
int32_t SystemNative_FSync (void *);
int32_t SystemNative_FTruncate (void *, int64_t);
int32_t SystemNative_FUTimens (void *, void *);
int32_t SystemNative_FcntlGetIsNonBlocking (void *, void *);
int32_t SystemNative_FcntlSetFD (void *, int32_t);
int32_t SystemNative_FileSystemSupportsLocking (void *, int32_t, int32_t);
void SystemNative_Free (void *);
Expand Down Expand Up @@ -128,9 +129,11 @@ extern "C" {
int64_t SystemNative_PReadV (void *, void *, int32_t, int64_t);
int32_t SystemNative_PWrite (void *, void *, int32_t, int64_t);
int64_t SystemNative_PWriteV (void *, void *, int32_t, int64_t);
int32_t SystemNative_Pipe (void *, int32_t);
int32_t SystemNative_PosixFAdvise (void *, int64_t, int64_t, int32_t);
int32_t SystemNative_Read (void *, void *, int32_t);
int32_t SystemNative_ReadDir (void *, void *);
int32_t SystemNative_ReadFromNonblocking (void *, void *, int32_t);
int32_t SystemNative_ReadLink (void *, void *, int32_t);
void * SystemNative_Realloc (void *, void *);
int32_t SystemNative_Rename (void *, void *);
Expand All @@ -147,6 +150,7 @@ extern "C" {
int32_t SystemNative_UTimensat (void *, void *);
int32_t SystemNative_Unlink (void *);
int32_t SystemNative_Write (void *, void *, int32_t);
int32_t SystemNative_WriteToNonblocking (void *, void *, int32_t);
} // extern "C"

static const Entry s_libSystem_Globalization_Native [] = {
Expand Down Expand Up @@ -218,6 +222,7 @@ static const Entry s_libSystem_Native [] = {
DllImportEntry(SystemNative_FSync) // System.Private.CoreLib
DllImportEntry(SystemNative_FTruncate) // System.IO.MemoryMappedFiles, System.Private.CoreLib
DllImportEntry(SystemNative_FUTimens) // System.Private.CoreLib
DllImportEntry(SystemNative_FcntlGetIsNonBlocking) // System.Private.CoreLib
DllImportEntry(SystemNative_FcntlSetFD) // System.IO.MemoryMappedFiles
DllImportEntry(SystemNative_FileSystemSupportsLocking) // System.Private.CoreLib
DllImportEntry(SystemNative_Free) // System.Private.CoreLib
Expand Down Expand Up @@ -266,9 +271,11 @@ static const Entry s_libSystem_Native [] = {
DllImportEntry(SystemNative_PReadV) // System.Private.CoreLib
DllImportEntry(SystemNative_PWrite) // System.Private.CoreLib
DllImportEntry(SystemNative_PWriteV) // System.Private.CoreLib
DllImportEntry(SystemNative_Pipe) // System.Private.CoreLib
DllImportEntry(SystemNative_PosixFAdvise) // System.Private.CoreLib
DllImportEntry(SystemNative_Read) // System.Private.CoreLib
DllImportEntry(SystemNative_ReadDir) // System.Private.CoreLib
DllImportEntry(SystemNative_ReadFromNonblocking) // System.Private.CoreLib
DllImportEntry(SystemNative_ReadLink) // System.Private.CoreLib
DllImportEntry(SystemNative_Realloc) // System.Private.CoreLib
DllImportEntry(SystemNative_Rename) // System.Private.CoreLib
Expand All @@ -285,6 +292,7 @@ static const Entry s_libSystem_Native [] = {
DllImportEntry(SystemNative_UTimensat) // System.Private.CoreLib
DllImportEntry(SystemNative_Unlink) // System.IO.MemoryMappedFiles, System.Private.CoreLib
DllImportEntry(SystemNative_Write) // System.Console, System.Private.CoreLib
DllImportEntry(SystemNative_WriteToNonblocking) // System.Private.CoreLib
};

static const Entry s_libSystem_Native_Browser [] = {
Expand All @@ -309,7 +317,7 @@ typedef struct PInvokeTable {
static PInvokeTable s_PInvokeTables[] = {
{"libSystem.Globalization.Native", s_libSystem_Globalization_Native, 33},
{"libSystem.IO.Compression.Native", s_libSystem_IO_Compression_Native, 8},
{"libSystem.Native", s_libSystem_Native, 88},
{"libSystem.Native", s_libSystem_Native, 92},
{"libSystem.Native.Browser", s_libSystem_Native_Browser, 1},
{"libSystem.Runtime.InteropServices.JavaScript.Native", s_libSystem_Runtime_InteropServices_JavaScript_Native, 6}
};
Expand Down
Loading
Loading