Skip to content

Commit b07b26d

Browse files
authored
Delete unused mono_unbox_int (#61384)
* Delete unused mono_unbox_int * Fix gcc step display name * Match command invocation order
1 parent 4952db9 commit b07b26d

File tree

2 files changed

+1
-36
lines changed

2 files changed

+1
-36
lines changed

eng/pipelines/coreclr/templates/build-job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ jobs:
231231
# Build libs.native, host.native and mono with gcc
232232
- ${{ if eq(parameters.compilerName, 'gcc') }}:
233233
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) libs.native+host.native+mono $(compilerArg) $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci
234-
displayName: Build clr+mono+libs.native+host.native
234+
displayName: Build libs.native+host.native+mono
235235

236236
# Sign and add entitlements to these MacOS binaries
237237
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:

src/mono/wasm/runtime/driver.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,41 +1072,6 @@ mono_wasm_try_unbox_primitive_and_get_type (MonoObject *obj, void *result, int r
10721072
return resultType;
10731073
}
10741074

1075-
// FIXME: This function is retained specifically because runtime-test.js uses it
1076-
EMSCRIPTEN_KEEPALIVE int
1077-
mono_unbox_int (MonoObject *obj)
1078-
{
1079-
if (!obj)
1080-
return 0;
1081-
MonoType *type = mono_class_get_type (mono_object_get_class(obj));
1082-
1083-
void *ptr = mono_object_unbox (obj);
1084-
switch (mono_type_get_type (type)) {
1085-
case MONO_TYPE_I1:
1086-
case MONO_TYPE_BOOLEAN:
1087-
return *(signed char*)ptr;
1088-
case MONO_TYPE_U1:
1089-
return *(unsigned char*)ptr;
1090-
case MONO_TYPE_I2:
1091-
return *(short*)ptr;
1092-
case MONO_TYPE_U2:
1093-
return *(unsigned short*)ptr;
1094-
case MONO_TYPE_I4:
1095-
case MONO_TYPE_I:
1096-
return *(int*)ptr;
1097-
case MONO_TYPE_U4:
1098-
return *(unsigned int*)ptr;
1099-
case MONO_TYPE_CHAR:
1100-
return *(short*)ptr;
1101-
// WASM doesn't support returning longs to JS
1102-
// case MONO_TYPE_I8:
1103-
// case MONO_TYPE_U8:
1104-
default:
1105-
printf ("Invalid type %d to mono_unbox_int\n", mono_type_get_type (type));
1106-
return 0;
1107-
}
1108-
}
1109-
11101075
EMSCRIPTEN_KEEPALIVE int
11111076
mono_wasm_array_length (MonoArray *array)
11121077
{

0 commit comments

Comments
 (0)