diff --git a/src/mono/wasi/mono-include/driver.h b/src/mono/wasi/mono-include/driver.h index 5e1f66825f588..47c72f146f7c1 100644 --- a/src/mono/wasi/mono-include/driver.h +++ b/src/mono/wasi/mono-include/driver.h @@ -19,7 +19,6 @@ MonoArray* mono_wasm_obj_array_new (int size); void mono_wasm_obj_array_set (MonoArray *array, int idx, MonoObject *obj); MonoArray* mono_wasm_string_array_new (int size); MonoString *mono_wasm_string_from_js (const char *str); -int mono_wasm_array_length(MonoArray* array); char *mono_wasm_string_get_utf8 (MonoString *str); MonoMethod* lookup_dotnet_method(const char* assembly_name, const char* namespace, const char* type_name, const char* method_name, int num_params); diff --git a/src/mono/wasm/runtime/cwraps.ts b/src/mono/wasm/runtime/cwraps.ts index 7842d98db7044..33f864ec39c82 100644 --- a/src/mono/wasm/runtime/cwraps.ts +++ b/src/mono/wasm/runtime/cwraps.ts @@ -27,7 +27,6 @@ const fn_signatures: SigLine[] = [ [true, "mono_background_exec", null, []], [true, "mono_set_timeout_exec", null, []], [true, "mono_wasm_load_icu_data", "number", ["number"]], - [true, "mono_wasm_get_icudt_name", "string", ["string"]], [false, "mono_wasm_add_assembly", "number", ["string", "number", "number"]], [true, "mono_wasm_add_satellite_assembly", "void", ["string", "string", "number", "number"]], [false, "mono_wasm_load_runtime", null, ["string", "number"]], @@ -47,7 +46,6 @@ const fn_signatures: SigLine[] = [ [true, "mono_wasm_string_get_utf8", "number", ["number"]], [true, "mono_wasm_string_from_utf16_ref", "void", ["number", "number", "number"]], [true, "mono_wasm_get_obj_type", "number", ["number"]], - [true, "mono_wasm_array_length", "number", ["number"]], [true, "mono_wasm_array_length_ref", "number", ["number"]], [true, "mono_wasm_array_get", "number", ["number", "number"]], [true, "mono_wasm_array_get_ref", "void", ["number", "number", "number"]], @@ -141,7 +139,6 @@ export interface t_Cwraps { mono_background_exec(): void; mono_set_timeout_exec(): void; mono_wasm_load_icu_data(offset: VoidPtr): number; - mono_wasm_get_icudt_name(name: string): string; mono_wasm_add_assembly(name: string, data: VoidPtr, size: number): number; mono_wasm_add_satellite_assembly(name: string, culture: string, data: VoidPtr, size: number): void; mono_wasm_load_runtime(unused: string, debugLevel: number): void; @@ -166,7 +163,6 @@ export interface t_Cwraps { */ mono_wasm_string_get_utf8(str: MonoString): CharPtr; mono_wasm_string_from_utf16_ref(str: CharPtr, len: number, result: MonoObjectRef): void; - mono_wasm_array_length(array: MonoArray): number; mono_wasm_array_length_ref(array: MonoObjectRef): number; mono_wasm_array_get_ref(array: MonoObjectRef, idx: number, result: MonoObjectRef): void; diff --git a/src/mono/wasm/runtime/driver.c b/src/mono/wasm/runtime/driver.c index 9b145963b0d4c..38f5efd8c9d1b 100644 --- a/src/mono/wasm/runtime/driver.c +++ b/src/mono/wasm/runtime/driver.c @@ -1218,13 +1218,6 @@ mono_wasm_try_unbox_primitive_and_get_type_ref (MonoObject **objRef, void *resul return retval; } -// FIXME: Ref -EMSCRIPTEN_KEEPALIVE int -mono_wasm_array_length (MonoArray *array) -{ - return mono_array_length (array); -} - EMSCRIPTEN_KEEPALIVE int mono_wasm_array_length_ref (MonoArray **array) { diff --git a/src/mono/wasm/runtime/es6/dotnet.es6.lib.js b/src/mono/wasm/runtime/es6/dotnet.es6.lib.js index 28fd1168148ee..281cc1c5a77e0 100644 --- a/src/mono/wasm/runtime/es6/dotnet.es6.lib.js +++ b/src/mono/wasm/runtime/es6/dotnet.es6.lib.js @@ -106,7 +106,6 @@ const linked_functions = [ // pal_icushim_static.c "mono_wasm_load_icu_data", - "mono_wasm_get_icudt_name", #if USE_PTHREADS /// mono-threads-wasm.c diff --git a/src/mono/wasm/runtime/exports-linker.ts b/src/mono/wasm/runtime/exports-linker.ts index 733bdd952c310..6c1c0c844b183 100644 --- a/src/mono/wasm/runtime/exports-linker.ts +++ b/src/mono/wasm/runtime/exports-linker.ts @@ -5,7 +5,7 @@ import MonoWasmThreads from "consts:monoWasmThreads"; import { mono_wasm_fire_debugger_agent_message_with_data, mono_wasm_fire_debugger_agent_message_with_data_to_pause, mono_wasm_debugger_log, mono_wasm_add_dbg_command_received, mono_wasm_set_entrypoint_breakpoint } from "./debug"; import { mono_wasm_release_cs_owned_object } from "./gc-handles"; -import { mono_wasm_load_icu_data, mono_wasm_get_icudt_name } from "./icu"; +import { mono_wasm_load_icu_data } from "./icu"; import { mono_wasm_bind_cs_function } from "./invoke-cs"; import { mono_wasm_bind_js_function, mono_wasm_invoke_bound_function, mono_wasm_invoke_import } from "./invoke-js"; import { mono_interp_tier_prepare_jiterpreter } from "./jiterpreter"; @@ -93,7 +93,6 @@ export function export_linker(): any { // pal_icushim_static.c mono_wasm_load_icu_data, - mono_wasm_get_icudt_name, // threading exports, if threading is enabled ...mono_wasm_threads_exports, diff --git a/src/mono/wasm/runtime/icu.ts b/src/mono/wasm/runtime/icu.ts index 27cccaf2f63e5..4648cadbdf351 100644 --- a/src/mono/wasm/runtime/icu.ts +++ b/src/mono/wasm/runtime/icu.ts @@ -16,14 +16,6 @@ export function mono_wasm_load_icu_data(offset: VoidPtr): boolean { return ok; } -// Get icudt.dat exact filename that matches given culture, examples: -// "ja" -> "icudt_CJK.dat" -// "en_US" (or "en-US" or just "en") -> "icudt_EFIGS.dat" -// etc, see "mono_wasm_get_icudt_name" implementation in pal_icushim_static.c -export function mono_wasm_get_icudt_name(culture: string): string { - return cwraps.mono_wasm_get_icudt_name(culture); -} - // Performs setup for globalization. // @globalizationMode is one of "icu", "invariant", or "auto". // "auto" will use "icu" if any ICU data archives have been loaded, diff --git a/src/native/libs/System.Globalization.Native/pal_icushim.h b/src/native/libs/System.Globalization.Native/pal_icushim.h index 51e117113de1c..ec4dea95dc119 100644 --- a/src/native/libs/System.Globalization.Native/pal_icushim.h +++ b/src/native/libs/System.Globalization.Native/pal_icushim.h @@ -13,6 +13,4 @@ PALEXPORT int32_t GlobalizationNative_GetICUVersion(void); PALEXPORT int32_t GlobalizationNative_LoadICUData(const char* path); -PALEXPORT const char* GlobalizationNative_GetICUDTName(const char* culture); - #endif diff --git a/src/native/libs/System.Globalization.Native/pal_icushim_static.c b/src/native/libs/System.Globalization.Native/pal_icushim_static.c index 69fcbb03ae31a..34d49a0be3233 100644 --- a/src/native/libs/System.Globalization.Native/pal_icushim_static.c +++ b/src/native/libs/System.Globalization.Native/pal_icushim_static.c @@ -50,13 +50,6 @@ static int32_t load_icu_data(const void* pData); #ifdef __EMSCRIPTEN__ #include -EMSCRIPTEN_KEEPALIVE const char* mono_wasm_get_icudt_name(const char* culture); - -EMSCRIPTEN_KEEPALIVE const char* mono_wasm_get_icudt_name(const char* culture) -{ - return GlobalizationNative_GetICUDTName(culture); -} - EMSCRIPTEN_KEEPALIVE int32_t mono_wasm_load_icu_data(const void* pData); EMSCRIPTEN_KEEPALIVE int32_t mono_wasm_load_icu_data(const void* pData) @@ -200,35 +193,6 @@ GlobalizationNative_LoadICUData(const char* path) return GlobalizationNative_LoadICU(); } -const char* GlobalizationNative_GetICUDTName(const char* culture) -{ - // Based on https://github.com/dotnet/icu/tree/maint/maint-67/icu-filters - - // Use full one if culture is null or empty - if (!culture || strlen(culture) < 2) - return "icudt.dat"; - - // CJK: starts with "ja", "ko" or "zh" - if (!strncasecmp("ja", culture, 2) || - !strncasecmp("ko", culture, 2) || - !strncasecmp("zh", culture, 2)) - return "icudt_CJK.dat"; // contains "en" as well. - - // EFIGS - const char* efigsCultures[15] = { - "en-US", "fr-FR", "es-ES", "it-IT", "de-DE", - "en_US", "fr_FR", "es_ES", "it_IT", "de_DE", - "en", "fr", "es", "it", "de" - }; - - for (int i = 0; i < 15; i++) - if (!strcasecmp(culture, efigsCultures[i])) - return "icudt_EFIGS.dat"; - - // full except CJK cultures - return "icudt_no_CJK.dat"; -} - int32_t GlobalizationNative_LoadICU(void) { #if !defined(LOCAL_BUILD)