From bb82d679dc1aff1c26bc93aaea3dd9e8f274df5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexander=20K=C3=B6plinger?= Date: Wed, 29 Jul 2020 16:44:16 +0200 Subject: [PATCH] [wasm] Remove unused icalls for Environment properties (#40079) They are no longer needed after https://github.com/dotnet/runtime/pull/38996 since we return values in managed code now. --- src/mono/mono/metadata/icall-decl.h | 2 ++ src/mono/mono/metadata/icall-def-netcore.h | 3 --- src/mono/mono/metadata/icall.c | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mono/mono/metadata/icall-decl.h b/src/mono/mono/metadata/icall-decl.h index 1bb8ab1..2c153f8 100644 --- a/src/mono/mono/metadata/icall-decl.h +++ b/src/mono/mono/metadata/icall-decl.h @@ -159,7 +159,9 @@ ICALL_EXPORT gint64 ves_icall_System_GC_GetTotalMemory (MonoBoolean forceCollect ICALL_EXPORT gint64 ves_icall_System_Threading_Timer_GetTimeMonotonic (void); ICALL_EXPORT gpointer ves_icall_System_GCHandle_GetAddrOfPinnedObject (MonoGCHandle handle); ICALL_EXPORT int ves_icall_Interop_Sys_DoubleToString (double, char*, char*, int); +#if !ENABLE_NETCORE ICALL_EXPORT int ves_icall_System_Environment_get_Platform (void); +#endif ICALL_EXPORT int ves_icall_System_GC_GetCollectionCount (int); ICALL_EXPORT int ves_icall_System_GC_GetMaxGeneration (void); ICALL_EXPORT gint64 ves_icall_System_GC_GetAllocatedBytesForCurrentThread (void); diff --git a/src/mono/mono/metadata/icall-def-netcore.h b/src/mono/mono/metadata/icall-def-netcore.h index ee55fbb..8e3a618 100644 --- a/src/mono/mono/metadata/icall-def-netcore.h +++ b/src/mono/mono/metadata/icall-def-netcore.h @@ -94,11 +94,8 @@ HANDLES(ENV_2, "GetCommandLineArgs", ves_icall_System_Environment_GetCommandLine HANDLES(ENV_3, "GetEnvironmentVariableNames", ves_icall_System_Environment_GetEnvironmentVariableNames, MonoArray, 0, ()) NOHANDLES(ICALL(ENV_4, "GetProcessorCount", ves_icall_System_Environment_get_ProcessorCount)) NOHANDLES(ICALL(ENV_9, "get_ExitCode", mono_environment_exitcode_get)) -HANDLES(ENV_11, "get_MachineName", ves_icall_System_Environment_get_MachineName, MonoString, 0, ()) -NOHANDLES(ICALL(ENV_13, "get_Platform", ves_icall_System_Environment_get_Platform)) NOHANDLES(ICALL(ENV_15, "get_TickCount", ves_icall_System_Environment_get_TickCount)) NOHANDLES(ICALL(ENV_15a, "get_TickCount64", ves_icall_System_Environment_get_TickCount64)) -HANDLES(ENV_16, "get_UserName", ves_icall_System_Environment_get_UserName, MonoString, 0, ()) HANDLES(ENV_17, "internalGetEnvironmentVariable_native", ves_icall_System_Environment_GetEnvironmentVariable_native, MonoString, 1, (const_char_ptr)) NOHANDLES(ICALL(ENV_20, "set_ExitCode", mono_environment_exitcode_set)) diff --git a/src/mono/mono/metadata/icall.c b/src/mono/mono/metadata/icall.c index c58854c..479ba5e 100644 --- a/src/mono/mono/metadata/icall.c +++ b/src/mono/mono/metadata/icall.c @@ -7523,6 +7523,7 @@ ves_icall_Remoting_RealProxy_InternalGetProxyType (MonoTransparentProxyHandle tp /* System.Environment */ +#ifndef ENABLE_NETCORE MonoStringHandle ves_icall_System_Environment_get_UserName (MonoError *error) { @@ -7606,6 +7607,7 @@ ves_icall_System_Environment_get_Platform (void) { return mono_icall_get_platform (); } +#endif /* !ENABLE_NETCORE */ #ifndef HOST_WIN32 static MonoStringHandle -- 2.7.4