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