From 8bc99f3d1c96fc4226c3aa52dbc61b55a9f1aa2d Mon Sep 17 00:00:00 2001 From: monojenkins Date: Tue, 18 Feb 2020 04:53:13 -0500 Subject: [PATCH] Remove #if __cplusplus from MagicTypeInfo. (#32461) This wastes about 24 static const bytes which I think is ok. 6 bytes per struct plus 2 padding, and there are 3 of them, total, ever, passed by pointer. I was looking into https://github.com/mono/mono/issues/18827 and wanting to rule out #if __cplusplus. Co-authored-by: Jay Krell --- src/mono/mono/mini/mini-native-types.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/mono/mono/mini/mini-native-types.c b/src/mono/mono/mini/mini-native-types.c index 7d4bf660966b7..08f72acafe684 100644 --- a/src/mono/mono/mini/mini-native-types.c +++ b/src/mono/mono/mini/mini-native-types.c @@ -24,15 +24,9 @@ typedef struct { typedef struct { short op_index; -#ifdef __cplusplus - MonoStackType big_stack_type : 16; - MonoStackType small_stack_type : 16; - MonoStackType stack_type : 16; -#else - short big_stack_type; - short small_stack_type; - short stack_type; -#endif + MonoStackType big_stack_type; + MonoStackType small_stack_type; + MonoStackType stack_type; short conv_4_to_8; short conv_8_to_4; short move; @@ -42,7 +36,6 @@ typedef struct { short compare_op; } MagicTypeInfo; - #if TARGET_SIZEOF_VOID_P == 8 #define OP_PT_ADD OP_LADD #define OP_PT_SUB OP_LSUB @@ -175,7 +168,7 @@ emit_widen (MonoCompile *cfg, const MagicTypeInfo *info, int sreg) MONO_INST_NEW (cfg, ins, info->conv_4_to_8); ins->sreg1 = sreg; ins->type = info->big_stack_type; - ins->dreg = alloc_dreg (cfg, info->big_stack_type); + ins->dreg = alloc_dreg (cfg, info->big_stack_type); MONO_ADD_INS (cfg->cbb, ins); return mono_decompose_opcode (cfg, ins); }