From 38f675c2ab204a3e6da84bd69542385c42b8a16e Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Mon, 8 Nov 2021 21:47:25 +0200 Subject: [PATCH 1/3] Delete unused mono_unbox_int --- src/mono/wasm/runtime/driver.c | 35 ---------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/mono/wasm/runtime/driver.c b/src/mono/wasm/runtime/driver.c index a978fc59790d65..6d7bc868ea88b7 100644 --- a/src/mono/wasm/runtime/driver.c +++ b/src/mono/wasm/runtime/driver.c @@ -1072,41 +1072,6 @@ mono_wasm_try_unbox_primitive_and_get_type (MonoObject *obj, void *result, int r return resultType; } -// FIXME: This function is retained specifically because runtime-test.js uses it -EMSCRIPTEN_KEEPALIVE int -mono_unbox_int (MonoObject *obj) -{ - if (!obj) - return 0; - MonoType *type = mono_class_get_type (mono_object_get_class(obj)); - - void *ptr = mono_object_unbox (obj); - switch (mono_type_get_type (type)) { - case MONO_TYPE_I1: - case MONO_TYPE_BOOLEAN: - return *(signed char*)ptr; - case MONO_TYPE_U1: - return *(unsigned char*)ptr; - case MONO_TYPE_I2: - return *(short*)ptr; - case MONO_TYPE_U2: - return *(unsigned short*)ptr; - case MONO_TYPE_I4: - case MONO_TYPE_I: - return *(int*)ptr; - case MONO_TYPE_U4: - return *(unsigned int*)ptr; - case MONO_TYPE_CHAR: - return *(short*)ptr; - // WASM doesn't support returning longs to JS - // case MONO_TYPE_I8: - // case MONO_TYPE_U8: - default: - printf ("Invalid type %d to mono_unbox_int\n", mono_type_get_type (type)); - return 0; - } -} - EMSCRIPTEN_KEEPALIVE int mono_wasm_array_length (MonoArray *array) { From d12bdfe828ca1b011a73f1e44eeff3436140da2f Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Tue, 9 Nov 2021 22:09:34 +0200 Subject: [PATCH 2/3] Fix gcc step display name --- eng/pipelines/coreclr/templates/build-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 9aa975a2634710..408a9420b6306e 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -231,7 +231,7 @@ jobs: # Build libs.native, host.native and mono with gcc - ${{ if eq(parameters.compilerName, 'gcc') }}: - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) libs.native+host.native+mono $(compilerArg) $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci - displayName: Build clr+mono+libs.native+host.native + displayName: Build mono+libs.native+host.native # Sign and add entitlements to these MacOS binaries - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: From fed947f45721f1c2b6219d48762f82b24d7613fe Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Wed, 10 Nov 2021 01:02:07 +0200 Subject: [PATCH 3/3] Match command invocation order --- eng/pipelines/coreclr/templates/build-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 408a9420b6306e..a8c57eadac6255 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -231,7 +231,7 @@ jobs: # Build libs.native, host.native and mono with gcc - ${{ if eq(parameters.compilerName, 'gcc') }}: - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) libs.native+host.native+mono $(compilerArg) $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci - displayName: Build mono+libs.native+host.native + displayName: Build libs.native+host.native+mono # Sign and add entitlements to these MacOS binaries - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: