2001-11-07 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Thu, 8 Nov 2001 21:38:32 +0000 (21:38 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 8 Nov 2001 21:38:32 +0000 (21:38 -0000)
* x86/tramp.c: Include stdlib to kill warning.

2001-11-07  Miguel de Icaza  <miguel@ximian.com>

* main.c (dis_property_methods): Added missing colon which avoided
setting loc.t

2001-11-07  Miguel de Icaza  <miguel@ximian.com>

* interp.c: Include stdlib to kill warning.
(check_corlib): Adjust format encodings to remove warnings.

2001-11-07  Miguel de Icaza  <miguel@ximian.com>

* reflection.c (build_compressed_metadata): Eliminates warnings
and uses 64-bit clean code.

* metadata.c (mono_type_hash): Change signature to eliminate warnings.
(mono_type_equal): Change signature to eliminate warnings.

2001-11-07  Miguel de Icaza  <miguel@ximian.com>

* monoburg.y: Include string.h, stdlib.h to kill warnings.

* sample.brg: Include string.h to remove warnings.

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

27 files changed:
doc/download
doc/index
mono/arch/ChangeLog
mono/arch/x86/tramp.c
mono/dis/ChangeLog
mono/dis/main.c
mono/interpreter/ChangeLog
mono/interpreter/interp.c
mono/jit/ChangeLog
mono/jit/emit-x86.c
mono/jit/jit.c
mono/jit/mempool.c
mono/jit/testjit.c
mono/jit/x86.brg
mono/metadata/ChangeLog
mono/metadata/class.c
mono/metadata/mempool.c
mono/metadata/metadata.c
mono/metadata/object.c
mono/metadata/pedump.c
mono/metadata/reflection.c
mono/monoburg/ChangeLog
mono/monoburg/monoburg.c
mono/monoburg/monoburg.y
mono/monoburg/sample.brg
web/download
web/index

index e1fd3fcc2f1000aab775d6b6e32ab32799fbcdf7..2ca138d9db2b055f97e1528113612ab3df3a4d1e 100644 (file)
@@ -150,6 +150,8 @@ tar xzvf glib-1.2.10.tar.gz
 make
 make install
 </pre>
+            * You also need a patch found <a 
+               href="http://www.cygwin.com/ml/cygwin/2001-04/msg01792.html">here</a>.
 
                * Unpack the mono distribution:
 
index dc0fbd1057609dc31e9d61beb47b70d475f910b9..225fb4d3e57dadaa64d455a055b2560853e04e26 100644 (file)
--- a/doc/index
+++ b/doc/index
        You can contact the team at: <a
        href="mailto:mono-list@ximian.com">mono-list@ximian.com</a>
 
+** Nov 8, 2001
+
+       Enumerations, array access and attributes for the C# compiler are into the CVS now.
+
+       Full array support is not complete, but moving along.
+
 ** Nov 5, 2001
 
        Dietmar's new set of patches to the JIT have 20 out of 33
index c6df60ad790ddaf7a59e1728bf592dc77edde958..10f43c66dffcba7f09fae0f80bdcda9219ce52ad 100644 (file)
@@ -1,3 +1,6 @@
+2001-11-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * x86/tramp.c: Include stdlib to kill warning.
 
 Mon Oct 22 15:20:14 CEST 2001 Paolo Molaro <lupus@ximian.com>
 
index 90bcb9085202da4e61f3d80a07439757115a99b0..0f1e01428fd5e484423c235bc820dcc632e7c595 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "config.h"
+#include <stdlib.h>
 #include "x86-codegen.h"
 #include "mono/metadata/class.h"
 #include "mono/metadata/tabledefs.h"
index b19114077faa2c43fbc6d520ba6bef8ee43e6bf2..2cead5c203a497a368c10a2c7ef1b91a4852dddb 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * main.c (dis_property_methods): Added missing colon which avoided
+       setting loc.t
+
 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
 
        * main.c (arch_compile_method):  added to compute vtable entry
index 8655d09c8f31432e3b8d799d883436df7739d276..ea48b9414d57e080121fedb7637b5964aee07713 100644 (file)
@@ -524,7 +524,7 @@ dis_property_methods (MonoMetadata *m, guint32 prop)
        char *type[] = {NULL, ".set", ".get", NULL, ".other"};
 
        if (!msemt->base)
-               return
+               return;
 
        loc.t = msemt;
        loc.col_idx = MONO_METHOD_SEMA_ASSOCIATION;
index 4acac539ca77647eba224a66dd0fb4ac03175a05..c87b3f82c4eb0b71ea80236484d532efa767f2f8 100644 (file)
@@ -1,3 +1,7 @@
+2001-11-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * interp.c: Include stdlib to kill warning.
+       (check_corlib): Adjust format encodings to remove warnings.
 
 Wed Nov 7 15:47:36 CET 2001 Paolo Molaro <lupus@ximian.com>
 
index 101a902c0c9c921c5072bc88e49f7e8d8f5cbf5c..6d155d34b47b3006b475e19c32d8360a18fdda46 100644 (file)
@@ -14,6 +14,7 @@
 #include "config.h"
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 #include <glib.h>
 
 #ifdef HAVE_ALLOCA_H
@@ -3423,7 +3424,7 @@ check_corlib (MonoImage *corlib)
                for (fdesc = cdesc->fields; fdesc->name; ++fdesc) {
                        field = mono_class_get_field_from_name (klass, fdesc->name);
                        if (!field || (field->offset != fdesc->offset))
-                               g_error ("filed %s mismatch in class %s (%d != %d)", fdesc->name, cdesc->name, fdesc->offset, field?field->offset:-1);
+                               g_error ("filed %s mismatch in class %s (%ld != %ld)", fdesc->name, cdesc->name, (long) fdesc->offset, (long) (field?field->offset:-1));
                }
        }
 }
index 8d0ceb35421031f1fcb34fff70e85c1c05d59904..147a916a6d5d8a3bb80db5150ad09d32b22404e6 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * mempool.c: Include string.h to kill warning.
+
+       * testjit.c: Add typecast to kill warning.
+
+       * x86.brg: Include string.h to eliminate warning.
+
+       * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
+       kill warning.
+
 2001-11-07  Dietmar Maurer  <dietmar@ximian.com>
 
        * emit-x86.c (enter_method): print out all method arguments
index b759f636e4c9da9ed2e03013e433b81e5e38ef03..e5778ca8f89f24f95dac1fba3bd1fefb9379a9b7 100644 (file)
@@ -445,7 +445,7 @@ tree_allocate_regs (MBTree *tree, int goal, MonoRegSet *rs)
        case MB_NTERM_reg:
                if ((tree->reg1 = 
                     mono_regset_alloc_reg (rs, tree->reg1, tree->exclude_mask)) == -1) {
-                       g_warning ("register allocation failed %d %p %p\n",  tree->reg1, rs->free_mask, tree->exclude_mask);
+                       g_warning ("register allocation failed %d 0x%08x 0x%08x\n",  tree->reg1, rs->free_mask, tree->exclude_mask);
                        g_assert_not_reached ();
                }
 
index 47b2a14564f7243314007fce7a81cc0ace557506..661a24764eef045f561391c082a18a6d7d8eec1f 100644 (file)
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <glib.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/loader.h>
@@ -1281,7 +1282,7 @@ mono_analyze_stack (MonoFlowGraph *cfg)
                        index = mono_metadata_token_index (read32 (ip));
                        ip += 4;
 
-                       o = mono_ldstr (image, index);
+                       o = (MonoObject *) mono_ldstr (image, index);
                        t1 = mono_ctree_new_leaf (mp, MB_TERM_CONST_I4);
                        t1->data.p = o;
 
index b9c4bdd0050514a1f67b63b81a4699c8dbc5a187..03190a99b506d01df2256d6117210a1f888cd7fc 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <config.h>
 #include <glib.h>
+#include <string.h>
 
 #include "jit.h"
 
index 47b2a14564f7243314007fce7a81cc0ace557506..661a24764eef045f561391c082a18a6d7d8eec1f 100644 (file)
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <glib.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/loader.h>
@@ -1281,7 +1282,7 @@ mono_analyze_stack (MonoFlowGraph *cfg)
                        index = mono_metadata_token_index (read32 (ip));
                        ip += 4;
 
-                       o = mono_ldstr (image, index);
+                       o = (MonoObject *) mono_ldstr (image, index);
                        t1 = mono_ctree_new_leaf (mp, MB_TERM_CONST_I4);
                        t1->data.p = o;
 
index ee4b86eccda546a0a12d9485de9355378280d198..7e6ba4e4e5382a91e71d88276f652a69a078eedc 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <glib.h>
 #include <stdio.h>
+#include <string.h>
 
 #include <mono/metadata/blob.h>
 #include <mono/metadata/metadata.h>
index e0055a5b12a29dc9a27f9bfc96874d9ab9bc838d..21facd26e04de75800ab65b99dff4f4f46152df6 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * reflection.c (build_compressed_metadata): Eliminates warnings
+       and uses 64-bit clean code.
+
+       * metadata.c (mono_type_hash): Change signature to eliminate warnings.
+       (mono_type_equal): Change signature to eliminate warnings.
 
 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
 
index 199ec7bd4f40a262dad5b04741bd57770be296a4..9e6ccfcf2368d925cd402350fe004fdfbc50bad2 100644 (file)
@@ -16,6 +16,8 @@
 #include <config.h>
 #include <glib.h>
 #include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
 #include <mono/metadata/image.h>
 #include <mono/metadata/cil-coff.h>
 #include <mono/metadata/metadata.h>
@@ -129,7 +131,6 @@ class_compute_field_layout (MonoClass *class)
                break;
        case TYPE_ATTRIBUTE_EXPLICIT_LAYOUT:
                for (i = 0; i < top; i++){
-                       guint32 cols [2];
                        int size, align;
                        int idx = class->field.first + i;
 
index b9c4bdd0050514a1f67b63b81a4699c8dbc5a187..03190a99b506d01df2256d6117210a1f888cd7fc 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <config.h>
 #include <glib.h>
+#include <string.h>
 
 #include "jit.h"
 
index 213f63bdf2108028ad29846649f50dbe893083f9..c58a7d8d0bf28c9d014440c35adea378d222e8e9 100644 (file)
@@ -1021,15 +1021,19 @@ static GHashTable *type_cache = NULL;
 /*
  * MonoTypes with modifies are never cached, so we never check or use that field.
  */
-static int
-mono_type_hash (MonoType *type)
+static guint
+mono_type_hash (gconstpointer data)
 {
+       MonoType *type = (MonoType *) data;
        return type->type | (type->byref << 8) | (type->attrs << 9);
 }
 
-static gboolean
-mono_type_equal (MonoType *a, MonoType *b)
+static gint
+mono_type_equal (gconstpointer ka, gconstpointer kb)
 {
+       MonoType *a = (MonoType *) ka;
+       MonoType *b = (MonoType *) kb;
+       
        if (a->type != b->type || a->byref != b->byref || a->attrs != b->attrs || a->pinned != b->pinned)
                return 0;
        /* need other checks */
@@ -1044,7 +1048,8 @@ mono_metadata_parse_type (MonoMetadata *m, MonoParseTypeMode mode, short opt_att
        if (!type_cache) {
                int i;
                type_cache = g_hash_table_new (mono_type_hash, mono_type_equal);
-               for (i=0; i < NBUILTIN_TYPES (); ++i)
+
+               for (i = 0; i < NBUILTIN_TYPES (); ++i)
                        g_hash_table_insert (type_cache, &builtin_types [i], &builtin_types [i]);
        }
 
index 0780582d21d9f4dfd406a86cb376f11b915b6948..c81d66508bebd46980bcd40fdc09623d56195574 100644 (file)
@@ -9,6 +9,7 @@
 #include <config.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <mono/metadata/loader.h>
 #include <mono/metadata/object.h>
 
index f6f3ee555b5209f6ccc7d9de272de1550188fbba..0d49fccb8c439cbeb1908ca2a950c0474386cacd 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include <config.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include "image.h"
 #include <glib.h>
index 0dc99e5fcd47e08c4dfca1ac41f8731bd53a22e0..8f2e9d2bf6bacdc596fba2296e6b916c45624619 100644 (file)
@@ -219,7 +219,7 @@ encode_locals (MonoDynamicAssembly *assembly, MonoReflectionILGen *ilgen)
 {
        MonoDynamicTable *table;
        guint32 *values;
-       char *name, *p;
+       char *p;
        guint32 idx, sig_idx;
        guint nl = mono_array_length (ilgen->locals);
        char *buf;
@@ -562,6 +562,7 @@ build_compressed_metadata (MonoDynamicAssembly *assembly)
        guint16 *int16val;
        MonoImage *meta;
        unsigned char *p;
+       int idx;
        char *version = "mono" VERSION;
        
        /* Compute table sizes */
@@ -595,71 +596,73 @@ build_compressed_metadata (MonoDynamicAssembly *assembly)
        meta->raw_metadata = g_malloc0 (meta_size);
        p = meta->raw_metadata;
        /* the metadata signature */
-       *p++ = 'B'; *p++ = 'S'; *p++ = 'J'; *p++ = 'B';
+       idx = 0;
+       p [idx++] = 'B'; p [idx++] = 'S'; p [idx++] = 'J'; p [idx++] = 'B';
+
        /* version numbers and 4 bytes reserved */
-       int16val = (guint16*)p;
+       int16val = (guint16*) (&p [idx]);
        *int16val++ = 1;
        *int16val = 1;
-       p += 8;
+       idx += 8;
        /* version string */
-       int32val = (guint32*)p;
+       int32val = (guint32*)(&p [idx]);
        *int32val = strlen (version);
-       p += 4;
-       memcpy (p, version, *int32val);
-       p += *int32val;
-       p += 3; p = (guint32)p & ~3; /* align */
-       int16val = (guint16*)p;
+       idx += 4;
+       memcpy (&p [i], version, *int32val);
+       idx += *int32val;
+       idx += 3; idx = idx & ~3; /* align */
+       int16val = (guint16*)(&p [idx]);
        *int16val++ = 0; /* flags must be 0 */
        *int16val = 5; /* number of streams */
-       p += 4;
+       idx += 4;
 
        /*
         * write the stream info.
         */
        table_offset = (p - (unsigned char*)meta->raw_metadata) + 5 * 8 + 40; /* room needed for stream headers */
        
-       int32val = (guint32*)p;
+       int32val = (guint32*)(&p [idx]);
        *int32val++ = assembly->tstream.offset = table_offset;
        *int32val = heapt_size;
        table_offset += *int32val;
-       p += 8;
-       strcpy (p, "#~");
+       idx += 8;
+       strcpy (&p [idx], "#~");
        /* 
         * FIXME: alignment not 64 bit safe: same problem in metadata/image.c 
         */
-       p += 3 + 3; p = (guint32)p & ~3;
+       idx += 3 + 3; idx = idx & ~3;
 
-       int32val = (guint32*)p;
+       int32val = (guint32*)(&p [idx]);
        *int32val++ = assembly->sheap.offset = table_offset;
        *int32val = assembly->sheap.index;
        table_offset += *int32val;
-       p += 8;
-       strcpy (p, "#Strings");
-       p += 9 + 3; p = (guint32)p & ~3;
+       idx += 8;
+       strcpy (&p [idx], "#Strings");
+       idx += 9 + 3; idx = idx & ~3;
 
-       int32val = (guint32*)p;
+       int32val = (guint32*)(&p [idx]);
        *int32val++ = assembly->us.offset = table_offset;
        *int32val = assembly->us.index;
        table_offset += *int32val;
-       p += 8;
-       strcpy (p, "#US");
-       p += 4 + 3; p = (guint32)p & ~3;
+       idx += 8;
+       strcpy (&p [idx], "#US");
+       idx += 4 + 3; idx = idx & ~3;
 
-       int32val = (guint32*)p;
+       int32val = (guint32*)(&p [idx]);
        *int32val++ = assembly->blob.offset = table_offset;
        *int32val = assembly->blob.index;
        table_offset += *int32val;
-       p += 8;
-       strcpy (p, "#Blob");
-       p += 6 + 3; p = (guint32)p & ~3;
+       idx += 8;
+       strcpy (&p [idx], "#Blob");
+       idx += 6 + 3; idx = idx & ~3;
 
-       int32val = (guint32*)p;
+       int32val = (guint32*)(&p [idx]);
        *int32val++ = assembly->guid.offset = table_offset;
        *int32val = assembly->guid.index;
        table_offset += *int32val;
-       p += 8;
-       strcpy (p, "#GUID");
-       p += 6 + 3; p = (guint32)p & ~3;
+       idx += 8;
+       strcpy (&p [idx], "#GUID");
+       idx += 6 + 3; idx = idx & ~3;
 
        /* 
         * now copy the data, the table stream header and contents goes first.
@@ -737,10 +740,8 @@ build_compressed_metadata (MonoDynamicAssembly *assembly)
 static void
 mono_image_build_metadata (MonoReflectionAssemblyBuilder *assemblyb)
 {
-       char *meta;
        MonoDynamicTable *table;
        MonoDynamicAssembly *assembly = assemblyb->dynamic_assembly;
-       GList *type;
        guint32 len;
        guint32 *values;
        char *name;
index bf502c0a3fa9021b81747a2c40ea99a9ee4d925a..e1255f7788f2df6853f31b781b1972f73e47924b 100644 (file)
@@ -1,3 +1,9 @@
+2001-11-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * monoburg.y: Include string.h, stdlib.h to kill warnings.
+
+       * sample.brg: Include string.h to remove warnings.
+
 2001-09-23  Dietmar Maurer  <dietmar@ximian.com>
 
        * monoburg.c: add a macro MBALLOC_STATE to define the allocation 
index d13501d008258e22d31949a7f2c52c8c022f18fe..c02f4451422703ef4e42e43684c6dc7f18e5abc3 100644 (file)
@@ -8,7 +8,8 @@
  */
 
 #include <stdio.h>
-
+#include <string.h>
+#include <stdlib.h>
 #include "monoburg.h"
 
 extern void yyparse (void);
index a1fe61eda02a212c2b097797e15e17505e6b7b34..8a551b1d8dec18be137ef3a29ed5bd7a9d35dab9 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include <unistd.h>
 #include <ctype.h>
 #include <assert.h>
 #include <stdarg.h>
index 006eca2038e065a90f0f492f54110371014cf9fc..82812c7e322babf5f5f345f809a12a78059ebc77 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <glib.h>
 #include <stdio.h>
+#include <string.h>
 
 #define MBTREE_TYPE  MBTree
 
index e1fd3fcc2f1000aab775d6b6e32ab32799fbcdf7..2ca138d9db2b055f97e1528113612ab3df3a4d1e 100644 (file)
@@ -150,6 +150,8 @@ tar xzvf glib-1.2.10.tar.gz
 make
 make install
 </pre>
+            * You also need a patch found <a 
+               href="http://www.cygwin.com/ml/cygwin/2001-04/msg01792.html">here</a>.
 
                * Unpack the mono distribution:
 
index dc0fbd1057609dc31e9d61beb47b70d475f910b9..225fb4d3e57dadaa64d455a055b2560853e04e26 100644 (file)
--- a/web/index
+++ b/web/index
        You can contact the team at: <a
        href="mailto:mono-list@ximian.com">mono-list@ximian.com</a>
 
+** Nov 8, 2001
+
+       Enumerations, array access and attributes for the C# compiler are into the CVS now.
+
+       Full array support is not complete, but moving along.
+
 ** Nov 5, 2001
 
        Dietmar's new set of patches to the JIT have 20 out of 33