2009-04-17 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Fri, 17 Apr 2009 20:38:13 +0000 (20:38 -0000)
committerZoltan Varga <vargaz@gmail.com>
Fri, 17 Apr 2009 20:38:13 +0000 (20:38 -0000)
* dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
correctly.

* mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
GENERICINST.

svn path=/trunk/mono/; revision=132045

mono/mini/ChangeLog
mono/mini/dwarfwriter.c
mono/mini/mini-llvm.c

index dbcaee7bcb205221e30fa3e43da1c30ccb0ae0ce..bf1f5cb910c764e82abe6290cb22b9c3d741e4a9 100644 (file)
@@ -1,3 +1,11 @@
+2009-04-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
+       correctly.
+
+       * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
+       GENERICINST.
+
 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
 
        * mini-exceptions.c : add thread id to EXCEPTION trace message.
index 91afa785c9fe60f24eacea5dad7aa0be75afca21..d99d97d29fca4cd3de2d34ee2992d8b6646f35c9 100644 (file)
@@ -1650,7 +1650,9 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod
 
        /* Emit line number info */
        if (code && debug_info)
-               emit_line_number_info (w, method, code, code_size, debug_info);
+               /* != could happen when using --regression */
+               if (debug_info->code_start == code)
+                       emit_line_number_info (w, method, code, code_size, debug_info);
 
        emit_line (w);
 }
index 2e2892ba25eca4ecad23a9078547a6ee472de2ff..d88582c69c7abaea84d8d0695cff60647db4f05f 100644 (file)
@@ -168,10 +168,10 @@ type_to_llvm_type (EmitContext *ctx, MonoType *t)
                MonoClass *klass;
                LLVMTypeRef ltype;
 
-               if (t->data.klass->enumtype)
-                       return LLVMInt32Type ();
-
                klass = mono_class_from_mono_type (t);
+
+               if (klass->enumtype)
+                       return LLVMInt32Type ();
                ltype = g_hash_table_lookup (llvm_types, klass);
                if (!ltype) {
                        ltype = LLVMArrayType (LLVMInt8Type (), mono_class_value_size (klass, NULL));