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