Skip to content

Commit

Permalink
[interpreter] skip boxing if it's already a non-valuetype
Browse files Browse the repository at this point in the history
  • Loading branch information
lewurm committed Feb 16, 2017
1 parent 27b511e commit 5a20b20
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mono/mini/interpreter/transform.c
Expand Up @@ -2113,6 +2113,9 @@ generate (MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start)
MonoMethod *target_method = mono_class_get_method_from_name (klass, "Box", 1);
/* td.ip is incremented by interp_transform_call */
interp_transform_call (&td, method, target_method, domain, generic_context, is_bb_start, body_start_offset, NULL);
} else if (!klass->valuetype) {
/* already boxed, do nothing. */
td.ip += 5;
} else {
if (mint_type (&klass->byval_arg) == MINT_TYPE_VT && !klass->enumtype) {
size = mono_class_value_size (klass, NULL);
Expand Down

0 comments on commit 5a20b20

Please sign in to comment.