2001-09-21 Dietmar Maurer <dietmar@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1
2 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
3
4         * loader.c: work around the different signatures for delegates
5         constructors csc generates in compiled code vs the ones compiled in mscorlib.
6
7 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
8
9         * class.h, class.c: add mono_class_get_field_from_name ().
10         * *: Fix C comments and other ANSI C issues.
11
12 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
13
14         * endian.h, assembly.c: fix some endianness issues.
15
16 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
17
18         * loader.h, load.c: add delegate_class to mono_defaults.
19         Handle runtime provided methods in mono_get_method ().
20
21 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
22
23         * loader.c (mono_get_method): use pinvoke for internal call
24
25         * icall.c: use pinvoke for internal call
26
27         * loader.c (method_from_memberref): set the method name
28
29 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
30
31         * metadata.c: help the compiler generate better code for
32         mono_class_from_mono_type ().
33
34 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
35
36         * class.c (mono_class_metadata_init): delayed computing of the
37         class size to mono_class_metadata_init ()
38
39 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
40
41         * class.c, class.h: add an interfaces member to MonoClass.
42         * image.c, image.h: add assembly_name field to MonoImage
43         from the assembly table.
44         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
45
46 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
47
48         * class.c: Handle Array in mono_class_from_mono_type ().
49         * metadata.c, pedump.c: some endian fixes.
50
51 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
52
53         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
54         * metadata.c: fix small problem introduced with the latest commit.
55
56 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
57
58         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
59         We don't need a MonoMetadata pointer anymore to compare signatures in
60         mono_metadata_signature_equal (), update callers.
61         Reduced memory usage an number of allocations for MonoMethodHeader and
62         MonoMethodSignature.
63
64 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
65
66         * metadata.c: added compare for szarray.
67
68 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
69
70         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
71         and add a couple more types to it and mono_defaults. Give an hint on
72         classes that need implementing in our corlib and are referenced
73         in mscorlib.
74
75 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
76
77         * class.h, class.c: keep track if a class is also an Enum.
78         * loader.c: Implement a couple more types for use in libffi
79         marshalling. Gives better diagnostics when failing to dlopen
80         a library. Set method->klass for P/Invoke methods, too.
81
82 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
83
84         * class.c, class.h: add a MonoType this_arg to MonoClass that
85         represents a pointer to an object of the class' type that
86         can be used by the interpreter and later the type cache.
87         Add best guess alignment info for valuetype objects.
88
89 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
90
91         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
92         into MonoType: one less level of indirection and allocation and
93         simplifies quite a bit of code. Added cache for MonoTypes that are
94         used frequently, so that we don't need to allocate them all the time.
95
96 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
97
98         * class.c (mono_class_create_from_typedef): System.Enum is also a
99         value type, although it does not derive from System.ValueType
100         (maybe a bug in the ms compiler?)
101
102         * metadata.c (mono_type_size): return the right size for value types
103
104         * loader.c (mono_get_method): only initialize method header if not abstract
105
106         * class.c (mono_class_from_mono_type): use mono_default values. 
107
108 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
109
110         * *: use MonoClass pointers instead of <type_tokens>
111         
112         * class.h: new flag: metadata_inited.
113
114         * class.c (mono_class_metadata_init): impl.
115         (mono_class_instance_size): impl.
116         (mono_class_data_size): impl.
117
118 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
119
120         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
121         MonoClass now has the name and name_space fields. 
122         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
123         mono_get_method () takes and optional MonoClass as argument.
124         Removed mono_typedef_from_name() and added mono_class_token_from_name()
125         instead that takes advantage of a map from class names to typedef
126         tokens in MonoImage.
127
128 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
129
130         * metadata.c: zero is not a valid alignment boundary.
131         Merge MONO_TYPE_VOID in default decoding code.
132
133 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
134
135         * image.h: merged MonoMetadata into MonoImage
136
137         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
138         identify the type of elements.
139
140 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
141
142         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
143         * cil-coff.h: split MonoMSDOSHeader and add size info.
144         * image.c: add some consistency checks.
145         * metadata.c: fix row size computation: one programmer
146         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
147         add explanation for the locator routine.
148         Fix decoding of size in method header.
149         
150 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
151
152         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
153         (g_concat_dir_and_file): Bring g_concat_dir_and_file
154         function from gnome-libs.  This uses the right path separator
155         based on the OS, and also works around a bug in some systems where
156         a double slash is not allowed. 
157         (default_assembly_name_resolver): Use g_concat_dir_and_file
158         (mono_assembly_open): ditto.
159
160 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
161
162         * metadata.c (mono_metadata_signature_equal): impl.
163
164         * *: void is now a realy MonoType (instead of using NULL)
165         
166         * metadata.c (do_mono_metadata_parse_type): use
167         mono_metadata_parse_type to parse void value.
168
169 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
170
171         * metadata.c, metadata.h: in the signature and method header store
172         only the space required for holding the loca vars and incoming arguments.
173
174 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
175
176         * metadata.c (do_mono_metadata_parse_type): treat void like any
177         other type (instead of assigning NULL);
178
179 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
180
181         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
182
183 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
184
185         * image.c (do_mono_image_open): added a cache for arrays.
186
187 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
188
189         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
190         decode a single column from a row in a metadata table and changes
191         to take advantage of it in the typedef locator (gives a nice speed up).
192         Store offset info for function params.
193
194 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
195
196         * image.h (MONO_IMAGE_IS_CORLIB): removed 
197
198 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
199
200         * assembly.c: how could mono_assembly_close () had ever worked?
201         * metadata.c, metadata.h: provide offset info for local vars.
202         Implement mono_type_size () to take care of alignment as well
203         as size (it was mono_field_type_size in cli/class.c before).
204
205 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
206
207         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
208
209         * assembly.h (CORLIB_NAME): set to corlib.dll
210
211         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
212
213 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
214
215         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
216         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
217         tokentype.h: massive namespace cleanup.
218
219 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
220
221         * metadata.h, metadata.c: decode exception clauses when parsing method header.
222
223 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
224
225         * metadata.c (mono_metadata_free_type): added check for type !=
226         NULL (void) before calling mono_metadata_free_type()
227
228 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
229
230         * metadata.h, row_indexes.h: added header with enumerations to use
231         to index in the columns from tables in metadata and to decode coded
232         tokens: we should start using this instead of embedding magic numbers
233         all over the code.
234
235 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
236
237         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
238         Move metadata_t info from cli_image_info_t to MonoImage, where
239         it's easily accessible. Changed all the uses accordingly.
240         Added the method and class caches to MonoImage.
241         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
242         and mono_metadata_decode_value () signature to be more consistent
243         with the other parse functions (and simplify code). Taken advantage
244         of zero-length array allocation with GCC. Removed reduntant (and
245         wrong) MonoFieldType struct and use MonoParam instead. Changed
246         mono_metadata_parse_field_type () to use common code for parsing.
247         Added mono_metadata_typedef_from_field () and
248         mono_metadata_typedef_from_method () to lookup a typedef index from a
249         field or method token.
250         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
251
252 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
253
254         * metadata.c (mono_metadata_parse_field_type): Implement. 
255         (do_mono_metadata_parse_type): Split engine from
256         mono_metadata_parse_type, so that we can create smaller structures
257         for things that just have one pointer to the MonoType (look at
258         the MonoFieldType)
259
260 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
261
262         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
263         as Jan Gray found out, it is incorrect. 
264
265 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
266
267         * assembly.c: Implement asssembly loading.  This loads an image
268         and loads all the referenced assemblies.  Come to think of it, we
269         could always do lazy loading of the assemblies. 
270
271         * image.c (mono_image_open): Keep loaded images in a hashtable.
272
273         * image.h (MonoImage): Add reference count.
274
275 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
276
277         * assembly.c (mono_assembly_open): Keep track of the file name in
278         case the assembly has no ASSEMBLY table.
279
280         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
281         from get.c here.
282
283 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
284
285         * metadata.c, metadata.h: decode local vars in method header
286         parse function. Change callers accordingly.
287
288 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
289
290         * metadata.h, cil-coff.h: protect against multiple inclusion.
291         Added some new structures to hold information decoded from metadata:
292         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
293         and relevant decoding/free functions.
294         * metadata.c: implement decoding functions. Add warning for out of bounds
295         index in mono_metadata_locate(). Implement mono_get_method () to retreive
296         all the info about a method signature and invocation. Remove check on
297         uninitialized local var in parse_mh() and fix memory leak.
298
299 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
300
301         * metadata.h: More macros.
302
303         * tokentype.h: New file.
304
305 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
306
307         * assembly.c: added a consistency check and initialize
308         some structures with g_new0().
309         * metadata.c: fixed a couple more bugs in table size computation
310         and add other checks for out-of bound access to metadata.
311
312 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
313
314         * metatada.c: fix bugs computing table sizes. Spew a
315         warning when index in string heap is out of bounds.
316
317 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
318
319         * metadata.h: Add a couple of macros to manipulate tokens. 
320
321 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
322
323         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
324         cli_section_tables).
325
326 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
327
328         * metadata.c (mono_metadata_user_string): New function, provides
329         access to the UserString heap. 
330
331 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
332
333         * metadata.c: Add inline documentation.
334
335 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
336
337         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
338         files. 
339
340 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
341
342         * typeattr.h: New file, TypeAttribute flags. 
343
344 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
345
346         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
347         mono_assembly_ensure_section): Section loading code.
348         (load_section_tables): Load the sections.
349
350         * mono/metadata/metadata.c (mono_metadata_locate_token,
351         mono_metadata_locate): Functions to locate the information
352         definition given a token or a table and an index.
353         (mono_metadata_compute_table_bases): New.
354         (compute_size): New function to compute the sizes of the various
355         tables.
356
357         * mono/metadata/metadata.h: Finish listing the different index
358         types. 
359
360         * mono/metadata/pedump.c: Improve to dump new information.
361
362 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
363
364         * mono/metadata/metadata.c: Entered all the tables matching
365         Beta2. 
366
367         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
368