Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1
2 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
3
4         * threads.c: make sure the domain is correct, too when doing
5         mono_thread_attach ().
6
7 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
8
9         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
10         windows. Fixes #77683.
11
12 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
13
14         * object.h, *: introduced specific way to set elements of an array
15         of references to be used as write barrier. Still need to audit the
16         uses of mono_array_addr.
17
18 2006-03-01  Miguel de Icaza  <miguel@novell.com>
19
20         * object-internals.h: New field to cache the assmebly name, patch
21         from Tambet Ingo (tambet@ximian.com)
22
23 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
24
25         * decimal.h, class-internals.h, metadata-internals.h,
26         file-io.h: mark a few function declarations as internal, to
27         reduce the number of PLT entries.
28
29 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30
31         * file-io.c: fix typo in warning message.
32
33 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
34
35         * loader.c: on unix, lookup the "*A" version of a function
36         if charset is auto as a second option before failing.
37
38 2006-02-28  Raja R Harinath  <rharinath@novell.com>
39
40         * class.h (mono_class_inflate_generic_method): Revert to two
41         argument version.
42         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
43         (mono_class_inflate_generic_method_full): Add.
44         * class.c (mono_class_inflate_generic_method_full): Rename from
45         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
46         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
47         * loader.c, reflection.c: Update to changes.
48
49 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
50
51         * icall.c: const fixes and small improvements.
52
53 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
54
55         * threadpool.c: for asynchronous connect(), enable the same workaround
56         for BSD 6 as for the Mac. Fixes bug #77637.
57
58 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
59
60         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
61         formatted classes. Fixes #77524.
62
63 2006-02-24  Raja R Harinath  <rharinath@novell.com>
64
65         * class.c (inflate_generic_type): Add a couple more
66         micro-optimizations.
67         (inflate_generic_context): Don't use the 'gmethod' from
68         'inflate_with'.
69         (mono_class_inflate_generic_method): If the method has generic
70         parameters, but the passed-in context doesn't have a 'gmethod',
71         create one.  Use the possibly simplified generic instantiation
72         from the declaring class instead of the one passed in.
73
74 2006-02-24  Raja R Harinath  <harinath@gmail.com>
75
76         Make generic method signature and method header handling lazy.
77         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
78         (inflate_generic_header): Likewise.
79         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
80         parameter to avoid inflating types.
81         (mono_get_inflated_method): Empty out.
82         * class.h (mono_class_inflate_generic_method): Update to changes.
83         * loader.c (mono_get_method_from_token): Don't parse signature for
84         generic methods, nor methods of generic classes.
85         (mono_method_signature): Rename from 'mono_method_signature'.
86         Inflate signature on demand.
87         (mono_method_get_header): Inflate method header on demand.
88         * reflection.c: Update to changes.
89
90 2006-02-23  Raja R Harinath  <rharinath@novell.com>
91
92         * metadata.c (mono_metadata_inflate_generic_inst): If the
93         instantiation is closed, don't bother expanding it in the new
94         context.
95         * class.c (inflate_generic_class): If the generic instantiation
96         doesn't change after inflation, return the argument itself.
97         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
98         Add bounds checks.
99         (inflate_generic_context): If neither the generic class nor the
100         generic method instantiations change, return the original context.
101         * reflection.c (mono_method_get_object): Do
102         'mono_get_inflated_method' before accessing the ->klass field.
103         (inflate_mono_method): Don't create a MonoGenericMethod unless
104         necessary.
105         (inflate_method): Don't pass a constructed type as the declaring
106         type of a methodbuilder.
107
108 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
109
110         * object.c: fix memory overwrite.
111
112 2006-02-22  Dick Porter  <dick@ximian.com>
113
114         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
115         it doesn't work any more.
116         (mono_threads_request_thread_dump): Fix unused variable warnings.
117
118 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
119
120         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
121         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
122         the public header file.
123
124 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
125
126         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
127
128 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
129
130         * class-internals.h, object.c: reduce the size of MonoVTable
131         and store the interface_offsets array at negative offsets.
132
133 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
134
135         * metadata.c: tweak table descriptors data structures to reduce
136         size and runtime relocations.
137
138 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
139
140         * marshal.c: fix some types and opcodes to be type-safe
141         in marshaling wrappers.
142
143 2006-02-21  Ankit Jain  <jankit@novell.com>
144
145         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
146
147 2006-02-21  Raja R Harinath  <rharinath@novell.com>
148
149         * metadata.c (get_constraints): Relax debugging checks for monodis.
150
151 2006-02-21  Ankit Jain  <jankit@novell.com>
152
153         * metadata.c (mono_metadata_load_generic_params): Move the code
154         checking for ambiguous generic params from here to mono/dis/get.c
155         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
156
157 2006-02-21  Raja R Harinath  <harinath@gmail.com>
158
159         Fix assertion triggered when compiling nemerle.
160         * class.c (mono_get_shared_generic_inst): Rename from
161         get_shared_inst and make non-static.
162         * loader.c (mono_get_shared_generic_method): New.  Used to create
163         the MonoGenericContext-equivalent of a MonoGenericContainer.
164         (mono_get_method_from_token): Initialize the 'context' field of
165         the created MonoGenericContainer.
166         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
167         * metadata.c (get_constraints): Add sanity check.
168         * class-internals.h: Add new internal methods.
169
170         * reflection.c (verify_safe_for_managed_space): New sanity check.
171         Currently checks that owner-less generic parameters aren't allowed
172         in managed space.
173         (mono_type_get_object): Use it.
174         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
175         that are now in mono_type_get_object.
176         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
177
178 2006-02-19  Raja R Harinath  <harinath@gmail.com>
179
180         * metadata.c (mono_type_create_from_typespec): Rename from
181         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
182         argument and caching of types in the generic container.
183         (unwrap_arrays, find_generic_param): Remove.
184         * metadata-internals.h: Update.
185         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
186
187 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
188
189         * class.c (mono_class_get_exception_for_failure): Fix a warning.
190
191         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
192         return values. Fixes #77581.
193
194         * class.c (mono_fnptr_class_get): Switch name and name_space.
195
196         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
197         classes and add support for [In, Out] attributes.
198         (mono_marshal_free_asany): Ditto. Fixes #77524.
199
200 2006-02-18  Raja R Harinath  <harinath@gmail.com>
201
202         * class.c (mono_class_from_generic_parameter): Make more robust to
203         incomplete MonoGenericContainers from monodis.
204
205 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
206
207         * class-internals.h: added some more exception types.
208         * class.c, metadata.c: added a few checks to handle missing
209         types.
210
211 2006-02-17  Raja R Harinath  <rharinath@novell.com>
212
213         Use owner-less generic-params some more.
214         * class.c (my_mono_class_from_generic_parameter): Remove.
215         (mono_class_from_generic_parameter): Handle null image,
216         param->name and param->owner.
217         (mono_class_from_mono_type): Update.
218         (mono_class_create_from_typespec): Remove 'container' parameter.
219         If that parameter is non-null, the result is always inflated by
220         'mono_class_get_full' anyway.
221         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
222         parameter.
223         (mono_class_get_full): Update.
224
225         * class.c (inflate_generic_type) [GENERICINST]: If the generic
226         instance is not open, don't bother inflating.
227         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
228         parse metadata for inflated classes.
229         (_mono_class_get): Change GenericContext* parameter to
230         GenericContainer*.
231         (mono_class_create_from_typespec): Likewise.  Simplify, and
232         implement trivially.  All the cases are handled in
233         mono_class_from_mono_type.  Don't inflate returned class.
234         (mono_class_get_full): Delegate GENERICINST optimization to
235         inflate_generic_type.
236         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
237
238 2006-02-16  Dick Porter  <dick@ximian.com>
239
240         * socket-io.c (create_object_from_sockaddr): Fix typo.
241         (create_sockaddr_from_object): Check array lengths before
242         potentially accessing items off the end.
243         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
244         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
245         (ves_icall_System_Net_Sockets_Socket_Send_internal)
246         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
247         length checks to avoid wraparound overflows.
248         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
249         contents of the array of sockets
250         (hostent_to_IPHostEntry2)
251         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
252         Check return value of inet_ntop ().
253         (addrinfo_to_IPHostEntry): Fix typo
254
255 2006-02-16  Raja R Harinath  <rharinath@novell.com>
256
257         Type metadata parsing doesn't use generic-instantiation information.
258         * metadata.c (mono_metadata_parse_array_full): Change
259         MonoGenericContext* parameter to MonoGenericContainer*.
260         (mono_metadata_parse_type_full): Likewise.
261         (mono_type_create_from_typespec_full): Likewise.
262         (mono_metadata_parse_mh_full): Likewise.
263         (mono_metadata_parse_generic_inst): Likewise.
264         (do_mono_metadata_parse_generic_class): Likewise.
265         (do_mono_metadata_parse_type): Likewise.
266         * metadata-internals.h: Update to changes.
267         * class.c (mono_class_find_enum_basetype): Likewise.
268         (mono_class_setup_fields): Likewise.
269         (mono_class_create_from_typespec): Likewise.
270         * loader.c (method_from_methodspec): Likewise.
271         (mono_get_method_from_token): Likewise.
272         (mono_method_get_header): Likewise.
273
274 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
275
276         * marshal.c: handle additional GENERICINST case (patch from
277         Thong Nguyen <tum@veridicus.com>).
278         Fix a few cases where LDIND_I/STIND_I was used for references.
279
280 2006-02-16  Raja R Harinath  <rharinath@novell.com>
281
282         * reflection.c (mono_reflection_get_token): Remove unused variable.
283
284 2006-02-16  Martin Baulig  <martin@ximian.com>
285
286         * reflection.c (mono_reflection_get_token): Add support for fields
287         in instantiated generic types.
288
289         * icall.c
290         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
291
292 2006-02-15  Martin Baulig  <martin@ximian.com>
293
294         * icall.c
295         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
296         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
297         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
298         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
299
300 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
301
302         * class.c, metadata.c, metadata.h, object.c, icall.c,
303         marshal.c: changed mono_type_get_underlying_type () to do
304         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
305         Fixed handling of instantiated generic valuetypes (bug #75479).
306
307 2006-02-15  Raja R Harinath  <rharinath@novell.com>
308
309         * metadata.c (mono_metadata_decode_signed_value): Simplify.
310         Delegate to mono_metadata_decode_value, and work on the returned value.
311
312         * icall.c (ves_icall_MonoType_GetGenericArguments):
313         Add consistency check here too.
314         
315 2006-02-15  Ankit Jain  <jankit@novell.com>
316
317         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
318         char/short etc.
319
320 2006-02-15  Ankit Jain  <jankit@novell.com>
321
322         * metadata.c (mono_metadata_decode_signed_value): New function to decode
323         signed values, used only for representing lower bounds of arrays.
324         (mono_metadata_parse_array_full): Use new
325         mono_metadata_decode_signed_value to decode lower bounds.
326
327 2006-02-14  Martin Baulig  <martin@ximian.com>
328
329         * reflection.c
330         (mono_reflection_get_token): Support "MonoGenericMethod" and
331         "MonoGenericCMethod" and allow generic instances / methods.
332
333 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
334
335         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
336         to obtain the terminal size using an ioctl.
337
338         * object.c (mono_nullable_init): Revert this as nullable reference
339         types are not valid.
340         (mono_nullable_box): Ditto.
341
342 2006-02-09  Dick Porter  <dick@ximian.com>
343
344         * threads.c (mono_thread_detach): Drop a reference to the thread
345         we're detaching.
346
347 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
348
349         * object.c (mono_nullable_init): Handle nullable reference types.
350         (mono_nullable_box): Ditto. Fixes #77446.
351
352 2006-02-07  Martin Baulig  <martin@ximian.com>
353
354         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
355
356 2006-02-07  Ankit Jain  <jankit@novell.com>
357
358         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
359         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
360         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
361         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
362         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
363         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
364
365 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
366
367         * class.c (mono_class_create_generic): Set type_token as well.
368
369         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
370         compatible with MS.
371
372 2006-02-02  Martin Baulig  <martin@ximian.com>
373
374         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
375         has never been used so far.
376
377 2006-02-02  Martin Baulig  <martin@ximian.com>
378
379         * mono-debug-debugger.h: Changed comment at the top of this file;
380         the header is not installed, but it's safe to #include it from
381         within the JIT.
382
383         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
384         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
385
386 2006-02-02  Martin Baulig  <martin@ximian.com>
387
388         * mono-debug.h
389         (MonoSymbolTable): Removed the `metadata_info' field.
390
391         * mono-debug.c
392         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
393
394         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
395         (mono_debugger_add_builtin_types): Removed.
396         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
397         (mono_debugger_create_notification_function): We now operate on a
398         pre-allocated area; take a `gpointer' and return `void'.
399
400         * mono-debug-debugger.c
401         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
402         (mono_debugger_add_builtin_types): Removed.
403
404 2006-02-02  Martin Baulig  <martin@ximian.com>
405
406         * threads.c (mono_debugger_create_all_threads): New public method.
407
408 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
409
410         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
411         breaks on several platforms.
412
413 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
414
415         * assembly.c: the VS.NET build doesn't supply default values for
416         MONO_ASSEMBLIES and MONO_CFG_DIR.
417
418 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
419
420         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
421         helper function.
422
423         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
424
425         * loader.c (method_from_memberref): Fix a warning.
426
427         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
428
429         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
430         with explicit layout. Fixes #77433.
431
432 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
433
434         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
435         max_interface_id is initialized before using it. Fixes #77398.
436         (ves_icall_Type_GetInterfaces): Ditto.
437
438 2006-01-30  Raja R Harinath  <rharinath@novell.com>
439
440         * metadata.c (mono_metadata_parse_method_signature_full): Don't
441         allocate memory for parameter attributes when parsing memberref
442         signatures.
443         * loader.c (mono_loader_set_error_method_load): Don't warn.
444         (method_from_memberref): Ensure MissingMethodException gets thrown
445         if method is not found.  Make warning more informative.
446
447 2006-01-29  Raja R Harinath  <harinath@gmail.com>
448
449         Fix #77397
450         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
451         return true if is byref.
452         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
453         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
454         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
455
456 2006-01-27  Raja R Harinath  <rharinath@novell.com>
457
458         Fix tests/find-method.2.il
459         * loader.c (find_method, find_method_in_class): Remove is_inflated
460         argument.  Revert 2006-01-18 change.
461         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
462         is generic, search for method in its generic definition.
463         * class.c (mono_class_setup_vtable_general): Print generic
464         arguments of generic types in debugging printf.
465
466 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
467
468         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
469
470         * threads.c (mono_threads_request_thread_dump): New helper function.
471
472 2006-01-25  Raja R Harinath  <rharinath@novell.com>
473
474         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
475
476 2006-01-25  Ankit Jain  <jankit@novell.com>
477
478         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
479         move definition to ..
480         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
481         
482 2006-01-25  Ankit Jain  <jankit@novell.com>
483             Raja R Harinath  <rharinath@novell.com>
484
485         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
486         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
487         as necessary.
488
489 2006-01-25  Martin Baulig  <martin@ximian.com>
490
491         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
492         `MonoDebuggerThread' into debug-debugger.c.
493
494 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
495
496         * profiler.c: fix printing of data.
497
498 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
499
500         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
501           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
502
503 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
504
505         * object.c: fix deadlock related to string interning.
506
507 2006-01-23  Martin Baulig  <martin@ximian.com>
508
509         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
510
511         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
512
513 2006-01-23  Martin Baulig  <martin@ximian.com>
514
515         * mono-debug.h: Moved the prototypes of some functions which are
516         used by the JIT here from mono-debug-debugger.h.
517
518 2006-01-21  Martin Baulig  <martin@ximian.com>
519
520         * Makefile.am: Don't install mono-debug-debugger.h.
521
522 2006-01-21  Martin Baulig  <martin@ximian.com>
523
524         * mono-debug-debugger.h: Enforce the private status of this header
525         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
526         Moved some stuff from mono-debugger-jit-wrapper.h here.
527
528 2006-01-20  Raja R Harinath  <rharinath@novell.com>
529
530         * class.c (mono_class_from_typeref): Add a sanity test to help
531         catch lack of assembly load/search hooks.
532
533 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
534
535         * marshal.c (emit_struct_conv): Relax the fields with same offset
536         check even more. Fixes #77230.
537
538 2006-01-18  Martin Baulig  <martin@ximian.com>
539
540         * loader.c (find_method_in_class): Added `gboolean is_inflated'
541         argument; if false, we compare the uninstantiated signatures.
542         (method_from_memberref): Compare the uninstantiated signatures;
543         fixes #76417.
544
545 2006-01-18  Robert Jordan  <robertj@gmx.net>
546
547         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
548         Clear the weak link. Fixes bug #77170.
549
550         * gc.c (mono_gchandle_free):
551         Reflect *-gc.c changes (tiny optimization).
552
553 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
554
555         * metadata.c (mono_metadata_signature_dup): Applied patch from
556         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
557         Fixes #77288.
558
559 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
560
561         * marshal.c (emit_struct_conv): Allow fields with the same offset when
562         marshalling from native to managed code. Fixes #77230.
563
564 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
565
566         * threadpool.c: fix problem (Mac only) when more than one asynchronous
567         connect. Fixes bug #77020.
568
569 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
570
571         * class.c: fixed id assignement for nested interfaces (bug #77275).
572         Added also better info for --print-vtable debugging.
573
574 2006-01-12  Martin Baulig  <martin@ximian.com>
575
576         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
577         interfaces on-the-fly; fixes #76625.
578
579         * class-internals.h
580         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
581         don't need that anymore.
582
583 2006-01-12  Miguel de Icaza  <miguel@novell.com>
584
585         * socket-io.c
586         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
587         To avoid initing the nested_classes when not needed I turned the
588         PeerCredData as a toplevel internal class, as it has to be shared
589         anyways. 
590
591         Fixes the CASA issue.
592
593 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
594
595         * domain.c: Accessors for MonoJitInfo
596
597         * profiler-private.h: Add jitinfo to the end jit hook
598
599         * profiler.[ch]: Define new hooks, called after jitting which give
600         the MonoJitInfo that was compiled
601
602 2006-01-10  Martin Baulig  <martin@ximian.com>
603
604         * class.c (mono_class_setup_events): Add support for generic
605         classes; fixes #76440.
606
607 2006-01-06  Raja R Harinath  <rharinath@novell.com>
608
609         Fix #77160.
610         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
611         on passed-in method.
612
613 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
614
615         * object.c (mono_runtime_invoke_array): Add Nullable support.
616
617         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
618
619 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
620
621         * file-io.c: Don't consider sockets as directory and avoid an endless
622         loop. Fix bug #76966.
623
624 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
625
626         * object.c (mono_nullable_init): New helper function.
627         (mono_nullable_box): Ditto.
628
629         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
630
631         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
632
633         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
634         
635 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
636
637         * class.c (mono_class_is_assignable_from): Make T assignable to 
638         Nullable<T>.
639
640 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
641
642         * appdomain.c: Bump corlib version to 46.
643         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
644         serialization purpose) and changed ves_icall_System_Reflection_
645         Assembly_get_code_base signature to accept a boolean (to escape, or 
646         not, the assembly code base).
647
648 2005-12-23  Dick Porter  <dick@ximian.com>
649
650         * icall.c: 
651         * threads-types.h: 
652         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
653         CreateEvent icall now returns "created" boolean parameter.
654
655 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
656
657         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
658         #76967.
659
660         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
661         when attr_klass is an interface. Fixes #77045.
662
663 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
664
665         * marshal.c (emit_struct_conv): Fix previous patch.
666         
667         * marshal.c (emit_struct_conv): Add a check for fields with the same
668         offset.
669
670 2005-12-20  Raja R Harinath  <rharinath@novell.com>
671
672         Fix regression in Mono.C5.
673         * class.c (mono_class_create_generic): If 'klass' is an interface
674         set up the interface offsets.
675         (mono_class_is_assignable_from): Don't throw away generic arguments.
676
677 2005-12-19  Raja R Harinath  <rharinath@novell.com>
678
679         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
680         type parameters.
681
682 2005-12-15  Raja R Harinath  <rharinath@novell.com>
683
684         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
685         dead store.
686         (do_mono_metadata_parse_generic_class): Don't pass the current
687         generic context when parsing the type being instantiated: it
688         cannot use it, anyway.
689
690         * loader.c (method_from_memberref): Don't inflate a signature if
691         it doesn't contain any type parameters.
692
693 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
694
695         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
696
697 2005-12-14  Martin Baulig  <martin@ximian.com>
698
699         * class.c
700         (mono_type_get_name_recurse): Don't return null for type
701         parameters and open generic classes.
702         (mono_class_setup_methods): Don't exclude generic instances.
703         (mono_get_unique_iid): Use different IDs for different
704         instantiations of the same generic type.
705         (mono_class_setup_vtable): Only use setup_generic_vtable() for
706         open generic instances; create a normal vtable for closed generic
707         instances.
708         (mono_class_setup_vtable_general): We're now also called for
709         closed generic instances.
710
711         * reflection.c
712         (mono_reflection_bind_generic_parameters): Correctly use
713         mono_metadata_lookup_generic_inst() everywhere.
714
715 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
716
717         * object.c (mono_class_create_runtime_vtable): Call 
718         mono_class_setup_vtable ().
719
720         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
721         function.
722         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
723         #76959.
724
725         * loader.c (mono_loader_set_error_type_load): Print the type load
726         warnings to the console so they are more visible to the user.
727         (mono_loader_set_error_method_load): Ditto.
728
729         * reflection.c (ensure_runtime_vtable): Revert the last change as it
730         is still broken.
731         
732         * reflection.c (ensure_runtime_vtable): Fix build.
733
734         * reflection.c (ensure_runtime_vtable): Disable an optimization which
735         doesn't work in all cases.
736
737 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
738
739         * object.c (mono_array_new_full): Treat a single dimensional array
740         with 0 lower bounds as an szarray. Fixes #76973.
741
742         * reflection.c (custom_attr_visible): Really fix this.
743
744 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
745
746         * reflection.c (custom_attr_visible): Allow nested public attributes
747         as well.
748
749         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
750         interface check.
751
752 2005-12-12  Raja R Harinath  <harinath@gmail.com>
753
754         * class.c (set_generic_param_owner): Delete.
755         (mono_class_create_from_typedef): Don't set ->owner field of
756         generic parameters to "param containers" of enclosing classes.
757         * reflection.c (mono_reflection_initialize_generic_parameter):
758         Likewise.
759
760 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
761
762         * reflection.c (custom_attr_visible): Fix build.
763
764 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
765
766         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
767         private attributes.
768         
769         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
770         handling of null parameter defaults.
771
772 2005-12-09  Raja R Harinath  <rharinath@novell.com>
773
774         * class.c (mono_class_from_generic_parameter): Don't set
775         klass->generic_container.
776         (my_mono_class_from_generic_parameter): Likewise.
777
778 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
779
780         * reflection.c (load_public_key): Fix a warning.
781         (method_encode_code): Fix unaligned accesses.
782
783 2005-12-07  Martin Baulig  <martin@ximian.com>
784
785         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
786
787         * reflection.c
788         (write_generic_param_entry): Encode our custom attrs.
789
790         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
791
792 2005-12-07  Martin Baulig  <martin@ximian.com>
793
794         * reflection.c (encode_new_constraint): Removed; we don't use the
795         `NewConstraintAttribute' anymore.
796
797 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
798
799         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
800         not fire a TypeResolve event when Assembly.GetType () is called.
801
802 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
803
804         Beginning of support for nullable types in the runtime. Parts of
805         this patch are from Martin.
806
807         * appdomain.c (MONO_CORLIB_VERSION): Bump
808
809         * domain.c (mono_init_internal): get the nullable type
810
811         * class.c (mono_class_is_nullable): New method
812         (mono_class_get_nullable_param): New mehod
813         (mono_class_create_generic): In types T? set cast_class to T
814
815         * class-internals.h (MonoDefaults): new nullable default class
816         (mono_class_get_nullable_param, mono_class_get_nullable_param):
817         new methods.
818
819 2005-12-05  Raja R Harinath  <rharinath@novell.com>
820
821         * metadata.c (select_container): New.  Refactor code to select the
822         appropriate GenericContainer given the type of generic parameter
823         we are looking for.
824         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
825         not a MonoGenericContext.  Use select_container.  Update parameters.
826         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
827         and MONO_TYPE_MVAR.
828         (unwrap_arrays): Remove duplicate tests.
829         (find_generic_param): Rename from 'has_same_context'.  Now walks a
830         generic instantiated class to find any arguments that are generic
831         parameters.
832         (mono_type_create_from_typespec_full): Use find_generic_param to
833         avoid evicting some generic instantiations from the typespec
834         cache.
835
836 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
837
838         * reflection.c: fixed writing of doubles on ARM FPA.
839
840 2005-12-02  Robert Jordan  <robertj@gmx.net>
841
842         * icall.c: Fixed EventInfo.ReflectedType (#76829).
843
844 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
845
846         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
847         least on SUSE 10 they are not the same (on debian, they are just the
848         same thing).
849
850 2005-12-01  Raja R Harinath  <rharinath@novell.com>
851
852         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
853         DeclaringType for VARs and MVARs.
854         * class.c (set_generic_param_owner): Fix initialization of owner
855         fields.
856
857 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
858
859         * icall.c: fixed Enum.ToObject() to correctly convert the values.
860
861 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
862
863         * threadpool.c: workaround for a bug that shows up on the Mac:
864         select()+connect() on a blocking socket is not like it should
865         be, so we proceed to connect() in that case, wasting the I/O
866         threadpool thread until connect succeedes. Fixes bug #75436.
867
868 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
869
870         * threadpool.c: fix typo when setting file descriptor states.
871
872 2005-11-28  Raja R Harinath  <rharinath@novell.com>
873
874         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
875         * metadata.c (mono_metadata_parse_method_signature_full): Don't
876         create a temporary signature container.
877         (mono_metadata_parse_generic_param): Update to changes.
878         (mono_type_create_from_typespec_full): Update to changes.
879         * loader.c (method_from_memberref): Don't use a
880         MonoGenericContainer while parsing a memberref signature.
881         (method_from_methodspec): Remove dead-store of the 'container'
882         variable.  It's overwritten before use.
883
884         * metadata.c (mono_type_create_from_typespec_full): Make debugging
885         checks tighter.
886         (mono_metadata_parse_generic_param): Likewise.
887         * loader.c (find_method_in_class): Does not need a
888         MonoGenericContainer.  Use 'mono_method_signature' rather than
889         'mono_method_signature_full'.
890         (find_method, mono_get_method_constrained, method_from_memberref):
891         Update to changes.
892
893         * metadata.c (mono_type_create_from_typespec_full): Ensure that
894         owner-less generic-parameters are never evicted from the typespec
895         cache.
896
897         * loader.c (method_from_memberref): Don't use the current context
898         when parsing signatures.
899         (method_from_methodspec, mono_get_method_from_token): Update to changes.
900
901         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
902         side-effects in g_assert.
903         * loader.c (mono_get_method_from_token): Resolve klass earlier so
904         that we don't potentially lose information.
905
906 2005-11-26  Dick Porter  <dick@ximian.com>
907
908         * icall.c:
909         * threads.c: icalls to implement basic (ie, not named)
910         System.Threading.Semaphore.
911
912 2005-11-24  Dick Porter  <dick@ximian.com>
913
914         * process.c
915         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
916         Use GetProcessId() if it's available.
917
918 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
919
920         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
921
922 2005-11-23  Raja R Harinath  <rharinath@novell.com>
923             Ankit Jain  <jankit@novell.com>
924
925         * loader.c (mono_get_method_from_token): Initialize 'method' field
926         of all generic parameters before parsing the signature.  Remove
927         code that "fixed"-up MVAR references.
928
929 2005-11-23  Ankit Jain  <jankit@novell.com>
930
931         * metadata.c (mono_metadata_has_generic_params):
932         (mono_metadata_load_generic_param_constraints):
933         (mono_metadata_load_generic_params): Move duplicate code ...
934         (mono_metadata_get_generic_param_row): ... here. Returns the
935         first row-id in GenericParam table for a given owner (token).
936         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
937         prototype.
938
939 2005-11-23  Raja R Harinath  <rharinath@novell.com>
940             Ankit Jain  <jankit@novell.com>
941
942         * metadata.c (mono_metadata_class_equal): Pass signature_only when
943         comparing VARs too.
944         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
945         type->data.generic_param only if the type is an MVAR.
946         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
947         leak owner-less VARs and MVARs into managed space.
948
949 2005-11-21  Martin Baulig  <martin@ximian.com>
950
951         * class-internals.h
952         (MonoMethod): Moved the `generic_container' here from
953         `MonoMethodNormal' since we now also need it for
954         `MonoMethodPInvoke';
955         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
956         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
957         an union containing both `MonoMethodNormal' and
958         `MonoMethodPInvoke'.
959
960         * loader.c
961         (mono_get_method_from_token): Allow implementing generic methods
962         as interncalls.
963
964         * threads.c
965         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
966         icall.
967
968 2005-11-17  Dick Porter  <dick@ximian.com>
969
970         * icall.c: 
971         * process.h: 
972         * process.c: Split the Process Start_internal icall into
973         ShellExecuteEx_internal and CreateProcess_internal, which are
974         called depending on whether UseShellExecute is true.  Fixes bug
975         76670.
976
977         * appdomain.c (MONO_CORLIB_VERSION): Incremented
978
979 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
980
981         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
982         'msize' parameters, use the information in 'mspec' instead.
983         (emit_object_to_ptr_conv): Ditto.
984
985         * marshal.c (emit_struct_conv): Handle explicit layout structs with
986         fields out of order. Fixes #76733.
987
988 2005-11-17  Ankit Jain  <jankit@novell.com>
989
990         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
991
992 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
993
994         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
995           bug #76575.
996
997 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
998
999         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
1000         for types with non-auto layout. Fixes #76717.
1001
1002 2005-11-16  Ankit Jain  <jankit@novell.com>
1003
1004         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
1005         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
1006         if generic_context is null.
1007           (mono_metadata_generic_param_equal): param->owner can be null.
1008           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
1009         null.
1010
1011 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
1012
1013         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
1014         the correct value.
1015
1016 2005-11-15  Martin Baulig  <martin@ximian.com>
1017
1018         * object.c (set_value): Use mono_class_from_mono_type() instead of
1019         the hack for generic instances; fixes #76136.
1020
1021 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
1022
1023         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
1024         fields.
1025
1026         * image.c (load_metadata_ptrs): Initialize the new fields.
1027
1028         * reflection.c (create_dynamic_mono_image): Ditto.
1029
1030         * reflection.c (build_compressed_metadata): Use the new fields.
1031
1032         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
1033         icall.
1034
1035         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
1036         icall.
1037         
1038 2005-11-15  Ankit Jain  <jankit@novell.com>
1039             Raja R Harinath  <harinath@gmail.com>
1040
1041         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
1042         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
1043         new per-generic_container cache if the cached MonoType's context matches
1044         the current context.
1045           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
1046         to the expected context.
1047           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
1048
1049 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1050
1051         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
1052         we changed the signature of an icall.
1053         * icall.c: Modify to mono_double_ParseImpl return true/false 
1054         depending on the success, instead of throwing the exception. This will
1055         help us in Double.TryParse methods.
1056         
1057 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
1058
1059         * marshal.c (emit_marshal_object): Throw an exception when
1060         marshalling 'object' instead of crashing. Fixes #76696.
1061
1062 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
1063
1064         * class-internals.h: Add prototype for mono_type_get_full_name ().
1065
1066 2005-11-11  Dick Porter  <dick@ximian.com>
1067
1068         * threads.c (mono_thread_manage): Make sure the main thread has
1069         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
1070
1071 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
1072
1073         * loader.c (mono_loader_set_error_type_load): Log a warning to the
1074         console about the missing type.
1075         (mono_loader_set_error_method_load): Ditto.
1076
1077 2005-11-09  Miguel de Icaza  <miguel@novell.com>
1078
1079         * mono-config.c (mono_get_config_dir): Set the system defaults if
1080         none is specified.
1081
1082         * assembly.c (mono_set_dirs): New API entry point to set the
1083         assembly and the config directory in one call
1084
1085 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
1086
1087         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
1088         the ftnptr was created from a delegate in a domain other than the
1089         current domain. Fixes #75377.
1090
1091         * exception.h exception.c: Add mono_get_exception_not_supported ().
1092
1093 2005-11-08  Martin Baulig  <martin@ximian.com>
1094
1095         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
1096
1097 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
1098
1099         * security-manager.h: Added definitions to deal with strongname key 
1100         pairs bigger (and smaller) than 1024 bits.
1101         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
1102         adjust wrt the public key length being used.
1103
1104 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
1105
1106         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
1107           Windows build (r51396-51397).
1108
1109 2005-11-03  Martin Baulig  <martin@ximian.com>
1110
1111         * class.c (mono_class_setup_vtable_general): Also add generic
1112         methods to the vtable; fixes #76581.
1113
1114 2005-11-01  Miguel de Icaza  <miguel@novell.com>
1115
1116         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
1117         sure that we lookup GetString method from the System.Text.Encoding
1118         class, not the derived class or we get an empty method.
1119
1120         Fixed class #76612.
1121
1122 2005-10-25  Miguel de Icaza  <miguel@novell.com>
1123
1124         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
1125         if it has been previously set (embedders). 
1126
1127         Make mono_set_rootdir available also on Unix.
1128
1129 005-10-24  Robert Jordan  <robertj@gmx.net>
1130
1131         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
1132
1133 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
1134
1135         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
1136         only calls which are made to native code use this flag.
1137
1138         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
1139
1140 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
1141
1142         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
1143         Add support for FieldBuilders.
1144
1145 2005-10-29  Martin Baulig  <martin@ximian.com>
1146
1147         * mono-debug.c
1148         (mono_debug_using_mono_debugger): New public method; returns
1149         whether we're running inside the debugger.
1150
1151 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
1152
1153         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
1154         for Method/Constructor/FieldBuilders.
1155
1156 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
1157
1158         * reflection.c (module_add_cattrs): Save custom attributes for global methods
1159         and fields as well.
1160
1161 2005-10-26  Martin Baulig  <martin@ximian.com>
1162
1163         * mono-debug-debugger.c
1164         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
1165
1166 2005-10-24  Raja R Harinath  <harinath@gmail.com>
1167
1168         * icall.c (base64_to_byte_array): Don't pass an out-of-range
1169         integer to isspace.
1170
1171 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
1172
1173         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
1174         when passing valuetypes byref. Fixes #76502.
1175
1176 2005-10-19  Jackson Harper  <jackson@ximian.com>
1177
1178         * profiler.c: Don't put a . in front of types that are not in a
1179         namespace.
1180
1181 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
1182
1183         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
1184
1185 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
1186
1187         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
1188         #76436.
1189         (mono_marshal_get_ldflda_wrapper): Fix a warning.
1190
1191 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1192
1193         * assembly.c metadata-internals.h icall.c: Define an additional
1194         parameter for mono_assembly_name_parse_full, so we can avoid creating
1195         S.R.AssemblyName.Version when no version info wasn't passed.
1196         
1197 2005-10-09  Miguel de Icaza  <miguel@novell.com>
1198
1199         * class.c (mono_type_get_full_name): Reimplement method that was
1200         removed. 
1201
1202         * image.c: Some docs
1203
1204 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
1205
1206         * profiler.c (output_newobj_profile): Fix printing of Total memory
1207         on x86.
1208
1209 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
1210
1211         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
1212
1213 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
1214
1215         * threads.c: remove debug output.
1216
1217 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
1218
1219         * threads.c (mono_thread_manage): Fix crashes if more than 64
1220         threads need to be aborted. Hopefully fixes #75899.
1221
1222         * assembly.c (mono_stringify_assembly_name): New helper function.
1223
1224         * class.c: Use mono_stringify_assembly_name instead of the similar
1225         static function.
1226
1227         * assembly.h assembly.c: Add support for calling a postload search 
1228         hook if an assembly cannot be loaded.
1229
1230         * appdomain.c: Register new search hooks which call the AssemblyResolve
1231         events in AppDomain. Fixes #75231
1232
1233 2005-10-07  Martin Baulig  <martin@ximian.com>
1234
1235         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
1236         methods without debug info.
1237
1238 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
1239
1240         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
1241         wrappers.
1242
1243 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1244
1245         * file-io.c: now that we return symlinks, use lstat and, when the file
1246         is a symbolic link, stat, to get the file attributes. Also avoid the
1247         conversion to/from utf16/external.
1248
1249 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
1250
1251         * class.c (mono_class_layout_fields): Compute klass->has_references
1252         correctly if an embedded valuetype is not yet initialized. Fixes
1253         #76331.
1254
1255 2005-10-04  Martin Baulig  <martin@ximian.com>
1256
1257         * metadata.c
1258         (mono_metadata_load_generic_param_constraints): New public
1259         function; splitted the constraints loading out from
1260         mono_metadata_load_generic_params().
1261
1262         * class.c (mono_class_create_from_typedef): Call
1263         mono_metadata_load_generic_param_constraints() after setting up
1264         the type and creating our parent; fixes #75329.
1265
1266 2005-10-04  Martin Baulig  <martin@ximian.com>
1267
1268         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
1269         non-dynamic parent classes.
1270
1271 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
1272
1273         * file-io.c : win32 build fix (ETXTBSY seems not found).
1274
1275 2005-10-04  Martin Baulig  <martin@ximian.com>
1276
1277         * reflection.c
1278         (mono_image_get_methodspec_token): Make the cache actually work;
1279         fixes #75974.
1280
1281 2005-10-04  Martin Baulig  <martin@ximian.com>
1282
1283         * class.c (mono_class_name_from_token): Removed the unneccessary
1284         `MonoGenericContext *' argument.
1285
1286 2005-10-04  Martin Baulig  <martin@ximian.com>
1287
1288         * loader.c
1289         (method_from_methodspec): Make the caching work again; fixes the
1290         performance regression from #76262.
1291
1292 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1293
1294         * file-io.c:
1295         * file-io.h:
1296         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
1297         GetFileSystemEntries that performs the same work but without going
1298         into io-layer, locking, etc.
1299
1300 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
1301
1302         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
1303         ThreadState_Stopped as well. Fixes #76047.
1304
1305 2005-09-29  Martin Baulig  <martin@ximian.com>
1306
1307         * class.c
1308         (inflate_generic_context): If the new context has a `gmethod', set
1309         its `container' that that gmethod's `container'.
1310
1311         * metadata.c
1312         (mono_metadata_parse_generic_param): Simplify things;
1313         `generic_container = generic_context->container;' is just fine.
1314
1315         * loader.c (method_from_methodspec): Code cleanups.
1316
1317 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
1318
1319         * decimal.c: fix warning (and let gcc generate correct
1320         code on ARM with optimizations).
1321
1322 2005-09-28  Martin Baulig  <martin@ximian.com>
1323
1324         * loader.c
1325         (method_from_memberref): Added `MonoGenericContext *class_context'
1326         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
1327         (method_from_methodspec): If we're a memberref, use the enclosing
1328         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
1329
1330 2005-09-28  Martin Baulig  <martin@ximian.com>
1331
1332         * object.c (mono_runtime_invoke_array): Added support for
1333         MONO_TYPE_GENERICINST; fixes #75917.
1334
1335 2005-09-27  Martin Baulig  <martin@ximian.com>
1336
1337         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
1338         `k->byval_arg.type' to determine the actual type.
1339
1340         * loader.c (method_from_methodspec): Removed some hacks.
1341
1342 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
1343
1344         * class-internals.h (mono_field_is_deleted): Do the test for
1345         rtspecialname before we check the actual name of the field. This
1346         prevents us from dereferencing a pointer into the string table,
1347         saving us from accessing a few pages
1348
1349         * *.c: Replace the use of {Enter,Leave}CriticalSection with
1350         macros. This will allow a deadlock debugger to easily be plugged
1351         in.
1352
1353 2005-09-27  Martin Baulig  <martin@ximian.com>
1354
1355         * loader.c (method_from_methodspec): Create a "signature"
1356         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
1357
1358 2005-09-27  Martin Baulig  <martin@ximian.com>
1359
1360         * class.c
1361         (inflate_generic_class): Correctly set the new context's
1362         container.
1363
1364         * loader.c
1365         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
1366         instead of a `MonoGenericContext *'.
1367         (mono_method_signature_full): Take a `MonoGenericContainer *'
1368         instead of a `MonoGenericContext *'.
1369
1370         * metadata.c
1371         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
1372         instead of a `MonoGenericContext *'.
1373         (mono_metadata_parse_method_signature_full): Likewise.
1374
1375 2005-09-26  Martin Baulig  <martin@ximian.com>
1376
1377         * class.c
1378         (mono_class_from_generic_parameter): Set `klass->generic_container'
1379         (mono_class_from_generic_parameter): Likewise.
1380         (mono_bounded_array_class_get): We inherit the generic container
1381         from the element class.
1382
1383         * loader.c
1384         (find_method, find_method_in_class): Take a `MonoGenericContext *'
1385         argument rather than computing it here.
1386         (method_from_memberref): Correctly set the generic context before
1387         parsing the signature.  Fixes #75681.
1388
1389 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
1390
1391         * object.c (mono_class_has_special_static_fields): Fix warnings.
1392
1393 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1394
1395         * assembly.c: Add parse_public_key function, to
1396         par the public keys. Also added mono_assembly_name_parse_full,
1397         to define it the parsed key should be freed or not.
1398         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
1399         to parse a long format assembly name.
1400         * metadata-internals.h: Keep mono_assembly_name_parse_full as
1401         private, since calling it to preserve the key requires
1402         freeing it manually.
1403         
1404 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
1405
1406         * locales.c : removed HAVE_ICU part.
1407
1408 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
1409
1410         * object.c (mono_class_create_runtime_vtable): Avoid calling 
1411         field_is_special_static if the klass has no special static fields.
1412
1413         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
1414         (MonoCachedClassInfo): Likewise.
1415
1416         * object.c (mono_class_has_special_static_fields): New helper function.
1417
1418 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
1419
1420         * class.c (mono_class_create_from_typedef): Don't call 
1421         interfaces_from_typedef_full for enums.
1422         (mono_class_create_from_typedef): Compute the base types of enums directly
1423         without calling mono_class_setup_fields ().
1424         (mono_class_find_enum_basetype): New helper function.
1425
1426         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
1427         one place inside the string heap.
1428         
1429 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
1430
1431         * class.c: locking fixes, code cleanups, some docs added.
1432         Allocate some data structures in the image mempool.
1433
1434 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
1435
1436         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
1437         the example code.
1438         
1439 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
1440
1441         * class-internals.h, class.c, reflection.c: reduce memory taken by
1442         MonoClass.
1443
1444 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
1445
1446         * metadata.c, metadata.h, loader.h: documentation updates, code and
1447         API cleanups.
1448
1449 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
1450
1451         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
1452         the example code.
1453
1454         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
1455         page faults caused by the runtime while reading metadata.
1456
1457 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1458
1459         * socket-io.c: the field names were changed 3 months ago and no one
1460         realized until bug #76077 got filed!
1461
1462 2005-09-20  Martin Baulig  <martin@ximian.com>
1463
1464         * icall.c (assembly_icalls): Removed some unused debugger icalls.
1465
1466 2005-09-20  Martin Baulig  <martin@ximian.com>
1467
1468         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
1469         write the rank into the class entry.
1470
1471 2005-09-20  Martin Baulig  <martin@ximian.com>
1472
1473         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
1474
1475 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
1476
1477         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1478
1479         * icall.c (custom_attrs_defined_internal): New icall.
1480
1481         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
1482         function.
1483         (mono_custom_attrs_construct_by_type): New helper function.
1484
1485 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
1486
1487         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
1488         terminate the resulting string. Fixes #76123.
1489
1490 2005-09-16  Martin Baulig  <martin@ximian.com>
1491
1492         * mono-debug.c
1493         (mono_debug_add_method): Ignore inflated methods for the moment.
1494
1495 2005-09-14  Martin Baulig  <martin@ximian.com>
1496
1497         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
1498
1499 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
1500
1501         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
1502         return a success/failure indication.
1503         (mono_metadata_interfaces_from_typedef_full): Ditto.
1504         (get_constraints): Ditto.
1505
1506 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
1507
1508         * marshal.c (emit_marshal_array): Fix handling of null arrays.
1509         
1510         * marshal.c (emit_marshal_array): Add support for returning string
1511         arrays from delegates. Fixes #76063.
1512
1513         * marshal.c: Use the emit_ldloc/stloc macros where possible.
1514
1515 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
1516
1517         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
1518         icall.
1519
1520 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
1521
1522         * reflection.c icall.c: Fix after mono_get_exception_type_load
1523         signature change.
1524
1525         * assembly.c (mono_assembly_get_assemblyref): New helper function.
1526         (mono_assembly_load_reference): Use the new helper.
1527
1528         * class-internals.h (MonoLoaderError): New structure containing 
1529         information about type loading errors.
1530
1531         * class-internals.h loader.c: Add APIs to store per-thread loader
1532         error information.
1533
1534         * loader.c class.c: Set the loader error if needed.
1535
1536         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
1537
1538 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
1539
1540         * decimal.c: fixed to handle the broken ARM fp format.
1541
1542 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
1543
1544         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
1545         broken.
1546
1547 2005-09-06  Martin Baulig  <martin@ximian.com>
1548
1549         * domain.c (supported_runtimes): Added v2.0.50727.
1550
1551 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
1552
1553         * culture-info.h: reduce the size of some structures.
1554
1555 2005-09-05  Martin Baulig  <martin@ximian.com>
1556
1557         Reflect latest API changes in the August CTP.
1558
1559         * icall.c
1560         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
1561         ("MonoType.HasGenericArguments"): Removed.
1562         ("MonoMethod.BindGenericParameters"): Renamed to
1563         "MakeGenericMethod".
1564         ("MethodBuilder.BindGenericParameters"): Renamed to
1565         "MakeGenericMethod".    
1566
1567 2005-09-05  Martin Baulig  <martin@ximian.com>
1568
1569         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
1570
1571 2005-09-05  Martin Baulig  <martin@ximian.com>
1572
1573         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1574
1575         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
1576         generic_container is non-NULL.
1577
1578 2005-09-05  Martin Baulig  <martin@ximian.com>
1579
1580         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1581
1582         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
1583
1584 2005-08-29  Michal Moskal  <malekith@nemerle.org>
1585
1586         * reflection.c (encode_locals,
1587         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
1588         for large generic types.
1589
1590 2005-09-05  Martin Baulig  <martin@ximian.com>
1591
1592         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1593
1594         * class.c (mono_dup_array_type): New public method.
1595         (mono_metadata_signature_deep_dup): New public method.
1596         (dup_type): Correctly duplicate array and function types.
1597
1598 2005-09-05  Martin Baulig  <martin@ximian.com>
1599
1600         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1601
1602         * reflection.c (get_default_param_value_blobs): Handle generic types
1603         and generic methods.
1604
1605 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
1606
1607         * class.c: Fixed error reporting (method/class were inversed) for 
1608         inheritance demands.
1609         * security-manager.c|h: Added the AppDomain when calling the managed
1610         System.Security.SecurityManager.InheritanceDemand method.
1611
1612 2005-09-01  Raja R Harinath  <rharinath@novell.com>
1613
1614         * reflection.c (encode_marshal_blob): 'marshaltype' and
1615         'marshaltyperef' are alternate sources for the custom marshaler
1616         name.
1617
1618 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
1619
1620         * class.c: fix creation of array classes with rank == 1
1621         (patch by Ankit Jain <jankit@novell.com>).
1622
1623 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
1624
1625         * object.c: fix check for creating the bound data for arrays vs
1626         szarrays.
1627
1628 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1629
1630         * object.c: configuration file name is now based on the executable name,
1631         not the image name. Fixes bug #75931.
1632
1633 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
1634
1635         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
1636         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
1637
1638 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
1639
1640         * rand.c: Use wincrypt.h instead of WinCrypt.h.
1641
1642 2005-08-24  Ankit Jain  <jankit@novell.com>
1643             Raja R Harinath  <rharinath@novell.com>
1644
1645         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
1646           called by it recursively.
1647           (mono_class_init): Remove special case in pending_init handling, since it's
1648           superseded by the fix to mono_class_from_typeref.
1649
1650 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
1651
1652         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
1653         BROKEN_THREAD_START stuff.
1654
1655 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
1656
1657         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
1658         trampoline.
1659
1660         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
1661         
1662         * object.c (mono_delegate_ctor): Replace the original function address with
1663         a delegate trampoline.
1664
1665 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
1666
1667         * icall.c: add boolean argument to base64_to_byte_array and 
1668         InternalFromBase64String to control whether a whitespace-only string
1669         is allowed (or should casue a FormatException to be thrown). We need
1670         this as the behavior has changed between MS.NET 1.x and 2.0, and we
1671         to match the MS behaviour in both profiles.
1672         * appdomain.c: Bump corlib version.
1673
1674 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1675
1676         This patch implements a big portion of publisher policy
1677         support, used to bind assembly versions and redirect
1678         one assembly from version A to version B.
1679
1680         * assembly.c:
1681         New GSList loaded_assembly_bindings, for storing the cached
1682         assembly bindings.
1683         (assembly_binding_maps_name): New static function for checking if a 
1684         assembly binding information maps an assembly name.
1685         (mono_assembly_binding_info_free): New function for freeing
1686         assembly binding information resources.
1687         (get_publisher_policy_info): New static function for retrieving 
1688         assembly binding information from a MonoImage.
1689         (compare_versions): New static function for comparing an assembly
1690         binding information data and the version of an assembly name.
1691         (check_policy_versions): New static function for checking if an
1692         assembly binding info mapping an assembly name is valid for it.
1693         (mono_assembly_load_publisher_policy): New static function for
1694         loading the 'policy.major.minor.MyAssembly' image for an assembly
1695         with an assembly name 'aname'.
1696         (mono_assembly_bind_version): New static function for updating
1697         assembly redirection.
1698         (mono_assembly_apply_binding): New static function for applying
1699         assembly binding.
1700         (search_binding_loaded): New static function for searching 
1701         loaded assembly binding infos in the cache domain.
1702         (mono_assembly_load_full): Don't apply assembly binding for
1703         reflection only assemblies.
1704
1705         * metadata-internals.h: Add MonoAssemblyBindingInfo,
1706         which contains information about assembly binding. Also
1707         declare signature for mono_config_parse_publisher_policy ()
1708         function, used to retrieve pub policy info.
1709         
1710         * mono-config.c:
1711         (publisher_policy_start): New static function used to parse publisher 
1712         policy config files.
1713         (publisher_policy_parser): New static MonoParseHandler containing 
1714         the functions used when parsing config files.
1715         (mono_config_parse_publisher_policy): New function for parsing
1716         publisher policy files.
1717         
1718 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
1719
1720         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
1721
1722         * marshal.c (mono_delegate_free_ftnptr): Ditto.
1723
1724         * object.c (mono_get_addr_from_ftnptr): New helper function.
1725
1726         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
1727
1728         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1729
1730 2005-08-19  Dick Porter  <dick@ximian.com>
1731
1732         * threads.c, threads.h, appdomain.c, appdomain.h,
1733         profiler-private.h, monitor.c, object.c, object-internals.h,
1734         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
1735         store the thread ID, so it can hold a 64 bit value if needed.
1736
1737 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
1738
1739         * reflection.c (mono_reflection_create_dynamic_method): Store the
1740         handle class into the method references as well so ldtoken works in
1741         dynamic methods.
1742
1743         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
1744         types.
1745
1746 2005-08-19  Ankit Jain <jankit@novell.com>
1747
1748         Fix #75847.
1749         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
1750           here rather than using the method signature of a arbitrary function
1751           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
1752           two arguments.
1753           Hack done with Harinath.
1754
1755 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1756
1757         * threadpool.c: disable printing stack traces when we get a exception
1758         in a threadpool thread. I need to do more testing to figure out which
1759         cases actually print this. Fixes bug #75828.
1760
1761 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1762
1763         * icall.c: there might be ignored whitespace after the last '='. This
1764         fixes length computation and bug #75840.
1765
1766 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
1767
1768         * assembly.c (mono_assembly_load_full): Consider .exe extension as
1769         well. Fixes #75809.
1770
1771         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
1772         #75784.
1773         
1774         * reflection.c (create_custom_attr_data): Ditto.
1775
1776 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
1777
1778         * locales.c, culture-info.h : removed RegionLCIDMap.
1779         * culture-info-tables.h : regenerated.
1780
1781 2005-08-16  Martin Baulig  <martin@ximian.com>
1782
1783         * class.c (mono_type_get_name_recurse): Small fix.
1784
1785 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
1786
1787         * locales.c : indentation fixie.
1788
1789 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
1790
1791         * object-internals.h,
1792           locales.h,
1793           locales.c,
1794           culture-info.h,
1795           icall.c : added RegionInfo table support.
1796         * culture-info-table.h : regenerated for region support.
1797
1798 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
1799
1800         * reflection.c (resolve_object): handle all kinds of MonoMethod
1801         including generic ones
1802
1803 2005-08-12  Ankit Jain <jankit@novell.com>
1804
1805         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
1806           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
1807
1808 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
1809
1810         * process.c: Don't close a thread handle when it's NULL. This is a
1811         workaround for bug #75733.
1812
1813 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
1814
1815         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
1816
1817 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
1818
1819         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
1820
1821 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1822
1823         * threadpool.c: if a work item in the thread pool has a callback that
1824         catches a exception, don't propagate it after invoking the callback.
1825         Fixes bug #75336.
1826
1827 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
1828
1829         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
1830
1831         * class-internals.h (MonoCachedClassInfo): Add some new fields.
1832
1833         * class.c (mono_class_init): Load field info lazily in the AOT case.    
1834
1835         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
1836
1837 2005-08-03  Ankit Jain  <jankit@novell.com>
1838
1839         Fix #75683.
1840         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
1841           PInvoke calling convention is 0.
1842
1843 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
1844
1845         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
1846         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
1847
1848 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
1849
1850         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
1851         to handle threads not started by the GC (patch by Michael Meeks
1852         <michael.meeks@novell.com>).
1853
1854 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
1855
1856         * reflection.c: Make buffer used in emitting types larger for some
1857         big generic types (patch by Michal Moskal).
1858
1859 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
1860
1861         * mono-debug.c: Fix some (not all) alignment problems.
1862
1863 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1864
1865         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
1866         Invoke mono_image_load_from_data_full passing the refonly
1867         parameter.
1868
1869         * assembly.c
1870         (mono_assembly_open_from_bundle): Add the refonly argument, 
1871         in order to pass it to other methods it calls to.
1872         (do_mono_assembly_open): Add the refonly argument, in order 
1873         to pass it to other methods it calls to.
1874         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
1875         the refonly parameter to it.
1876
1877         * image.c: Add loaded_images_refonly_hash and
1878         loaded_images_refonly_guid_hash to cache the reflection
1879         only loaded images.
1880         (mono_images_init): Initialize the hash tables used for
1881         caching the reflection only images.
1882         (load_modules): Invoke mono_image_open_full passing the refonly
1883         parameter to load the modules the correct way.
1884         (build_guid_table): Add the refonly argument, to re-build the 
1885         correct hash table.
1886         (do_mono_image_open): Added the refonly argument, in order to
1887         define it for the loaded image.
1888         (mono_image_loaded_full): New function, which receives an
1889         additional parameter to look for the image in the refonly or
1890         non-refonly section.
1891         (mono_image_loaded): Updated, using mono_image_loaded_full.
1892         (mono_image_loaded_by_guid_full): The same case that happens
1893         with mono_image_loaded_full.
1894         (mono_image_loaded_by_guid): Likewise.
1895         (register_image): Use the ref_only variable inside MonoImage
1896         to decide in which hash table store the current image.
1897         (mono_image_open_from_data_full): Rename
1898         mono_image_open_from_data to mono_image_open_from_data_full,
1899         adding the refonly argument, to define the ref_only variable 
1900         inside MonoImage.
1901         (mono_image_open_from_data): Return 
1902         mono_image_open_from_data_full.
1903         (mono_image_open_full): Rename mono_image_open to
1904         mono_image_open_full, receiving the new refonly argument,
1905         to pass it to inner methods.
1906         (mono_pe_file_open): Update this function, to open
1907         a MonoImage as a non-refonly image.
1908         (mono_image_close): Use the refonly variable inside
1909         MonoImage to remove the image from the correct caches.
1910
1911         * image.h: Add the signatures of mono_image_open_full,
1912         mono_image_open_from_data_full, mono_image_loaded_full,
1913         mono_image_loaded_by_guid_full.
1914
1915         * metadata-internals.h: Add the ref_only field to 
1916         MonoImage.
1917         
1918 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1919
1920         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
1921         Fix the last behavior, which used to load the assemblies and
1922         extract MonoReflectionAssemblyName information, instead of
1923         extract it from the metadata tables. Needed for Reflection
1924         Only assemblies.
1925         
1926 2005-07-29  Martin Baulig  <martin@ximian.com>
1927
1928         * mono-debug-debugger.c
1929         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
1930         not initialized.
1931
1932         * mono-debug.c
1933         (mono_debug_address_from_il_offset): Check whether we have
1934         debugging support before attempting to take the lock.
1935         (mono_debug_source_location_from_address): Likewise.
1936         (mono_debug_source_location_from_il_offset): Likewise.
1937         (mono_debug_il_offset_from_address): Likewise.
1938         (mono_debug_address_from_il_offset): Likewise.
1939
1940 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
1941
1942         * class.c (mono_class_from_name_case): Add support for dynamic images.
1943         Fixes #75650.
1944
1945         * object.c (mono_class_compute_gc_descriptor): Add a workaround
1946         for #75479.
1947
1948 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
1949         
1950         * reflection.c (mono_method_get_object): Fix warning.
1951
1952 2005-07-28  Martin Baulig  <martin@ximian.com>
1953
1954         * mono-debug.c
1955         (mono_debug_add_wrapper): Also write the wrapper type.
1956
1957 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
1958
1959         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
1960         
1961         * class.c (mono_class_init): Avoid reading nested classes if the AOT
1962         data indicates the class has none.
1963
1964 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
1965
1966         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
1967         loader lock with the debugger lock. Prevents deadlocks for beagle.
1968
1969         Beagle can now run on an smp box for a weekend without any
1970         issues. Woohoo!
1971
1972 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
1973
1974         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
1975         in a module. Fixes #75629.
1976
1977 2005-07-26  Martin Baulig  <martin@ximian.com>
1978
1979         * mono-debug.c (mono_debug_add_wrapper): New static method.
1980         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
1981         interncall or a wrapper.
1982
1983         * mono-debug.h (MonoDebugWrapperData): New public typedef.
1984         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
1985         (MONO_DEBUGGER_VERSION): Bump to 51.
1986
1987         * mono-debug-debugger.c
1988         (mono_debugger_add_type): Removed this empty function.
1989         (mono_debugger_add_method): Likewise.
1990
1991 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
1992
1993         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
1994         before accessing method->slot.
1995
1996 2005-07-21  Jb Evain  <jbevain@gmail.com>
1997
1998         * reflection.c (method_encode_clauses/class): Handle filters clauses.
1999         Fixes #75010.
2000
2001 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
2002
2003         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
2004         #75587.
2005
2006 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
2007
2008         * image.h image.c: Add mono_image_get_guid () API function.
2009
2010 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
2011
2012         There were issues when multiple threads tried to load
2013         assemblies. A deadlock was created between assemblies_mutex and
2014         mono_domain_assemblies_lock. This fixes the issue by making the
2015         assembly ref counting be lock free. See bug 75586.
2016         
2017         * image.c (mono_image_close): The add ref function here was using
2018         Interlocked operations while the unref was using a mutex and a
2019         --. I don't think this was ever a bug that would be exposed in a
2020         non-pendantic way (ie, by an embedder doing a ref on one thread
2021         and an unref on another), but for the sake of correctness, this is
2022         now Interlocked.
2023
2024         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
2025         (mono_assembly_load_reference): Call mono_assembly_addref rather
2026         than touching the refcount ourselves.
2027         (mono_assembly_close): Use InterlockedDecrement to unref the
2028         assembly. Don't acquire the lock unless it is actually needed.
2029
2030 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
2031
2032         * class.c (mono_class_layout_fields): Fix calculation of has_references
2033         for generic types.
2034
2035 2005-07-12  Martin Baulig  <martin@ximian.com>
2036
2037         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2038
2039         * metadata.c
2040         (mono_type_hash): Provide better hashing for generic instances.
2041         (mono_generic_inst_hash): Improve hashing.
2042         (mono_generic_class_hash): Likewise.
2043
2044         * reflection.c (mymono_metadata_type_hash): Improve hashing for
2045         generic instances.
2046
2047 2005-07-12  Martin Baulig  <martin@ximian.com>
2048
2049         * reflection.c (mono_reflection_create_runtime_class): Remove the
2050         hack for generic type definitions and non-`Run' assemblies.
2051         (mono_reflection_bind_generic_parameters): Also use
2052         `klass->wastypebuilder' to check for TypeBuilders.
2053
2054 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
2055
2056         * class.c (mono_class_layout_fields): Fix calculation of has_references
2057         for generic types.
2058
2059         * class.c (inflate_generic_class): Fix a leak.
2060         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
2061         for generic types.
2062
2063 2005-07-11  Martin Baulig  <martin@ximian.com>
2064
2065         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
2066         on error.
2067
2068 2005-07-11  Martin Baulig  <martin@ximian.com>
2069
2070         * loader.c (find_method): Also lookup in
2071         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
2072
2073 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
2074
2075         * appdomain.c (mono_domain_unload): Don't free the error message
2076         before passing it to mono_get_exception_...
2077
2078         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
2079         
2080 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
2081
2082         * threads.c: try to better guess an available RT signal (bug #75387).
2083
2084 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
2085
2086         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
2087         and CACHE_OBJECT.
2088
2089 2005-07-07  Martin Baulig  <martin@ximian.com>
2090
2091         * class.c (mono_type_get_name_full): Return NULL for
2092         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
2093         fixes #75408.
2094
2095 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
2096
2097         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
2098         exit the appdomain as well being aborted.
2099
2100         * threadpool.c: Create all threadpool threads inside the root appdomain, and
2101         change back to the root domain after calling managed code. This enables
2102         appdomains using threadpools to be unloaded.
2103
2104 2005-07-07  Martin Baulig  <martin@ximian.com>
2105
2106         * class-internals.h
2107         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
2108         into `MonoDynamicGenericClass' since we only need it for dynamic
2109         types.
2110
2111         * reflection.c (mono_class_bind_generic_parameters): We don't need
2112         to compute the `parent' here.
2113
2114 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
2115
2116         * culture-info-table.h : regenerated.
2117
2118 2005-07-06  Martin Baulig  <martin@ximian.com>
2119
2120         * icall.c
2121         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
2122
2123         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
2124
2125 2005-07-06  Martin Baulig  <martin@ximian.com>
2126
2127         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
2128         we're doing a signature-only comparision; fixes #74945.
2129
2130 2005-07-06  Martin Baulig  <martin@ximian.com>
2131
2132         * class-internals.h (MonoGenericClass): Moved some things out into
2133         a new `MonoInflatedGenericClass' type.  
2134         (MonoInflatedGenericClass): New type; the `klass' of a
2135         `MonoGenericClass' is now computed lazyly in
2136         mono_get_inflated_generic_class().      
2137
2138         * class.c (mono_get_inflated_generic_class): New public function.
2139         (mono_class_inflate_generic_method): Removed the unused
2140         `MonoClass *' argument.
2141         (setup_generic_vtable): Don't call mono_get_inflated_method() on
2142         all the methods.
2143         (mono_class_create_generic): Make this static and merge it with
2144         mono_class_create_generic_2(); we're now called automatically from
2145         mono_get_inflated_generic_class().
2146
2147         * loader.c (mono_method_signature): Call
2148         mono_get_inflated_method() here.
2149
2150 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
2151
2152         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
2153         type of fields with RVA.
2154
2155         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
2156         for this pseudo class.
2157         (my_mono_class_from_generic_parameter): Likewise.
2158         (mono_class_init): Allow interfaces to have cctors.
2159
2160 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
2161
2162         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
2163         lazily for AOT methods.
2164
2165 2005-07-05  Martin Baulig  <martin@ximian.com>
2166
2167         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
2168         returns FALSE for a successful match, not TRUE.
2169
2170 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
2171
2172         * loader.c (mono_method_get_index): Optimize this a bit.
2173
2174 2005-07-04  Martin Baulig  <martin@ximian.com>
2175
2176         * class.c
2177         (class_compute_field_layout): Move the check for generic type
2178         definitions into mono_class_layout_fields().  Fixes #74684.
2179         (mono_class_from_generic_parameter): Correctly compute
2180         `klass->parent'; fixes #75457.
2181
2182         * reflection.c (register_assembly, register_module): Make sure
2183         `domain->rejobject_hash' is already created.
2184
2185 2005-07-02  Martin Baulig  <martin@ximian.com>
2186
2187         * class-internals.h
2188         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
2189         `MonoDynamicGenericClass'.      
2190
2191 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
2192
2193         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
2194         returned by a field getter is null, since null is a valid value.
2195
2196 2005-07-01  Martin Baulig  <martin@ximian.com>
2197
2198         * reflection.c (mono_reflection_generic_class_initialize): Update
2199         the `dgclass->fields [i].parent' to the correct class.
2200         (mono_image_get_fieldref_token): Use the declaring type, not the
2201         reflected type.
2202
2203 2005-07-01  Martin Baulig  <martin@ximian.com>
2204
2205         * loader.c (find_method): Also look in the interfaces; fixes #75429.
2206
2207 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
2208
2209         * threads.c (thread_cleanup): assert that thread != NULL
2210         (wait_for_tids_or_state_change): We were using the wrong variable
2211         when accessing wait->threads. `i' was always out of the bounds of
2212         the array.
2213
2214 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2215
2216         * loader.c: map user32 and kernel32 to libMonoSupportW
2217
2218 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
2219
2220         * appdomain.c (unload_thread_main): Mark this as WINAPI.
2221
2222 2005-06-28  Martin Baulig  <martin@ximian.com>
2223
2224         * loader.c (method_from_methodspec): Fix #75334.
2225
2226 2005-06-28  Martin Baulig  <martin@ximian.com>
2227
2228         Fix #74953 - Arrays now implement the generic IList<T> interface
2229         on the 2.0 platform.
2230
2231         * class-internals.h (MonoDefaults): Added `generic_array_class'.
2232
2233         * reflection.c (mono_class_bind_generic_parameters): New public
2234         function; similar to mono_reflection_bind_generic_parameters(),
2235         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
2236
2237         * domain.c (mono_init_internal): Try to initialize.
2238         `mono_defaults.generic_array_class' here; this'll only succeed if
2239         we're using the 2.0 corlib.
2240
2241         * icall.c
2242         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
2243         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
2244         (mono_lookup_internal_call): Added support for nested classes.
2245
2246         * loader.c
2247         (mono_get_method_from_token): Set `result->signature->pinvoke' if
2248         we're an interncall and have generic arguments.
2249
2250         * class.c
2251         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
2252         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
2253         instance of System.Array.InternalArray<T> for arrays, so they
2254         implement the generic IList<T> interface.
2255
2256 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
2257
2258         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
2259         (chastamar@yahoo.com). Fixes #75374.    
2260
2261 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
2262
2263         * culture-info-table.h: regenerated.
2264
2265 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2266
2267         * icall.c: handle spaces correctly for base64 strings.
2268
2269 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
2270
2271         * *.c: Kill some warnings.
2272
2273 2005-06-23  Duncan Mak  <duncan@novell.com>
2274
2275         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
2276         that this builds on Solaris 10 (x86).
2277
2278 2005-06-23  Martin Baulig  <martin@ximian.com>
2279
2280         * class.c
2281         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
2282         generic type definitions.
2283
2284 2005-06-23  Martin Baulig  <martin@ximian.com>
2285
2286         Fix #75331.
2287
2288         * metadata.c (mono_class_get_overrides): Renamed to
2289         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
2290         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
2291         pass it to mono_get_method_full().
2292
2293 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
2294
2295         * reflection.c (mono_reflection_create_runtime_class): take the
2296         mono_domain_lock in this method. Prevents deadlocks
2297
2298 2005-06-22  Martin Baulig  <martin@ximian.com>
2299
2300         * loader.c (method_from_methodspec): Fix #75330.
2301
2302 2005-06-22  Martin Baulig  <martin@ximian.com>
2303
2304         * reflection.c (type_get_qualified_name): Use
2305         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
2306         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
2307         argument; use it if we don't have an assembly name.
2308
2309 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
2310
2311         * object.c: In mono_message_init, set "copy out" flag for in
2312         parameters with the [Out] flag.
2313
2314 2005-06-21  Martin Baulig  <martin@ximian.com>
2315
2316         * class.c
2317         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
2318         and MONO_TYPE_PTR.
2319
2320 2005-06-21  Martin Baulig  <martin@ximian.com>
2321
2322         * class.c (mono_class_init): Don't initialize `class->fields' for
2323         generic instances since they're initialized again in
2324         compute_field_layout(). 
2325         (compute_field_layout): Set the field's `generic_info' here; fix
2326         #75320. 
2327
2328 2005-06-21  Martin Baulig  <martin@ximian.com>
2329
2330         * class-internals.h
2331         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
2332
2333         * metadata.c (mono_metadata_generic_method_equal): Also
2334         distinguish the `generic_class'; fixes #75334.
2335
2336 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2337
2338         * domain.c:
2339         * appdomain.c:
2340         * domain-internals.h:
2341         * reflection.c: 'domain_assemblies' field is now protected by its own
2342         lock. Don't call into managed code to run the AssemblyLoad event if we
2343         now there are no registered delegates for it.
2344
2345 2005-06-20  Martin Baulig  <martin@ximian.com>
2346
2347         * class.c (mono_class_is_assignable_from): Use a custom version of
2348         mono_class_has_parent() to make things work for generic instances;
2349         fix #75300.
2350
2351 2005-06-20  Martin Baulig  <martin@ximian.com>
2352
2353         * loader.c (method_from_methodspec): Apply a patch from
2354         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
2355
2356 2005-06-20  Martin Baulig  <martin@ximian.com>
2357
2358         * class.c (mono_class_init): Reverted Zoltan's last change; it
2359         breaks generics.
2360
2361 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
2362
2363         * threads.c (wait_for_tids_or_state_change): Add missing locking.
2364
2365 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2366
2367         * socket-io.c: fix the index in the socket array for writable/error
2368         sockets. Fixes bug #75306.
2369
2370 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
2371
2372         * class.c (mono_class_init): Allow interfaces to have static ctors.
2373
2374 2005-06-17  Martin Baulig  <martin@ximian.com>
2375
2376         * loader.c (method_from_methodspec): Use `context->container' when
2377         parsing the `gmethod->inst'.
2378
2379 2005-06-17  Martin Baulig  <martin@ximian.com>
2380
2381         * class.c (mono_type_get_name_recurse): Don't add the assembly
2382         name for type arguments.
2383
2384 2005-06-15  Martin Baulig  <martin@ximian.com>
2385
2386         * reflection.c (mono_image_get_inflated_method_token): Encode
2387         correct klass; fixes #75260.
2388
2389 2005-06-13 Michal Moskal <malekith@nemerle.org>
2390
2391         * icall.c: Make GetCorrespondingMethod/Constructor take
2392         MonoReflectionMethod method not MonoMethod. Removed
2393         MonoType.GetCorrespondingField, and make
2394         MonoGenericType.GetCorrespondingField take name not
2395         MonoClassField.
2396
2397 2005-06-13  Michal Moskal <malekith@nemerle.org>
2398
2399         * reflection.c (field_encode_signature, encode_locals):
2400          Make sizes of buffers for types larger (for big generic types).
2401          (create_generic_typespec,
2402          mono_reflection_sighelper_get_signature_local,
2403          mono_reflection_sighelper_get_signature_field):
2404          Add asserts for too small buffers.
2405
2406 2005-06-15  Martin Baulig  <martin@ximian.com>
2407
2408         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
2409         if our parent is not a dynamic type.
2410
2411 2005-06-15  Martin Baulig  <martin@ximian.com>
2412
2413         * class-internals.h (MonoTypeNameFormat): New enum.
2414
2415         * class.c
2416         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
2417         (mono_type_get_full_name): Removed.
2418         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
2419         argument instead of the boolean's.
2420
2421         * icall.c (ves_icall_System_MonoType_getFullName):
2422         Added `gboolean assembly_qualified'.    
2423
2424         * reflection.h
2425         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
2426
2427         * reflection.c (mono_reflection_parse_type): Parse the new type
2428         name format.
2429
2430 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2431
2432         * icall.c: no need to convert from utf16 to utf8 and then back again
2433         after the call to GetLogicalDrives.
2434
2435 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2436
2437         * icall.c: frombase64. Fix problems exposed by new tests.
2438
2439 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2440
2441         * icall.c: added internal calls for converting char [] and strings in
2442         base64 into byte [].
2443
2444 2005-06-10  Martin Baulig  <martin@ximian.com>
2445
2446         * class.c (mono_class_create_generic_2): Read the nested classes
2447         from the metadata rather than from `gklass->nested_classes' since
2448         `gklass' might not be initialized yet.
2449
2450 2005-06-09  Duncan Mak  <duncan@novell.com>
2451
2452         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
2453         all public headers. Fixes #74919.
2454
2455 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
2456
2457         * domain.c: The key for proxy_vtable_hash is now a pointer
2458         array. Added new GHashFunc and GCompareFunc functions for this.
2459
2460         * class.h: The list of interfaces in MonoRemoteClass is known in
2461         advance and can't grow (we create a new MonoRemoteClass if needed),
2462         so now the interface array can be allocated together with
2463         MonoRemoteClass.
2464         
2465         * object.c: Added a new method create_remote_class_key.
2466         Fixed mono_remote_class so it does not depend on
2467         mono_upgrade_remote_class.
2468         Removed extend_interface_array.
2469         Added new method clone_remote_class(), which makes a copy of a remote
2470         class and adds a new interface or class to it.
2471         mono_upgrade_remote_class() now creates a new remote class (or gets
2472         it from the cache) if an vtable upgrade is needed. In this way
2473         we make sure that other objects sharing the same remote class
2474         don't get the new vtable with unwanted interfaces.
2475         
2476         * object-internals.h:
2477         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
2478         
2479         * marshal.c: Track changes in mono_upgrade_remote_class().
2480
2481 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
2482         * icall.c: Add runtime methods for obtaining members of inflated
2483         class, which were created from supplied non-inflated members. It
2484         is used in internal Get{Method,Constructor,Field} methods in
2485         System.Type
2486
2487 2005-06-09  Martin Baulig  <martin@ximian.com>
2488
2489         * reflection.c
2490         (mono_reflection_bind_generic_method_parameters): Fix #75169.
2491
2492 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2493         * reflection.c (mono_image_basic_init): Define
2494         Version in MonoDynamicAssembly. 
2495         
2496 2005-06-08  Martin Baulig  <martin@ximian.com>
2497
2498         Fix #75136.
2499
2500         * loader.c
2501         (mono_method_signature_full): New public method; takes a
2502         `MonoGenericContext *'.
2503         (find_method): Use mono_method_signature_full() and pass the
2504         klass'es context to it.
2505
2506         * class.c (mono_class_is_inflated_method): Use
2507         mono_method_signature_full() and pass the context to it.
2508
2509 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
2510
2511         * object.c: add proper locking in mono_remote_class_vtable(),
2512         fixes possible memory corruption.
2513
2514 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
2515
2516         * marshal.c (mono_remoting_marshal_init): set
2517         initialized after initialization.
2518
2519 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
2520
2521         * locales.c : hush.
2522
2523 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
2524
2525         * object.c (extend_interface_array): fix really silly
2526         memory corrupting / comparison bug.
2527
2528 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2529
2530         * reflection.c: Functions added to support the creation
2531         of CustomAttributeData, which includes Attribute data
2532         used by ReflectionOnly methods.
2533
2534         * reflection.h:  mono_reflection_get_custom_attrs_data and
2535          mono_custom_attrs_data_construct added (functions exposed).
2536
2537          * icall.c: Added mono_reflection_get_custom_attrs_data
2538          as icall.
2539         
2540 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
2541
2542         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
2543         lupus's request.
2544
2545 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
2546
2547         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
2548
2549         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
2550         dynamic DllImportAttribute.
2551
2552         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
2553         dynamic DllImportAttribute.
2554
2555         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
2556         Fixes #75162.
2557
2558 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2559
2560         * threads.c: avoid segfault when an unstarted thread is aborted.
2561
2562 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
2563
2564         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
2565         Returns the name and version of the runtime for reporting.
2566
2567 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2568
2569         * appdomain.c: bump corlib version.
2570         * object-internals.h: new field in MonoReflectionAssembly.
2571
2572 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2573
2574         * object-internals.h: Carlos forgot to add this field.
2575
2576 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2577
2578         * icall.c: Added create_version to create instances
2579         of Version of MonoReflectionAssemblyName. This change helps
2580         the AssemblyName tests to keep running fine.
2581         
2582 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
2583   
2584         * object.c (mono_method_return_message_restore): A somehow less
2585         intrusive fix for #75138.
2586
2587 2005-06-03  Raja R Harinath  <rharinath@novell.com>
2588
2589         * object.c (mono_method_return_message_restore): Fix computation
2590         of expected number of out args.
2591
2592 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
2593
2594         * reflection.c (mono_image_get_method_info): Fix the case when the
2595         charset is empty.
2596
2597 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
2598
2599         * object.c: Added missing null check in
2600           mono_method_return_message_restore.
2601
2602 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
2603
2604         * reflection.c (mono_image_get_method_info): Handle the case when
2605         dllentry is empty.
2606
2607 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
2608
2609         * object.c: When creating the vtable for a proxy, take into account
2610         all inherited interfaces, not only the ones registered in
2611         iclass->interfaces. This fixs bug #74996.
2612         Also, in mono_method_return_message_restore, verify that the array
2613         of out args has the expected lengh.
2614
2615 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2616
2617         * socket-io.c: update the timeout in Poll when the call is interrupte.
2618
2619 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2620
2621         * socket-io.c: support abort/suspend in Select_internal after last
2622         change.
2623
2624 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2625
2626         * threadpool.c: remove warning.
2627
2628 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2629
2630         * icall.c:
2631         * socket-io.[ch]: Select_internal uses poll() now when available, thus
2632         removing the 1024 limit from select(). Runtime part of the fix for
2633         bug #71203.
2634
2635 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2636
2637         * socket-io.c: when resolving the addresses for the same
2638         host returned by gethostname(), get the local IPs from the interface
2639         list. Loopback addresses are discarded if the are interfaces up with
2640         non-loopback ones. Fixes bug #63265.
2641
2642 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
2643
2644         * appdomain.c, verify.c, object-internals.h, reflection.c:
2645         bumped corlib number to 36, and added new extra_flags field
2646         to ReflectionMethodBuilder and friends.  Fixes #75060.
2647
2648 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
2649
2650         * gc.c: register a new weak link only if the object is non-null
2651         (fixes bug#75047).
2652
2653 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
2654
2655         * culture-info.h : short time pattern too.
2656
2657 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
2658
2659         * culture-info.h : expand long time pattern string length.
2660
2661 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
2662
2663         * culture-info-table.h : update (more French date format; #72788).
2664
2665 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
2666
2667         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
2668         the method is static. Fixes #75029.
2669
2670 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
2671
2672         * reflection.c: Update the table_idx field of method builders after
2673         saving the module, since it can change. This is a workaround for
2674         bug #74914. 
2675
2676 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
2677
2678         * culture-info-table.h : update (additional French date format).
2679
2680 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
2681
2682         * icall.c (ves_icall_type_Equals): Revert last change.
2683         
2684         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
2685
2686         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
2687
2688 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
2689
2690         * class-internals.h: Added executioncontext_class field to 
2691         MonoDefaults structure.
2692         * domain.c: Cache System.Threading.ExecutionContext class in 
2693         mono_defaults.
2694         * object.c: Capture the ExecutionContext for asynchroneous calls in
2695          mono_async_result_new.
2696         * object-internals.h: Added execution_context and original_context 
2697         fields to MonoAsyncResult. Added execution_context to MonoThread.
2698         * security-manager.c|.h: Added mono_get_context_capture_method to 
2699         return the capture method (if required by the security manager or by
2700         the framework version used).
2701         * threadpool.c: Apply capture (if present) ExecutionContext in 
2702         mono_async_invoke and revert to original context after it completes.
2703
2704 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
2705
2706         * culture-info-table.h : updated (real hacky solution for zh-CHT).
2707
2708 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
2709
2710         * culture-info-table.h : zh-CHT related workaround.
2711
2712 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
2713
2714         * marshal.c (emit_marshal_custom): Add some error checking and call the
2715         methods in the ICustomMarshaler interface. Fixes #74875.
2716         
2717         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
2718         native->managed wrappers.
2719
2720 2005-05-12  Martin Baulig  <martin@ximian.com>
2721
2722         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
2723         here and use the loader lock.
2724
2725         * mono-debug.c: Properly lock when the debugger is not attached.
2726         (mono_debug_init): Release the initial lock if we're not running
2727         in the debugger.
2728
2729 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
2730
2731         * marshal.c (emit_marshal_custom): Pass through NULL values without
2732         calling the custom marshalling routines.
2733
2734         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
2735         conversion in structures. Fixes #74882.
2736
2737 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
2738
2739         * culture-info-table.h : zh-* cultures were missing.
2740
2741 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
2742
2743         * threads.c: Added a new event background_change_event which is signaled
2744         when a thread changes its background mode.
2745         Moved here several checks previously done in managed code. The checks
2746         require the thread lock, and using the thread lock in managed code
2747         can result in deadlocks.
2748         Merged Start_internal and Thread_internal into a single method. Now 
2749         Thread_internal does all work of creating and starting a thread.
2750         Added icalls for setting and getting the state of the object. Moved from
2751         managed code to avoid locking there.
2752         Added wait_for_tids_or_state_change() which is called instad of
2753         wait_for_tids when waiting for non-backround threads to end. This method
2754         will return if one of the threads ends or the background_change_event
2755         is signaled.
2756         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
2757         the background mode. This method signals the background_change_event
2758         event.
2759         * icall.c:
2760         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
2761         removed Start_internal.
2762         
2763 2005-05-11  Martin Baulig  <martin@ximian.com>
2764
2765         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
2766         to order of some fields to get proper alignment on 64-bit machines.
2767
2768 2005-05-11  Martin Baulig  <martin@ximian.com>
2769
2770         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
2771         changes as they're broken and completely fuck up the debugger.
2772
2773         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
2774
2775 2005-05-10  Martin Baulig  <martin@ximian.com>
2776
2777         * reflection.c (mono_reflection_generic_class_initialize): Don't
2778         call mono_class_setup_parent() here.
2779
2780 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2781
2782         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
2783         send/receive timeout use an integer in milliseconds. We were using a
2784         struct timeval.
2785
2786 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2787
2788         * locales.c:
2789         (internal_get_cultures): reserve the first slot of the array for the
2790         InvariantCulture, which will be filled in managed code.
2791
2792 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
2793
2794         * reflection.c (mono_image_fill_module_table): Initialize the
2795         GENERATION field as well.
2796
2797 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2798
2799         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
2800         Monitor.Enter on the object.
2801
2802 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
2803
2804         * threads.c: Enable the wait for running threads when exiting.
2805         * icall.c: Suspend all threads before exiting.
2806
2807 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
2808
2809         * assembly.c (mono_assembly_load_reference): Fix warning.
2810
2811 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2812
2813         * threadpool.c: changed the default number of threads per cpu. From now
2814         on, the default will be 20 + (5 * number of cpus) instead of 50.
2815
2816 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
2817
2818         * loader.c (mono_method_get_signature_full): Add locking here.
2819
2820 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
2821
2822         * appdomain.c: Moved methods for parsing and freeing assembly
2823         names to assembly.c.
2824         * assembly.c, domain-internals.h: Created public methods for parsing
2825         assembly names. Fixed mono_assembly_load_with_partial_name:
2826         it now finds the best match, taking into account the version,
2827         token and culture specified in the partial name. Also return
2828         the latest version if no version information is specified.
2829
2830 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
2831
2832         * threadpool.c: replace check for SocketAsyncCall class.
2833
2834 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2835
2836         * threadpool-internals.h:
2837         * Makefile.am: added threadpool-internals.h
2838
2839         * threadpool.c: call mono_unhandled_exception on exceptions not handled
2840         that happen in threadpool threads (tested on MS).
2841         (mono_thread_pool_remove_socket): new function that dispatch any pending
2842         AIO call on a socket that is closing. By now only epoll really needs it,
2843         as select/poll wake up when the socket closes.
2844
2845
2846         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
2847
2848 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
2849
2850         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
2851
2852 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
2853
2854         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
2855
2856 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
2857
2858         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
2859         has an abort request, convert it into a suspend request.
2860
2861 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
2862
2863         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
2864         warning for the usage of `UnmanagedFunctionPointerAttribute' which
2865         is not supported yet.
2866
2867 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2868
2869         * image.c: register assemblies loaded from data (bundles) in the loaded
2870         assemblies hash. Fixes bug #74772.
2871
2872 2005-04-29  Martin Baulig  <martin@ximian.com>
2873
2874         * class.c (mono_type_get_name_recurse): Update to the new naming
2875         schema from the latest .NET 2.x beta2.
2876         (mono_class_setup_vtable_general): If we're a generic instance,
2877         copy the vtable from our generic type definition and inflate all
2878         the methods in it.
2879
2880         * loader.c (find_method): Update to the new naming schema from the
2881         latest .NET 2.x beta2.
2882
2883 2005-04-29  Raja R Harinath  <harinath@gmail.com>
2884
2885         * class.c (mono_class_init): Add a mono_loader_unlock to the
2886         #74734 fix.
2887
2888 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
2889
2890         * icall.c (ves_icall_System_Environment_Exit): Remove the 
2891         suspend_all_other_threads () call for the time being, since it can hang.
2892
2893         * threads.c (mono_thread_manage): Similarly, disable the waiting for
2894         the background threads to exit, since it can also hang.
2895
2896         * class.c (mono_class_init): Applied patch from Ankit Jain 
2897         (radical@gmail.com). Avoid pending init errors when a field refers
2898         to a nested class using a typeref. Fixes #74734.
2899
2900         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
2901         this for dynamic modules.
2902
2903 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2904
2905         * threads.c: don't wait for threads that are in the process of aborting
2906         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
2907         and waiting for background threads to finish. This makes xsp and
2908         mod-mono-server exit without random length delays and/or hangs.
2909
2910 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2911
2912         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
2913
2914 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
2915
2916         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
2917         dynamic types to prevent infinite loops. Fixes #74727.
2918
2919         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
2920         ..._is_assignable_to.
2921
2922 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
2923
2924         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
2925
2926 2005-04-25  Martin Baulig  <martin@ximian.com>
2927
2928         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
2929
2930         * domain.c
2931         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
2932
2933         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
2934
2935         * reflection.c (build_compressed_metadata): Set metadata header
2936         version to 2.0.
2937
2938 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
2939
2940         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
2941         number into an integral and a decimal part. Fixes #70473.
2942
2943         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
2944
2945 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
2946
2947         * culture-info-table.h : reflected the latest locale-builder output.
2948
2949 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2950
2951         * threadpool.c: check for SuspendRequested too when deciding if
2952         mono_thread_interruption_checkpoint should be called.
2953
2954 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2955
2956         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
2957         * threads.c: remove interruption_mutex and use Interlocked instead. When
2958         suspending all the threads, wait for all the suspended events at once.
2959         If we're shutting down and get an APC that is going to be queued,
2960         call mono_thread_execute_interruption immediately, as the thread might
2961         be sleeping on a pthread condition or mutex.
2962
2963         * icall.c: call mono_runtime_set_shutting_down before suspending the
2964         threads.
2965
2966         Fixes bug #74693. And now xsp is happier when exiting.
2967
2968 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
2969
2970         * loader.c (mono_stack_walk): Fix #74690.
2971
2972 2005-04-22  Martin Baulig  <martin@ximian.com>
2973
2974         * mono-debug.h (MonoDebugMethodJitInfo): Added
2975         `MonoDebugMethodJitInfo *jit'.
2976
2977         * mono-debug.c (mono_debug_read_method): Cache the
2978         MonoDebugMethodJitInfo in `address->jit'.
2979         (mono_debug_free_method_jit_info): New public method.
2980
2981 2005-04-22  Martin Baulig  <martin@ximian.com>
2982
2983         * class.c (mono_class_is_assignable_from): Disallow
2984         type parameter -> interface.
2985
2986 2005-04-21  Dick Porter  <dick@ximian.com>
2987
2988         * threads.c (mono_thread_create): Turn an assertion into an error.
2989
2990 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
2991
2992         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
2993         
2994         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
2995         Fix some gcc 4.0 warnings.
2996
2997 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
2998
2999         * file-io.c: fix alt dir separator char on unix systems
3000         and cleanup (fixes bug #71214).
3001
3002 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
3003
3004         * marshal.c: Use CALLVIRT instead of CALL when dispatching
3005         a call to a remote domain, since the method may be an
3006         interface method in the client domain. This fixes bug #74192.
3007
3008 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3009
3010         * threadpool.c: recv/send are now performed before going back to managed
3011         code to save one transition.
3012
3013 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3014
3015         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
3016
3017         * metadata/threadpool.c: removed hack to workaround the bug above.
3018
3019         Fixes bug #74618.
3020
3021 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
3022
3023         * reflection.c reflection.h: Fix handling of parameter defaults in
3024         dynamic methods. Also fixes handling of parameter attributes.
3025         Fixes #74609.
3026
3027         * mono-debug.c (mono_debug_close_image): Fix warning.
3028
3029 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3030
3031         * socket-io.h: replaced old unused field with new 'blocking'.
3032         * threadpool.c: restore socket blocking state on windows(tm).
3033
3034 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
3035
3036         * icall.c: don't return the codebase in the AssemblyName[] returned by
3037         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
3038         * object-internals.h: Removed FIXME (fields were presents) and fixed
3039         versioncompat declaration.
3040
3041 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3042
3043         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
3044         not closed, so don't cleanup when it happens.
3045
3046 2005-04-13  Chris Toshok  <toshok@ximian.com>
3047
3048         * mono-debug-debugger.h: change prototype for
3049         mono_debugger_lookup_type.
3050
3051         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
3052         this function, although it should probably be named
3053         mono_debugger_init_type.
3054
3055 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3056
3057         * threadpool.c: fix non-AIO case.
3058
3059 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
3060
3061         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
3062         the built-in profiler to measure just JIT compilation times.
3063
3064 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3065
3066         * threadpool.c: the epollfd might be closed by another thread at
3067         any time, so ignore EBADF at treat it as a "we're closing" sign.
3068
3069 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3070
3071         * threadpool.c: release the semaphores with a count equals to the number
3072         of working threads in both IO and regular pools. Fixed typo that messed
3073         up the count of IO pool threads. Don't initialize the pipe handles if
3074         we're using epoll.
3075
3076 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3077
3078         * threadpool.c: some systems don't like a NULL when deleting the socket
3079         from epoll.
3080
3081 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3082
3083         * threadpool.c: fix semaphore allocation.
3084
3085 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3086
3087         * threadpool.c: added epoll() based implementation for asynchronous IO
3088         that is used instead of the default poll() when available.
3089         It can be disabled by setting MONO_DISABLE_AIO.
3090
3091 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3092
3093         * threadpool.c: windows needs 'closesocket' and instead of returning
3094         0 when the stream is closed while in select, it returns -1. Fixes bug
3095         #74573.
3096
3097 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
3098
3099         * class.c (class_compute_field_layout): Fix the regression caused by
3100         the previous try.
3101
3102 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3103
3104         * threadpool.c: separate pool for socket async. IO.
3105         * threadpool.h: mono_max_worker_threads is not a global any more.
3106
3107 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
3108
3109         * class.c (class_compute_field_layout): Fix #74549.
3110
3111 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3112
3113         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
3114         use 2 connected sockets instead.
3115
3116 2005-04-08  Miguel de Icaza  <miguel@novell.com>
3117
3118         * mono-config.c: Add new entry point for mkbundle
3119         mono_config_parse_memory. 
3120
3121 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3122
3123         * threadpool.c: removed another unused function.
3124
3125 2005-04-08  Ankit Jain  <radical@corewars.org>
3126
3127         * reflection.c (get_default_param_value_blobs): Add 'types'
3128         parameter to get the types encoded in the constant table.
3129         (mono_param_get_objects): Use the type from the constant table,
3130         not the type of the parameter, when creating default values.
3131         Handle null default values correctly.
3132
3133 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3134
3135         * file-io.c:
3136         * file-io.h:
3137         * threadpool.c:
3138         * threadpool.h:
3139         * icall.c:
3140         * socket-io.c: removed dead code for async IO.
3141
3142 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3143
3144         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
3145
3146         * threadpool.c: intercept socket async. calls and pass them to a thread
3147         that is polling and dispatching the job items to the threadpool as
3148         socket become ready. Fixes bugs #71217, #71933.
3149
3150         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
3151         between char and short/ushort arrays.
3152
3153         * socket-io.c: remove dead code.
3154
3155 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
3156
3157         * locales.c,
3158           icall.c : removed InternalToUpper_Comp() and
3159           InternalToLower_Comp().
3160
3161 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
3162
3163         * char-conversions.h : The tables were incorrectly generated. Should
3164           be generated against invariant culture.
3165
3166 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
3167
3168         * object.c (mono_runtime_invoke_array): Fix return value when 
3169         passing pre-created valuetype objects to ctors.
3170
3171         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
3172         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
3173         Fixes #74338.
3174
3175 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
3176
3177         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
3178         only used with --security and hides the wrong corlib version error.
3179
3180 2005-03-30  Joshua Tauberer  <tauberer@for.net>
3181
3182         * class.c: Changed mono_class_name_from_token so that types
3183         outside of a namespace don't have an initial period.  Improved
3184         the g_warning message used in _mono_class_get when loading
3185         fails.
3186         * assembly.c: In mono_assembly_load_reference, when an assembly
3187         can't be found, "No such file or directory" is misleading and
3188         unhelpful because a few paths were checked for the presence of
3189         the assembly.  When that happens (ENOENT), display a nicer
3190         message indicating the directories that were searched.  In all
3191         cases, the warning is made easier to read for non-hackers.
3192
3193 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
3194
3195         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
3196         project/solution.
3197         * appdomain.h|domain.c: Removed inline from functions.
3198         * appdomain.c: Reduced warnings when compiling on windows.
3199         * icall.c: Fixed output_debug declaration to gunichar2*.
3200         * mono-config.c: Reduced warnings when compiling on windows.
3201         * rand.c: Added missing "windows.h". Added missing return value.
3202         * rawbuffer.c: Added missing winsock2.h for windows.
3203         * sysmath.h: Added mono-compiler.h header to allow/ease 
3204         compilation with non-GCC compilers.
3205         * threads.c: Fixed declarations to compile with VS.NET C compiler.
3206         Removed cast warnings.
3207
3208         Adapted from the work of J Lothian (for VC6).
3209
3210 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
3211
3212         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
3213         from default_path.
3214
3215 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
3216
3217         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
3218         the 2.0 profile.
3219
3220 2005-03-27  Raja R Harinath  <harinath@gmail.com>
3221
3222         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
3223         has to be in $(exec_prefix).  $(prefix) is for arch-independent
3224         stuff, and it would probably use $(prefix)/share rather than
3225         $(prefix)/lib.
3226
3227 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3228
3229         * console-io.c: added 2 includes that might be missing.
3230
3231 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
3232
3233         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
3234         profile.
3235
3236         * reflection.c (create_custom_attr): Allocate the params array using
3237         alloca so it gets GC tracking.
3238
3239 2005-03-23  Chris Toshok  <toshok@ximian.com>
3240
3241         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
3242         out some spew.
3243
3244 2005-03-24  Raja R Harinath  <rharinath@novell.com>
3245
3246         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
3247         changes to pick up any changes in prefix, etc.
3248
3249 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
3250
3251         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
3252         
3253         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
3254         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
3255
3256 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
3257
3258         * class-internals.h object-internals.h class.c reflection.c: Extend the
3259         mono_lookup_dynamic_token () function to return the class of the
3260         token as well. 
3261
3262         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
3263         well. Fixes #73848.
3264
3265 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
3266
3267         * security-manager.c: Skip inheritance checks for intra-corlib
3268         class inheritance and method overrides. This skips a lot of checks
3269         and (anyway) permissions cannot work until corlib is loaded.
3270
3271 2005-03-23  Martin Baulig  <martin@ximian.com>
3272
3273         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
3274         MONO_TYPE_GENERICINST.  
3275
3276 2005-03-23  Martin Baulig  <martin@ximian.com>
3277
3278         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
3279
3280 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3281
3282         * class.c: added locking comments to some functions.
3283         Cache the interface offsets arrays (saves about 20 KB
3284         of runtime memory in a typical app).
3285         Reduce the time overhead in mono_class_setup_supertypes ().
3286
3287 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
3288
3289         * icall.c: speedup and fix leaks in GetMethodsByName and
3290         GetPropertiesByName.
3291
3292 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3293
3294         * reflection.c: some locking fixes.
3295
3296 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
3297
3298         * metadata.c: added missing break in case statement.
3299
3300 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
3301
3302         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
3303         typedbyref return values. Fixes #73941.
3304
3305 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
3306
3307         * security-manager.c|h: Added demandunmanaged method and 
3308         suppressunmanagedcodesecurity class to MonoSecurityManager.
3309         Renamed aptc class to allowpartiallytrustedcallers.
3310
3311 2005-03-17  Martin Baulig  <martin@ximian.com>
3312
3313         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
3314
3315 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3316
3317         * file-io.c: disabled file async. IO using aio_*. It uses the
3318         threadpool now. Workaround for bug #73718.
3319
3320 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3321
3322         * assembly.h, mono-config.c: added code to deal with bundled configs
3323         for bundled assemblies.
3324
3325 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
3326
3327         * *.c, private.h: cleanup, removing old private.h header file.
3328
3329 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
3330
3331         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
3332         and throw_on_unmappable_char attributes.
3333
3334 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
3335
3336         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
3337         _ProcessName_internal.
3338
3339 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
3340
3341         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
3342         #73631.
3343
3344         * icall.c threads.c threads-types.h: Remove slothash icalls as they
3345         are no longer used.
3346
3347 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
3348
3349         * object.c (compute_class_bitmap): Add support for generics. Fixes
3350         #73527.
3351
3352 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
3353
3354         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
3355
3356 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3357
3358         * filewatcher.c: commented out the code for windows watcher, as we don't
3359         use it (we use the managed implementation instead).
3360
3361 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
3362
3363         * object-internals.h (MonoThread): Remove 'unused1' field.
3364
3365         * appdomain.c: Bump corlib version.
3366
3367         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
3368
3369         * reflection.c (mono_reflection_create_runtime_class): Remove the
3370         AssemblyBuilder.Save optimization since it causes too many problems.
3371
3372 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
3373
3374         * exception.c|h: Added mono_get_exception_reflection_type_load to
3375         create a ReflectionTypeLoadException object.
3376         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
3377         to return NULL is a InheritanceDemand fails during reflection. Updated
3378         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
3379         ReflectionTypeLoadException if an InheritanceDemand fails during 
3380         reflection. Added icall mapping for GetLinkDemandSecurity.
3381         * security-manager.c|h: Added ves_icall_System_Security_
3382         SecurityManager_GetLinkDemandSecurity internal call to return the
3383         class and methods permissions set for a LinkDemand. Removed unused
3384         fields in MonoSecurityManager.
3385
3386 2005-03-10  Martin Baulig  <martin@ximian.com>
3387
3388         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
3389         it's a generic instance.
3390
3391 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
3392
3393         * reflection.c (mono_get_object_from_blob): Applied patch from
3394         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
3395
3396         * class.c (mono_class_is_assignable_from): Another try at fixing 
3397         #73469 without breaking anything.
3398
3399 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
3400
3401         * class.c: (mono_class_is_assignable_from): Revert the last changes
3402         since they don't work with generics.
3403         
3404         * class.c (mono_class_is_assignable_from): Fix build bustage.
3405
3406         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
3407         the managed IsAssignableFrom method. Fixes #73469.
3408
3409         * reflection.c (mono_reflection_call_is_assignable_from): New helper
3410         function.
3411
3412 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
3413
3414         * object.c (mono_load_remote_field_new): Fix returning uninitialized
3415         memory when the remoting callback does not sets the out arguments.
3416         Fixes #73007.
3417
3418         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
3419         by mistake.
3420
3421         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
3422
3423         * object-internals.h (MonoStackFrame): Sync with managed object layout.
3424
3425         * appdomain.c: Bump corlib version.
3426
3427 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
3428
3429         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
3430         function.
3431
3432         * threads.c (mono_thread_attach): Detect threads which are not started
3433         by the GC pthread wrappers.
3434
3435 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
3436
3437         * icall.c: Added new icall for RNG.
3438         * rand.c|h: Added new icall to open the RNG. This allows to share a 
3439         single handle on Linux to access /dev/urandom and fix #73183.
3440
3441 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
3442
3443         * object.c: setting the new vtable in a transparent proxy object must
3444         not change the GC descriptor.
3445
3446 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3447
3448         * object.c: fixed compilation without GCJ support.
3449         * reflection.c: for runtime-created types ensure klass->has_references
3450         is correct (bug #73215).
3451
3452 2005-03-02  Martin Baulig  <martin@ximian.com>
3453
3454         * class.c (mono_class_is_assignable_from): Make this work if
3455         `oklass' is a generic instance; fixes #72831.
3456
3457 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
3458
3459         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
3460         with hasthis set.
3461         
3462         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
3463
3464         * marshal.c: Reorganize native->managed marshalling code to also use
3465         the emit_marshal_... functions.
3466
3467 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
3468
3469         * object.c: typed allocs have issues with bitmap sizes > 30,
3470         so check for max_set >= 30.
3471
3472 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
3473
3474         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
3475         managed code. Fixes #73012.
3476
3477         * metadata.h (MonoMarshalSpec): Add elem_mult field.
3478
3479         * metadata.c reflection.c: Load/Emit elem_mult as well.
3480         
3481         * metadata.h (MonoMarshalSpec): Add comment.
3482
3483         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
3484
3485         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
3486         num_elem to -1 if not given.
3487
3488         * object-internals.h (MonoReflectionMarshal): Add has_size field.
3489
3490         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
3491         given values.
3492
3493 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
3494
3495         * null-gc.c (mono_gc_free_fixed): Was not compilable.
3496
3497 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
3498
3499         * reflection.c (encode_marshal_blob): Encode param_num field as well.
3500
3501         * object-internals.h (MonoReflectionMarshal): Add param_num field.
3502
3503 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
3504
3505         * object.c: generalized the reference bitmap creation
3506         and added hooks for the new GC.
3507         * class-internals.c: removed the gc_bitmap field from MonoClass.
3508
3509 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3510
3511         * domain.c: help the compiler to produce better code
3512         in mono_jit_info_table_find ().
3513
3514 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
3515
3516         * object.c: make all allocations look typed.
3517
3518 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3519
3520         * socket-io.c: load Mono.Posix if it's not loaded already
3521         (fixes bug#73033).
3522
3523 2005-02-24  Martin Baulig  <martin@ximian.com>
3524
3525         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
3526         * reflection.c (dup_type): Likewise.
3527
3528 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
3529
3530         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
3531         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
3532
3533 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3534
3535         * domain.c, threads.c, object-internals.h: make the critical thread
3536         local vars use the fast access mode (even when we're compiled in
3537         a lib). Provide accessors to be used by the jit during codegen.
3538
3539 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3540
3541         * appdomain.c: Changed hook functios behavior to include
3542         support for the reflection only assemblies. Some icalls were changed
3543         to support the mentioned assemblies too. Signatures of static methods
3544         try_assembly_resolve and real_load now have an additional parameter:
3545         refonly.
3546
3547         * assembly.c: General changes to mono_assembly_ methods to support
3548         reflection only api. Functions mono_assembly_open, mono_assembly_load,
3549         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
3550         suffix, to support an additional gbool parameter to specify whether
3551         the assembli is reflection only or not. Created some new hook functions 
3552         to add support for reflection only assemblies. Signatures of static 
3553         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
3554         have now an additional parameter: refonly.
3555
3556         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
3557         indicating whether the assembly is reflection only or not.
3558
3559         * exception.c: Add mono_get_exception_invalid_operation.
3560
3561         * icall.c: Throw an InvalidOperationException when trying to invoke
3562         a property/method/event, or trying to set/get the value of a field.
3563         Also add an icall to retrieve the ref_only flag to the
3564         MonoReflectionAssembly.
3565
3566 2005-02-23  Chris Toshok  <toshok@ximian.com>
3567
3568         Part of fix for #72827.
3569         * mono-debug.c (mono_debug_add_method): add lexical block data to
3570         the info we write.  Kind of a hack at the moment - we copy the
3571         lexical block info from the MonoDebugMethodInfo to the
3572         MonoDebugMethodJitInfo here, before writing it.
3573         (mono_debug_read_method): read the lexical block info.
3574
3575         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
3576
3577         * debug-mono-symfile.h: add lexical block support.
3578
3579         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
3580         support.
3581
3582 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
3583
3584         * loader.c (mono_lookup_pinvoke_call): Fix warning.
3585
3586         * object.c (mono_runtime_free_method): Call mono_free_method () and
3587         put the TODOs there.
3588
3589         * loader.c (mono_free_method): Free up most memory allocated for 
3590         dynamic methods.
3591
3592 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
3593
3594         * reflection.c: properly flag a Type argument to a
3595         named custom attr value (bug #72248).
3596
3597 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3598
3599         * reflection.c: reduce code duplication in named custom
3600         attribute encoding.
3601
3602 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
3603
3604         * reflection.c: properly encode custom attrs of type object
3605         (bug #72649).
3606
3607 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
3608
3609         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
3610
3611 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
3612
3613         * socket-io.c: load System.dll if it's not loaded already
3614         (bug #72850 and #70477).
3615
3616 2005-02-21  Martin Baulig  <martin@ximian.com>
3617
3618         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
3619         generic instances.
3620
3621 2005-02-21  Martin Baulig  <martin@ximian.com>
3622
3623         * reflection.c (mono_image_build_metadata): We also need to
3624         "fixup" the MethodImpl table after we computed the final method
3625         indices.  Call fixup_methodimpl() to do that.
3626         (fixup_methodimpl): New private method.
3627
3628 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
3629
3630         * assembly.c: special case mscorlib.dll (bug#72536),
3631         patch from Carlos Alberto Cortez.
3632
3633 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
3634
3635         * threads-types.h threads.c: Fix build bustage.
3636
3637         * threads.c: Use a union for long<->double conversions.
3638
3639         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
3640         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
3641
3642         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
3643         containing the checkpoint call with NOT_TAKEN.
3644         
3645         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
3646         checkpoint before pushing the arguments, so they won't have to be
3647         spilled to stack.
3648
3649 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3650
3651         * domain.c, assembly.c, domain-internals.h: make some data
3652         const and relocation-free.
3653
3654 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
3655
3656         * object.c, appdomain.c, class-internals.h: introduce the
3657         MonoClassRuntimeInfo structure to hold the info needed to
3658         use a class at runtime. Made mono_class_vtable() lock-free
3659         for all the appdomains.
3660
3661 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
3662
3663         * metadata-internals.h, image.c: introduce a per-image mempool to
3664         be used for memory that has the same lifetime as the image.
3665
3666 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
3667
3668         * domain.c: In mono_init_internal(), instead of selecting the first
3669         runtime version supported by an executable, get a list of all
3670         supported versions and select the one for which an mscorlib exists
3671         (since even if the runtime supports a given version, it doesn't mean
3672         that the framework for that version is installed).
3673         Modified get_runtimes_from_exe to support this behavior.
3674         In supported_runtimes, added information about additional system
3675         assembly versions.
3676         
3677         * assembly.c: Added support for more than one system assembly version
3678         per runtime version. Updated the assembly list.
3679         In mono_assembly_remap_version, removed the initial version check,
3680         since we don't know to which version we need to compare until we
3681         get the version set on which the assembly is based.
3682         Moved the code for loading corlib into the new method
3683         mono_assembly_load_corlib(), so it can be used by the initialization
3684         code.
3685         
3686         * domain-internals.h: Updated data structures and added declaration
3687         for mono_assembly_load_corlib.
3688
3689 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
3690
3691         * reflection.c (resolve_object): Fix the creation of the signature in 
3692         the SignatureHelper case.
3693
3694         * assembly.c (mono_assembly_remap_version): Fix binary search.
3695         
3696 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
3697  
3698         * class.c: Added inheritance check when a method is overloaded (from a
3699         virtual method or when implementing an interface) and when a class is
3700         inherited. Added functions to set a failure for a class and to 
3701         retreive the exception from a failure.
3702         * class-internals.h: Added fields to MonoClass to keep the exception
3703         information status for inheritance (or other exceptions) to be thrown
3704         later (i.e. not at load time).
3705         * object.c: Throw the inheritance SecurityException when a type is to 
3706         be created with either class or method inheritance violations.
3707         * reflection.c|h: Fix when getting declsec from a class. Removed 
3708         unrequired code for class. Improved sanity in parameter naming.
3709         * security-manager.c|h: Added functions to check for class and method
3710         inheritance.
3711
3712 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
3713
3714         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
3715         and has_finalize in dynamic types as well.
3716
3717 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
3718
3719         * culture-info-table.h : fixed currency format for en-GB (and so on).
3720
3721 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
3722
3723         * gc.c: ensure the GC handles never have 0 as a value.
3724
3725 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
3726
3727         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
3728         a pointer to a struct to unmanaged code. Fixes #72625.
3729
3730 2005-02-16  Martin Baulig  <martin@ximian.com>
3731
3732         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
3733
3734 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
3735
3736         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
3737
3738 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
3739
3740         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
3741
3742         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
3743         UnmanagedFunctionPointerAttribute, use it for determining calling convention
3744         etc. Fixes #71471.
3745
3746         * reflection.c (mono_custom_attrs_get_attr): New helper function.
3747
3748         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
3749
3750 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
3751
3752         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
3753         changes to make the current context a field in MonoThread.
3754
3755 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
3756
3757         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
3758         the last change.
3759         
3760         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
3761         extracted from mono_marshal_get_native_wrapper.
3762
3763         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
3764         to create wrappers around native functions.
3765
3766         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
3767         delegates for arbitrary function pointers. Fixes #71472.
3768
3769 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
3770
3771         * threads.c: cleaned up the code a little.
3772
3773 2005-02-15  Martin Baulig  <martin@ximian.com>
3774
3775         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
3776         the data table.
3777
3778         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
3779         allocate larger chunks if needed.
3780
3781 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
3782
3783         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
3784         in by mistake.
3785
3786 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
3787
3788         * domain.c: keep the domains in an array and ensure the domain ids
3789         are kept small, so they can be used as indexes to domain-specific data
3790         with a small memory overhead.
3791
3792 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
3793
3794         * icall.c: Handle byref types in Type icalls. Fixes #72544.
3795
3796 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
3797
3798         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
3799
3800 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
3801
3802         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
3803
3804         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
3805         values.
3806
3807         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
3808         
3809 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
3810
3811         * domain-internals.h: add the hashtable here.
3812
3813         * class-internals.h: Remove `info' from MonoMethod
3814
3815         * domain.c: Add a new hashtable, jit_trampoline_hash
3816
3817 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
3818
3819         * object.c: don't set the value of static fields
3820         (fixes bug#72494).
3821
3822 2005-02-11  Martin Baulig  <martin@ximian.com>
3823
3824         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
3825         (mono_debug_add_method): Silently ignore the method if it's too big.
3826         (mono_debug_add_type): Likewise.
3827
3828 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
3829
3830         * threads.c, appdomain.c: remove #ifdefs from the code.
3831
3832 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
3833
3834         * metadata-internals.h: Added flags to MonoAssembly to cache the most
3835         common security informations. This allows us to stay in unmanaged code
3836         when doing LinkDemand and it's special cases (except for the first 
3837         time for initialization). The flags a very much used with --security.
3838         * reflection.c|h: Added code to get declarative security attributes 
3839         for LinkDemand and InheritanceDemand. This required to refactor the
3840         existing code for Demand.
3841         * security-manager.c|h: Added new method fields for the special cases
3842         of LinkDemand.
3843
3844 2005-02-10  Martin Baulig  <martin@ximian.com>
3845
3846         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
3847         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
3848
3849 2005-02-10  Martin Baulig  <martin@ximian.com>
3850
3851         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
3852         debugging code; this is almost a complete rewrite.
3853
3854         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
3855
3856 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3857
3858         * domain.c, object.h: expose mono_string_equal () and 
3859         mono_string_hash ().
3860         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
3861         it's implemented in managed code.
3862
3863 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3864
3865         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
3866         lo leak objects between appdomains.
3867
3868 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3869
3870         * assembly.c: old compilers compilation fix from 
3871         robertj@gmx.net (Robert Jordan).
3872
3873 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
3874
3875         * class-internals.h: Little reminder for the future.
3876
3877         * debug-helpers.c: Fix up wrapper_type_names
3878
3879 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3880
3881         * image.c, metadata-internals.h: when loading an image from a file,
3882         mmap all of it and use the same codepaths as when using a
3883         in-memory image: the code is simpler and we use less memory
3884         (both writable and readonly).
3885
3886 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
3887
3888         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
3889         API to alloc runtime data structures that need to be tracked by the
3890         GC and contain pointers.
3891         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
3892         make the code more readable and eventually use a different GC.
3893
3894 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
3895
3896         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
3897         for out arguments.
3898         
3899 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
3900
3901         * object.c: In release_type_locks(), don't release the cctor lock
3902         if it has already been released. This fixes a crash in the
3903         thread5 test.
3904
3905 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3906
3907         * gc.c, marshal.c, icall.c: register a delegate for finalization
3908         only when the native function pointer has been allocated for it.
3909
3910 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3911
3912         * object.c: cleaned up some code, allocate objects that are
3913         pointer free with the atomic malloc variant. Allocate memory
3914         for static data from the mempool if it's pointer-free.
3915         Allocate the bounds array at the end of the array data, when needed.
3916         * object-internals.h, object.h: move a private function in a private
3917         header.
3918         * class.c: handle missing case in tracking references in fields.
3919
3920 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
3921
3922         * class.c, class-internals.h: keep track if a type has
3923         reference fields in either the instance or static fields.
3924
3925 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
3926
3927         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
3928         and renamed to MonoRuntimeInfo. Added fields to store the expected
3929         framework assembly version. Changed mono_get_framework_version and
3930         mono_get_runtime_version for a single mono_get_runtime_info method.
3931         
3932         * assembly.c: Added method to remap system assembly versions to the
3933         current executing runtime version. Removed old mapping code.
3934         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
3935         
3936         * icall.c, reflection.c: Track api changes.
3937
3938 2005-02-06  Miguel de Icaza  <miguel@novell.com>
3939
3940         * loader.c (method_from_memberref): Improve error reporting,
3941         produce the class name instead of the typeref/typedef index. 
3942
3943 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
3944
3945         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
3946
3947 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
3948
3949         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
3950         stdcall and charset name mangling.  Reorganize the code and add
3951         some tracing stuff.
3952
3953 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
3954
3955         * monodiet.c: More iters!
3956
3957         * marshal.c: Iter usage.
3958
3959         * icall.c: Iter usage.
3960
3961         * object.c: Use iters.
3962
3963         * debug-helpers.c: More iters
3964
3965 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
3966
3967         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
3968         under win32.
3969
3970 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
3971
3972         * mono-debug-debugger.c: use iters
3973
3974         * class.c, class-internals.h: mono_class_setup_events is static
3975         now
3976
3977         * All callers: use iters
3978
3979 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
3980
3981         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
3982         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
3983
3984 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
3985
3986         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
3987
3988         * marshal.h: Add prototypes for ldfld/stfld_remote.
3989
3990         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
3991         this is called during startup.
3992         
3993 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
3994
3995         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
3996         MonoThreadsSync struct private in monitor.c. Changed the way
3997         MonoThreadsSync is allocated so it's faster and there is no
3998         need to keep track of it with a finalizer and it uses less memory.
3999         This also finally allows us to allocate mono objects as ptrfree when
4000         there are no reference fields.
4001
4002 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
4003
4004         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
4005         disappearing link to the GC interface and use them to simplify
4006         the gchandles code.
4007
4008 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
4009
4010         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
4011         stfld_remote which call mono_load/store_field_new. This allows methods
4012         calling ldfld/stfld wrappers to be AOTed.
4013
4014         * console-io.c: Include sys/filio.h under solaris.
4015         
4016         * console-io.c: Include curses.h if needed correctly.
4017
4018 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
4019         
4020         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
4021         method->klass as well.
4022
4023         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
4024
4025         * class.c (mono_class_init): Switch on lazy initialization of 
4026         methods.
4027
4028         * class.c (mono_class_get_finalizer): Handle the case when the 
4029         finalizer is inherited.
4030
4031 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4032
4033         * console-io.c: <curses.h> is needed by term.h on solaris.
4034
4035 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
4036
4037         * icall.c, class-internals.h, monodiet.c, class.c: Remove
4038         mono_class_setup_properties where possible. Remove this ftn from
4039         the header file, and make it static.
4040
4041 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
4042
4043         * loader.c: Add missing setup_... call.
4044
4045         * class.c: Add missing setup_... calls.
4046
4047         * class.c (mono_class_init): Switch on lazy initialization of 
4048         the generic vtable.
4049         
4050         * class.c (mono_class_init): Fix generics broken by the recent changes.
4051
4052         * monodiet.c (handle_type): Add missing setup_... calls.
4053
4054         * class.c: Back out garbage in previous patch.
4055         
4056         * class.c: Add missing setup_... calls.
4057
4058         * class.c (mono_class_get_method_from_name_flags): Avoid calling
4059         mono_class_setup_methods () if possible.
4060
4061         * class-internals.h (MonoClass): Add 'has_cctor' flag.
4062
4063         * class-internals.h (MonoCachedClassInfo): New structure.
4064
4065         * class.c: Initialize properties and events fields of MonoClass lazily.
4066
4067         * class.c: Add infrastructure for lazily initializing the methods and
4068         vtable fields of MonoClass. Not yet used.
4069
4070         * class.c (mono_class_get_finalizer): New helper function.
4071
4072         * class.c: Add infrastructure for loading some class related data from
4073         an AOT file.
4074
4075         * object.c: Add infrastructure for initializing the vtable from data
4076         in the AOT file.
4077
4078         * gc.c (run_finalize): Use mono_class_get_finalizer ().
4079
4080         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
4081         appropriate initialization function before accessing parts of the
4082         MonoClass structure.
4083
4084         * marshal.c: Fix warnings.
4085         
4086         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
4087
4088         * mono-debug-debugger.c (get_exception_message): Use 
4089         mono_class_get_method_from_name_flags ().
4090
4091 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
4092
4093         * reflection.c, appdomain.c: Replace a few manual searches that
4094         Zoltan missed. (Paolo approved this part of my initial patch).
4095
4096 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
4097
4098         * profiler.c: disable recording statistical events at report time.
4099
4100 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4101
4102         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
4103         to byteswap arrays of enum values, too (bug #72080).
4104
4105 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
4106
4107         * appdomain.c (set_domain_search_path): Allow this to be called if
4108         domain->setup is not yet set.
4109
4110         * loader.c (mono_method_get_index): New helper function.
4111
4112         * loader.c reflection.c: Use mono_method_get_index ().
4113
4114         * class.c (mono_class_get_method_from_name_flags): New helper method.
4115
4116         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
4117         this.
4118
4119         * class.c (mono_class_get_cctor): New helper method.
4120
4121         * string-icalls.c object.c class.c marshal.c reflection.c: Use
4122         mono_class_get_method () to look up methods.
4123
4124 2005-02-01  Miguel de Icaza  <miguel@novell.com>
4125
4126         * console-io.c: Fix the build, this should work on Windows.
4127
4128 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
4129
4130         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
4131         be set to null to keep things valid
4132
4133 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4134
4135         * icall.c: added Console 2.0 icalls.
4136         * Makefile.am: added console-io.[ch]
4137         * console-io.[ch]: internal calls for Console 2.0 API.
4138
4139 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4140
4141         * class.c: make sure we consider all the interfaces
4142         when calculating max_interface_id (bug found by
4143         Jeroen Frijters running ikvm).
4144
4145 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
4146
4147         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
4148         valuetype fields to null.
4149
4150         * object.c (set_value): Ditto. Fixes #71669.    
4151
4152 2005-01-31  Martin Baulig  <martin@ximian.com>
4153
4154         * metadata.c (mono_metadata_has_generic_params): New public
4155         function; checks whether something is a generic method.
4156
4157 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
4158
4159         * appdomain.c: fix infinite recursion when adding assemblies.
4160
4161 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
4162
4163         * object.c: Fix small typo to return all items for Environment.
4164         GetCommandLineArgs.
4165
4166 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4167
4168         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
4169         reflection.c: more domain and assembly-unload related fixes
4170         and memory leaks plugs.
4171
4172 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
4173
4174         * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
4175
4176 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
4177
4178         * loader.c (mono_method_signature): Make this method lazy
4179         (mono_get_method_from_token): Don't computate the signature here.
4180
4181         Doing this saves quite a bit of memory. I got 90 kb on starting up
4182         monodoc. It should also save some disk reads on startup.
4183
4184         * *: MonoMethod->signature might be NULL now. You *MUST* use
4185         mono_method_signature.
4186
4187 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
4188
4189         * object.c (mono_runtime_get_main_args): Return an array from the
4190         current domain here. Fixes #71938.
4191
4192 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
4193
4194         * monitor.c: formatting changes to comply with the
4195         mono coding style and remove #ifdefs from the code.
4196
4197 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4198
4199         * metadata.c, private.h: remove some unneeded data
4200         and use a more compact representation for table schemas.
4201
4202 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
4203
4204         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
4205         to get a better distribution in hash tables.
4206         * *.c: use mono_aligned_addr_hash() where appropriate.
4207         * assembly.c: make var static.
4208
4209 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
4210
4211         * domain-internals.h: Put MonoJitInfo on a diet.
4212
4213         * domain.c: Fix a warning.
4214
4215 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4216
4217         * gc.c: rework the gc handles code to reuse handles
4218         when freed.
4219
4220 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4221
4222         * domain.c: fixed long standing bug in mono_string_equal() which
4223         was brought to light with the ldstr changes.
4224
4225 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
4226
4227         * reflection.c: Remove warning by adding missing include for marshal.h
4228
4229 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4230
4231         * domain.c, object.c: change the ldstr_table to hold
4232         MonoString* as keys: makes the runtime isinterned lookup
4233         faster and simplifies memory management.
4234
4235 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
4236  
4237         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
4238         possible to add imperative security checks before calling the icall.
4239         * reflection.c: Return security attributes on the original MonoMethod
4240         (and not the wrapped one). This fix permissions on icalls.
4241
4242 2005-01-25  Dick Porter  <dick@ximian.com>
4243
4244         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
4245         the check for mktime() support actually test the mktime() return
4246         value.  "Fixes" bug 71682, though the output is still different to
4247         MS.
4248
4249 2005-01-25  Martin Baulig  <martin@ximian.com>
4250
4251         * class.c (mono_class_is_assignable_from): Make this work for
4252         generic instances.
4253
4254 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
4255
4256         * marshal.c (mono_string_utf8_to_builder)
4257         (mono_string_builder_to_utf16): We might not have ownership of the
4258         string. In thise case, we need to create a new buffer.
4259
4260         * object-internals.h (mono_stringbuilder_capacity): sb->str might
4261         be null, in which case, use the default capacity.
4262
4263 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4264
4265         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
4266         GC events to the profiler.
4267
4268 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4269
4270         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
4271         if you don't want the GC to run.
4272
4273 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
4274
4275         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
4276         start providing a GC API and keeping different implementations in
4277         their own file.
4278         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
4279
4280 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
4281
4282         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
4283         mmap rather than allocating a huge buffer.
4284         (mono_debug_close_mono_symbol_file): Free the buffer allocated
4285         above.
4286
4287 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
4288
4289         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
4290         and CheckExecutionRights.
4291         * reflection.c|h: Keep the index of the declarative security to be 
4292         used, instead of the pointer, when AOT compiler is used. Also add 
4293         class initialization when requesting demands.
4294         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
4295         CheckExecutionRights. Both properties are now FALSE by default, and
4296         unmodifiable, unless the --security option is used.
4297
4298 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4299
4300         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
4301         reflection.c: properly refcount images and assemblies, many leaks fixed.
4302
4303 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4304
4305         * threadpool.c: increase the timeout for threads in the thread pool to
4306         10s.  Fixes bug #67159.
4307
4308 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
4309
4310         * class-internals.h: Sun's compiler insists on explicit
4311         signed on bit fields to handle then correctly.
4312
4313 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
4314
4315         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
4316         Make the size of the array fit only the number of invalid path
4317         chars that we have.
4318
4319         * class.c (_mono_class_get): Improve the error reporting when a
4320         class referenced is not found, to assist debugging. 
4321
4322 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
4323
4324         * threads.c: fix off-by-one error.
4325         * domain.c: free data allocated in the domain.
4326
4327 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
4328
4329         * reflection.c (mono_method_body_get_object): Fill out exception info
4330         as well.
4331
4332         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
4333         structure.
4334         
4335 2005-01-19  Martin Baulig  <martin@ximian.com>
4336
4337         * loader.c (mono_get_method_constrained): Make this work again.
4338
4339 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
4340
4341         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
4342         guint16 to match the managed side.
4343
4344         * reflection.c (mono_reflection_body_get_object): Fill out local
4345         variables array.
4346
4347         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
4348         as well.
4349
4350         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
4351         'local_var_sig_token'.
4352
4353 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
4354
4355         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
4356         System.Drawing.
4357
4358         * reflection.c (mono_method_body_get_object): Handle abstract and
4359         runtime methods.
4360
4361 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
4362
4363         * marshal.c, loader.c, class-internals.h, reflection.c:
4364         store the emthod data for a wrapper in an array instead of a list.
4365
4366 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
4367
4368         * marshal.c: change the code to allocate memory more
4369         conservatively for method wrappers.
4370
4371 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
4372
4373         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
4374         fields from MonoClass to the marshal info structure where they belong.
4375
4376 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4377
4378         * class.c, object.c, class-internals.h, marshal.c: rearrange
4379         some fields and tweak some types to lower memory usage.
4380
4381 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
4382
4383         * threads.c (signal_thread_state_change): Handle the case when the
4384         target thread is the current thread.
4385
4386         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
4387
4388         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
4389         emit_ptr_to_object_conv. 
4390
4391         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
4392         marshalling. Fixes #71352.
4393
4394 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4395
4396         * metadata.h, blob.h: move table enum to blob.h so it can be included
4397         in any header.
4398         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
4399         cut the size of MonoImage/MonoDynamicImage.
4400
4401 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
4402
4403         * profiler.c (mono_profiler_install_simple): Fix default arguments.
4404
4405 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
4406
4407         * reflection.c, reflection.h, icall.c: add a function to check
4408         if an attribute type is defined for a metadata object.
4409
4410 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
4411
4412         * object-internals.h: Added some needed fields from StringBuilder class.
4413         * marshal.c: Set the maxCapacity when creating a StringBuilder.
4414
4415 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
4416
4417         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
4418         threads before shutting down the runtime.
4419
4420         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
4421
4422 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4423
4424         * object-internal.h, threads.c: implement stacksize and 
4425         parameterized thread start functionality (requires
4426         matching corlib). Marked broken code for later removal.
4427
4428 2005-01-12  Martin Baulig  <martin@ximian.com>
4429
4430         * class-internals.h (MonoGenericClass): Moved the `initialized'
4431         flag to MonoDynamicGenericClass, removed `init_pending'.
4432         (MonoGenericInst): Added `is_reference' flag.
4433
4434 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
4435
4436         * reflection.c (mono_image_create_pefile): Only set the pe_offset
4437         inside the MSDOS header. Fixes #71201.
4438
4439         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
4440         gc thread.
4441         (mono_domain_finalize): Ditto.
4442
4443 2005-01-12  Martin Baulig  <martin@ximian.com>
4444
4445         * class.c (mono_get_shared_generic_class): Use the cache for
4446         non-dynamic generic classes.
4447
4448         * class-internals.h (mono_class_create_generic_2): Removed
4449         function prototype, this function is now static inside class.c.
4450
4451         * class.c (mono_class_create_generic_2): Made this static, only
4452         call it from mono_class_init() and mono_class_setup_parent().
4453         (collect_implemented_interfaces_aux): Call mono_class_init() on
4454         the interfaces we collect.
4455         (mono_class_setup_vtable): Call mono_class_init (class->parent).
4456
4457 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
4458
4459         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
4460         it a real thread handle.
4461
4462         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
4463         MonoJitExceptionInfo, since each catch clause needs its own variable.
4464         
4465 2005-01-11  Dick Porter  <dick@ximian.com>
4466
4467         * image.c (mono_pe_file_open): New variant on mono_image_open()
4468         that does not set up the CLI metadata; used for FileVersionInfo so
4469         it can get the data for windows binaries too.
4470         
4471         * process.c (process_read_string_block): Don't read off the end of
4472         the StringTable block.
4473
4474         These both fix bug 70766.
4475
4476 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
4477
4478         * gc.c: set some fields to NULL at GC cleanup time.
4479         * threads.c: if we quit the main thread, call exit ().
4480
4481 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
4482
4483         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
4484
4485 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
4486
4487         * threads.h, threads.c, object.c: added accessor and settor for
4488         main_thread. Handle it specially when exiting from it: wait
4489         for other foreground threads to exit.
4490
4491 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
4492
4493         * process.c, verify.c: remove some bloat.
4494
4495 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
4496
4497         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
4498         the calling convention to cdecl under win32.
4499
4500 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
4501
4502         * object.c (mono_object_get_size): New function to get the size of
4503         an object instance.
4504
4505         * profiler.c (simple_allocation): Use above.
4506
4507 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
4508
4509         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
4510         ves_icall_System_AppDomain_getRootDomain (as it's not required to
4511         get an appdomain by it's id and we can't assume the root's id is 0).
4512         * domain-internals.h: Change the function prototype to match.
4513         * icall.c: Change the icall table for AppDomain.
4514
4515 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
4516
4517         * locales.c (string_invariant_compare_char): Only compute
4518         GUnicodeTypes in the case where we need them.  Test for ordinality
4519         first and return if so.
4520
4521         From the commit:
4522
4523                 /*
4524                  * FIXME: here we must use the information from c1type and c2type
4525                  * to find out the proper collation, even on the InvariantCulture, the
4526                  * sorting is not done by computing the unicode values, but their
4527                  * actual sort order.
4528                  */
4529
4530 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4531
4532         * loader.c: for P/Invoke methods, allow the "Internal" shared
4533         library name to refer to the calling process symbol namespace.
4534
4535 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
4536
4537         * Makefile.am: Add the security manager to the build.
4538         * security-manager.c|h: New. Initialization of the security manager.
4539
4540 2005-01-07  Dick Porter  <dick@ximian.com>
4541
4542         * threads.c: 
4543         * monitor.c: Update thread state during Monitor and WaitHandle
4544         waits.  Fixes bug 71031.
4545
4546 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
4547
4548         * reflection.c (property_encode_signature): Correctly handle when the
4549         property has no methods.
4550
4551 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
4552
4553         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
4554         
4555         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
4556         fields from mb, not rmb. Fixes #71017.
4557
4558         * marshal.c (emit_ptr_to_str_conv): Add support for 
4559         ByValTStr -> string conversion. Fixes #71015.
4560
4561         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
4562
4563         * mempool.c (mono_mempool_contains_addr): New helper function.
4564
4565 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
4566
4567         * metadata.c (mono_metadata_compute_size): Fix size calculation of
4568         HasSematics encoded fields.
4569         
4570         * metadata.c (mono_type_to_unmanaged): Improve error message for 
4571         invalid string marshalling.
4572
4573         * metadata.c: Fix warnings.
4574         
4575 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4576
4577         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
4578         profiler support.
4579
4580 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
4581
4582         * domain.c object.c domain-internals.h: Revert part of r38077 since the
4583         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
4584         tests.
4585
4586 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
4587
4588         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
4589         so methods containing these can be AOTed.
4590
4591 2005-01-03  Martin Baulig  <martin@ximian.com>
4592
4593         * loader.c (find_method): Removed the hack for generic instances.
4594         (method_from_memberref): If our parent is a generic instance, pass
4595         its generic type definition to find_method() and then inflate the
4596         method.
4597         (mono_get_method_constrained): Pass the generic type definition to
4598         find_method() and inflate the method later.
4599
4600         * class-internals.h (MonoStats): Added `generic_class_count'.
4601
4602         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
4603         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
4604
4605         * reflection.c (mono_custom_attrs_from_params): Don't ignore
4606         generic type definitions.
4607
4608 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
4609
4610         * loader.c icall.c: Fix warnings.
4611
4612 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
4613
4614         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
4615         blittable types. Fixes #70864.
4616
4617 2004-12-29  Martin Baulig  <martin@ximian.com>
4618
4619         * icall.c
4620         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
4621
4622         * reflection.c (mono_method_get_object): Create a
4623         "System.Reflection.MonoGenericMethod" for inflated methods; don't
4624         call mono_get_inflated_method().
4625
4626         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
4627
4628 2004-12-27  Martin Baulig  <martin@ximian.com>
4629
4630         * class-internals.h (MonoMethod): Added `is_inflated' flag.
4631         (MonoMethodInflated): Added `inflated' field.
4632
4633         * class.c (mono_class_inflate_generic_method): Don't really
4634         inflate the method here; just set the `is_inflated' flag in the
4635         MonoMethod.
4636         (mono_class_get_inflated_method): Actually inflate the method here
4637         if it's not already inflated; we use the MonoMethodInflated's new
4638         `inflated' field as a cache.
4639
4640 2004-12-26  Martin Baulig  <martin@ximian.com>
4641
4642         * class.c
4643         (inflate_generic_class): Moved some code out of inflate_generic_type().
4644         (mono_class_inflate_generic_method): If we're already inflated,
4645         inflate the context and use the declaring method; ie. make sure
4646         the declaring method of an inflated method is always the generic
4647         method definition.
4648         (mono_class_create_from_typedef): Create
4649         `class->generic_container->context->gclass'.
4650
4651 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
4652
4653         * metadata-internals.h, marshal.c, reflection.c: More
4654         MonoGHashTable->GHashTable.
4655
4656         * domain-internals.h, class.c: Change MonoGHashTable's into
4657         GHashTables for some cases where no gc stuff is used
4658
4659         All users: update apis
4660
4661 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
4662
4663         * metadata.c (builtin_types): Make this `const'. Makes this get
4664         put into the shareable section.
4665         (mono_metadata_init): Casts to make gcc happy.
4666
4667 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
4668
4669         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
4670
4671 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
4672
4673         * icall.c: Added an internal call to retrieve the position and length
4674         of assembly-level declarative security attributes (RequestMinimum, 
4675         RequestOptional and RequestRefuse). This is used by the Assembly class
4676         to re-create the corresponding permission sets.
4677
4678 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
4679
4680         * marshal.c: fix the stelemref wrapper to be type correct
4681         (and faster).
4682
4683 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
4684
4685         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
4686         to do key & 0x7fffffff. Hashtable already does this. It just
4687         results in longer code.
4688
4689 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
4690
4691         * appdomain.c: Bump corlib version.
4692         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
4693         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
4694         * reflection.c|h: Add functions to get declarative security infos
4695         (blob position and length) for assemblies, classes and methods.
4696
4697 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
4698
4699         * reflection.c: sort the constant table (bug #70693).
4700
4701 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
4702
4703         * object-internals.h, threads.c, domain.c: add accessors for
4704         the MonoThread and MonoDomain tls keys.
4705
4706 2004-12-18  Martin Baulig  <martin@ximian.com>
4707
4708         * class.c (inflate_generic_type): If we're inflating a generic
4709         instance, set `ngclass->context->container = context->container';
4710         ie. the container we inflated into.
4711
4712         * metadata.c (mono_metadata_parse_generic_param): Reflect above
4713         inflate_generic_type() changes.
4714
4715 2004-12-17  Martin Baulig  <martin@ximian.com>
4716
4717         * class-internals.h
4718         (MonoGenericClass): Replaced `MonoType *generic_type' with
4719         `MonoClass *generic_class'.  Removed `dynamic_info'; if
4720         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
4721         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
4722
4723 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
4724
4725         * exception.c (mono_exception_from_token): New helper function.
4726
4727 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
4728
4729         * assembly.c (mono_assembly_load_with_partial_name): Call 
4730         mono_assembly_loaded before invoking the preload hooks. Fixes
4731         #70564.
4732
4733         * object-internals.h (MonoThread): Change culture_info and 
4734         ui_culture_info into an array.
4735
4736         * threads.c: Cache culture info objects from more than one appdomain.
4737
4738         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
4739         current UI culture.
4740
4741 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
4742
4743         * threads.h threads.c appdomain.c: Clear the culture_info field of
4744         all threads during unloading if they point to an object in the dying
4745         appdomain.
4746
4747 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
4748
4749         * culture-info.h (TextInfoEntry): New struct
4750         * object-internals.h: sync with managed
4751         * locales.c: fill the `text_info_data' field
4752         * culture-info-tables.h: update
4753
4754 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
4755
4756         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
4757         collector.
4758
4759 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
4760
4761         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
4762         (ves_icall_ModuleBuilder_getMethodToken): Ditto
4763
4764 2004-12-12  Martin Baulig  <martin@ximian.com>
4765
4766         * mono-debug-debugger.c (write_type): If we're an enum and the
4767         builtin types have already been initialized, call mono_class_init().
4768
4769 2004-12-11  Martin Baulig  <martin@ximian.com>
4770
4771         * metadata.c (mono_metadata_load_generic_params): Added
4772         `MonoGenericContainer *parent_container' argument; automatically
4773         compute `container->is_method'; pass the correct owner to
4774         get_constraints().      
4775
4776         * reflection.c (compare_genericparam): Sort the GenericParam table
4777         according to increasing owners. 
4778
4779 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
4780
4781         * profiler.c: allow disabling the default profiler.
4782
4783 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
4784
4785         * decimal.c, icall.c: allow disabling System.Decimal support.
4786
4787 2004-12-09  Marek Safar <marek.safar@seznam.cz>
4788
4789         * reflection.c: Add support for null attribute arguments.
4790
4791 2004-12-09  Martin Baulig  <martin@ximian.com>
4792
4793         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
4794         names to get rid of compiler warnings.
4795
4796 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
4797
4798         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
4799         mono_marshal_load_type_info (). Fixes #69625.
4800         (mono_marshal_get_ptr_to_struct): Likewise.
4801
4802 2004-12-08  Martin Baulig  <martin@ximian.com>
4803
4804         * mono-debug.h: Bumped version number to 47.
4805
4806         * mono-debug-debugger.c
4807         (mono_debugger_event_handler, mono_debugger_event): Take two
4808         guint64 arguments insteed of a gpointer and a guint32.  
4809
4810 2004-12-08  Martin Baulig  <martin@ximian.com>
4811
4812         * debug-mono-symfile.h
4813         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
4814         `address' to `native_offset'.
4815
4816 2004-12-08  Martin Baulig  <martin@ximian.com>
4817
4818         * class.c (mono_class_create_from_typespec): Only inflate if we
4819         either have `context->gclass' or `context->gmethod'.
4820
4821 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
4822
4823         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
4824
4825         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
4826
4827         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
4828
4829         * reflection.c (mono_assembly_get_object): Remove the workaround put
4830         in for the release.
4831         
4832         * appdomain.c: Use the corlib_internal field from MonoAssembly.
4833
4834         * appdomain.c: Bump corlib version.
4835
4836         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
4837         be visible in other appdomains.
4838
4839 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
4840
4841         * threads.c: Interlocked inc and dec for longs were messed up,
4842         use a KISS based impl for this. Fixes 70234
4843
4844 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
4845
4846         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
4847
4848 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
4849
4850         * icall.c: fix to follow policy not to allow struct
4851         arguments in icalls.
4852
4853 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4854
4855         * process.c: make the patch that handles spaces in file paths work
4856         on mono/windows too.
4857
4858 2004-12-06  Martin Baulig  <martin@ximian.com>
4859
4860         * class.c (mono_class_create_generic): Call
4861         mono_class_setup_supertypes() if we're dynamic.
4862         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
4863
4864 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
4865
4866         * object-internals.h: Add new fields to MonoThread.
4867
4868         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4869
4870         * icall.c threads-types.h threads.c: Add new icalls.
4871
4872         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
4873
4874         * object-internals.h (MonoReflectionAssembly): Sync object layout with
4875         managed side.
4876
4877         * appdomain.c: Bump corlib version.
4878
4879         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
4880         internal assemblies. Fixes #69181.
4881
4882 2004-12-05  Martin Baulig  <martin@ximian.com>
4883
4884         * class.c (mono_class_inflate_generic_signature): Make this a
4885         no-op if `context' is NULL or we don't have any type parameters;
4886         also copy `sentinelpos'.        
4887
4888 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
4889
4890         * image.c: Add unbox_wrapper_cache.
4891
4892         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
4893
4894         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
4895         function generator.
4896         
4897         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
4898         Fixes #70173.
4899
4900         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
4901         
4902 2004-12-04  Martin Baulig  <martin@ximian.com>
4903
4904         * loader.c (mono_method_get_signature_full): New public function;
4905         like mono_method_get_signature(), but with an additional
4906         `MonoGenericContext *' argument.
4907
4908         * class.c (mono_class_inflate_generic_signature): Formerly known
4909         as inflate_generic_signature(); make this public.
4910
4911 2004-12-04  Martin Baulig  <martin@ximian.com>
4912
4913         * metadata.c
4914         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
4915         instead of a `MonoGenericContainer *'.  
4916         (mono_metadata_parse_array_full): Likewise.
4917         (mono_metadata_parse_signature_full): Likewise.
4918         (mono_metadata_parse_method_signature_full): Likewise.
4919         (mono_metadata_parse_generic_inst): Likewise.
4920         (mono_metadata_parse_generic_param): Likewise.
4921         (mono_metadata_parse_mh_full): Likewise.
4922         (mono_type_create_from_typespec_full): Likewise.
4923
4924 2004-12-03  Martin Baulig  <martin@ximian.com>
4925
4926         * class-internals.h (MonoGenericContainer): Replaced the
4927         `MonoGenericContext * pointer with a `MonoGenericContext'
4928         structure and made it the first element.
4929
4930 2004-12-03  Martin Baulig  <martin@ximian.com>
4931
4932         * class.c
4933         (inflate_generic_type): Set the `context->container' when creating
4934         a new MonoGenericContext.
4935         (mono_class_inflate_generic_method): Likewise.
4936         (mono_class_create_from_typespec): Just use `context->container'
4937         to get the container.
4938
4939         * loader.c (method_from_methodspec): Set `context->parent' from
4940         `context->container' - and if that's a method container, use its
4941         parent.  Also set the `context->container' when creating a new
4942         MonoGenericContext.
4943         (mono_get_method_from_token): Use just `context->container' to get
4944         the container.
4945
4946         * metadata.c (do_mono_metadata_parse_generic_class): Also set
4947         `gclass->context->container'.
4948
4949         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
4950         the `context->container' when creating a new MonoGenericContext.
4951
4952 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
4953
4954         * reflection.c (compare_genericparam): Sort params with identical
4955         owner by their number. Fixes gen-111 on sparc.
4956
4957 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
4958
4959         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
4960         around the domain changes.
4961
4962         * appdomain.c (mono_domain_unload): Handle the case when the thread
4963         calling Unload is itself being aborted during unloading. Fixes #70022.
4964
4965         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
4966
4967         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
4968         checkpoint_func as an icall so it gets a wrapper.
4969         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
4970         in the cross-appdomain wrappers too.
4971
4972         * threads.c (mono_thread_has_appdomain_ref): Make this public.
4973
4974         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
4975
4976         * reflection.c: Fix some memory leaks.
4977         
4978 2004-12-02  Martin Baulig  <martin@ximian.com>
4979
4980         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
4981
4982         * metadata.c (generic_class_cache): New static hashtable.
4983         (mono_metadata_lookup_generic_class): New public method.
4984
4985 2004-12-02  Martin Baulig  <martin@ximian.com>
4986
4987         * class.c (mono_class_create_from_typedef): Call
4988         mono_class_setup_parent() and mono_class_create_mono_type() before
4989         parsing the interfaces.
4990
4991 2004-12-02  Martin Baulig  <martin@ximian.com>
4992
4993         * metadata.c (generic_inst_cache): New static hashtable.
4994         (mono_metadata_lookup_generic_inst): New public function.
4995         (mono_metadata_inflate_generic_inst): New public function.
4996         (mono_metadata_parse_generic_inst): New public function.
4997         (do_mono_metadata_parse_generic_class): Use the new
4998         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
4999         since this'll also use the cache.
5000
5001         * reflection.c (mono_reflection_bind_generic_method_parameters):
5002         Use mono_metadata_lookup_generic_inst() to use the new cache.
5003
5004         * class.c (inflate_mono_type): Use
5005         mono_metadata_inflate_generic_inst() to inflate a generic
5006         instance; this'll also use the new cache.
5007
5008         * loader.c (method_from_methodspec): Use
5009         mono_metadata_parse_generic_inst() and
5010         mono_metadata_inflate_generic_inst() rather than parsing it
5011         manually, so we can use the new cache.
5012
5013 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
5014
5015         * threads.c (wait_for_tids): Do not incorrectly free threads when 
5016         the wait times out.
5017
5018 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5019
5020         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
5021         iter->args based on whether parameters are passed in registers (i.e.
5022         MONO_ARCH_REGPARMS is defined)
5023
5024 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
5025
5026         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
5027         the exception message. Fixes #70070.
5028         (method_from_methodspec): Fix warnings.
5029
5030 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5031
5032         * process.c: (complete_path) return the path quoted
5033
5034 2004-12-01  Martin Baulig  <martin@ximian.com>
5035
5036         * class-internals.h (MonoGenericInst): New structure.
5037         (MonoGenericClass): Replaced `type_argc', `type_argv' and
5038         `is_open' with `MonoGenericInst *inst'.
5039         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
5040         `is_open' with `MonoGenericInst *inst'.
5041
5042 2004-11-30  Martin Baulig  <martin@ximian.com>
5043
5044         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
5045
5046         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
5047         to `generic_class_cache'.
5048
5049         * metadata.c
5050         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
5051         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
5052         (mono_generic_inst_is_valuetype): Renamed to
5053         mono_generic_class_is_valuetype().
5054
5055         * class-internals.h
5056         (MonoGenericInst): Renamed to MonoGenericClass.
5057         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
5058         (MonoClass): Renamed `generic_inst' to `generic_class'.
5059         (MonoGenericContext): Renamed `ginst' to `gclass'.
5060
5061         * object-internals.h
5062         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
5063
5064         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
5065         mono_reflection_generic_class_initialize().
5066
5067         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
5068         now known as "System.Reflection.MonoGenericClass".
5069         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
5070
5071 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
5072
5073         * class-internals.h: Added a flag field to MonoClass to cache the
5074         declarative security attributes actions associated with the class.
5075         * domain-internals.h: Added booleans to MonoJitInfo to cache the
5076         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
5077         applicable to the JITted method.
5078         * reflection.c|h: Added functions to extract (as flags) which security
5079         actions are available (declaratively) for a method, class or assembly.
5080         * metadata.c|h: Added functions to search the declarative security
5081         table in the metadata.
5082         
5083 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
5084
5085         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
5086         EXPORTEDTYPES are already in the class name cache, so there is no
5087         need to add extra code here to look at them. Just removes a bit of
5088         cruft.
5089
5090         (ves_icall_System_Environment_get_TickCount): No need for #if
5091         WINDOWS. We already have the code in io-layer.
5092
5093 2004-11-28  Martin Baulig  <martin@ximian.com>
5094
5095         * loader.c
5096         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
5097         Fixes gen-112.cs.
5098
5099 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
5100
5101         * assembly.c (do_mono_assembly_open): Instead of having a
5102         conditional WITH_BUNDLE, incorporate support for bundles here, by
5103         having a global `bundles' variable holding a pointer to the actual
5104         bundles. 
5105
5106         (mono_register_bundled_assemblies): New API call used by the
5107         bundle code. 
5108
5109         See mkbundle.1 for details.
5110         
5111 2004-11-27  Martin Baulig  <martin@ximian.com>
5112
5113         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
5114         the vtable for generic methods.
5115
5116 2004-11-26  Martin Baulig  <martin@ximian.com>
5117
5118         * metadata.c
5119         (mono_metadata_generic_method_hash): New public function.
5120         (mono_metadata_generic_method_equal): Likewise.
5121
5122         * class-internals.h
5123         (MonoGenericContainer): Added `GHashTable *method_hash'.
5124
5125         * reflection.c (ReflectionMethodBuilder): Added
5126         `MonoGenericContainer *generic_container'.
5127         (reflection_methodbuilder_to_mono_method): Don't create a new
5128         MonoGenericContainer each time we're called.
5129         (mono_reflection_bind_generic_method_parameters): Use
5130         `container->method_hash' to cache the results so we don't create a
5131         different method if we're called several times with the same
5132         arguments.
5133
5134         * loader.c (method_from_methodspec): Use the new
5135         `container->method_hash' here, too.
5136
5137 2004-11-26  Martin Baulig  <martin@ximian.com>
5138
5139         * class.c (inflate_generic_signature): Correctly compute
5140         `res->has_type_parameters'.
5141         (mono_class_vtable): Use the `has_type_parameters' flag to
5142         determine whether we're a generic method.
5143
5144         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
5145
5146 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
5147
5148         * object.c (mono_runtime_run_main): Fix a small memory leak.
5149
5150 2004-11-25  Martin Baulig  <martin@ximian.com>
5151
5152         * class.c (set_generic_param_owner): Fixed the loop.
5153
5154 2004-11-25  Martin Baulig  <martin@ximian.com>
5155
5156         * object.c (mono_class_vtable): Don't create any JIT wrappers for
5157         generic methods.
5158
5159 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
5160
5161         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
5162         names. Fixes #69787.
5163
5164 2004-11-24  Martin Baulig  <martin@ximian.com>
5165
5166         * class.c (mono_class_create_generic_2): If we don't have a
5167         `ginst->parent', inflate `gklass->parent' to get our parent.
5168
5169 2004-11-24  Martin Baulig  <martin@ximian.com>
5170
5171         * reflection.c (compare_genericparam): Correctly sort the
5172         GenericParam table; fixes #69779.
5173
5174 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
5175
5176         * reflection.c: When writing a PE file, don't create a huge
5177         buffer in memory. Just write the arrays we have to the file.
5178         This reduces memory usage.
5179
5180         * metadata-internals.h: MonoDynamicStream pefile is no longer used
5181         globally.
5182
5183 2004-11-17  Martin Baulig  <martin@ximian.com>
5184
5185         * class.c (mono_class_init): Don't setup `class->parent' for
5186         dynamic instances; moved this to mono_class_generic_2().
5187         (mono_class_create_generic): Also set `klass->inited' for dynamic
5188         generic instances.
5189         (mono_class_create_generic_2): Don't do anything for dynamic
5190         generic instances.  Set `klass->parent' here and also call
5191         mono_class_setup_parent() here. 
5192
5193         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
5194         `MonoType *parent' argument; set `ginst->parent' before calling
5195         mono_class_create_generic_2(), so we set the correct parent.
5196
5197 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
5198
5199         * reflection.c: allow getting attributes from ModuleBuilder
5200         (used by ikvm).
5201
5202 2004-11-17  Martin Baulig  <martin@ximian.com>
5203
5204         * class.c (mono_class_create_from_typedef): If a type parameter is
5205         inherited from an outer class, set its owner to that class.
5206
5207 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
5208
5209         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
5210           for (int*) written size. This fixes bug #69592.
5211
5212 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
5213
5214         * icall.c: Added IsAuthenticodePresnet internal call.
5215         * image.c|h: New function that check a MonoImage for an Authenticode
5216         signature in the certificate PE data directory.
5217         * security.c|h: New internal call to ask the runtime if an 
5218         Authenticode signature seems referenced in the PE header.
5219
5220 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
5221
5222         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
5223
5224         * reflection.c (mono_image_create_pefile): Free the assembly streams
5225         after writing out the assembly file.
5226
5227         * object.c (mono_runtime_run_main): Fix small memory leak.
5228
5229         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
5230         property access modifiers. Fixes #69389.
5231
5232 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
5233
5234         * domain.c, object.c, object-internals.h, domain-internals.h,
5235         object.h, marshal.c: keep dynamic code info per domain.
5236
5237 2004-11-15  Martin Baulig  <martin@ximian.com>
5238
5239         * class.c (mono_type_get_name_recurse): Put type arguments in
5240         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
5241         see bug #68387.
5242
5243 2004-11-15  Martin Baulig  <martin@ximian.com>
5244
5245         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
5246         (mono_class_setup_vtable): When computing `the_cname' for a
5247         generic instance, don't include the namespace since we'd otherwise
5248         add it twice.
5249
5250 2004-11-15  Martin Baulig  <martin@ximian.com>
5251
5252         * class.c (mono_class_create_generic): Changed return type to void.
5253         (mono_class_create_generic_2): New public function; setup
5254         `class->method', `class->field' and `class->interfaces' here
5255         instead of in mono_class_init().
5256
5257         * class.h (mono_class_create_generic): Moved to class-internals.h.
5258
5259 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
5260
5261         * reflection.c (mono_image_create_pefile): take a file HANDLE.
5262         rather than writing to memory, write to this file. Right now,
5263         we are just writting into a buffer, and copying that. However
5264         we can avoid the buffer later.
5265
5266         (mono_dynamic_stream_reset): new function
5267
5268         * icall.c, object-internals.h: update for the above.
5269
5270 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
5271
5272         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
5273         have been using gc'd memory. First it is slower, unlikely
5274         the comment in the source code said, secondly, it increases
5275         our footprint to do it in the gc.
5276
5277         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
5278         the method so that it does not have to copy to managed code.
5279
5280 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
5281
5282         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
5283
5284 2004-11-12  Martin Baulig  <martin@localhost>
5285
5286         * reflection.c (mono_image_create_token): Allow generic method
5287         definitions here, since they may appear in an `.override'; see
5288         gen-98/gen-99 for an example.
5289
5290 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
5291
5292         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
5293         #69365.
5294
5295         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
5296         descriptive.
5297
5298 2004-11-11  Martin Baulig  <martin@ximian.com>
5299
5300         * class.c (mono_class_setup_vtable): In an explicit interface
5301         implementation, the method name now includes the arity.
5302
5303 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
5304
5305         * object.c (mono_array_full_copy): Fix warning.
5306
5307 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
5308
5309         * appdomain.c: Removed look_for_method_by_name(). Use the new method
5310         mono_class_get_method_from_name() instead.
5311         
5312         * class-internals.h: Added two new types of wrappers. 
5313         Added MonoRemotingTarget enum. Added new trampoline function type, which
5314         takes an additional MonoRemotingTarget value as parameter, so it is
5315         possible to request a trampoline for a specific target.
5316         
5317         * class.c: Added new mono_class_get_method_from_name() method.
5318         
5319         * class.h: In MonoRemoteClass, we can have now to vtables, one for
5320         general remoting sinks and one specific for cross domain calls.
5321         
5322         * debug-helpers.c: Added new wrapper names.
5323         
5324         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
5325         of a remote class.
5326         
5327         * image.c: Porperly delete value objects form the remoting invoke hashtable.
5328         
5329         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
5330         with several other methods (mono_marshal_get_xappdomain_dispatch,
5331         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
5332         and others) can generate a fast remoting wrapper for cross domain calls.
5333         More information can be found in docs/remoting.
5334         Other changes: Removed mono_find_method_by_name, and used
5335         mono_class_get_method_from_name instead.
5336         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
5337         is stored in the remoting invoke hashtable.
5338         
5339         * marshal.h: published the new method for getting the xdomain wrapper,
5340         and also added a method for getting the adequate wrapper for a given
5341         method and target.
5342         
5343         * object-internals.h, object.c: Added a couple of methods for capying and
5344         cloning arrays.
5345         Modified mono_install_remoting_trampoline, which takes the new remoting
5346         trampoline that has a remoting target as parameter.
5347         mono_class_proxy_vtable now also takes a remoting target as parameter, and
5348         will return the most suitable vtable for the target.
5349         Added mono_remote_class_vtable, which returns the vtable of a remote class
5350         (which can be the normal remoting vtable or the xdomain vtable).
5351         
5352         * threads.c: the xdomain invoke and dispatch wrappers must also be
5353         protected against interruptions.
5354
5355 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5356
5357         * icall.c: use memmove in BlockCopyInternal when the source and
5358         destination arrays are the same.
5359
5360 2004-11-09  Martin Baulig  <martin@ximian.com>
5361
5362         * class-internals.h (MonoGenericContainer): Removed `method' and
5363         `signature', replaced them with `is_method' and `is_signature'
5364         flags.  Added `context'.
5365
5366         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
5367         instead of a `MonoGenericContainer *'.
5368
5369         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
5370         for dynamic type parameters.
5371         (mono_metadata_load_generic_params): Setup `container->context'.
5372
5373         * reflection.c (mono_reflection_setup_generic_class): Setup
5374         `tb->generic_container->context'.
5375         (do_mono_reflection_bind_generic_parameters): Use
5376         mono_class_inflate_generic_type() to correctly inflate types,
5377         rather than using our own hack just for MONO_TYPE_VAR.
5378
5379 2004-11-09  Martin Baulig  <martin@ximian.com>
5380
5381         * class.c (mono_class_inflate_generic_method): Small fix; don't
5382         crash here.
5383
5384         * icall.c
5385         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
5386         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
5387         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
5388         (ves_icall_Type_BindGenericParameters): Likewise.
5389         (ves_icall_Type_get_IsGenericInstance): Likewise.
5390         (ves_icall_Type_GetGenericParameterPosition): Likewise.
5391         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
5392         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
5393         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
5394
5395 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
5396
5397         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
5398         assembly versions and public key tokens. Fixes #69113.
5399
5400 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
5401
5402         * metadata.c: fix bug introduced with the type cache changes
5403         on 2004-11-06.
5404
5405 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
5406
5407         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
5408         the MonoClass pointer instead of the token in exception clauses.
5409         * reflection.c: updates for the above and make the code not depend
5410         on the structure of MonoExceptionClause.
5411
5412 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
5413
5414         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
5415         Add support for dynamic assemblies. Fixes #69114.
5416
5417         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
5418
5419 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
5420
5421         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
5422         since most only those methods use it. the code member of
5423         MonoMethodPInvoke was dead, so that can be removed too. Also,
5424         remove inline_count (again, not used), and move slot so that it
5425         can share bits with some other flags. This saves 8 bytes in the
5426         structure and gives us about 50 kb back for mcs helloworld.cs
5427
5428         * *.[ch]: Do naming changes for the above.
5429
5430         * loader.c (mono_method_get_header): Lazily init the header
5431         on first access.
5432         (mono_get_method_from_token): don't init the header here
5433         (mono_free_method): the header may never be allocated
5434
5435         Overall, this saves 150 kb of unmanaged allocations
5436         for mcs helloworld.cs. That accounts for 10% of the unmanaged
5437         memory at runtime.
5438         
5439         * loader.c, loader.h (mono_method_get_header): new accessor.
5440
5441         * *.[ch]: use the above method. Prepares us to lazily load
5442         the header.
5443
5444         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
5445         three warnings, which are actual bugs (see 69206).
5446
5447         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
5448         unused. Saves a cool 4 bytes / method.
5449
5450 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
5451
5452         * metadata.c (builtin_types): Add types for System.Object here.
5453         (mono_metadata_parse_type_full): Cache MonoType*'s that are
5454         for a class or valuetype from klass->this_arg or klass->byval_arg.
5455
5456         On mcs for a hello world, this gets us down from 21836 MonoType's
5457         to 14560.
5458
5459         (mono_metadata_free_type): Account for the above change.
5460
5461 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
5462
5463         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
5464         exception instead of asserting if name is null.
5465         (ves_icall_System_AppDomain_GetData): Ditto.
5466
5467 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
5468
5469         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
5470         EnumBuilder.
5471
5472         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
5473         Return NULL when the domain does not have entry_assembly set.
5474
5475         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
5476         Add a 'resource_modules' argument.
5477         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
5478
5479         * reflection.c (mono_reflection_create_runtime_class): Move setting
5480         of wastypebuilder here, so mono_get_type_object () returns a MonoType
5481         for enums too.
5482
5483         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
5484         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
5485         Throw an ArgumentNullException if 'ptr' is null.
5486
5487         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
5488         assemblies here. Fixes #69020.
5489
5490 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
5491
5492         * reflection.c (build_compressed_metadata): Fix the previous patch for
5493         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
5494         the stack.
5495
5496 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
5497
5498         * assembly.c (mono_assembly_names_equal): Allow a match if one of
5499         the cultures is false. Fixes #69090.
5500
5501         * reflection.c (build_compressed_metadata): Fix invalid memory read 
5502         detected by valgrind.
5503         
5504         * reflection.c (mono_reflection_get_type): Avoid triggering a 
5505         TypeResolve multiple times for the same type. Fixes #65577.
5506
5507 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
5508
5509         * marshal.c: Avoid using ldftn to call managed functions. It is
5510         much slower than just a call.
5511
5512         * reflection.c (mono_module_get_object): free the basename we
5513         allocate here from glib.
5514         
5515         * reflection.c (ensure_runtime_vtable): make sure to free
5516         overrides.  Also, we were allocating an array of MonoMethod not an
5517         array of MonoMethod*.
5518
5519         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
5520
5521         * image.c (mono_image_close): free image->guid here.
5522
5523 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
5524
5525         * reflection.c: Fix some spec conformance issues with the PE file
5526         structures so mcs compiled apps run on the Net 2.0 beta.
5527
5528 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
5529
5530         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
5531         Implement this. Fixes #67264.
5532
5533         * debug-helpers.h debug-helpers.c marshal.c: Move 
5534         mono_find_method_by_name to debug-helpers.c.
5535
5536 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
5537
5538         * object.c (mono_release_type_locks): type_initialization_hash is
5539         a GHashTable.
5540
5541         * reflection.c object.c object-internals.h: Fix warnings.
5542
5543         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
5544         without accessors. Fixes #61561.
5545
5546         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
5547         application base from the root domain if not set. Fixes #65641.
5548         (mono_runtime_init): Fix warning.
5549
5550 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5551
5552         * appdomain.c: call mono_thread_pool_init.
5553         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
5554         of worker threads based on the number of CPUs and the environment
5555         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
5556         for non-windows (windows) systems.
5557
5558 2004-10-27  Chris Toshok  <toshok@ximian.com>
5559
5560         * mono-debug-debugger.c (write_class): don't call mono_class_init
5561         here, as even with the check for (!klass->init_pending), we get
5562         into a situation where we're hitting cycles in class
5563         initialization.  Fixes #68816.
5564
5565 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
5566
5567         * image.c: Avoid overwriting values in the loaded_images_hash when an
5568         assembly is loaded multiple times. Fixes #61152.
5569
5570         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
5571         so multiple satellite assemblies for the same name can be loaded.
5572         Fixes #68259.
5573
5574         * mono_domain_assembly_preload: Actually return the loaded assembly, 
5575         not NULL.
5576
5577         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
5578         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
5579
5580         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
5581         pending finalizers are not invoked after the appdomain has been 
5582         unloaded. Fixes #67862.
5583
5584 2004-10-22  Martin Baulig  <martin@ximian.com>
5585
5586         * mono-debug-debugger.c
5587         (mono_debugger_runtime_invoke): Don't box valuetypes.
5588
5589 2004-10-22  Chris Toshok  <toshok@ximian.com>
5590
5591         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
5592         don't hide private methods.
5593
5594 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
5595
5596         * icall.c: Allows the runtime to "share" (when known) the public key
5597         token of an assembly. This avoid the need to recalculate the token 
5598         (from the public key) in managed code.
5599
5600 2004-10-21  Chris Toshok  <toshok@ximian.com>
5601
5602         * debug-helpers.c (append_class_name): argh, revert last patch.
5603         
5604 2004-10-21  Chris Toshok  <toshok@ximian.com>
5605
5606         * debug-helpers.c (append_class_name): use '+' as the delimiter,
5607         not '/', so that it matches what the debugger uses to look up
5608         methods.
5609
5610 2004-10-21  Martin Baulig  <martin@ximian.com>
5611
5612         * mono-debug-debugger.c (mono_debugger_throw_exception): New
5613         public method; this is called each time an exception is thrown and
5614         allows the debugger to use exception catch points.
5615
5616 2004-10-21  Martin Baulig  <martin@ximian.com>
5617
5618         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
5619         the stack pointer and the exception object in some struct and pass
5620         that to the debugger.
5621
5622 2004-10-21  Chris Toshok  <toshok@ximian.com>
5623
5624         * mono-debug-debugger.c (do_write_class): add instance/static
5625         event support.  We don't expose "raise" or "other" yet.
5626         (event_is_static): new method.
5627
5628 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
5629
5630         * mono-debug-debugger.c
5631         (mono_debugger_handle_exception): Remove
5632         bogus return value for fussy compilers.
5633
5634 2004-10-20  Martin Baulig  <martin@ximian.com>
5635
5636         * mono-debug-debugger.c
5637         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
5638         (mono_debugger_handled_exception): Likewise.
5639
5640 2004-10-20  Martin Baulig  <martin@ximian.com>
5641
5642         * mono-debug-debugger.h (MonoDebuggerEvent): Added
5643         MONO_DEBUGGER_EVENT_EXCEPTION.
5644
5645         * mono-debug-debugger.c (mono_debugger_handle_exception): New
5646         public function to send the debugger a notification for an
5647         exception and inform it about a catch/finally clause.
5648
5649 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
5650
5651         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
5652         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
5653         fix 2.95 build. 
5654
5655         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
5656
5657 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
5658
5659         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
5660         marshalled as [In,Out]. Fixes #58325.
5661
5662 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
5663
5664         * reflection.c (mono_method_body_get_object): Implement some fields.
5665
5666 2004-10-12  Martin Baulig  <martin@ximian.com>
5667
5668         * reflection.c (mono_reflection_bind_generic_parameters): Small
5669         fix, correctly retrieve our parent from a generic instance.
5670
5671 2004-10-12  Martin Baulig  <martin@ximian.com>
5672
5673         * metadata.c (mono_metadata_generic_param_equal): We always have
5674         an owner.
5675
5676         * class.c
5677         (mono_class_from_generic_parameter): We need to have an owner.
5678         (my_mono_class_from_generic_parameter): Likewise.
5679
5680         * reflection.c (mono_reflection_setup_generic_class): Renamed to
5681         mono_reflection_create_generic_class() and added a new
5682         mono_reflection_setup_generic_class().  
5683         (mono_reflection_initialize_generic_param): If we're a nested
5684         generic type and inherited from the containing class, set our
5685         owner to the outer class.
5686
5687 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
5688
5689         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
5690
5691         * reflection.c (mono_method_body_get_object): New function to create
5692         a MethodBody object.
5693
5694         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
5695
5696 2004-10-11  Martin Baulig  <martin@ximian.com>
5697
5698         * metadata.c (_mono_metadata_type_equal): Renamed to
5699         do_mono_metadata_type_equal() and made static.
5700
5701 2004-10-11  Martin Baulig  <martin@ximian.com>
5702
5703         * appdomain.c: Bump corlib version number to 28.
5704
5705 2004-10-10  Martin Baulig  <martin@ximian.com>
5706
5707         * class-internals.h
5708         (MonoGenericInst): Added `MonoGenericContainer *container'.
5709         (MonoGenericMethod): Likewise.
5710         (MonoGenericContext): Likewise.
5711         (MonoGenericParam): Added `MonoGenericContainer *owner'.
5712
5713         * metadata.c
5714         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
5715         (do_mono_metadata_parse_generic_inst): Likewise.
5716         (mono_metadata_parse_type_full): New public method.  This is the actual
5717         mono_metadata_parse_type() implementation - with an additional
5718         `MonoGenericContainer *' argument.
5719         (mono_metadata_parse_array_full): Likewise.
5720         (mono_metadata_parse_signature_full): Likewise.
5721         (mono_metadata_parse_method_signature_full): Likewise.
5722         (mono_metadata_parse_mh_full): Likewise.
5723         (mono_type_create_from_typespec): Likewise.
5724         (mono_metadata_interfaces_from_typedef_full): New public method;
5725         this is similar to the other _full() methods, but we take a
5726         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
5727         (mono_metadata_parse_generic_param): Take an additional
5728         `MonoGenericContainer *' argument and lookup the MonoGenericParam
5729         from that container.
5730         (mono_metadata_generic_param_equal): New static method to compare
5731         two type parameters.
5732         (_mono_metadata_type_equal): New static method; takes an
5733         additional `gboolean signature_only' argument - if true, we don't
5734         compare the owners of generic parameters.
5735         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
5736         with a TRUE argument - do a signature-only comparision.
5737
5738         * loader.c: Use the new _full() methods and pass the
5739         MonoGenericContainer to them.
5740
5741         * object-internals.h (MonoReflectionTypeBuilder): Added
5742         `MonoGenericContainer *generic_container' field.
5743         (MonoReflectionMethodBuilder): Likewise.
5744
5745 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
5746
5747         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
5748         case initial images of dynamic assemblies.
5749
5750         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
5751
5752         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
5753
5754         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
5755         length of event->other array.
5756         (typebuilder_setup_events): Ditto.
5757
5758         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
5759         'assembly_by_name' and add an 'assemblies' list.
5760
5761         * assembly.h assembly.c: Add a new search hook for determining whenever
5762         an assembly is already loaded. Use this instead of searching in the
5763         loaded_assemblies list.
5764
5765         * domain.c appdomain.c: Implement the new search hook so loaded 
5766         assemblies are now scoped by appdomain. Fixes #67727.
5767
5768 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
5769
5770         * threads.c (mono_thread_attach): Initialize synch_lock field so
5771         mono_thread_detach works again.
5772
5773         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
5774         'lib' too. Fixes #63130.
5775
5776 2004-10-06  Jackson Harper  <jackson@ximian.com>
5777
5778         * culture-info-tables.h: regenerated.
5779
5780 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
5781
5782         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
5783         implemented by other interfaces in the result. Fixes #65764.
5784         
5785         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
5786         Handle unloadable modules without crashing.
5787
5788         * image.c (load_modules): Revert the previous patch since modules must
5789         have a fixed index inside the array.
5790         
5791         * image.c (load_modules): Don't include native modules in the modules
5792         array.
5793
5794 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
5795
5796         * reflection.h: Add param_defaults field.
5797
5798         * reflection.c: Add support for parameter defaults in dynamic methods.
5799         Fixes #64595.
5800
5801         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
5802         an empty string when a type has no namespace. Fixes #64230.
5803
5804 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
5805
5806         * tabledefs.h: Added "internal" security actions to support non-CAS
5807         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
5808         Note: they do not seems to be used anymore in 2.0 (new metadata format)
5809
5810 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
5811
5812         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
5813         constructor of abstract class. Fixes #61689.
5814
5815 2004-10-04  Martin Baulig  <martin@ximian.com>
5816
5817         * class-internals.h (MonoGenericContainer): New type.
5818         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
5819         `MonoGenericContainer *generic_container'.
5820         (MonoClass): Replaced `gen_params' and `num_gen_params' with
5821         `MonoGenericContainer *generic_container'.
5822
5823         * metadata.c (mono_metadata_load_generic_params): Return a
5824         `MonoGenericContainer *' instead of a `MonoGenericParam *';
5825         removed the `num' argument.
5826
5827 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
5828
5829         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
5830         for dynamic images.
5831
5832         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
5833         machine fields.
5834
5835         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
5836
5837         * reflection.c: Save pe_kind and machine values into the generated
5838         image file.
5839
5840         * appdomain.c: Bump corlib version number.
5841
5842         * object-internals.h: Reorganize layout of LocalBuilder.
5843
5844         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
5845         New helper function.
5846
5847         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
5848         created MonoType for dynamic types. Fixes #66180.
5849
5850 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
5851
5852         * threadpool.c: the ares hashtable needs a critical section around it.
5853         this prevents some nasty segfaults
5854
5855 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
5856
5857         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
5858         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
5859         bug 67324).
5860         
5861 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
5862
5863         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
5864         
5865 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
5866
5867         * image.c: Always canonicalize image file names, to avoid loading
5868         the same assembly twice when referenced using a relative path.
5869
5870 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
5871
5872         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
5873
5874         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
5875
5876         * marshal.c: Fix warnings.
5877
5878 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
5879
5880         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
5881         attempting to marshal the delegate_trampoline as the method_addr.
5882         This patch has a static hashtable of marshalled delegates so that 
5883         we can map delegate_trampoline addresses back to delegates.  This
5884         allows a delegate passed to managed code to be passed back into native
5885         code.  Fixes #67039
5886
5887 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
5888
5889         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
5890
5891         * reflection.c (method_encode_code): Align method headers properly.
5892         Fixes #66025.
5893
5894 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
5895
5896         * marshal.c: In the runtime invoke wrapper, reset the abort
5897         exception if it is cached. This avoids the automatic rethrowal of 
5898         the exception after the catch of the wrapper. Also check for pending
5899         interruptions before calling the managed method. This is done using
5900         the new method emit_thread_force_interrupt_checkpoint, since the
5901         normal checkpoint method is ignored when running the invoke wrapper.
5902         * object.c: If the abort exception is rethrown, set the abort_exc
5903         field of the thread, so it will be rethrown aftere every catch.
5904         * threadpool.c: Only run an interruption checkpoint if what has been
5905         requested is a stop of the thread (aborts will be ignored).
5906         * threads.c: By default, a thread will now never be interrumped while
5907         running the runtime invoke wrapper (this ensures that runtime_invoke
5908         will always return to the caller if an exception pointer is provided).
5909         There is a new special method mono_thread_force_interruption_checkpoint()
5910         to force an interruption checkpoint even if running a protected
5911         wrapper, which is used by the same runtime invoke wrapper to do a check
5912         at a safe point.
5913
5914 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
5915
5916         * object.c, object-internals.h: Implemented mono_release_type_locks,
5917         which releases the cctor locks held by a thread.
5918         * threads.c, threads.h: In thread_cleanup, release cctor locks held
5919         by a thread. Added mono_thread_exit() method to be used to safely stop
5920         a thread.
5921
5922 2004-09-28  Raja R Harinath  <rharinath@novell.com>
5923
5924         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
5925         Move null check before dereference.  Avoid indexing beyond the end
5926         of the 'modules' array.
5927
5928 2004-09-28  Raja R Harinath  <rharinath@novell.com>
5929
5930         * metadata-internals.h (MonoImage): Add module_count field.
5931         * image.c (load_modules): Set image->module_count.
5932         (mono_image_load_file_for_image): Use image->module_count.
5933         * reflection.c (mono_image_load_module): Append to image->modules array 
5934         of dynamic assembly.
5935         (mono_module_get_object): Fix loop to actually increment index.
5936         Use image->module_count.
5937         * assembly.c (mono_assembly_load_references): Use image->module_count.
5938         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5939         Likewise.
5940
5941 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
5942
5943         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
5944         Avoid assert on generic types.
5945
5946 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
5947
5948         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
5949
5950         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
5951
5952         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
5953         function to convert a MarshalSpec structure to its managed counterpart.
5954
5955         * reflection.c: Fix warnings.
5956         
5957         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
5958         field.
5959
5960         * icall.c (mono_create_icall_signature): Fix build.
5961
5962 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
5963
5964         * icall.c: Add MakePointType icall.
5965
5966         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
5967         warnings.
5968
5969 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5970
5971         * threadpool.c: reuse allocated slots in the queue.
5972
5973 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
5974
5975         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
5976
5977         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
5978
5979         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
5980         previous change.
5981
5982         * tabledefs.h: Add constants for pinvoke attributes BestFit and
5983         ThrowOnUnmappableChar.
5984
5985         * icall.c (ves_icall_Type_GetPacking): New icall.
5986
5987 2004-09-24  Martin Baulig  <martin@ximian.com>
5988
5989         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
5990
5991 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5992
5993         * appdomain.c:
5994         (mono_domain_set): allow setting a domain that is being unloaded.
5995         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
5996         being unloaded.
5997
5998 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
5999
6000         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
6001         the GetCustomAttributes icall.
6002
6003 2004-09-23  Martin Baulig  <martin@ximian.com>
6004
6005         * object-internals.h (MonoReflectionGenericParam): Replaced
6006         'has_ctor_constraint', `has_reference_type' and `has_value_type'
6007         with `guint32 attrs'.
6008
6009 2004-09-23  Martin Baulig  <martin@ximian.com>
6010
6011         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
6012
6013 2004-09-23  Martin Baulig  <martin@ximian.com>
6014
6015         * object-internals.h (GenericParameterAttributes): New enum.
6016
6017 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
6018
6019         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
6020         
6021         * class.c (init_events): Fill out event->other field.
6022
6023         * class.c: Fix warnings.
6024
6025         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
6026
6027 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
6028
6029         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
6030         walk which doesn't supply the IL offset.
6031
6032 2004-09-22  Martin Baulig  <martin@ximian.com>
6033
6034         * reflection.c (mono_reflection_setup_internal_class): If we're
6035         System.ValueType, System.Object or System.Enum, set
6036         `klass->instance_size' and create the vtable.
6037         (mono_reflection_create_internal_class): If we're an enum type,
6038         get the base class from our current corlib.
6039
6040 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
6041
6042         * reflection.h (MonoResolveTokenError): New type.
6043
6044         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
6045         icall.
6046
6047         * icall.c: Add an 'error' argument to the ResolveToken icalls.
6048
6049 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
6050
6051         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
6052         Support also calling constructors, but only for already allocated objects.
6053
6054 2004-09-17  Geoff Norton <gnorton@customerdna.com>
6055
6056         * reflection.c (type_get_qualified_name): If the klass is null
6057         return the typename to avoid a NullRefEx.
6058         (encode_cattr_value): Get the qualified name of the boxed type,
6059         not the underlying enumtype.  Fixes #62984.
6060
6061 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
6062
6063         * marshal.c: Fix problems with previous checkin.
6064
6065 2004-09-21    <vargaz@freemail.hu>
6066
6067         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
6068         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
6069
6070         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
6071
6072 2004-09-21  Geoff Norton <gnorton@customerdna.com>
6073
6074         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
6075         should only return a type for pointers, arrays, and passbyref types.
6076         Fixes bug #63841.
6077
6078 2004-09-21  Martin Baulig  <martin@ximian.com>
6079
6080         * domain.c (mono_debugger_check_runtime_version): New public
6081         function.
6082
6083         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
6084
6085 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
6086
6087         * reflection.c: Added missing sort to the declarative security 
6088         attributes table. MS implementation stops seeing the attributes if the
6089         token number regress in the table (as shown by ildasm and permview).
6090
6091 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
6092
6093         * object-internals.h (MonoReflectionModule): Add 'token' field.
6094         
6095         * reflection.c (mono_reflection_get_token): Add support for Module
6096         and Assembly.
6097         (mono_module_get_object): Set 'token' field.
6098         (mono_module_file_get_object): Set 'token' field.
6099
6100         * icall.c: Add new Assembly and Module icalls.
6101
6102         * appdomain.c: Bump corlib version.
6103
6104 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
6105
6106         * loader.h loader.c class.h class.c: Add helper functions for obtaining
6107         tokens of metadata objects.
6108
6109         * reflection.h reflection.c (mono_reflection_get_token): New function
6110         to obtain the token of a metadata object.
6111
6112         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
6113
6114 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
6115
6116         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
6117         
6118         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
6119
6120 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
6121
6122         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
6123         * object-internals.h: Added 3 MonoArray* members to MonoReflection
6124         AssemblyBuilder to access the permissions set in the class lib.
6125         * reflection.c: Added security attributes encoding step in 
6126         mono_image_build_metadata.
6127         * tabledefs.h: Added new security actions defined in 2.0:
6128         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
6129
6130 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
6131
6132         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
6133         macro parameter.
6134
6135 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
6136  
6137         * locales.c: nullify the ICU_collator member of CompareInfo when it is
6138           finalized. There where random SIGSEVs at program termination, when
6139           an object being finalized was trying to do a string comparison and
6140           the current culture was already finalized.
6141  
6142 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6143
6144         * threads.c: call thread_cleanup before finishing the thread if we get
6145         there.
6146
6147 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
6148
6149         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
6150         assemblies from the parent. Fixes #65665.
6151
6152 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
6153
6154         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
6155         modifiers.
6156
6157 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
6158
6159         * reflection.h: add prototype for mono_get_dbnull_object
6160         * reflection.c: add prototypes for get_default_param_value_blobs 
6161         and mono_get_object_from_blob for fussier compilers
6162
6163 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
6164  
6165         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
6166         false deadlock checks in class initialization.
6167  
6168 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
6169
6170         * image.c (mono_image_addref): Fix comment.
6171
6172         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
6173         possible.
6174
6175 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
6176
6177         * reflection.c (mono_param_get_objects): Modified to return
6178         ParameterInfo.DefaultValue object.
6179
6180         (get_default_param_value_blobs):
6181         (mono_get_object_from_blob):
6182         (mono_get_dbnull_object): New helper routines. 
6183
6184         * object.c (mono_get_constant_value_from_blob): New helper routine
6185         carved out from get_default_field_value ()
6186
6187         * object-internals.h (mono_get_constant_value_from_blob): Added
6188         function declaration.
6189
6190 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
6191
6192         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
6193         referenced assemblies. Fixes #62135.
6194
6195         * exception.h exception.c (mono_get_exception_file_not_found2): New
6196         helper function.
6197
6198 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
6199
6200         * class.h class.c: Add mono_type_get_underlying_type ().
6201
6202 2004-09-09  Geoff Norton <gnorton@customerndna.com>
6203
6204         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
6205         Fix GetTypes() to support dynamically created assemblies.
6206
6207 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
6208
6209         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
6210         
6211         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
6212         previous patch.
6213
6214         * reflection.h reflection.c loader.c: Allow dynamic construction of
6215         pinvoke methods. Fixes #65571.
6216         
6217         * reflection.c (mono_reflection_get_type): Revert previous change since
6218         it causes regressions.
6219
6220 2004-09-08  Martin Baulig  <martin@ximian.com>
6221
6222         * class.c (class_compute_field_layout): Don't call
6223         mono_class_layout_fields() for open generic instances.
6224
6225 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
6226         * threads.c appdomain.c: fix typo in GC macro
6227
6228 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6229
6230         * threads.c: don't call mono_thread_detach() in start_wrapper(),
6231         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
6232
6233 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
6234
6235         * image.c (mono_image_close): Applied patch from 
6236         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
6237         assembly is loaded multiple times from data.
6238         
6239         * image.c (mono_image_open): Fix warning.
6240
6241 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
6242
6243         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
6244         once. Fixes #58334.
6245         
6246         * reflection.c (mono_reflection_create_runtime_class): Initialize
6247         klass->nested_classes. Fixes #61224.
6248
6249 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6250
6251         * threads.c: sched_yield() on exit, to allow threads to quit.
6252
6253 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
6254
6255         * object.c (mono_unhandled_exception): Remove leftover debug code.
6256
6257 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
6258
6259         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
6260
6261 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
6262
6263         * marshal.c (emit_marshal_array): Really null terminate string arrays.
6264         
6265         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
6266
6267 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
6268
6269         * marshal.c (emit_marshal_array): Null terminate string arrays.
6270         
6271         * marshal.c (raise_auto_layout_exception): Fix warning.
6272
6273         * reflection.c (mono_param_get_objects): Initialize the default value
6274         with DBNull.Value, not null. Fixes #62123.
6275
6276 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
6277
6278         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
6279         throw an exception with a cute explanation.
6280
6281 2004-09-06  Dick Porter  <dick@ximian.com>
6282
6283         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
6284         Close the new process's thread handle, as we don't use it.  The
6285         handle stays around forever otherwise.
6286
6287 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
6288
6289         * object.c (arith_overflow): Fix warning.
6290
6291         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
6292         calling conventions in method refs. Fixes #65352.
6293
6294         * reflection.c: Fix warnings.
6295
6296 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
6297
6298         * icall.c: Add a new icall for Array.Clear
6299
6300 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
6301
6302         * object.c: When allocating an array, we have to throw
6303         an overflow exception if any of the lengths are < 0.
6304
6305 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
6306
6307         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
6308         properly. Also move implementation of string array marshalling to 
6309         managed code. Fixes #42316.
6310
6311 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6312
6313         * assembly.c: provide more information when loading an assembly fails.
6314
6315 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6316
6317         * filewatcher.c: don't expect the development fam package to be
6318         installed.
6319
6320 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
6321
6322         * marshal.c: Make a copy of the signature cookie since it will be
6323         freed by the caller.
6324         
6325         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
6326
6327         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
6328
6329         * metadata.c (mono_metadata_free_marshal_spec): New function to free
6330         marshal specs.
6331
6332         * marshal.c: More refactoring.
6333         
6334         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
6335         smaller functions.
6336
6337 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
6338
6339         * object.c: In mono_message_invoke, fill the output parameter array after
6340           calling the managed method (it was done before the call). This fixes
6341           bug #59299.
6342
6343 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
6344
6345         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
6346         as well.
6347
6348 2004-09-02  Martin Baulig  <martin@ximian.com>
6349
6350         * class.c (mono_class_instance_size): Don't allow generic type
6351         definitions or open generic instances.
6352         (mono_class_array_element_size): If we're a value type, call
6353         mono_class_instance_size() on the original class.
6354
6355         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
6356         handle generic instances.
6357
6358         * mono-debug-debugger.c (write_type): Handle generic instances
6359         like classes.
6360
6361 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
6362
6363         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
6364         the allocation request fails. Fixes #65089.
6365
6366         * object.c (mono_runtime_free_method): Do not call mono_free_method.
6367         
6368         * object.c (mono_runtime_free_method): New function to free a dynamic
6369         method.
6370
6371         * marshal.c (mono_delegate_free_ftnptr): New function to free the
6372         delegate trampoline.
6373
6374         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
6375         with hasthis as dynamic,
6376
6377         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
6378
6379         * domain.c (mono_jit_info_table_remove): New function to remove an
6380         entry from the jit info table.
6381
6382         * class-internals.h (MonoMethod): Add 'dynamic' field.
6383
6384         * loader.c: Fix warnings.
6385
6386 2004-09-01  Martin Baulig  <martin@ximian.com>
6387
6388         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
6389         instead of mono_debugger_lock() because the latter one is a no-op
6390         unless running in the debugger.
6391
6392 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
6393
6394         * class.c (class_compute_field_layout): Classes with auto-layout or
6395         reference fields are not blittable.
6396         
6397 2004-09-01  Dick Porter  <dick@ximian.com>
6398
6399         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
6400         mono_image_get_filename() to get the assembly location.
6401
6402         * icall.c:
6403         * metadata.h: Fix compile warnings
6404
6405 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
6406
6407         * class.c (class_compute_field_layout): System.Object is blittable.
6408
6409         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
6410         as in/out. Fixes #59909.
6411
6412 2004-09-01  Martin Baulig  <martin@ximian.com>
6413
6414         * metadata.h (MONO_TYPE_ISREFERENCE): Call
6415         mono_metadata_generic_inst_is_valuetype() if we're a generic
6416         instance to check whether our underlying type is a reference type.
6417
6418 2004-09-01  Martin Baulig  <martin@ximian.com>
6419
6420         * metadata.c (mono_type_size): If we're a generic instance, call
6421         mono_class_value_size() for value types.
6422
6423 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
6424
6425         * marshal.c: Implement more custom marshalling functionality. Fixes
6426         #64915.
6427
6428 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
6429
6430         * mono-debug.c, debug-mono-symfile.c: add some locking love.
6431
6432 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
6433
6434         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
6435
6436         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
6437
6438         * icall.c: Fix some warnings.
6439
6440         * threads.c (abort_appdomain_thread): Fix unref errors.
6441         (mono_thread_current): Fix THREAD_DEBUG define.
6442
6443 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
6444
6445         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
6446
6447         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
6448
6449 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
6450
6451         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
6452         string arrays.
6453
6454 2004-08-28  Martin Baulig  <martin@ximian.com>
6455
6456         * metadata.c
6457         (mono_metadata_generic_inst_is_valuetype): New public function.
6458
6459         * metadata.h (MONO_TYPE_ISSTRUCT): Call
6460         mono_metadata_generic_inst_is_valuetype() if we're a generic
6461         instance to check whether our underlying type is a valuetype.
6462
6463 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
6464
6465         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
6466         #63768.
6467
6468 2004-08-25  Martin Baulig  <martin@ximian.com>
6469
6470         * loader.c (mono_get_method_from_token): Abstract methods can also
6471         be generic and thus have type parameters.
6472
6473         * metadata-internals.h
6474         (MonoDynamicImage): Added `GPtrArray *gen_params'.
6475
6476         * reflection.c (mono_image_get_generic_param_info): Don't create a
6477         metadata row, just add an entry to the `gen_params' array.
6478         (build_compressed_metadata): Sort the `gen_params' array and then
6479         actually create the metadata.
6480
6481 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6482
6483         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
6484
6485 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
6486
6487         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
6488
6489 2004-08-24  Martin Baulig  <martin@ximian.com>
6490
6491         * class.cs (mono_class_is_subclass_of): Like an interface, a
6492         generic instance also derives from System.Object.
6493
6494 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
6495
6496         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
6497         custom modifiers to be in any order. Fixes #61990.
6498
6499 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
6500
6501         * object.c: Register mono_object_new_fast icall.
6502         
6503         * object.c (mono_class_get_allocation_ftn): Return to calling
6504         mono_object_new_fast, since it seems faster to compute the object 
6505         size in unmanaged code than passing it as a parameter.
6506
6507         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
6508
6509         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
6510         this function with Boehm as the oom handler, so we don't have to check
6511         the result of GC_malloc.
6512
6513         * object.c: Remove checks for oom.
6514
6515         * object.h object.c (mono_class_get_allocation_ftn): New function to
6516         return the icall which can be used to allocate an instance of a given
6517         class. 
6518
6519         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
6520
6521         * class-internals.h: Add 'enabled' field.
6522
6523 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
6524
6525         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
6526
6527 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
6528         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
6529         value 0x0010.
6530
6531 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
6532
6533         * appdomain.c: use the Tls function for appdomain too,
6534         at Zoltan's request. Actually return in mono_context_get
6535
6536         * appdomain.c, profiler.c, threads.c: use __thread
6537
6538 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
6539
6540         * appdomain.c threads.c: Call GC_CreateThread on windows.
6541
6542         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
6543         multiple libraries since this don't work on windows.
6544
6545 2004-08-18  Martin Baulig  <martin@ximian.com>
6546
6547         * class-internals.h
6548         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
6549         MonoMethodHeader.
6550
6551         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
6552         MonoMethodNormal since we also need it for abstract and interface
6553         methods.
6554
6555         * reflection.c
6556         (build_compressed_metadata): Sort the GenericParam table.
6557         (mono_image_create_token): Added `gboolean create_methodspec'
6558         argument; this is false when generating a MethodImpl token.
6559         (reflection_methodbuilder_to_mono_method): Abstract and interface
6560         methods may also have generic parameters.
6561
6562 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
6563
6564         * appdomain.c: thread local alloc
6565
6566 2004-08-17  Martin Baulig  <martin@ximian.com>
6567
6568         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
6569
6570         * icall.c
6571         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
6572         argument.
6573
6574         * class.c (mono_type_get_full_name): New public function.
6575         (mono_type_get_name): Don't include the type arguments.
6576
6577 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
6578
6579         * Makefile.am: Build static versions of libmetadata and libmonoruntime
6580         for inclusion into the mono executable.
6581
6582 2004-08-16  Martin Baulig  <martin@ximian.com>
6583
6584         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
6585         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
6586
6587 2004-08-14  Martin Baulig  <martin@ximian.com>
6588
6589         * class.c (dup_type): Also copy the `byref' field.
6590
6591 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
6592
6593         * reflection.c (create_dynamic_mono_image): Revert the last change 
6594         since it breaks bootstrap.
6595
6596 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
6597
6598         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
6599
6600         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
6601         not free them with g_free.
6602
6603 2004-08-11  Martin Baulig  <martin@ximian.com>
6604
6605         * reflection.c (mono_reflection_setup_internal_class): Also call
6606         mono_class_setup_mono_type() if we already have a `tb->type.type'.
6607
6608 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
6609
6610         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
6611         called during default (first) AppDomain creation. Keep track of
6612         Evidence when loading assemblies.
6613
6614 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
6615
6616         * opcodes.c, opcodes.h: reduce runtime relocations.
6617
6618 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
6619
6620         * culture-info.h, locales.c: fixes and chages to sue the new
6621         optimized format of the locale data.
6622         * culture-info-tables.h: regenerated.
6623
6624 2004-08-06  Geoff Norton <gnorton@customerdna.com>
6625         
6626         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
6627
6628 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
6629
6630         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
6631         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
6632         * domain-internals.h: icall declaration.
6633         * icall.c: icall registration.
6634         * object-internals.h: New fields in MonoAssembly for CAS.
6635
6636 2004-08-05  Duncan Mak  <duncan@ximian.com>
6637
6638         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
6639         CEE_LDELEM_ANY.
6640
6641 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
6642
6643         * reflection.c: fix to deal with object[] arrays in custom ctors
6644         (bug #62550).
6645
6646 2004-08-05  Martin Baulig  <martin@ximian.com>
6647
6648         * class.c (mono_class_array_element_size): Added support for
6649         generic instances and correctly handle "recursive" types.
6650
6651 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
6652
6653         * assembly.c: Fix warnings.
6654
6655 2004-08-04  Martin Baulig  <martin@ximian.com>
6656
6657         * class.c
6658         (mono_type_get_name_recurse): Added `gboolean include_arity'
6659         argument specifying whether or not we should include the generic
6660         arity in the type name.
6661         (_mono_type_get_name): New static function.
6662         (mono_class_setup_vtable): If we're a generic instance, don't
6663         include the generic arity in the names of explicit method
6664         implementations.        
6665
6666 2004-08-03  Martin Baulig  <martin@ximian.com>
6667
6668         * class.c (mono_type_get_name_recurse): Enclose the generic type
6669         arguments in `<', '>'.
6670
6671 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6672
6673         * gc.c: make GC warning messages use the trace API, they are just
6674         noise to most of the users.
6675
6676 2004-08-03  Martin Baulig  <martin@ximian.com>
6677
6678         * debug-mono-symfile.c (read_string): Correctly read the string.
6679
6680 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
6681
6682         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
6683         
6684         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
6685         icalls.
6686         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
6687
6688 2004-07-30  Martin Baulig  <martin@ximian.com>
6689
6690         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
6691         Reflect latest symbol writer changes.   
6692
6693 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
6694
6695         * object.c: always create an object if null is passed
6696         to Invoke() where a valuetype is expected.
6697
6698 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
6699
6700         * marshal.c (mono_marshal_init): make managed
6701         signatures match native ones better for 64bits.
6702
6703 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6704
6705         * appdomain.c: hack to build correctly the private bin path on windows.
6706         Fixes bug #61991.
6707
6708 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
6709
6710         * assembly.c: Load mscorlib from the correct framework directory
6711           (mono/<version>/mscorlib.dll).
6712         * appdomain.h: Added prototypes for new functions.
6713         * internals.h: Added some prototypes.
6714         * domain.c: When initializing the runtime, get from the executable and
6715           the configuration files the runtime version that the app supports.
6716           Added support methods for reading app.exe.config. Added list of versions
6717           supported by the JIT. Added two new methods: mono_init_from_assembly,
6718           which initializes the runtime and determines the required version from
6719           the provided exe file, and mono_init_version, which initializes
6720           the runtime using the provided version.
6721         * icall.c: Get machine.config from version-specific directory.
6722         * reflection.c: When generating an image, embed the version number
6723           of the current runtime.
6724
6725 2004-07-28  Dick Porter  <dick@ximian.com>
6726
6727         * socket-io.c
6728         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
6729         returned sockaddr size before creating the remote address object.
6730         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
6731         61608.
6732
6733 2004-07-28  Dick Porter  <dick@ximian.com>
6734
6735         * locales.c (string_invariant_compare_char): Fix invariant char
6736         compares between upper and lower cases.  Fixes bug 61458.
6737
6738 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
6739         
6740         * marshal.c: actually cache stelem.ref wrappers.
6741         
6742 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
6743
6744         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
6745         sections and remove the mono_cli_rva_map () function.
6746
6747 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
6748
6749         * debug-mono-symfile.c: fix one more endianess issue, from a patch
6750         by Geoff Norton (<gnorton@customerdna.com>).
6751
6752 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6753
6754         * class.c: fix class loads for pointer types (typeof(int) !=
6755         typeof(int*)).
6756
6757 2004-07-27  Martin Baulig  <martin@ximian.com>
6758
6759         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
6760         reading the debugging information from an external ".mdb" file.
6761
6762 2004-07-24  Martin Baulig  <martin@ximian.com>
6763
6764         * reflection.c (mono_image_get_type_info): Only write a class
6765         layout entry if we actually have a size or a packing size.
6766
6767 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
6768
6769         * reflection.c (type_get_fully_qualified_name): 
6770         insert cast to get type checking of ?: with non-gcc compilers
6771
6772 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
6773
6774         * rand.c: use g_getenv for both lookups of
6775         MONO_EGD_SOCKET
6776
6777 2004-07-17  Martin Baulig  <martin@ximian.com>
6778
6779         * reflection.c (mono_reflection_bind_generic_method_parameters):
6780         Set `gmethod->reflection_info'.
6781
6782 2004-07-17  Martin Baulig  <martin@ximian.com>
6783
6784         * class.c (mono_class_create_from_typedef): Insert the newly
6785         created class into the hash table before computing the interfaces
6786         since we could be called recursively.
6787
6788 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
6789
6790         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
6791         function to implement stelem.ref in managed code
6792         * class-internals.h, debug-helpers.c: a new wrapper type
6793         for the above.
6794
6795 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
6796
6797         * gc.c: allow GC handles to work even when no GC is compiled in.
6798         Fix part of bug #61134 (GetAddrOfPinnedObject).
6799
6800 2004-07-13  Peter Williams  <peter@newton.cx>
6801  
6802         * process.c (complete_path): Make sure we don't attempt to execute
6803         directories.
6804  
6805 2004-07-12  Geoff Norton <gnorton@customerdna.com>
6806
6807         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
6808           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
6809           and will add/subtract the hour if needed
6810
6811 2004-07-12  Martin Baulig  <martin@ximian.com>
6812
6813         * reflection.c (mono_field_get_object): If we have
6814         `field->generic_info', take the attributes from
6815         `field->generic_info->generic_type'.    
6816
6817 2004-07-12  Martin Baulig  <martin@ximian.com>
6818
6819         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
6820         This function must be called before initializing the runtime.
6821         (mono_debug_init_1): New function; call this after initializing
6822         the runtime, but before loading the assembly.  It tells the
6823         debugger to load corlib and the builtin types.
6824
6825         * mono-debug-debugger.c: Did some larger changes in the debugging
6826         code; support recursive class declarations, make sure we actually
6827         add all classes.
6828
6829 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6830
6831         * debug-helpers.c: undo my previous patch and fixed the real issue in
6832         ../mini/exceptions-x86.c
6833
6834 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6835
6836         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
6837         when no HOME env. variable was set and a NullRef was thrown in a .cctor
6838         called from other .cctors.
6839
6840 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
6841
6842         * loader.c: Removed the mono_loader_wine_init hack now that we are
6843         doing a managed version of Windows.Forms.
6844
6845 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
6846
6847         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
6848         threadpool.c, threads.c: remove static data from rootset.
6849
6850 2004-07-09  Dick Porter  <dick@ximian.com>
6851
6852         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
6853         Don't do any more processing if the matched length was 0.  It was
6854         increasing the size of the string before.  Fixes bug 61167.
6855
6856 2004-07-09  Dick Porter  <dick@ximian.com>
6857
6858         * socket-io.h:
6859         * socket-io.c
6860         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6861         Add support for SO_PEERCRED if its available.
6862
6863 2004-07-09  Peter Bartok <pbartok@novell.com>
6864         * loader.c: winelib.exe.so error message is now only displayed if
6865         MONO_DEBUG is set. To help us avoid questions when people are trying
6866         out the new Managed.Windows.Forms.
6867
6868 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
6869
6870         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
6871         for isinst and castclass wrappers.
6872
6873         * class-internals.h icall.c: Move registration and lookup of JIT icalls
6874         to libmetadata from the JIT, so they could be used by the marshalling
6875         code and the interpreter.
6876
6877         * marshal.c: Register marshalling related JIT icalls here instead of
6878         in mini.c. Use CEE_MONO_ICALL instead of the family of 
6879         CEE_MONO_PROC<x> opcodes to call marshalling functions.
6880
6881         * metadata.h: Remove unneeded marshalling conversions.
6882
6883         * opcodes.c: Update for new opcodes.
6884         
6885 2004-07-08  Martin Baulig  <martin@ximian.com>
6886
6887         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
6888         (mono_debug_get_domain_data): Make this function static.
6889
6890 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
6891
6892         * gc.c, object.h: add nice GC handle API for embedders.
6893
6894 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
6895
6896         * reflection.c: more changes for the new api
6897
6898         * object.c: When we reflect on a field w/ a constant value, it
6899         will not have a memory location, so we must access metadata. Also,
6900         allow easier reading of strings so that we can read them from
6901         the constant data.
6902
6903         * class.c (mono_class_layout_fields): no need for literal fields here.
6904
6905         * class-internals.h: api changes for const fields
6906
6907         * icall.c (ves_icall_get_enum_info): use new apis for const fields
6908
6909 2004-07-06  Martin Baulig  <martin@ximian.com>
6910
6911         * mono-debug.h: Increment version number to 44.
6912
6913         * mono-debug.c (mono_debug_add_wrapper): The second argument is
6914         now a gpointer, rewrote this whole method.
6915
6916         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
6917         function.  Add information about the wrapper in a new "misc table".
6918
6919         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
6920         for the new misc table.
6921
6922 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
6923
6924         * metadata-internals.h image.c: Add a cache for helper signatures.
6925
6926         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
6927
6928 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
6929
6930         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
6931         delegates from a delegate. Fixes #61033.
6932         
6933         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
6934         marshalling of stringbuilder arrays. Fixes #59900.
6935
6936 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
6937
6938         * icall.c: Add EnumBuilder:setup_enum_type icall.
6939
6940 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
6941
6942         * icall.c: Added a new icall for the property version of
6943         OffsetOfStringData.
6944
6945 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
6946
6947         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
6948         it has a constant size across platforms.
6949
6950         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
6951         stack trace.
6952
6953 2004-06-29  Martin Baulig  <martin@ximian.com>
6954
6955         * mono-debug.c (mono_debug_add_method): Protect the whole function
6956         in mono_debugger_lock(), not just parts of it.
6957
6958 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6959
6960         * reflection.c: make sure padding bytes in heaps are zeroed.
6961
6962 2004-06-24  David Waite  <mass@akuma.org>
6963
6964         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
6965         image.c, loader.c, locales.c, marshal.c, metadata.c,
6966         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
6967         string-icalls.c, threads.c: change to C90-style comments from C99 /
6968         C++ -style
6969
6970 2004-06-24  Dick Porter  <dick@ximian.com>
6971
6972         * threads.c
6973         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
6974         return createdNew.  Fixes bug 60412.
6975
6976         * threads-types.h: 
6977         * icall.c: Add createdNew parameter to CreateMutex icall
6978
6979 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
6980
6981         * reflection.c, object-internals.h: save default value in params.
6982
6983 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6984
6985         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
6986         no need to build a new path combining that with the application base.
6987         Fixes bug #60442.
6988
6989 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
6990
6991         * reflection.c: fixed minor standard compliance issues.
6992
6993 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
6994
6995         * reflection.c: fixed issue with encoding some custom attributes
6996         (arrays in properties and fields, bug #60411).
6997
6998 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6999
7000         * reflection.c: fix start address when copying the public key token.
7001
7002 2004-06-23  Martin Baulig  <martin@ximian.com>
7003
7004         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
7005         the `exc' object in a static object to put it into the GC's root set.
7006
7007 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
7008
7009         * reflection.c: make mono_reflection_setup_internal_class ()
7010         callable a second time to setup a new parent class.
7011
7012 2004-06-23  Dick Porter  <dick@ximian.com>
7013
7014         * threads.c: Check for WAIT_IO_COMPLETION return values.
7015
7016 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
7017
7018         * appdomain.c: Removed the g_free on the public key token. Now copy 
7019         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
7020         * assembly.c: Added public key token string value when loading 
7021         assemblies. Fix bug #60439.
7022         * icall.c: Added missing informations (like public key) in 
7023         GetReferencedAssemblies. Fix #60519.
7024         * image.h: Changed definition for public key token from const char*
7025         public_tok_value to guchar public_key_token [17];
7026         * reflection.c: Updated for changes to public key token.
7027
7028 2004-06-22  Lluis Sanchez Gual
7029
7030         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
7031         for the field in base classes.
7032
7033 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
7034
7035         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
7036         mark headers as not supported, they are installed only for use by the
7037         debugger.
7038
7039 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
7040
7041         * *.c, *.h: avoid namespace pollution in public headers.
7042
7043 2004-06-21  Martin Baulig  <martin@ximian.com>
7044
7045         * exception.c (mono_get_exception_security): It's in
7046         "System.Security", not in "System".
7047
7048         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
7049         the exception classes.
7050
7051 2004-06-21  Martin Baulig  <martin@ximian.com>
7052
7053         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
7054         Protect the exception object from being finalized.
7055
7056 2004-06-21  Martin Baulig  <martin@ximian.com>
7057
7058         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
7059         public function.
7060
7061 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
7062
7063         * reflection.c: Load the assembly in mono_reflection_type_from_name,
7064         if it was not loaded before. Fix parts of #60439.
7065
7066 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
7067
7068         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
7069         code that was broken since Ben's change: wrappers are now
7070         dependent on the method signature only again.
7071
7072 2004-06-21  Martin Baulig  <martin@ximian.com>
7073
7074         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
7075         added interface support.
7076
7077 2004-06-21  Martin Baulig  <martin@ximian.com>
7078
7079         * class.c (mono_vtable_get_static_field_data): New public method.
7080
7081 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
7082
7083         * filewatcher.c : Windows build fix to be compliant with API changes.
7084
7085 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7086
7087         * class.h, class.c: more accessors.
7088         * metadata.h, metadata.c: prepare for hiding MonoType and
7089         MonoMethodSignature: people should use the accessors from now on
7090         outside of the tree.
7091
7092 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7093
7094         * *.c, *.h: more API cleanups.
7095
7096 2004-06-18  Jackson Harper  <jackson@ximian.com>
7097
7098         * assembly.c: Trace loading assemblies.
7099         * loader.c: Trace loading native libraries.
7100         * mono-config.c: Trace loading config files.
7101         
7102 2004-06-18  Dick Porter  <dick@ximian.com>
7103
7104         * locales.c: Tell ICU the lengths of strings, it can cope with
7105         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
7106
7107 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
7108
7109         * image.c: swapped name/filename;
7110
7111 2004-06-18  Martin Baulig  <martin@ximian.com>
7112
7113         * mono-debug-debugger.c (write_class): Write the parent class at
7114         the end of the header.
7115
7116 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7117
7118         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
7119
7120 2004-06-17  Raja R Harinath  <rharinath@novell.com>
7121
7122         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
7123         (bundle_obj): New conditional define.
7124         (BUILT_SOURCES): Remove.
7125         ($(bundle_srcs)): Make parallel-make safe.
7126         (libmonoruntime_la_LIBADD): Make unconditional.
7127         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
7128         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
7129
7130 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
7131
7132         * culture-info-tables.h: It was inconsistent with the latest
7133           supp info files.
7134
7135 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
7136
7137         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
7138         be loaded.
7139
7140         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
7141         with gcc 2.95.
7142
7143 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7144
7145         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
7146         cleaned up public header threads.h.
7147
7148 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
7149
7150         * Makefile.am, *.c, *.h: more API cleanups.
7151
7152 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
7153
7154         * Makefile.am: removed monosn from compilation.
7155         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
7156         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
7157         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
7158         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
7159         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
7160         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
7161
7162 2004-06-15  Jackson Harper  <jackson@ximian.com>
7163
7164         * assembly.c: Make locales lower case when searching the GAC for
7165         assemblies. gacutil will always make locales lowercase when
7166         installing so this effectively makes them case insensitive.
7167         
7168 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
7169
7170         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
7171         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
7172           parameter which allows to choose whether the wait can be interrupted or 
7173           not. Also added the method mono_monitor_enter(), which locks the monitor
7174           using an infinite wait and without allowing interruption.
7175           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
7176           interrupted.
7177         * object.h: Added new fields in MonoThread. suspend_event holds the event
7178           used to susped/resume the thread. synch_lock is the lock object to use for
7179           modifying the thread state.
7180         * threads.c: Use the new synch_lock object for locking, instead of "this",
7181           which can generate deadlocks.
7182           Moved thread state change in Thread.Sleep and Thread.Join from managed
7183           to unmanaged code. This avoids a deadlock when the thread was suspended
7184           just after acquiring the thread lock.
7185           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
7186           Implemented Thread.Suspend using an event instead of ThreadSuspend,
7187           which is not fully implemented in the io-layer.
7188         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
7189
7190 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
7191
7192         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
7193         threads-types.h: more API cleanups.
7194
7195 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7196
7197         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
7198         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
7199         threadpool.c, threads.c: first pass at the exported API cleanup.
7200
7201 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
7202
7203         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
7204
7205 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7206
7207         * icall.c: added internalGetHome.
7208
7209 2004-06-14  Dick Porter  <dick@ximian.com>
7210
7211         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
7212         possible to return successfully when '.' or '..' were the only
7213         entries in a directory, but were skipped.  The MonoIOStat was not
7214         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
7215         Fixes bug 59574.
7216
7217 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7218
7219         * reflection.c: make binaries run on .Net 1.1 by default.
7220
7221 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
7222
7223         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
7224
7225 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
7226
7227         * marshal.c: keep track of struct size with explicit layout
7228         (bug #59979).
7229
7230 2004-06-12  Martin Baulig  <martin@ximian.com>
7231
7232         * mono-debug-debugger.c: Comment out a debugging g_message().
7233
7234 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
7235
7236         * reflection.c, reflection.h: do not free custom attrs that are cached.
7237         * icall.c: use braces to make code clearer.
7238
7239 2004-06-11  Martin Baulig  <martin@ximian.com>
7240
7241         * class.h (MonoInflatedField): New type.
7242         (MonoClassField): Replaced `MonoType *generic_type' with
7243         `MonoInflatedField *generic_info'.
7244
7245         * icall.c
7246         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
7247
7248 2004-06-11  Martin Baulig  <martin@ximian.com>
7249
7250         * reflection.c (mono_image_create_method_token): Correctly encode
7251         varargs methods.
7252
7253 2004-06-11  Martin Baulig  <martin@ximian.com>
7254
7255         * metadata.c (mono_metadata_parse_method_signature): When parsing
7256         a MethodDef which has VarArgs, also set sentinelpos if we don't
7257         have any parameters.
7258
7259 2004-06-11  Martin Baulig  <martin@ximian.com>
7260
7261         * verify.c (mono_method_verify): In CEE_CALL, use
7262         mono_method_get_signature() to get the method's signature, unless
7263         we're a PInvoke method.
7264
7265 2004-06-10  Jackson Harper  <jackson@ximian.com>
7266
7267         * assembly.c: Use <path>/lib/mono/gac for the extra paths
7268         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
7269         logical name as the supplied path is just a prefix to the gac not
7270         the direct path to it.
7271         
7272 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
7273
7274         * reflection.c: make the token for a created method match
7275         the token of the MethodBuilder it was created from
7276         (IKVM requires this behaviour now).
7277
7278 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
7279
7280         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
7281         reflection.c, socket-io.c: leak fixes.
7282
7283 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
7284
7285         * icall.c: handle sentinel pos in vararg methods in position different
7286         from 0.
7287
7288 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7289
7290         * culture-info-tables.h: freshly generated.
7291
7292 2004-06-09  Martin Baulig  <martin@ximian.com>
7293
7294         * loader.c (mono_get_method_constrained): Call `mono_class_init
7295         (constrained_class)'.   
7296
7297 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
7298
7299         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
7300         any methods. Fixes #59629.
7301
7302 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
7303
7304         * culture-info-tables.h: reflecting locale-builder updates.
7305
7306 2004-06-08  Dick Porter  <dick@ximian.com>
7307
7308         * object.h:
7309         * locales.c: Fixed compile warnings, including a real bug in
7310         CompareInfo_internal_compare.
7311         
7312 2004-06-08  Dick Porter  <dick@ximian.com>
7313
7314         * locales.c
7315         (ves_icall_System_Globalization_CompareInfo_internal_index):
7316         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
7317         Double-check the resuls of usearches, because ICU currently
7318         ignores most of the collator settings here.  Fixes bug 59720.
7319         
7320 2004-06-08  Dick Porter  <dick@ximian.com>
7321
7322         * locales.c
7323         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
7324         Fix memory leak and segfault-causing typo.  No idea how this one
7325         lasted so long without being noticed.
7326
7327 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
7328
7329         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
7330         any methods. Fixes #59629.
7331
7332 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7333
7334         * assembly.c:
7335         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
7336         own the critical section before). Removed dead code (that's done
7337         in the preload hook).
7338
7339         (mono_assembly_load_with_partial_name): call the preload hook.
7340
7341 2004-06-08  Martin Baulig  <martin@ximian.com>
7342
7343         * metadata.c (mono_metadata_signature_alloc): Default
7344         `sentinelpos' to -1.
7345
7346         * reflection.c (mono_image_get_array_token): Likewise.
7347
7348 2004-06-08  Martin Baulig  <martin@ximian.com>
7349
7350         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
7351
7352         * metadata.c (mono_metadata_parse_method_signature): When parsing
7353         a MethodDef which has VarArgs, set sentinelpos.
7354
7355         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
7356         `gint16' since we're using -1 for non-varargs methods.
7357
7358         * reflection.c
7359         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
7360         (method_encode_signature): Added varargs support.
7361         (method_builder_encode_signature): Likewise.
7362         (mono_image_get_varargs_method_token): New static method.
7363         (mono_image_create_method_token): New public method; this is
7364         called via an icall instead of mono_image_create_token() when
7365         calling a varargs method.       
7366
7367 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
7368
7369         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
7370
7371 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
7372
7373         * culture-info-tables.h : Reflecting the latest locale-builder that
7374           fixed empty array representation ({} to {0}).
7375
7376 2004-06-07  Jackson Harper  <jackson@ximian.com>
7377
7378         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
7379         looking up extra gac paths. This allows MONO_GAC_PATH to act
7380         exactly like a prefix.
7381         
7382 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
7383
7384         * reflection.c (mono_reflection_type_from_name): Make a copy of the
7385         type name before modifying it. Fixes #59405.
7386
7387 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
7388
7389         * culture-info.h: added fields for "all datetime patterns".
7390         * locales.c: (  ves_icall_System_Globalization_CultureInfo
7391           _construct_datetime_format ()): fill xxx_patterns fields.
7392         * object.h: added fields for "all datetime patterns" to
7393           MonoDateTimeFormatInfo.
7394         * culture-info-tables.h: reflecting locale-builder updates.
7395
7396 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
7397
7398         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
7399         the event has no add and remove methods. Fixes #59629.
7400
7401 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
7402
7403         * object.c: Fixed possible integer overflow when allocating large
7404         strings.
7405
7406 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
7407
7408         * culture-info-tables.h: reflecting locale-builder updates.
7409
7410 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
7411
7412         * culture-info-tables.h: reflecting locale-builder updates.
7413
7414 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
7415
7416         * culture-info-tables.h: reflecting locale-builder updates.
7417
7418 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
7419
7420         * threads.c: Made Thread.Sleep abortable.
7421
7422 2004-06-02  Martin Baulig  <martin@ximian.com>
7423
7424         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
7425
7426         * debug-mono-symfile.h: Bumped symbol file version number to 37.
7427
7428 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
7429
7430         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
7431
7432 2004-05-30  Jackson Harper  <jackson@ximian.com>
7433
7434         * reflection.c: Do not hardcode assembly versions or public key
7435         tokens anymore. All of this except the corlib section was dead
7436         code anyways.
7437         
7438 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
7439
7440         * object.c (mono_runtime_invoke_array): Automatically create boxed
7441         objects for byref valuetypes if needed. Fixes #59300.
7442         
7443         * object.c (mono_method_return_message_restore): Handle 
7444         MONO_TYPE_OBJECT as well.
7445
7446 2004-05-28  Jackson Harper  <jackson@ximian.com>
7447
7448         * reflection.c: The modified type encoding was causing build
7449         problems. Reverted for now.
7450         
7451 2004-05-28  Jackson Harper  <jackson@ximian.com>
7452
7453         * reflection.c/h: Take an assembly ref so that we dont create
7454         fully qualified names when encoding types in the same assembly as
7455         the custom attribute being emitted.
7456         * appdomain.c: Increment version number.
7457         
7458 2004-05-26  Duncan Mak  <duncan@ximian.com>
7459
7460         * icall.c
7461         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
7462         Set the full version number (major, minor, build, revision).
7463
7464 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
7465
7466         * marshal.c (emit_struct_conv): increment src/dst after blit
7467         (mono_marshal_get_managed_wrapper,
7468         mono_marshal_get_native_wrapper): make sure we have marshalling
7469         info before marshalling params (info computation affects
7470         blittable)
7471
7472         * class.c (class_compute_field_layout): correctly deal with
7473         blittable
7474         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
7475         value types (as per what windows dows by default)
7476         (mono_class_setup_mono_type): System.ValueType is blittable
7477         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
7478         blittable
7479
7480         * marshal.c (mono_marshal_load_type_info): flag types  as
7481         non-blittable if the native layout doesn't match the managed
7482         layout
7483
7484 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7485
7486         * appdomain.c: don't add stuff in the private search path that is
7487         above the application base. If application base is not set, there's
7488         no private search path.
7489
7490 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
7491
7492         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
7493         byref struct arguments in native->managed marshalling.
7494
7495 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
7496
7497         * marshal.c (mono_marshal_get_runtime_invoke): correctly
7498         cache methods using signature (special case for methods
7499         that are value type or string class)
7500         
7501         * image.c (mono_image_close): clean up allocated GSList's
7502         in runtime_invoke_cache.
7503
7504 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7505
7506         * mono-config.c: set the correct path for mono_cfg_dir on windows when
7507         there's no MONO_CFG_DIR environment variable defined.
7508
7509 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7510
7511         * threads.c: windows version must be >= 0x0500 to include OpenThread.
7512
7513 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
7514
7515         * threadpool.c: Really wait for 500ms after the async call, even if the wait
7516           is interrumped.
7517         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
7518           before waiting for it, and call CloseHandle after the wait to unref it.
7519           This will make sure that handles are not disposed too early.
7520
7521 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7522
7523         * appdomain.c:
7524         * appdomain.h:
7525         * icall.c: removed
7526         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
7527         needed now.
7528
7529         * object.c: se the application_base only for the domain that runs
7530         Main. Fixes bug #59216,
7531
7532 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7533
7534         * appdomain.c:
7535         * object.c: only the domain in which Main is run have
7536         SetupInformation.ConfigurationFile set, so moved a few lines from
7537         appdomain.c to object.c.
7538
7539 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7540
7541         * appdomain.c: we tried to load [name].(dll|exe), but according
7542         to bug #57710, we must also try [culture]/[name].(dll|exe) and
7543         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
7544         There's a test case attached to bug #58922.
7545
7546 2004-05-27  Dick Porter  <dick@ximian.com>
7547
7548         * icall.c:
7549         * file-io.c: Implemented icalls for locking and unlocking regions
7550         in a file.
7551         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
7552         FALSE on error (fixes both compiler warning and real bug.)
7553
7554 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
7555
7556         * culture-info-tables.h: reflecting locale-builder updates.
7557
7558           (Added missing ChangeLog entry for 05/26)
7559
7560 2004-05-27  Jackson Harper  <jackson@ximian.com>
7561
7562         * locales.c: Fix some cut and paste errors.
7563         
7564 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7565
7566         * mono-config.c: set the correct path for config. directory on windows.
7567
7568 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
7569
7570         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
7571           on win32.
7572
7573 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
7574
7575         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
7576         from pinvoke functions.
7577         
7578         * marshal.c (mono_ftnptr_to_delegate): Implement this.
7579
7580 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
7581
7582         * culture-info-tables.h: reflecting locale-builder updates.
7583
7584 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
7585
7586         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
7587         #59086.
7588
7589 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
7590
7591         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
7592         * icall.c: Modified icalls for RNG.
7593         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
7594         Windows (CryptoAPI).
7595
7596 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
7597
7598         * locales.c: Fix build.
7599
7600 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
7601
7602         * culture-info-tables.h: reflecting locale-builder updates.
7603
7604 2004-05-25  Jackson Harper  <jackson@ximian.com>
7605
7606         * locales.c: When creating the current culture use the $LANGs
7607         specific culture. So DateTimeFormat and NumberFormat entries are created.
7608         
7609 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
7610
7611         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
7612         a char array as parameter.
7613
7614 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
7615
7616         * image.c: In mono_image_open(), always use an absolute path name to
7617           look for already loaded images.
7618
7619 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
7620
7621         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
7622         missing in the windows build (like older cygwin include files).
7623
7624 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
7625
7626         * icall.c: Fixed check for possible integer overflow in Buffer_
7627         BlockCopy icall. Replaced comments style // by /* */.
7628
7629 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
7630
7631         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
7632         
7633         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
7634         check after MONO_VTADDR. Fixes pinvoke2.exe.
7635
7636         * marshal.h marshal.c metadata.h: Add beginnings of support for
7637         ftnptr -> delegate marshalling.
7638
7639 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
7640
7641         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
7642         * threads.c: Fix warnings.
7643
7644 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
7645
7646         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
7647         * icall.c: Registered icalls for Suspend and Resume.
7648         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
7649           Thread.Abort.
7650         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
7651         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
7652         * process.c: Use WaitForSingleObjectEx.
7653         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
7654           checkpoints.
7655         * threads.c, threads.h: Make use of new Ex wait methods. Improved
7656           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
7657           for Suspend and Resume. Added new mono_thread_stop, used for stoping
7658           background threads. Added basic support for Abort in Windows.
7659           Start new threads using a managed delegate invoke wrapper. This wrapper
7660           has an interruption checkpoint that is needed since an interruption
7661           can be requested before the thread leaves the unmanaged code that starts 
7662           the thread.
7663         * marshal.c: Added interruption checkpoint after every native call, and
7664           also before managed calls for wrappers called from unmanaged code to
7665           go into managed code.
7666         * object.h: Added new field in MonoThread to keep track of interruption
7667           requests.
7668
7669 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
7670
7671         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
7672         calls.
7673
7674 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7675
7676         * appdomain.c:
7677         * assembly.c:
7678         * gc.c:
7679         * locales.c:
7680         * mono-config.c:
7681         * rand.c: getenv -> g_getenv (windows!)
7682
7683         * process.c: complete_path is also used on non-windows platforms.
7684
7685 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7686
7687         * icall.c: new signature for Process_Start.
7688
7689         * process.[ch]: new signature for Process_Start. If we're on windows
7690         and UseShellExecute is false, we have to search for the program by
7691         ourselves if we don't get a full path.
7692
7693 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
7694
7695         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
7696         marshalling and call CleanUpNativeData if needed. Fixes #58646.
7697
7698 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7699
7700         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
7701         Fixes bug #58373.
7702
7703 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7704
7705         * process.c: use double quotes to quote program name and arguments on
7706         windows. Fixes bug #58575.
7707
7708 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7709
7710         * file-io.c: don't return "." and ".." when using windows Find*File.
7711
7712 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
7713
7714         * marshal.c: Don't pass wrappers to message init because method 
7715         addressed used to lookup metadata. part of remoting[2|3] fix.
7716
7717 2004-05-15  Jackson Harper  <jackson@ximian.com>
7718
7719         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
7720         path is essentially the same as MONO_PATH except that it points to
7721         GACs instead of lib directories.
7722         * loader.h: The user gac is gone so we dont need function to
7723         enable/disable it.
7724         * mono-config.c: user gac option is now gone.
7725         
7726 2004-05-15  Jackson Harper  <jackson@ximian.com>
7727
7728         * culture-info.h: Make defines more consistent, add calendar data
7729         to the culture info table.
7730         * culture-info-tables.h: Add basic calendar data. Basically
7731         everyone gets default gregorian until all the data is
7732         updated.
7733         * locales.c: Use the new consistent defines. Set calendar data for
7734         culture info objects.
7735         * object.h: add a field for calendar data to CultureInfo
7736         
7737 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
7738
7739         * image.c: image->runtime_invoke_cache is keyed on signatures now.
7740         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
7741         a signature.
7742         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
7743         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
7744         an extra param that is the pointer of the method to invoke. The IL for
7745         the invoke method is no longer specific to the method, but to the
7746         signature of the method. Thus, we can share the same code for multiple
7747         methods. This reduces the number of methods that have to be compiled.
7748
7749 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
7750
7751         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
7752
7753         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7754
7755         * icall.c: Optimize Buffer.BlockCopy.
7756
7757 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7758
7759         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
7760         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
7761         quote). Changed them to "MMMM yyyy".
7762
7763 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
7764
7765         * rand.c
7766         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
7767
7768 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
7769
7770         * reflection.h: Updated after changes to managed structures.
7771
7772         * appdomain.c: Bump corlib version.
7773
7774 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7775
7776         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
7777         windows.
7778
7779 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7780
7781         * Makefile.am: link to ../os/libmonoos.la on windows.
7782
7783         * assembly.c:
7784                 -If MONO_DEBUG, warn about non-existing directories in
7785                 MONO_PATH.
7786                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
7787                 compile time variable.
7788                 -Removed init_default_path and call mono_set_rootdir from
7789                 libmonoos.a instead (windows only).
7790
7791         * assembly.h: declare mono_assembly_getrootdir().
7792
7793         * domain.c:
7794         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
7795
7796         * loader.c: s/getenv/g_getenv/
7797
7798 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
7799
7800         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
7801
7802         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
7803
7804         * metadata.h: Add new marshalling conversions.
7805
7806         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
7807         function.
7808
7809         * reflection.c (mono_reflection_get_type): Lookup the type in all
7810         modules of a multi-module assembly. Fixes #58291.
7811
7812 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
7813
7814         * threads.c: Before aborting a background, set the StopRequested
7815         state.  This avoids throwing the Abort exception.
7816         In mono_thread_manage, don't continue with the shutdown until all
7817         aborted threads have actually stopped.
7818
7819 2004-05-10  Jackson Harper  <jackson@ximian.com>
7820
7821         * locales.c: Remove the modifier from culture names.
7822         
7823 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7824
7825         * Makefile.am: monosn is not installed any more. It has been deprecated
7826         in favor of sn.
7827
7828 2004-05-07  Jackson Harper  <jackson@ximian.com>
7829
7830         * locales.c
7831         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
7832         Fix array construction, add bailout if the length is 0.
7833
7834 2004-05-07  Dick Porter  <dick@ximian.com>
7835
7836         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
7837         machine doesn't have a DNS entry.  Patch by Urs Muff
7838         (umuff@quark.com), fixes bug 57928.
7839
7840 2004-05-06  Jackson Harper  <jackson@ximian.com>
7841
7842         * reflection.c: Handle null PublicTokens properly. alloc mem for
7843         assembly names culture so we dont crash when freeing it.
7844         
7845 2004-05-06  Jackson Harper  <jackson@ximian.com>
7846
7847         * assembly.c: Check the usergac when loading with partial names.
7848         
7849 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
7850
7851         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
7852         does nothing for now (not required for Linux/Windows) but the class
7853         library can call it (and a newer or modified runtime could need it).
7854         * icall.c: Registred icall.
7855
7856 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7857
7858         * loader.c: prints a message on module loading error we set MONO_DEBUG
7859         environment variable.
7860
7861 2004-05-05  Jackson Harper  <jackson@ximian.com>
7862
7863         * appdomain.c: Handle PublicKeyToken=null properly.
7864         
7865 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
7866
7867         * environment.c|h: Added icall ves_icall_System_Environment_
7868         GetOSVersionString to get the current OS version as a string.
7869         * icall.c: Registred icall.
7870
7871 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
7872
7873         * object.c: in mono_object_get_virtual_method(), take into account that
7874         non-virtual methods don't have a slot in the vtable. Check needed when
7875         the object is a proxy.
7876
7877 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
7878
7879         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
7880         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
7881
7882         * object.c (mono_class_compute_gc_descriptor): Fix warning.
7883
7884         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
7885         passed when a valuetype is expected.
7886
7887         * object.c (mono_unhandled_exception): Only set the exit code if the
7888         exception happens in the main thread. Fixes thread5.exe.
7889
7890         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
7891         invalid names. Fixes #58047.
7892
7893 2004-05-03  Jackson Harper  <jackson@ximian.com>
7894
7895         * assembly.c: This line was committed accidently and is unneeded.
7896         
7897 2004-05-03  Jackson Harper  <jackson@ximian.com>
7898
7899         * icall.c: Add new icall for Assembly::LoadWithPartialName
7900         * assembly.c/.h: new function that probes the GAC to load partial
7901         assembly names by Paolo Molaro.
7902         
7903 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7904
7905         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
7906         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
7907         (type_get_fully_qualified_name): Added PublicKeyToken when building a
7908         full type name.
7909
7910 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7911
7912         * appdomain.c: fixed check for 'neutral' culture and removed warning.
7913         * reflection.c: fix bug when parsing a full type name and Version is not
7914         the last thing in the string.
7915
7916 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
7917
7918         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
7919         crashes when it is freed.
7920
7921 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7922
7923         * assembly.c: print the compat warning to stderr.
7924
7925 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
7926
7927         * assembly.c (mono_assembly_load_references): Add a compatibility
7928         hack to run old applications that might be still referencing the
7929         3300-based assemblies, only do this for System.xxx.
7930
7931 2004-05-01  Jackson Harper  <jackson@ximian.com>
7932
7933         * appdomain.c: If the culture is neutral we set it to "".
7934         
7935 2004-04-29  Jackson Harper  <jackson@ximian.com>
7936
7937         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
7938
7939 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
7940  
7941         * string-icalls.c: added low overhead function for copying chars
7942         * icall.c: added needed icall for the above function
7943  
7944 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7945
7946         * icall.c: fix return value of get_global_assembly_cache.  Implemented
7947         Environment.GetLogicalDrives.
7948
7949 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
7950
7951         * rand.c: try and talk to egd or prngd
7952         for random bytes if opening devices fail.
7953
7954 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
7955
7956         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
7957         alignment for the type using the native alignment of its members 
7958         instead of using klass->min_align.
7959
7960         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
7961
7962 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7963
7964         * file-io.c:
7965         * socket-io.c: added check for sys/aio.h.
7966
7967 2004-04-28  Dick Porter  <dick@ximian.com>
7968
7969         * threads.c: Don't abort a thread thats already aborting, when
7970         terminating everything.
7971
7972 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7973
7974         * icall.c: added 2 new async calls for Socket.
7975
7976         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
7977         IO on *nix systems.
7978
7979         * threadpool.c: removed unused variable.
7980
7981 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
7982
7983         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
7984
7985 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7986
7987         * locales.c: put back string_invariant_tolower () and
7988         string_invariant_toupper ().
7989
7990 2004-04-26 David Waite <mass@akuma.org>
7991
7992         * file-io.h:
7993         * socket-io.h:
7994         * threads.h:
7995         * unicode.h: remove comma from end of enumeration declarations
7996
7997 2004-04-26 David Waite <mass@akuma.org>
7998
7999         * debug-mono-symfile.h:
8000         * decimal.c:
8001         * mono_debug.h:
8002         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
8003
8004
8005 2004-04-26  Jackson Harper  <jackson@ximian.com>
8006
8007         * appdomain.c: Increment version number.
8008         
8009 2004-04-26  Jackson Harper  <jackson@ximian.com>
8010
8011         * appdomain.c: Set assembly references public token value when
8012         PublicKeyToken is specified, not the hash_value. Free public token
8013         values when free assembly name data. Previously the public key
8014         token was hex decoded, however we are using hex encoded public key
8015         tokens, so this is not neccasary.
8016         * assembly.c: Lookup assemblies in the gac if their public token
8017         value is set. Add function to allow enabling user gac
8018         lookups. Specify whether or not the assembly was loaded from the
8019         GAC. Compare full assembly names when checking the cache for
8020         assemblies (Temporarily disabled see comment in code). Remove
8021         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
8022         specifies trace-loader they get extra info to stdout on the
8023         loading of assemblies.
8024         * image.h: Add a field for an assembly references public token
8025         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
8026         whether an assembly has been loaded from the GAC.
8027         * image.c: Remove a corlib -> mscorlib name mapping.
8028         * loader.h: Add function to enable/disable the user gac.
8029         * mono-config.c: Check if the usergac is enabled in the config
8030         file.
8031         * icall.c: New icall to determine whether or not an assembly has
8032         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
8033         * tabldefs.h: Add constant for assemblyref flag that specifies a
8034         full public key is used instead of a public token.
8035         * reflection.c: Remove mscorlib -> corlib mappings. Set
8036         PublicTokenValue instead of hash value. This value is a hex
8037         string so it does not need to be expanded.
8038
8039 2004-04-26  Martin Baulig  <martin@ximian.com>
8040
8041         * mono-debug-debugger.c (mono_debugger_initialize): Set
8042         `mono_debugger_initialized' before calling mono_debug_lock().
8043
8044 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
8045
8046         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
8047           InternalToUpper/InternalToLower.
8048         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
8049           removed invariant culture shortcut.  This is now done in managed code.
8050         * locales.c: (string_invariant_toupper/tolower) removed.
8051
8052 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8053
8054         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
8055         Added Poll internal call.
8056
8057         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
8058         call for Poll. Select was too heavy for polling a single socket.
8059
8060         * threadpool.[ch]: added mono_threadpool_cleanup.
8061         * threads.c: use it. Don't use Thread_Abort on windows.
8062
8063 2004-04-23  Martin Baulig  <martin@ximian.com>
8064
8065         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
8066
8067 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
8068
8069         * icall.c: Registred new icalls for key pair protection and added an
8070         icall for Environment.GetFolderPath on Windows.
8071         * security.c|h: Added new icalls for key pair protection.
8072
8073 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8074
8075         * socket-io.c: don't display the non-supported family warning for known
8076         families. Now this is not displayed on windows when checking support
8077         for IPv4/IPv6.
8078
8079 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8080
8081         * class.c: don't display the layout warning for static fields.
8082
8083 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
8084
8085         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
8086         * locales.c, locales.h: Added new icalls for culture-specific
8087         Char.ToLower and Char.ToUpper.
8088
8089 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8090
8091         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
8092         by David Waite.
8093
8094 2004-04-20  Martin Baulig  <martin@ximian.com>
8095
8096         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
8097         of the type name before passing it to mono_reflection_type_from_name().
8098
8099 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
8100
8101         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
8102         encodings here. Fixes #56965.
8103
8104 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
8105
8106         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
8107         fix test on strstr result not that I can see anything that
8108         relies on the result.
8109
8110 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
8111
8112         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
8113         Fixes #57081.
8114
8115         * marshal.c (mono_marshal_get_string_encoding): New helper function.
8116
8117         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
8118         function to determine which marshalling to use for strings. Fixes
8119         #56965.
8120
8121         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
8122
8123         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
8124
8125 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
8126
8127         * icall.c: #include mono-config.h
8128
8129 2004-04-15  Jackson Harper  <jackson@ximian.com>
8130
8131         * culture-info-tables.h: Fix date formats for en-US culture.
8132         
8133 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
8134
8135         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
8136         ThreadPool.SetMinThreads.
8137         * threadpool.c: Implemented ThreadPool.GetMinThreads and
8138         ThreadPool.SetMinThreads.
8139
8140 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8141
8142         * mono-config.c: also load the .config file in the directory
8143         where the assembly was found.
8144
8145 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
8146
8147         * assembly.c: load per-assembly config files.
8148         * icall.c: decrapified code to get the config dir and moved to
8149         mono-config.c.
8150         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
8151         per-assembly config files. When doing a dll map lookup give precedence
8152         to the per-assembly data.
8153
8154 2004-04-14  Martin Baulig  <martin@ximian.com>
8155
8156         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
8157         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
8158         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
8159
8160         * mono-debugger-debugger.c: While the debugger is locked, remember
8161         whether the symbol tables have changes and send one single
8162         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
8163
8164 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
8165
8166         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
8167
8168         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
8169         function.
8170
8171         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
8172         account when marshalling string arrays. Fixes #56965.
8173
8174 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
8175
8176         * icall.c: Add new icalls mapping for security.
8177         * security.c|h: Add internal calls for WindowsIdentity,
8178         WindowsImpersonationContext and WindowsPrincipal.
8179
8180 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
8181
8182         * class.c: Added comment to ensure the System.MonoDummy class
8183         is removed when no longer necessary
8184
8185 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
8186
8187         * appdomain.c: Pass arguments to the bootstraping exceptions to
8188         minimize JITed methods at boot
8189
8190         * metadata.c (mono_exception_from_name_two_strings): Allow for the
8191         second string to be null.
8192
8193         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
8194         Change the protocol to minimize the JIT methods at startup.  Now
8195         it Returns the internal codepage, if the value of "int_code_page"
8196         is 1 at entry, and we can not compute a suitable code page
8197         number, returns the code page as a string.
8198
8199 2004-04-13  Jackson Harper  <jackson@ximian.com>
8200
8201         * culture-info-tables.h: Fix number of decimal digits for all
8202         english locales.
8203
8204 2004-04-13  Jackson Harper  <jackson@ximian.com>
8205
8206         * icall.c: Clairfy out of sync error message. It is not always
8207         your corlib that is out of sync.
8208
8209 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
8210
8211         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
8212         properties when only the set accessor is overriden. Fixes #55874.
8213
8214 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
8215
8216         * assembly.c (mono_assembly_load_references): Make this thread safe.
8217         Fixes #56327.
8218
8219 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
8220
8221         * monosn.c: Add missing initialization calls.
8222
8223 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
8224
8225         * locales.c:
8226         ves_icall_System_Globalization_CultureInfo_construct_number_format
8227         Fix g_assert so it compiles on fussier compilers re int/ptr
8228         mismatch
8229
8230 2004-04-08  Dick Porter  <dick@ximian.com>
8231
8232         * socket-io.h:
8233         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
8234         53992.  Also rearrange the code so that the internal calls return
8235         an error value and exceptions are thrown from managed code.
8236
8237         * icall.c: Add type info to the socket icalls.
8238
8239 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8240
8241         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
8242         owes me a beer.
8243
8244 2004-04-07  Martin Baulig  <martin@ximian.com>
8245
8246         * class.c (mono_class_from_generic_parameter): Don't default
8247         `klass->parent' to `mono_defaults.object_type'.
8248
8249 2004-04-07  Martin Baulig  <martin@ximian.com>
8250
8251         * reflection.c (mono_reflection_initialize_generic_parameter): Set
8252         `param->pklass->reflection_info'.       
8253
8254 2004-04-07  Jackson Harper  <jackson@ximian.com>
8255
8256         * culture-info-tables.h: Fix date separator symbol.
8257         
8258 2004-04-07  Martin Baulig  <martin@ximian.com>
8259
8260         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
8261         from System.Type to System.MonoType.
8262
8263 2004-04-07  Martin Baulig  <martin@ximian.com>
8264
8265         * reflection.h
8266         (MonoReflectionGenericParam): Added `has_reference_type' and
8267         `has_value_type' fields.
8268
8269         * reflection.c (mono_image_get_generic_param_info): Encode the
8270         correct flags if we have the `class' or `struct' constraint.
8271
8272 2004-04-07  Martin Baulig  <martin@ximian.com>
8273
8274         * reflection.h
8275         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
8276
8277 2004-04-07  Jackson Harper  <jackson@ximian.com>
8278
8279         * appdomain.c: Revert extra patches, just wanted to bump the
8280         version number.
8281         
8282 2004-04-07  Jackson Harper  <jackson@ximian.com>
8283
8284         * Makefile.am: Add culture-info private headers.
8285         * icall.c: Add new icalls for contructing locales.
8286         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
8287         * locales.h: Declare new culture info construction methods.
8288         * object.h: Add new fields used to avoid the CultureMap to
8289         MonoCultureInfo.
8290         * culture-info.h: Definition of structs used in the culture info
8291         tables.
8292         * culture-info-tables.h: Autogenerated tables that contain culture
8293         info data. This file was generated with the locale-builder tool.
8294         * appdomain.c: Incement corlib version number.
8295         
8296 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
8297
8298         * appdomain.c: (mono_runtime_init) move mono_thread_init
8299         to before mono_object_new calls so critical sections
8300         are initialized before use.
8301
8302 2004-04-07  Martin Baulig  <martin@ximian.com>
8303
8304         * icall.c
8305         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
8306         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
8307         (ves_icall_MonoGenericParam_initialize): Removed.
8308         (monogenericparam_icalls): Removed.
8309         (generictypeparambuilder_icalls): Added new table for
8310         System.Reflection.Emit.GenericTypeParameterBuilder.
8311
8312         * reflection.c
8313         (mono_reflection_define_generic_parameter): Removed.
8314         (mono_reflection_initialize_generic_parameter): This is now called
8315         from GenericTypeParameterBuilder's .ctor.
8316
8317 2004-04-06  Martin Baulig  <martin@ximian.com>
8318
8319         * class.c (mono_class_init): Don't inflate nested classes in a
8320         generic instance.
8321         (mono_type_get_name_recurse): Include the generic arguments for
8322         generic instances and generic type declarations.
8323         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
8324         (_mono_class_get_instantiation_name): Removed.
8325         (mono_class_create_generic): Always use `gklass->name' as our name.
8326
8327         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
8328
8329         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
8330         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
8331         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
8332         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
8333         closed generic methods here.
8334
8335         * reflection.c
8336         (mono_reflection_generic_inst_get_nested_types): Removed.
8337         (inflate_mono_method): Copy the generic parameters from the
8338         MonoMethodHeader into out MonoGenericMethod.
8339
8340 2004-04-06  Martin Baulig  <martin@ximian.com>
8341
8342         * row-indexes.h
8343         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
8344
8345         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
8346
8347         * reflection.c (build_compressed_metadata): If we have any entries
8348         in the GenericParam, MethodSpec or GenericParamConstraint tables,
8349         set the header version to 1.1.
8350
8351 2004-04-06  Martin Baulig  <martin@ximian.com>
8352
8353         * class.c (mono_class_init): If we're a generic instance,
8354         initialize our nested classes, too.
8355         (_mono_class_get_instantiation_name): Deal with the new `!%d'
8356         suffix. 
8357
8358 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8359
8360         * process.c: quote the argument passed to the shell on windows.
8361
8362 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
8363
8364         * threads.c (mono_alloc_special_static_data): Allow this to be
8365         called during startup.
8366
8367 2004-04-02  Martin Baulig  <martin@ximian.com>
8368
8369         * icall.c
8370         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
8371
8372 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
8373
8374         * icall.c: Fix build.
8375
8376 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
8377
8378         * Makefile.am: Added security.c|h.
8379         * icall.c: Added icall for get_UserName;
8380         * security.c: New file for security related icalls. Added function
8381         get_UserName for System.Environment (fix #56144).
8382         * security.h: New. Header file for security.c
8383
8384 2004-04-02  Dick Porter  <dick@ximian.com>
8385
8386         * icall.c: Deleted the icalls that were obsoleted some time ago
8387         by the ICU string code, and which were mixed into the icall
8388         rearranging.  Fixes bug 55969.
8389
8390         * string-icalls.h: 
8391         * string-icalls.c: Deleted the code that those icalls reference.
8392
8393 2004-04-01  Martin Baulig  <martin@ximian.com>
8394
8395         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
8396
8397         * class.c (mono_class_from_generic_parameter): Don't set 
8398         TYPE_ATTRIBUTE_INTERFACE.
8399         (my_mono_class_from_generic_parameter): Likewise.
8400
8401 2004-04-01  Martin Baulig  <martin@ximian.com>
8402
8403         * loader.c (find_method): Added an optional `MonoClass *ic'
8404         argument to search in a specific interface.
8405         (mono_get_method_constrained): New public function.
8406
8407 2004-04-01  Martin Baulig  <martin@ximian.com>
8408
8409         * reflection.c (mono_image_get_generic_field_token): Use the
8410         `handleref' cache here.
8411
8412 2004-04-01  Martin Baulig  <martin@ximian.com>
8413
8414         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
8415
8416         * reflection.c (create_generic_typespec): Use the `typespec' hash
8417         here, not the `typeref' one.    
8418
8419 2004-04-01  Martin Baulig  <martin@ximian.com>
8420
8421         * class.c (mono_class_inflate_generic_type): Moved the
8422         functionality into a new static inflate_generic_type() which
8423         returns NULL if it didn't do anything.  Only increment the
8424         `mono_stats.inflated_type_count' if we actually inflated
8425         something.
8426         (mono_class_get_full): Check the classes type to see whether we
8427         need to inflate it; also inflate MONO_TYPE_(M)VAR.
8428
8429 2004-04-01  Jackson Harper  <jackson@ximian.com>
8430
8431         * reflection.c: Set culture for assembly references.
8432         
8433 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
8434
8435         * reflection.[ch], icall.[ch], Fix support for pinning variables.
8436
8437 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8438
8439         * assembly.c:
8440         (do_mono_assembly_open): the critical section also covers
8441         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
8442
8443 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8444
8445         * threads.c:
8446         (mono_manage_threads): abort the background threads when finishing.
8447         Fixes bug #47232.
8448
8449 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8450
8451         * gc.c: only close the done_event handle if there was no timeout.
8452         C-ified comments.
8453
8454 2004-03-30  Martin Baulig  <martin@ximian.com>
8455
8456         * icall.c (icall_entries): It's called "System.Activator", not
8457         "System.Activation".    
8458
8459 2004-03-30  Martin Baulig  <martin@ximian.com>
8460
8461         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
8462         (mono_class_create_from_typespec): Likewise.
8463
8464 2004-03-30  Martin Baulig  <martin@ximian.com>
8465
8466         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
8467         `has_ctor_constraint' and `initialized'.
8468
8469 2004-03-30  Martin Baulig  <martin@ximian.com>
8470
8471         * reflection.c (encode_new_constraint): New static function to add
8472         the constructor constraint attribute to a type parameter.
8473         (encode_constraints): Call encode_new_constraint() if necessary.
8474
8475         * reflection.h
8476         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
8477
8478         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
8479         
8480 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
8481
8482         * reflection.c, icall.c: add support for pinning variables. 
8483
8484 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
8485
8486         * marshal.c (mono_marshal_get_managed_wrapper):
8487         init bool local with zero rather than null.
8488
8489 2004-03-29  Martin Baulig  <martin@ximian.com>
8490
8491         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
8492         the "official" behavior here.
8493         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
8494
8495 2004-03-29  Martin Baulig  <martin@ximian.com>
8496
8497         * icall.c: Reflect latest API changes.
8498
8499 2004-03-29  Martin Baulig  <martin@ximian.com>
8500
8501         * loader.c (mono_get_method_from_token): Also call
8502         mono_metadata_load_generic_params () for abstract and interface
8503         methods; replace the type arguments in the method signature with
8504         the ones which are loaded from the metadata.
8505
8506 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
8507
8508         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
8509         of the lock is not the current thread. MS.NET don't do it, in spite of
8510         what the documentation says. See bug #56157.
8511
8512 2004-03-28  Martin Baulig  <martin@ximian.com>
8513
8514         * class.c (mono_class_init): Don't call init_properties() and
8515         init_events() for generic instances; set `prop->parent' when
8516         inflating properties.
8517
8518         * reflection.c (mono_generic_inst_get_object): Call
8519         `mono_class_init (ginst->klass)'.
8520         (mono_type_get_object): Only create a MonoGenericInst if your
8521         generic type is a TypeBuilder.
8522         (do_mono_reflection_bind_generic_parameters): Only set
8523         `ginst->is_dynamic' if our generic type is a TypeBuilder.
8524
8525 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
8526
8527         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
8528         Fixes #56091.
8529
8530 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8531
8532         * icall.c: added Kill_internal icall.
8533         * process.[ch]: added Kill_internal icall.
8534
8535 2004-03-25  Martin Baulig  <martin@ximian.com>
8536
8537         * class.h (MonoStats): Added `generic_instance_count',
8538         `inflated_method_count', `inflated_type_count' and
8539         `generics_metadata_size'.       
8540
8541 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8542
8543         * reflection.c: no warnings now.
8544
8545 2004-03-25  Martin Baulig  <martin@ximian.com>
8546
8547         * class.c (mono_class_get_full): New public function; does a
8548         mono_class_get(), but also takes a `MonoGenericContext *'.
8549
8550         * loader.c (mono_field_from_memberref): Renamed to
8551         `field_from_memberref', made static and added `MonoGenericContext *'
8552         argument.
8553         (mono_field_from_token): Added `MonoGenericInst *' argument.
8554         (method_from_memberef): Likewise.
8555         (mono_get_method_from_token): Likewise.
8556         (mono_get_method_full): New public function; does a
8557         mono_get_method(), but also takes a `MonoGenericContext *'.
8558
8559         * verify.c (mono_method_verify): Get the method's generic context
8560         and pass it to mono_field_from_token(), mono_get_method_full() and
8561         mono_class_get_full().
8562
8563 2004-03-25  Martin Baulig  <martin@ximian.com>
8564
8565         * class.c (mono_class_inflate_generic_type): Take a
8566         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
8567         `MonoGenericMethod *'.
8568
8569 2004-03-25  Martin Baulig  <martin@ximian.com>
8570
8571         * loader.h (MonoMethodInflated): Store the MonoGenericContext
8572         instead of the MonoGenericMethod here.
8573
8574 2004-03-25  Martin Baulig  <martin@ximian.com>
8575
8576         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
8577         each time we create a new MonoGenericInst, we also create a new
8578         context which points back to us.
8579
8580         * class.c (inflate_method): Use `ginst->context' instead of
8581         creating a new context.
8582
8583         * loader.c (method_from_memberref): Use
8584         `klass->generic_inst->context' instead of creating a new context.
8585
8586 2004-03-25  Martin Baulig  <martin@ximian.com>
8587
8588         * class.h (MonoGenericContext): New struct.
8589         (MonoGenericMethod): Removed `generic_inst'.
8590
8591         * class.c (mono_class_inflate_generic_method): Take a
8592         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
8593
8594 2004-03-25  Martin Baulig  <martin@ximian.com>
8595
8596         * loader.h (MonoMethodInflated): New typedef.
8597
8598         * metadata.h (MonoMethodSignature): Removed `gen_method', make
8599         `generic_param_count' consume just 30 bits, added `is_inflated'
8600         and `has_type_parameters' flags (one bit each).
8601
8602         * class.c (mono_class_inflate_generic_method): Create a
8603         MonoMethodInflated instead of a MonoMethodNormal and set
8604         `is_inflated' in the method signature.
8605
8606         * class.h (MonoGenericMethod): Removed `generic_method'.
8607
8608 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
8609
8610         * image.c: Make sure the name of a MonoImage is always an absolute path.
8611           This fixes bug #54415.
8612
8613 2004-03-24  Martin Baulig  <martin@ximian.com>
8614
8615         * class.c (mono_class_setup_vtable): If we're a generic instance,
8616         use our generic type's vtable size.
8617
8618 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
8619
8620         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
8621         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
8622         problems.
8623
8624 2004-03-23  Martin Baulig  <martin@ximian.com>
8625
8626         * class.h (MonoDynamicGenericInst): Added `int count_events' and
8627         `MonoEvent *events'.
8628
8629         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
8630         (typebuilder_icalls): Added "get_event_info"; calls
8631         mono_reflection_event_builder_get_event_info(). 
8632
8633         * reflection.c (mono_reflection_generic_inst_initialize): Added
8634         `MonoArray *events'.
8635         (mono_reflection_event_builder_get_event_info): New function.
8636
8637 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
8638
8639         * object.h: add mono_type_initialization_init
8640
8641         * object.c (mono_runtime_class_init): 
8642         implement class constructor synchronization rules
8643         to cope with threading issues.  
8644         add mono_type_initialization_init
8645
8646         * appdomain.c (mono_runtime_init): call 
8647         mono_type_initialization_init
8648
8649         * class.h: removing initializing field from MonoVTable
8650
8651 2004-03-23  Martin Baulig  <martin@ximian.com>
8652
8653         * class.c (my_mono_class_from_generic_parameter): Use
8654         `param->name' if it's not NULL. 
8655
8656 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
8657
8658         * class.c: do not insert non-virtual methods in the vtable.
8659         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
8660         that means the method is non-virtual. This never would have
8661         happened before.
8662
8663 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
8664
8665         * profiler.c: Added lock for accessing coverage_hash.
8666
8667 2004-03-22  Martin Baulig  <martin@ximian.com>
8668
8669         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
8670         `method->method->signature->generic_param_count != 0' to make it
8671         work for interface methods.
8672
8673 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8674
8675         * process.c: quote the string passed to the shell using g_shell_quote.
8676
8677 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8678
8679         * threads.c:
8680         (mono_threads_manage): don't remove the finalizer thread and self
8681         from the threads hash table so that mono_thread_manage can be called
8682         more than once.
8683
8684 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8685
8686         * process.c: quote the arguments when UseShellExecute is true. Fixes
8687         bug #55790.
8688
8689 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8690
8691         * threads.c: set mono_thread_detach as a cleanup routine for every
8692         thread. This way it's always executed upon thread termination, either
8693         aborted or finished normally. No more xsp hangs!
8694
8695 2004-03-17  Martin Baulig  <martin@ximian.com>
8696
8697         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
8698         `int count_nested' and a `MonoType **nested'.
8699
8700         * reflection.c (mono_reflection_bind_generic_parameters): Moved
8701         most of the functionality into a new static
8702         do_mono_reflection_bind_generic_parameters() and don't take a
8703         `MonoType *nested_in' argument any more.  Don't compute nested
8704         types here.
8705         (mono_reflection_generic_inst_get_nested_types): New public method
8706         to get nested types.
8707
8708         * class.c (mono_class_create_generic): Set `klass->nested_in' if
8709         we're a nested class.
8710
8711         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
8712         mono_reflection_generic_inst_get_nested_types() to compute the
8713         nested types.
8714
8715 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
8716
8717         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
8718         descriptive error message under windows.
8719         
8720 2004-03-17  Martin Baulig  <martin@ximian.com>
8721
8722         * class.c (dup_type): Added `const MonoType *original' argument;
8723         copy the attrs from the original type.
8724
8725 2004-03-17  Martin Baulig  <martin@ximian.com>
8726
8727         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
8728         `m->generic_inst_cache' here.
8729
8730 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
8731
8732         * exception.h exception.c: Add stack_overflow_exception.
8733
8734 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8735
8736         * threadpool.c:
8737         (overlapped_callback): call SetEvent *after* invoking the callback.
8738         No need to call CloseHandle.
8739
8740 2004-03-16  Martin Baulig  <martin@ximian.com>
8741
8742         * reflection.c (mono_image_get_fieldref_token): Take a
8743         `MonoReflectionField *' instead of a `MonoClassField *' and a
8744         `MonoClass *'; store the `MonoReflectionField *' in the hash.
8745
8746 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8747
8748         * appdomain.c: don't add the culture to the filename we're looking for
8749         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
8750
8751 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8752
8753         * locales.c: don't ignore symbols when doing case insensitive compares.
8754         Thanks Dick! Fixes bug #54046.
8755
8756         * threads.c: surround 'threads' usage with enter/leave in
8757         mono_thread_manage.
8758
8759 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
8760
8761         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
8762         implicitly marshalled as [Out]. Fixes #55450.
8763
8764         (mono_marshal_get_runtime_invoke): Zero out the result if there is
8765         an exception.
8766
8767 2004-03-16  Martin Baulig  <martin@ximian.com>
8768
8769         * class.c (mono_class_from_generic_parameter): Use the actual
8770         parameter name. 
8771
8772 2004-03-16  Martin Baulig  <martin@ximian.com>
8773
8774         * reflection.c (type_get_signature_size): New static function.
8775         Compues the size of the type in a method signature.
8776         (method_get_signature_size): New static function; calls
8777         type_get_signature_size() to compute the actual size of the
8778         method's signature.
8779         (method_encode_signature): Use method_get_signature_size() to get
8780         the signature's size rather than using `nparams * 10'.
8781
8782 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8783
8784         * file-io.h: define here WapiOverlapped on windows. I don't want the
8785         regular OVERLAPPED one.
8786
8787         * file-io.c:
8788         * threadpool.c: somehow, BindIoCompletionCallback is not found.
8789         Disabling AIO on windows.
8790
8791 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8792
8793         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
8794         bug #55385.
8795
8796 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8797
8798         * appdomain.c: upgraded corlib version.
8799
8800         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
8801         and BeginWrite. Allow opening files for asynchrnous operations.
8802
8803         * file-io.h: new struct that maps FileStreamAsyncResult.
8804         * icall.c: added new icalls.
8805         * process.[ch]: support setting child process environment variables
8806         and use the SHELL or COMSPEC when UseShellExecute is true.
8807
8808         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
8809         callback for async. IO is here and also BindHandle.
8810
8811         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
8812         from here.
8813
8814 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
8815
8816         * reflection.c (create_custom_attr): Allow len == 0.
8817
8818         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
8819         computation on big-endian machines.
8820
8821 2004-03-13  Martin Baulig  <martin@ximian.com>
8822
8823         * class.h (MonoGenericInst): Added `int count_ifaces'.
8824
8825         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
8826         `ginst->count_ifaces' instead `klass->interface_count' since we
8827         may get called before the vtable is created.
8828
8829         * loader.c (mono_method_get_param_names): If we're a generic
8830         instance, return and don't initialize the class.
8831
8832         * reflection.c (mono_reflection_setup_generic_class): Don't call
8833         ensure_runtime_vtable().
8834         (mono_reflection_bind_generic_parameters): Set
8835         `ginst->count_ifaces'.
8836
8837 2004-03-11  Jackson Harper <jackson@ximian.com>
8838
8839         * icall.c:
8840         * unicode.c:
8841         * unicode.h: Remove unused System.Char icalls.
8842         
8843 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
8844
8845         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
8846         code when we P/Invoke the first library in Windows.Forms, instead
8847         of when we first open the assembly.
8848
8849         * assembly.c: Drop the lookup from here.
8850
8851 2004-03-10  Martin Baulig  <martin@ximian.com>
8852
8853         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
8854         class for properties, fields and events.  Finally fixes #54945.
8855
8856 2004-03-10  Martin Baulig  <martin@ximian.com>
8857
8858         * metadata.c (mono_metadata_class_equal): New static function;
8859         checks whether two generic instances or two generic parameters are
8860         equal.
8861         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
8862         compare classes.        
8863
8864 2004-03-10  Martin Baulig  <martin@ximian.com>
8865
8866         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
8867
8868         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
8869         argument and write it into the `reflection_info' field.
8870
8871         * icall.c
8872         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
8873         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
8874
8875 2004-03-09  Jackson Harper  <jackson@ximian.com>
8876
8877         * char-conversions.h: use 8 bits for numeric data its all we need
8878         * icall.c: numeric data is only 8 bits now.
8879
8880 2004-03-09  Martin Baulig  <martin@ximian.com>
8881
8882         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
8883
8884         * class.c (init_properties, init_events): Initialize the new
8885         `parent' field.
8886
8887         * reflection.c (typebuilder_setup_properties): Likewise.
8888         (typebuilder_setup_events): Likewise.
8889
8890         * reflection.h (MonoEventInfo): Replaced `parent with
8891         `declaring_type' and `reflected_type'.
8892
8893         * icall.c (ves_icall_get_property_info): Distinguish between
8894         declaring and reflected type.
8895         (ves_icall_get_event_info): Likewise.
8896
8897 2004-03-09  Martin Baulig  <martin@ximian.com>
8898
8899         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
8900         (ves_icall_Type_GetField): Correctly set field->klass.
8901
8902 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
8903
8904         * loader.h: Fix warning.
8905
8906 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
8907
8908         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
8909         library routine if present.  Notice that it will still continue
8910         executing even if its missing, for those working on the Gtk#
8911         edition of Windows.Forms.
8912
8913         * assembly.c (do_mono_assembly_open): If loading the
8914         System.Windows.Forms call mono_loader_wini_init.
8915
8916 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
8917
8918         * class.h: Added MonoRemoteClass struct.
8919         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
8920         function for MonoStrings.
8921         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
8922         Added internal call for getting the proxy type.
8923         * marshal.c: Get the type of transparent proxies from its remote_class.
8924         Added methods that generate the IL for type checks and casts:
8925         mono_marshal_get_isinst, mono_marshal_get_castclass, 
8926         mono_marshal_get_proxy_cancast.
8927         * marshal.h: Declaration of the previous new methods.
8928         * object.c: Added new moethods for creating and updating MonoRemoteClass
8929         instances: mono_remote_class, mono_upgrade_remote_class, 
8930         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
8931         * verify.c: FIx transparent_proxy_fields layout.
8932         * appdomain.c: Bump corlib version.
8933
8934 2004-03-04  Jackson Harper  <jackson@ximian.com>
8935
8936         * icall.c: Add icall to access char conversion tables.
8937         * char-conversions.h: Character conversion tables.
8938         * Makefile.am: Add char-conversions.h private header file.
8939         
8940 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
8941
8942         * appdomain.c (unload_thread_main): Increase unloading timeout to
8943         10 sec as a temporary workaround for Nant problems.
8944
8945 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
8946
8947         * gc.c: Add checks for GC_enable and GC_disable.
8948
8949         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
8950         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
8951         (bug #54988).
8952         
8953 2004-02-27  Martin Baulig  <martin@ximian.com>
8954
8955         * reflection.c (mono_reflection_bind_generic_parameters): Take a
8956         `MonoReflectionType *' instead of a `MonoType *'.
8957
8958 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
8959
8960         * gc.c (run_finalize): Avoid finalizing the object representing the
8961         finalizer thread.
8962         (finalizer_thread): Fix warning.
8963
8964 2004-02-25  Martin Baulig  <martin@ximian.com>
8965
8966         * class.c (_mono_class_get_instantiation_name): Added `int offset'
8967         argument for nested types.
8968         (mono_class_create_generic): Added support for nested generictypes.
8969
8970         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
8971         `GList *nested'.
8972
8973         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
8974
8975         * reflection.c (method_encode_signature): Increase the minimum
8976         value of `size' from 10 to 11.
8977         (mono_reflection_bind_generic_parameters): Take `int type_argc'
8978         and `MonoType **types' arguments instead of the `MonoArray
8979         *types'; added `MonoType *nested_in'.  Recursively instantiate
8980         nested classes. 
8981
8982 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
8983
8984         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
8985         stack_overflow_ex members which are used by exception handling.
8986
8987         * appdomain.c (mono_runtime_init): Initialize the new members.
8988
8989         * gc.c (mono_gc_enable): New helper function.
8990         * gc.c (mono_gc_disable): New helper function.
8991
8992 2004-02-23  Martin Baulig  <martin@ximian.com>
8993
8994         * icall.c: I must have been really stupid - make it actually work
8995         this time ;-)
8996
8997 2004-02-23  Martin Baulig  <martin@ximian.com>
8998
8999         * loader.c (method_from_memberref): Only inflate the method if
9000         it's in another klass.
9001
9002 2004-02-23  Martin Baulig  <martin@ximian.com>
9003
9004         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
9005         (mono_class_init): If we're a generic instance and an interface,
9006         compute `class->interface_id'; also create `class->interfaces'
9007         here and inflate them.
9008
9009         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
9010         `ginst->is_open'.
9011         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
9012
9013         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
9014
9015 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
9016
9017         * reflection.c (method_encode_code): Improved the error message
9018         generated by the exception.
9019
9020 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9021
9022         * icall.c: Martin did not do what he said in the ChangeLog for
9023         2004-02-18, but put back the changes for properties and events.
9024         Commenting those changes out again and adding comment to bug #54518.
9025         
9026         * process.c: removed warning.
9027
9028 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
9029
9030         * marshal.c (emit_struct_conv): Print an error message instead of
9031         asserting when a type does not have the StructLayout attribute.
9032
9033 2004-02-20  Martin Baulig  <martin@ximian.com>
9034
9035         * reflection.c (mono_type_get_object): Also use the cache for
9036         generic instances.
9037         (mono_reflection_bind_generic_parameters): Always compute
9038         `ginst->ifaces'.        
9039
9040 2004-02-20  Martin Baulig  <martin@ximian.com>
9041
9042         * class.h (MonoGenericMethod): Removed `klass'.
9043
9044         * class.c (mono_class_inflate_generic_method): Added `MonoClass
9045         *klass' argument.
9046
9047 2004-02-20  Martin Baulig  <martin@ximian.com>
9048
9049         * reflection.c (method_encode_methodspec): Actually use the
9050         uninflated signature for the memberref.
9051
9052 2004-02-20  Martin Baulig  <martin@ximian.com>
9053
9054         * class.h (MonoGenericMethod): Removed `declaring'.
9055
9056         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
9057         is NULL, compute it here.
9058
9059 2004-02-20  Martin Baulig  <martin@ximian.com>
9060
9061         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
9062
9063         * metadata.c (mono_metadata_generic_inst_hash): New method.
9064         (mono_metadata_generic_inst_equal): New method.
9065
9066         * reflection.c (mono_reflection_bind_generic_parameters): Use the
9067         `klass->image->generic_inst_cache' cache to avoid creating
9068         duplicate MonoGenericInst's.
9069
9070         * class.c (mono_class_inflate_generic_type): Use the cache.
9071
9072 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
9073
9074         * object.c: fixed gc descriptor calculation for embedded valuetypes.
9075
9076 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9077
9078         * icall.c: added Socket.WSAIoctl icall.
9079
9080         * socket-io.[ch]: implemented
9081         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
9082
9083 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
9084
9085         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
9086
9087 2004-02-18  Urs C Muff  <umuff@quark.com>
9088
9089         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
9090         this work on PPC and other big-endian architectures.
9091
9092         * debug-mono-symfile.h: Prepended the names of all the `guint32'
9093         fields with an underscore to make sure they're only accessed by
9094         the read32() macro.
9095
9096 2004-02-18  Martin Baulig  <martin@ximian.com>
9097
9098         * icall.c: Put the klass->refclass changes back for methods and
9099         fields, but not for properties and events.  We're currently not
9100         distinguishing between DeclaringType and ReflectedType for
9101         properties and events, that's what caused the regressions.
9102
9103 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9104
9105         * object.c:
9106         (mono_async_result_new): the handle can be NULL.
9107
9108         * threadpool.c: Use an event instead of a semaphore, don't initialize
9109         it until needed. This saves quite a few semaphores from being created
9110         when using the threadpool.
9111
9112 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
9113
9114         * object.c (mono_string_is_interned_lookup): Fix interning of long
9115         strings. Fixes #54473.
9116
9117         * domain.c (ldstr_equal): Optimize if the two strings are equal.
9118
9119         * icall.c: Revert the klass->refclass changes since they introduce
9120         regressions (bug #54518).
9121
9122 2004-02-18  Martin Baulig  <martin@ximian.com>
9123
9124         * class.c (mono_class_init): If we're a generic instance and don't
9125         come from a TypeBuilder, inflate our members here.
9126         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
9127         (mono_class_create_generic): New public method.
9128         (mono_class_initialize_generic): Removed.
9129         (get_instantiation_name): Renamed to
9130         _mono_class_get_instantiation_name() and made it public.
9131
9132 2004-02-18  Martin Baulig  <martin@ximian.com>
9133
9134         * class.c (mono_class_inflate_generic_type): Clear the new
9135         instance's `nginst->klass' when inflating a generic instance.
9136         (mono_class_is_subclass_of): Added (basic) support for generic
9137         instances.
9138
9139 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
9140
9141         * appdomain.h, domain.c: use a MonoCodeManager instead of a
9142         MonoMempool to hold compiled native code.
9143
9144 2004-02-17  Martin Baulig  <martin@ximian.com>
9145
9146         * class.h (MonoDynamicGenericInst): Added `count_properties' and
9147         `properties'.
9148
9149         * reflection.c (mono_reflection_generic_inst_initialize): Added
9150         `MonoArray *properties' argument.
9151
9152         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
9153
9154 2004-02-17  Martin Baulig  <martin@ximian.com>
9155
9156         * icall.c (ves_icall_Type_GetFields): Renamed to
9157         ves_icall_Type_GetFields_internal() and added a
9158         `MonoReflectionType *rtype' argument; pass it to
9159         mono_field_get_object() to set the field's "reflected" type.
9160         (ves_icall_Type_GetConstructors): Likewise.
9161         (ves_icall_Type_GetEvents): Likewise.
9162         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
9163         argument; pass it to mono_method_get_object() to set the method's
9164         "reflected" type.       
9165
9166 2004-02-17  Martin Baulig  <martin@ximian.com>
9167
9168         * class.h (MonoDynamicGenericInst): New type.
9169         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
9170
9171         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
9172         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
9173         (ves_icall_MonoGenericInst_GetFields): New interncall.
9174
9175         * class.c (mono_class_from_generic): Don't call
9176         mono_class_initialize_generic() if this is a dynamic instance;
9177         ie. it's being created from a TypeBuilder.
9178         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
9179         `class->byval_arg.type'.
9180
9181         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
9182         to `inflate_method' and made static.
9183         (mono_reflection_inflate_field): Removed.
9184         (mono_reflection_generic_inst_initialize): New public method.
9185
9186         * reflection.h (MonoReflectionGenericInst): Removed `methods',
9187         `ctors' and `fields'; added `initialized'.
9188
9189 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
9190
9191         * debug-helpers.c (mono_method_full_name): Fix output for empty
9192         namespaces.
9193
9194 2004-02-12  Martin Baulig  <martin@ximian.com>
9195
9196         * class.h (MonoClassField): Added `MonoType *generic_type'.
9197
9198         * reflection.c (mono_image_get_fieldref_token): Added support for
9199         instantiated generic types.
9200         (field_encode_inflated_field): Removed.
9201         (mono_image_get_inflated_field_token): Removed.
9202         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
9203
9204         * reflection.h (MonoReflectionInflatedField): Removed.
9205
9206 2004-02-12  Martin Baulig  <martin@ximian.com>
9207
9208         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
9209         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
9210
9211         * reflection.c (mono_image_get_methodspec_token): Take a
9212         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
9213         (mono_image_create_token): Check whether we have a
9214         `method->signature->gen_method' and call
9215         mono_image_get_methodspec_token() if appropriate.
9216         (inflated_method_get_object): Removed.
9217         (mono_reflection_bind_generic_method_parameters): Return a
9218         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
9219         (mono_reflection_inflate_method_or_ctor): Likewise.
9220
9221         * reflection.h (MonoReflectionInflatedMethod): Removed.
9222
9223 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
9224
9225         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
9226         for custom valuetype marshalling.
9227
9228         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
9229
9230 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9231
9232         * icall.c: fixed WSAGetLastError_internal name.
9233
9234 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
9235
9236         * threads.c (mono_thread_attach): Allow this to be called multiple
9237         times for a thread.
9238         
9239         * threads.c (build_wait_tids): Do not wait for ourselves.
9240
9241         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
9242         appdomain list is empty.
9243
9244         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
9245         memory returned by mono_string_builder_to_utf16, since it points into
9246         managed memory. Thanks to Bernie Solomon for noticing this.
9247
9248         * icall.c: Add AppDomainSetup icalls.
9249
9250         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
9251
9252         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
9253         types.
9254
9255         * reflection.c (reflection_methodbuilder_to_mono_method): Save
9256         custom attributes to the method_aux struct. Also fix array indexes etc.
9257
9258         * loader.c (mono_method_get_param_names): Make dynamic case work again.
9259         
9260 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
9261
9262         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
9263         (both static and runtime) and reduce startup time.
9264
9265 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
9266
9267         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
9268         AsAny marshalling conversion instead of crashing.
9269
9270         * marshal.c: Fix warnings.
9271
9272 2004-02-09  Martin Baulig  <martin@ximian.com>
9273
9274         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
9275
9276         * reflection.h (MonoReflectionInflatedMethod): Removed the
9277         `declaring' field, it's now in the unmanaged MonoGenericMethod.
9278
9279         * reflection.c (method_encode_methodspec): Removed the `method'
9280         argument; we get it from `gmethod->declaring'.
9281         (inflated_method_get_object): Removed the `declaring' argument.
9282
9283 2004-02-09  Martin Baulig  <martin@ximian.com>
9284
9285         * class.h (MonoGenericMethod): New type.
9286         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
9287         `generic_method'.
9288
9289         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
9290         a `MonoGenericMethod *gen_method' one.
9291
9292         * class.c (mono_class_inflate_generic_type): Take an additional
9293         `MonoGenericMethod * argument.  This is only non-NULL if we're
9294         inflating types for a generic method.   
9295         (mono_class_inflate_generic_signature): Renamed to
9296         inflate_generic_signature() and made static; take a
9297         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
9298         (inflate_generic_header): Take a `MonoGenericMethod *' argument
9299         instead of a `MonoGenericInst *' one.
9300         (mono_class_inflate_generic_method): Likewise.
9301
9302         * reflection.c (encode_generic_method_sig): Take a
9303         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
9304         (method_encode_methodspec): Likewise.
9305         (inflated_method_get_object): Likewise. 
9306
9307         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
9308         field with a `MonoGenericMethod *gmethod' one.  
9309
9310 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
9311
9312         * class.h (mono_class_has_parent): add parens to expansion
9313         so you can ! this.
9314
9315 2004-02-08  Martin Baulig  <martin@ximian.com>
9316
9317         * image.h (MonoImage): Removed `generics_cache'.
9318
9319         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
9320         instead of a `MonoType *' argument; removed the `inflate_methods'
9321         argument.  Don't inflate methods here.
9322
9323         * loader.c (find_method): If it's a generic instance, call
9324         mono_class_init() on the `sclass->generic_inst->generic_type'.
9325
9326         * metadata.c (mono_type_size): Make this work on uninitialized
9327         generic instances; call it on the `ginst->generic_type's class.
9328
9329         * reflection.c (mono_reflection_bind_generic_parameters): Call
9330         mono_class_from_generic() to create the `ginst->klass'.
9331
9332 2004-02-08  Martin Baulig  <martin@ximian.com>
9333
9334         * class.h (MonoClass): Changed type of `generic_inst' from
9335         `MonoType *' to `MonoGenericInst *'.
9336
9337 2004-02-08  Martin Baulig  <martin@ximian.com>
9338
9339         * icall.c (ves_icall_Type_BindGenericParameters): Just call
9340         mono_type_get_object(), this is now creating a `MonoGenericInst'
9341         for MONO_TYPE_GENERICINST.
9342         (ves_icall_MonoGenericInst_GetParentType): Likewise.
9343         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
9344
9345         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
9346         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
9347         (inflated_method_get_object): Added `MonoClass *refclass' argument.
9348         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
9349         and reflected type.
9350
9351         * reflection.h (MonoReflectionInflatedMethod): Removed
9352         `declaring_type' and `reflected_type'.
9353
9354 2004-02-08  Martin Baulig  <martin@ximian.com>
9355
9356         * class.h (MonoGenericInst): Added `MonoType *parent' and
9357         `MonoType **ifaces'.
9358
9359         * reflection.h (MonoReflectionGenericInst): Removed `klass',
9360         `parent' and `interfaces'.
9361
9362         * reflection.c (mono_reflection_bind_generic_parameters): Take a
9363         `MonoType *' argument and return a `MonoType *'.
9364
9365         * icall.c
9366         (ves_icall_MonoGenericInst_GetParentType): New interncall.
9367         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
9368
9369 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
9370
9371         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
9372         valuetype marshalling.
9373
9374 2004-02-06  Martin Baulig  <martin@ximian.com>
9375
9376         * class.c
9377         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
9378         (my_mono_class_from_generic_parameter): Likewise.
9379
9380 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
9381
9382         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
9383         contents of the symbol files lazily.
9384
9385         * object.h (MonoThread): Add 'name' and 'name_len' fields.
9386
9387         * threads.h threads.c icall.c: New icalls for getting and setting the
9388         threads name.
9389
9390 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
9391
9392         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
9393         Raise an exception when the domain is not found.
9394
9395 2004-02-03  Martin Baulig  <martin@ximian.com>
9396
9397         * reflection.c (mono_image_get_methodspec_token): Use the
9398         uninflated signature; fixes gen-33.
9399
9400 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
9401
9402         * gc.c threads.c: Make the finalizer thread a normal managed thread so
9403         the finalizer code can use thread functionality.
9404
9405         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
9406         the finalizer thread.
9407
9408         * threads.c: Make some functions more robust.
9409
9410         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
9411
9412         * metadata.h: Add new marshalling conventions.
9413
9414         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
9415         stringbuilder marshalling. Fixes #53700.
9416
9417         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
9418
9419         * reflection.c (mono_image_get_type_info): Save declarative security
9420         info.
9421
9422         * reflection.c (mono_image_get_field_info): Handle uninitialized 
9423         unmanaged fields as well.
9424
9425         * appdomain.c: Bump corlib version.
9426
9427 2004-02-01  Martin Baulig  <martin@ximian.com>
9428
9429         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
9430         method type arguments.  
9431
9432 2004-01-30  Duncan Mak  <duncan@ximian.com>
9433
9434         * marshal.h: Add prototype for
9435         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
9436         and
9437         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
9438         fix the build.
9439
9440 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
9441
9442         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
9443         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
9444
9445 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
9446
9447         * marshal.c (mono_marshal_get_native_wrapper): Add support for
9448         custom marshalling of valuetypes.
9449
9450         * marshal.c: Fix some warnings.
9451
9452 2004-01-29  Martin Baulig  <martin@ximian.com>
9453
9454         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
9455         for generic method parameters.
9456
9457         * reflection.c (method_encode_methodspec): Write the uninflated
9458         signature into the methodspec table.
9459         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
9460         is always the uninflated method.
9461         (reflection_methodbuilder_to_mono_method): Copy the generic
9462         parameters from the MethodBuilder into `header->gen_params'.
9463
9464 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
9465
9466         * class.c (mono_class_from_generic_parameter): Fix warning.
9467
9468 2004-01-27  Martin Baulig  <martin@ximian.com>
9469
9470         * class.c (mono_class_from_generic_parameter): Don't create
9471         `klass->methods' here.  
9472
9473 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
9474
9475         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
9476         extension since it does not work with libraries named lib<FOO>.dll.so.
9477
9478 2004-01-25  Martin Baulig  <martin@ximian.com>
9479
9480         * class.c (mono_class_inflate_generic_type): Added support for
9481         MONO_TYPE_GENERICINST.
9482
9483         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
9484         inflate methods on open constructed types.      
9485
9486 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9487
9488         * object.c: fire ProcessExit event in the root AppDomain after running
9489         Main. Fixes bug #53299.
9490
9491 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
9492
9493         * socket-io.c: include the new socket-wrappers.h header.
9494         Use the wrappers instead of the unix socket functions to make the code
9495         more clear.
9496
9497 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
9498
9499         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
9500
9501         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
9502         Fixes #22532.
9503
9504 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
9505
9506         * reflection.c (mono_image_create_pefile): Handle the case when the
9507         entry point is not a MethodBuilder.
9508
9509         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
9510         field to ReflectionMethod since it is not allways a builder.
9511
9512         * reflection.c (type_get_fully_qualified_name): New helper function to
9513         return the fully qualified name of a type.
9514
9515         * reflection.c (encode_marshal_blob): Always emit the fully qualified
9516         type name for custom marshallers.
9517
9518         * reflection.c (mono_marshal_spec_from_builder): Ditto.
9519
9520         * class.c (mono_class_setup_vtable): If a parent class already 
9521         implements an interface, use the implementing methods from that class.
9522         Fixes #53148.
9523
9524 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9525
9526         * threadpool.c: just return instead of ExitThread to allow for thread
9527         clean up earlier.
9528
9529 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
9530
9531         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
9532         when closing resource modules.
9533
9534         * reflection.c (mono_image_create_pefile): Handle the case when the
9535         entry point is not a MethodBuilder.
9536
9537         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
9538         field to ReflectionMethod since it is not allways a builder.
9539
9540 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
9541
9542         * marshal.c (mono_marshal_get_managed_wrapper): 
9543         mono_marshal_alloc takes native int so CONV_I
9544         the arg for 64bits.
9545
9546 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
9547
9548         * reflection.c (fixup_cattrs): New function to fixup the methoddef
9549         tokens in the cattr table. Fixes #53108.
9550
9551 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9552
9553         * loader.c: don't trim ".dll" before looking up in the config file.
9554         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
9555
9556 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
9557
9558         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
9559         Return the module which contains the resource as well.
9560         (ves_icall_System_Reflection_Module_Close): New icall.
9561
9562         * appdomain.c: Bump corlib version number.
9563
9564         * image.c (mono_image_addref): New public function.
9565
9566         * assembly.c: Call mono_image_addref.
9567
9568         * reflection.c (mono_module_get_object): Increase reference count of 
9569         the image.
9570
9571         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
9572         Fixes #22532.
9573
9574         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
9575         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
9576         proper exceptions on DllImport problems.
9577
9578 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
9579
9580         * class.c, metadata.c: eliminate CSIZE macro.
9581
9582 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
9583
9584         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
9585         * object.h: Added async_callback field in MonoAsyncResult.
9586         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
9587         * verify.c: Added async_callback in MonoAsyncResult layout.
9588
9589 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
9590
9591         * reflection.c (mono_reflection_get_custom_attrs): Add support
9592         for Modules.
9593
9594 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
9595
9596         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
9597         marshalling.
9598         (mono_marshal_method_from_wrapper): Add null pointer check.
9599
9600 2004-01-16  Martin Baulig  <martin@ximian.com>
9601
9602         * debug-mono-symfile.h: Set version number to 36 and reflect
9603         latest symbol writer changes.
9604
9605 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
9606
9607         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
9608         multi-dimensional arrays.
9609         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
9610         (mono_class_from_mono_type): Use bounded_array_class_get.
9611         
9612         * class.c (mono_bounded_array_class_get): New function which takes
9613         a 'bounded' bool argument to distinguish vectors from one dimensional
9614         arrays.
9615
9616         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
9617         bounded_array_class_get if the array has bounds.
9618
9619         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
9620         Search modules loaded using AssemblyBuilder:AddModule as well.
9621
9622 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9623
9624         * appdomain.c: increased corlib version.
9625         * filewatcher.c: removed g_print.
9626         * icall.c:
9627         (get_property_info): only allocate what is actually requested.
9628         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
9629
9630 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9631
9632         * Makefile.am: added filewatcher.[ch]
9633         * filewatcher.[ch]: FileSystemWatcher runtime support.
9634         * icall.c: added new FSW icalls.
9635
9636 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9637
9638         * string-icalls.c: fix stringbuilder regression as suggested by
9639         Iain McCoy <iain@mccoy.id.au>.
9640
9641 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
9642
9643         * process.c (process_read_stringtable_block): Recognize '007f' as
9644         a language neutral stringtable block.
9645
9646 2004-01-12  Patrik Torstensson
9647
9648         * object.h (MonoStringBuilder) : Changed layout to support our
9649         new stringbuilder class.
9650         * marshal.c: Change marshalling to support the new layout of 
9651         string builder.
9652         * appdomain.c: increased version number because new layout of
9653         string builder.
9654
9655 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
9656
9657         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
9658         assembly name as an string instead of an AssemblyName, since it is
9659         easier to extract info from it.
9660
9661         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
9662         the culture subdirectories too. Fixes #52231.
9663
9664 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9665
9666         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
9667         It takes 2 new parameters with an optional name for the method to look
9668         for and case ignoring info.
9669
9670         * threadpool.c: removed unused variable.
9671
9672 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9673
9674         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
9675         It takes 2 new parameters with an optional name for the property to look
9676         for and case ignoring info.
9677         Fixes bug #52753.
9678
9679 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
9680
9681         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
9682         Fix #52451.
9683
9684 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9685
9686         * appdomain.c:
9687         * assembly.c: escape the uri before passing it to g_filename_from_uri.
9688         Fixes bug #52630.
9689
9690 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
9691
9692         * reflection.c: Add support for more than one unmanaged resource.
9693
9694         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
9695         in field->def_value, as done in all other cases.
9696
9697         * reflection.c (mono_reflection_get_custom_attrs): Add support for
9698         TypeBuilders.
9699
9700         * reflection.c (mono_reflection_create_runtime_class): Remove 
9701         errorneous assignment to klass->element_class, since it is already
9702         done in mono_reflection_setup_internal_class.
9703
9704 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9705
9706         * gc.c: added missing LeaveCriticalSection.
9707         * icall.c: indented a couple of lines.
9708         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
9709         if we call EndInvoke inside a callback. Fixes bug #52601.
9710
9711 2004-01-07  Martin Baulig  <martin@ximian.com>
9712
9713         * mono-debug-debugger.h
9714         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
9715
9716 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
9717
9718         * appdomain.c: Use messages in NotImplementedException.
9719
9720         * exception.c (mono_get_exception_not_implemented): Now this takes
9721         a message argument.
9722
9723         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
9724         exception instead of g_asserting an aborting when something is not
9725         implemented.
9726
9727         Add some inline docs.
9728
9729 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
9730
9731         * reflection.h: Update after changes to object layout.
9732
9733         * reflection.c: Implement saving of unmanaged aka win32 resources.
9734
9735         * appdomain.c: Bump version number.
9736
9737         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
9738         Handle missing domains gracefully.
9739
9740 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
9741
9742         * file-io.c : On Windows, there are much more invalid_path_chars.
9743
9744 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
9745
9746         * class.h, object.c: prepare for GetType () speedup.
9747
9748 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
9749
9750         * profiler.c: workaround for --profile null reference exception on
9751           cygwin. Patch by Patrik Torstensson.
9752
9753 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
9754
9755         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
9756         make work for unaligned access.
9757
9758 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
9759
9760         * class.c: small cleanup (class->fields [i] -> field).
9761         * image.c: check address of metadata is valid.
9762
9763 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
9764
9765         * assembly.h assembly.c (mono_assembly_loaded): New public function to
9766         search the list of loaded assemblies.
9767
9768         * reflection.c (mono_reflection_type_from_name): Use 
9769         mono_assembly_loaded instead of mono_image_loaded.
9770
9771         * reflection.c: Fix warnings.
9772
9773 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
9774
9775         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
9776         is dynamic. This is needed since an assembly can contain both dynamic and
9777         non-dynamic images.
9778
9779         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
9780         assembly->dynamic.
9781
9782         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
9783
9784         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
9785         to store modules loaded using AddModule.
9786
9787         * reflection.c (mono_image_fill_file_table): Generalize this so it works
9788         on Modules.
9789
9790         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
9791
9792         * reflection.c (mono_image_fill_export_table_from_module): New function to
9793         fill out the EXPORTEDTYPES table from a module.
9794
9795         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
9796         into a separate function. Also handle loaded non-dynamic modules.
9797
9798         * reflection.c (mono_image_basic_init): Fix memory allocation.
9799
9800         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9801
9802         * assembly.c (mono_assembly_load_references): Make this public.
9803
9804 2003-12-19  Martin Baulig  <martin@ximian.com>
9805
9806         * class.c (mono_class_initialize_generic): Made this static, take
9807         a `MonoGenericInst *' instead of a `MonoClass *'.
9808         (mono_class_from_generic): Call mono_class_initialize_generic()
9809         unless we're already initialized or being called from
9810         do_mono_metadata_parse_generic_inst().
9811
9812         * class.h (MonoGenericInst): Added `initialized' and
9813         `init_pending' flags.
9814
9815         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
9816         `mono_class_init (gklass)' or mono_class_initialize_generic()
9817         here; set `generic_inst->init_pending' while parsing the
9818         `type_argv'.
9819
9820 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
9821
9822         * locales.c: include string.h for memxxx prototypes
9823
9824 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
9825
9826         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
9827         constructor when accessing literal fields.
9828
9829 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
9830
9831         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9832
9833         * reflection.c (assembly_add_resource_manifest): New function to fill
9834         the MANIFESTRESOURCE table.
9835
9836         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
9837
9838         * reflection.h: Update to changes in class layout.
9839
9840         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
9841         Reenable call to mono_runtime_is_shutting_down ().
9842
9843         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
9844         determine if the runtime is shutting down.
9845
9846 2003-12-16  Jackson Harper <jackson@ximian.com>
9847
9848         * icall.c: comment out call to mono_runtime_is_shutting_down to
9849         fix build.
9850         
9851 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
9852
9853         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
9854         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
9855
9856 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
9857
9858         * reflection.c: move definition of swap_with_size
9859         to before its first call
9860
9861 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
9862
9863         * appdomain.c (mono_runtime_is_shutting_down): New public function.
9864
9865         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
9866         icall.
9867
9868         * object.c: Fix warnings.
9869
9870         * icall.c (ves_icall_Type_Get...): Only consider inherited static
9871         members if FlattenHierarchy is set.
9872
9873         * reflection.c (mono_image_add_decl_security): New function to emit
9874         declarative security.
9875
9876         * reflection.h reflection.c: Add support for declarative security.
9877
9878         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
9879         
9880 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
9881
9882         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
9883         
9884         * appdomain.c verify.c: Moved corlib version checking into its own
9885         function in appdomain.c since it needs to create vtables etc.
9886
9887 2003-12-13  Patrik Torstensson <p@rxc.se>
9888
9889         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
9890         instead of unwrapped server.
9891
9892 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
9893
9894         * verify.c (check_corlib): Fix field index.
9895
9896 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
9897
9898         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
9899         GetGacPath icall.
9900
9901 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
9902
9903         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
9904         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
9905         cope with sizeof(size_t) != sizeof(guint32).
9906
9907 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9908
9909         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
9910         in case of failure.
9911
9912 2003-12-10  Mark Crichton <crichton@gimp.org>
9913
9914         * icall.c: removed the GetNonZeroBytes.  We now handle this case
9915         in managed code.
9916
9917         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
9918
9919 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
9920
9921         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
9922         marked as deleted.
9923
9924 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
9925
9926         * verify.c (check_corlib): Handle the case when the version field is 
9927         initialized by a static constructor.
9928
9929 2003-12-08  Patrik Torstensson  <p@rxc.se>
9930
9931     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
9932
9933 2003-12-08  Martin Baulig  <martin@ximian.com>
9934
9935         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
9936         a MonoReflectionGenericParameter, also take the parameter index
9937         and name as arguments.
9938         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
9939         (ves_icall_MonoGenericParam_initialize): New interncall.
9940         (ves_icall_Type_make_byref_type): New interncall.
9941
9942         * reflection.h (MonoReflectionGenericParam): Derive from
9943         MonoReflectionType, not just from MonoObject.  Added `refobj' and
9944         `index' fields.
9945
9946         * reflection.c (mono_reflection_define_generic_parameter): Create
9947         and return a new MonoReflectionGenericParam; don't initialize the
9948         constraints here.
9949         (mono_reflection_initialize_generic_parameter): New public method;
9950         initializes the constraints and creates the `param->pklass'.
9951
9952 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
9953
9954         * reflection.h reflection.c: Use the new fields 'num_types', 
9955         'num_fields' and 'num_methods' to track the number of types etc.
9956
9957         * verify.c (check_corlib): Check corlib version number.
9958
9959 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
9960
9961         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
9962         function works on all methods.
9963
9964 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
9965
9966         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
9967         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
9968         the custom_type_info flag of the transparent proxy.
9969         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
9970         objects that supports IRemotingTypeInfo.
9971         * object.h: Added custom_type_info field in transparent proxy.
9972
9973 2003-12-06  Martin Baulig  <martin@ximian.com>
9974
9975         * class.c (mono_class_create_from_generic): Removed.
9976         (mono_class_from_generic): Check `ginst->klass' before doing
9977         anything else.  This is important to fully support "recursive"
9978         generic types.
9979
9980         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
9981         empty `generic_inst->klass' before doing anything else.
9982
9983 2003-12-06  Dick Porter  <dick@ximian.com>
9984
9985         * verify.c: 
9986         * object.h:
9987         * icall.c:
9988         * locales.c: Use C structs to access class fields.  Don't do a
9989         conversion between MonoString and UChar because both are
9990         platform-endian UTF-16.  Compare now takes startindex and count
9991         parameters.  Add a char overload for IndexOf.  Speed up the
9992         invariant string IndexOf.
9993
9994 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
9995
9996         * Makefile.am (monosn_LDADD): Fix parallel build.
9997
9998 2003-12-04  Martin Baulig  <martin@ximian.com>
9999
10000         * icall.c
10001         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10002         (ves_icall_Type_make_array_type): New interncall.       
10003
10004 2003-12-04  Martin Baulig  <martin@ximian.com>
10005
10006         * locales.c: also change it in the !HAVE_ICU case.
10007
10008 2003-12-04  Dick Porter  <dick@ximian.com>
10009
10010         * icall.c:
10011         * locales.c: construct_compareinfo is now in CompareInfo, not
10012         CultureInfo.
10013
10014 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
10015
10016         * image.c (mono_image_load_file_for_image): Cache loaded images in the
10017         image->files array.
10018
10019         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
10020         table as well.
10021
10022         * assembly.c (mono_assembly_load_references): Only load references
10023         once.
10024
10025         * class.c (mono_class_from_name): Avoid linear search of the 
10026         EXPORTEDTYPE table.
10027
10028         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
10029
10030 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
10031
10032         * image.h (MonoImage): Add 'field_cache' field.
10033
10034         * loader.c (mono_field_from_token): Cache field lookups.
10035         
10036         * reflection.c (mono_module_get_object): Fix name property.
10037
10038         * icall.c (ves_icall_get_enum_info): Update after changes to 
10039         mono_metadata_get_constant_index ().
10040
10041         * icall.c: Get rid of get_type_info icall, use a separate icall for
10042         each type property to avoid needless memory allocations. Fixes #51514.
10043
10044         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
10045         to avoid needless binary searches.
10046
10047         * class.c (class_compute_field_layout): Move the initialization of
10048         field->def_value to mono_class_vtable ().
10049
10050         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
10051         non-corlib types.
10052
10053         * object.c (mono_object_allocate): Make it inline.
10054
10055         * object.c (mono_object_allocate_spec): Make it inline.
10056         
10057 2003-12-02  Dick Porter  <dick@ximian.com>
10058
10059         * locales.c (create_NumberFormat): NumberFormatInfo construction.
10060         Patch by Mohammad DAMT (mdamt@cdl2000.com).
10061
10062 2003-12-01  Dick Porter  <dick@ximian.com>
10063
10064         * threads.c: Fix signature and call in CreateMutex and
10065         CreateEvent.
10066
10067 2003-12-01  Dick Porter  <dick@ximian.com>
10068
10069         * icall.c: 
10070         * locales.c: Implement string compares and searching
10071
10072         * object.h: Add extra Thread field
10073
10074 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
10075
10076         * reflection.c (fixup_method): Add support for MonoCMethod.
10077
10078 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
10079
10080         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
10081
10082         * reflection.c (assembly_name_to_aname): Allow extra characters in
10083         assembly names. Fixes #51468.
10084
10085 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
10086
10087         * exception.c (mono_exception_from_name_domain): New helper function.
10088
10089         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
10090         exception object in the correct domain.
10091
10092         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
10093         formatting + make a copy a the input data.
10094
10095         * loader.c (mono_get_method_from_token): Methods which contain
10096         native code do not have entries in the ImplMap.
10097
10098         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
10099         Thanks to Gonzalo for spotting this.
10100         
10101         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
10102         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
10103
10104         * assembly.h (mono_assembly_load_from): Split the second part of 
10105         assembly loading into a new public function.
10106
10107         * exception.h (mono_get_exception_bad_image_format): New function.
10108
10109 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
10110
10111         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
10112         Enumerate all modules inside a dynamic assembly. Fixes #51293.
10113         
10114         * icall.c: Add new icall for creating dynamic methods.
10115
10116         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
10117
10118         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
10119
10120         * reflection.c (mono_reflection_create_dynamic_method): New icall to
10121         create a dynamic method.
10122
10123         * reflection.c (resolve_object): New helper function.
10124
10125         * reflection.c: Generalize ReflectionMethodBuilder and the functions
10126         which manipulate it so they can also work on dynamic methods.
10127
10128         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
10129         creating the MonoReflectionMethodAux structure if it is not needed.
10130         
10131         * reflection.h verify.c: Update after changes to object layout.
10132
10133         * reflection.c (method_builder_encode_signature): Fix compilation on
10134         gcc 2.95.x.
10135
10136 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
10137
10138         * appdomain.h: Added support for context static fields. Added static_data
10139           field to MonoAppContext and renamed thread_static_fields to a more
10140           generic special_static_fields in MonoAppDomain, since it can now contain
10141           context static fields.
10142         * domain.c: Updated hashtable name.
10143         * object.c: Replaced field_is_thread_static() for a more generic
10144           field_is_special_static() which also checks for context static attribute.
10145           In mono_class_vtable(), added support for static context fields.
10146         * threads.c: Changed methods that manage thread static fields to more
10147           generic methods so they can be reused both for thread and context static
10148           data.
10149         * threads.h: Declared some new methods.
10150
10151 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
10152
10153         * reflection.h: Update after changes to the managed types.
10154
10155         * reflection.c (encode_custom_modifiers): New helper function.
10156
10157         * reflection.c (method_encode_signature): Emit custom modifiers.
10158
10159         * reflection.c (field_encode_signature): Emit custom modifiers.
10160
10161 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
10162
10163         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
10164
10165         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
10166         implementation.
10167
10168         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
10169         icall.
10170
10171         * object.c (mono_field_get_value_object): New function.
10172
10173         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
10174         specific.
10175
10176 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
10177
10178         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
10179         return a preallocated out-of-memory exception instance.
10180
10181         * object.c (out_of_memory): Use the new function.
10182
10183         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
10184         flag is before the custom modifiers. Fixes #49802.
10185
10186 2003-11-16  Martin Baulig  <martin@ximian.com>
10187
10188         * class.c (mono_class_is_open_constructed_type): Implemented the
10189         MONO_TYPE_GENERICINST case.
10190
10191 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
10192
10193         * assembly.c (mono_assembly_fill_assembly_name): New function to
10194         fill out the MonoAssemblyName structure.
10195         (mono_assembly_open): Use the new function.
10196
10197         * icall.c (fill_reflection_assembly_name): New helper function.
10198
10199         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
10200         new function.
10201
10202         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
10203
10204 2003-11-15  Martin Baulig  <martin@ximian.com>
10205
10206         * class.c (mono_class_is_open_constructed_type): New public
10207         function; checks whether a type is an open constructed type,
10208         ie. whether it still contains type parameters.
10209         (mono_class_inflate_generic_type): If we're a type parameter and
10210         the inflated type is also a MONO_TYPE_(M)VAR, return the original
10211         type.
10212
10213         * class.h (MonoGenericInst): Added `guint32 is_open'.
10214
10215         * loader.c (method_from_methodspec): Check whether we're an open
10216         or closed constructed type and set `ginst->is_open'.
10217
10218         * reflection.c (mono_reflection_bind_generic_parameters): Check
10219         whether we're an open or closed constructed type and set
10220         `ginst->is_open'.
10221         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
10222         from open constructed types.
10223
10224 2003-11-15  Martin Baulig  <martin@ximian.com>
10225
10226         * reflection.c (mono_reflection_bind_generic_parameters): If we're
10227         a generic instance (instead of a generic type declaration) with
10228         unbound generic parameters, bind them to our actual types.
10229
10230 2003-11-14  Martin Baulig  <martin@ximian.com>
10231
10232         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
10233
10234         * reflection.c (mono_reflection_bind_generic_parameters): If we're
10235         an interface type, populate `res->interfaces' with instantiated
10236         versions of all the interfaces we inherit.
10237
10238 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
10239
10240         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
10241         when MONO_PATH is set but doesn't contain the install dir.
10242
10243 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10244
10245         * icall.c:
10246         (ves_icall_Type_GetInterfaces): don't return an interface twice when
10247         it's also implemented in base classes. Fixes bug #50927.
10248
10249 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
10250
10251         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
10252         if this method is called from a finalizer. Fixes #50913.
10253
10254 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
10255
10256         * threads.c: Implement VolatileRead/VolatileWrite
10257
10258         * icall.c: Add new icalls for VolatileRead/VolatileWrite
10259
10260 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
10261
10262         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
10263         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
10264         2.95.3.
10265
10266         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
10267         from Peter Ross (pro@missioncriticalit.com).
10268         
10269 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
10270
10271         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
10272
10273 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
10274
10275         * assembly.c (mono_assembly_load_references): Disable check because it
10276         triggers on older corlibs which lots of people have.
10277
10278 2003-11-12  Jackson Harper  <jackson@ximian.com>
10279
10280         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
10281         load corlib.dll if mscorlib.dll is not found.
10282         * assembly.h: Remove corlib name define.
10283         * class.c:
10284         * domain.c:
10285         * image.c: Change corlib name to mscorlib.
10286         
10287 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
10288
10289         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
10290
10291 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
10292
10293         * appdomain.h: Added loader_optimization here to sync with the C#
10294         code, and add disallow_binding_redirects field.
10295
10296 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
10297
10298         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
10299
10300         * reflection.c (mono_image_build_metadata): Fix crash on modules
10301         with no types.
10302
10303         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
10304
10305         * icall.c (ves_icall_get_method_info): Return callingConvention as
10306         well.
10307
10308         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
10309         namespaces from the EXPORTEDTYPE table as well.
10310
10311         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
10312         from all modules inside the assembly.
10313         
10314 2003-11-11  Martin Baulig  <martin@ximian.com>
10315
10316         * reflection.c (mono_reflection_bind_generic_parameters): Make
10317         this work for interfaces.
10318
10319 2003-11-11  Martin Baulig  <martin@ximian.com>
10320
10321         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
10322
10323 2003-11-11  Martin Baulig  <martin@ximian.com>
10324
10325         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
10326         "MonoInflatedMethod" and "MonoInflatedCtor".
10327
10328 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
10329
10330         * reflection.c (resolution_scope_from_image): Use the assembly table
10331         from the manifest module, since other modules don't have it.
10332
10333         * debug-helpers.c (mono_type_full_name): New helper function.
10334
10335         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
10336
10337         * image.c (mono_image_load_file_for_image): New public function which
10338         is a replacement for the load_file_for_image in class.c.
10339
10340         * assembly.c (mono_assembly_load_module): A wrapper for the function
10341         above which does assembly association and reference loading too.
10342
10343         * class.c (mono_class_from_name): Call mono_assembly_load_module.
10344
10345 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10346
10347         * appdomain.c: not all of the attributes for the full assembly name
10348         are required and the order doesn't matter. Fixes bug #50787.
10349
10350 2003-11-10  Dick Porter  <dick@ximian.com>
10351
10352         * locales.c: Use platform-endian UTF16
10353
10354 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
10355
10356         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
10357         
10358 2003-11-10  Martin Baulig  <martin@ximian.com>
10359
10360         * metadata.c
10361         (mono_metadata_load_generic_params): Make this actually work.
10362
10363         * reflection.c (mono_reflection_bind_generic_parameters): If our
10364         parent is a generic instance, pass all the `types' to it, no
10365         matter whether it has the same number of type parameters or not.
10366
10367 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
10368
10369         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
10370
10371         * assembly.c (mono_assembly_load_references): Move the image<->assembly
10372         assignment code to this function so it gets called recursively for all
10373         modules.
10374
10375         * image.c (load_modules): Remove the assembly assignment since it is
10376         now done by mono_assembly_load_references.
10377         
10378         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
10379         Add 'module' argument.
10380         (mono_module_get_types): New helper function.
10381         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
10382
10383 2003-11-08  Martin Baulig  <martin@ximian.com>
10384
10385         * class.c (mono_class_inflate_generic_method): Interface method
10386         don't have a header.
10387
10388         * reflection.c (mono_image_get_methodspec_token): Take an
10389         additional `MonoGenericInst *' argument instead of reading it from
10390         the header; this is necessary to support interfaces.
10391         (mono_image_create_token): Pass the `MonoGenericInst *' from the
10392         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
10393         (inflated_method_get_object): Take an additional `MonoGenericInst *'
10394         argument.
10395
10396         * reflection.h (MonoReflectionInflatedMethod): Added
10397         `MonoGenericInst *ginst'.
10398
10399 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
10400
10401         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
10402
10403 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
10404
10405         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
10406
10407 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
10408
10409         * reflection.c 
10410         (reflection_methodbuilder_from_method_builder):
10411         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
10412         initialize a ReflectionMethodBuilder structure.
10413         (mono_image_get_methodbuilder_token):
10414         (mono_image_get_ctorbuilder_token): New functions to emit memberref
10415         tokens which point to types in another module inside the same assembly.
10416
10417         * reflection.c: Use the new helper functions.
10418         
10419         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
10420
10421         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
10422         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
10423
10424         * reflection.c (resolution_scope_from_image): Emit a moduleref if
10425         neccesary.
10426
10427         * reflection.c (mono_image_build_metadata): Emit metadata only for the
10428         current module. Emit the manifest only for the main module.
10429
10430         * reflection.c (mono_image_create_token): Add assertion when a 
10431         memberref needs to be created.
10432
10433         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
10434
10435         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
10436         larger buffer for the custom attribute blob. Fixes #50637.
10437         
10438 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10439
10440         * threadpool.c: notify listener on async processing handles after
10441         invoking the async callback. Thanks to Zoltan.
10442
10443 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
10444
10445         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
10446         avoid code duplication.
10447
10448         * reflection.h (MonoDynamicImage): New type which is currently unused,
10449         but will be used through the ref.emit code in place of 
10450         MonoDynamicAssembly.
10451
10452         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
10453         object layout.
10454
10455         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
10456         a MonoDynamicImage instead of just a MonoImage.
10457         
10458         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
10459         icalls to ModuleBuilder but keep their semantics, so they will work
10460         with moduleb->assemblyb. This will change later.
10461         
10462 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
10463
10464         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
10465         object layout.
10466
10467         * reflection.c (mono_image_build_metadata): Avoid creation of a default
10468         main module, since it is now done by the managed code.
10469
10470 2003-11-03  Martin Baulig  <martin@ximian.com>
10471
10472         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
10473         `ginst->klass' here.
10474         (method_encode_methodspec): Don't use the `ginst->generic_method's
10475         klass if it's a generic instance, use `ginst->klass' in this case.
10476
10477 2003-11-03  Martin Baulig  <martin@ximian.com>
10478
10479         * reflection.c (mono_image_get_generic_method_param_info):
10480         Removed, use mono_image_get_generic_param_info() instead.
10481         (mono_image_get_type_info): Write the GenericParam table before
10482         the Method table.  This is neccessary because in the GenericParam
10483         table, type parameters of the class (ie. '!0' etc.) must come
10484         before the ones from its generic methods (ie. '!!0' etc).
10485
10486 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
10487
10488         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
10489
10490 2003-11-02  Martin Baulig  <martin@ximian.com>
10491
10492         * reflection.c (create_generic_typespec): Take a
10493         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
10494         the generic parameters from it.
10495
10496 2003-11-02  Martin Baulig  <martin@ximian.com>
10497
10498         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
10499         instead of a `MonoClassField *' since we just need the type.
10500         (create_generic_typespec): New static function.  Creates a
10501         TypeSpec token for a generic type declaration.
10502         (mono_image_get_generic_field_token): New static function.
10503         (mono_image_create_token): If we're a FieldBuilder in a generic
10504         type declaration, call mono_image_get_generic_field_token() to get
10505         the token.
10506
10507 2003-11-02  Martin Baulig  <martin@ximian.com>
10508
10509         * reflection.h
10510         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
10511         `MonoReflectionGenericInst *declaring_type' and
10512         `MonoReflectionGenericInst *reflected_type' fields.
10513
10514         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
10515         `MonoReflectionGenericInst *declaring_type' and a
10516         `MonoReflectionGenericInst *reflected_type' argument instead of a
10517         single `MonoReflectionGenericInst *type' one.  Set
10518         `res->declaring_type' and `res->reflected_type' from them.
10519         (mono_reflection_inflate_field): Likewise.      
10520
10521 2003-11-02  Martin Baulig  <martin@ximian.com>
10522
10523         * class.c (mono_class_setup_vtable): Don't store generic methods
10524         in the vtable.  
10525
10526 2003-11-02  Martin Baulig  <martin@ximian.com>
10527
10528         * reflection.h (MonoReflectionGenericInst): Added
10529         `MonoReflectionType *declaring_type'.
10530
10531         * reflection.c (mono_reflection_bind_generic_parameters): Use
10532         `if (tb->parent)' instead of `klass->parent'.
10533
10534 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
10535
10536         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
10537         with an empty ASSEMBLY table.
10538
10539         * reflection.c (mono_image_build_metadata): Avoid using the same loop
10540         variable in the inner and outer loops.
10541
10542 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
10543
10544         * metadata.h (mono_metadata_make_token): Put parentheses around macro
10545         argument.
10546
10547         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
10548         
10549         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
10550         icalls. Instead, do everything in managed code. This is needed since
10551         it is hard to restore the original domain etc. in unmanaged code in the
10552         presence of undeniable exceptions.
10553
10554         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
10555         New icalls to push and pop appdomain refs.
10556
10557 2003-10-31  Martin Baulig  <martin@ximian.com>
10558
10559         * class.c (inflate_generic_type): Renamed to
10560         mono_class_inflate_generic_type() and made it public.
10561
10562         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
10563         New interncall.
10564
10565         * loader.c (mono_field_from_memberref): Also set the retklass for
10566         typespecs.
10567
10568         * fielder.c (mono_image_get_inflated_field_token): New static
10569         method; creates a metadata token for an inflated field.
10570         (mono_image_create_token, fixup_method): Added support for
10571         "MonoInflatedField".
10572         (fieldbuilder_to_mono_class_field): New static function.
10573         (mono_reflection_inflate_field): New public function.
10574
10575         * reflection.h
10576         (MonoReflectionGenericInst): Added `MonoArray *fields'.
10577         (MonoReflectionInflatedField): New typedef.     
10578
10579 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
10580
10581         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
10582         for Solaris and other platforms without s6_addr16
10583
10584 2003-10-30  Martin Baulig  <martin@ximian.com>
10585
10586         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
10587         argument instead of two.
10588         (mono_class_inflate_generic_signature): Likewise.
10589         (inflate_generic_header): Likewise.
10590         (mono_class_inflate_generic_method): Likewise.  In addition, if
10591         `ginst->klass' is set, it becomes the new `method->klass'.
10592
10593         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
10594         field.
10595
10596         * reflection.c (encode_generic_method_sig): Write a 0xa as the
10597         first byte. [FIXME]
10598         (method_encode_methodspec): If we have generic parameters, create
10599         a MethodSpec instead of a MethodRef.
10600         (fixup_method): Added support for "MonoInflatedMethod" and
10601         "MonoInflatedCtor".
10602         (mono_image_create_token): Added support for "MonoInflatedMethod"
10603         and "MonoInflatedCtor".
10604         (inflated_method_get_object): New static function; returns a
10605         managed "System.Reflection.MonoInflatedMethod" object.
10606         (mono_reflection_bind_generic_method_parameters): Return a
10607         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
10608         (mono_reflection_inflate_method_or_ctor): Likewise.
10609         (mono_image_get_generic_method_param_info): Initialize unused
10610         fields to zero.
10611         (mono_image_get_generic_param_info): Likewise.
10612
10613         * reflection.h (MonoReflectionInflatedMethod): New public
10614         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
10615         "S.R.MonoInflatedCtor" classes.
10616
10617         * loader.c (method_from_memberref): If we're a TypeSpec and it
10618         resolves to a generic instance, inflate the method.
10619
10620 2003-10-28  Dick Porter  <dick@ximian.com>
10621
10622         * object.c (mono_runtime_run_main): Convert command-line arguments
10623         into utf8, falling back to the user's locale encoding to do so.
10624
10625 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
10626
10627         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
10628         at this time.
10629
10630         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
10631
10632         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
10633         up icalls at method definition time. Partially fixes #33569.
10634
10635 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
10636
10637         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
10638         marshalling of arrays. Fixes #50116.
10639
10640         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
10641
10642         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
10643         points to a vtable in the dying appdomain.
10644
10645         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
10646         listeners into unmanaged code inside the lock.
10647
10648         * object.c (mono_class_vtable): Turn off typed allocation in non-root
10649         domains and add some comments.
10650
10651 2003-10-25  Martin Baulig  <martin@ximian.com>
10652
10653         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
10654
10655         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
10656
10657         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
10658         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
10659         currently parsing.  Create the generic class and store it in
10660         `generic_inst->klass' before parsing the type arguments.  This is
10661         required to support "recursive" definitions; see mcs/tests/gen-23.cs
10662         for an example.
10663         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
10664         to support recursive typespec entries.
10665
10666         * class.c (mono_class_setup_parent): If our parent is a generic
10667         instance, we may get called before it has its name set.
10668         (mono_class_from_generic): Splitted into
10669         mono_class_create_from_generic() and mono_class_initialize_generic().
10670
10671 2003-10-25  Martin Baulig  <martin@ximian.com>
10672
10673         * icall.c (ves_icall_Type_BindGenericParameters): Return a
10674         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
10675         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
10676         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
10677
10678         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
10679         (create_typespec): Likewise.
10680         (mono_reflection_bind_generic_parameters): Return a
10681         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
10682         (mono_reflection_inflate_method_or_ctor): New public function.
10683
10684         * reflection.h (MonoReflectionGenericInst): New typedef.        
10685
10686 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
10687
10688         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
10689         inside the domain lock. Fixes #49993.
10690         
10691         * object.c (mono_class_vtable): When typed allocation is used, 
10692         allocate vtables in the GC heap instead of in the mempool, since the
10693         vtables contain GC descriptors which are used by the collector even
10694         after the domain owning the mempool is unloaded.
10695
10696         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
10697
10698         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
10699         reflect what it does. Also invalidate mempools instead of freeing
10700         them if a define is set.
10701
10702         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
10703         of the appdomain.
10704         
10705         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
10706         hold the finalizable objects in this domain.
10707
10708         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
10709         appdomain.
10710
10711         * appdomain.c (mono_domain_set): New function to set the current
10712         appdomain, but only if it is not being unloaded.
10713
10714         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
10715         appdomain which is being unloaded.
10716         
10717         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
10718         unloading of the root appdomain.
10719
10720         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
10721         icall to execute a method in another appdomain. Intended as a 
10722         replacement for InternalSetDomain, which can confuse the code 
10723         generation in the JIT.
10724
10725         * appdomain.c (mono_domain_is_unloading): New function to determine
10726         whenever an appdomain is unloading.
10727
10728         * appdomain.c (mono_domain_unload): New function to correctly unload
10729         an appdomain.
10730
10731         * assembly.c (mono_assembly_load_references): Check that an assembly
10732         does not references itself.
10733
10734         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
10735         domain manually, it asks the finalizer thread to do it, then waits for
10736         the result. Also added a timeout.
10737
10738         * icall.c: Register the new icalls.
10739
10740         * threads.h threads.c: Export the mono_gc_stop_world and 
10741         mono_gc_start_world functions.
10742         
10743         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
10744         function to fill out the mempool with 0x2a.
10745
10746 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
10747
10748         * reflection.h (MonoReflectionMethodAux): New structure to store
10749         information which is rarely used, thus is not in the MonoMethod
10750         structure.
10751
10752         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
10753         store the aux info.
10754
10755         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
10756         and marshalling info into the aux structure.
10757
10758         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
10759         from the aux structure.
10760
10761         * loader.c (mono_method_get_param_names): Retrieve the param names from
10762         the aux structure.
10763         
10764 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
10765
10766         * exception.h exception.c: Add AppDomainUnloadedException && fix 
10767         warning.
10768
10769 2003-10-21  Dick Porter  <dick@ximian.com>
10770
10771         * socket-io.c
10772         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
10773         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
10774
10775 2003-10-21  Martin Baulig  <martin@ximian.com>
10776
10777         * reflection.c (mono_reflection_bind_generic_parameters):
10778         `klass->parent' is NULL for interfaces.
10779
10780 2003-10-21  Martin Baulig  <martin@ximian.com>
10781
10782         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10783
10784 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
10785
10786         * exception.c (mono_exception_from_name_msg): New helper function for
10787         creating exceptions and initializing their message field.
10788
10789         * exception.c: Simplify functions using the new helper.
10790
10791         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
10792         New function.
10793
10794         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
10795         mono_raise_exception, since otherwise gcc doesn't generate the function
10796         epilog for raise_exception, confusing the stack unwinding in the JIT.
10797         Fixes #45043.
10798
10799         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
10800         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
10801         Fixes #49499.
10802
10803 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10804
10805         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
10806         utf8.
10807
10808 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
10809
10810         * icall.c: Removed GetUninitializedObject method because
10811           AllocateUninitializedClassInstance does the same.
10812
10813 2003-10-18  Martin Baulig  <martin@ximian.com>
10814
10815         * class.c (inflate_generic_signature): Renamed to
10816         mono_class_inflate_generic_signature() and made it public.
10817         (my_mono_class_from_generic_parameter): New static function; if we
10818         don't already have the generic parameter's MonoClass, create a
10819         very simple one which is just used internally in the runtime and
10820         not passed back to managed code.
10821
10822         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
10823
10824         * metadata.h (MonoMethodSignature): Moved the
10825         `MonoGenericParam *gen_params' to the MonoMethodHeader.
10826         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
10827
10828         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
10829         ves_icall_MonoMethod_GetGenericArguments(); this is now an
10830         interncall on the MonoMethod class, not on MethodInfo.
10831         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
10832         calling mono_reflection_bind_generic_method_parameters() directly.
10833
10834         * loader.c (mono_method_get_signature): If this is a MethodSpec;
10835         return the already computed `method->signature'.
10836         (method_from_methodspec): New static function to load a method
10837         from a MethodSpec entry.
10838         (mono_get_method_from_token): Call the new method_from_methodspec()
10839         for MethodSpec tokens.  
10840         (mono_get_method_from_token): If we're a generic method, load the
10841         type parameters.
10842
10843         * reflection.c (mono_image_get_memberref_token): Allow
10844         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
10845         table.
10846         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
10847         (mono_image_create_token): First check whether it's a generic
10848         method (so we'd need to create a MethodSpec), then do the other
10849         two alternatives.
10850         (mono_reflection_bind_generic_method_parameters): Return a
10851         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
10852         called directly from the interncall.
10853
10854 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
10855
10856         * reflection.c (load_public_key): Move loading of the public key
10857         into managed code.
10858
10859         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
10860
10861         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
10862         fields.
10863
10864         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
10865         culture, hash_alg and public_key. Fixes #49555.
10866
10867 2003-10-17  Martin Baulig  <martin@ximian.com>
10868
10869         * class.h (MonoGenericInst): Moved this declaration here and added
10870         `MonoMethod *generic_method'.
10871
10872         * icall.c
10873         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
10874         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
10875
10876         * metadata.c (mono_metadata_type_equal): Two types of
10877         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
10878         index; ie. don't compare the address of the `MonoGenericParam'
10879         structure.
10880         (mono_metadata_load_generic_params): Removed the `MonoMethod
10881         *method' argument.
10882
10883         * metadata.h (MonoGenericInst): Moved declaration to class.h.
10884         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
10885
10886         * reflection.c (method_encode_signature): Encode the number of
10887         generic parameters.
10888         (encode_generic_method_sig): New static function.
10889         (method_encode_methodspec): New static function; creates an entry
10890         in the MethodSpec table for a generic method.
10891         (mono_image_get_methodspec_token): New static function.
10892         (mono_image_create_token): Call mono_image_get_methodspec_token()
10893         for generic methods.
10894         (mono_reflection_bind_generic_method_parameters): New public
10895         function.  Instantiates a generic method.
10896
10897 2003-10-16  Martin Baulig  <martin@ximian.com>
10898
10899         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
10900         *gen_params' here from MonoMethodHeader.
10901
10902         * metadata.c (mono_metadata_parse_method_signature): If we have
10903         generic parameters, initialize `method->gen_params' and then set
10904         the correct `type->data.generic_param' in all the parameters.
10905
10906 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
10907
10908         * threads.c (mono_threads_get_default_stacksize): New function to 
10909         return the default stacksize.
10910
10911         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
10912         termination of the finalizer thread, since the previous method had
10913         race conditions. Fixes #49628.
10914
10915         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
10916         as for the other managed threads.
10917
10918 2003-10-16  Martin Baulig  <martin@ximian.com>
10919
10920         * class.c (inflate_generic_signature): Copy `generic_param_count'
10921         and `gen_params'.
10922
10923         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
10924         New interncall.
10925
10926         * metadata.c (mono_metadata_parse_method_signature): Actually set
10927         the `method->generic_param_count' here.
10928         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
10929
10930 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
10931
10932         * object.h: Add a new field to TypedRef to simplify the implementation
10933         of the REFANY opcodes in the JIT.
10934
10935         * icall.c: Make use of the new field.
10936
10937         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
10938         dynamically.
10939
10940 2003-10-15  Martin Baulig  <martin@ximian.com>
10941
10942         * class.c (mono_class_from_gen_param): Renamed to
10943         mono_class_from_generic_parameter() and moved most of the
10944         functionality from mono_reflection_define_generic_parameter()
10945         here; ie. we create a "real" class here.
10946         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
10947         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
10948         previously been called.
10949
10950         * class.h (MonoGenericParam): Moved the declaration of this struct
10951         here from metadata.h and added `MonoMethod *method'.
10952
10953         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
10954         interncall.
10955
10956         * loader.c (mono_get_method_from_token): If we have any generic
10957         parameters, call mono_metadata_load_generic_params() to read them
10958         from the MONO_TABLE_GENERICPAR.
10959
10960         * metadata.c (mono_metadata_load_generic_params): Added
10961         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
10962
10963         * metadata.h (MonoMethodSignature): Replaced
10964         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
10965         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
10966
10967         * reflection.c (mono_reflection_define_generic_parameter): Moved
10968         most of the functionality into the new
10969         mono_class_from_generic_parameter(); set the `method' field if
10970         we're a method parameter.       
10971
10972 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
10973
10974         * marshal.c (emit_struct_conv): if native size is 0
10975         emit no code.
10976
10977 2003-10-14  Martin Baulig  <martin@ximian.com>
10978
10979         * icall.c: The generics API has changed in the spec since it was
10980         added to System.Type; these modifications make it match the spec
10981         again.
10982         (ves_icall_Type_GetGenericParameters): Renamed to
10983         `ves_icall_Type_GetGenericArguments'.
10984         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
10985         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
10986         `ves_icall_MonoType_get_HasGenericArguments'.
10987         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
10988         `ves_icall_MonoType_get_IsGenericParameter'.
10989         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
10990         this is no interncall anymore.
10991         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
10992         `ves_icall_TypeBuilder_get_IsGenericParameter'.
10993
10994 2003-10-14  Martin Baulig  <martin@ximian.com>
10995
10996         * reflection.c (mono_reflection_bind_generic_parameters): Also
10997         inflate generic methods if we're reading the class from IL.
10998
10999 2003-10-13  Martin Baulig  <martin@ximian.com>
11000
11001         * reflection.c (mono_reflection_define_generic_parameter): This
11002         method isn't called directly from the icall anymore; take a
11003         `MonoReflectionAssemblyBuilder *' so we can use this for type and
11004         method generic parameters.
11005         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
11006         (method_builder_encode_signature): Encode generic parameters.
11007         (mono_image_get_method_info): Write generic params to the
11008         MONO_TABLE_GENERICPARAM table.
11009
11010         * reflection.h (MonoReflectionMethodBuilder): Added
11011         `MonoArray *generic_params'.
11012
11013         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
11014
11015         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
11016         wrapper for mono_reflection_define_generic_parameter().
11017         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
11018
11019 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
11020
11021         * marshal.h: Add missing function to fix build.
11022
11023         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
11024         the SetLastError pinvoke attribute.
11025
11026         * marshal.c (mono_marshal_set_last_error): New helper function called
11027         by the generated code.
11028         
11029         * marshal.c (mono_mb_emit_branch): New helper function.
11030
11031         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
11032
11033         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
11034         classes as parameters and return values of delegates. Fixes #29256. 
11035
11036 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
11037
11038         * locales.c: use gint32 in non HAVE_ICU case
11039
11040 2003-10-11  Martin Baulig  <martin@ximian.com>
11041
11042         * mono-debug.c (mono_debug_add_method): Added a workaround for
11043         bug #48591.
11044
11045 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
11046
11047         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
11048         delegates passed to native code must use the STDCALL calling 
11049         convention. Fixes #35987.
11050
11051 2003-10-10  Martin Baulig  <martin@ximian.com>
11052
11053         * class.c (inflate_generic_type): If we're inflating for a generic
11054         type instance (and not for a generic method), return
11055         MONO_TYPE_MVAR unchanged.
11056
11057 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11058
11059         * string-icalls.c: Join ignores null strings in the source array.
11060         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
11061         * threads.c: GetAvailableTheads is slightly more accurate.
11062
11063 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
11064
11065         * threads.h threads.c : add mono_threads_set_default_stacksize
11066         and pass default to CreateThread calls.
11067
11068 2003-10-09  Dick Porter  <dick@ximian.com>
11069
11070         * icall.c:
11071         * locales.h:
11072         * locales.c: Internal calls for constructing CultureInfo and
11073         related objects from libicu (if its available.)
11074
11075 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
11076
11077         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
11078
11079 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11080
11081         * threadpool.c: added an argument to async_invoke_thread that is the
11082         item to process, pass the MonoAsyncResult to the thread start function
11083         when creating a new thread. This way we don't need to acquire any lock
11084         when we're creating a new thread. Readded a semaphore for faster
11085         response times (instead of that Sleep i added).
11086
11087 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
11088
11089         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
11090         get daylight change dates better on Windows, fix handling
11091         of platforms without tm_gmtoff.
11092
11093 2003-10-06  Martin Baulig  <martin@ximian.com>
11094
11095         * class.c (inflate_generic_method): Renamed to
11096         mono_class_inflate_generic_method() and made public.
11097         (mono_class_init): Don't inflate the generic methods here.
11098         (mono_class_from_generic): Added `gboolean inflate_methods'
11099         argument.  Inflate the methods here.
11100
11101         * loader.c (mono_method_get_param_names): Ignore instances of
11102         generic types for the moment.
11103
11104         * reflection.c (fixup_method): Added support for inflated methods.
11105         (mono_image_create_token): Use mono_image_get_methodref_token()
11106         for inflated methods.
11107         (mono_custom_attrs_from_param): Ignore instances of generic types
11108         for the moment.
11109         (mono_reflection_bind_generic_parameters): New public function.
11110         Moved all the functionality from
11111         ves_icall_Type_BindGenericParameters() here and added support for
11112         dynamic types.
11113         (mono_reflection_define_generic_parameter): Initialize
11114         `klass->methods' here.
11115
11116         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
11117         functionality into mono_reflection_define_generic_parameter().
11118         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
11119         TypeBuilder, return that TypeBuilder.
11120
11121 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11122
11123         * appdomain.c: removed mono_delegate_semaphore.
11124
11125         * threadpool.c:
11126         (mono_thread_pool_add): moved hash table creation inside and the thread 
11127         creation outside of the critical region.
11128         (mono_thread_pool_finish): removed obsolete code.
11129         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
11130         continue or exit the thread depending on the queue.
11131
11132 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
11133
11134         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
11135         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
11136         handle more bool marshalling options
11137
11138 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
11139
11140         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
11141         arrays of structs. Also add a more descriptive error message when
11142         a structure member is marshalled as LPArray.
11143
11144 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
11145
11146         * marshal.c (mono_marshal_get_native_wrapper): Add support for
11147         marshalling arrays of complex types. Fixes #29098. Also remove an
11148         usused and incomplete function.
11149
11150 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
11151
11152         * gc.c: report heap_size - free_bytes as total memory allocated
11153         (bug#49362).
11154
11155 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
11156
11157         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
11158         fix timezone handling problems on Windows.
11159         
11160         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
11161         asserts when the year is outside the range handled by ms the functions.
11162
11163         * class.c (setup_interface_offsets): If the class is an interface,
11164         fill out its interface_offsets slot.
11165
11166 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11167
11168         * threadpool.c: mark threadpool threads as background.
11169
11170 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
11171
11172         * decimal.c - define DECINLINE to nothing if not using GCC
11173
11174 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
11175
11176         * assembly.c: More refcount fixes.
11177
11178 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11179
11180         * string-icalls.c: if we're not trimming, return the same string.
11181         When not splitting, don't create a new string.
11182
11183 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11184
11185         * image.c:
11186         (mono_image_open): increment the ref_count inside the critical section.
11187
11188 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
11189
11190         * image.c (mono_image_open): Fix reference counting bug.
11191
11192 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
11193
11194         * marshal.c (mono_marshal_type_size) struct alignment changed for 
11195         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
11196         64bits. Avoid leak in mono_marshal_get_native_wrapper when
11197         mono_lookup_pinvoke_call throws.        
11198
11199 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
11200
11201         * reflection.c (mono_reflection_parse_type): Fix #49114.
11202
11203         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
11204         temporary workaround for cygwin header problem.
11205
11206         * object.c (mono_object_isinst): Synchronize this with the code
11207         generated by the JIT for casts.
11208
11209 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
11210
11211         * reflection.c (encode_type): Fix #38332.
11212
11213 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
11214
11215         * marshal.c (mono_marshal_method_from_wrapper): New function to return
11216         the original method from the wrapper method.
11217
11218 2003-09-25  Martin Baulig  <martin@ximian.com>
11219
11220         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
11221         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
11222         (ves_icall_Type_get_IsGenericInstance): New interncall.
11223
11224 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
11225
11226         * object.c: fix cast warning in big endian code.
11227
11228 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
11229
11230         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
11231         
11232 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11233
11234         * assembly.c: don't call check_env from mono_assembly_load. It's
11235         already done once in mono_assemblies_init and may cause headaches when
11236         multiple threads are loading assemblies.
11237
11238 2003-09-19  Martin Baulig  <martin@ximian.com>
11239
11240         * reflection.c (mono_reflection_define_generic_parameter): Don't
11241         allocate `klass->methods', set `klass->flags' to
11242         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
11243
11244 2003-09-18  Martin Baulig  <martin@ximian.com>
11245
11246         * class.c (mono_class_init): Don't create `class->methods' if it's
11247         already initialized.
11248
11249         * metadata.c (mono_metadata_load_generic_params): Make this
11250         actually work.
11251
11252         * reflection.c (mono_reflection_define_generic_parameter): Set
11253         parent class and interfaces from the constraints.
11254
11255         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
11256         to keep this struct in sync with the declaration in TypeBuilder.cs.
11257
11258 2003-09-17  Martin Baulig  <martin@ximian.com>
11259
11260         * metadata.h (MonoType): Replaced the data's `int type_param'
11261         field with `MonoGenericParam *generic_param'.
11262         (MonoGenericParam): Added `MonoClass *klass'.
11263
11264         * class.c (mono_class_from_gen_param): Removed the
11265         `MonoImage *image' and `int type_num' arguments.
11266
11267         * metadata.c (mono_metadata_parse_generic_param): New static
11268         method; creates a MonoGenericParam which just contains the index.
11269         (do_mono_metadata_parse_type): Call
11270         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
11271         MONO_TYPE_MVAR.
11272
11273         * reflection.c (mono_image_typedef_or_ref): Generic type
11274         parameters may be in the same assembly, but never use a typedef
11275         for them.
11276         (mono_reflection_define_generic_parameter): We're now creating a
11277         "real" class for the type parameter; it's now safe to call
11278         mono_class_from_mono_type() on the class'es type, it'll do the
11279         right thing.
11280
11281 2003-09-16  Martin Baulig  <martin@ximian.com>
11282
11283         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
11284         `symfile->range_entry_size' and `symfile->class_entry_size' here;
11285         the `symfile' data structure must be fully initialized before it
11286         gets added to the table.
11287
11288 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
11289
11290         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
11291
11292         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
11293         class init trampolines.
11294
11295 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
11296
11297         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
11298         to the built-in profiler to turn off time and allocation profiling
11299         respectively.
11300
11301 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
11302
11303         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
11304         g_direct_equal.
11305
11306         * debug-helpers.c (mono_method_full_name): Print the wrapper type
11307         in human readable form.
11308
11309 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
11310
11311         * reflection.c icall.c: Fixed warnings.
11312
11313         * image.c (load_class_names): Use a temporary hash table to hold the
11314         namespaces in order to avoid doing many string comparisons.
11315
11316         * image.h: Fix typo.
11317
11318         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
11319         Pass NULL instead of g_direct_equal to the GHashTable constructor 
11320         since the NULL case is short-circuited inside g_hash_table_lookup, 
11321         leading to better performance.  
11322
11323         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
11324         obtain the first custom attribute for a given index. Depends on the
11325         CustomAttribute table being sorted by the parent field.
11326
11327         * reflection.c (mono_custom_attrs_from_index): Use the new function 
11328         for better performance.
11329
11330 2003-09-07  Martin Baulig  <martin@ximian.com>
11331
11332         * class.c (mono_class_init): If we're a generic instance, inflate
11333         all our methods instead of loading them from the image.
11334         (mono_class_from_generic): Set `class->methods = gklass->methods'.
11335
11336 2003-09-07  Martin Baulig  <martin@ximian.com>
11337
11338         * mono-debug-debugger.c: Added support for constructors.
11339
11340 2003-09-06  Martin Baulig  <martin@ximian.com>
11341
11342         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
11343         New interncall.
11344
11345         * reflection.c (mono_reflection_setup_generic_class): Call
11346         ensure_runtime_vtable() to create the vtable.
11347
11348 2003-09-05  Martin Baulig  <martin@ximian.com>
11349
11350         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
11351         MONO_TYPE_MVAR.
11352
11353 2003-09-04  Martin Baulig  <martin@ximian.com>
11354
11355         * reflection.c (mono_reflection_define_generic_parameter): Generic
11356         parameters start with zero.
11357
11358 2003-09-04  Martin Baulig  <martin@ximian.com>
11359
11360         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11361
11362         * reflection.h (MonoReflectionGenericParam): New typedef.
11363         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
11364         the generic parameters from the managed TypeBuilder.
11365
11366         * reflection.c (mono_reflection_define_generic_parameter): New function.
11367         (mono_reflection_create_runtime_class): Encode generic parameters.
11368         (mono_reflection_setup_generic_class): New function; this is
11369         called after adding adding all generic params to the TypeBuilder.
11370         (encode_type): Added MONO_TYPE_VAR.
11371
11372 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
11373
11374         * class.h class.c (mono_class_needs_cctor_run): Moved this method
11375         here from the JIT.
11376
11377         * assembly.h assembly.c: Moved the AOT loading code into an assembly
11378         load hook.
11379
11380 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
11381
11382         * reflection.h reflection.c class.h class.c: Delete duplicate 
11383         definition of mono_type_get_name () from reflection.c and export the
11384         one in class.c.
11385
11386         * class.c: Class loading fixes from Bernie Solomon 
11387         (bernard@ugsolutions.com).
11388
11389         * reflection.c: Endianness fixes from Bernie Solomon 
11390         (bernard@ugsolutions.com).
11391         
11392 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
11393
11394         * assembly.h assembly.c: Define a file format version for AOT
11395         libraries.
11396         
11397         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
11398
11399         * appdomain.h (MonoJitInfo): New field to determine whenever the
11400         code is domain neutral.
11401         
11402 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
11403
11404         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
11405
11406 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
11407
11408         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
11409         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
11410         Avoid caching the result since strings must be domain specific. Fixes
11411         #48050.
11412
11413 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
11414
11415         * marshal.c (mono_marshal_init): Make this callable multiple times
11416         since it is hard to find a correct place to call it.
11417
11418         * object.c (mono_runtime_class_init): Execute static constructors in
11419         the correct appdomain.
11420
11421         * image.c (build_guid_table): Handle the case when multiple images have
11422         the same GUID.
11423
11424 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11425
11426         * icall.c: added a couple of icalls for System.Web.
11427
11428 2003-08-28  Martin Baulig  <martin@ximian.com>
11429
11430         * icall.c (ves_icall_Type_BindGenericParameters): Use
11431         `klass->generic_inst' instead of `&klass->byval_arg' in the
11432         mono_type_get_object() call.  The returned type must be
11433         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
11434
11435 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
11436
11437         * NOTES: New file.
11438
11439         * object.c (mono_class_proxy_vtable): Make it thread safe.
11440
11441         * pedump.c: Fix warning.
11442
11443         * object.c appdomain.h: Get rid of metadata_section. 
11444         It is no longer needed and it was causing deadlocks with domain->lock.
11445
11446         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
11447
11448 2003-08-26  Martin Baulig  <martin@ximian.com>
11449
11450         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
11451
11452 2003-08-26  Martin Baulig  <martin@ximian.com>
11453
11454         * pedump.c (main): Call mono_metadata_init(),
11455         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
11456         and mono_loader_init().
11457
11458 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
11459
11460         * loader.h: Add missing include to fix build.
11461
11462         * image.h: mono_image_load_references is no more.
11463
11464         * assembly.c: Reworked assembly loading to make it really thread safe.
11465         After these changes, the assembly returned by mono_assembly_open is
11466         fully initialized, i.e. all its references assemblies are loaded.
11467
11468         * assembly.c (mono_image_load_references): Renamed to 
11469         mono_assembly_load_references, and made private, since clients no
11470         longer need to call it.
11471
11472         * class.c: Removed calls to mono_assembly_load_references, since it was
11473         a source of deadlocks.
11474
11475         * loader.h loader.c class.h class.c: Protect data structures using a 
11476         new lock, the loader lock.
11477
11478         * class.c (mono_class_setup_vtable): Create temporary hash tables and
11479         GPtrArrays only when needed.
11480
11481         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
11482         into empty structures by mcs. Fixes pinvoke7.cs.
11483         
11484         * domain.c (mono_init): Call a new initialization function.
11485
11486         * appdomain.c (mono_runtime_init): Call the new initializer function
11487         of the marshal module.
11488
11489         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
11490         inserted into empty structures by mcs. Fixes pinvoke7.cs.
11491
11492         * marshal.h marshal.c: Added locks around the wrapper caches to make
11493         this module thread safe.
11494
11495         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
11496         this argument. Fixes pinvoke1.exe.
11497
11498 2003-08-25  Lluis Sanchez <lluis@ximian.com>
11499
11500         * object.h: Added call_type field to MonoMethodMessage and the corresponding
11501         enumeration of values. Removed fields to store remote call output values in
11502         MonoAsyncResult. Not needed any more.
11503         * object.c: Initialize call_type and async_result fields in mono_message_init.
11504         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
11505         dispatching the message.
11506         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
11507         async call to finish. To do it use a message with EndInvoke call type.
11508
11509 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
11510
11511         * loader.h loader.c (mono_method_hash_marhal_info): New function which
11512         determines whenever a method has marshalling info.
11513
11514 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11515
11516         * assembly.c: fix the build on windows.
11517
11518 2003-08-22 Lluis Sanchez <lluis@ximian.com>
11519
11520         * object.cs: Fixed bug #47785.
11521
11522 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
11523
11524         * string-icalls.c (StringReplace): If their are no occurances of
11525         the old string found return a reference to the supplied
11526         string. This saves some memory and matches MS behavoir.
11527         
11528 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11529
11530         * socket-io.c: fixed compilation for systems that define AF_INET6
11531         and don't define SOL_IP/SOL_IPV6.
11532
11533 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
11534
11535         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
11536         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
11537
11538         * rawbuffer.c rawbuffer.h: Make this module thread safe.
11539
11540         * domain.c: Make this module thread safe.
11541
11542         * domain.c (mono_init): Call new initialization function.
11543
11544         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
11545         reference types too. Fixes #38812.
11546
11547         * image.c (mono_image_init): Fixed warnings.
11548
11549         * class.c (mono_class_from_typeref): Handle assembly load failure
11550         correctly.
11551
11552         * appdomain.c (add_assemblies_to_domain): Handle the case when
11553         the references of an assembly are not yet loaded.
11554
11555         * metadata.c image.c assembly.c: Moved initialization of global
11556         variables to a separate function called at startup since lazy 
11557         initialization of these variables is not thread safe.
11558         
11559         * image.c assembly.c: Made this module thread safe by adding locks in 
11560         the appropriate places.
11561
11562         * domain.c (mono_init): Call the new initialization functions of the
11563         three modules.
11564
11565 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
11566
11567         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
11568           make a direct call. It is proxy's work to make the call asynchronous.
11569           mono_delegate_end_invoke(): If the targe is a proxy, just collect
11570           the return values.
11571         * object.cs: mono_method_call_message_new(): read AsyncResult and
11572           state object from parameters list, if this info is requested.
11573         * object.h: Added fields to store remote call output values in
11574           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
11575
11576 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11577
11578         * object.h: add needed fields to MonoThread.
11579         * threads.c, threads.h: allow registering a function to cleanup data
11580         allocated per thread by the JIT.
11581
11582 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11583
11584         * loader.h: portability fix by Bernie Solomon
11585         * <bernard@ugsolutions.com>.
11586
11587 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
11588
11589         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
11590         return a MonoArray. This simplifies the code and also ensures that
11591         the cache allways contains an object reference as a value.
11592
11593         * icall.c (ves_icall_get_parameter_info): Simplified using the new
11594         function.
11595
11596 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11597
11598         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
11599         fixes a problem with byte ordering when getting the address family for
11600         a socket.
11601
11602 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
11603
11604         * .cvsignore: Added monosn.
11605
11606         * reflection.h reflection.c loader.c: Added support for parameter
11607         marshalling to dynamically created types. Fixes #47295.
11608
11609 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
11610
11611         * rand.c: remove useless warnings.
11612
11613 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11614
11615         * class.c: implemented ldtoken for methods and fieldrefs.
11616
11617 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11618
11619         * threadpool.c: when mono_async_invoke was called, no one took care of
11620         monitoring the queue. So if the method invoked took some time and we
11621         got new async invoke requests after 500 ms (the thread created waited
11622         that long in WaitForSingleObject), the new async invoke was not called
11623         until the previous one finished.
11624
11625         This is fixed now. Thanks to Totte for helping with it.
11626
11627 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11628
11629         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
11630
11631 2003-08-11  Martin Baulig  <martin@ximian.com>
11632
11633         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
11634
11635 2003-08-06  Martin Baulig  <martin@ximian.com>
11636
11637         * mono-debug-debugger.c: Added support for static fields,
11638         properties and methods.
11639
11640 2003-08-06  Martin Baulig  <martin@ximian.com>
11641
11642         * mono-debug-debugger.c: Don't store the MonoString's vtable to
11643         make this work for applications with multiple application domains.
11644
11645 2003-08-04  Martin Baulig  <martin@ximian.com>
11646
11647         * mono-debug-debugger.c: Completely reworked the type support; the
11648         most important thing is that we're now just using one single
11649         `MonoType' instance per type.
11650
11651 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
11652
11653         * mono-endian.h, mono-endian.c, icall.c: Added icall
11654         ves_icall_System_Double_AssertEndianity to assert double word endianity
11655         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
11656
11657 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11658
11659         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
11660         support, icalls and fixes.
11661
11662 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
11663
11664         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
11665         classes that are a punctuation character in .NET is not the same a
11666         g_unichar_ispunct.
11667
11668 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11669
11670         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
11671
11672 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
11673
11674         * icall.c: Add new MemCopy internalcall.
11675         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
11676         Simplified code; It is not necessary to handle all the cases here,
11677         as the C# code takes care of it.  Only handle the case of the name
11678         resource embedded into the assembly.
11679
11680         Changed signature to return the data pointer and the size of the
11681         data. 
11682
11683 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
11684
11685         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
11686         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
11687
11688 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
11689
11690         * socket-io.c: ignore EINTR error in select.
11691
11692 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
11693
11694         * class.h, class.c: removed unused subclasses field in MonoClass.
11695
11696 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
11697
11698         * icall.c: improve fix of get_base_definition(). If the parent class
11699           doesn't have the mehod, look at the parent of the parent.
11700         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
11701           to check if a parameter is an in or out parameter
11702           (PARAM_ATTRIBUTE_IN is not set by default).
11703           mono_method_return_message_restore(): Use mono_class_value_size to
11704           get the size of a value type. mono_type_stack_size (parameterType)
11705           does not return the correct value if parameterType is byRef.
11706           mono_load_remote_field(), mono_load_remote_field_new(),
11707           mono_store_remote_field(), mono_store_remote_field_new():
11708           raise exception if the remote call returns an exception.
11709
11710 2003-07-28  Martin Baulig  <martin@ximian.com>
11711
11712         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
11713         method.  This is a wrapper around mono_runtime_invoke() which
11714         boxes the instance object if neccessary.
11715
11716 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11717
11718         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
11719         metadata.h, row-indexes.h, verify.c: first cut of generics support.
11720
11721 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11722
11723         * icall.c: disable mcs bug workaround.
11724
11725 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
11726
11727         * object.c (mono_runtime_class_init): Take the metadata_section
11728         mutex before obtaining the domain mutex.
11729
11730         * appdomain.h: Added definition of metadata_section mutex here. 
11731
11732         * object.c: define metadata_mutex here.
11733
11734 2003-07-24  Ravi Pratap  <ravi@ximian.com>
11735
11736         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
11737         fixed.
11738
11739 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
11740
11741         * reflection.c: Fix bug #46669
11742
11743 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11744
11745         * exception.c:
11746         * exception.h:
11747         * icall.c:
11748         * object.h: fill in the type name for TypeLoadException.
11749
11750 2003-07-23  Ravi Pratap  <ravi@ximian.com>
11751
11752         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
11753         relationship between TypeBuilders while compiling corlib) and bug
11754         45993 (Array types returned from the runtime while compiling
11755         corlib were from the loaded corlib).
11756
11757 2003-07-22  Martin Baulig  <martin@ximian.com>
11758
11759         * mono-debug-debugger.c: Reworked the type support a bit more;
11760         distinguish between types and classes.
11761
11762 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
11763
11764         * icall.c: add IsArrayImpl icall.
11765
11766 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
11767
11768         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
11769         initializing real_size only once. Also fix bug #46602.
11770
11771 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
11772
11773         * object.c: Renamed mono_metadata_section to metadata_section.
11774
11775 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
11776
11777         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
11778           empty array if the type is an array. Fixed.
11779           ves_icall_MonoMethod_get_base_definition: if the base method
11780           is abstract, get the MethodInfo from the list of methods of
11781           the class.
11782         * reflection.c: ParameterInfo.PositionImpl should be zero-based
11783           and it was 1-based. Fixed in mono_param_get_objects.
11784
11785 2003-07-20  Martin Baulig  <martin@ximian.com>
11786
11787         * mono-debug.h: Set version number to 31.
11788         (mono_debug_init): Added `MonoDomain *' argument.
11789
11790         * mono-debug-debugger.c: Reworked the type support; explicitly
11791         tell the debugger about builtin types; pass the `klass' address to
11792         the debugger.
11793
11794 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
11795
11796         * image.c: Allow new metadata tables to be loaded without a
11797         warning. Also update the warning message to give the new constant value.
11798                 
11799 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
11800
11801         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
11802         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
11803         array type representation changes.
11804
11805 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11806
11807         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
11808         on Environment.Exit () call.
11809
11810 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11811
11812         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
11813         requires a matching corlib.
11814
11815 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
11816
11817         * Changelog: My editor decided to add a CR to each line. Sorry about that.
11818           Committed again without the CRs.
11819         
11820 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
11821
11822         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
11823           getting it from the "this" socket instance. Did not work
11824           if the socket is a subclass of Socket.
11825           Also fixed bug #35371.
11826
11827 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
11828
11829         * metadata.c: fixed size for TypedByRef.
11830         * loader.c: when searching for a method, consider the vararg amrker.
11831         * unicode.c, decimal.c: constify some arrays.
11832
11833 2003-07-15  Dick Porter  <dick@ximian.com>
11834
11835         * socket-io.c: Fixed compilation for gcc < 3.2.
11836
11837         Fixed compilation for machines that don't have AF_INET6 (thanks to
11838         Bernie Solomon <bernard@ugsolutions.com> for that part.)
11839
11840         Fixed compile warnings.
11841         
11842         Fixed formatting and line endings.
11843
11844 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
11845
11846         * socket-io.h:
11847         * socket-io.c: Added IPv6 support.
11848
11849 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
11850
11851         * class.c (mono_class_is_assignable_from): New function to implement
11852         the is_assignable_from logic. Used by mono_object_isinst, 
11853         Type::IsAssignableFrom () and the interpreter.
11854
11855         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
11856         Object, even interfaces.
11857         
11858         * object.c (mono_object_isinst): Implement in terms of 
11859         is_assignable_from.
11860
11861         * icall.c (ves_icall_type_is_assignable_from): New icall.
11862
11863 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
11864
11865         * domain.c (foreach_domain): fix compiler warning.
11866
11867 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
11868
11869         * image.c (load_metadata_ptrs): use g_strndup because strndup is
11870         not available on all plattforms
11871
11872 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
11873
11874         * image.h image.c: Store the metadata version string in MonoImage.
11875         * icall.c: New icall to retrieve the image version.
11876         * reflection.c (create_dynamic_image): Fill in the image version field
11877         * reflection.c (build_compressed_metadata): Use the image version
11878         from the image structure.
11879
11880 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11881
11882         * appdomain.c: modified comment.
11883         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
11884         That will be its last iteration when mono_gc_cleanup is called from
11885         mono_runtime_cleanup and before the domain is unloaded.
11886
11887         Fixes bug #45962.
11888
11889 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
11890
11891         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
11892         attributes.
11893
11894 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11895
11896         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
11897         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
11898         Bernie Solomon <bernard@ugsolutions.com>.
11899
11900 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
11901
11902         * object.c, object.h: provide mono_object_new_fast() for faster
11903         allocation in some special cases.
11904
11905 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
11906
11907         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
11908         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
11909
11910 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
11911
11912         * threadpool.c: fix leaks.
11913
11914 2003-07-01  Dick Porter  <dick@ximian.com>
11915
11916         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
11917         using MonoGHashTables.  Fixes threadpool bug posted to list.
11918
11919 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
11920
11921         * image.h, image.c: added support to load an assembly from a byte array.
11922         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
11923         assembly bundle support.
11924
11925 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
11926
11927         * threadpool.c (mono_thread_pool_add): keep a reference to the
11928         AsyncResult to prevent GC
11929
11930 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
11931
11932         * class.c: leak fix.
11933
11934 2003-06-25  Dick Porter  <dick@ximian.com>
11935
11936         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
11937         for the async object, the WaitHandle object will close the handle.
11938         Fixes bug 45321.
11939
11940 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
11941
11942         * class.c: in mono_array_class_get (), lookup from the hash with the
11943         same type we insert: this works around a bug in
11944         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
11945         lluis. The real fix will have to wait for after the release.
11946
11947 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11948
11949         * icall.c: fix memory leak when getting type members.
11950
11951 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
11952
11953         * reflection.c: added more pubtoken special cases.
11954
11955 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
11956
11957         * class.c: handle field offset correctly when class size
11958         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
11959
11960 2003-06-20  Martin Baulig  <martin@ximian.com>
11961
11962         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
11963         *image' field.
11964
11965 2003-06-20  Martin Baulig  <martin@ximian.com>
11966
11967         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
11968
11969 2003-06-20  Martin Baulig  <martin@ximian.com>
11970
11971         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
11972         just distinguish between variables in registers and variables at
11973         an offset relative to a register.
11974
11975 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11976
11977         * icall.c: #ifdef out latest changes until mcs is fixed.
11978
11979 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11980
11981         * icall.c: return members in metadata order.
11982
11983 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11984
11985         * icall.c: avoid infinite loop in GetTimeZoneData.
11986
11987 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
11988
11989         * icall.c: added Marshal.Prelink/All icalls.
11990
11991 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
11992
11993         * object.c, object.h: fix warnings and do some overflow checking
11994         when creating arrays.
11995
11996 2003-06-17  Dick Porter  <dick@ximian.com>
11997
11998         * file-io.h:
11999         * file-io.c: File attributes need to be tweaked slightly when
12000         passed from the managed to the w32 world.
12001
12002 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12003         * profiler.h profiler-private.h profiler.c: Rework last patch
12004         based on suggestion by Paolo.
12005         
12006 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12007
12008         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
12009         instruction level coverage data collection.
12010         * profiler.h profiler.c (: Added new callback function which can be
12011         used by the profiler to limit which functions should have coverage
12012         instrumentation.
12013         * profiler.c (mono_profiler_load): Call g_module_build_path to
12014         generate the file name of the profiler library.
12015
12016 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12017
12018         * profiler.c, profiler.h, profiler-private.h: added basic block 
12019         coverage profiling API.
12020
12021 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
12022
12023         * reflection.c (mono_reflection_create_runtime_class): Add support
12024         for events in dynamically generated code.
12025
12026         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
12027         not allocated.
12028
12029 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12030
12031         * icall.c: when getting timezone info, return reasonable values if we
12032         can't get the actual data.
12033
12034 2003-06-14  Dick Porter  <dick@ximian.com>
12035
12036         * threads.c (start_wrapper): Remove the reference to the thread
12037         object in the TLS data, so the thread object can be finalized.
12038         This won't be reached if the thread threw an uncaught exception,
12039         so those thread handles will stay referenced :-( (This is due to
12040         missing support for scanning thread-specific data in the Boehm GC
12041         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
12042
12043 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
12044
12045         * reflection.c: ensure streams and tables are first allocated with
12046         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
12047
12048 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12049
12050         * icall.c: fixed GetElementType for byrefs (bug# 44792).
12051
12052 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
12053
12054         * reflection.c (mono_reflection_create_runtime_class): Add support for
12055         properties to dynamically created classes.
12056         * reflection.c: Fix a few places where non-MonoObjects were inserted
12057         into the tokens hashtable.
12058
12059 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12060
12061         * object.c: some support to handle out of memory exceptions.
12062
12063 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
12064
12065         * marshal.c (mono_marshal_get_native_wrapper): support reference
12066         return types
12067
12068 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12069
12070         * object.h, object.c: more portability stuff from Bernie Solomon.
12071         Unexport mono_object_allocate(). Added mono_object_unbox ().
12072         Set exitcode when an unhandled exception is thrown.
12073
12074 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
12075
12076         * marshal.c (mono_marshal_get_native_wrapper): use custom
12077         marshaler for return types.
12078
12079 2003-06-10  Dick Porter  <dick@ximian.com>
12080
12081         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
12082         ip_mreq is available
12083
12084 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
12085
12086         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
12087         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
12088         by Bernie Solomon <bernard@ugsolutions.com>.
12089
12090 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
12091
12092         * gc.c (mono_gc_init): Avoid error message on shutdown when
12093         GC_DONT_GC=1 is used.
12094
12095         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
12096         New icall to return the GUID of a module.
12097
12098 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12099
12100         * class.c: ensure instance size always includes the parent's size
12101         even whem class size is set explicitly (fixes bug#44294).
12102
12103 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12104
12105         * profiler.h, profiler.c: made the simple profiler thread-safe,
12106         get more accurate timing info. Allow the loading of an
12107         externally-developed profiler module.
12108
12109 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
12110
12111         * marshal.c (mono_marshal_get_native_wrapper): improved
12112         class/byref arguments.
12113         (mono_marshal_get_native_wrapper): better string marshaling support.
12114
12115 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12116
12117         * class.c: ensure .pack and .size are handled correctly and
12118         simplified layout of static fields.
12119
12120 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12121
12122         * appdomain.c
12123         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
12124
12125         * loader.c (mono_lookup_pinvoke_call): look for modules in the
12126         current directory (fix bug 44008)
12127
12128 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
12129
12130         * marshal.c (mono_marshal_get_native_wrapper): started support for
12131         custom marshalers.
12132         (mono_delegate_to_ftnptr): consider marshalling specifications
12133
12134 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12135
12136         * reflection.c, reflection.h: emit custom marshal info.
12137
12138 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12139
12140         * object.c: free the GError.
12141         * icall.c: added CloseEvent_internal.
12142         * threads.[ch]:
12143         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
12144         call.
12145
12146 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
12147
12148         * loader.c (mono_method_get_signature): Add support for dynamic
12149         assemblies.
12150
12151 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12152
12153         * reflection.c: fixed bug #43905.
12154
12155 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12156
12157         * class.c, domain.c, icall.c, metadata.h, object.h: support for
12158         handling TypedReference and ArgIterator.
12159         * loader.c, loader.h: added function to get signature at call site.
12160
12161 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12162
12163         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
12164         data readonly. Buglets and warning fixes. Some MethodSpec support.
12165
12166 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12167
12168         * class.h, class.c, object.c: remove relative numbering support.
12169
12170 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
12171
12172         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
12173         free the string, until we get a chance to fix Gtk#
12174
12175 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12176
12177         * marshal.c: revert last patch.
12178
12179 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12180
12181         * icall.c: updates for new mono_class_vtable() not calling
12182         the type constructor anymore.
12183
12184 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12185
12186         * object.h, object.c: separate vtable creation from type
12187         initialization. Make running the .cctor thread safe.
12188
12189 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
12190
12191         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
12192
12193 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
12194
12195         * loader.c (mono_get_method): consider calling convention
12196
12197 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
12198
12199         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
12200         to return the invisible global type for a module.
12201
12202         * reflection.c (mono_image_build_metadata): Emit global fields too.
12203
12204 2003-05-20  Peter Williams  <peterw@ximian.com>
12205
12206         * loader.c (mono_lookup_internal_call): Add a few newlines.
12207
12208 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
12209
12210         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
12211         literal strings.
12212
12213         * appdomain.c (set_domain_search_path): Recalculate search path when
12214         AppDomainSetup.PrivateBinPath changes.
12215
12216         * object.c (mono_class_compute_gc_descriptor): It turns out some
12217         parts of the class libs (like System.Thread) holds pointers to
12218         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
12219         to treat native int a pointer type here.
12220         
12221 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
12222
12223         * appdomain.h, domain.c: add hashtable for jump target resolution.
12224
12225 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
12226
12227         * reflection.h reflection.c icall.c: Added new icalls 
12228         GetManifestResourceInfoInternal, GetModulesInternal and support
12229         infrastructure.
12230
12231 2003-05-16  Dick Porter  <dick@ximian.com>
12232
12233         * icall.c:
12234         * file-io.h:
12235         * file-io.c: Implement System.IO.MonoIO::GetTempPath
12236
12237 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
12238
12239         * object.c: mono_store_remote_field: little fix to previous patch.
12240
12241 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12242
12243         * class.c: add constructors to array classes.
12244         * icall.c: special case array construction for InternalInvoke (),
12245
12246 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
12247
12248         * class.h class.c reflection.c object.c: Added support for field
12249         defaults in dynamically generated classes.
12250
12251 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12252
12253         * reflection.c: properly encode charset for ddlimport.
12254
12255 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
12256
12257         * threads.c: allow compiling without GC.
12258
12259 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12260
12261         * appdomain.h, object.c, object.h, threads.c, threads.h: added
12262         handling of thread static data.
12263
12264 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12265
12266         * reflection.h, reflection.c: added mono_custom_attrs_free ().
12267
12268 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
12269
12270         * class.c (mono_array_class_get): always set the serializable flags
12271         (mono_array_class_get): always set the SEALED attribute for array types
12272
12273 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
12274
12275         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
12276         attributes (fix for bug 42021).
12277
12278 2003-05-12  Dick Porter  <dick@ximian.com>
12279
12280         * gc.c: Don't run finalizers when the finalizer thread is
12281         finishing up, because the default domain has already been
12282         destroyed.
12283
12284 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
12285
12286         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
12287         value is null, we should throw an exception.   This is slightly
12288         different than the other conventions used for the constructor.
12289
12290 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12291
12292         * socket-io.c: fixed windows build.
12293
12294 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12295
12296         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
12297
12298 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
12299
12300         * object.c (mono_string_new_wrapper): Compatibility fix for MS
12301         compilers.
12302
12303 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
12304
12305         * class.c (mono_class_layout_fields): Add experimental GC aware
12306         auto layout facility. Requires class library changes to work correctly.
12307
12308         (mono_class_setup_vtable): Avoid overriding explicit interface
12309         method implementations. Fixes iface3.exe test.
12310
12311         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
12312         object reference.
12313         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
12314         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
12315
12316         * metadata.h: Add new type classification macro which determines
12317         whenever the type holds an object reference.
12318
12319 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
12320
12321         * marshal.c (mono_marshal_get_native_wrapper): cleanups
12322
12323 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
12324
12325         * gc.c (finalizer_thread): Work around a GC bug.
12326
12327 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
12328
12329         * marshal.c (emit_struct_conv): allow unions
12330
12331         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
12332
12333 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
12334
12335         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
12336
12337 2003-05-06  Martin Baulig  <martin@ximian.com>
12338
12339         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
12340
12341 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12342
12343         * socket-io.c:
12344         (Select_internal): allow NULLs, don't create arrays if not needed.
12345         Coupled with Socket.cs changes.
12346
12347         * threadpool.c:
12348         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
12349         register a finalizer for it that will close the semaphore handle. This
12350         fixes the leak and make Lupus' test run with > 4080 loops.
12351
12352 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
12353
12354         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
12355         Jerome Laban (bug #42287)
12356
12357 2003-05-02  Martin Baulig  <martin@ximian.com>
12358
12359         * debug-mono-symfile.h
12360         (MonoSymbolFile): Moved declaration into mono-debug.h.
12361         (MonoDebugMethodJitInfo): Likewise.
12362         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
12363         argument.
12364         (_mono_debug_address_from_il_offset): Take a
12365         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
12366
12367         * mono-debug.h
12368         (MonoDebugDomainData): New struct.
12369         (mono_debug_get_domain_data): New function.
12370         (mono_debug_add_method): Take an additional `MonoDomain *'
12371         argument.
12372         (mono_debug_source_location_from_address): Likewise.
12373         (mono_debug_il_offset_from_address): Likewise.
12374         (mono_debug_address_from_il_offset): Likewise.
12375
12376 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
12377
12378         * reflection.c: one more check for null type in custom attrs.
12379
12380 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12381
12382         * reflection.c: avoid warning (comparison is always false due to limited
12383         range of data type).
12384
12385 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12386
12387         * icall.c: throw an exception in Type.GetField if the argument 'name'
12388         is NULL.
12389
12390 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
12391
12392         * reflection.c: fixed handling of enums in named arguments to custom
12393         attributes (bug #42123).
12394
12395 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12396
12397         * reflection.c: use the right array element type and handle
12398         a null for a Type argument, too.
12399
12400 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
12401
12402         * reflection.c: handle arrays as arguments to custom attributes.
12403
12404 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12405
12406         * reflection.c: handle a string value in a custom attr
12407         ctor that takes an object.
12408
12409 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
12410
12411         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
12412         (fix bug #42063)
12413
12414 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
12415
12416         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
12417
12418 2003-04-27  Martin Baulig  <martin@ximian.com>
12419
12420         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
12421         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
12422         MONO_DEBUGGER_EVENT_BREAKPOINT.
12423         (mono_breakpoint_trampoline_code): Removed.
12424         (mono_debugger_event_handler): The last argument is now a
12425         `guint32'.
12426         (mono_debugger_insert_breakpoint_full): Removed the
12427         `use_trampoline' argument.
12428         (mono_debugger_method_has_breakpoint): Likewise.
12429         (mono_debugger_trampoline_breakpoint_callback): Renamed to
12430         mono_debugger_breakpoint_callback(); take the method and
12431         breakpoint number as arguments.
12432
12433 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12434
12435         * metadata.c: fix off by one when loading parameters attributes.
12436
12437 2003-04-24  Martin Baulig  <martin@ximian.com>
12438
12439         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
12440
12441 2003-04-24  Martin Baulig  <martin@ximian.com>
12442
12443         * mono-debug-debugger.c: Moved all code which interacts with the
12444         Mono Debugger here.
12445
12446         * debug-mono-symfile.c: This code now just deals with the symbol
12447         file itself, the debugger code is now in mono-debug-debugger.c.
12448
12449 2003-04-23  Martin Baulig  <martin@ximian.com>
12450
12451         * mono-debug.c (mono_debug_source_location_from_il_offset):
12452         New method; like mono_debug_source_location_from_address(), but
12453         takes an IL offset instead of a machine address.
12454
12455 2003-04-23  Martin Baulig  <martin@ximian.com>
12456
12457         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
12458         `line' field; this is now computed by the debugger.
12459
12460 2003-04-23  Martin Baulig  <martin@ximian.com>
12461
12462         * mono-debug.[ch]: New files.  This is the new debugging interface.
12463
12464         * mono-debug-debugger.[ch]: New files.  Moved all code which
12465         interacts with the Mono Debugger here.
12466
12467 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
12468
12469         * domain.c (mono_init): initialize mono_defaults.monitor_class
12470
12471 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
12472
12473         * reflection.c (method_encode_code): Add a spicy exception to help
12474         future compiler authors.
12475
12476 2003-04-21  Martin Baulig  <martin@ximian.com>
12477
12478         * icall.c
12479         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
12480         Make this work with relative pathnames; g_filename_to_uri() needs
12481         an absolute filename.
12482
12483 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
12484
12485         * icall.c: Track name changes in Object and ValueType.
12486
12487 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
12488
12489         * metadata.c (mono_type_stack_size): size should be a multiple of
12490         sizeof (gpointer)
12491
12492 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12493
12494         * gc.c:
12495         (internal_domain_finalize): moved into mono_domain_finalize. No need
12496         to create another thread because the finalizers will be run in the
12497         finalizer thread.
12498         
12499         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
12500         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
12501         to be run (MS does this too).
12502
12503 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
12504
12505         * object.c (mono_class_compute_gc_descriptor): Update comment.
12506
12507         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
12508
12509         * image.h: Add synchronized wrapper cache.
12510
12511         * image.c (do_mono_image_open): Initialize cache.
12512
12513         * reflection.c (create_dynamic_mono_image): Initialize cache.
12514
12515 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12516
12517         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
12518         ves_icall_System_Buffer_ByteLengthInternal.
12519
12520 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12521
12522         * reflection.c: setup klass->nested_in earlier. Allow
12523         a dash in the assembly name.
12524
12525 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
12526
12527         * metadata.c (mono_type_to_unmanaged): dont access
12528         type->data.klass for MONO_TYPE_OBJECT
12529         (mono_type_to_unmanaged): consider System.Delegate class
12530
12531 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
12532
12533         * class.c: just setup supertypes in the proper place instead of
12534         initializing the full element class for arrays.
12535
12536 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12537
12538         * class.c: ensure the element class of arrays is initialized.
12539         Setup the supertype info for array classes, too.
12540
12541 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
12542
12543         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
12544
12545 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12546
12547         * Makefile.am: re-added -m option when running cygpath. This way,
12548         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
12549         separator.
12550         * mono-config.c: same codepath for locating mono config file for WIN32
12551         and the rest.
12552         * assembly.c: if mono_assembly_setrootdir is called, don't override
12553         the value set.
12554
12555 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12556
12557         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
12558         MONO_ASSEMBLIES variable.
12559
12560 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
12561
12562         * icall.c: added Assembly::GetNamespaces() icall.
12563
12564 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12565
12566         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
12567
12568 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
12569
12570         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
12571         * object.c: fixed bug in the construction of vtable for proxies
12572
12573 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
12574
12575         * object.c (mono_array_new): Mark mono_array_new as an icall.
12576
12577 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12578
12579         * class.c: fixed test for public method when overriding interfaces.
12580         Closes bug #40970.
12581
12582 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12583
12584         * appdomain.h, domain.c: added mono_domain_foreach() to
12585         be able to access the currently loaded appdomains.
12586         * object.c: make string interning work across sppdomains.
12587         Mark some functions for use as icalls.
12588
12589 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
12590
12591         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
12592
12593         * reflection.h reflection.c: Allocate long living data using 
12594         GC_MALLOC_ATOMIC so the collector does not need to scan it.
12595
12596         * reflection.c: Double the allocation size in streams instead of
12597         increasing it, to prevent unneccesary copying on large assemblies.
12598         
12599         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
12600         creation if the assembly does not have the Run flag set.
12601
12602 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12603
12604         * class.h: avoid the C++ keywords in header files (Jerome Laban
12605         spotted and fixed this).
12606
12607 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12608
12609         * object.c:
12610         (mono_unhandled_exception): fill in the arguments for the
12611         UnhandledException event. Only trigger that event for the default
12612         domain (as MS does).
12613
12614 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
12615
12616         * object.c: Improve typed allocation stuff based on suggestions from
12617         Paolo. Also turn it on if the GC library supports it.
12618
12619 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
12620
12621         * object.c object.h class.h: Added experimental typed allocation
12622         facility using the interfaces in gc_gcj.h.
12623
12624         * os/gc_wrapper.h: Added new include files.
12625         
12626 2003-04-03  Martin Baulig  <martin@ximian.com>
12627
12628         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
12629         which is not yet enabled by default.
12630
12631         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
12632         functions.
12633         (mono_gc_lock, mono_gc_unlock): New static functions.
12634
12635         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
12636         functions; stop/start the world for the garbage collector.  This
12637         is using the windows API; we need to complete the SuspendThread()/
12638         ResumeThread() implementation in the io-layer to make this work on Unix.
12639         (mono_gc_push_all_stacks): New public function; tells the garbage
12640         collector about the stack pointers from all managed threads.
12641
12642 2003-04-03  Martin Baulig  <martin@ximian.com>
12643
12644         * object.h (MonoThread): Added `gpointer stack_ptr'.
12645
12646         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
12647
12648 2003-04-03  Martin Baulig  <martin@ximian.com>
12649
12650         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
12651
12652 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
12653
12654         * reflection.c (typebuilder_setup_fields): Initialize field.first and
12655         field.last.
12656
12657 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
12658
12659         * loader.c (mono_lookup_internal_call): Report the corlib that is
12660         out of sync.
12661
12662 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
12663
12664         * icall.c (ves_icall_type_GetTypeCode): fixed check for
12665         System.DBNull (it's class not valuetype).
12666
12667 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12668
12669         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
12670         if the array method was already assigned a token (fixes bug#40646).
12671
12672 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
12673
12674         * reflection.c (mono_reflection_get_type): Attempt type resolve even
12675         if no assembly is given.
12676
12677 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
12678
12679         * metadata.h: Added the new tables.
12680
12681         * row-indexes.h: Added definitions for new tables.
12682
12683         * metadata.c: Add schemas for new tables, and add support for
12684         computing the sizes of them.
12685
12686         * class.c: Update for handling the new type cases.
12687
12688 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
12689
12690         * metadata.h (MONO_TYPE_IS_VOID): new macro
12691
12692 2003-03-31  Martin Baulig  <martin@ximian.com>
12693
12694         * threads.h (MonoThreadCallbacks): Added `thread_created'.
12695
12696         * threads.c (mono_thread_new_init): Call `thread_created' in the
12697         mono_thread_callbacks.
12698
12699 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
12700
12701         * loader.h: added marshalbyrefobject_class to mono_defaults
12702         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
12703         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
12704           generation of output parameters.
12705           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
12706         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
12707           contextbound and the target object belongs to the context of the caller.
12708         * object.h: added context and unwrapped_server variables in MonoRealProxy.
12709         * object.c: Implemented support for interfaces and abstract classes
12710           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
12711           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
12712
12713 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
12714
12715         * class.h class.c (mono_class_is_subclass_of): New function.
12716         
12717         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
12718         routines for most common case (calls from ArrayList::ToArray).
12719
12720         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
12721         routine so programs which call Environment::Exit() can be profiled.
12722
12723         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
12724         Added MONO_ARCH_SAVE_REGS.
12725
12726         * icall.c (ves_icall_type_is_subtype_of): Use new function.
12727
12728 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
12729
12730         * blob.h: Add a couple of new MonoType types definitions.
12731
12732         * tabledefs.h: Add a couple of new call convs.
12733
12734 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
12735
12736         * reflection.h (MonoReflectionDynamicAssembly): track changes in
12737         the layout of the class.
12738
12739         * reflection.c (alloc_table): double the size on overflow to avoid
12740         unnecessary copying.
12741
12742         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
12743         avoid filling out metadata tables and blobs. Also set mb->ilgen to
12744         null so it can be garbage collected.
12745         
12746 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
12747
12748         * reflection.c (mono_reflection_get_type): Return the resolved type
12749         only if it is in the assembly we searched.
12750
12751         * reflection.c (ensure_runtime_vtable): Initialize method slots.
12752
12753         * class.c (mono_class_setup_vtable): Set the slot of the overriding
12754         method.
12755
12756 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12757
12758         * appdomain.c:
12759         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
12760         the right one is 'file:///blah', but MS allows it.
12761         * assembly.c:
12762         (mono_assembly_open): allow 'file://blah'
12763
12764         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
12765
12766 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
12767
12768         * socket-io.c: fixes bug #40310.
12769
12770 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
12771
12772         * reflection.c (mono_reflection_parse_type): handle deeply nested
12773         types correctly.
12774
12775         * reflection.c (mono_image_create_token): Use unique token values
12776         since they will be put into a hash table.
12777
12778         * class.c (mono_class_setup_vtable): If a method occurs in more than
12779         one place in the vtable, and it gets overriden, then change the
12780         other occurances too.
12781
12782         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12783         object as return type.
12784
12785 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
12786
12787         * icall.c: Deleted "ToString" implementation for double and float
12788         because they are full implemented in managed code.
12789
12790 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12791
12792         * reflection.c, reflection.h: implemented and exported functions
12793         to retrieve info about custom attributes.
12794
12795 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12796
12797         * appdomain.c: moved Uri handling to assembly.c
12798         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
12799         work when using a file Uri in *nix and windows.
12800
12801         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
12802         GetReferencedAssemblies.
12803
12804 2003-03-18  Dick Porter  <dick@ximian.com>
12805
12806         * icall.c: Rename a couple of internal calls
12807
12808         * threads.c: Set the thread state to Stopped when a thread exits.
12809         Fixes bug 39377.
12810
12811 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
12812
12813         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
12814         New icall.
12815
12816         * object.c (mono_class_vtable): fix warning.
12817
12818 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
12819
12820         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
12821
12822         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
12823         memory.
12824         (method_encode_clauses): Create exception info structures in the right
12825         order.
12826         (mono_reflection_setup_internal_class): Initialize supertypes field.
12827
12828         * class.c object.c: Handle interfaces which implement other interfaces 
12829         correctly.
12830
12831         * class.h class.c: Move the supertypes array initialization code into 
12832         a separate function so it can be used for dynamic types too. Also call
12833         it earlier, in mono_class_init(), since it can be used before the
12834         type is initialized.
12835
12836 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12837
12838         * Makefile.am:
12839         * assembly.c:
12840         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
12841
12842         * appdomain.c:
12843         * appdomain.h:
12844         * marshal.c:
12845         * object.c: remove warnings.
12846
12847 2003-03-13  Martin Baulig  <martin@ximian.com>
12848
12849         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
12850         (MonoDebugLexicalBlockEntry): New types.
12851
12852         * debug-mono-symfile.c
12853         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
12854
12855 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12856
12857         * process.c: ret can be any non-zero value accroding to MS doc.
12858
12859 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
12860
12861         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
12862         fixing a warning for a miss-used prototype, would have cause
12863         random memory corruption.
12864
12865 2003-03-07  Martin Baulig  <martin@ximian.com>
12866
12867         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
12868         getting really annoying ....
12869
12870 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
12871
12872         * reflection.c (fixup_method): added support for array methods.
12873
12874 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12875
12876         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
12877         (pointed out by Michael Adams).
12878
12879 2003-03-04  Dick Porter  <dick@ximian.com>
12880
12881         * icall.c: Temporarily reverted the Double and Single ToString()
12882         change, because it broke nunit.
12883
12884 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
12885
12886         * object.h, threads.h: make include files compatible with C++
12887         (patch by Jerome Laban <jlaban@wanadoo.fr>).
12888
12889 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
12890
12891         * icall.c: Erased ToString helper functions for Double and Single.
12892         Now, that implementations ar all in managed code (Double and Single
12893         Formatters).
12894
12895 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
12896
12897         * appdomain.c: Added method for initializing the default context of
12898         a domain. Added internal call for getting the default context.
12899         * appdomain.h: Added context variable in MonoDomain struct.
12900         * domain.c: mono_domain_set also sets the default context of the domain
12901         * icall.c: Mapped internal method InternalGetDefaultContext.
12902         * object.c: mono_object_get_virtual_method returns always a remoting
12903         wrapper if the object is a transparent proxy.
12904         mono_runtime_invoke_array: when creating an object by calling the
12905         constructor, if the created object is a proxy, then the constructor should
12906         be called using the a remoting wrapper.
12907
12908 2003-03-03  Dick Porter  <dick@ximian.com>
12909
12910         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
12911         variable so it compiles on solaris.  Problem spotted by
12912         Christopher Taylor <ct@cs.clemson.edu>
12913
12914 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12915
12916         * appdomain.c:
12917         (get_info_from_assembly_name): don't leak value.
12918
12919         * icall.c:
12920         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
12921         result.
12922
12923 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12924
12925         * assembly.c: export mono_image_load_references ().
12926         * class.c: handle function pointers. mono_class_from_name() now
12927         supports nested type names directly.
12928
12929 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
12930
12931         * reflection.h reflection.c: Encode already created dynamic methods 
12932         and fields correctly as a DEF instead of a REF.
12933
12934         * reflection.c: Get rid of the force_ref argument to 
12935         mono_image_typedef_or_ref since it was wrong in the first place.
12936
12937         * string-icalls.c: add error checking to string constructors according
12938         to the MSDN docs.
12939
12940         * reflection.c: Emit types in the order their TypeBuilders were 
12941         created. Previously, a new table index was assigned to each type before
12942         the tables were emitted. This was wrong because the signature blob
12943         might already refer to a type by its original table index.
12944
12945 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
12946
12947         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
12948         change.
12949         
12950 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12951
12952         * Makefile.am: make assemblies dir have \ instead of / on windows.
12953
12954 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
12955
12956         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
12957         iterate over the NESTEDCLASS table using a linear search since the
12958         table is not guaranteed to be sorted by the secondary key.
12959
12960         * class.c (mono_class_create_from_typedef): fixed up call to
12961         mono_metadata_nesting_typedef.
12962         
12963 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
12964
12965         * marshal.c (mono_string_to_byvalstr): clear the memory as
12966         suggested by Jerome Laban <jlaban@wanadoo.fr>
12967
12968 2003-02-26  Dick Porter  <dick@ximian.com>
12969
12970         * process.c: Cope with padding in .rsrc blocks
12971
12972 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
12973
12974         * metadata.h: reverted the filter_len change, it breaks reflection
12975         
12976 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
12977
12978         * metadata.h: added a new field to store the filter_len
12979         
12980
12981 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12982
12983         * reflection.c: handle custom attributes for types and members
12984         created with Reflection.Emit (bug#38422).
12985
12986 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
12987
12988         * reflection.c: define RTSpecialName automatically for constructors for
12989         compatibility with MS.NET.
12990
12991         * reflection.c (mono_reflection_create_runtime_class): initialize
12992         nested_in field of dynamically created classes.
12993
12994 2003-02-22  Martin Baulig  <martin@ximian.com>
12995
12996         * debug-mono-symfile.h: Incremented version number.
12997
12998 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
12999
13000         * object.h icall.c process.c: fix warnings.
13001
13002 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
13003
13004         * appdomain.h appdomain.c:
13005         (mono_domain_try_type_resolve): split the 
13006         name_or_tb argument into a name and a tb argument.
13007         (mono_domain_has_type_resolve): new function to check whenever the
13008         application has registered a TypeResolve event handler.
13009         
13010         * icall.c reflection.h reflection.c: move the type resolve logic into
13011         mono_reflection_get_type () so it will be invoked when 
13012         Assembly::GetType () is called.
13013
13014         * reflection.c:
13015         (mono_reflection_get_type): renamed to get_type_internal.
13016         (mono_reflection_get_type): fixed type name generation so it works 
13017         for nested types too.
13018         (mono_reflection_get_type): call has_type_resolve () to avoid the 
13019         costly type name generation if there is no resolve event handler.
13020
13021 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13022
13023         * class.c, image.c: load exported types from file references.
13024
13025 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
13026
13027         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
13028           used to cache the managed methods used to create proxies and make 
13029           remote invocation of methods.
13030         * class.h: Added in MonoVTable a flag to indicate that a class needs 
13031           to be remotely created.
13032         * object.c: Modified the method mono_class_vtable(). It now initializes 
13033           the remote flag of the vtable. Modified mono_object_new_specific(), 
13034           so now it checks the remote flag.
13035         * icall.c: Added a couple of internal methods, one for enabling instance 
13036           creation interception for a type, and one for creating objects bypassing
13037           the remote check.
13038
13039 2003-02-18  Martin Baulig  <martin@ximian.com>
13040
13041         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
13042         New interncall to get a method's metadata token.
13043
13044         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
13045         New interncall for the debugger.
13046
13047 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
13048
13049         * class.c (mono_class_setup_vtable): allocate supertype array
13050
13051 2003-02-18  Martin Baulig  <martin@ximian.com>
13052
13053         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
13054
13055 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13056
13057         * reflection.c:
13058         (assembly_name_to_aname): jump over unknown properties (i've found
13059         something like: 'type, assembly, version=xxx, custom=null, public...',
13060         so now will ignore custom=null and still get the rest of the values).
13061
13062 2003-02-17  Dick Porter  <dick@ximian.com>
13063
13064         * threads.c: Have Thread.Start() wait for a semaphore to signal
13065         that the thread has set up all its local data.  This fixes bug
13066         34323, where Abort() raced the new thread's TLS data.
13067
13068         Also removes the handle_store() call from start_wrapper, because
13069         threads are now always created suspended and there is no longer a
13070         race between the parent and child threads to store the info.
13071
13072 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
13073
13074         * image.c: explain the #- heap issue in a message, hopefully
13075         avoiding FAQs on mono-list.
13076
13077 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13078
13079         * icall.c:
13080         (GetEntryAssembly): if the domain has not invoked
13081         AppDomain.ExecuteAssembly yet, return the assembly of the default
13082         AppDomain.
13083
13084 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
13085
13086         * class.c (mono_ldtoken): make it work in dynamic assemblies.
13087
13088 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13089
13090         * metadata.c, reflection.c: simple speedup to type hash
13091         and equals code.
13092
13093 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
13094
13095         * image.c, image.h, class.c, assembly.c: move module loading
13096         to MonoImage. When loading metadata, consider alignemnet from
13097         the start of metadata, not from the metadata address in memory.
13098
13099 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
13100
13101         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
13102         AssemblyBuilder objects. Factored out custom attribute creation into
13103         a separate function.
13104         (create_custom_attr): new function to create custom attributes.
13105
13106 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
13107
13108         * Makefile.am: Got tired of typing the full pathname to pedump.
13109         Until there is another option, am installing this.
13110
13111 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
13112
13113         * class.c (class_compute_field_layout): always set field->parent 
13114         (mono_ldtoken): use mono_defaults.fieldhandle_class;
13115
13116 2003-02-11  Dick Porter  <dick@ximian.com>
13117
13118         * threads-types.h:
13119         * monitor.c: Rewrote Monitor, making lock much faster and
13120         Pulse/Wait work as specified.  Also uses much fewer handles, and only
13121         creates them as needed.
13122
13123         * exception.c: Added SynchronizationLockException
13124
13125         * threads.c: Deleted old Monitor implementation.  The new one is
13126         in a new file.
13127
13128 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13129
13130         * class.c: handled TypedReference type code. Set the correct size for
13131         class data. Setup interface_offsets for interface classes, too.
13132
13133 2003-02-09  Martin Baulig  <martin@ximian.com>
13134
13135         * debug-mono-symfile.h: Reflect latest symbol writer changes.
13136
13137 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
13138
13139         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
13140         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
13141         * object.c: fixed mono_object_get_virtual_method () for interfaces.
13142         * verify.c: check for code that runs after the end of the method.
13143
13144 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
13145
13146         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
13147         "System.Math::Round2".
13148         * sysmath.h: Added Floor, Round and Round2 definitions.
13149         * sysmath.c: Modified certain functions that were not 100% compliant
13150         with MS.NET (math precision) and added the implementation of Floor,
13151         Round and Round2.
13152
13153 2003-02-07  Martin Baulig  <martin@ximian.com>
13154
13155         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
13156
13157 2003-02-07  Martin Baulig  <martin@ximian.com>
13158
13159         * debug-mono-symfile.c: Reflected latest symwriter changes.
13160         (mono_debug_create_mono_symbol_file): Removed.
13161         (mono_debug_open_mono_symbol_file): Take an argument which
13162         specifies whether to create a dynamic symbol file.
13163
13164 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
13165
13166         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
13167
13168 2003-02-05  Martin Baulig  <martin@ximian.com>
13169
13170         * reflection.c (mono_image_build_metadata): Make this public,
13171         protect it against being called multiple times, don't create
13172         resources and don't build the compressed metadata here.
13173         (mono_image_create_pefile): Do this here.
13174
13175         * icall.c
13176         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
13177
13178 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13179
13180         * socket-io.c: fixed bug #36322.
13181
13182 2003-02-06  Piers Haken <piersh@friskit.com>
13183
13184         * appdomain.[ch]:
13185         * class.h:
13186         * debug-mono-symfile.c:
13187         * icall.c:
13188         * loader.c:
13189         * mono-config.c:
13190         * monosn.c:
13191         * reflection.c:
13192         * socket-io.c: warning cleanups
13193
13194 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
13195
13196         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
13197         function. works like remoting invoke, but does a check for the Proxy first.
13198
13199 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
13200
13201         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
13202
13203 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
13204
13205         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
13206         array of pointers.
13207         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
13208         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
13209
13210         * object.c (mono_store_remote_field_new): used by the new jit
13211         instead of mono_store_remote_field
13212         (mono_load_remote_field_new): used by the new jit
13213         instead of mono_load_remote_field
13214
13215 2003-02-05  Patrik Torstensson
13216
13217         * appdomain.c: changed unload to take the domain id instead
13218         of domain
13219         
13220         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
13221
13222
13223 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13224
13225         * appdomain.c: don't look for assemblies in ApplicationBase if
13226         PrivateBinPathProbe is set.
13227
13228 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13229
13230         * object.c: make the first argument in main_args contain the absolute
13231         path to the assembly. Fixes bug #37511.
13232
13233 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13234
13235         * icall.c: get correct UTC offset for countries not using daylight
13236         time saving. Fixes bug #30030.
13237
13238 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13239
13240         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
13241         and 1 are the family).
13242
13243 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
13244
13245         * icall.c (ves_icall_InternalExecute): removed wrong assertion
13246
13247         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
13248
13249 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
13250
13251         * reflection.c: added support for SignatureHelper tokens, which is
13252         needed by the Calli opcode.
13253
13254         * reflection.h: track changes to SignatureHelper class.
13255
13256         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
13257
13258 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13259
13260         * appdomain.c: fixed loading assemblies from PrivateBinPath.
13261
13262 2003-02-03  Patrik Torstensson
13263         * appdomain.[c|h], domain.c : 
13264          - Added support for getting a domain via domain id
13265          - Support for setting and getting domain from System.AppDomain 
13266            (used in cross appdomain channel)
13267          - Added support for get/set for a MonoAppContext on a thread 
13268            (Context class in System.Runtime.Remoting.Contexts),
13269          - Removed hack in Get/SetData and ExecuteAssembly.
13270         
13271         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
13272         the managed world to get control when a proxy is created.
13273
13274         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
13275         
13276 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
13277
13278         * icall.c
13279         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13280         Populate the codebase field as well.
13281
13282 2003-02-02  Martin Baulig  <martin@ximian.com>
13283
13284         * debug-mono-symfile.c
13285         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
13286         (mono_debug_symfile_add_method): Allow interncalls.
13287
13288 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13289
13290         * icall.c: throw parse exception if strtod fails or the string is empty.
13291
13292 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
13293
13294         * marshal.c: handle object type separately from defined
13295         class types.
13296
13297 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
13298
13299         * marshal.c: handle NATIVE_LPSTR for strings when it's
13300         explicitly specified.
13301
13302 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
13303
13304         * reflection.c, reflection.h, icall.c: setup the reflection
13305         handle cache for ModuleBuilders and AssemblyBuilders.
13306
13307 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
13308
13309         * reflection.c (reflection_methodbuilder_to_mono_method): set
13310         pinvoke flag
13311
13312 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13313
13314         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
13315
13316 2003-01-29  Dick Porter  <dick@ximian.com>
13317
13318         * threads.c: No need for the fake_thread kludge now that Thread
13319         doesn't run a class constructor
13320         
13321 2003-01-29  Dick Porter  <dick@ximian.com>
13322
13323         * threads.c: Use g_direct_hash instead of the rather bogus
13324         g_int_hash
13325
13326 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
13327
13328         * marshal.c (mono_marshal_get_native_wrapper): add check for null
13329         (fix pinvoke12.exe)
13330         (mono_marshal_get_struct_to_ptr): generate valid IL code
13331         (mono_marshal_get_ptr_to_struct): generate valid IL code
13332         (*): correctly set sig->pinvoke, we need to memdup the signature
13333         to do that
13334
13335 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13336
13337         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
13338         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
13339
13340 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
13341
13342         * profiler.c: provide more callers information.
13343
13344 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
13345
13346         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
13347
13348         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
13349
13350         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
13351
13352 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13353
13354         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
13355         exception instead of going into an infinite loop on dates which it 
13356         can't yet handle.
13357
13358         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
13359         out-of-range exception if needed.
13360
13361         * class.c (mono_class_setup_vtable): allow a virtual method to provide
13362         an implementation for an interface method and to override an inherited
13363         method at the same time. 
13364         Imagine a scenario when a virtual method is used to override a
13365         virtual abstract method in a parent class, and this same method 
13366         provides an implementation for an method inherited from an interface. 
13367         In this case, the interface resolution code will set im->slot, which 
13368         means that the virtual method override pass will skip this method 
13369         which means a pointer to the abstract method inherited from the parent
13370         will remain in the vtable of this non-abstract class.
13371
13372         * class.c: (mono_class_setup_vtable): continue search for a real 
13373         method if only an abstract method is found.     
13374
13375 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
13376
13377         * reflection.c: add size to encoding for ByValStr and ByValArray
13378         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
13379
13380 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13381
13382         * class.c (mono_class_setup_vtable): pass the override info as an
13383         argument.
13384
13385         * class.c (mono_class_setup_vtable): set the slot of overriding methods
13386         correctly.
13387         
13388         * reflection.c (ensure_runtime_vtable); add support for method 
13389         overrides.
13390         
13391 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13392
13393         * reflection.c (resolution_scope_from_image): Hack to work to work with
13394         dynamic assemblies.
13395
13396         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
13397         added a 'force_ref' argument to force this function to allways return 
13398         a TypeRef. This is needed by mono_image_get_memberref_token ().
13399         
13400 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13401
13402         * reflection.c (mono_image_get_type_info): interfaces really don't have
13403         a parent.
13404
13405         * reflection.c (mono_image_basic_init): fill out missing fields of
13406         image structure.
13407
13408         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
13409         dynamic assemblies. This is required so dynamic assemblies show up in
13410         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
13411         Type::GetType() etc. This is consistent with MS behaviour.
13412
13413         * image.c image.h reflection.c: add newly created classes to the name 
13414         cache so mono_class_get () will find them.      
13415
13416 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13417
13418         First part of changes to get IKVM.NET running under mono.
13419         
13420         * appdomain.h, appdomain.c: added new function 
13421         mono_domain_try_type_resolve() which will emit TypeResolve events. 
13422         This function will call AppDomain::DoTypeResolve to do the actual work.
13423
13424         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
13425         moved existing code dealing with dynamic tokens to a new function 
13426         called mono_reflection_lookup_dynamic_token (). This function will 
13427         raise TypeResolve events when appropriate. Since reflection.c is not 
13428         part of libmetadata, a new hook function called 
13429         mono_lookup_dynamic_token() is added to class.c which will call this.
13430
13431         * assembly.h assembly.c: make the invoke_load_hook function public,
13432         so it can be called for dynamic assemblies.
13433
13434         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
13435
13436         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
13437         type isn't found.
13438
13439         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
13440         MonoGHashTable, since it contains pointers to objects which the GC 
13441         needs to track.
13442
13443         * assembly.c (search_loaded): remove unused variable.
13444         
13445 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
13446
13447         * object.c: fixed issue exposed by gcc-generated IL programs
13448         that use RVA data for pointers.
13449
13450 2003-01-25  Martin Baulig  <martin@ximian.com>
13451
13452         * threads.c (start_wrapper): Moved the initialization of
13453         `start_func' above the mono_new_thread_init() call to which we
13454         pass it as argument.
13455
13456 2003-01-24  Martin Baulig  <martin@ximian.com>
13457
13458         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
13459         the MonoThread pointer.
13460
13461 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
13462
13463         * icall.c: Rename `PowImpl' to Pow.
13464
13465 2003-01-23  Dick Porter  <dick@ximian.com>
13466
13467         * threads.c (start_wrapper): Create a Thread object if needed, so
13468         the Main() thread can do the class initialisation in a subthread
13469         that has been set up to allow managed code execution.
13470
13471         Pass the thread ID instead of the MonoThread pointer to the thread
13472         start and attach callbacks.  This change is required, because the
13473         jit thread start callback must be called _before_ the Thread
13474         object can be created.
13475         
13476         (mono_thread_init): Removed much object creation code that is no
13477         longer needed.  No managed code is called from here now.
13478
13479         * object.c (mono_runtime_exec_managed_code): Create a subthread
13480         for Main, and call back to the runtime to use it.
13481         Set the exit code when Main exits.
13482
13483         * gc.c: Make sure domain finalisation happens in a subthread.
13484         Re-enable threaded GC, fixing bug 31333 (again).
13485
13486         * environment.c: System.Environment internall calls (so far just
13487         ExitCode is here, the others are still in icall.c)
13488
13489         * appdomain.c (mono_runtime_cleanup): All threads running managed
13490         code should have finished before mono_runtime_cleanup() is
13491         reached, so no need to clean up threads.
13492
13493 2003-01-22  Martin Baulig  <martin@ximian.com>
13494
13495         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
13496         `gpointer func' arguments.      
13497         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
13498         but added `MonoThread *thread' argument.
13499         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
13500
13501         * threads.c (mono_new_thread_init): Added `gpointer func' argument
13502         and pass it to the mono_thread_start_cb callback.
13503         (mono_install_thread_callbacks): New public function to install a
13504         set of callbacks which are set by the debugger.
13505         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
13506
13507 2003-01-22  Martin Baulig  <martin@ximian.com>
13508
13509         * Makefile.am: Install debug-mono-symfile.h.
13510
13511 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
13512
13513         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
13514
13515 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
13516
13517         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
13518         * class.c (mono_ptr_class_get): correctly set access levels of pointers
13519         (mono_array_class_get): correctly set access levels of arrays
13520
13521 2003-01-20      Patrik Torstensson
13522         * image.h (MonoAssemblyName): changed major, minor, build, revision
13523         from signed to unsigned.
13524
13525 2003-01-20  sean kasun <skasun@azstarnet.com>
13526
13527         * reflection.c (load_cattr_value): Now this handles
13528         MONO_TYPE_SZARRAY.  Fixes bug #35629
13529
13530 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
13531
13532         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
13533         integer value
13534
13535 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13536
13537         * decimal.c: fixed bug #26056.
13538
13539 2003-01-17  Martin Baulig  <martin@ximian.com>
13540
13541         * gc.c: Raise an ExecutionEngineException instead of using g_error().
13542
13543 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13544
13545         * exception.[ch]:
13546         (mono_get_exception_type_initialization): new function.
13547
13548         * object.c: throw a TypeInitializationException when an exception is
13549         thrown invoking the class constructor.
13550
13551 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13552
13553         * reflection.c: fixed attribute reading.
13554
13555 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13556
13557         * icall.c:
13558         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
13559         provided, look for the type in the calling assembly and then in
13560         mscorlib; if the assembly name is provided, only try that one.
13561
13562 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13563
13564         * object.c: register the vtable before there is a chance it's
13565         queried again recursively.
13566
13567 2003-01-13  Duncan Mak  <duncan@ximian.com>
13568
13569         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
13570         gc-internal.h. 
13571         
13572 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
13573
13574         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
13575
13576 2003-01-11  Martin Baulig  <martin@ximian.com>
13577
13578         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
13579         this to 20 for the release.
13580
13581 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
13582
13583         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
13584
13585         * loader.c (mono_method_get_marshal_info): bug fix
13586
13587         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
13588         structures with explicit layout
13589
13590 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13591
13592         * profiler.c: made the output more readable (and sorted). 
13593         Added caller information for the allocation profiler.
13594
13595 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
13596
13597         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
13598
13599 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13600
13601         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
13602         to get value types.
13603         
13604 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
13605
13606         * object.c, profiler.h, profiler.c, profiler-private.h:
13607         Added object allocation profiler.
13608
13609 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
13610
13611         * reflection.h, reflection.c: handle global methods.
13612         Compress blob entries.
13613
13614 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
13615
13616         * marshal.c: fix compilation.
13617
13618 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
13619
13620         * loader.c (mono_method_get_marshal_info): impl.
13621
13622         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
13623
13624 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13625
13626         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
13627         for reference types.
13628
13629 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
13630
13631         * loader.c: fixed off by one error in loaded parameter names.
13632
13633 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
13634
13635         * marshal.c (mono_marshal_get_icall_wrapper): like
13636         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
13637         instead of a MonoMethod.
13638
13639 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13640
13641         * decimal.c: fixed bug #36537.
13642
13643 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
13644
13645         * marshal.c: throw a missing method exception if a
13646         P/Invoke method is not found.
13647
13648 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13649
13650         * icall.c: allow a null this for constructors.
13651
13652 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13653
13654         * icall.c: raise the proper exceptions if the arguments to the
13655         internal Invoke are incorrect.
13656
13657 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
13658
13659         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
13660
13661 2003-01-03  Martin Baulig  <martin@ximian.com>
13662
13663         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
13664
13665 2002-12-31  Martin Baulig  <martin@ximian.com>
13666
13667         * debug-mono-symfile.c: Completely rewrote the type section.
13668         Instead of using individual malloc()ed fields, we use one big
13669         continuous memory area and offsets into this area.
13670         See the comments in the source code for details.
13671
13672 2002-12-30  Martin Baulig  <martin@ximian.com>
13673
13674         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
13675
13676 2002-12-30  Martin Baulig  <martin@ximian.com>
13677
13678         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
13679         line number table in this data blob instead of using an external
13680         pointer.
13681
13682 2002-12-28  Martin Baulig  <martin@ximian.com>
13683
13684         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
13685
13686 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
13687
13688         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
13689         as a boxed return type.
13690
13691 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
13692
13693         * appdomain.c
13694         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
13695         g_build_filename to properly get separators on the filename created.
13696
13697         * object.h: Small change, introduce MonoMarshalByRefObject to
13698         track the layout of that structure in the C# universe as we make
13699         changes there.
13700
13701 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
13702
13703         * object.c: removed assert to allow static fields on interfaces.
13704         * loader.c: a TypeSpec may be used for any type, not just arrays.
13705
13706 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13707
13708         * class.c, class.h: added mono_class_array_element_size ().
13709         Ignore static methods in interfaces.
13710
13711 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13712
13713         * threads.c: fixed the build under cygwin.
13714
13715 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
13716
13717         * reflection.c: handle nullref constants. Allocate keys for
13718         reflection handles with the GC.
13719
13720 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
13721
13722         * threads.c, threads.h: added mono_thread_get_abort_signal()
13723         to get a suitable signal for thread abort.
13724
13725 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
13726
13727         * metadata.c: fix handling of ExportedType table.
13728
13729 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13730
13731         * icall.c: added WriteWindowsDebugString internal call.
13732
13733 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13734
13735         * reflection.h: added fields to match C# implementation.
13736
13737 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13738
13739         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
13740
13741 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
13742
13743         * gc.h, gc-internal.h: Rename header for GC internal calls to
13744         gc-internal.h from gc.h as to not clash with Boehm GC having its
13745         header installed as <gc.h> in outside include paths.
13746         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
13747         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
13748
13749 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13750
13751         * icall.c: assign minor, build and revision in FillName.
13752
13753 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
13754
13755         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
13756         Added support for running code generated by Reflection.Emit.
13757
13758 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13759
13760         * appdomain.c: check for NULL argument in LoadFrom.
13761
13762 2002-12-10  Dick Porter  <dick@ximian.com>
13763
13764         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
13765
13766 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13767
13768         * appdomain.c: fix buglet when building exe file name.  Handle full
13769         assembly name (needed after latest changes to AssemblyName).
13770         * image.c:
13771         (mono_image_close): free some hashtables.
13772
13773 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
13774
13775         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
13776         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
13777         on some systems (redhat 7.3) 
13778
13779 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
13780
13781         * threads.c: delete the critical section of a sync block,
13782         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
13783
13784 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
13785
13786         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
13787
13788 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13789
13790         * appdomain.[ch]: handle the assembly preload event to try loading the
13791         assemblies using the paths we have in the current domain.
13792
13793         * assembly.[ch]: created an assembly preload hook that is called to try
13794         loading the assembly by other means that the ones provided here.
13795
13796         * domain.c: initialize the domain search path.
13797
13798         From now on, assemblies (TODO: except corlib and System) are loaded
13799         according to these rules when using mono_assembly_load ():
13800
13801                 1. It tries to load the assembly from the ApplicationBase
13802                 of the current domain appending .dll and .exe (TODO: have to
13803                 try loading from name/name.dll and name/name.exe).
13804
13805                 2. It tries the search path specified in PrivateBinPath for the
13806                 current domain (if any).
13807
13808                 3. Previous behavior.
13809
13810 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
13811
13812         * icall.c: implemented GetInterfaceMap() related icall.
13813         * domain.c, loader.h: load MethodInfo in mono_defaults.
13814
13815 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
13816
13817         * gc.c: disable the finalizer thread for now, untill all the issues
13818         with it are resolved.
13819
13820 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13821
13822         * string-icalls.c: handle embedded nulls in string ctor when the
13823         length is specified.
13824
13825 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13826
13827         * class.c: look for explicit interface implementation in parent
13828         classes, too.
13829
13830 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
13831
13832         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
13833
13834 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
13835
13836         * gc.c: protect handles with a critical section.
13837
13838 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13839
13840         * icall.c:
13841         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
13842         parameters. If no assembly specified, try getting the type from all
13843         the assemblies in the current domain, else, load the assembly and get
13844         the type from it.
13845
13846 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13847
13848         * marshal.c: applied patch from Aleksey Demakov that fixes
13849         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
13850
13851 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13852
13853         * icall.c: fixed get_location.
13854
13855 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
13856
13857         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
13858         declarations to make it work with older gcc. 
13859
13860         * loader.c (mono_get_method): set signature->pinvoke for native calls
13861
13862 2002-11-20  Dick Porter  <dick@ximian.com>
13863
13864         * threads.c (mono_thread_init): Set the main thread's handle
13865
13866 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
13867
13868         * gc.c: allow compilation without GC support. Changed to match the
13869         mono coding style.
13870
13871 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13872
13873         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
13874
13875 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
13876
13877         * reflection.c: set a public key token on the core assemblies.
13878
13879 2002-11-18  Dick Porter  <dick@ximian.com>
13880
13881         * threads.c: Split out some thread initialisation so that other
13882         files can set the start callback function.
13883
13884         * gc.c: Run finalisers in a separate thread, to avoid stack
13885         overflow.  Fixes bug 31333.
13886
13887         * appdomain.c: Set up GC finalisation thread.
13888
13889         * reflection.c: 
13890         * object.c: 
13891         * domain.c: Use gc.h macros for GC_malloc
13892         
13893 2002-11-15  Dick Porter  <dick@ximian.com>
13894
13895         * threadpool.c: 
13896         * threads.c:
13897         * appdomain.c: Removed mono_runtime_init_with_attach(),
13898         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
13899         merging the extra parameter with the existing function.  Removed
13900         unneeded code in mono_thread_attach().
13901
13902 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
13903
13904         * image.c (mono_image_loaded_by_guid): a method to get loaded
13905         images by guid. 
13906         (load_metadata_ptrs): we store the guid as string.
13907
13908 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
13909
13910         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
13911
13912         * metadata.c (mono_guid_to_string): imported method form Zoltan
13913         Varga (slightly modified)
13914
13915         * assembly.c (mono_assembly_open): load precompiled code
13916
13917         * loader.h (MonoMethod): we store the method token for use in the
13918         aot compiler. 
13919
13920 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13921
13922         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
13923         the hook function called when an assembly is loaded.
13924         
13925         * domain.c: Modified file.
13926         (mono_domain_assembly_load): removed hash table insertion of assemblies.
13927
13928         Fixes bug #33196.
13929
13930 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
13931
13932         * reflection.c: Map PEFileKind to the value expected by the WinNT
13933         image loader. 
13934
13935 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13936
13937         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
13938         Read until the buffer is filled completely.
13939
13940 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13941
13942         * icall.c: implemented MonoType.InternalGetEvent ().
13943
13944 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13945
13946         * appdomain.c: implemented InitAppDomainSetup. Delayed
13947         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
13948         the entry_assembly.
13949
13950         * assembly.c: base_dir is now an absolute path ending with
13951         G_DIR_SEPARATOR.
13952
13953         * icall.c: modified get_location according to the above changes.
13954
13955         * object.c: init AppDomain.SetupInformation for the default domain after
13956         we have the entry assembly.
13957
13958         * domain.c: when unloading a domain, setup = NULL.
13959
13960 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
13961
13962         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
13963
13964 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
13965
13966         * object.h, object.c: introduced mono_object_get_virtual_method ()
13967         to lookup the method invoked on an object when a callvirt is done on
13968         a method.
13969         * icall.c: make MethodInfo::Invoke() always do a virtual call.
13970
13971 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13972
13973         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
13974         current domain when loaded an assembly and failed to load it.
13975
13976         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
13977
13978 2002-10-31  Dick Porter  <dick@ximian.com>
13979
13980         * icall.c: 
13981         * file-io.h: 
13982         * file-io.c: Return the error status in a parameter, as the
13983         GetLastError() value has long since been blown away if we try and
13984         look it up in a subsequent internal call invocation.  Delete the
13985         GetLastError() internal call, because it's useless.
13986
13987 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
13988
13989         * class.[ch]: added cast_class to fix bug 29517
13990
13991 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
13992
13993         * marshal.c: create valid IL code in the filter clause:
13994         the new JIT is less forgiving:-)
13995
13996 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13997
13998         * icall.c: removed get_property internal call.
13999
14000 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
14001
14002         * appdomain.h domain.c: Added an ID to appdomains.
14003         
14004         * threads.c threads.h icall.c: Implement icall
14005         Thread:GetDomainID(), and remove unused icall 
14006         CurrentThreadDomain_internal.
14007
14008 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14009
14010         * icall.c: Don't recurse through the base types in GetConstructor.
14011         Fixes bug #32063. 
14012
14013 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
14014
14015         * mempool.h, mempool.c: added mono_mempool_empty() and
14016         mono_mempool_stats().
14017
14018 2002-10-23  Dick Porter  <dick@ximian.com>
14019
14020         * file-io.c: 
14021         * file-io.h: 
14022         * icall.c: Added MonoIO.GetFileType internal call
14023
14024 2002-10-17  Dick Porter  <dick@ximian.com>
14025
14026         * appdomain.c (mono_runtime_cleanup): Don't signal the async
14027         delegate semaphore before waiting for all threads to finish,
14028         because new threads can also call async delegates.  Fixes bug
14029         32004.
14030
14031         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
14032         of 3 seconds, in case another async job is queued.  (This part is
14033         needed because the bug fix reintroduced the 3s exit lag.)  This
14034         makes the mono_runtime_shutdown flag superfluous.
14035
14036 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
14037
14038         * reflection.c: include ehader size in method section headers.
14039         Really check for suplicated modules entries.
14040
14041 2002-10-17  Martin Baulig  <martin@gnome.org>
14042
14043         * debug-mono-symfile.c: Added back support for locals.
14044
14045 2002-10-14  Martin Baulig  <martin@gnome.org>
14046
14047         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
14048         MONO_TYPE_VOID.
14049
14050 2002-10-14  Martin Baulig  <martin@gnome.org>
14051
14052         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
14053         mono_class_get() instead of looking in the class cache. 
14054
14055 2002-10-13  Martin Baulig  <martin@gnome.org>
14056
14057         * debug-mono-symfile.c: Set version number to 28, include the
14058         signature in method names.
14059
14060 2002-10-13  Martin Baulig  <martin@gnome.org>
14061
14062         * debug-mono-symfile.h: Set version number to 27.
14063
14064 2002-10-11  Martin Baulig  <martin@gnome.org>
14065
14066         * gc.c: Don't register/unregister NULL pointers as disappearing links.
14067
14068 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14069
14070         * metadata.c, metadata.h: added helper function to allocate signatures.
14071
14072 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14073
14074         * icall.c: added internal call to get the location of machine.config.
14075
14076 2002-10-08  Martin Baulig  <martin@gnome.org>
14077
14078         * debug-mono-symfile.c: Ignore classes with a pending init for the
14079         moment.
14080
14081 2002-10-03  Dick Porter  <dick@ximian.com>
14082
14083         * threads.c: Freebsd pthread_t is a pointer
14084
14085 2002-10-03  Dick Porter  <dick@ximian.com>
14086
14087         * socket-io.c: Implemented GetHostName_internal
14088
14089 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14090
14091         * mono-config.c:
14092         (mono_config_parse_file): don't leak the text.
14093
14094 2002-10-02  Martin Baulig  <martin@gnome.org>
14095
14096         * debug-mono-symfile.c: Added support for methods.
14097
14098 2002-10-01  Martin Baulig  <martin@gnome.org>
14099
14100         * debug-mono-symfile.c: Don't emit methods and line numbers for
14101         the dynamic symbol file, just write the type table.  We can easily
14102         have an external helper program which creates a symbol file for an
14103         IL file.        
14104
14105 2002-10-01  Dick Porter  <dick@ximian.com>
14106
14107         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
14108         Only add the handle to the cleanup array when we're about to
14109         launch the thread.  Bug 31425 deadlocked when the test was run on
14110         mono under w32.
14111
14112 2002-10-01  Martin Baulig  <martin@gnome.org>
14113
14114         * debug-mono-symfile.c: Added support for properties.
14115
14116 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14117
14118         * reflection.c: unaligned store fix from Mark Crichton
14119         <crichton@gimp.org>.
14120
14121 2002-09-27  Martin Baulig  <martin@gnome.org>
14122
14123         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
14124         New interncall.
14125
14126 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
14127
14128         * assembly.h, assembly.c: use a sane API to hook into the assembly
14129         loading process instead of a useless special-purpouse hack
14130         (ngen needs a hook, too, for example).
14131
14132 2002-09-27  Dick Porter  <dick@ximian.com>
14133
14134         * threads.c (mono_thread_init): Call GetCurrentProcess() so
14135         io-layer can set up some process handle info.  Not needed on w32,
14136         but doesn't hurt either.
14137
14138         * process.c: Pass the program name in the second parameter to
14139         CreateProcess, so the path is searched.  Include the working
14140         directory. Implemented process name, process enumeration, and some
14141         process detail internal calls.
14142         
14143         * icall.c: Added internal calls for process lookup, and some
14144         process details
14145
14146 2002-09-26  Martin Baulig  <martin@gnome.org>
14147
14148         * assembly.c (mono_install_open_assembly_hook): New global
14149         function to install a function to be invoked each time a new
14150         assembly is loaded.
14151         (mono_assembly_open): Run this callback function if set.
14152
14153         * debug-mono-symfile.c: Put back line numbers for the dynamic
14154         symbol file and also record the .il file as source file.  This
14155         allows us to install the temporary symbol file as `file.dbg' just
14156         like a compiler-generated one.
14157
14158 2002-09-26  Nick Zigarovich <nick@chemlab.org>
14159
14160         * Corrected typo in gc.c (BOHEM vs BOEHM).
14161
14162 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14163
14164         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
14165         GetProperties. Also avoid calling g_slist_length in GetProperties and
14166         GetMethods.
14167
14168 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14169
14170         * reflection.c: avoid unaligned stores (bug spotted by
14171         Mark Crichton  <crichton@gimp.org>).
14172
14173 2002-09-25  Martin Baulig  <martin@gnome.org>
14174
14175         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
14176         instead of guint64 for addresses and added prologue/epilogue info.
14177
14178 2002-09-25  Martin Baulig  <martin@gnome.org>
14179
14180         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
14181         store line number info.  For the dynamic symbol file, we only need
14182         to provide the JIT generated dynamic line number info for the dynamic
14183         symbol file.
14184
14185 2002-09-25  Martin Baulig  <martin@gnome.org>
14186
14187         * debug-mono-symfile.h: Incremented version number.
14188
14189 2002-09-24  Martin Baulig  <martin@gnome.org>
14190
14191         * class.c (mono_debugger_class_init_func): New global function
14192         pointer variable.
14193         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
14194         call it.
14195
14196         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
14197         function.  This is called via the mono_debugger_class_init_func
14198         hook to add all types to the dynamic type table.
14199         (ves_icall_MonoDebugger_GetType): New interncall to get a class
14200         from its metadata token.
14201
14202         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
14203         New interncall for the debugger.
14204
14205 2002-09-24  Nick Drochak <ndrochak@gol.com>
14206
14207         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
14208         before using it in case it is null.
14209         
14210 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14211
14212         * metadata.c: allow custom modifiers in local var signatures
14213         (bug spotted by Zoltan Varga).
14214
14215 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14216
14217         * class.c: deal with the <Module> class that may have a NULL vtable.
14218         Eliminate warnings.
14219
14220 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14221
14222         * image.c, image.h: more strong name helpers.
14223         * monosn.c: more work: convert pem keys to cryptoapi format.
14224
14225 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14226
14227         * string-icalls.c: speedup IndexOf.
14228
14229 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14230
14231         * icall.c: updates from Zoltan.2.Varga@nokia.com.
14232
14233 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14234
14235         * icall.c: cleanup: use mono_object_domain ().
14236
14237 2002-09-23  Martin Baulig  <martin@gnome.org>
14238
14239         * debug-mono-symfile.c: Improved type support.
14240
14241 2002-09-22  Martin Baulig  <martin@gnome.org>
14242
14243         * debug-mono-symfile.c: Added support for reference types and strings.
14244
14245 2002-09-22  Martin Baulig  <martin@gnome.org>
14246
14247         * debug-mono-symfile.c: Started to work on the type table.
14248
14249 2002-09-21  Martin Baulig  <martin@gnome.org>
14250
14251         * debug-mono-symfile.c: Largely reworked the symbol table format.
14252         The symbol table is now incrementally updated each time a new
14253         method is added.  We're now also using our own magic and version
14254         so that you don't need to recompile all your classes if the
14255         dynamic table changes.
14256         (mono_debug_update_mono_symbol_file): Removed.
14257         (mono_debug_symfile_add_method): New function to add a method.
14258
14259 2002-09-21  Martin Baulig  <martin@gnome.org>
14260
14261         * icall.c
14262         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
14263         New interncall.
14264
14265         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
14266         New interncall to get a method from its metadata token.
14267
14268 2002-09-21  Martin Baulig  <martin@gnome.org>
14269
14270         * debug-mono-symfile.c: Create type table.
14271
14272 2002-09-20  Martin Baulig  <martin@gnome.org>
14273
14274         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
14275
14276 2002-09-20  Martin Baulig  <martin@gnome.org>
14277
14278         * debug-mono-symfile.c: Provide information about params and locals.
14279
14280 2002-09-20  Martin Baulig  <martin@gnome.org>
14281
14282         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
14283         New interncall.
14284
14285         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
14286         interncall to get a method from its metadata token.
14287
14288 2002-09-20  Martin Baulig  <martin@gnome.org>
14289
14290         * debug-mono-symfile.c: Added a few checks for method->header
14291         being non-NULL.  This should never happen, but for the moment
14292         let's use a g_warning() rather than a g_assert().
14293
14294 2002-09-19  Mark Crichton  <crichton@gimp.org>
14295
14296         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
14297         even if support for it isn't present.  Added an #ifdef to fix this.
14298
14299         * socket-io.c: Added checks back for Solaris support.
14300
14301 2002-09-19  Martin Baulig  <martin@gnome.org>
14302
14303         * debug-mono-symfile.c (read_string, write_string): Reflect latest
14304         changes in the symbol file format.
14305
14306 2002-09-18  Martin Baulig  <martin@gnome.org>
14307
14308         * debug-mono-symfile.c: Set version number to 21.
14309
14310 2002-09-18  Dick Porter  <dick@ximian.com>
14311
14312         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
14313         on netbsd.  Fixes bug 30051.
14314
14315 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14316
14317         * reflection.c:
14318         (set_version_from_string): little fix.
14319
14320 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14321
14322         * monosn.c, Makefile.am: added strong name utility.
14323         * reflection.h, reflection.c: implemented delayed signing,
14324         locale, version and hash id assembly attributes.
14325
14326 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
14327
14328         * loader.c, metadata.c: load param attributes in signatures.
14329
14330 2002-09-16  Martin Baulig  <martin@gnome.org>
14331
14332         * debug-mono-symfile.c: Added string table with all method names.
14333
14334 2002-09-14  Martin Baulig  <martin@gnome.org>
14335
14336         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
14337         fast method lookup.
14338
14339 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14340
14341         * reflection.c: record the public key token of referenced assemblies.
14342
14343 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14344
14345         * image.c, image.h: added functions to get the strong name and the
14346         public key of an assembly.
14347         * pedump.c: use them.
14348
14349 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
14350
14351         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
14352
14353 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
14354
14355         * marshal.c (mono_marshal_get_managed_wrapper): Added
14356         MONO_TYPE_BOOLEAN 
14357
14358 2002-09-11  Martin Baulig  <martin@gnome.org>
14359
14360         * gc.c: Call GC_unregister_disappearing_link() on all links when
14361         finalizing them, this is necessary to aviod a crash in boehm's
14362         finalize handler.
14363
14364 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14365
14366         * gc.c: handle GetTarget for finalized objects spotted and fixed by
14367         nick@chemlab.org.
14368
14369 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
14370
14371         * icall.c: implemented MonoType::Module.
14372         * reflection.c, reflection.h: mono_module_get_object () from
14373         Tomi Pakarinen <tomi.pakarinen@welho.com>.
14374
14375 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14376
14377         * icall.c: ignore overridden methods in GetMethods ().
14378         Fix for FieldInfo::SetValue().
14379         * object.c: handle float/double in runtime invoke.
14380
14381 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14382
14383         * object.c: allow a constructor to be called again on an object.
14384
14385 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14386
14387         * class.h, class.c: move field layout code to it's own function and
14388         export it. Get an interface id earlier. Move fields in MonoClass
14389         so they are more cache friendly and align the bitfields.
14390         * loader.c: temporary handle get_param_names() for a runtime method.
14391         * reflection.c, reflection.h: more code to handle runtime creation of
14392         types.
14393
14394 2002-09-09  Martin Baulig  <martin@gnome.org>
14395
14396         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
14397         signature with the pinvoke field being set for the actual call.
14398
14399 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14400
14401         * icall.c: removed some unused icalls. Start of map of glib charsets
14402         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
14403
14404 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14405
14406         * debug-helpers.c: break infinite loop (found and fixed by
14407         Holger Arnold <harnold@gmx.de>).
14408
14409 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14410
14411         * icall.c: target may be null in create_delegate.
14412
14413 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14414
14415         * marshal.c: handle a boolean return type.
14416
14417 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14418
14419         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
14420
14421 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14422
14423         * gc.c: fix weakreferences.
14424
14425 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
14426
14427         * icall.c: added icall to get default codepage.
14428
14429 2002-09-03  Dick Porter  <dick@ximian.com>
14430
14431         * threads.h: 
14432         * threads.c: Use MonoThread instead of MonoObject where
14433         apropriate.
14434
14435         Store running thread objects in a hash table, so that we have all
14436         the info to hand when waiting for them to finish
14437         (means we don't need OpenThread() any more, so mingw builds should
14438         be fully functional again.)
14439
14440         * verify.c:
14441         * object.h: Added thread ID to MonoThread
14442
14443 2002-09-03  Martin Baulig  <martin@gnome.org>
14444
14445         * icall.c (System.Reflection.Assembly::get_location): New interncall.
14446
14447 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14448
14449         * icall.c: fixed leak in get_temp_path. Thanks lupus.
14450
14451 2002-09-03  Martin Baulig  <martin@gnome.org>
14452
14453         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
14454         argument to store the end address of the disassembled instruction.
14455
14456         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
14457         here from debug-symfile.h.
14458         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
14459         JIT into this struct.
14460         (MonoSymbolFile): Added `char *image_file' field.
14461         (MonoDebugGetMethodFunc): Removed.
14462         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
14463         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
14464         (mono_debug_find_method): New method.
14465
14466         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
14467         create a full symbol file.
14468         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
14469         and static symbol files.
14470         (mono_debug_find_method): The symbol file keeps an internal method hash,
14471         call this to get a MonoDebugMethodInfo from a MonoMethod.
14472
14473         * debug-symfile.[ch]: Removed.
14474
14475 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
14476
14477         * image.c (do_mono_image_open): Remove linker version check.
14478
14479 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
14480
14481         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
14482         wrappers for instance methods.
14483         
14484 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14485
14486         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
14487
14488 2002-08-28  Dick Porter  <dick@ximian.com>
14489
14490         * Makefile.am: Export HOST_CC for w32 builds
14491
14492 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14493
14494         * file-io.c process.c: MonoString are null terminated, no
14495         need for mono_string_to_utf16() anymore.
14496
14497 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14498
14499         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
14500
14501 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
14502
14503         * icall.c, reflection.h: speedup System.MonoType.
14504
14505 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14506
14507         * reflection.c: allow null as the value of a string argument in
14508         custom attributes constructors.
14509
14510 2002-08-27  Martin Baulig  <martin@gnome.org>
14511
14512         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
14513         `trampoline_address' field.
14514
14515 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
14516
14517         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
14518         check (fixes bug #29486) 
14519
14520 2002-08-27  Martin Baulig  <martin@gnome.org>
14521
14522         * debug-mono-symfile.c: Changed the file format in a way that allows us
14523         open it read-only and to use a specially malloced area for all the
14524         dynamic data.  We can now also generate a symbol file on-the-fly if we're
14525         debugging IL code and there is no MCS generated symbol file for it.
14526
14527 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14528
14529         * object.c: added a define for a good string and array
14530         creation speedup (not enabled by default because we need to deal with
14531         the synch stuff).
14532
14533 2002-08-26  Martin Baulig  <martin@gnome.org>
14534
14535         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
14536         function to create a dynamic symbol file.  This is used by the
14537         debugger to create a symbol file for IL code on-the-fly.
14538
14539 2002-08-26  Martin Baulig  <martin@gnome.org>
14540
14541         * loader.c (mono_lookup_pinvoke_call): Include the error message
14542         from g_module_error() in the error message.
14543
14544 2002-08-24  Martin Baulig  <martin@gnome.org>
14545
14546         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
14547         function to update the symbol file.  The symbol file is mmap()ed
14548         writable, but private.  This allows us to install the symbol file
14549         together with the assembly.
14550
14551 2002-08-24  Martin Baulig  <martin@gnome.org>
14552
14553         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
14554         but they can read the new symbol file format which mcs is now creating.
14555
14556         * debug-symfile.c (mono_debug_find_source_location): Moved to
14557         debug-mono-symfile.c; this is now operating on the new symbol file.
14558
14559 2002-08-23  Martin Baulig  <martin@gnome.org>
14560
14561         * debug-helpers.c (mono_method_desc_from_method): New function to get
14562         a MonoMethodDesc from a MonoMethod.
14563
14564 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14565
14566         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
14567         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
14568
14569 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
14570
14571         * string-icalls.[ch]: make helper methods static.
14572
14573 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14574
14575         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
14576         types to it and to SetValueInternal.
14577
14578         * object.c: Moved handle_enum label to its proper place. This was the
14579         f... bug! ;-)
14580
14581         This time i compiled mcs and gtk-sharp and they both work.
14582
14583 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14584
14585         * icall.c: reverted partially my previous patch until 
14586         object.c:set_value handles enums correcly.
14587
14588 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14589
14590         * icall.c:
14591         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
14592         (ves_icall_System_Environment_get_MachineName): removed warning when
14593         compiling under cygwin.
14594
14595 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14596
14597         * object.c: fixed field_get_value() for reference types.
14598
14599 2002-08-22  Dick Porter  <dick@ximian.com>
14600
14601         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
14602         Don't free a buffer while it's still needed.  Patch from Jonathan
14603         Liger <Jonathan.liger@wanadoo.fr>
14604
14605 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
14606
14607         * icall.c (ves_icall_System_Environment_get_Platform): Add new
14608         internal call.
14609
14610 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
14611
14612         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
14613         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
14614
14615         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
14616         we call unmanaged code which throws exceptions.
14617
14618 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14619
14620         * appdomain.h: added per-domain entry_assembly.
14621         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
14622         arguments.
14623         * icall.c: Assembly::GetEntryAssembly icall.
14624         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
14625         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
14626
14627 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14628
14629         * appdomain.h, gc.c: added mono_domain_finalize ().
14630
14631 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14632
14633         * object.c:
14634         (mono_print_unhandled_exception): changed g_warning by g_printerr
14635         because g_log has a 1024 characters limit (yeah, i got a big stack
14636         trace). Don't print exception name, that should be in ToString 
14637         returned string.
14638
14639 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14640
14641         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
14642         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
14643
14644 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14645
14646         * object.c:
14647         (mono_print_unhandled_exception): after previous commit, i realized
14648         that MS calls ToString on the exception. I changed this function to
14649         do that. This way we get stack_trace for free.
14650
14651 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14652
14653         * object.c:
14654         (mono_print_unhandled_exception): invoke Message property instead of
14655         getting 'message' field from Exception. Don't allocate memory for
14656         'trace' and 'message' if not needed.
14657
14658 2002-08-18  Dick Porter  <dick@ximian.com>
14659
14660         * unicode.c: Fix asserts to match Encoder.cs checks
14661
14662 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14663
14664         * marshal.c: fix unaligned store issue and a few wrong
14665         opcode argument types.
14666
14667 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14668
14669         * icall.c: added GetUninitializedObjectInternal internal call.
14670
14671 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
14672
14673         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
14674         to the right domain.
14675
14676 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
14677
14678         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
14679
14680         * class.c (class_compute_field_layout): set blittable to false for Strings
14681
14682         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
14683
14684 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14685
14686         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
14687         first chunk of code to create types at runtime. Code to
14688         handle ReflectedType/DeclaringType. Make reflection handles
14689         domain specific.
14690
14691 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
14692
14693         * class.c: set correct name in arrays.
14694
14695 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
14696
14697         * appdomain.c (mono_domain_transfer_object): make it work with
14698         valuetypes. bug fixes.
14699
14700 2002-08-12  Dick Porter  <dick@ximian.com>
14701
14702         * object.h: Rename some parameters to avoid c++ keywords (Patch
14703         from Joseph Wenninger <kde@jowenn.at>)
14704
14705 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
14706
14707         * icall.c: added icall to implement Assembly.GetFile*.
14708
14709 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14710
14711         * reflection.h, reflection.c: code to embed managed resources.
14712
14713 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14714
14715         * class.c: move all the type size stuff into
14716         class_compute_field_layout().
14717
14718 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14719
14720         * class.c: ensure enums have always the correct instance size.
14721         * unicode.c: remove wrong assert.
14722
14723 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14724
14725         * assembly.c: fix mem corruption issue.
14726         * image.h, image.c: added mono_image_get_resource () to access
14727         managed resources.
14728         * icall.c: implemented Assembly.EntryPoint property and some
14729         Managed Resources related internalcalls.
14730
14731
14732 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14733
14734         * image.c, image.h: impemented mono_image_get_entry_point ().
14735         * appdomain.c: use mono_image_get_entry_point.
14736
14737 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14738
14739         * reflection.c: support the object type argument when loading
14740         custom attributes.
14741
14742 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
14743
14744         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
14745         String as return type.
14746
14747 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
14748
14749         * reflection.c: fix encoding of named args for custom attrs to match
14750         the ms implementation. Read them back when instantiating custom
14751         attributes.
14752
14753 2002-08-02  Radek Doulik  <rodo@ximian.com>
14754
14755         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
14756         by Dietmar as quick fix
14757         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
14758         16 as stack size, used on more places as quick fix before Dietmar
14759         will fix it properly
14760
14761 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14762
14763         * object.h, object.c: added accessors for fields and properties.
14764
14765 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14766
14767         * class.c, class.h: made mono_class_get_field_from_name ()
14768         loop on parent types.
14769         Added mono_class_get_property_from_name ().
14770
14771 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14772
14773         * class.c, class.h: move the code to setup the type vtable in its own
14774         function so that it can be reused also for types created at runtime.
14775         Eliminate the "class" identifier from the header file.
14776         * reflection.c: setup the vtable for enums so that we can create
14777         objects for use in SetConstant ().
14778
14779 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
14780
14781         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
14782         instead of the delegate itself as this pointer (bug #28383)
14783
14784 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
14785
14786         * marshal.c (mono_marshal_get_managed_wrapper): added return type
14787         conversions.
14788
14789 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14790
14791         * loader.c: don't set the pinvoke bit on icalls.
14792
14793 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
14794
14795         * debug-helpers.c (mono_method_full_name): only print a number to
14796         indicate wrapper type (so that the output is more readable in traces).
14797
14798 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
14799
14800         * class.c (mono_class_init): include method override patch from Paolo
14801
14802 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
14803
14804         * icall.c: fixed GetTypeCode().
14805
14806 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
14807
14808         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
14809         use real delegate invoke function to make it work with multicast
14810         delegates (fix bug# 28291).
14811
14812 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14813
14814         * object.c: load constant strings.
14815
14816 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14817
14818         * reflection.c: no magic numbers.
14819         * tabledefs.h: security action enum.
14820
14821 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14822
14823         * assembly.c: fix possible memory corruption.
14824
14825 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14826
14827         * reflection.h, reflection.c: added support for linking resources.
14828         * verify.c: check we have an updated corlib.
14829
14830 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
14831
14832         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
14833         string arrays.
14834         (mono_marshal_string_array): null terminate unmanaged string arrays.
14835         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
14836
14837 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14838
14839         * icall.c: Type.GetType () can now return also types from the
14840         calling assembly.
14841
14842 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
14843
14844         * loader.h, loader.c: stack walking support.
14845         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
14846         GetCallingAssembly.
14847
14848 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
14849
14850         * marshal.c: added optimisations for blittable types 
14851
14852         * class.c (mono_array_class_get): do not set blittable attribute on arrays
14853         (mono_class_setup_mono_type): set blittable attribute for single
14854         and double.
14855
14856         * marshal.c (mono_string_utf8_to_builder): impl.
14857         (mono_string_builder_to_utf8): impl.
14858         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
14859
14860 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
14861
14862         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
14863         (mono_marshal_get_managed_wrapper): impl. byref types
14864
14865 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14866
14867         * icall.c:
14868         (search_method): don't display debug message. 
14869
14870 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
14871
14872         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
14873
14874 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
14875
14876         * appdomain.c: set the missing filename when throwing exception.
14877
14878 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
14879
14880         * metadata.c (mono_type_size): code cleanup
14881         (mono_type_stack_size): removed some test code
14882
14883 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
14884
14885         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
14886         mono_get_exception_file_not_found now.
14887
14888         * exception.c (mono_exception_from_name_two_strings): New version
14889         that will call a constructor with two string arguments. 
14890         (mono_get_exception_file_not_found): New helper routine, used to
14891         report file-not-found errors.
14892
14893 2002-07-20  Dick Porter  <dick@ximian.com>
14894
14895         * process.h:
14896         * process.c: Pass file handles to CreateProcess
14897         
14898         * icall.c:
14899         * file-io.h:
14900         * file-io.c: Implemented CreatePipe
14901
14902 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
14903
14904         * metadata.c (mono_get_param_info): set alignment for value types
14905
14906 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14907
14908         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
14909         Constify mono_domain_assembly_open().
14910         * loader.c: handle null namespace in icalls.
14911
14912 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
14913
14914         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
14915         (emit_str_to_ptr_conv): marshal object as structs
14916
14917         * metadata.c (mono_type_to_unmanaged): marshal object as structs
14918
14919         * marshal.c (mono_marshal_get_runtime_invoke): support value types
14920
14921 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
14922
14923         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
14924         (mono_marshal_get_native_wrapper): we an now return value types
14925
14926 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14927
14928         * verify.c: more checks implemented.
14929
14930 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
14931
14932         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
14933         (fix bug #27695)
14934         (mono_marshal_get_native_wrapper): allow byref arguments
14935         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
14936         impl. PtrToStringXXX methods
14937         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
14938         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
14939         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
14940         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
14941         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
14942
14943 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14944
14945         * reflection.c: fix buglet in parsing an assembly name.
14946
14947 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
14948
14949         * marshal.c (emit_ptr_to_str_conv): first impl.
14950
14951 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14952
14953         * object.c, class.h: cache the vtable in the class as suggested by
14954         vargaz@freemail.hu (Zoltan Varga).
14955
14956 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14957
14958         * class.h, loader.c: added mono_field_from_token().
14959         * verify.c: first cut of type checking code.
14960
14961 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
14962
14963         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
14964
14965 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
14966
14967         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
14968         (fix bug #27782)
14969         (mono_marshal_get_remoting_invoke): impl.
14970         (mono_delegate_begin_invoke): impl.
14971         (mono_mb_emit_save_args): impl.
14972         (mono_delegate_end_invoke): impl.
14973         (mono_marshal_get_delegate_begin_invoke):
14974         (mono_marshal_get_delegate_end_invoke):
14975         (mono_marshal_get_delegate_invoke): generate a special name for
14976         those methods (including the signature) and associate them whith
14977         the delegate class. 
14978
14979 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
14980
14981         * reflection.[ch]: 
14982         (mono_reflection_type_from_name): now it has a MonoImage parameter
14983         which is used as the default image to search the type in. If the image
14984         is NULL or getting the type from it fails, it defaults to corlib.
14985
14986         * icall.c: changed 1 call to mono_reflection_type_from_name to match
14987         new parameter.
14988
14989 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14990
14991         * reflection.c: update the parameter table index.
14992
14993 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14994
14995         * domain.c: don't include the mark byte in the string hash.
14996
14997 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14998
14999         * icall.cs: icall for Type.GetTypeCode ().
15000         * verify: a couple of fixes and disabled local initialization checks.
15001
15002 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
15003
15004         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
15005
15006         * debug-helpers.c (mono_method_full_name): print the type of the
15007         runtime wrapper
15008
15009         * metadata.c (mono_signature_hash): a hash function for signatures
15010         (mono_signature_hash): better hash algorithm
15011
15012         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
15013
15014         * debug-helpers.c (mono_method_full_name): this can now generate
15015         method names with signatures
15016
15017         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
15018         method dont have this pointers.
15019
15020 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15021
15022         * reflection.c: fixup typebuilder tokens.
15023         * image.c: fix buglet.
15024         * marshal.h: remove whitespace.
15025         * metadata.h, metadata.c: reinstate code that was removed.
15026         * verify.c: handle catch directives and fix another couple of bugs.
15027
15028 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
15029
15030         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
15031         (mono_marshal_get_native_wrapper): make it comp. with the old code
15032         (mono_marshal_get_native_wrapper): support boolean
15033         (mono_marshal_get_managed_wrapper): support more types
15034
15035 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
15036
15037         * class.c (class_compute_field_layout): compute class->blittable attribute.
15038
15039 2002-07-09  Dick Porter  <dick@ximian.com>
15040
15041         * threads.c: Make the thread cleaning up cope with threads that
15042         call ExitThread()
15043
15044 2002-07-08  Radek Doulik  <rodo@ximian.com>
15045
15046         * reflection.c (method_encode_code): use non-translated values to
15047         compute finally_start, this fixes exception handling on ppc, yay!
15048
15049         * decimal.h (struct signscale): fix endianess
15050
15051 2002-07-07  Radek Doulik  <rodo@ximian.com>
15052
15053         * reflection.c: swap box_val and not val
15054
15055 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
15056
15057         * reflection.c, reflection.h: handle full assembly info in type name.
15058         Handle Type arguments when loading custom attributes.
15059         * icall.c: updated to use new mono_reflection_type_from_name () method.
15060
15061 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15062
15063         * loader.c:
15064         (method_from_memberref): also print assembly name when method not found.
15065
15066 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15067
15068         * icall.c:
15069         (ves_icall_TypeGetProperties): fixed bug #27473. 
15070
15071 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15072
15073         * reflection.c: display image name and token when cannot find the
15074         .ctor for an attribute.
15075
15076 2002-07-05  Martin Baulig  <martin@gnome.org>
15077
15078         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
15079
15080 2002-07-04  Dick Porter  <dick@ximian.com>
15081
15082         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
15083         compile on mingw.  This will cause mingw builds to not wait for
15084         subthreads to terminate after the main thread does.  I've lodged a
15085         bug with the mingw developers for them to wrap OpenThread().
15086
15087 2002-07-03  Dick Porter  <dick@ximian.com>
15088
15089         * threads.c: Store thread IDs instead of handles, because
15090         GetCurrentThread() returns a pseudohandle and therefore stores
15091         useless values.  mono_thread_cleanup() continues checking the
15092         array of threads until it is empty, to cope with subthreads
15093         spawning new threads after the main thread has finished.
15094
15095         * profiler.h:
15096         * profiler.c:
15097         * profiler-private.h: Pass the thread ID to thread profiler
15098         functions, instead of a handle
15099
15100 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15101
15102         * verify.c: fixes to make it more usable.
15103         * pedump.c: added --verify code to verify IL code in an assembly.
15104
15105 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15106
15107         * reflection.c: turn errors into warnings to allow compiling corlib.
15108
15109 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15110
15111         * reflection.c: add special cases to compile corlib.
15112
15113 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15114
15115         * reflection.c: handle properties with only a set method.
15116
15117 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15118
15119         * opcodes.h: add enum with opcodes in opval order.
15120
15121 2002-07-01  Dick Porter  <dick@ximian.com>
15122         
15123         * object.h:
15124         * object.c (mono_runtime_run_main): Removed unneeded argument
15125
15126 2002-06-28  Martin Baulig  <martin@gnome.org>
15127
15128         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
15129
15130 2002-06-27  Dick Porter  <dick@ximian.com>
15131
15132         * threads.c: Store the handle in both the parent thread and in the
15133         subthread, to minimise the time between starting a new thread and
15134         storing its ID.
15135
15136 2002-06-26  Dick Porter  <dick@ximian.com>
15137
15138         * appdomain.c (mono_runtime_cleanup): Close the socket library
15139         after all the threads have finished, not before
15140
15141 2002-06-26  Martin Baulig  <martin@gnome.org>
15142
15143         * debug-symfile.c (mono_debug_find_source_location): Added
15144         `guint32 *line_number' argument.  If it's not NULL, store the line number
15145         there and return the file name without the line number.
15146
15147 2002-06-25  Dick Porter  <dick@ximian.com>
15148
15149         * icall.c:
15150         * process.h:
15151         * process.c: Process forking and other support functions
15152
15153 2002-06-25  Dick Porter  <dick@ximian.com>
15154
15155         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
15156         things dont happen when the image is closed.
15157         (mono_image_lookup_resource): Walk the resource section looking
15158         for a particular entry
15159
15160         * cil-coff.h: PE resource section decoding
15161
15162 2002-06-25  Dick Porter  <dick@ximian.com>
15163         
15164         * assembly.h:
15165         * assembly.c: 
15166         (mono_assembly_foreach): Accessor functions to walk the list of
15167         loaded assemblies
15168         (mono_assembly_set_main):
15169         (mono_assembly_get_main): Process methods need to know which
15170         assembly is the "main" one
15171
15172         * object.c (mono_runtime_run_main): Record the main assembly
15173
15174         * debug-helpers.c: Fix typo
15175
15176 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
15177
15178         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
15179         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
15180
15181 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15182
15183         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
15184
15185 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
15186
15187         * image.c (do_mono_image_open): Initialize reference count,
15188         otherwise we leak the MonoImage.
15189
15190 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15191
15192         * reflection.c: small tweak to handle self-hosting.
15193
15194 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15195
15196         * reflection.c: fix type name parse code.
15197
15198 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15199
15200         * reflection.c: break out of the loop.
15201         * image.c: special case corlib.
15202
15203 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15204
15205         * reflection.c: add all the custom attrs at the end to ensure the
15206         ctors have been properly initialized when the attributes are defined
15207         in the current assembly.
15208
15209 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15210
15211         * reflection.c: handle correctly multiple-nested types.
15212
15213 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15214
15215         * row-indexes.h: fix typos.
15216         * reflection.c: adjust for typos and fix method_def_or_ref
15217         encoding in MethodImpl table.
15218
15219 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15220
15221         * reflection.c: fix entry point patching (thanks Serge!).
15222
15223 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
15224
15225         * verify.c: add check for System.Exception
15226
15227 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
15228
15229         * image.c, class.c: minifix for code just c&p'ed.
15230         * reflection.c: warning fix.
15231         * object.h, loader.h, domain.c: load also StringBuilder.
15232
15233 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15234
15235         * marshal.h, marshal.c: some support code to handle complex marshaling.
15236
15237 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15238
15239         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
15240         Better signatures with vtable error dump.
15241
15242 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
15243
15244         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
15245
15246 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
15247
15248         * icall.c (ves_icall_Type_GetField): impl.
15249
15250 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15251
15252         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
15253         to retrieve a marshal description blob for a field or param.
15254
15255 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15256
15257         * reflection.h, reflection.c: change order of nested type emission
15258         to avoid table corruption. The NestedTypes table is sorted.
15259         * icall.c: change order of GetConstructor results to workaround mcs bug.
15260
15261 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15262
15263         * reflection.h, reflection.c: handle field and param marshal
15264         information.
15265
15266 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15267
15268         * icall.c, marshal.c marshal.h: more Marshal class implementation.
15269
15270 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15271
15272         * reflection.c: fix call convention.
15273
15274 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15275
15276         * reflection.h, reflection.c: mono_image_get_memberref_token()
15277         takes a type instead of a class, now. Added
15278         mono_image_get_array_token() to create tokens for the special
15279         multi-dim array methods.
15280
15281 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15282
15283         * assembly.c: handle modules (no assembly table). Split
15284         loading references in its own function.
15285         * class.c: handle moduleref resolution scope.
15286         * image.c, image.h: cache module name in image.
15287
15288 2002-06-07  Martin Baulig  <martin@gnome.org>
15289
15290         * reflection.c (mono_image_get_type_info): Only add a class layout entry
15291         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
15292
15293 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15294
15295         * icall.c: more signature fixes that used uint instead of int.
15296
15297 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15298
15299         * reflection.c: fixed signature of field refs.
15300
15301 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15302
15303         * class.c, reflection.c: handle typerefs of nested types
15304         (both on read and when writing files).
15305
15306 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15307
15308         * icall.c: fix method signatures that tried to workaround the previous
15309         typo, d'oh!
15310
15311 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15312
15313         * debug-helpers.c: fix typo.
15314
15315 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15316
15317         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
15318         rewrote the PE/COFF writing code (our programs are understood by the
15319         ms runtime, now).
15320
15321 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15322
15323         * gc.c, gc.h, icall.c: weakreference support.
15324
15325 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15326
15327         * Makefile.am, mono-config.c: use $(sysconfdir).
15328
15329 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15330
15331         * icall.c: changed default precision of Double.ToString() to 15.
15332         Fixed memory leak. Unified with Single.ToString.
15333
15334 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15335
15336         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
15337
15338 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15339
15340         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
15341         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
15342         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
15343         and myself.
15344
15345 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15346
15347         * debug-symfile.c, sysmath.c: yet more compilation fixes.
15348
15349 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15350
15351         * reflection.c, socket-io.c: more compilation fixes.
15352
15353 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15354
15355         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
15356         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
15357         unicode.c: warning and compiler compatibility fixes.
15358
15359 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15360
15361         * class.h, metadata.c: fixed warnings/compilation errors.
15362
15363 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15364
15365         * Makefile.am, mono-config.c, mono-config.h: configuration file
15366         support routines.
15367         * loader.c, loader.h: make Dll mapping configurable at runtime in the
15368         config file. Export methods to insert and lookup mappings.
15369
15370 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15371
15372         * reflection.c: handle types and boxed objects in custom attr
15373         constructors.
15374
15375 2002-05-30  Martin Baulig  <martin@gnome.org>
15376
15377         * debug-symfile.c
15378         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
15379
15380 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
15381
15382         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
15383         to lookup the implmap row for a P/Invoke method.
15384         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
15385         P/Invoke method from the runtime on an as needed basis.
15386
15387 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
15388
15389         * metadata.c (mono_metadata_parse_signature): impl.
15390
15391 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15392
15393         * class.c: handle .pack directive.
15394
15395 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15396
15397         * object.c: initialize static fields with RVA data.
15398
15399 2002-05-25  Martin Baulig  <martin@gnome.org>
15400
15401         * debug-symfile.c
15402         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
15403
15404 2002-05-24  Martin Baulig  <martin@gnome.org>
15405
15406         * debug-symfile.c
15407         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
15408         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
15409         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
15410
15411 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15412
15413         * object.c: special case string ctros in invoke.
15414         * gc.c: silly whitespace changes.
15415
15416 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
15417
15418         * threadpool.[ch]: impl. a threadpool that can
15419         be used by mint and mono.
15420
15421 2002-05-22  Martin Baulig  <martin@gnome.org>
15422
15423         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
15424         The first argument is now a `MonoReflectionModuleBuilder *', the return
15425         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
15426         `methods' field to get the method builder.  The `token' argument is the
15427         unfixed token.
15428
15429         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
15430         invalid characters instead of g_assert_not_reached()ing.  This seems
15431         to be the behaviour of mscorlib.
15432
15433 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
15434
15435         * object.c (mono_runtime_invoke_array): applied patch from Rachel
15436         Hestilow to fix bug #25104
15437
15438 2002-05-21  Martin Baulig  <martin@gnome.org>
15439
15440         * debug-symfile.c (mono_debug_find_source_location): New function.
15441         Looks up an IL offset in the line number table and returns the source
15442         location as a string.
15443
15444 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15445
15446         * icall.c:
15447         (mono_double_ToStringImpl): changed %f by %g until we have something
15448         better.
15449
15450 2002-05-21  Nick Drochak  <ndrochak@gol.com>
15451
15452         * icall.c : Use different name for Math.Pow's icall.  Needed to check
15453         parameters first in C#.
15454
15455 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15456
15457         * icall.c, reflection.h: added icall to get info about an event.
15458
15459 2002-05-20  Radek Doulik  <rodo@ximian.com>
15460
15461         * object.c (mono_value_box): don't use memcpy for boxing on BIG
15462         endian
15463         (mono_value_box): don't use memcpy for small sizes on
15464         architectures with unaligned access
15465
15466 2002-05-20  Martin Baulig  <martin@gnome.org>
15467
15468         * reflection.c (mono_reflection_setup_internal_class): Don't crash
15469         if `tb->parent == NULL'.
15470         (mono_reflection_create_internal_class): New function.  This is
15471         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
15472         for enum types.
15473
15474         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
15475         New interncall.
15476
15477 2002-05-19  Martin Baulig  <martin@gnome.org>
15478
15479         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
15480         argument to get the length, don't default to the array length.
15481
15482 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
15483
15484         * assembly.c (mono_assembly_setrootdir): New function used to
15485         override the MONO_ASSEMBLIES directory.
15486
15487 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15488
15489         * icall.c: ValueType_GetHashCode() initialize local var.
15490
15491 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15492
15493         * reflection.c: sort custom attributes table.
15494
15495 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15496
15497         * reflection.c: support named args in custom attributes (write support).
15498
15499 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
15500
15501         * reflection.c: fix finally position calculation.
15502
15503 2002-05-15  Radek Doulik  <rodo@ximian.com>
15504
15505         * reflection.c: fixed endianess at many places
15506
15507         * icall.c (ves_icall_InitializeArray): comment out debug msg
15508
15509 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
15510
15511         * object.c (mono_unhandled_exception): new function to handle
15512         unhandled exceptions.
15513         (mono_unhandled_exception): call the UnhandledException event.
15514         (mono_runtime_delegate_invoke): impl.
15515
15516 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
15517
15518         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
15519         returns the RVA, not the direct pointer to the data. Handle the case
15520         when the class size is fixed.
15521
15522 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15523
15524         * reflection.c: fix some endianess issues.
15525
15526 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
15527
15528         * object.c (mono_runtime_invoke): is now able to catch exceptions.
15529
15530         * threads.c (mono_thread_init): added a callback which is invoked
15531         at thread start.
15532
15533 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
15534         
15535         * icall.c: make GetHashCode return non-negative values.
15536
15537 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
15538
15539         * object.c, icall.c, gc.c: revert to address-based hashcode.
15540
15541 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
15542
15543         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
15544
15545 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15546
15547         * icall.c, class.c: special case <Module>.
15548
15549 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
15550
15551         * icall.c: fix bug in GetNow().
15552
15553 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
15554
15555         * object.c (mono_runtime_class_init): make sure that we call all
15556         static class constructors.
15557
15558 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15559
15560         * reflection.c: sort methodsemantics table.
15561
15562 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15563
15564         * reflection.h, reflection.c: honour init locals setting.
15565
15566 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
15567
15568         * icall.c: copied Double ToStringImpl for Single ToStringImpl
15569
15570 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15571
15572         * reflection.c: support ContructorBuilders in attribute blob creation.
15573
15574 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15575
15576         * reflection.c: some changes to build a binary that can be run
15577         directly in windows.
15578
15579 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
15580
15581         * loader.c: print a big message when an icall can't be found.
15582
15583 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15584
15585         * string-icalls.c: fix bug 24248.
15586
15587 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15588
15589         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
15590         icall.c, reflection.h: separate assembly loading by pathname and by
15591         assembly name. Use the MONO_PATH env var to search for assemblies.
15592
15593 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15594
15595         * assembly.c, image.h: add some support for assemblies
15596         with multiple modules.
15597         * class.c, class.h: export mono_class_from_typeref().
15598         * loader.c: remove duplicated code and use mono_class_from_typeref(),
15599         instead.
15600
15601 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15602
15603         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
15604         documentation says (the ECMA one is correct).
15605
15606 2002-05-02  Dick Porter  <dick@ximian.com>
15607
15608         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
15609         Don't name the synchronisation mutex.
15610
15611 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
15612
15613         * rand.c
15614         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
15615         Make the prototypes match.
15616         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
15617         Same.
15618
15619         * icall.c
15620         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
15621         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
15622         all systems have tm.tm_zone, so use strftime() with %Z to print
15623         the timezone abreviation into a temp string.
15624
15625         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
15626         rather than mono_array_addr() on a MonoString on Big Endian
15627         machines.
15628
15629 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
15630
15631         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
15632         fix bug 24041
15633
15634 2002-04-30  Dick Porter  <dick@ximian.com>
15635
15636         * socket-io.c: Cope with SOCKET being an integer rather than a
15637         pointer now.
15638
15639         * threads.c: Added Thread_free_internal, to deal with thread
15640         handle cleanup.  Moved calls to handle_store() and handle_remove()
15641         to start_wrapper(), so each can only be called once.  Allocate
15642         synchronisation blocks with GC_malloc(), and use GC finalisation
15643         to close the handles.
15644
15645         * icall.c: added System.Threading.Thread::Thread_free_internal
15646
15647 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15648
15649         * icall.c: support Environment.Exit, CommandLineArgs().
15650
15651 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15652
15653         * object.c, object.h: added mono_runtime_run_main () and
15654         mono_runtime_get_main_args () for use in System.Environment.
15655
15656 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15657
15658         * gc.c: fix thinko, enable actual finalization since the jit is now
15659         fixed.
15660
15661 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15662
15663         * gc.c, object.c: take into account that an object may be offset wrt the address
15664         returned by GC_malloc().
15665
15666 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15667
15668         * image.c: handle files without entries in the assembly table (modules).
15669
15670 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
15671
15672         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
15673         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
15674         allowed to be null when it's System.Object class setup.
15675
15676 2002-04-27  Martin Baulig  <martin@gnome.org>
15677
15678         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
15679         if `tb->parent == NULL' rather than crashing.
15680
15681 2002-04-28  Nick Drochak  <ndrochak@gol.com>
15682
15683         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
15684         calling acos() where asin() should have been called.
15685
15686 2002-04-26  Martin Baulig  <martin@gnome.org>
15687
15688         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
15689         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
15690         there's a subdirectory called `System', but we don't want to read that
15691         subdirectory as an assembly.
15692
15693 2002-04-25  Martin Baulig  <martin@gnome.org>
15694
15695         * debug-symfile.c: Reflect latest MonoString changes.
15696
15697 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15698
15699         * rand.c, rand.h: instance method icalls need to have an explicit
15700         this pointer as first argument in the C implementation.
15701
15702 2002-04-25  Nick Drochak <ndrochak@gol.com>
15703
15704         * icall.c: Fix typo in map for GetNonZeroBytes
15705
15706 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
15707
15708         * string-icalls.c : String does now passes unit tests without any 
15709         errors, the following changes has been made:
15710         
15711         Implemented replace methods.
15712         Renaming of methods to (try) follow the standard.
15713         Fixed compare ordinal
15714         Made all memory allocated directly to function instead of via icall function.
15715         Small performance fix in is_in_array function
15716                         
15717  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
15718
15719         c (mono_string_Internal_ctor_charp_int_int):
15720         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
15721         sindex < 0, throw ArgumentOutOfRangeException instead of
15722         ArgumentNullException.
15723
15724         Added new check for length == 0, however
15725         I need to make it return String.Empty from the C code.
15726         
15727         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
15728         that calculate the length for us here.
15729         
15730         (mono_string_Internal_ctor_sbytep_int_int): Replaced
15731         mono_string_new_utf16 with mono_string_new, since value is utf8.
15732
15733 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15734
15735         * object.c: register the object for finalization if needed.
15736         Allocate one more char in the string for the terminating 0 char.
15737
15738 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15739
15740         * class.c, class.h, image.c: check if a type implemenst a destructor.
15741         Use the proper key for array class lookups.
15742         * icall.c: register the icalls in the System.GC class.
15743         * gc.c, gc.h: GC-related functions and icalls.
15744
15745 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15746
15747         * icall.c:
15748         * socket-io.c:
15749         * unicode.c: free some strings gotten from mono_string_to_utf8 and
15750         changed a couple of free () by g_free ().
15751
15752         * decimal.c: one-liner in the comments for decimal2string ().
15753
15754 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
15755
15756         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
15757
15758 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
15759
15760         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
15761         * object.c (mono_runtime_invoke_array) : handle null in params
15762
15763 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
15764
15765         * string-icalls.c: fixed bug in split (one off bug)
15766
15767 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
15768
15769         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
15770         * icalls.c: added String::Equals as internal method
15771
15772 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
15773
15774         * threads.c: fixed bug in the double interlocked functions
15775
15776 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
15777
15778         * threads.c: implemented all of the new interlocked icalls.
15779         * string-icalls.c: fix a bug in insert.
15780         * icalls.c: added the icalls for interlocked, removed old string functions.
15781         
15782 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15783
15784         * loader.c: fix off-by-one error when reading argument names.
15785
15786 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15787
15788         * profiler.c: win32 counter implementation (untested).
15789         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
15790         (the latter needs testing and more complete impl. from win32 folks).
15791
15792 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
15793
15794         * object.c: mono_array_new_full workaround mono_array_class_get
15795         problem.
15796
15797 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
15798
15799         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
15800         * object.h (mono_string_chars): Changed casting type.
15801
15802 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
15803
15804         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
15805                            method signatures to use gunichar2 instead of gint16.
15806
15807 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
15808
15809         * object.h, object.c: domain-specific versions of mono_object_new and
15810         mono_array_new.
15811
15812 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
15813
15814         * object.c: changed String layout
15815
15816         * string-icalls.c (mono_string_Internal_ctor_chara): added
15817         internal string constructors.
15818
15819 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
15820
15821         * threads.c: pass 'this' to the thread start routine.
15822
15823 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15824
15825         * string-icalls.c: fix IndexOf and LastIndexOf. Now
15826         InternalCompareStr don't call twice mono_string_cmp_char for the last
15827         character. Improved performance in mono_string_cmp_char.
15828
15829 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15830
15831         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
15832         code into its own library: libmonoruntime.
15833
15834 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
15835
15836         * object.h, object.c: changed array format so that szarrays do not
15837         require a bounds structure.
15838         * icall.c, appdomain.c: support for new szarray format.
15839
15840 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
15841
15842         * metadata.c: compare also the retuns type when comparing signatures:
15843         we didn't do this as an optimization since really overloaded methods
15844         must differ also in the arguments, but this doesn't work with
15845         low-level IL code (or when using explicit conversion operators: see
15846         bug#23498 for an example).
15847
15848 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15849
15850         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
15851
15852 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15853
15854         * icall.c: make MonoType::GetElementType its own icall.
15855
15856 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15857
15858         * icall.c: remove MonoMethod_get_Name().
15859         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
15860         object.
15861
15862 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
15863
15864         * string-icalls.c: optimized a few methods.
15865
15866 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
15867
15868         * icall.c: added all new string internal calls
15869         * string-icalls.c: added, new string internal call implementation.
15870         * object.c: added mono_string_new_size for allocating a string a size
15871
15872 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
15873
15874         * object.c (mono_object_isinst): use the same code as in the
15875         optimized x86 version.
15876
15877 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15878
15879         * profiler.c: TSC-based timer code (faster and more accurate).
15880         Not hooked up in configure, yet (set USE_X86TSC to 1).
15881
15882 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
15883
15884         * profiler.c, profiler.h: track time spent compiling methods.
15885         * threads.c: track thread creation/destruction.
15886
15887 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
15888
15889         * profiler.c, profiler.h, profiler-private.h: profiling interface
15890         and sample implementation. Moved here so that it can be used also by
15891         the jit.
15892
15893 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
15894
15895         * reflection.c, reflection.h: keep types and other handles separate in
15896         the hash tables for referred tokens. Add guid for modules.
15897
15898 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15899
15900         * assembly.c: fix bugs found with valgrind.
15901         * metadata.h, metadata.c: added mono_metadata_guid_heap().
15902
15903 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
15904
15905         * threads: added icall support for getting current domain for
15906                    the thread.
15907  
15908 2002-04-13  Martin Baulig  <martin@gnome.org>
15909
15910         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
15911         (MonoDebugVarInfo): Added `index' field for register based addresses.
15912         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
15913         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
15914         `MonoDebugVarInfo *params' and `guint32 this_offset' with
15915         `MonoDebugVarInfo *this_var'.
15916
15917         * debug-symfile.c (relocate_variable): New static function to write
15918         a location description for a local variable or method parameter.
15919
15920 2002-04-12  Martin Baulig  <martin@gnome.org>
15921
15922         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
15923         stack offset and begin/end scope address of a local variable.
15924         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
15925         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
15926         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
15927
15928         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
15929         Added new relocation types for start/end scope of a local variable.
15930
15931 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15932
15933         * object.h: add mono_object_domain() macro.
15934         * reflection.c: handle typespecs.
15935         * icall.c: MonoMethod::get_Name() implementation.
15936
15937 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15938
15939         * icall.c: String::GetHashCode() icall implementation.
15940
15941 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15942
15943         * icall.c: String::IndexOfAny icall.
15944         * object.c, object.h: make array->max_length more useful.
15945         Intrduced mono_object_class() and mono_string_length() macros.
15946
15947 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15948
15949         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
15950         instead of g_unichar_isdigit.
15951
15952 2002-04-11  Nick Drochak  <ndrochak@gol.com>
15953
15954         * icall.c: Implement a simple Double.ToString().
15955
15956 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15957
15958         * appdomain.h: only io-layer.h is supposed to be included.
15959         * icall.c: explicitly import environ. Fix warning.
15960
15961 2002-04-10  Nick Drochak  <ndrochak@gol.com>
15962
15963         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
15964                 return true even if it's not Daylight Savings time.
15965                 Only return false for the case where the function isn't
15966                 implemented for a plaform (read Windows).
15967
15968 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15969
15970         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
15971         data with a mutex.
15972
15973 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
15974
15975         * mempool.c (mono_mempool_alloc): only use g_malloc when
15976         absolutely necessary.
15977
15978 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
15979
15980         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
15981
15982         * class.c (mono_class_vtable): use domain mempool to allocate vtable
15983         (mono_class_proxy_vtable): use domain mempool
15984
15985 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15986
15987         * appdomain.h, appdomain.c: split initialization that requires the
15988         execution engine support into mono_runtime_init().
15989
15990 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
15991
15992         * class.c (mono_class_init): don't include vtable inside MonoClass
15993         to save some memory, gather some statistics.
15994         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
15995
15996 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15997
15998         * icall.c: internalcall implementation for ValueType.Equals().
15999
16000 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
16001
16002         * object.c (mono_message_init): moved 
16003         (mono_runtime_exec_main): new arch. independent impl.
16004         (mono_runtime_invoke_array): new method - like
16005         mono_runtime_invoke, but you can pass an array of objects.
16006         (mono_remoting_invoke): new arch. independent impl.
16007         (mono_message_invoke): new arch. independent impl.
16008         (mono_runtime_class_init): new arch. independent impl.
16009         (mono_runtime_object_init): new arch. independent impl.
16010
16011 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16012
16013         * metadata.c, object.c, reflection.c: documented the exported
16014         functions.
16015
16016 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16017
16018         * icall.c: simpler code to pass the assembly builder data to corlib.
16019         Implement GetNestedTypes() internalcall.
16020
16021 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16022
16023         * class.c: warn if a type can't be loaded.
16024
16025 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
16026
16027         * image.h: typedef MonoImageOpenStatus
16028         * types.h: removed unused file
16029         
16030 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
16031
16032         * icall.c: Enum_ToObject accepts enum value arguments.
16033
16034 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16035
16036         * class.c: move initialization of properties, events and nested
16037         classes, so that they happen for interfaces, too.
16038
16039 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16040
16041         * icall.c: cleanup some ugly casts in Array_SetValue*.
16042
16043 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16044
16045         * icall.c: the values array fro enums is of the correct type, now.
16046         Implement (correctly) getFullName instead of assQualifiedName for
16047         MonoType.
16048         * reflection.h, reflection.c: added mono_type_get_name ().
16049
16050 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16051
16052         * assembly.c, image.h: for each MonoImage, record from wich assembly
16053         it was loaded.
16054         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
16055         Make Type.Assembly work.
16056
16057 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
16058
16059         * debug-symfile.h: use char* instead of gpointer to avoid
16060         unnecessary casts.
16061
16062         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
16063
16064         * icall.c (ves_icall_InternalExecute): impl. FielSetter
16065         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
16066
16067 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
16068
16069         * icall.c (mono_message_init): impl. (code cleanup)
16070         (ves_icall_InternalExecute): impl. FieldGetter
16071
16072         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
16073         defined we call all (non-static)methods through the vtable. 
16074
16075 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
16076
16077         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
16078         finalizer even though the memory is still referenced (and the chunk of
16079         memory is not freed).
16080
16081 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
16082
16083         * assembly.c: fix brokeness.
16084
16085 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
16086
16087         * class.c: kill some warnings. Check explicit interface method
16088         implementation also without considering the namespace.
16089         Load also literal strings in static class data.
16090
16091 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
16092
16093         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
16094         (default_assembly_name_resolver): Make the resolver take the
16095         "base" directory where the assembly was originally defined, so we
16096         can load DLLs that are in the same directory as the assembly that
16097         is being referenced.
16098
16099 2002-03-28  Dick Porter  <dick@ximian.com>
16100
16101         * file-io.h: 
16102         * file-io.c:
16103         * socket-io.c: 
16104         * unicode.h: 
16105         * unicode.c: Warning cleanups
16106
16107 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
16108
16109         * object.h, reflection.h: use the correct type instead of MonoObject.
16110
16111 2002-03-28  Martin Baulig  <martin@gnome.org>
16112
16113         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
16114         (mono_debug_update_symbol_file): Initialize classes if necessary.
16115
16116 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
16117
16118         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
16119         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
16120
16121 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
16122
16123         * assembly.h: fix function prototype.
16124         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
16125         * mono-endian.h: use const cast.
16126
16127 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
16128
16129         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
16130
16131 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
16132
16133         * loader.c: don't assert when a typeref can't be loaded, give
16134         a chance to the runtime to trow an exception instead.
16135         * loader.h: fix warning.
16136
16137 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
16138
16139         * class.c (mono_class_proxy_vtable): added proxy support
16140
16141 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
16142
16143         * icall.c: removed last of PAL calls, added System.Environment
16144         * file-io.h, file-io.c: MonoIO implementation
16145         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
16146
16147 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
16148
16149         * appdomain.c: do not use the byte marker in ldstr table lookup.
16150         * debug-helpers.c: allow two ':' to separate class and method name.
16151         * object.c: allocate arrays bounds with the GC, too.
16152         * verify: add a few more checks.
16153
16154 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
16155
16156         * reflection.c: output also literal strings. Allocate parameter data
16157         with GC_malloc() (thanks, Martin, for catching this!).
16158
16159 2002-03-26  Martin Baulig  <martin@gnome.org>
16160
16161         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
16162         include the `this' offset in the `param_offsets'.
16163
16164 2002-03-25  Martin Baulig  <martin@gnome.org>
16165
16166         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
16167         mono_debug_get_class() function to get the classes. Added new
16168         relocation types for arrays and strings.
16169         (mono_debug_get_class): New static function to search in all
16170         referenced assemblies for a metadata token.
16171
16172         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
16173
16174 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
16175
16176         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
16177         hold gc-allocated objects. Make the string heap a stream like the
16178         others. Removed duplicated code when writing stream info.
16179         Added asserts to catch possible buffer overflows. Set the sorted map
16180         for tables that need sorting. Added some documentation.
16181
16182 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
16183
16184         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
16185         for interned strings and vtables.
16186
16187 2002-03-24  Martin Baulig  <martin@gnome.org>
16188
16189         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
16190         it in the array since it was created with g_slist_prepend().
16191
16192 2002-03-24  Martin Baulig  <martin@gnome.org>
16193
16194         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
16195         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
16196         (mono_debug_method_from_token): Renamed to
16197         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
16198         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
16199
16200         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
16201         relocation types.
16202
16203         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
16204
16205 2002-03-24  Martin Baulig  <martin@gnome.org>
16206
16207         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
16208         (mono_debug_method_from_token): New func.
16209
16210         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
16211         New interncall, calls mono_debug_local_type_from_signature().
16212         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
16213         calls mono_debug_method_from_token().
16214
16215 2002-03-23  Martin Baulig  <martin@gnome.org>
16216
16217         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
16218         specifies the number of bytes to be converted, not the array size.
16219         Return the number of chars, not the number of bytes.
16220         (ves_icall_iconv_get_chars): The `byteCount' argument
16221         specifies the number of bytes to be converted, not the array size.
16222
16223 2002-03-23  Martin Baulig  <martin@gnome.org>
16224
16225         * reflection.h (MonoReflectionSigHelper): New type.
16226
16227         * reflection.c (mono_reflection_sighelper_get_signature_local),
16228         (mono_reflection_sighelper_get_signature_local): New functions.
16229
16230         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
16231         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
16232         interncalls.
16233
16234 2002-03-23  Martin Baulig  <martin@gnome.org>
16235
16236         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
16237         is_writeable is set.
16238         (mono_raw_buffer_update): New function to write the modified map
16239         back to disk.
16240
16241         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
16242
16243         * debug-symfile.c (mono_debug_update_symbol_file): Call
16244         mono_raw_buffer_update() when done writing.
16245
16246 2002-03-23  Martin Baulig  <martin@gnome.org>
16247
16248         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
16249
16250         * debug-symfile.c: Added support for arguments and local variables.
16251
16252 2002-03-23  Dick Porter  <dick@ximian.com>
16253
16254         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
16255         protected by ifdefs, hence breaking the w32 build.
16256
16257 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16258
16259         * object.c: implement is_interned() the right way.
16260
16261 2002-03-21  Martin Baulig  <martin@gnome.org>
16262
16263         * debug-symfile.[ch]: New files to handle debugging information
16264         files. There's also support to dynamically update these symbol
16265         files to include machine dependent information.
16266
16267 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
16268
16269         * threads.c (mono_thread_create): new function to create thread
16270         from C
16271
16272 2002-03-20  Martin Baulig  <martin@gnome.org>
16273
16274         * icall.c (ves_icall_InternalInvoke): Create a new object if the
16275         method is a constructor.
16276         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
16277         points to ves_icall_InternalInvoke().
16278
16279 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
16280
16281         * file-io.c: Flush shouldn't throw exceptions.
16282
16283 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
16284
16285         * file-io.c: FileStream flush support; FileSetLength now
16286         restores file pointer.
16287
16288 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
16289
16290         * class.c: set image for pointer classes.
16291
16292 2002/03/19  Nick Drochak <ndrochak@gol.com>
16293
16294         * sysmath.c: Forgot one.
16295
16296 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
16297
16298         * sysmath.c: Avoid redefining existing names.
16299
16300 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
16301
16302         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
16303         handled by runtime as icall rather than dllimport from libm.so
16304         * file-io.c, file-io.h: fixed handle argument type.
16305
16306 2002-03-18  Dick Porter  <dick@ximian.com>
16307
16308         * reflection.c (mono_image_get_type_info): rename interface to
16309         iface, because of "#define interface struct" on windows.
16310
16311 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
16312
16313         * class.c, class.h: rename and export mono_ptr_class_get().
16314         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
16315         * reflection.c, reflection.h, icall.c: better/saner type name
16316         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
16317         method signatures.
16318
16319 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
16320
16321         * class.c (mono_class_init): removed hardcoded GHC_SLOT
16322
16323         * icall.c (ves_icall_InternalInvoke): impl.
16324
16325 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16326
16327         * reflection.c: output the interface map table, too.
16328
16329 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
16330
16331         * class.c (class_compute_field_layout): separate computation of 
16332         static field layout
16333
16334 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
16335
16336         * icall.c: added System.Buffer support.
16337         * file-io.c: moved file icalls from PAL to FileStream.
16338
16339 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
16340
16341         * icall.c (ves_icall_System_Object_GetHashCode): impl.
16342
16343 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
16344
16345         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
16346
16347 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16348
16349         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
16350
16351 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
16352
16353         * debug-helpers.{c,h}: moved here from monograph some useful functions
16354         to locate a method by name/signature in a class or image. Included
16355         also a small and flexible IL disassembler.
16356
16357 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16358
16359         * reflection.c: fixup tokens in methods with small header size, too.
16360
16361 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
16362
16363         * object.c (mono_string_to_utf8): remove assert(!error), instead
16364         print a warning. 
16365
16366 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
16367
16368         * icall.c: update to the new mono_Array_class_get interface.
16369
16370 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
16371
16372         * appdomain.c, object.c: Boehm-GC enable.
16373         * icall.c: make get_data_chunk() support split data requests.
16374         Ensure a class is initialized in more cases. Return only the first
16375         property found in GetProperties() or the compiler gets confused. 
16376         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
16377         * reflection.h, reflection.c: add fixup mechanism for field and method
16378         tokens. Initialize assembly->typeref in a single place. Output
16379         properties after events. Support custom attributes for events, too.
16380         Typo fix for paramter custom attrs.
16381
16382 2002-03-07  Martin Baulig  <martin@gnome.org>
16383
16384         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
16385
16386 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
16387
16388         * class.c (mono_array_class_get): fix. for multi. dim. arrays
16389
16390 2002-03-06  Martin Baulig  <martin@gnome.org>
16391
16392         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
16393         non-zero lower bounds. See testcases #F10-#F13.
16394
16395 2002-03-05  Martin Baulig  <martin@gnome.org>
16396
16397         * exception.c (mono_get_exception_argument_out_of_range): New exception.
16398
16399         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
16400         ves_icall_System_Array_GetValue(), only calculate the absolute array position
16401         here.
16402         (ves_icall_System_Array_SetValue): Likewise.
16403         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
16404         as argument and does the actual work. This function is used when copying a
16405         multi-dimensional array.
16406         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
16407         now do all the widening conversions of value types.
16408         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
16409
16410 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16411
16412         * class.c: remove some magic numbers and use the smbolic names,
16413         instead. Added init_events() to load event info at class init time.
16414         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
16415         and mono_metadata_methods_from_event().
16416         * reflection.h, reflection.c: added support for writing out the evnets
16417         related information.
16418
16419 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
16420
16421         * reflection.h, icall.c: use a different method (GetInterfaces)
16422         to gather interface info and add isbyref, isprimitive and
16423         ispointer to the ves_icall_get_type_info() return value.
16424
16425 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
16426
16427         * class.h: stared adding support for events.
16428         * icall.c: split find_members implementation. Added debug icall to get
16429         the address of an object.
16430         * reflection.c: handle TypeBuilders in mono_type_get_object().
16431
16432 2002-03-01  Martin Baulig  <martin@gnome.org>
16433
16434         * icall.c (ves_icall_System_Array_GetLength): This must throw an
16435         ArgumentOutOfRangeException(), not an ArgumentException().
16436         (ves_icall_System_Array_GetLowerBound): Likewise.
16437         (ves_icall_System_Array_GetValue): Improved argument checking.
16438         (ves_icall_System_Array_SetValue): Improved argument checking.
16439
16440 2002-03-01  Martin Baulig  <martin@gnome.org>
16441
16442         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
16443         called with invalid arguments rather than just dying with g_assert().
16444         (ves_icall_System_Array_SetValue): Likewise.
16445         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
16446         raise a NotImplementedException instead.
16447         (ves_icall_System_Array_GetLength): Added argument checking.
16448         (ves_icall_System_Array_GetLowerBound): Added argument checking.
16449
16450 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
16451
16452         * object.h (mono_assert): new macros mono_assert and
16453         mono_assert_not_reached
16454
16455 2002-02-28  Martin Baulig  <martin@gnome.org>
16456
16457         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
16458         and "System::String::IsInterned" to "System::String::_IsInterned".
16459
16460 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
16461
16462         * icall.c: remove hacks for typebuilder. Added icall to create a
16463         modified type from a tybebuilder.
16464         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
16465         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
16466         to create a backing MonoClass for a TypeBuilder.
16467
16468 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16469
16470         * class.c, class.h: more refactoring of class init.
16471         Export mono_class_setup_mono_type() and mono_class_setup_parent().
16472
16473 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
16474
16475         * marshal.c, marshal.h: start of marshaling interface.
16476
16477 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
16478
16479         * icall.c: fix order in assembly qualified name icall.
16480
16481 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
16482
16483         * class.c: do not free str, since we store it in the hash table.
16484         * reflection.h: add label field to MonoILExceptionInfo.
16485         * reflection.c: handle references to more than one assembly. Handle
16486         case when there isn't a module created in the assembly.
16487
16488 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
16489
16490         * class.c: Fix typo. Start refactoring of class init code.
16491
16492 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
16493
16494         * appdomain.c: exit with 1 on error.
16495         * class.c: we already have the name in MonoClassField.
16496         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
16497         MonoStreamHeader instead of an offset of image->raw_metadata.
16498
16499 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
16500
16501         * appdomain.c (mono_init): Be even more descriptive about the error.
16502
16503 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
16504
16505         * appdomain.c: give the user an informative message when corlib can't
16506         be loaded.
16507
16508 2002-02-26  Martin Baulig  <martin@gnome.org>
16509
16510         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
16511         New icall to get the time zone data.
16512
16513 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16514
16515         * reflection.c: set virtual and raw size of section correctly.
16516         * threads.c: transfer domain information to newly created threads.
16517
16518 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
16519
16520         * class.c: when instancing a class in a domain, load the default
16521         vaules for static fields from the constant table. Fix System.Enum to
16522         not be an enum.
16523         * icall.c: implement Object::GetType() internalcall. Implemented
16524         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
16525         Fixed checking of binding flags in find_members().
16526         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
16527         * reflection.c: handle enumerations when writing to the constant
16528         table. Use a different object cache for types.
16529
16530
16531 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
16532
16533         * object.c (mono_object_isinst): fix for arrays
16534
16535         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
16536
16537 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
16538
16539         * object.c: don't use mprotect ()  and fix intern pool hash table
16540         lookup for big endian systems.
16541
16542 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16543
16544         * icall.c: change type_is_subtype_of () signature.
16545
16546 2002-02-21  Mark Crichton  <crichton@gimp.org>
16547
16548         * rand.c, rand.h: Added random number generator for
16549         System.Security.Cryptography classes.
16550
16551         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
16552
16553         * icall.c: Added System.Security.Cryptography calls.
16554
16555 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
16556
16557         * class.c, icall.c, metadata.c: better support for pointer types.
16558         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
16559         * reflection.c: Add support for getting custom attrs for properties
16560         and simplify some code.
16561
16562 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16563
16564         * icall.c: change getToken () and add custom attribute GetBlob()helper
16565         method.
16566         * reflection.h: add custom attrs array to the reflection builder structures.
16567         * reflection.c: encode and emit custom attributes for all the relevant
16568         reflection objects. Cache fieldref and methodref tokens. Change
16569         mono_image_create_token() interface to take a MonoDynamicAssembly.
16570         More complete custom attributes decoder. Load custom attributes for
16571         Assembly, Field, Method and Constructor objects, too. Make the
16572         returned array an Attribute[] one, not object[]. Added
16573         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
16574         custom attribute constructor.
16575
16576 2002-02-20  Dick Porter  <dick@ximian.com>
16577
16578         * icall.c:
16579         * rawbuffer.c:
16580         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
16581         problem code out for now).
16582
16583 2002-02-19  Radek Doulik  <rodo@ximian.com>
16584
16585         * object.c (mono_ldstr): use hash table to avoid multiple swapping
16586
16587 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
16588
16589         * icall.c: register the GetCustomAttributes method.
16590         * object.c, object.h: add mono_string_new_len ().
16591         * reflection.h, reflection.c: added mono_runtime_invoke(),
16592         mono_install_runtime_invoke(). Added
16593         mono_reflection_get_custom_attrs () to load custom attributes and
16594         create the attribute objects.
16595
16596 2002-02-19  Dick Porter  <dick@ximian.com>
16597         * threads-dummy-types.c:
16598         * threads-dummy-types.h:
16599         * threads-dummy.c:
16600         * threads-dummy.h:
16601         * threads-pthread-types.c:
16602         * threads-pthread-types.h:
16603         * threads-pthread.c:
16604         * threads-pthread.h:  Deleted obsolete files
16605
16606 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
16607
16608         * class.c (mono_class_vtable): runtime init the class when we
16609         allocate static class data.
16610
16611         * icall.c (ves_icall_System_Array_SetValue): check for null values.
16612
16613         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
16614         and String - but we will need generic marshalling support in the
16615         future. 
16616         (mono_init): set the domain name in a ms compatible way
16617
16618         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
16619         String[].
16620
16621 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
16622
16623         * object.c (mono_array_clone): use alloca() instead of g_malloc  
16624         for sizes
16625
16626         * appdomain.c (mono_domain_unload): impl.
16627
16628 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16629
16630         * appdomain.c, object.c: fix intern pool implementation.
16631         * class.c: fix alignment code.
16632
16633 2002-02-16  Radek Doulik  <rodo@ximian.com>
16634
16635         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
16636         and s2 > s1, just copy lower bytes to be compatible with little
16637         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
16638         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
16639
16640         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
16641         force big_endian to be 1 for big endian machines 
16642         (ves_icall_iconv_new_decoder): ditto
16643
16644 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
16645
16646         * socket-io.c (convert_sockopt_level_and_name): If the system
16647         doesn't define SOL_IP or SOL_TCP, get them by hand using
16648         getprotobyname() and caching the values (because this could be a
16649         slow operation).
16650         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
16651         Use the appropriate struct when the system does support it. Ie,
16652         not all systems have struct ip_mreqn so use struct ip_mreq when
16653         appropriate.
16654
16655 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
16656
16657         * reflection.c: handle finally clauses.
16658
16659 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
16660
16661         * socket-io.c: use g_snprintf() instead of snprintf.
16662
16663 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
16664
16665         * reflection.c (mono_param_get_objects): Cast second argument to
16666         mono_method_get_param_names to a const char** to silence the
16667         compiler warning.
16668
16669         * appdomain.c (mono_domain_assembly_open): Put parens around the
16670         truth statement in the for-loop.
16671
16672         * unicode.c (iconv_convert): Got rid of a compiler warning about
16673         int i being unused when the system has a new iconv.
16674         (iconv_get_length): Same.
16675
16676         * image.c (load_class_names): Cast the second argument to
16677         g_hash_table_insert() to char* to hush compiler warnings about the
16678         arg being a const.
16679         (mono_image_open): Same here.
16680
16681         * socket-io.c: Don't conditionally include sys/filio.h or
16682         sys/sockio.h here anymore since we now get them from
16683         io-layer/io-layer.h
16684         (inet_pton): If the system doesn't support inet_aton, implement
16685         using inet_addr and also #define INADDR_NONE if it isn't defined
16686         by the system.
16687
16688 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
16689
16690         * metadata.c, metadata.h: added function to get packing and size info
16691         of a typedef.
16692         * reflection.h, reflection.c: handle field RVA data. Save info about
16693         the table layout if needed. Assign typedef indexes to all the types
16694         before dumping the info about them to avoid forward reference problems.
16695
16696 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
16697
16698         * socket-io.c (convert_sockopt_level_and_name): ifdef
16699         SO_ACCEPTCONN because it is not defined on my system (old debian)
16700
16701 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16702
16703         * opcode.c: use stddef.h to get NULL.
16704
16705 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
16706
16707         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
16708         for FIONBIO, FIONREAD and SIOCATMARK.
16709         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
16710         define INADDR_NONE and besides, inet_addr() is deprecated and
16711         should not be used. Use inet_pton() instead - it also has the
16712         added bonus that it can easily handle IPv6 addresses as well.
16713         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
16714
16715 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
16716
16717         * decimal.c: remove _MSC_VER conditional.
16718
16719 2002-02-13  Dick Porter  <dick@ximian.com>
16720
16721         * socket-io.c: 
16722         * icall.c: Internal calls for Blocking, Select, Shutdown,
16723         GetSocketOption and SetSocketOption
16724
16725 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16726
16727         * assembly.cs: better resolver: use it instead of some kludgy
16728         code.
16729
16730 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
16731
16732         * reflection.c: the best way to speed-up the compiler is to avoid
16733         infinite loops.
16734
16735 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
16736
16737         * class.c (mono_class_vtable): changed the object layout
16738         (obj->vtable->class). 
16739         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
16740
16741 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16742
16743         * assembly.c: look for assemblies in the assembly dir, too.
16744
16745 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16746
16747         * class.c: fix thinko in mono_class_from_type().
16748
16749 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16750
16751         * exception.h, exception.c: added TypeLoadException.
16752         * object.h, object.c: added mono_array_clone ().
16753         * icall.c: handle throwOnError in AssemblyGetType().
16754         Added Array.Clone().
16755         * opcode.h, opcode.c: use a single value for the opcode val.
16756         Compile fix for non-gcc compilers.
16757
16758 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
16759
16760         * opcodes.c, opcodes.h: export interesting info about opcodes.
16761
16762 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
16763
16764         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
16765         icalls. 
16766
16767         * class.c (class_compute_field_layout): set element_class for enums
16768         (mono_class_create_from_typedef): set element_class for normal classes
16769
16770         * icall.c (ves_icall_System_Enum_get_value): impl.
16771
16772         * class.c (mono_class_create_from_typedef): do not set valuetype
16773         flag for System.ValueType and System.Enum
16774
16775 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
16776
16777         * unicode.c (iconv_convert): fix big endian problem.
16778
16779 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16780
16781         * class.c: add asserts if we are ever going to scribble over memory.
16782         * socket-io.c: not all systems have AF_IRDA defined.
16783
16784 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
16785
16786         * class.c (class_compute_field_layout): do not consider static
16787         fields to compute alignment
16788
16789 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
16790
16791         * appdomain.c (mono_appdomain_get): impl.
16792         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
16793
16794 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
16795
16796         * icall.c: ignore "file://" prefix when loading an assembly.
16797
16798 2002-01-23  Dick Porter  <dick@ximian.com>
16799
16800         * socket-io.c:
16801         * icall.c:
16802         * Makefile.am: Added socket support
16803
16804 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
16805
16806         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
16807         code back.  This should return the assemblies that are loaded by
16808         the runtime on behalf of an application domain. 
16809
16810         The current implementation is still broken, it just returns every
16811         assembly loaded, but until we get real applications domain this
16812         will do.
16813
16814 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
16815
16816         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
16817         AppDomain object.
16818
16819 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
16820
16821         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
16822         the mono_class_from_name lookup.
16823         (ves_icall_get_parameter_info): ditto.
16824         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
16825         method.
16826         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
16827
16828 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
16829
16830         * class.c: load also nested classes on class init.
16831         System.ValueType instance methods gets passed boxed
16832         values, unless methods in derived classed that get a pointer to the
16833         data.
16834         * icall.c: use better name parsing code in GetType().
16835         * image.c, image.h: add mono_image_loaded ().
16836         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
16837         * reflection.c, reflection.h: added mono_reflection_parse_type().
16838
16839 2002-01-22  Veronica De Santis <veron78@interfree.it>
16840
16841         * icall.c : Added mapping of internal calls for Manual and Auto reset events
16842         * threads.c : Added the implementation of internal calls for events
16843         * threads.h : Added prototypes of internal calls for events
16844         
16845 2002-01-21  Radek Doulik  <rodo@ximian.com>
16846
16847         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
16848
16849 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
16850
16851         * class.c (mono_class_init): set min_align to 1 (instead of 0)
16852         (mono_class_value_size): use min_align
16853
16854 2002-01-20  Dick Porter  <dick@ximian.com>
16855
16856         * threads.h:
16857         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
16858         so it compiles on w32.
16859
16860 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
16861
16862         * metadata.c (mono_type_stack_size): impl.
16863
16864         * class.c (mono_class_get_field): impl. memberref token
16865
16866 2002-01-16 Veronica De Santis <veron78@@interfree.it>
16867
16868         * icall.h : Added the internal calls mapping for CreateMutex_internal
16869                     and ReleaseMutex_internal.
16870         * threads.h : Added the prototype of mutexes internal calls.
16871         * threads.c : Added the implementations of mutexes internal calls.
16872
16873 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
16874
16875         * metaparse.h: removed unused file.
16876         * reflection.c, reflection.h: added stream_data_align () function 
16877         to align data in streams and keep stream aligned. Add support for
16878         exception support in method headers.
16879
16880 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
16881
16882         * unicode.c: make iconv_convert () return the number of bytess written
16883         in the output buffer.
16884
16885 2002-01-15  Dick Porter  <dick@ximian.com>
16886         * threads.c: Make the runtime's idea of infinite timeouts coincide
16887         with the class library's
16888
16889         Fix a particularly egregious bug in mono_thread_cleanup(). That
16890         code was so utterly bogus it must have been written on a Monday.
16891
16892 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
16893
16894         * reflection.h: add subtypes field to TypeBuilder.
16895         * reflection.c: encode constants for literal fields.
16896         Handle subtypes. Fix user string token (and add a zero byte)
16897         at the end.
16898         
16899 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
16900
16901         * class.c (mono_class_init): bug fix: assign slot numbers for
16902         abstract methods.
16903
16904 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16905
16906         * reflection.c: don't try to output a code RVA for abstract methods.
16907         Small fixes for method header format. Output parameter info to the
16908         ParamDef table. Save method overriding info to MethodImpl table.
16909         Fix property support. Allow typedef.extends to be a type in the
16910         building assembly.
16911         * verify.c: fix off-by-one error.
16912
16913 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
16914
16915         * class.c: fix mono_class_from_mono_type () for szarray types.
16916         Remove unused cache check in mono_class_from_type_spec().
16917         * icall.c: *type_from_name () functions handle simple arrays and byref.
16918         * reflection.c: handle byref and szarray types. Handle methods without
16919         body (gets P/Invoke compilation working). Handle types and fields in
16920         get_token ().
16921         * reflection.h: add rank to MonoTypeInfo.
16922
16923 2002-01-10  Dick Porter  <dick@ximian.com>
16924
16925         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
16926         internal calls
16927
16928 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
16929
16930         * icall.c: initialize class in type_from_handle ().
16931         Loop also in parent classes for get_method ().
16932         * reflection.c: properly encode class and valuetype types.
16933         Start on encoding TypeBuilder types. Handle fieldrefs.
16934         Use correct length when registering a user string.
16935         Handle ConstructorBuilder and MonoMethod in get_token ().
16936         Make mono_type_get_object () aware of cached types.
16937         * object.c: back out change to mono_string_new ().
16938
16939 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
16940         * object.c: mono_string_new should return a NULL when the string 
16941         passed in is NULL -- not try to deference it.
16942         
16943 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
16944
16945         * icall.c: hack to make IsSubType work for TypeBuilders.
16946         * reflection.c: emit constructors before methods.
16947         Retrieve param names in mono_param_get_objects().
16948
16949 2002/01/05  Nick Drochak  <ndrochak@gol.com>
16950
16951         * Makefile.am: fix list of headers and sources so automake 1.5
16952         doesn't complain. Removed \# at end of list.
16953
16954 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
16955
16956         * reflection.c: get token for a method ref. Set return type of
16957         constructor to void.
16958         * loader.c: debug message.
16959         * class.c: typo fix.
16960
16961 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
16962
16963         * icall.c: fix array init with rank > 1. FindMembers
16964         loops in parent class as well.
16965         * image.c: do not insert nested types in name cache.
16966         * reflection.c: warning fix.
16967         * reflection.h: add override method (for interface impl).
16968
16969 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
16970
16971         * metadata.c: fix customattr decoding.
16972
16973 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
16974
16975         * rawbuffer.cs: Added native Win32 implementation, avoids using
16976         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
16977
16978 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
16979
16980         * class.c: make the low-level routines handle the cache.
16981
16982 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
16983
16984         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
16985
16986 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
16987
16988         * class.c: fix mono_array_element_size() for objects.
16989         * class.h, class.c: add properties to MonoClass and load them
16990         at init time.
16991         * icall.c: check with isinst() when assigning a value to an array
16992         instead of requiring the classes to match exactly.
16993         Implemented icall for System.Type::GetType().
16994         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
16995         enums. Handle bindingflags when looking for methods and fields.
16996         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
16997         and mono_metadata_methods_from_property().
16998         * reflection.h, reflection.c: added structures for propreties,
16999         parameters and enums. Implemented mono_property_get_object() and
17000         mono_param_get_objects().
17001
17002 2001-12-18  Dick Porter  <dick@ximian.com>
17003
17004         * file-io.c: Use mono_string_to_utf16() instead of
17005         mono_string_chars()
17006
17007         * object.c: Added mono_string_to_utf16(), which copies the non
17008         NULL-terminated MonoString into a new double-null-terminated
17009         buffer.
17010
17011 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
17012
17013         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
17014
17015 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
17016
17017         * file-io.c: raise exceptions if handle is invalid.
17018
17019 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
17020
17021         * assembly.c: yet another check for mscorlib.
17022         * class.c, class.h: load nesting info for classes.
17023         * icall.c: many new functions to support the Reflection classes.
17024         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
17025         * reflection.h, reflection.c: mono_image_create_token(),
17026         mono_assembly_get_object(), mono_type_get_object(),
17027         mono_method_get_object(), mono_field_get_object(): methods to return
17028         objects that parallel the C representation of assemblies, types,
17029         methods, fields.
17030
17031 2001-12-11  Dick Porter  <dick@ximian.com>
17032
17033         * icall.c:
17034         * file-io.c: Internal calls for file IO.
17035
17036 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
17037
17038         * tabledefs.h: missing FileAttributes.
17039         * verify.h, verify.c: use is_valid_string () to simplify and check for
17040         valid strings more correctly. Fix warnings and speeling.
17041         Check more tables: Filed, File, ModuleRef, StandAloneSig.
17042         Check code: branches, maxstack, method calls.
17043
17044 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
17045
17046         * object.c (mono_object_allocate): removed static, so that the jit
17047         can allocate value types.
17048
17049         * icall.c (ves_icall_System_DateTime_GetNow): impl.
17050
17051 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17052
17053         * class.c: init enum types right away and register the
17054         token->MonoClass map in mono_class_create_from_typedef ().
17055         * verify.h, verify.c: first cut of the verifier.
17056         * pedump.c: add --verify switch to verify metadata tables.
17057         * tabledefs.h: add some missing enums.
17058
17059 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
17060
17061         * class.c (mono_install_runtime_class_init): impl.
17062         (mono_class_init): renamed mono_class_metadata_init to
17063         mono_class_init, also removed the metadata_inited flag
17064
17065         * object.c (mono_object_isinst): use faster algorithm
17066
17067 2001-11-30  Radek Doulik  <rodo@ximian.com>
17068
17069         * mono-endian.h: reverted last change
17070         added function prototypes
17071
17072         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
17073         add mono-endian.c back
17074
17075         * mono-endian.c: returned back, as Paolo pointed out, it's needed
17076         for unaligned access, I've mistaked it with endianess. I am
17077         sorry.
17078         (mono_read16): fix reverted endianess
17079         (mono_read64): ditto
17080         (mono_read32): ditto
17081
17082 2001-11-30  Dick Porter  <dick@ximian.com>
17083
17084         * exception.c: Implement mono_exception_from_name()
17085
17086 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
17087
17088         * metadata.h, metadata.c: remove params_size and locals_size and their
17089         calculation from the metadata code: they are only usefult to the
17090         interp.
17091
17092 2001-11-29  Radek Doulik  <rodo@ximian.com>
17093
17094         * object.c (mono_ldstr): swap bytes here, it's probably not the
17095         best place, but works for me now, I'll redo it once I know mono
17096         better, also note that I add PROT_WRITE and don't reset back, also
17097         note that it's only affects big endians, so x86 should be OK
17098
17099         * mono-endian.h (read16): use just glib macros for both endians
17100
17101         * mono-endian.c: removed as glib macros are used in in
17102         mono-endian.h so we don't need to care about endianess for read
17103         macros as glib does that for us already
17104
17105 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
17106
17107         * class.h, class.h: take minimum alignment into consideration so
17108         that the fields of a class remain aligned also when in an array.
17109
17110 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17111
17112         * loader.h, loader.c: add mono_method_get_param_names().
17113         * class.c: 0-init class fields.
17114
17115 2001-11-26  Dick Porter  <dick@ximian.com>
17116
17117         * icall.c:
17118         * threads-types.h:
17119         * threads.c: New file that handles System.Threading on all platforms
17120
17121         * object.c: 
17122         * object.h: Remove the synchronisation struct from MonoObject,
17123         replace it with a pointer that gets initialised on demand
17124
17125         * Makefile.am: Replace all the system-specific threading code with
17126         a single file that uses the new wrapper library
17127
17128 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
17129
17130         * class.c, class.h: add mono_install_trampoline() so that the runtime
17131         can register a function to create a trampoline: removes the ugly
17132         requirement that a runtime needed to export arch_create_jit_trampoline.
17133         * object.h, object.c: added mono_install_handler() so that the runtime
17134         can install an handler for exceptions generated in C code (with
17135         mono_raise_exception()). Added C struct for System.Delegate.
17136         * pedump.c: removed arch_create_jit_trampoline.
17137         * reflection.c: some cleanups to allow registering user strings and
17138         later getting a token for methodrefs and fieldrefs before the assembly
17139         is built.
17140         * row-indexes.h: updates and fixes from the new ECMA specs.
17141
17142 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
17143
17144         * class.h, class.c: add enum_basetype field to MonoClass.
17145         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
17146         to get index in the constant table reated to a field, param or
17147         property.
17148         * reflection.h, reflection.c: handle constructors. Set public-key and
17149         version number of the built assembly to 0.
17150         * row-indexes.h: update from new ECMA spec.
17151
17152 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
17153
17154         * class.h, class.c: add a max_interface_id to MonoClass.
17155         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
17156         since it's used to do that. Added mono_type_type_from_obj().
17157         Make GetType() return NULL instead of segfaulting if the type was not
17158         found. Handle simple arrays in assQualifiedName.
17159         * object.h: add a struct to represent an Exception.
17160         * reflection.c: output call convention in method signature.
17161         Add code to support P/Invoke methods and fixed offsets for fields.
17162
17163 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
17164
17165         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
17166         the value.
17167         * icall.c: use mono_array_addr instead of array->vector: fixes the
17168         reflection image writing.
17169         * reflection.c: init call convention byte to 0 in method signature.
17170         Encode the property signature. Don't output property-related methods
17171         twice. Really process the properties for a type (don't cast a field to
17172         a property, my mom always told me that).
17173         Fix 64 bit issues in pointer alignment in a different and more
17174         readable way.
17175
17176 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
17177
17178         * loader.h: Removed type class from MonoDefaults, added monotype
17179
17180         * loader.c: Loaded MonoType, removed loading of Type
17181
17182         * icall.c (my_mono_new_object): Now returns a System.MonoType,
17183         and fills in System.Type._impl with a RuntimeTypeHandle rather
17184         than the actual MonoClass *
17185
17186         (ves_icall_type_from_handle): change from type_class to
17187         monotype_class
17188
17189         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
17190         implemented
17191
17192         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
17193         implemented
17194
17195         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
17196
17197         (ves_icall_System_Reflection_Assembly_GetType): implemented
17198
17199         (ves_icall_System_MonoType_assQualifiedName): implemented
17200
17201         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
17202
17203 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
17204
17205         * assembly.c (mono_assembly_open): Implement a cache for the
17206         assemblies. 
17207
17208         (mono_assembly_close): only destroy the assembly when the last
17209         reference is gone.
17210         
17211 2001-11-09  Dick Porter  <dick@ximian.com>
17212
17213         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
17214
17215 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
17216
17217         * class.c (mono_class_metadata_init): bug fix: compute the right slot
17218
17219 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
17220
17221         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
17222         from Martin Weindel.
17223         * object.h: add mono_string_chars ().
17224
17225 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
17226
17227         * reflection.c (build_compressed_metadata): Eliminates warnings
17228         and uses 64-bit clean code.
17229
17230         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
17231         (mono_type_equal): Change signature to eliminate warnings.
17232
17233 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17234
17235         * icall.c, loader.c: remove the internalcall array constructors.
17236         Changes to match the new MonoArray structure.
17237         * object.h, object.c: an array object doesn't allocate an extra
17238         vector. Add mono_array_new_full () to create jagged arrays easily.
17239
17240 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
17241
17242         * metadata.h, metadata.c: add mono_metadata_field_info () to
17243         retreive all the info about a field from vairous tables.
17244         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
17245         * class.h, class.c: augment MonoClassField with more info.
17246         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
17247         policy and load a field's RVA if needed.
17248
17249 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
17250
17251         * class.c (mono_class_metadata_init): create a trampoline for all
17252         virtual functions instead of actually compiling them.
17253
17254 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
17255
17256         * class.h, class.c: include name in MonoClassField.
17257         * class.c: fix fundamental type of System.Object and System.String.
17258         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
17259         tokens in ldtoken.
17260         * icall.c: remove internalcalls for the Reflection stuff that is now
17261         done in C# code.
17262         * loader.c: mono_field_from_memberref () implementation.
17263         * mono-endian.c: thinko (s/struct/union/g).
17264         * object.c, object.h: make the mono_string_* prototypes actually use
17265         MonoString instead of MonoObject.
17266         * reflection.c, reflection.h: updates for changes in the reflection
17267         code in corlib: we use C structures that map to the actual C# classes.
17268         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
17269         fat method header if needed and use the info from the ILGenerator for
17270         methods. Handle fields in types. Misc fixes.
17271
17272 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
17273
17274         * class.c (mono_class_metadata_init): bug fix: always allocate
17275         space for static class data
17276
17277 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
17278
17279         * class.c (mono_compute_relative_numbering): use relative
17280         numbering to support fast runtime type checks.
17281
17282 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
17283
17284         * class.c (mono_class_create_from_typeref): added debugging output
17285         to print class name when MonoDummy is returned instead of real class
17286
17287 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
17288
17289         * class.c (mono_class_metadata_init): interface offset table now
17290         contains pointers into the vtable - this is more efficient for the jit
17291
17292 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
17293
17294         * class.c (mono_class_metadata_init): use a temporary vtable (the
17295         old algorithm only worked for the interpreter, but not for the jit)
17296
17297 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
17298
17299         * loader.c (method_from_memberref): use mono_class_get to get the
17300         class of an array instead of using System.Array directly.
17301         (mono_get_method): also add MEMBERREF methods to the method cache
17302         which usefull for arrays.
17303
17304 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
17305
17306         * pedump.c (arch_compile_method): added to compute vtable entry
17307
17308         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
17309         number of interfaces.
17310         
17311         * class.h: merged MonoArrayClass into MonoClass
17312
17313         * class.c (mono_class_create_from_typedef): compute the vtable size and
17314         allocate space to include the vtable inside MonoClass
17315         (mono_class_metadata_init): initialize the vtable
17316
17317 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
17318
17319         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
17320         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
17321         * image.c: endian fixes by Laurent Rioux.
17322         * object.h, object.c: rename MonoStringObject to MonoString and
17323         MonoArrayObject to MonoArray. Change some function names to conform to
17324         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
17325         guint16* as first argument, so don't use char*.
17326         Provide macros to do the interesting things on arrays in a portable way.
17327         * threads-pthread.c: updates for the API changes and #include <sched.h>
17328         (required for sched_yield()).
17329         * icall.c: updates for the API changes above.
17330         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
17331         platforms that need them.
17332
17333 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
17334
17335         * class.c: set the correct type for all the fundamental
17336         type when loading the class.
17337
17338 2001-10-05  Dick Porter  <dick@ximian.com>
17339
17340         * threads-pthread.c (pthread_mutex_timedlock): Simple
17341         compatibility version for C libraries that lack this call.
17342
17343 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17344
17345         * class.c: MonoTypes stored in MonoClass are stored as
17346         fundamental MonoTypes when the class represents a
17347         fundamental type (System.Int32, ...).
17348         The TypeHandle return by ldtoken is a MonoType*.
17349         * icall.c: ves_icall_get_data_chunk () write out all the
17350         PE/COFF stuff. Implement ves_icall_define_method (),
17351         ves_icall_set_method_body (), ves_icall_type_from_handle ().
17352         * image.c: properly skip unknown streams.
17353         * loader.h, loader.c: add type_class to mono_defaults.
17354         * metadata.c, metadata.h: export compute_size () as
17355         mono_metadata_compute_size () with a better interface.
17356         Typo and C&P fixes.
17357         * pedump.c: don't try to print the entry point RVA if there is no entry point.
17358         * reflection.c, reflection.h: many cleanups, fixes, output method
17359         signatures and headers, typedef and typeref info, compress the metadata
17360         tables, output all the heap streams, cli header etc.
17361         * row-indexes.h: typo fixes.
17362
17363 2001-10-04  Dick Porter  <dick@ximian.com>
17364
17365         * object.h: Add a synchronisation mutex struct to MonoObject
17366
17367         * object.c (mono_new_object): Initialise the object
17368         synchronisation mutexes
17369
17370         * icall.c: System.Threading.Monitor internal calls
17371         
17372         * threads-pthread.h:
17373         * threads-pthread.c: System.Threading.Monitor internal calls
17374
17375         * threads-types.h: New file, includes the system-specific thread
17376         structures
17377         
17378         * threads-pthread-types.h:
17379         * threads-pthread-types.c: New files, handle pthread-specific
17380         synchronisation types
17381
17382         * threads-dummy-types.h: 
17383         * threads-dummy-types.c: New files of dummy support for
17384         thread-specific types
17385
17386         * metadata.c:
17387         * image.c:
17388         * pedump.c: include mono-endian.h not endian.h
17389         
17390         * Makefile.am: More threads files.
17391         Name mono-endian.h not endian.h
17392
17393 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
17394
17395         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
17396         stuff and implement a few more bits.
17397         * icall.c: a field needs to be dereferenced twice. Do not use the same
17398         name for two variables in the same scope.
17399         * image.c, image.h: cleanups.
17400
17401 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
17402
17403         * class.c (mono_class_metadata_init): bug fix: compute the right size
17404
17405 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
17406
17407         * icall.c: implemented some of the Reflection internalcalls.
17408         * image.c, image.h: start writing out the PE/COFF image.
17409         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
17410         that does the reverse than decode_blob_size ().
17411         * object.c: use mono_metadata_encode_value (). Move here
17412         temporary implementation of mono_string_to_utf8 ().
17413         * rawbuffer.c: make malloc_map static.
17414
17415 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17416
17417         * metadata.c: fix type comparison for arrays.
17418         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
17419         Added a couple of new classes to monodefaults.
17420         * icall.c: added a couple of Reflection-related internalcalls.
17421         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
17422         Added a byval_arg MonoType to MonoClass.
17423
17424 2001-09-28  Dick Porter  <dick@ximian.com>
17425
17426         * icall.c:
17427         * threads-pthread.h: 
17428         * threads-pthread.c: Implemented internal calls for
17429         LocalDataStoreSlot operations.  Applied mutexes around all shared
17430         data.  Reworked the thread creation and Start() operations to
17431         avoid a race condition.
17432         
17433         * threads-dummy.h:
17434         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
17435
17436 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
17437
17438         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
17439
17440 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
17441
17442         * class.c, loader.c: warn and return NULL instead of erroring out.
17443         * icall.c: added System.AppDomain::getCurDomain().
17444         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
17445
17446 2001-09-25  Dick Porter  <dick@ximian.com>
17447
17448         * threads-pthread.h:
17449         * threads-pthread.c: Implemented timed thread joining and added
17450         System.Threading.Thread::Join_internal internal call
17451
17452         * icall.c: Added System.Threading.Thread::Join_internal internal call
17453
17454         * threads-dummy.h:
17455         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
17456
17457 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
17458
17459         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
17460         mono_string_intern () to implement the semantics of the ldstr opcode
17461         and the interning of System.Strings.
17462         * icall.c: provide hooks to make String::IsIntern and String::Intern
17463         internalcalls.
17464
17465 2001-09-23  Dick Porter  <dick@ximian.com>
17466
17467         * threads-dummy.c: 
17468         * threads-dummy.h: New files of dummy threading routines
17469
17470         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
17471         support code based on system specifics
17472
17473         Rename PTHREAD_LIBS to THREAD_LIBS
17474         
17475 2001-09-23  Dick Porter  <dick@ximian.com>
17476
17477         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
17478         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
17479         internal calls.
17480         (mono_thread_init): Set up a Thread object instance to return when
17481         the main thread calls Thread.CurrentThread
17482         (mono_thread_cleanup): Wait for all subthreads to exit
17483
17484         * icall.c: New internal calls for System.Threading.Thread::Sleep
17485         (including Schedule) and CurrentThread
17486
17487         * threads.h: New file, to insulate thread-specific stuff from the
17488         rest of the code
17489
17490 2001-09-21  Dick Porter  <dick@ximian.com>
17491
17492         * threads-pthread.h: 
17493         * threads-pthread.c: New file, for handling pthreads-style
17494         threading support.  Start() now starts a new thread and executes
17495         the ThreadStart delegate instance.
17496
17497         * icall.c: Added the internalcall for
17498         System.Threading.Thread::Start_internal
17499
17500         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
17501
17502 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
17503
17504         * loader.c: work around the different signatures for delegates
17505         constructors csc generates in compiled code vs the ones compiled in mscorlib.
17506
17507 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
17508
17509         * class.h, class.c: add mono_class_get_field_from_name ().
17510         * *: Fix C comments and other ANSI C issues.
17511
17512 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
17513
17514         * endian.h, assembly.c: fix some endianness issues.
17515
17516 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
17517
17518         * loader.h, load.c: add delegate_class to mono_defaults.
17519         Handle runtime provided methods in mono_get_method ().
17520
17521 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
17522
17523         * loader.c (mono_get_method): use pinvoke for internal call
17524
17525         * icall.c: use pinvoke for internal call
17526
17527         * loader.c (method_from_memberref): set the method name
17528
17529 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
17530
17531         * metadata.c: help the compiler generate better code for
17532         mono_class_from_mono_type ().
17533
17534 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
17535
17536         * class.c (mono_class_metadata_init): delayed computing of the
17537         class size to mono_class_metadata_init ()
17538
17539 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
17540
17541         * class.c, class.h: add an interfaces member to MonoClass.
17542         * image.c, image.h: add assembly_name field to MonoImage
17543         from the assembly table.
17544         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
17545
17546 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
17547
17548         * class.c: Handle Array in mono_class_from_mono_type ().
17549         * metadata.c, pedump.c: some endian fixes.
17550
17551 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
17552
17553         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
17554         * metadata.c: fix small problem introduced with the latest commit.
17555
17556 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
17557
17558         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
17559         We don't need a MonoMetadata pointer anymore to compare signatures in
17560         mono_metadata_signature_equal (), update callers.
17561         Reduced memory usage an number of allocations for MonoMethodHeader and
17562         MonoMethodSignature.
17563
17564 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
17565
17566         * metadata.c: added compare for szarray.
17567
17568 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
17569
17570         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
17571         and add a couple more types to it and mono_defaults. Give an hint on
17572         classes that need implementing in our corlib and are referenced
17573         in mscorlib.
17574
17575 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
17576
17577         * class.h, class.c: keep track if a class is also an Enum.
17578         * loader.c: Implement a couple more types for use in libffi
17579         marshalling. Gives better diagnostics when failing to dlopen
17580         a library. Set method->klass for P/Invoke methods, too.
17581
17582 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
17583
17584         * class.c, class.h: add a MonoType this_arg to MonoClass that
17585         represents a pointer to an object of the class' type that
17586         can be used by the interpreter and later the type cache.
17587         Add best guess alignment info for valuetype objects.
17588
17589 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
17590
17591         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
17592         into MonoType: one less level of indirection and allocation and
17593         simplifies quite a bit of code. Added cache for MonoTypes that are
17594         used frequently, so that we don't need to allocate them all the time.
17595
17596 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
17597
17598         * class.c (mono_class_create_from_typedef): System.Enum is also a
17599         value type, although it does not derive from System.ValueType
17600         (maybe a bug in the ms compiler?)
17601
17602         * metadata.c (mono_type_size): return the right size for value types
17603
17604         * loader.c (mono_get_method): only initialize method header if not abstract
17605
17606         * class.c (mono_class_from_mono_type): use mono_default values. 
17607
17608 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
17609
17610         * *: use MonoClass pointers instead of <type_tokens>
17611         
17612         * class.h: new flag: metadata_inited.
17613
17614         * class.c (mono_class_metadata_init): impl.
17615         (mono_class_instance_size): impl.
17616         (mono_class_data_size): impl.
17617
17618 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17619
17620         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
17621         MonoClass now has the name and name_space fields. 
17622         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
17623         mono_get_method () takes and optional MonoClass as argument.
17624         Removed mono_typedef_from_name() and added mono_class_token_from_name()
17625         instead that takes advantage of a map from class names to typedef
17626         tokens in MonoImage.
17627
17628 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
17629
17630         * metadata.c: zero is not a valid alignment boundary.
17631         Merge MONO_TYPE_VOID in default decoding code.
17632
17633 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
17634
17635         * image.h: merged MonoMetadata into MonoImage
17636
17637         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
17638         identify the type of elements.
17639
17640 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
17641
17642         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
17643         * cil-coff.h: split MonoMSDOSHeader and add size info.
17644         * image.c: add some consistency checks.
17645         * metadata.c: fix row size computation: one programmer
17646         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
17647         add explanation for the locator routine.
17648         Fix decoding of size in method header.
17649         
17650 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
17651
17652         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
17653         (g_concat_dir_and_file): Bring g_concat_dir_and_file
17654         function from gnome-libs.  This uses the right path separator
17655         based on the OS, and also works around a bug in some systems where
17656         a double slash is not allowed. 
17657         (default_assembly_name_resolver): Use g_concat_dir_and_file
17658         (mono_assembly_open): ditto.
17659
17660 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
17661
17662         * metadata.c (mono_metadata_signature_equal): impl.
17663
17664         * *: void is now a realy MonoType (instead of using NULL)
17665         
17666         * metadata.c (do_mono_metadata_parse_type): use
17667         mono_metadata_parse_type to parse void value.
17668
17669 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
17670
17671         * metadata.c, metadata.h: in the signature and method header store
17672         only the space required for holding the loca vars and incoming arguments.
17673
17674 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
17675
17676         * metadata.c (do_mono_metadata_parse_type): treat void like any
17677         other type (instead of assigning NULL);
17678
17679 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
17680
17681         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
17682
17683 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
17684
17685         * image.c (do_mono_image_open): added a cache for arrays.
17686
17687 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
17688
17689         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
17690         decode a single column from a row in a metadata table and changes
17691         to take advantage of it in the typedef locator (gives a nice speed up).
17692         Store offset info for function params.
17693
17694 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
17695
17696         * image.h (MONO_IMAGE_IS_CORLIB): removed 
17697
17698 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
17699
17700         * assembly.c: how could mono_assembly_close () had ever worked?
17701         * metadata.c, metadata.h: provide offset info for local vars.
17702         Implement mono_type_size () to take care of alignment as well
17703         as size (it was mono_field_type_size in cli/class.c before).
17704
17705 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
17706
17707         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
17708
17709         * assembly.h (CORLIB_NAME): set to corlib.dll
17710
17711         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
17712
17713 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
17714
17715         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
17716         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
17717         tokentype.h: massive namespace cleanup.
17718
17719 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
17720
17721         * metadata.h, metadata.c: decode exception clauses when parsing method header.
17722
17723 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
17724
17725         * metadata.c (mono_metadata_free_type): added check for type !=
17726         NULL (void) before calling mono_metadata_free_type()
17727
17728 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
17729
17730         * metadata.h, row_indexes.h: added header with enumerations to use
17731         to index in the columns from tables in metadata and to decode coded
17732         tokens: we should start using this instead of embedding magic numbers
17733         all over the code.
17734
17735 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
17736
17737         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
17738         Move metadata_t info from cli_image_info_t to MonoImage, where
17739         it's easily accessible. Changed all the uses accordingly.
17740         Added the method and class caches to MonoImage.
17741         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
17742         and mono_metadata_decode_value () signature to be more consistent
17743         with the other parse functions (and simplify code). Taken advantage
17744         of zero-length array allocation with GCC. Removed reduntant (and
17745         wrong) MonoFieldType struct and use MonoParam instead. Changed
17746         mono_metadata_parse_field_type () to use common code for parsing.
17747         Added mono_metadata_typedef_from_field () and
17748         mono_metadata_typedef_from_method () to lookup a typedef index from a
17749         field or method token.
17750         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
17751
17752 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
17753
17754         * metadata.c (mono_metadata_parse_field_type): Implement. 
17755         (do_mono_metadata_parse_type): Split engine from
17756         mono_metadata_parse_type, so that we can create smaller structures
17757         for things that just have one pointer to the MonoType (look at
17758         the MonoFieldType)
17759
17760 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
17761
17762         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
17763         as Jan Gray found out, it is incorrect. 
17764
17765 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
17766
17767         * assembly.c: Implement asssembly loading.  This loads an image
17768         and loads all the referenced assemblies.  Come to think of it, we
17769         could always do lazy loading of the assemblies. 
17770
17771         * image.c (mono_image_open): Keep loaded images in a hashtable.
17772
17773         * image.h (MonoImage): Add reference count.
17774
17775 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
17776
17777         * assembly.c (mono_assembly_open): Keep track of the file name in
17778         case the assembly has no ASSEMBLY table.
17779
17780         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
17781         from get.c here.
17782
17783 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
17784
17785         * metadata.c, metadata.h: decode local vars in method header
17786         parse function. Change callers accordingly.
17787
17788 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
17789
17790         * metadata.h, cil-coff.h: protect against multiple inclusion.
17791         Added some new structures to hold information decoded from metadata:
17792         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
17793         and relevant decoding/free functions.
17794         * metadata.c: implement decoding functions. Add warning for out of bounds
17795         index in mono_metadata_locate(). Implement mono_get_method () to retreive
17796         all the info about a method signature and invocation. Remove check on
17797         uninitialized local var in parse_mh() and fix memory leak.
17798
17799 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
17800
17801         * metadata.h: More macros.
17802
17803         * tokentype.h: New file.
17804
17805 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
17806
17807         * assembly.c: added a consistency check and initialize
17808         some structures with g_new0().
17809         * metadata.c: fixed a couple more bugs in table size computation
17810         and add other checks for out-of bound access to metadata.
17811
17812 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
17813
17814         * metatada.c: fix bugs computing table sizes. Spew a
17815         warning when index in string heap is out of bounds.
17816
17817 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
17818
17819         * metadata.h: Add a couple of macros to manipulate tokens. 
17820
17821 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
17822
17823         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
17824         cli_section_tables).
17825
17826 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
17827
17828         * metadata.c (mono_metadata_user_string): New function, provides
17829         access to the UserString heap. 
17830
17831 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
17832
17833         * metadata.c: Add inline documentation.
17834
17835 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
17836
17837         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
17838         files. 
17839
17840 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
17841
17842         * typeattr.h: New file, TypeAttribute flags. 
17843
17844 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
17845
17846         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
17847         mono_assembly_ensure_section): Section loading code.
17848         (load_section_tables): Load the sections.
17849
17850         * mono/metadata/metadata.c (mono_metadata_locate_token,
17851         mono_metadata_locate): Functions to locate the information
17852         definition given a token or a table and an index.
17853         (mono_metadata_compute_table_bases): New.
17854         (compute_size): New function to compute the sizes of the various
17855         tables.
17856
17857         * mono/metadata/metadata.h: Finish listing the different index
17858         types. 
17859
17860         * mono/metadata/pedump.c: Improve to dump new information.
17861
17862 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
17863
17864         * mono/metadata/metadata.c: Entered all the tables matching
17865         Beta2. 
17866
17867         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
17868
17869
17870