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