Merge pull request #1412 from esdrubal/stackframe
[mono.git] / mono / mini / ir-emit.h
index 9ba92bf3765bb3fb377aba0cdfe547a704c3adb6..aac45186598af0c3295e282aca2433512024e1e9 100644 (file)
@@ -302,8 +302,6 @@ alloc_dreg (MonoCompile *cfg, MonoStackType stack_type)
 
 #define NEW_JIT_ICALL_ADDRCONST(cfg,dest,name) NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_JIT_ICALL_ADDR, (name))
 
-#define GET_VARINFO_INST(cfg,num) ((cfg)->varinfo [(num)]->inst)
-
 #define NEW_VARLOAD(cfg,dest,var,vartype) do { \
         MONO_INST_NEW ((cfg), (dest), OP_MOVE); \
                (dest)->opcode = mono_type_to_regmove ((cfg), (vartype));  \
@@ -407,7 +405,7 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg)
        } while (0)
 
 #define NEW_SEQ_POINT(cfg,dest,il_offset,intr_loc) do {         \
-       MONO_INST_NEW ((cfg), (dest), OP_SEQ_POINT); \
+       MONO_INST_NEW ((cfg), (dest), cfg->gen_seq_points_debug_data ? OP_SEQ_POINT : OP_IL_SEQ_POINT); \
        (dest)->inst_imm = (il_offset); \
        (dest)->flags = intr_loc ? MONO_INST_SINGLE_STEP_LOC : 0; \
        } while (0)
@@ -933,15 +931,15 @@ static int ccount = 0;
                if (!(cfg->opt & MONO_OPT_ABCREM)) {                                                    \
                        MONO_EMIT_NULL_CHECK (cfg, array_reg);                                          \
                        if (COMPILE_LLVM (cfg)) \
-                               MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \
+                               MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \
                        else \
-                               MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
+                               MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
                } else {                                                                                                                \
                        MonoInst *ins;                                                                                          \
                        MONO_INST_NEW ((cfg), ins, OP_BOUNDS_CHECK);                            \
                        ins->sreg1 = array_reg;                                                                         \
                        ins->sreg2 = index_reg;                                                                         \
-                       ins->inst_imm = G_STRUCT_OFFSET (array_type, array_length_field); \
+                       ins->inst_imm = MONO_STRUCT_OFFSET (array_type, array_length_field); \
                        ins->flags |= MONO_INST_FAULT; \
                        MONO_ADD_INS ((cfg)->cbb, ins);                                                         \
                        (cfg)->flags |= MONO_CFG_HAS_ARRAY_ACCESS;                                      \