2002-02-22 Dietmar Maurer <dietmar@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
2
3         * object.c (mono_object_isinst): fix for arrays
4
5         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
6
7 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
8
9         * object.c: don't use mprotect ()  and fix intern pool hash table
10         lookup for big endian systems.
11
12 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13
14         * icall.c: change type_is_subtype_of () signature.
15
16 2002-02-21  Mark Crichton  <crichton@gimp.org>
17
18         * rand.c, rand.h: Added random number generator for
19         System.Security.Cryptography classes.
20
21         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
22
23         * icall.c: Added System.Security.Cryptography calls.
24
25 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
26
27         * class.c, icall.c, metadata.c: better support for pointer types.
28         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
29         * reflection.c: Add support for getting custom attrs for properties
30         and simplify some code.
31
32 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33
34         * icall.c: change getToken () and add custom attribute GetBlob()helper
35         method.
36         * reflection.h: add custom attrs array to the reflection builder structures.
37         * reflection.c: encode and emit custom attributes for all the relevant
38         reflection objects. Cache fieldref and methodref tokens. Change
39         mono_image_create_token() interface to take a MonoDynamicAssembly.
40         More complete custom attributes decoder. Load custom attributes for
41         Assembly, Field, Method and Constructor objects, too. Make the
42         returned array an Attribute[] one, not object[]. Added
43         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
44         custom attribute constructor.
45
46 2002-02-20  Dick Porter  <dick@ximian.com>
47
48         * icall.c:
49         * rawbuffer.c:
50         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
51         problem code out for now).
52
53 2002-02-19  Radek Doulik  <rodo@ximian.com>
54
55         * object.c (mono_ldstr): use hash table to avoid multiple swapping
56
57 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
58
59         * icall.c: register the GetCustomAttributes method.
60         * object.c, object.h: add mono_string_new_len ().
61         * reflection.h, reflection.c: added mono_runtime_invoke(),
62         mono_install_runtime_invoke(). Added
63         mono_reflection_get_custom_attrs () to load custom attributes and
64         create the attribute objects.
65
66 2002-02-19  Dick Porter  <dick@ximian.com>
67         * threads-dummy-types.c:
68         * threads-dummy-types.h:
69         * threads-dummy.c:
70         * threads-dummy.h:
71         * threads-pthread-types.c:
72         * threads-pthread-types.h:
73         * threads-pthread.c:
74         * threads-pthread.h:  Deleted obsolete files
75
76 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
77
78         * class.c (mono_class_vtable): runtime init the class when we
79         allocate static class data.
80
81         * icall.c (ves_icall_System_Array_SetValue): check for null values.
82
83         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
84         and String - but we will need generic marshalling support in the
85         future. 
86         (mono_init): set the domain name in a ms compatible way
87
88         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
89         String[].
90
91 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
92
93         * object.c (mono_array_clone): use alloca() instead of g_malloc  
94         for sizes
95
96         * appdomain.c (mono_domain_unload): impl.
97
98 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
99
100         * appdomain.c, object.c: fix intern pool implementation.
101         * class.c: fix alignment code.
102
103 2002-02-16  Radek Doulik  <rodo@ximian.com>
104
105         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
106         and s2 > s1, just copy lower bytes to be compatible with little
107         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
108         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
109
110         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
111         force big_endian to be 1 for big endian machines 
112         (ves_icall_iconv_new_decoder): ditto
113
114 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
115
116         * socket-io.c (convert_sockopt_level_and_name): If the system
117         doesn't define SOL_IP or SOL_TCP, get them by hand using
118         getprotobyname() and caching the values (because this could be a
119         slow operation).
120         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
121         Use the appropriate struct when the system does support it. Ie,
122         not all systems have struct ip_mreqn so use struct ip_mreq when
123         appropriate.
124
125 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
126
127         * reflection.c: handle finally clauses.
128
129 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
130
131         * socket-io.c: use g_snprintf() instead of snprintf.
132
133 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
134
135         * reflection.c (mono_param_get_objects): Cast second argument to
136         mono_method_get_param_names to a const char** to silence the
137         compiler warning.
138
139         * appdomain.c (mono_domain_assembly_open): Put parens around the
140         truth statement in the for-loop.
141
142         * unicode.c (iconv_convert): Got rid of a compiler warning about
143         int i being unused when the system has a new iconv.
144         (iconv_get_length): Same.
145
146         * image.c (load_class_names): Cast the second argument to
147         g_hash_table_insert() to char* to hush compiler warnings about the
148         arg being a const.
149         (mono_image_open): Same here.
150
151         * socket-io.c: Don't conditionally include sys/filio.h or
152         sys/sockio.h here anymore since we now get them from
153         io-layer/io-layer.h
154         (inet_pton): If the system doesn't support inet_aton, implement
155         using inet_addr and also #define INADDR_NONE if it isn't defined
156         by the system.
157
158 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
159
160         * metadata.c, metadata.h: added function to get packing and size info
161         of a typedef.
162         * reflection.h, reflection.c: handle field RVA data. Save info about
163         the table layout if needed. Assign typedef indexes to all the types
164         before dumping the info about them to avoid forward reference problems.
165
166 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
167
168         * socket-io.c (convert_sockopt_level_and_name): ifdef
169         SO_ACCEPTCONN because it is not defined on my system (old debian)
170
171 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
172
173         * opcode.c: use stddef.h to get NULL.
174
175 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
176
177         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
178         for FIONBIO, FIONREAD and SIOCATMARK.
179         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
180         define INADDR_NONE and besides, inet_addr() is deprecated and
181         should not be used. Use inet_pton() instead - it also has the
182         added bonus that it can easily handle IPv6 addresses as well.
183         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
184
185 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
186
187         * decimal.c: remove _MSC_VER conditional.
188
189 2002-02-13  Dick Porter  <dick@ximian.com>
190
191         * socket-io.c: 
192         * icall.c: Internal calls for Blocking, Select, Shutdown,
193         GetSocketOption and SetSocketOption
194
195 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
196
197         * assembly.cs: better resolver: use it instead of some kludgy
198         code.
199
200 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
201
202         * reflection.c: the best way to speed-up the compiler is to avoid
203         infinite loops.
204
205 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
206
207         * class.c (mono_class_vtable): changed the object layout
208         (obj->vtable->class). 
209         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
210
211 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
212
213         * assembly.c: look for assemblies in the assembly dir, too.
214
215 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
216
217         * class.c: fix thinko in mono_class_from_type().
218
219 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
220
221         * exception.h, exception.c: added TypeLoadException.
222         * object.h, object.c: added mono_array_clone ().
223         * icall.c: handle throwOnError in AssemblyGetType().
224         Added Array.Clone().
225         * opcode.h, opcode.c: use a single value for the opcode val.
226         Compile fix for non-gcc compilers.
227
228 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
229
230         * opcodes.c, opcodes.h: export interesting info about opcodes.
231
232 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
233
234         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
235         icalls. 
236
237         * class.c (class_compute_field_layout): set element_class for enums
238         (mono_class_create_from_typedef): set element_class for normal classes
239
240         * icall.c (ves_icall_System_Enum_get_value): impl.
241
242         * class.c (mono_class_create_from_typedef): do not set valuetype
243         flag for System.ValueType and System.Enum
244
245 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
246
247         * unicode.c (iconv_convert): fix big endian problem.
248
249 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
250
251         * class.c: add asserts if we are ever going to scribble over memory.
252         * socket-io.c: not all systems have AF_IRDA defined.
253
254 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
255
256         * class.c (class_compute_field_layout): do not consider static
257         fields to compute alignment
258
259 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
260
261         * appdomain.c (mono_appdomain_get): impl.
262         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
263
264 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
265
266         * icall.c: ignore "file://" prefix when loading an assembly.
267
268 2002-01-23  Dick Porter  <dick@ximian.com>
269
270         * socket-io.c:
271         * icall.c:
272         * Makefile.am: Added socket support
273
274 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
275
276         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
277         code back.  This should return the assemblies that are loaded by
278         the runtime on behalf of an application domain. 
279
280         The current implementation is still broken, it just returns every
281         assembly loaded, but until we get real applications domain this
282         will do.
283
284 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
285
286         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
287         AppDomain object.
288
289 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
290
291         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
292         the mono_class_from_name lookup.
293         (ves_icall_get_parameter_info): ditto.
294         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
295         method.
296         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
297
298 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
299
300         * class.c: load also nested classes on class init.
301         System.ValueType instance methods gets passed boxed
302         values, unless methods in derived classed that get a pointer to the
303         data.
304         * icall.c: use better name parsing code in GetType().
305         * image.c, image.h: add mono_image_loaded ().
306         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
307         * reflection.c, reflection.h: added mono_reflection_parse_type().
308
309 2002-01-22  Veronica De Santis <veron78@interfree.it>
310
311         * icall.c : Added mapping of internal calls for Manual and Auto reset events
312         * threads.c : Added the implementation of internal calls for events
313         * threads.h : Added prototypes of internal calls for events
314         
315 2002-01-21  Radek Doulik  <rodo@ximian.com>
316
317         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
318
319 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
320
321         * class.c (mono_class_init): set min_align to 1 (instead of 0)
322         (mono_class_value_size): use min_align
323
324 2002-01-20  Dick Porter  <dick@ximian.com>
325
326         * threads.h:
327         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
328         so it compiles on w32.
329
330 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
331
332         * metadata.c (mono_type_stack_size): impl.
333
334         * class.c (mono_class_get_field): impl. memberref token
335
336 2002-01-16 Veronica De Santis <veron78@@interfree.it>
337
338         * icall.h : Added the internal calls mapping for CreateMutex_internal
339                     and ReleaseMutex_internal.
340         * threads.h : Added the prototype of mutexes internal calls.
341         * threads.c : Added the implementations of mutexes internal calls.
342
343 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
344
345         * metaparse.h: removed unused file.
346         * reflection.c, reflection.h: added stream_data_align () function 
347         to align data in streams and keep stream aligned. Add support for
348         exception support in method headers.
349
350 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
351
352         * unicode.c: make iconv_convert () return the number of bytess written
353         in the output buffer.
354
355 2002-01-15  Dick Porter  <dick@ximian.com>
356         * threads.c: Make the runtime's idea of infinite timeouts coincide
357         with the class library's
358
359         Fix a particularly egregious bug in mono_thread_cleanup(). That
360         code was so utterly bogus it must have been written on a Monday.
361
362 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
363
364         * reflection.h: add subtypes field to TypeBuilder.
365         * reflection.c: encode constants for literal fields.
366         Handle subtypes. Fix user string token (and add a zero byte)
367         at the end.
368         
369 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
370
371         * class.c (mono_class_init): bug fix: assign slot numbers for
372         abstract methods.
373
374 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
375
376         * reflection.c: don't try to output a code RVA for abstract methods.
377         Small fixes for method header format. Output parameter info to the
378         ParamDef table. Save method overriding info to MethodImpl table.
379         Fix property support. Allow typedef.extends to be a type in the
380         building assembly.
381         * verify.c: fix off-by-one error.
382
383 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
384
385         * class.c: fix mono_class_from_mono_type () for szarray types.
386         Remove unused cache check in mono_class_from_type_spec().
387         * icall.c: *type_from_name () functions handle simple arrays and byref.
388         * reflection.c: handle byref and szarray types. Handle methods without
389         body (gets P/Invoke compilation working). Handle types and fields in
390         get_token ().
391         * reflection.h: add rank to MonoTypeInfo.
392
393 2002-01-10  Dick Porter  <dick@ximian.com>
394
395         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
396         internal calls
397
398 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
399
400         * icall.c: initialize class in type_from_handle ().
401         Loop also in parent classes for get_method ().
402         * reflection.c: properly encode class and valuetype types.
403         Start on encoding TypeBuilder types. Handle fieldrefs.
404         Use correct length when registering a user string.
405         Handle ConstructorBuilder and MonoMethod in get_token ().
406         Make mono_type_get_object () aware of cached types.
407         * object.c: back out change to mono_string_new ().
408
409 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
410         * object.c: mono_string_new should return a NULL when the string 
411         passed in is NULL -- not try to deference it.
412         
413 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
414
415         * icall.c: hack to make IsSubType work for TypeBuilders.
416         * reflection.c: emit constructors before methods.
417         Retrieve param names in mono_param_get_objects().
418
419 2002/01/05  Nick Drochak  <ndrochak@gol.com>
420
421         * Makefile.am: fix list of headers and sources so automake 1.5
422         doesn't complain. Removed \# at end of list.
423
424 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
425
426         * reflection.c: get token for a method ref. Set return type of
427         constructor to void.
428         * loader.c: debug message.
429         * class.c: typo fix.
430
431 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
432
433         * icall.c: fix array init with rank > 1. FindMembers
434         loops in parent class as well.
435         * image.c: do not insert nested types in name cache.
436         * reflection.c: warning fix.
437         * reflection.h: add override method (for interface impl).
438
439 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
440
441         * metadata.c: fix customattr decoding.
442
443 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
444
445         * rawbuffer.cs: Added native Win32 implementation, avoids using
446         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
447
448 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
449
450         * class.c: make the low-level routines handle the cache.
451
452 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
453
454         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
455
456 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
457
458         * class.c: fix mono_array_element_size() for objects.
459         * class.h, class.c: add properties to MonoClass and load them
460         at init time.
461         * icall.c: check with isinst() when assigning a value to an array
462         instead of requiring the classes to match exactly.
463         Implemented icall for System.Type::GetType().
464         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
465         enums. Handle bindingflags when looking for methods and fields.
466         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
467         and mono_metadata_methods_from_property().
468         * reflection.h, reflection.c: added structures for propreties,
469         parameters and enums. Implemented mono_property_get_object() and
470         mono_param_get_objects().
471
472 2001-12-18  Dick Porter  <dick@ximian.com>
473
474         * file-io.c: Use mono_string_to_utf16() instead of
475         mono_string_chars()
476
477         * object.c: Added mono_string_to_utf16(), which copies the non
478         NULL-terminated MonoString into a new double-null-terminated
479         buffer.
480
481 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
482
483         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
484
485 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
486
487         * file-io.c: raise exceptions if handle is invalid.
488
489 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
490
491         * assembly.c: yet another check for mscorlib.
492         * class.c, class.h: load nesting info for classes.
493         * icall.c: many new functions to support the Reflection classes.
494         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
495         * reflection.h, reflection.c: mono_image_create_token(),
496         mono_assembly_get_object(), mono_type_get_object(),
497         mono_method_get_object(), mono_field_get_object(): methods to return
498         objects that parallel the C representation of assemblies, types,
499         methods, fields.
500
501 2001-12-11  Dick Porter  <dick@ximian.com>
502
503         * icall.c:
504         * file-io.c: Internal calls for file IO.
505
506 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
507
508         * tabledefs.h: missing FileAttributes.
509         * verify.h, verify.c: use is_valid_string () to simplify and check for
510         valid strings more correctly. Fix warnings and speeling.
511         Check more tables: Filed, File, ModuleRef, StandAloneSig.
512         Check code: branches, maxstack, method calls.
513
514 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
515
516         * object.c (mono_object_allocate): removed static, so that the jit
517         can allocate value types.
518
519         * icall.c (ves_icall_System_DateTime_GetNow): impl.
520
521 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
522
523         * class.c: init enum types right away and register the
524         token->MonoClass map in mono_class_create_from_typedef ().
525         * verify.h, verify.c: first cut of the verifier.
526         * pedump.c: add --verify switch to verify metadata tables.
527         * tabledefs.h: add some missing enums.
528
529 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
530
531         * class.c (mono_install_runtime_class_init): impl.
532         (mono_class_init): renamed mono_class_metadata_init to
533         mono_class_init, also removed the metadata_inited flag
534
535         * object.c (mono_object_isinst): use faster algorithm
536
537 2001-11-30  Radek Doulik  <rodo@ximian.com>
538
539         * mono-endian.h: reverted last change
540         added function prototypes
541
542         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
543         add mono-endian.c back
544
545         * mono-endian.c: returned back, as Paolo pointed out, it's needed
546         for unaligned access, I've mistaked it with endianess. I am
547         sorry.
548         (mono_read16): fix reverted endianess
549         (mono_read64): ditto
550         (mono_read32): ditto
551
552 2001-11-30  Dick Porter  <dick@ximian.com>
553
554         * exception.c: Implement mono_exception_from_name()
555
556 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
557
558         * metadata.h, metadata.c: remove params_size and locals_size and their
559         calculation from the metadata code: they are only usefult to the
560         interp.
561
562 2001-11-29  Radek Doulik  <rodo@ximian.com>
563
564         * object.c (mono_ldstr): swap bytes here, it's probably not the
565         best place, but works for me now, I'll redo it once I know mono
566         better, also note that I add PROT_WRITE and don't reset back, also
567         note that it's only affects big endians, so x86 should be OK
568
569         * mono-endian.h (read16): use just glib macros for both endians
570
571         * mono-endian.c: removed as glib macros are used in in
572         mono-endian.h so we don't need to care about endianess for read
573         macros as glib does that for us already
574
575 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
576
577         * class.h, class.h: take minimum alignment into consideration so
578         that the fields of a class remain aligned also when in an array.
579
580 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
581
582         * loader.h, loader.c: add mono_method_get_param_names().
583         * class.c: 0-init class fields.
584
585 2001-11-26  Dick Porter  <dick@ximian.com>
586
587         * icall.c:
588         * threads-types.h:
589         * threads.c: New file that handles System.Threading on all platforms
590
591         * object.c: 
592         * object.h: Remove the synchronisation struct from MonoObject,
593         replace it with a pointer that gets initialised on demand
594
595         * Makefile.am: Replace all the system-specific threading code with
596         a single file that uses the new wrapper library
597
598 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
599
600         * class.c, class.h: add mono_install_trampoline() so that the runtime
601         can register a function to create a trampoline: removes the ugly
602         requirement that a runtime needed to export arch_create_jit_trampoline.
603         * object.h, object.c: added mono_install_handler() so that the runtime
604         can install an handler for exceptions generated in C code (with
605         mono_raise_exception()). Added C struct for System.Delegate.
606         * pedump.c: removed arch_create_jit_trampoline.
607         * reflection.c: some cleanups to allow registering user strings and
608         later getting a token for methodrefs and fieldrefs before the assembly
609         is built.
610         * row-indexes.h: updates and fixes from the new ECMA specs.
611
612 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
613
614         * class.h, class.c: add enum_basetype field to MonoClass.
615         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
616         to get index in the constant table reated to a field, param or
617         property.
618         * reflection.h, reflection.c: handle constructors. Set public-key and
619         version number of the built assembly to 0.
620         * row-indexes.h: update from new ECMA spec.
621
622 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
623
624         * class.h, class.c: add a max_interface_id to MonoClass.
625         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
626         since it's used to do that. Added mono_type_type_from_obj().
627         Make GetType() return NULL instead of segfaulting if the type was not
628         found. Handle simple arrays in assQualifiedName.
629         * object.h: add a struct to represent an Exception.
630         * reflection.c: output call convention in method signature.
631         Add code to support P/Invoke methods and fixed offsets for fields.
632
633 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
634
635         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
636         the value.
637         * icall.c: use mono_array_addr instead of array->vector: fixes the
638         reflection image writing.
639         * reflection.c: init call convention byte to 0 in method signature.
640         Encode the property signature. Don't output property-related methods
641         twice. Really process the properties for a type (don't cast a field to
642         a property, my mom always told me that).
643         Fix 64 bit issues in pointer alignment in a different and more
644         readable way.
645
646 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
647
648         * loader.h: Removed type class from MonoDefaults, added monotype
649
650         * loader.c: Loaded MonoType, removed loading of Type
651
652         * icall.c (my_mono_new_object): Now returns a System.MonoType,
653         and fills in System.Type._impl with a RuntimeTypeHandle rather
654         than the actual MonoClass *
655
656         (ves_icall_type_from_handle): change from type_class to
657         monotype_class
658
659         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
660         implemented
661
662         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
663         implemented
664
665         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
666
667         (ves_icall_System_Reflection_Assembly_GetType): implemented
668
669         (ves_icall_System_MonoType_assQualifiedName): implemented
670
671         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
672
673 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
674
675         * assembly.c (mono_assembly_open): Implement a cache for the
676         assemblies. 
677
678         (mono_assembly_close): only destroy the assembly when the last
679         reference is gone.
680         
681 2001-11-09  Dick Porter  <dick@ximian.com>
682
683         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
684
685 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
686
687         * class.c (mono_class_metadata_init): bug fix: compute the right slot
688
689 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
690
691         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
692         from Martin Weindel.
693         * object.h: add mono_string_chars ().
694
695 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
696
697         * reflection.c (build_compressed_metadata): Eliminates warnings
698         and uses 64-bit clean code.
699
700         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
701         (mono_type_equal): Change signature to eliminate warnings.
702
703 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
704
705         * icall.c, loader.c: remove the internalcall array constructors.
706         Changes to match the new MonoArray structure.
707         * object.h, object.c: an array object doesn't allocate an extra
708         vector. Add mono_array_new_full () to create jagged arrays easily.
709
710 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
711
712         * metadata.h, metadata.c: add mono_metadata_field_info () to
713         retreive all the info about a field from vairous tables.
714         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
715         * class.h, class.c: augment MonoClassField with more info.
716         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
717         policy and load a field's RVA if needed.
718
719 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
720
721         * class.c (mono_class_metadata_init): create a trampoline for all
722         virtual functions instead of actually compiling them.
723
724 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
725
726         * class.h, class.c: include name in MonoClassField.
727         * class.c: fix fundamental type of System.Object and System.String.
728         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
729         tokens in ldtoken.
730         * icall.c: remove internalcalls for the Reflection stuff that is now
731         done in C# code.
732         * loader.c: mono_field_from_memberref () implementation.
733         * mono-endian.c: thinko (s/struct/union/g).
734         * object.c, object.h: make the mono_string_* prototypes actually use
735         MonoString instead of MonoObject.
736         * reflection.c, reflection.h: updates for changes in the reflection
737         code in corlib: we use C structures that map to the actual C# classes.
738         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
739         fat method header if needed and use the info from the ILGenerator for
740         methods. Handle fields in types. Misc fixes.
741
742 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
743
744         * class.c (mono_class_metadata_init): bug fix: always allocate
745         space for static class data
746
747 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
748
749         * class.c (mono_compute_relative_numbering): use relative
750         numbering to support fast runtime type checks.
751
752 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
753
754         * class.c (mono_class_create_from_typeref): added debugging output
755         to print class name when MonoDummy is returned instead of real class
756
757 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
758
759         * class.c (mono_class_metadata_init): interface offset table now
760         contains pointers into the vtable - this is more efficient for the jit
761
762 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
763
764         * class.c (mono_class_metadata_init): use a temporary vtable (the
765         old algorithm only worked for the interpreter, but not for the jit)
766
767 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
768
769         * loader.c (method_from_memberref): use mono_class_get to get the
770         class of an array instead of using System.Array directly.
771         (mono_get_method): also add MEMBERREF methods to the method cache
772         which usefull for arrays.
773
774 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
775
776         * pedump.c (arch_compile_method): added to compute vtable entry
777
778         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
779         number of interfaces.
780         
781         * class.h: merged MonoArrayClass into MonoClass
782
783         * class.c (mono_class_create_from_typedef): compute the vtable size and
784         allocate space to include the vtable inside MonoClass
785         (mono_class_metadata_init): initialize the vtable
786
787 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
788
789         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
790         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
791         * image.c: endian fixes by Laurent Rioux.
792         * object.h, object.c: rename MonoStringObject to MonoString and
793         MonoArrayObject to MonoArray. Change some function names to conform to
794         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
795         guint16* as first argument, so don't use char*.
796         Provide macros to do the interesting things on arrays in a portable way.
797         * threads-pthread.c: updates for the API changes and #include <sched.h>
798         (required for sched_yield()).
799         * icall.c: updates for the API changes above.
800         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
801         platforms that need them.
802
803 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
804
805         * class.c: set the correct type for all the fundamental
806         type when loading the class.
807
808 2001-10-05  Dick Porter  <dick@ximian.com>
809
810         * threads-pthread.c (pthread_mutex_timedlock): Simple
811         compatibility version for C libraries that lack this call.
812
813 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
814
815         * class.c: MonoTypes stored in MonoClass are stored as
816         fundamental MonoTypes when the class represents a
817         fundamental type (System.Int32, ...).
818         The TypeHandle return by ldtoken is a MonoType*.
819         * icall.c: ves_icall_get_data_chunk () write out all the
820         PE/COFF stuff. Implement ves_icall_define_method (),
821         ves_icall_set_method_body (), ves_icall_type_from_handle ().
822         * image.c: properly skip unknown streams.
823         * loader.h, loader.c: add type_class to mono_defaults.
824         * metadata.c, metadata.h: export compute_size () as
825         mono_metadata_compute_size () with a better interface.
826         Typo and C&P fixes.
827         * pedump.c: don't try to print the entry point RVA if there is no entry point.
828         * reflection.c, reflection.h: many cleanups, fixes, output method
829         signatures and headers, typedef and typeref info, compress the metadata
830         tables, output all the heap streams, cli header etc.
831         * row-indexes.h: typo fixes.
832
833 2001-10-04  Dick Porter  <dick@ximian.com>
834
835         * object.h: Add a synchronisation mutex struct to MonoObject
836
837         * object.c (mono_new_object): Initialise the object
838         synchronisation mutexes
839
840         * icall.c: System.Threading.Monitor internal calls
841         
842         * threads-pthread.h:
843         * threads-pthread.c: System.Threading.Monitor internal calls
844
845         * threads-types.h: New file, includes the system-specific thread
846         structures
847         
848         * threads-pthread-types.h:
849         * threads-pthread-types.c: New files, handle pthread-specific
850         synchronisation types
851
852         * threads-dummy-types.h: 
853         * threads-dummy-types.c: New files of dummy support for
854         thread-specific types
855
856         * metadata.c:
857         * image.c:
858         * pedump.c: include mono-endian.h not endian.h
859         
860         * Makefile.am: More threads files.
861         Name mono-endian.h not endian.h
862
863 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
864
865         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
866         stuff and implement a few more bits.
867         * icall.c: a field needs to be dereferenced twice. Do not use the same
868         name for two variables in the same scope.
869         * image.c, image.h: cleanups.
870
871 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
872
873         * class.c (mono_class_metadata_init): bug fix: compute the right size
874
875 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
876
877         * icall.c: implemented some of the Reflection internalcalls.
878         * image.c, image.h: start writing out the PE/COFF image.
879         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
880         that does the reverse than decode_blob_size ().
881         * object.c: use mono_metadata_encode_value (). Move here
882         temporary implementation of mono_string_to_utf8 ().
883         * rawbuffer.c: make malloc_map static.
884
885 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
886
887         * metadata.c: fix type comparison for arrays.
888         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
889         Added a couple of new classes to monodefaults.
890         * icall.c: added a couple of Reflection-related internalcalls.
891         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
892         Added a byval_arg MonoType to MonoClass.
893
894 2001-09-28  Dick Porter  <dick@ximian.com>
895
896         * icall.c:
897         * threads-pthread.h: 
898         * threads-pthread.c: Implemented internal calls for
899         LocalDataStoreSlot operations.  Applied mutexes around all shared
900         data.  Reworked the thread creation and Start() operations to
901         avoid a race condition.
902         
903         * threads-dummy.h:
904         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
905
906 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
907
908         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
909
910 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
911
912         * class.c, loader.c: warn and return NULL instead of erroring out.
913         * icall.c: added System.AppDomain::getCurDomain().
914         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
915
916 2001-09-25  Dick Porter  <dick@ximian.com>
917
918         * threads-pthread.h:
919         * threads-pthread.c: Implemented timed thread joining and added
920         System.Threading.Thread::Join_internal internal call
921
922         * icall.c: Added System.Threading.Thread::Join_internal internal call
923
924         * threads-dummy.h:
925         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
926
927 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
928
929         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
930         mono_string_intern () to implement the semantics of the ldstr opcode
931         and the interning of System.Strings.
932         * icall.c: provide hooks to make String::IsIntern and String::Intern
933         internalcalls.
934
935 2001-09-23  Dick Porter  <dick@ximian.com>
936
937         * threads-dummy.c: 
938         * threads-dummy.h: New files of dummy threading routines
939
940         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
941         support code based on system specifics
942
943         Rename PTHREAD_LIBS to THREAD_LIBS
944         
945 2001-09-23  Dick Porter  <dick@ximian.com>
946
947         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
948         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
949         internal calls.
950         (mono_thread_init): Set up a Thread object instance to return when
951         the main thread calls Thread.CurrentThread
952         (mono_thread_cleanup): Wait for all subthreads to exit
953
954         * icall.c: New internal calls for System.Threading.Thread::Sleep
955         (including Schedule) and CurrentThread
956
957         * threads.h: New file, to insulate thread-specific stuff from the
958         rest of the code
959
960 2001-09-21  Dick Porter  <dick@ximian.com>
961
962         * threads-pthread.h: 
963         * threads-pthread.c: New file, for handling pthreads-style
964         threading support.  Start() now starts a new thread and executes
965         the ThreadStart delegate instance.
966
967         * icall.c: Added the internalcall for
968         System.Threading.Thread::Start_internal
969
970         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
971
972 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
973
974         * loader.c: work around the different signatures for delegates
975         constructors csc generates in compiled code vs the ones compiled in mscorlib.
976
977 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
978
979         * class.h, class.c: add mono_class_get_field_from_name ().
980         * *: Fix C comments and other ANSI C issues.
981
982 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
983
984         * endian.h, assembly.c: fix some endianness issues.
985
986 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
987
988         * loader.h, load.c: add delegate_class to mono_defaults.
989         Handle runtime provided methods in mono_get_method ().
990
991 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
992
993         * loader.c (mono_get_method): use pinvoke for internal call
994
995         * icall.c: use pinvoke for internal call
996
997         * loader.c (method_from_memberref): set the method name
998
999 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
1000
1001         * metadata.c: help the compiler generate better code for
1002         mono_class_from_mono_type ().
1003
1004 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
1005
1006         * class.c (mono_class_metadata_init): delayed computing of the
1007         class size to mono_class_metadata_init ()
1008
1009 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
1010
1011         * class.c, class.h: add an interfaces member to MonoClass.
1012         * image.c, image.h: add assembly_name field to MonoImage
1013         from the assembly table.
1014         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
1015
1016 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
1017
1018         * class.c: Handle Array in mono_class_from_mono_type ().
1019         * metadata.c, pedump.c: some endian fixes.
1020
1021 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
1022
1023         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
1024         * metadata.c: fix small problem introduced with the latest commit.
1025
1026 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
1027
1028         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
1029         We don't need a MonoMetadata pointer anymore to compare signatures in
1030         mono_metadata_signature_equal (), update callers.
1031         Reduced memory usage an number of allocations for MonoMethodHeader and
1032         MonoMethodSignature.
1033
1034 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
1035
1036         * metadata.c: added compare for szarray.
1037
1038 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
1039
1040         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
1041         and add a couple more types to it and mono_defaults. Give an hint on
1042         classes that need implementing in our corlib and are referenced
1043         in mscorlib.
1044
1045 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
1046
1047         * class.h, class.c: keep track if a class is also an Enum.
1048         * loader.c: Implement a couple more types for use in libffi
1049         marshalling. Gives better diagnostics when failing to dlopen
1050         a library. Set method->klass for P/Invoke methods, too.
1051
1052 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
1053
1054         * class.c, class.h: add a MonoType this_arg to MonoClass that
1055         represents a pointer to an object of the class' type that
1056         can be used by the interpreter and later the type cache.
1057         Add best guess alignment info for valuetype objects.
1058
1059 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
1060
1061         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
1062         into MonoType: one less level of indirection and allocation and
1063         simplifies quite a bit of code. Added cache for MonoTypes that are
1064         used frequently, so that we don't need to allocate them all the time.
1065
1066 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
1067
1068         * class.c (mono_class_create_from_typedef): System.Enum is also a
1069         value type, although it does not derive from System.ValueType
1070         (maybe a bug in the ms compiler?)
1071
1072         * metadata.c (mono_type_size): return the right size for value types
1073
1074         * loader.c (mono_get_method): only initialize method header if not abstract
1075
1076         * class.c (mono_class_from_mono_type): use mono_default values. 
1077
1078 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
1079
1080         * *: use MonoClass pointers instead of <type_tokens>
1081         
1082         * class.h: new flag: metadata_inited.
1083
1084         * class.c (mono_class_metadata_init): impl.
1085         (mono_class_instance_size): impl.
1086         (mono_class_data_size): impl.
1087
1088 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
1089
1090         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
1091         MonoClass now has the name and name_space fields. 
1092         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
1093         mono_get_method () takes and optional MonoClass as argument.
1094         Removed mono_typedef_from_name() and added mono_class_token_from_name()
1095         instead that takes advantage of a map from class names to typedef
1096         tokens in MonoImage.
1097
1098 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
1099
1100         * metadata.c: zero is not a valid alignment boundary.
1101         Merge MONO_TYPE_VOID in default decoding code.
1102
1103 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
1104
1105         * image.h: merged MonoMetadata into MonoImage
1106
1107         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
1108         identify the type of elements.
1109
1110 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
1111
1112         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
1113         * cil-coff.h: split MonoMSDOSHeader and add size info.
1114         * image.c: add some consistency checks.
1115         * metadata.c: fix row size computation: one programmer
1116         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
1117         add explanation for the locator routine.
1118         Fix decoding of size in method header.
1119         
1120 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
1121
1122         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
1123         (g_concat_dir_and_file): Bring g_concat_dir_and_file
1124         function from gnome-libs.  This uses the right path separator
1125         based on the OS, and also works around a bug in some systems where
1126         a double slash is not allowed. 
1127         (default_assembly_name_resolver): Use g_concat_dir_and_file
1128         (mono_assembly_open): ditto.
1129
1130 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
1131
1132         * metadata.c (mono_metadata_signature_equal): impl.
1133
1134         * *: void is now a realy MonoType (instead of using NULL)
1135         
1136         * metadata.c (do_mono_metadata_parse_type): use
1137         mono_metadata_parse_type to parse void value.
1138
1139 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
1140
1141         * metadata.c, metadata.h: in the signature and method header store
1142         only the space required for holding the loca vars and incoming arguments.
1143
1144 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
1145
1146         * metadata.c (do_mono_metadata_parse_type): treat void like any
1147         other type (instead of assigning NULL);
1148
1149 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
1150
1151         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
1152
1153 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
1154
1155         * image.c (do_mono_image_open): added a cache for arrays.
1156
1157 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
1158
1159         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
1160         decode a single column from a row in a metadata table and changes
1161         to take advantage of it in the typedef locator (gives a nice speed up).
1162         Store offset info for function params.
1163
1164 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
1165
1166         * image.h (MONO_IMAGE_IS_CORLIB): removed 
1167
1168 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
1169
1170         * assembly.c: how could mono_assembly_close () had ever worked?
1171         * metadata.c, metadata.h: provide offset info for local vars.
1172         Implement mono_type_size () to take care of alignment as well
1173         as size (it was mono_field_type_size in cli/class.c before).
1174
1175 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
1176
1177         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
1178
1179         * assembly.h (CORLIB_NAME): set to corlib.dll
1180
1181         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
1182
1183 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
1184
1185         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
1186         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
1187         tokentype.h: massive namespace cleanup.
1188
1189 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
1190
1191         * metadata.h, metadata.c: decode exception clauses when parsing method header.
1192
1193 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
1194
1195         * metadata.c (mono_metadata_free_type): added check for type !=
1196         NULL (void) before calling mono_metadata_free_type()
1197
1198 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
1199
1200         * metadata.h, row_indexes.h: added header with enumerations to use
1201         to index in the columns from tables in metadata and to decode coded
1202         tokens: we should start using this instead of embedding magic numbers
1203         all over the code.
1204
1205 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
1206
1207         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
1208         Move metadata_t info from cli_image_info_t to MonoImage, where
1209         it's easily accessible. Changed all the uses accordingly.
1210         Added the method and class caches to MonoImage.
1211         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
1212         and mono_metadata_decode_value () signature to be more consistent
1213         with the other parse functions (and simplify code). Taken advantage
1214         of zero-length array allocation with GCC. Removed reduntant (and
1215         wrong) MonoFieldType struct and use MonoParam instead. Changed
1216         mono_metadata_parse_field_type () to use common code for parsing.
1217         Added mono_metadata_typedef_from_field () and
1218         mono_metadata_typedef_from_method () to lookup a typedef index from a
1219         field or method token.
1220         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
1221
1222 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
1223
1224         * metadata.c (mono_metadata_parse_field_type): Implement. 
1225         (do_mono_metadata_parse_type): Split engine from
1226         mono_metadata_parse_type, so that we can create smaller structures
1227         for things that just have one pointer to the MonoType (look at
1228         the MonoFieldType)
1229
1230 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
1231
1232         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
1233         as Jan Gray found out, it is incorrect. 
1234
1235 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
1236
1237         * assembly.c: Implement asssembly loading.  This loads an image
1238         and loads all the referenced assemblies.  Come to think of it, we
1239         could always do lazy loading of the assemblies. 
1240
1241         * image.c (mono_image_open): Keep loaded images in a hashtable.
1242
1243         * image.h (MonoImage): Add reference count.
1244
1245 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
1246
1247         * assembly.c (mono_assembly_open): Keep track of the file name in
1248         case the assembly has no ASSEMBLY table.
1249
1250         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
1251         from get.c here.
1252
1253 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
1254
1255         * metadata.c, metadata.h: decode local vars in method header
1256         parse function. Change callers accordingly.
1257
1258 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
1259
1260         * metadata.h, cil-coff.h: protect against multiple inclusion.
1261         Added some new structures to hold information decoded from metadata:
1262         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
1263         and relevant decoding/free functions.
1264         * metadata.c: implement decoding functions. Add warning for out of bounds
1265         index in mono_metadata_locate(). Implement mono_get_method () to retreive
1266         all the info about a method signature and invocation. Remove check on
1267         uninitialized local var in parse_mh() and fix memory leak.
1268
1269 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
1270
1271         * metadata.h: More macros.
1272
1273         * tokentype.h: New file.
1274
1275 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
1276
1277         * assembly.c: added a consistency check and initialize
1278         some structures with g_new0().
1279         * metadata.c: fixed a couple more bugs in table size computation
1280         and add other checks for out-of bound access to metadata.
1281
1282 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
1283
1284         * metatada.c: fix bugs computing table sizes. Spew a
1285         warning when index in string heap is out of bounds.
1286
1287 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
1288
1289         * metadata.h: Add a couple of macros to manipulate tokens. 
1290
1291 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
1292
1293         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
1294         cli_section_tables).
1295
1296 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
1297
1298         * metadata.c (mono_metadata_user_string): New function, provides
1299         access to the UserString heap. 
1300
1301 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
1302
1303         * metadata.c: Add inline documentation.
1304
1305 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
1306
1307         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
1308         files. 
1309
1310 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
1311
1312         * typeattr.h: New file, TypeAttribute flags. 
1313
1314 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
1315
1316         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
1317         mono_assembly_ensure_section): Section loading code.
1318         (load_section_tables): Load the sections.
1319
1320         * mono/metadata/metadata.c (mono_metadata_locate_token,
1321         mono_metadata_locate): Functions to locate the information
1322         definition given a token or a table and an index.
1323         (mono_metadata_compute_table_bases): New.
1324         (compute_size): New function to compute the sizes of the various
1325         tables.
1326
1327         * mono/metadata/metadata.h: Finish listing the different index
1328         types. 
1329
1330         * mono/metadata/pedump.c: Improve to dump new information.
1331
1332 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
1333
1334         * mono/metadata/metadata.c: Entered all the tables matching
1335         Beta2. 
1336
1337         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
1338