Skip to content

Commit

Permalink
[mono][jit] Resolved compiler warnings. dotnet#33015
Browse files Browse the repository at this point in the history
  • Loading branch information
jandupej committed Sep 16, 2022
1 parent 2c8bc49 commit 4100fcb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -5649,14 +5649,12 @@ is_addressable_valuetype_load (MonoCompile* cfg, guint8* ip, MonoType* ldtype)
return is_load_instruction && is_in_previous_bb && is_struct;
}

gboolean
static gboolean
check_get_virtual_method_assumptions (MonoClass* klass, MonoMethod* method)
{
if (((method->flags & METHOD_ATTRIBUTE_FINAL) || !(method->flags & METHOD_ATTRIBUTE_VIRTUAL)))
return TRUE;

MonoMethod** vtable = m_class_get_vtable (klass);

if (method->slot == -1) {
if (method->is_inflated) {
if (((MonoMethodInflated*)method)->declaring->slot == -1)
Expand All @@ -5667,7 +5665,6 @@ check_get_virtual_method_assumptions (MonoClass* klass, MonoMethod* method)
}
}

MonoMethod* res = NULL;
if (method->slot != -1 && mono_class_is_interface (method->klass)) {
gboolean variance_used = FALSE;
int iface_offset = mono_class_interface_offset_with_variance (klass, method->klass, &variance_used);
Expand Down Expand Up @@ -7097,16 +7094,15 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
case MONO_CEE_LDARG:
{
CHECK_ARG (n);

MonoMethod* callvirt_target ;
if (next_ip < end && is_addressable_valuetype_load (cfg, next_ip, cfg->arg_types[n])) {
EMIT_NEW_ARGLOADA (cfg, ins, n);
} else {
EMIT_NEW_ARGLOAD (cfg, ins, n);
}
*sp++ = ins;

if(callvirt_target = try_prepare_objaddr_callvirt_optimization (cfg, next_ip, end, method, generic_context, param_types[n]->data.klass))
MonoMethod* callvirt_target = try_prepare_objaddr_callvirt_optimization (cfg, next_ip, end, method, generic_context, param_types[n]->data.klass);
if(callvirt_target)
{
cmethod_override = callvirt_target;
//printf("--- ldarg+callvirt @ %s\n", mono_method_get_full_name(method));
Expand All @@ -7122,8 +7118,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
case MONO_CEE_LDLOC:
{
CHECK_LOCAL (n);

MonoMethod* callvirt_target;
if (next_ip < end && is_addressable_valuetype_load (cfg, next_ip, header->locals[n])) {
EMIT_NEW_LOCLOADA (cfg, ins, n);
} else {
Expand Down

0 comments on commit 4100fcb

Please sign in to comment.