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