2007-09-19 Martin Baulig <martin@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1 2007-09-19  Martin Baulig  <martin@ximian.com>
2
3         * mono-debug.c (mono_debug_cleanup): Don't call
4         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
5
6 2007-09-19  Raja R Harinath  <harinath@gmail.com>
7
8         Fix crash on 'make run-test' in mcs/errors
9         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
10         Avoid more potential allocations in mono_class_from_mono_type.
11         (ginst_in_image): Update to changes.
12         (gclass_in_image): Rearrange slightly.
13
14 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
15
16         * class.c (mono_class_init): Move the code that sets up class->methods to 
17         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
18
19         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
20         canonical instance of an inflated generic signature.
21         (mono_type_create_from_typespec): Remove an invalid free.
22
23         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
24
25 2007-09-18  Marek Habersack  <mhabersack@novell.com>
26
27         * domain-internals.h: added a declaration of the
28         mono_assembly_load_full_nosearch internal function.
29
30         * assembly.c (mono_assembly_load_with_partial_name): use
31         mono_try_assembly_resolve return value properly.
32         (mono_assembly_load_full_nosearch): copied the function body from
33         mono_assembly_load_full, without the code to invoke assembly
34         search hooks.
35         (mono_assembly_load_full): calls the above new function and if the
36         assembly is not resolved, invokes the search hooks.
37
38         * appdomain.c (mono_runtime_init): restore the global postload
39         assembly search handlers.
40
41 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
42
43         * class.c (mono_class_init): Make sure class->methods and class->properties
44         are never NULL in the generics case.
45
46         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
47
48 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
49
50         * metadata.c (free_generic_class): Disable some code to fix the build.
51
52         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
53
54         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
55         from the image mempool.
56
57         * metadata.c (free_generic_class): Free more data from the inflated class.
58
59         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
60
61         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
62         mempool.
63         (mono_type_create_from_typespec): Ditto.
64
65         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
66         MonoImage to the caller.
67         (mono_init_internal): Save the opened image in a global variable.
68         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
69
70         * reflection.c (resolve_object): Fix a leak.
71
72         * metadata.c: Fix the freeing of data in the generics caches.
73         
74         * metadata.c (free_generic_inst): Comment this out to fix the build.
75         (free_generic_class): Ditto.
76
77         * metadata.c: Free cached generic methods, instantinations and classes when
78         they are removed from the caches.
79         (mono_metadata_free_type): Free the type itself.
80
81         * class.c: Free the result of mono_class_inflate_generic_type () in a few
82         places.
83
84 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
85
86         * boehm-gc.c: restrict managed allocs to __thread supporting
87         architectures.
88
89 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
90
91         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
92         (mono_generic_class_get_class): Fix a leak.
93
94         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
95         mono_metadata_free_type ().
96         (mono_metadata_inflate_generic_inst): Fix a leak.
97
98 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
99
100         * mono-debug.c (free_header_data): Fix a leak missed earlier.
101
102         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
103         mempool.
104
105         * mono-debug.c (mono_debug_close_image): Fix call to 
106         g_hash_table_remove ().
107
108 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
109
110         * icall-def.h: redirect all the string ctor to the managed
111         CreateString () methods.
112         * string-icalls.c, string-icalls.h: removed dead code for string
113         ctors and icalls.
114
115 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
116
117         * mono-debug.c: Fix memory leaks.
118
119 2007-09-14  Jonathan Chambers <joncham@gmail.com>
120
121         * threads-types.h: Implement mono_hazard_pointer_set and 
122         mono_hazard_pointer_clear macros using do/while(0) to fix
123         compilation with MSVC.
124         
125         Code is contributed under MIT/X11 license.
126
127 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
128
129         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
130         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
131
132 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
133
134         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
135         icalls.
136
137 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
138
139         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
140         managed-code allocated as well.
141
142 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
143
144         * class.c (mono_class_is_assignable_from): Add support for generic variance.
145
146 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
147
148         * boehm-gc.c: fixed the build after the AOT changes.
149
150 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
151
152         * wrapper-types.h: Add an ALLOC wrapper type.
153
154         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
155         reference managed allocator methods.
156
157 2007-09-12  Marek Safar  <marek.safar@gmail.com>
158
159         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
160         of Type array and not MonoType, a fix suggested by Hari.
161         
162 2007-09-12  Jonathan Chambers <joncham@gmail.com>
163
164         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
165         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
166         
167         Code is contributed under MIT/X11 license.
168
169 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
170
171         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
172
173 2007-09-12  Marek Habersack  <mhabersack@novell.com>
174
175         * image.c (do_mono_image_open): if assembly file fails to open and
176         MONO_IOMAP is in effect, try to find the path in a
177         case-insensitive way.
178
179         * appdomain.c (mono_runtime_init): do not install postload hooks -
180         tests show that MS.NET doesn't use anything of that sort to
181         trigger the AppDomain.AssemblyResolve event.
182         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
183         made non-static.
184         (mono_runtime_init): init portability helpers here.
185
186         * assembly.c (mono_assembly_load_with_partial_name): if other   
187         attempts fail, trigger the AppDomain.AssemblyResolve event handler
188         to resolve the assembly.
189
190         * domain-internals.h: added mono_try_assembly_resolve and marked
191         it as internal.
192
193 2007-09-11  Jb Evain  <jbevain@novell.com>
194
195         * object-internals.h (MonoReflectionDynamicMethod): add
196         a `MonoReflectionType *owner` field. The owner is used
197         * reflection.c:
198         (mono_reflection_create_dynamic_method): use the owner of the dynamic
199         method as the class declaring the dynamic method.
200         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
201         dynamic method to the declaring type of the methodbuilder.
202
203 2007-09-11  Mark Probst  <mark.probst@gmail.com>
204
205         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
206         rules for calling methods via reflection.
207
208 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
209
210         * reflection.c (resolve_object): Add support for MonoGenericClass. 
211         Inflate MonoType's.
212
213 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
214
215         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
216         provide a managed method that does fast allocations without needing
217         a managed->unmanaged transition. Boehm GC implementation currently
218         enabled for ptrfree objects on sane architectures.
219
220 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
221
222         * marshal.c, marshal.h: exported a couple of useful functions and
223         added mono_mb_get_label () to easily handle backward branches.
224
225 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
226
227         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
228
229 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
230
231         * loader.c (find_method): Fixed the regression introduced while
232         fixing bug #81466.
233
234 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
235
236         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
237         well.
238         
239         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
240         icall.c reflection.c: Pass a MonoGenericContext argument to 
241         mono_lookup_dynamic_token ().
242
243         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
244         #82744.
245         
246 2007-09-09  Robert Jordan  <robertj@gmx.net>
247
248         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
249         for generic methods.
250
251         * object.c (mono_object_get_virtual_method): Handle generic methods.
252         Fixes bug #78882.
253
254         Code is contributed under MIT/X11 license.
255
256 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
257
258         * image.c: fix locking in mono_image_load_file_for_image ().
259
260 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
261
262         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
263         used only as a cache: added an icall to fill it.
264
265 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
266
267         * reflection.h: exposed mono_reflection_free_type_info
268         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
269         since mono_reflection_bind_generic_parameters makes a copy of it.
270         * reflection.c (free_type_info): subinfos should be freed.
271         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
272         made non static.
273         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
274         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
275         this fixes #82695 and #81726.
276    
277
278 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
279
280         * process.h, process.c:  added support for user profile/info in
281           ProcessStartInfo. For now only Windows works.
282
283 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
284
285         * metadata.c: consider the generic arguments when comparing
286         signatures (bug #82614).
287
288 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
289
290         * cil-coff.h, image.c: updated assembly loader to cope with the
291         PE32+ 64 bit file format.
292
293 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
294
295         * assembly.c, class.c, domain.c, loader.c: remove useless
296         inclusion of cil-coff.h.
297
298 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
299
300         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
301         if interface is marked with CoClassAttribute. 
302    
303         Code is contributed under MIT/X11 license.
304
305 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
306
307         * sgen-gc.c: ensure no object from the to space is copied again or finalized
308         if it's seen twice in major collections.
309
310 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
311
312         * sgen-gc.c: big objects are not copied to the gray area, but they
313         need to be considered for scanning, too, if they are brought alive
314         by an object ready for finalizations or a survived one.
315
316 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
317
318         * sgen-gc.c: properly account the number of disappearing links when
319         they are nullified.
320
321 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
322
323         * sgen-gc.c: share the code to scan the registered roots between the
324         different types of collections.
325
326 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
327
328         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
329
330 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
331
332         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
333         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
334
335 2007-08-28  Mark Probst  <mark.probst@gmail.com>
336
337         * security-manager.c (mono_security_manager_get_methods):
338         LinkDemandSecurityException now has 2 arguments instead of 3.
339
340 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
341
342         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
343         platforms which need it.
344
345 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
346
347         * sgen-gc.c: unregister thread data structures with a pthread_key_t
348         dtor.
349
350 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
351
352         * threads.c: free the thread static data on thread exit.
353
354 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
355
356         * class.c: walk the hierarchy to find the generic definition for
357         a class (fixes runtime part of bug #82498).
358
359 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
360
361         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
362         ...
363
364         * image.c (mono_image_close): Here. Hopefully fixes #82510.
365
366 2007-08-24  Mark Probst  <mark.probst@gmail.com>
367
368         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
369
370 2007-08-24  Robert Jordan  <robertj@gmx.net>
371
372         * appdomain.c: don't perform the ':'->';' substitution on Win32.
373
374 2007-08-24  Jb Evain  <jbevain@novell.com>
375
376         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
377         for byref types.
378
379 2007-08-24  Mark Probst  <mark.probst@gmail.com>
380
381         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
382         #82286.
383
384 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
385
386         * assembly.c: Fix a warning.
387         
388 2007-08-23  Marek Habersack  <mhabersack@novell.com>
389
390         * appdomain.c: parse the <runtime> section looking for the probing
391         element with the 'privatePath' attribute, which sets additional
392         directories in which the runtime should look for assemblies.
393
394 2007-08-23  Robert Jordan  <robertj@gmx.net>
395
396         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
397         Fixes #82499.
398
399 2007-08-23  Martin Baulig  <martin@ximian.com>
400
401         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
402         _mono_debug_init_corlib() and remove it from the header file.
403
404 2007-08-23  Martin Baulig  <martin@ximian.com>
405
406         * mono-debug-debugger.c
407         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
408         don't notify the debugger about it.
409
410         * mono-debug-debugger.h
411         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
412
413 2007-08-23  Robert Jordan  <robertj@gmx.net>
414
415         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
416         Code is contributed under MIT/X11 license.
417
418 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
419
420         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
421
422 2007-08-22  Martin Baulig  <martin@ximian.com>
423
424         * mono-debug.c: Store debugging info on a per-domain basis and
425         free it on domain unload.  Add support for unloading symbol files.
426
427         * mono-debug.h
428         (MonoDebugList): New typedef.
429         (MonoSymbolTable):
430         - add `data_tables and `type_table'.
431         - replace 'symbol_files' and `num_symbol_files' with a
432           `MonoDebugList *'.
433         (mono_debug_data_table): Removed.
434         (mono_debug_list_add): New public function.
435         (mono_debug_list_remove): New public function.
436         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
437         (mono_debug_init_2_memory): Renamed into
438         mono_debug_open_image_from_memory().
439         (mono_debug_close_image): New public function.
440         (mono_debug_domain_create): Likewise.
441         (mono_debug_domain_unload): Likewise.
442         (MONO_DEBUGGER_VERSION): Bump to 60.
443
444         * mono-debug-debugger.h
445         (MonoDebuggerEvent):
446         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
447         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
448         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
449         - rename `THREAD_CREATED' and `THREAD_EXITED' into
450           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
451         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
452           meaning.
453         (mono_debugger_add_symbol_file): Removed.
454         (mono_debugger_add_type): Removed.
455         (mono_debugger_lookup_type): Removed.
456         (mono_debugger_lookup_assembly): Removed.
457
458         * domain.c
459         (mono_domain_create): Call mono_debug_domain_create().
460         (mono_init_internal): Call mono_debug_init_corlib().
461
462         * assembly.c
463         (mono_assembly_close): Call mono_debug_close_image().
464
465 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
466
467         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
468         mmap call.
469
470 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
471
472         * sgen-gc.c: ensure section->pin_queue_end is initialized
473         correctly when non pinning objects in the section have been found.
474
475 2007-08-22  Marek Habersack  <mhabersack@novell.com>
476
477         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
478         containing a list of directories separated by ':'. MSDN docs say
479         the directories should be separated with ';'. Part of a bugfix for
480         bug #81446
481
482 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
483
484         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
485         it should MonoType and not MonoClass.
486
487 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
488
489         * culture-info-table.h : regenerated.
490
491 2007-08-20  William Holmes  <billholmes54@gmail.com>
492
493         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
494          to call ReplaceFile Kernel32 on windows or in io-layer.
495         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
496         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
497          as an internal call.
498
499         Code is contributed under MIT/X11 license.
500
501 2007-08-20  Jb Evain  <jbevain@novell.com>
502
503         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
504         and MONO_EXCEPTION_FIELD_ACCESS.
505
506         * debug-helpers.[c|h]: new mono_field_full_name function.
507
508 2007-08-20  Mark Probst  <mark.probst@gmail.com>
509
510         * class.c: Removed class_security_level() and moved it to
511         security-core-clr.c.
512
513         * security-core-clr.c, security-core-clr.h: class_security_level()
514         is now public and renamed to mono_security_core_clr_class_level().
515         It also looks for security attributes in the classes a class is
516         nested in.
517
518 2007-08-20  Mark Probst  <mark.probst@gmail.com>
519
520         * security-core-clr.c, security-core-clr.h: CoreCLR security
521         utility functions.
522
523         * Makefile.am: Added security-core-clr.[ch].
524
525         * security-manager.c, security-manager.h: Functions and enum for
526         setting and getting the security mode.
527
528         * class.c: CoreCLR security checks.
529
530 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
531
532         * icall-def.h, process.c, process.h: implemented icall to get
533         user/system processor times.
534
535 2007-08-17  Mark Probst  <mark.probst@gmail.com>
536
537         * domain.c, threads.c, class-internals.h, domain-internals.h: New
538         reader-lock-free jit_info_table.
539
540 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
541
542         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
543
544         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
545
546         * object-internals.h (MonoException): Add missing _data member.
547
548 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
549
550         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
551         checking that only methods with matching qname or fqname are picked
552         from implemented interfaces.
553
554 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
555
556         * verify.c (do_newarr):added, do type verification of
557         newarr ops, push the right value on the eval stack.
558         * verify.c (mono_method_verify): use do_newarr
559
560
561 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
562
563         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
564         factored the common code into get_boxable_mono_type, which
565         is now using mono_type_get_full, this fixed byref related tests.
566
567 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
568
569         * class.c: added mono_type_get_full, this function has the same
570         behavior of mono_class_get_full but the returned MonoType has
571         all metadata of the associated token in case of a typespec token.
572         * class.c: added mono_type_retrieve_from_typespec, used by 
573         mono_type_get_full to retrieve the token type.
574         * class.c (mono_class_create_from_typespec): changed to use
575         mono_type_retrieve_from_typespec.
576         * class.c (mono_ldtoken): changed to use mono_type_get_full
577         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
578         * class-internals.h: exported mono_type_get_full for internal use.
579
580 2007-08-16  Jb Evain  <jbevain@novell.com>
581
582         * domain.c (supported_runtimes): add entry for
583         the 'moonlight' runtime version.
584
585 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
586
587         * verify.c (mono_method_verify): small typo sliped in.  
588
589 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
590
591         * verify.c (do_unbox_value): added, do type verification of
592         unboxing ops
593         * verify.c (mono_method_verify): use do_unbox_value
594
595
596 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
597
598         * verify.c (dump_stack_value): fixed typo, was printing string
599         instead of object on stack.
600         * verify.c (do_box_value): moved the byref check up as it leads
601         to invalid code and should be done earlier.
602         * verify.c: improved error messages for and ldobj
603
604 2007-08-15  William Holmes  <billholmes54@gmail.com>
605
606         * marshal.c (emit_marshal_custom): Omit the call to 
607           marshal_native_to_managed when calling native to managed 
608           and the argument is specified as an out argument.
609
610         Code is contributed under MIT/X11 license.
611
612 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
613
614         * verify.c: fixed the type checks for generics, function pointers and vectors.
615         Added type verification for ldobj and ldtoken. The verifier
616         would segfault if header or signature of a method contained references
617         to non-existant types.
618
619 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
620
621         * marshal.c (cominterop_get_ccw): Patch from
622         Bill Holmes to no walk up interface hierarchy. 
623         All parent methods should be present in the interface for COM.
624    
625         Code is contributed under MIT/X11 license.
626
627 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
628
629         * marshal.c (emit_marshal_com_interface): Patch from
630         Bill Holmes to handle COM Interfaces as return values
631         for native->managed calls.
632    
633         Code is contributed under MIT/X11 license.
634
635 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
636
637         * marshal.c (cominterop_get_idispatch_for_object): Implement
638         for runtime callable wrappers.
639    
640         Code is contributed under MIT/X11 license.
641
642 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
643
644         * pedump.c (main): changed from mono_init to mono_init_from_assembly
645         so 2.0 types are accessible
646
647
648 2007-08-13  Miguel de Icaza  <miguel@novell.com>
649
650         * domain.c (mono_init_internal): Call mono_assembly_load_friends
651         once we load mscorlib.   Due to the order in which we initialize,
652         the mono_assembly_load_full routine that loads mscorlib did not
653         load friends.   We now load it once we load the
654         mono_defaults.internals_visible_class class. 
655
656         * assembly.c: Expose the mono_load_friend_assemblies method.
657
658 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
659
660         * verify.c: improved the handling of boxing, better
661         type checking for unary ops and conversion. Fix bug
662         regarding managed pointer compatibility checking
663
664 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
665
666         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
667
668         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
669
670 2007-08-09  Raja R Harinath  <rharinath@novell.com>
671
672         * reflection.c (dup_type): Remove.
673         * class.c (dup_type): Remove.
674         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
675         instead of the dodgy 'dup_type'.
676         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
677         handle the case where 'dup_type' needed the second argument.
678
679 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
680
681         * domain.c: Fix a warning.
682
683 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
684
685         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
686         checking that methods with the same fqname are not overridden
687         with a method from an ancestor.
688
689 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
690
691         * threads.c (free_thread_static_data_helper): Avoid a crash if
692         thread->static_data is not yet set.
693
694 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
695
696         * marshal.c: Use correct image when emitting
697         native wrapper for COM calls.
698    
699         Code is contributed under MIT/X11 license.
700
701 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
702
703         * icall-def.h, security.c, security.h :
704           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
705
706 2007-08-07  Martin Baulig  <martin@ximian.com>
707
708         * mono-debug-debugger.h
709         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
710
711         * domain.c (mono_domain_free): Call
712         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
713
714 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
715
716         * verify.c (check_underflow, check_overflow): error message now returns IL offset
717         * verify.c (in_same_block): code should test if either offset is inside the clauses
718         * verify.c (mono_method_verify): push the exception into the eval stack of exception
719         and filter blocks
720
721 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
722
723         * image.c (mono_image_close): Fix a leak.
724
725         * object.c (mono_runtime_invoke_array): Avoid using alloca.
726
727         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
728
729 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
730
731         * domain.c, threads.c, threads-types.h: fix memory retention issue
732         with thread static variables not being cleared on domain unload.
733         Reuse thread static slots after domain unload.
734
735 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
736
737         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
738         nullable type.
739
740         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
741         now done in mono_runtime_invoke_array.
742
743         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
744         receiver is a nullable type.
745
746         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
747         generic parameter.
748
749 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
750
751         * marshal.c: Implement COM Objects as return type for 
752         managed->unmanaged calls. Added Release calls for COM Object
753         out/return values in managed->unmanaged calls.
754
755         Code is contributed under MIT/X11 license.
756
757 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
758
759         * threads.h, threads-type.h: move the hazard pointer declarations
760         to the private header.
761
762 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
763
764         * file-io.c, appdomain.c: memory leak fixes.
765
766 2007-08-02  Dick Porter  <dick@ximian.com>
767
768         * socket-io.c
769         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
770         SO_REUSEADDR setting into io-layer/sockets.c.
771
772 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
773
774         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
775         from Object when called on a generic parameter. Fixes #82211.
776
777 2007-08-01  Dick Porter  <dick@ximian.com>
778
779         * file-io.c (convert_share): Test FileShare values bit-by-bit.
780         Fixes bug 79250 yet again.
781
782 2007-07-30  Martin Baulig  <martin@ximian.com>
783
784         Merged the `debugger-dublin' branch.
785
786         * mono-debug.h
787         (MonoDebugDataTable): New typedef.
788         (MonoDebugMethodAddressList): New typedef.
789         (MonoDebugWrapperData): Removed.
790         (MonoDebugSymbolTable): Removed `current_data_table',
791         `current_data_table_size', `current_data_table_offset'.
792         (MonoDebugDataItemType): Moved into mono-debug.c.
793         (MonoDebugMethodJitInfo): Remove `address'.
794         (mono_debug_data_table): New global variable.
795         (mono_debug_lookup_method_addresses): New public function.
796         (mono_debug_find_method): Take a `MonoMethod *', not a
797         `MonoDebugMethodInfo *'.
798
799         * mono-debug.c: Drop support for the old symbol tables.
800
801 2007-06-28  Martin Baulig  <martin@ximian.com>
802
803         * mono-debug.c (mono_debug_debugger_version): New public variable.
804
805 2007-07-31  William Holmes  <billholmes54@gmail.com>
806
807         * metadata.c Changed mono_type_create_from_typespec to not insert
808           the type into the hash map until after
809           do_mono_metadata_parse_type has completed.
810         Fixes Bug #82194
811         Code is contributed under MIT/X11 license.
812
813 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
814
815         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
816         generic parameter. Fixes #82211.
817
818 2007-07-27  Jb Evain  <jbevain@novell.com>
819
820         * pedump.c (dump_metadata, dump_metadata_header): dump
821         versions contained in the metadata header.
822
823 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
824
825         * threads.c: register small_id_table with the GC.
826
827 2007-07-27  Mark Probst  <mark.probst@gmail.com>
828
829         * threads.c, threads.h, class-internals.h, object-internals.h:
830         Hazard pointers, to be used by lock-free parallel algorithms.
831
832 2007-07-26  Dick Porter  <dick@ximian.com>
833
834         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
835         routine on non-windows platforms, as I've not managed to think of
836         a non-kludgy way of doing this.  Finishes off bug 78739.
837
838 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
839
840         * object.c: properly setup interface_bitmap in proxy vtables.
841
842 2007-07-25  Marek Habersack  <mhabersack@novell.com>
843
844         * appdomain.c (get_shadow_assembly_location): do not use TickCount
845         to create unique shadow copy target directories, use the domain's
846         serial number instead. Each domain gets a unique target directory
847         that way.
848
849         * domain.c (mono_domain_create): added code to increment domain
850         shadow copy serial number and cache the value in the current
851         domain structure.
852
853         * domain-internals.h (struct _MonoDomain): added a new field -
854         shadow_serial to hold the serial number used in generation of
855         shadow-copy directories. This is to make sure that the directory
856         name is unique for each and every domain created. We avoid a race
857         condition with overriding assemblies already in use by other app
858         domains.
859
860 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
861
862         * class.c (mono_bounded_array_class_get): fixed memory leak when 
863         binding generic parameters.
864
865 2007-07-24  Raja R Harinath  <rharinath@novell.com>
866
867         * metadata.c (do_mono_metadata_parse_generic_class): Use
868         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
869         error.
870
871 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
872
873         * loader.c, class-internals.h, reflection.c: removed the per-method
874         generics hashtable: we use the global one through the call of
875         mono_class_inflate_generic_method ().
876
877 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
878
879         * class.c, metadata.c, class-internals.h: introduce yet another
880         generics global cache for inflated methods (fixes 98% of the perf
881         issue in bug #81806).
882
883 2007-07-23  Raja R Harinath  <rharinath@novell.com>
884
885         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
886         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
887         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
888         return a MonoGenericInst containing (a copy) of those types.
889         (mono_metadata_inflate_generic_inst): Update to changes.
890         (mono_metadata_parse_generic_inst): Likewise.
891         (mono_get_shared_generic_inst): Likewise.
892         * reflection.c (mono_class_bind_generic_parameters): Likewise.
893         (mono_reflection_bind_generic_method_parameters): Likewise.
894         * metadata-internals.h: Likewise.
895         * icall.c (free_generic_context): Kill.
896         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
897
898         * reflection.c (reflection_methodbuilder_to_mono_method): Use
899         mono_metadata_type_dup.
900         * marshal.c (mono_mb_create_method): Likewise.
901
902         * metadata.c (mono_metadata_type_dup): Rename from
903         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
904         MonoImage.  Handle a few more cases, esp. when no mempool is given.
905         * marshal.c, metadata-internals.h: Update to changes.
906
907 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
908
909         * class.c: fixed a small leak for array classes and removed warning.
910
911 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
912
913         * loader.c (mono_method_get_param_token): Make this work on generic methods.
914         Return 0x8000000 for return parameters. Fixes #82161.
915
916 2007-07-21  Marek Habersack  <grendello@gmail.com>
917
918         * appdomain.c (get_shadow_assembly_location): append the current
919         ticks value to the path. Avoids overwriting the same assemblies by
920         several threads at the same time.
921
922 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
923         and Raja R Harinath  <rharinath@novell.com>
924
925         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
926         Simplify slightly.
927         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
928         property for testing if a method is a generic method definition.
929
930 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
931
932         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
933
934 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
935
936         * verify.c: used function from private branch, reverted to the one in class.h 
937
938 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
939
940         * verify.c: a typo slipped in and the code wont compile
941
942 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
943
944         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
945         disabled box instruction as it is doing the wrong thing
946         improved stack dump messages, now it is easier to debug type related issues
947
948
949 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
950
951         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
952
953 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
954
955         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
956         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
957         grouped with class and valuetype. This change will simply 
958         the code as it should be handled just like unmanaged pointers.
959
960 2007-07-19  Mark Probst  <mark.probst@gmail.com>
961
962         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
963
964 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
965
966         * verify.c: several stack merge issues fixed, reference comparisons now
967         check the type size. strict type check now works correctly.
968         added more uses of IS_MANAGED_POINTER macro.
969         fixed issues pointed by running the test suite against .net.
970         
971
972 2007-07-19  Mark Probst  <mark.probst@gmail.com>
973
974         * class.c, loader.c, class-internals.h: Removed the
975         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
976         defines.
977
978         * icall.c: Better error checking in some internal reflection
979         methods.
980
981 2007-07-18  William Holmes  <billholmes54@gmail.com>
982
983         * filewatcher.c : removed unused variable 'filename' in 
984           ves_icall_System_IO_FSW_SupportsFSW
985
986 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
987
988         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
989         obsolete, removed.
990
991 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
992
993         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
994         
995         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
996
997 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
998
999         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
1000         Implement generics support.
1001         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
1002
1003         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
1004         type_args and method_args arguments.
1005         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
1006         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
1007         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
1008
1009 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
1010
1011         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
1012           It adds a rootimage parameter to mono_reflection_get_type_internal,
1013           adds new function mono_reflection_get_type_with_rootimage and use
1014           the rootimage to resolve the types instead of the current image
1015
1016 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
1017
1018         * culture-info-table.h: Forgot to update after r78304.
1019
1020 2007-07-13  Raja R Harinath  <rharinath@novell.com>
1021
1022         * class.c (mono_class_is_open_constructed_type)
1023         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
1024
1025 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
1026
1027         * class.c (mono_bounded_array_class_get):  method fails if used with
1028         an incomplete TypeBuilder enum (no basetype field), fixed it by 
1029         avoiding calculating the size for such array as it cannot be instantiated.
1030         Fix bug #82015
1031
1032 2007-07-12  Raja R Harinath  <rharinath@novell.com>
1033
1034         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
1035         field.
1036         * metadata.c, reflection.c: Update to changes.
1037
1038 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
1039
1040         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
1041         mono_class_is_valid_enum, they are used to valide a enum when loading.
1042         * reflection.c: used new functions to throw TypeLoadException when and
1043         invalid enum is build with TypeBuilder. Fixes #82018
1044   
1045 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1046
1047         * object.c: forgot commit of mono_class_setup_methods () to access
1048         iface->methods.
1049         * object-internals.h: added a few more handy fields to
1050         MonoIMTCheckItem.
1051
1052 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
1053
1054         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
1055         iface->methods.
1056
1057 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
1058
1059         * class-internals.h, object-internals.h, object.c: IMT-based
1060         interface invocation core from Massimiliano Mantione
1061         (massi@ximian.com) with a reworked arch-specific interface,
1062         bsearch implementation and a few bugfixes and memory savings by me.
1063
1064 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
1065
1066         * class.c (mono_class_create_from_typedef): mono would segfault if 
1067         an enum did not have a __value field. It now throws a TypeLoadException
1068         for such cases. Fix bug #82022
1069
1070 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
1071
1072         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
1073
1074 2007-07-09  Mark Probst  <mark.probst@gmail.com>
1075
1076         * class.c (mono_class_init): If a class is already inited but has
1077         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
1078
1079 2007-07-09  Mark Probst  <mark.probst@gmail.com>
1080
1081         * class.c: Properly handle the case of an unimplemented interface
1082         method.  Fixes: 81673.
1083
1084 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1085
1086         * class-internals.h, object.c: cleanup patch from massi: use
1087         MonoVTable->interface_bitmap since the vtable interfaces offset array
1088         is going away.
1089
1090 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
1091
1092         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
1093         GetMDStreamVersion icall instead.
1094
1095 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
1096
1097         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
1098         not use mono_dl_build_path() with a full library name: makes
1099         fallbacks to libgaim and libfam work.
1100
1101 2007-07-06  William Holmes  <billholmes54@gmail.com>
1102
1103         * assembly.c: Added a continue statement in probe_for_partial_name when
1104          parse_assembly_directory_name fails.  Fixes : 82002
1105
1106 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
1107
1108         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
1109         and added a verification  for TYPEDBYREF.
1110         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
1111         make native int interchangeable with int32 and some small cleanup and formating.
1112         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
1113         handle byref of byref.
1114         * verify.c (push_local): handle byref of byref.
1115         * verify.c (do_binop): invalid mix of values is unverifiable
1116         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
1117         added visibility checks
1118         * verify.c (field related method): added visibility checks
1119         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
1120
1121 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
1122
1123         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
1124         string.
1125
1126 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
1127
1128         * profiler.c (mono_profiler_load): Fix an off-by-one error.
1129
1130         * marshal.c (emit_marshal_string): When returning a string from managed code,
1131         allways make a copy even for unicode strings. Fixes #81990.
1132
1133 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
1134
1135         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
1136         of byref generic inst types (bug #81997).
1137
1138 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
1139
1140         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
1141         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
1142
1143 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
1144
1145         * marshal.c (emit_marshal_string): Add support for unicode strings in
1146         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
1147
1148 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
1149
1150         * verify.c: field load/store are now verified, missing only access checks now
1151
1152 2007-06-28  Martin Baulig  <martin@ximian.com>
1153
1154         * mono-debug.c (mono_debug_debugger_version): New public variable.
1155
1156 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
1157
1158         * locales.c: When constructing DateTimeFormat or NumberFormat for
1159         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
1160         MonoCultureInfo contructed from the current locale is always
1161         read-only and has UseUserOverride set to true. All MonoCultureInfo
1162         instances returned for GetCultures have both IsReadOnly and
1163         UseUserOverride set to true. Fixes part of bug #81930.
1164
1165 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
1166
1167        * icall-def.h: Update System.__ComObject icalls
1168        * marshal.c: Avoid managed transition (and object creation)
1169        when looking up COM interface in RCW.
1170        * marshal.h: Ditto.
1171        
1172        Code is contributed under MIT/X11 license.
1173
1174 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
1175
1176         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
1177         to avoid crashes during assembly unloading.
1178
1179 2007-06-22  Raja R Harinath  <rharinath@novell.com>
1180
1181         Fix MethodInfo.IsGenericMethodDefinition
1182         * reflection.c (mono_reflection_bind_generic_method_parameters):
1183         Rearrange code to ensure we always uses a generic method definition.
1184         * class.c (mono_class_inflate_generic_method_full): Set
1185         'generic_container' field only for generic method definitions.
1186         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
1187         Use presense of 'generic_container' field as indication of being a
1188         generic method definition.
1189
1190 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
1191
1192         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1193
1194         * object-internals.h: Reflect changes in the layout of the managed Delegate
1195         class.
1196         
1197         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
1198         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
1199         runtime memory used by the dynamic method. Fixes #77146.
1200
1201 2007-06-21  Dick Porter  <dick@ximian.com>
1202
1203         * file-io.h: 
1204         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
1205         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
1206         81767.
1207
1208 2007-06-21  Raja R Harinath  <rharinath@novell.com>
1209
1210         * reflection.c (method_encode_methodspec): Add a tripwire.
1211         * class.c (inflate_generic_type): The fully open generic type is
1212         not the same as the generic type definition.
1213
1214 2007-06-21  Martin Baulig  <martin@ximian.com>
1215
1216         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
1217
1218         * mono-debug-debugger.h
1219         (MonoDebuggerBreakpointInfo): Removed.
1220         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
1221         (mono_debugger_remove_breakpoint): Likewise.
1222         (mono_debugger_breakpoint_callback): Likewise.
1223         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
1224
1225 2007-06-21  Raja R Harinath  <rharinath@novell.com>
1226
1227         * metadata.c (mono_metadata_lookup_generic_class): The fully open
1228         generic type is not the same as the generic type definition.
1229         * class.c (mono_generic_class_get_class): Likewise.
1230
1231 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
1232
1233         * icall.c: The second argument to 
1234         System.Reflection.MethodBase.GetMethodFromHandleInternalType
1235         is a MonoType not a MonoClass.
1236
1237 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
1238
1239         * verify.c: support for function pointers in the verifier
1240
1241 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
1242
1243         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
1244
1245 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
1246
1247         * assembly.c: removed Mono.Data.SqliteClient from the list of
1248         forward-compatible assemblies as it breaks the ABI (bug #81899).
1249
1250 2007-06-19  Raja R Harinath  <rharinath@novell.com>
1251
1252         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
1253         lookup/update with the loader lock.
1254         * reflection.c (mono_class_bind_generic_parameters): No need to
1255         protect mono_metadata_lookup_* with the loader lock.
1256         * class.c (inflate_generic_type): Likewise.
1257         
1258         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
1259         on a generic instantiated type.
1260
1261 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
1262
1263         *verify.c: produce meanfull error messages on verification error
1264         *verify.c: fixed some cases of verification errors reported as validation errors
1265         *pedump.c: fixed the error name array, now it shows validation errors properly
1266         *verify.h: fixed the contant that should be used for verification errors
1267
1268 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
1269
1270         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
1271         for bug #77596, 81858 and 80743 (generics data structures on domain
1272         unload).
1273
1274 2007-06-15  Raja R Harinath  <rharinath@novell.com>
1275
1276         Avoid allocating 'MonoGenericContext' on the heap.
1277         * class-internals (_MonoMethodInflated::context): Make field
1278         inline, not a pointer.
1279         * loader.c (method_from_methodspec): Allocate 'new_context' on the
1280         stack.  Use the context embedded within the inflated method as the
1281         hash key, rather than 'new_context'.
1282         * class.c (inflate_generic_context): Simplify.  Return a struct
1283         rather than allocating on the heap.
1284         (mono_class_inflate_generic_method_full): Update to changes.  Now,
1285         doesn't salt away a copy of the context -- simplifying the
1286         lifetime rules of a 'MonoGenericContext *'.
1287         (mono_method_get_context): Return pointer to embedded context.
1288         (setup_generic_array_ifaces): Allocate temporary context on stack.
1289         * reflection.c (inflate_mono_method): Likewise.
1290         (mono_reflection_bind_generic_method_parameters): Likewise.
1291         Use the context embedded within the inflated method as the hash key.
1292
1293         Avoid a source of allocation of 'MonoGenericContext'.
1294         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
1295         and 'cached_context' fields into embedded 'MonoGenericContext' field.
1296         * class.c: Update to changes.
1297         (mono_generic_class_get_context): Simplify drastically.  Now just
1298         returns a pointer to the field.
1299         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
1300         argument as a const pointer.
1301         (mono_metadata_generic_context_equal): Likewise.
1302         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
1303         Update to changes.
1304
1305 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
1306
1307         * verify.c improved the handling of brtrue/brfalse, factored out common code
1308
1309 2007-06-14  Raja R Harinath  <rharinath@novell.com>
1310
1311         Kill MonoGenericMethod.
1312         * class-internals.h (MonoGenericContext::method_inst): Rename from
1313         'gmethod' and convert to a MonoGenericInst.
1314         (MonoGenericMethod): Remove.
1315         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
1316         * loader.c (method_from_methodspec): Update to changes.  Use a
1317         MonoGenericContext as the key to the hashtable.
1318         * metadata.c (mono_metadata_generic_context_equal): Rename from 
1319         'mono_metadata_generic_method_equal' and take MonoGenericContext.
1320         (mono_metadata_generic_context_hash): Likewise from
1321         'mono_metadata_generic_method_hash'.  Change hash function.
1322         (mono_metadata_load_generic_params): Update to changes.
1323         (mono_get_shared_generic_method): Remove.
1324         * metadata-internals.h (mono_get_shared_generic_method): Remove.
1325         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
1326         (inflate_generic_context): Likewise.
1327         (mono_class_inflate_generic_method_full): Likewise.
1328         (setup_generic_array_ifaces): Likewise.
1329         (mono_class_create_from_typespec): Likewise.
1330         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
1331         (method_encode_methodspec): Update callsite.
1332         (reflection_methodbuilder_to_mono_method): Update to changes.
1333         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
1334         MonoGenericContext as the key to the hashtable.
1335         (inflate_mono_method): Update to changes.
1336
1337         * class-internals.h (MonoGenericMethod::container): Remove.
1338         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
1339
1340 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
1341
1342         * profiler-private.h, profiler.c, profiler.h: added API to profile
1343         exception events.
1344
1345 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
1346
1347         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
1348
1349 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
1350
1351         * verify.c: method invocation is now validated, now we verify parameter types on stack.
1352         Fixed overflow and underflow not aborting the verification process.
1353
1354 2007-06-13  Mark Probst  <mark.probst@gmail.com>
1355
1356         * class-internals.h (MonoStats): Added stats entries for dynamic
1357         code allocations.
1358
1359 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
1360
1361         * loader.c (mono_free_method): Free header->locals and header->clauses.
1362
1363         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
1364         dynamic case.
1365
1366         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
1367
1368         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
1369
1370 2007-06-12  Raja R Harinath  <rharinath@novell.com>
1371
1372         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
1373         the tables.
1374
1375 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
1376
1377         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
1378
1379 2007-06-11  Raja R Harinath  <harinath@gmail.com>
1380
1381         MonoGenericMethod on a diet
1382         * class-internals.h (_MonoMethodInflated::reflection_info): Move
1383         here ...
1384         (_MonoGenericMethod::reflection_info): ... from here.
1385         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
1386         Update to changes.
1387         * reflection.c (inflate_mono_method): Likewise.
1388         (mono_reflection_bind_generic_method_parameters): Likewise.
1389
1390 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
1391
1392         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
1393         *verify.c: factored long ldarg forms to share code with short forms
1394
1395 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
1396
1397         *verify.c: fixed code formating factored some duplicate code
1398         into a new function
1399
1400         *verify.h: fixed binary incompatibility introduced earlier
1401
1402         *pedump.c: fixed formating
1403
1404 2007-06-11  Raja R Harinath  <harinath@gmail.com>
1405
1406         Fix assertion when disassembling Mono.C5.dll
1407         * loader.c (method_from_methodspec): Avoid inflating a method
1408         twice with the same context.  If the methodref is inflated, use
1409         the declaring method instead.
1410
1411         * class.c (mono_class_from_generic_parameter): Fix case similar to
1412         bug #81830 handled below, but for method containers.
1413
1414 2007-06-10  Raja R Harinath  <harinath@gmail.com>
1415
1416         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
1417         get_shared_generic_class.  Directly inflate the instance.
1418         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
1419         (inflate_generic_class): Delete.
1420         (get_shared_generic_class): Delete.  Move setting of
1421         'cached_class' and 'cached_context' ...
1422         * metadata.c (mono_metadata_lookup_generic_class): ... here.
1423
1424         * metadata.c (mono_metadata_lookup_generic_class): Change
1425         signature to take the components of a MonoGenericClass rather than
1426         an allocated MonoGenericClass.  Change semantics to be intern-like.
1427         * reflection.c (mono_class_bind_generic_parameters): Update to
1428         changes.  Make locking region tighter.
1429         * class.c (inflate_generic_class): Update to changes.
1430         (get_shared_generic_class): Likewise.
1431         * metadata-internals.h: Likewise.
1432
1433         * reflection.c (mono_class_bind_generic_parameters): Take and
1434         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
1435         (mono_reflection_bind_generic_parameters): Use
1436         'mono_class_bind_generic_parameters' rather than duplicate the code.
1437         * class.c (mono_bounded_array_class_get): Update to changes.
1438         * object-internals.h: Likewise.
1439
1440         * reflection.c (mono_class_bind_generic_parameters): Only support
1441         parameterizing generic type definitions.  Remove support for other
1442         open types.
1443
1444 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
1445
1446         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
1447
1448         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
1449         in the dynamic case.
1450
1451 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
1452
1453         * threads.c: When cleaning up thread, reset the Background bit.
1454         Fixes bug #81720.
1455
1456 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
1457
1458        * metadata.c: Move variable declarations to top of scope.
1459        * verify.c: Move variable declarations to top of scope.
1460
1461        Code is contributed under MIT/X11 license.
1462
1463 2007-06-08  Raja R Harinath  <rharinath@novell.com>
1464
1465         * reflection.c (mono_class_bind_generic_parameters): Replace
1466         open-coded loop with mono_metadata_inflate_generic_inst.
1467
1468         * class.c (get_shared_generic_class): Don't call
1469         mono_get_shared_generic_inst.  Use the container's own
1470         'class_inst'.
1471
1472         * metadata.c (mono_metadata_load_generic_params): Move
1473         initialization of 'context' field here from ...
1474         * class.c (mono_class_create_from_typedef): ... here, and ...
1475         * loader.c (mono_get_method_from_token): ... here.
1476
1477         * class.c (get_shared_generic_class): Rename from
1478         mono_get_shared_generic_class and make static.
1479         (mono_get_shared_generic_inst): Move to metadata.c.
1480         * loader.c (mono_get_shared_generic_method): Likewise.
1481         * class-internals.h, metadata-internals.h: Update to changes.
1482
1483         Fix #81830
1484         * class.c (mono_class_from_generic_parameter): Don't assume a
1485         generic container owner exists.  Generic containers from monodis
1486         don't have any.
1487
1488 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
1489
1490         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
1491         * verify.h: new typedefs to returns the non-verifiable status
1492         * verify.c: initial implementation of generics, stack merging and object compatibility check
1493
1494 2007-06-06  Mark Probst  <mark.probst@gmail.com>
1495
1496         * class.c, image.c, class-internals.h (MonoImage): class_cache is
1497         a MonoInternalHashTable again (fixed bug in internal hash table
1498         code).
1499
1500 2007-06-06  Mark Probst  <mark.probst@gmail.com>
1501
1502         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
1503         MonoInternalHashTable again (fixed bug in internal hash table
1504         code).
1505
1506 2007-06-06  Mark Probst  <mark.probst@gmail.com>
1507
1508         * class.c, image.c, class-internals.h, domain.c,
1509         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
1510         changes.  Have to figure out what makes them break the SWF
1511         regression.
1512
1513 2007-06-04  Mark Probst  <mark.probst@gmail.com>
1514
1515         * class.c, image.c, class-internals.h (MonoImage): class_cache is
1516         a MonoInternalHashTable now.
1517
1518 2007-06-04  Mark Probst  <mark.probst@gmail.com>
1519
1520         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
1521         MonoInternalHashTable now.
1522
1523 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
1524
1525         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
1526         invoke_impl code.
1527
1528         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
1529
1530         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
1531         dependent trampoline.
1532
1533         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1534
1535         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
1536
1537 2007-05-29  Robert Jordan  <robertj@gmx.net>
1538
1539         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
1540
1541 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
1542
1543         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
1544
1545 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
1546
1547        * marshal.c: Fix interface lookup loops for
1548        cominterop_get_com_slot_for_method and 
1549        cominterop_get_method_interface. Only need to lookup
1550        if type is a class, else use interface type method is on.
1551
1552        Code is contributed under MIT/X11 license.
1553
1554 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
1555
1556         * reflection.c: HasSecurity can be present even if no specially 
1557         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
1558         SecurityAttribute). Fix CAS regression tests on buildbot.
1559
1560 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
1561
1562        * appdomain.c: Add configure checks for header files.
1563        * image.c: Add configure checks for header files.
1564        * file-io.c: Add configure checks for header files.
1565        * debug-mono-symfile.c: Add configure checks for header files.
1566        * threadpool.c: Add configure checks for header files.
1567        * console-io.c: Add configure checks for header files.
1568        * profiler.c: Add configure checks for header files.
1569        * rawbuffer.c: Add configure checks for header files.
1570        * icall.c: Add configure checks for header files.
1571        * rand.c: Add configure checks for header files.
1572        * socket-io.c: Add configure checks for header files.
1573
1574        Code is contributed under MIT/X11 license.
1575
1576 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
1577
1578         * reflection.c (mono_custom_attrs_from_builders): Remove the 
1579         assertion as it breaks the build.
1580         
1581         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
1582
1583         * reflection.c (lookup_custom_attr): Make a copy here too.
1584
1585         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
1586         dynamic images.
1587
1588         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
1589         images.
1590
1591         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
1592         info.
1593
1594 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
1595
1596         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
1597         (load_cattr_value): Ditto.
1598
1599 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
1600
1601         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
1602
1603 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
1604
1605         * threads.c: In "start_wrapper", set apartment_state to MTA if
1606         apartment_state is Unknown and we're running on 2.0 profile or
1607         higher.
1608         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
1609         to main method, then set apartment_state to Unknown on 1.0 profile,
1610         and MTA on 2.0 profile.
1611
1612 2007-05-16  Jb Evain  <jb@nurv.fr>
1613
1614         * class-internals.h (MonoDefaults): Add an attribute_class and
1615           customattribute_data_class.
1616         * domain.c (mono_init_internal): Populate them.
1617         * reflection.c: Use them to remove duplicates. Make a vew
1618         MonoClass variables `static'.
1619
1620 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
1621
1622         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
1623         step in implementing IMT, so that all isinst checks now can go
1624         through the bitmap.
1625         This was needed because vtables for TransparentProxy need to look
1626         like the vtable of the "target" class, so they need to point to
1627         its interface bitmap directly.
1628
1629         * object.c: inside "mono_class_create_runtime_vtable" and
1630         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
1631
1632 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
1633
1634         * object-internals.h
1635           culture-info.h : added territory field in MonoCulture and
1636           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
1637         * locales.c : fill territory field above too.
1638         * culture-info-table.h : regenerated.
1639
1640 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
1641
1642         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
1643         Fixes #81599.
1644
1645 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
1646
1647         * object.c: Always initialize apartment, even if 
1648         there is no custom attributes on entry point.
1649         
1650         Code is contributed under MIT/X11 license.
1651
1652 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
1653
1654         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
1655         * metadata.c: If no encoding is set, check for unicode
1656         on class.
1657         
1658         Code is contributed under MIT/X11 license.
1659
1660 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
1661
1662         * threads.c: Handle if mono_thread_current returns NULL 
1663         
1664         Code is contributed under MIT/X11 license.
1665
1666 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
1667
1668         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
1669         in start_wrapper. Added mono_thread_init_apartment_state and
1670         mono_thread_cleanup_apartment_state.
1671         * object.c: Initialize thread apartment state on main thread
1672         by checking for STAThreadAttribute on entry point.
1673         * object-internals.h: Add apartment_state field to MonoThread.
1674         * threads-types.h: Add unmanaged definition of 
1675         System.Threading.ApartmentState, MonoThreadApartmentState.
1676         
1677         Code is contributed under MIT/X11 license.
1678         
1679 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
1680
1681         * class.c: Fix windows build.
1682         * class-internals.h: Fix windows build.
1683         
1684         Code is contributed under MIT/X11 license.
1685
1686 2007-05-08  Robert Jordan  <robertj@gmx.net>
1687
1688         * process.c (CreateProcess_internal):
1689         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
1690         .CreateNoWindow was specified. Fixes #81496.
1691
1692 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
1693
1694         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
1695         step in implementing IMT, replaced it with two compact arrays
1696         (interfaces_packed and interface_offsets_packed) and a bitmap that
1697         is used for isinst checks (interface_bitmap).
1698
1699         * class.c: (compare_interface_ids): compare function to pass to
1700         bsearch when looking for an interface with a given id.
1701         (mono_class_interface_offset): reimplemented using bsearch on
1702         interfaces_packed, getting the offset from interface_offsets_packed.
1703         (print_implemented_interfaces): utility debugging function.
1704         (setup_interface_offsets): reworked to initialize interfaces_packed,
1705         interface_offsets_packed and interface_bitmap.
1706
1707         * object.c: replaced all accesses to "MonoClass.interface_offsets"
1708         with uses of interfaces_packed and interface_offsets_packed.
1709
1710 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
1711
1712         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
1713         mono_class_interface_offset prototype to wrap all accesses to
1714         "MonoClass.interface_offsets".
1715
1716         * class.c: Implemented mono_class_interface_offset, and wrapped all
1717         accesses to "MonoClass.interface_offsets".
1718
1719         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
1720         "MonoClass.interface_offsets".
1721
1722 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
1723
1724         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
1725         GetMethodFromHandle overloads (bug #78637).
1726
1727 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
1728
1729         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
1730         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
1731
1732 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
1733
1734         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
1735         #81498.
1736
1737         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
1738         gracefully.
1739         (mono_custom_attrs_from_index): Ditto.
1740
1741         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
1742         Fixes #81501.
1743
1744 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
1745
1746         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
1747         is now allocated from a mempool.
1748
1749 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
1750
1751         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
1752         caller holds threads_lock, leading to deadlocks. Fixes #81476.
1753
1754 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
1755
1756         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
1757         mono_loader_clear_error () too late. Fixes #81463.
1758
1759 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
1760
1761         * culture-info-table.h : regenerated.
1762
1763 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
1764
1765         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
1766         is missing.
1767
1768 2007-04-25  Dick Porter  <dick@ximian.com>
1769
1770         * Makefile.am: Put the mingw enforced-optimisation back into the
1771         PLATFORM_WIN32 section.
1772
1773 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
1774
1775         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
1776         patch.
1777
1778         * image.c (mono_image_load_module): New API function to load a module reference.
1779
1780         * image.c (load_modules): Load modules lazily. Fixes #80812.
1781
1782         * class.c (mono_class_from_typeref): Use mono_image_load_module.
1783         
1784         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
1785
1786         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
1787         to mono_image_load_module_dynamic.
1788
1789 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
1790
1791         * marshal.c: Fix calling convention for CCW on non-windows
1792         platforms. STDCALL on windows, CDECL everywhere else to work 
1793         with XPCOM and MainWin COM.
1794         
1795         Code is contributed under MIT/X11 license.
1796
1797 2007-04-23  Martin Baulig  <martin@ximian.com>
1798
1799         Fix #80969.
1800
1801         * loader.c
1802         (method_from_memberref): Added `gboolean *used_context' argument.
1803         (mono_get_method_from_token): Likewise.
1804         (mono_get_method_full): Don't insert the method in the cache when
1805         `used_context' is true.
1806
1807 2007-04-23  Raja R Harinath  <rharinath@novell.com>
1808
1809         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
1810
1811         * reflection.c (mono_reflection_bind_generic_parameters): Don't
1812         create new MonoTypes for returned types.
1813         * class.c (mono_generic_class_get_class): Export mono-internal.
1814         * class-internals.h: Update to changes.
1815
1816 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
1817
1818         * threadpool.c, threadpool.h, icall-def.h: patch from
1819         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
1820
1821 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
1822
1823         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
1824         
1825         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
1826
1827         * threads.c (mono_thread_get_stack_bounds): New helper function.
1828
1829         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
1830         Correctly compute stack bounds when attaching. Fixes #81394.
1831
1832 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
1833
1834         * reflection.c: fix handling of doubles in custom attributes
1835         for the arm-fpa format (bug #81368).
1836
1837 2007-04-18  Raja R Harinath  <rharinath@novell.com>
1838
1839         * reflection.c (assembly_add_win32_resources): Mildly relax an
1840         bounds check to let the end pointer point just past the end of the
1841         allocated buffer.  (may fix #81384)
1842
1843 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
1844
1845         * culture-info-table.h : regenerated.
1846
1847 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
1848
1849         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
1850         the thread is aborted early.
1851
1852 2007-04-05  Dick Porter  <dick@ximian.com>
1853
1854         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
1855         FindFirstFile()/FindNextFile() to find entries.  This lets the
1856         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
1857         81038.
1858
1859         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
1860         the parameters of
1861         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
1862
1863 2007-04-04  Martin Baulig  <martin@ximian.com>
1864
1865         * debug-helpers.c
1866         (mono_method_desc_full_match): Add support for nested classes.
1867
1868 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
1869
1870         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
1871
1872 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
1873
1874         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
1875         waiting for too many threads.
1876
1877 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
1878
1879         * environment.c: Fix return value check on uname so we can get the 
1880         executing version on Solaris operating systems.
1881
1882 2007-03-28  Jb Evain  <jbevain@gmail.com>
1883
1884         * class.c (mono_type_get_name_recurse): Complete the
1885         fix for the creation of assembly qualified names for
1886         pointer types. Fixes #81208.
1887
1888 2007-03-27  Dick Porter  <dick@ximian.com>
1889
1890         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
1891         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
1892         changed.
1893
1894         * threads.c
1895         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
1896         the value of ReleaseMutex().
1897
1898 2007-03-27  Dick Porter  <dick@ximian.com>
1899
1900         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
1901         in little-endian order, not network endian, so must be converted
1902         to host endian here.  Fixes bug 80593.
1903
1904 2007-03-22  Jb Evain  <jbevain@gmail.com>
1905
1906         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
1907         qualified names for pointer types. Fixes #81208.
1908
1909 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
1910
1911         * marshal.c: Add support for PreserveSigAttribute. 
1912         
1913         Code is contributed under MIT/X11 license.
1914
1915 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
1916
1917         * process.c: Fix endianness issues. Fixes #81126.
1918
1919         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
1920         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
1921
1922         * image.c (mono_image_lookup_resource): Make this work on big-endian
1923         machines.Change API contract so the caller needs to free the return value.
1924         
1925         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
1926         API change.
1927         
1928 2007-03-14  Martin Baulig  <martin@ximian.com>
1929
1930         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
1931         mono_type_get_desc() as well.
1932
1933 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
1934
1935         * icall.c:  Fix environ access in VS.  
1936         
1937 2007-03-13  Alp Toker  <alp@atoker.com>
1938
1939         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
1940         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
1941         #63841.
1942
1943 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
1944
1945         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
1946         circular references among dynamic methods. Fixes #81091.
1947
1948         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
1949
1950 2007-03-09  Martin Baulig  <martin@ximian.com>
1951
1952         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
1953
1954 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
1955
1956         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
1957         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
1958         
1959         Code is contributed under MIT/X11 license.
1960         
1961 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
1962
1963         * loader.c: Reapply patch for bug #79424.
1964
1965 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
1966
1967         * metadata.c (mono_type_to_unmanaged): Only convert object to
1968         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
1969
1970 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
1971
1972         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
1973         (and incorrectly set) is_reference field from MonoGenericInst.
1974
1975 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
1976
1977         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
1978         a little earlier.
1979
1980         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
1981
1982         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
1983
1984 2007-03-05  Miguel de Icaza  <miguel@novell.com>
1985
1986         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
1987         FileOptions.1 value to mean "temporary", map that to
1988         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
1989
1990         Fixes 80688
1991
1992 2007-03-03  Marek Habersack  <mhabersack@novell.com>
1993
1994         * appdomain.c: implement MS .Net style shadow copying. Copies of
1995         the assemblies are made in a subdirectory of the dynamic base
1996         directory, the assembly names are preserved.
1997         Copy .mdb and .config files along with the assemblies being shadowed.
1998
1999 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
2000
2001         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
2002         (emit_marshal_handleref): Ditto.
2003
2004         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
2005         on Visual C++. Fixes #80671.
2006
2007 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
2008
2009         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
2010         for clone operations.
2011
2012 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
2013
2014         * marshal.c: Fix warnings.
2015
2016 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
2017
2018         * loader.c: allow case-insensitive matching of the dll name
2019         in dllmap handling when prefixed with "i:".
2020
2021 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
2022
2023         * threads.c: Fix #ifdef for dummy_apc function for VS.
2024
2025 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
2026
2027         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
2028
2029 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
2030         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
2031         giving precedence to the methods with a fully qualified name
2032         (InterfaceName.MethodName) when building the interface sections
2033         of the vtable.
2034
2035 2007-02-16  Dick Porter  <dick@ximian.com>
2036
2037         * threadpool.c (append_job): Fix fast-path array handling, so it's
2038         less likely the array will grow exponentially when the load is
2039         heavy.
2040
2041 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2042
2043         * metadata-internals.h, loader.c: fix dllmap lookup order
2044         for non-function maps, too, and prepare for fallback code.
2045
2046 2007-02-12  Robert Jordan  <robertj@gmx.net>
2047
2048         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
2049         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
2050         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
2051         GlobalFree. Fixes a part of bug #77075.
2052
2053 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
2054
2055         * loader.c: implemented typedef parent in field memberref.
2056
2057 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
2058
2059         * marshal.c: Fix warnings and remember to call Release on
2060         IUnknown of RCW.
2061         
2062         Code is contributed under MIT/X11 license.
2063
2064 2007-02-10  Miguel de Icaza  <miguel@novell.com>
2065
2066         * class-internals.h: Add MonoHandleRef definition, and
2067         handleref_class to mono_defaults. 
2068
2069         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
2070         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
2071
2072         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
2073         (do nothing on this stage)
2074         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
2075         (emit_marshal_handleref): New method, used for argument handling
2076         of HandleRefs. 
2077
2078 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
2079
2080         * class.c (mono_class_setup_parent): Lazily init com types.
2081         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
2082         init com types.
2083         * object.c (mono_remote_class_vtable): Lazily init com types.
2084         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
2085         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
2086         * domain-internals.h: Expose mono_init_com_types.
2087         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
2088         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
2089         Add support for COM Callable Wrapper marshalling.
2090         * marshal.h: Add icall definitions.
2091         * gc.c: Handle freeing of CCWs in finalizer code.
2092         
2093         Code is contributed under MIT/X11 license.
2094
2095 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
2096
2097         * reflection.c: changed all the signature encoding code to use
2098         a variable-sized buffer.
2099
2100 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2101
2102         * marshal.c: locking fixes: never take the loader lock
2103         or other runtime locks when holding the marshal lock
2104         (fixes bug#80664).
2105
2106 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
2107
2108         * marshal.c: make the delegate function pointer mapping
2109         work for the moving GC.
2110
2111 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
2112
2113         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
2114         for bug #80618.
2115
2116 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2117
2118         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
2119         gmodule.
2120
2121 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
2122
2123         * threadpool.c: made the code moving-GC safe.
2124
2125 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
2126
2127         * assembly.c, boehm-gc.c, class-internals.h, class.c,
2128         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
2129         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
2130         warning cleanup.
2131         * reflection.c: warning cleanup, some threading and moving GC fixes.
2132
2133 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
2134
2135         * class.c, loader.c: create the needed Set/Get/Address array methods
2136         as well as the .ctors in mono_class_init (), fixes bug #80567.
2137
2138 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
2139
2140         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
2141         we doesn't decrease its alignment. Should fix the sparc build.
2142
2143 2007-01-24  Dick Porter  <dick@ximian.com>
2144
2145         * socket-io.c
2146         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2147         Create the returned object if we need to ignore an unsupported
2148         socket option.  Fixes a segfault reported by Atsushi.
2149
2150 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2151
2152         * class.c, object.c: restrict GC-tracked fields to
2153         UIntPtr fields used inside corlib, so we provide better
2154         type info to the GC and also allow broken packing as in
2155         bug #80580.
2156
2157 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
2158
2159         * sgen-gc.c: removed duplicated function.
2160
2161 2007-01-19  Miguel de Icaza  <miguel@novell.com>
2162
2163         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
2164         value that means that the value is not supported, but that we
2165         should not return a failure, but instead report this as a
2166         successful operation.
2167
2168 2007-01-19  Raja R Harinath  <rharinath@novell.com>
2169
2170         Fix tests/bug79956.2.il
2171         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
2172         (mono_generic_class_get_class): If the generic definition in an
2173         enum, copy over other fields related to it.
2174
2175 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
2176
2177         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
2178         genericinst enums (bug #79215).
2179
2180 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
2181         * class.c: Fix bug 80307.
2182
2183 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
2184
2185         * image.c: if the file table is not present, try to load
2186         all the modules, since we don't have info about them
2187         having or not metadata (bug #80517).
2188         * assembly.c: allow mono_assembly_load_references () to
2189         work for netmodules.
2190
2191 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2192
2193         * image.c, metadata-internals.h, object.c: execute module
2194         cctors when running on the 2 runtime if present (bug #80487).
2195
2196 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
2197
2198         * icall.c: optimized InitializeArray() on bigendian.
2199
2200 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
2201
2202         * icall.c: fix for the broken ARM FPA double format.
2203
2204 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
2205
2206         * icall.c: handle endian issues for r4 and r8 types, too, in
2207         the InitializeArray() icall.
2208
2209 2007-01-15  Miguel de Icaza  <miguel@novell.com>
2210
2211         * loader.c (mono_loader_error_prepare_exception): Clear the error
2212         once we have extracted the information from it, do this before we
2213         call into the JIT's class loading mechanisms.
2214
2215         * object.c (mono_class_create_runtime_vtable): Do not clear the
2216         loader error before calling mono_class_get_exception_for_failure
2217         as the loader error is needed inside
2218         mono_class_get_exception_for_failure to throw the error (thinko).
2219
2220         Fixes #80521
2221         
2222 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
2223
2224         * reflection.c: align fields rva data so it's faster to load at
2225         runtime.
2226
2227 2007-01-12  Raja R Harinath  <rharinath@novell.com>
2228
2229         Prepare to simplify GenericMethod handling.
2230         * class-internals.h (mono_method_get_context): New accessor function.
2231         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
2232         rather than directly accessing '->context' field.
2233
2234         * class-internals.h (_MonoGenericParam.method): Move ...
2235         (_MonoGenericContainer): ... here.  Add into union with klass field.
2236         * class.c, icall.c, loader.c, metadata.c, reflection.c:
2237         Update to changes.
2238
2239 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
2240
2241         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
2242         the wrapper type enum and reduce relocations.
2243
2244 2007-01-12  Raja R Harinath  <rharinath@novell.com>
2245
2246         * reflection.c (inflate_mono_method): Reuse method instantiation
2247         from the generic method, if available.
2248
2249 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
2250
2251         * marshal.c (emit_marshal_variant): Fix conv_arg
2252         type in last commit, based on whether parameter is byref.
2253         
2254 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
2255
2256         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
2257         marshalling.
2258         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
2259         MONO_TYPE_OBJECT back for VARIANT support.
2260
2261 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
2262
2263         * marshal.c, marshal.h, icall-def.h: Implement 
2264         Marshal.ReAllocCoTaskMem.
2265
2266 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
2267
2268         * marshal.c: memory retention fixes: use the proper
2269         image cache for runtime_invoke method lookups.
2270
2271 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
2272
2273         * mempool.c: added code to help debug mempool allocations.
2274
2275 2007-01-11  Dick Porter  <dick@ximian.com>
2276
2277         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
2278         support (experimenting with faking it with IP_MTU_DISCOVER for
2279         systems that don't have IP_DONTFRAGMENT.)
2280         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
2281         icall.
2282
2283         * icall-def.h: new System.Net.Sockets.Disconnect icall.
2284
2285         * socket-io.h: Add new fields to MonoSocketAsyncResult
2286         corresponding to the new ones in Socket.cs.
2287
2288 2007-01-11  Raja R Harinath  <rharinath@novell.com>
2289
2290         Fix IronPython regression mentioned in #80249
2291         * metadata.c (do_mono_metadata_parse_generic_class): Clear
2292         'cached_context' field, since it may have been initialized as a
2293         side-effect of metadata parsing.
2294
2295         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
2296         (_MonoGenericClass.cached_class): Move here and rename from lone
2297         remaining field of ...
2298         (_MonoInflatedGenericClass): ... this.  Remove.
2299         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
2300         to changes.
2301
2302         Fix mcs/tests/test-128.cs regression.
2303         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
2304         2007-01-10 change below.
2305         [MONO_TYPE_OBJECT]: Recurse into array case.
2306
2307 2007-01-11  Raja R Harinath  <harinath@gmail.com>
2308
2309         * class-internals.h (mono_get_inflated_generic_class): Remove.
2310         * class.c (mono_get_inflated_generic_class): Remove.
2311         (mono_generic_class_get_class): Rename from
2312         mono_class_create_generic.
2313         (mono_class_from_mono_type) [GENERICINST]: Use it.
2314         * reflection.c, metadata.c: Update to changes.  Use
2315         'mono_class_from_mono_type'.
2316
2317 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
2318
2319         * reflection.c: use passed type when encoding an array element
2320         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
2321
2322 2007-01-09  Robert Jordan  <robertj@gmx.net>
2323
2324         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
2325         result arguments (someDelegate.EndInvoke (unrelatedAres)).
2326         Fixes bug #80392.
2327
2328 2007-01-09  Raja R Harinath  <rharinath@novell.com>
2329
2330         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
2331
2332         * object.c (set_value): Avoid aliasing between type->data.klass
2333         and type->data.generic_class.
2334
2335         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
2336
2337 2007-01-08  Raja R Harinath  <rharinath@novell.com>
2338
2339         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
2340         between type->data.klass and type->data.generic_class.
2341
2342 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
2343
2344         * marshal.c: In MS.NET, StringBuilder objects are not copied by
2345         value in out parameters.
2346
2347 2007-01-08  Raja R Harinath  <rharinath@novell.com>
2348
2349         Simplify invariant for MonoGenericClass::klass field.
2350         * class.c (mono_class_create_generic): Verify 'klass' is null.
2351         * metadata.c (do_mono_metadata_parse_generic_class): Don't
2352         initialize 'klass' field.
2353
2354 2007-01-05  Raja R Harinath  <rharinath@novell.com>
2355
2356         Ongoing work to avoid redundant data and simplify invariants.
2357         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
2358         'generic_class', and change type to a GenericInst.
2359         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
2360         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
2361
2362 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
2363
2364         * class.c : skip io-layer under PLATFORM_WIN32.
2365
2366 2007-01-03  Tor Lillqvist  <tml@novell.com>
2367
2368         Fix #80305: In a bundled executable, look in the bundled exe
2369         assembly to determine the runtime version. Add the possibility to
2370         bundle also the machine.config file.
2371         
2372         * assembly.c (mono_assembly_open_from_bundle): Make
2373         non-static. Allow being called even if we have no bundled
2374         assemblies, and return NULL right away in that case.
2375
2376         * domain-internals.h: Declare mono_assembly_open_from_bundle()
2377         here.
2378
2379         * domain.c (app_config_parse): Take an assembly exe file name as
2380         parameter instead of a config file name. Check for a bundled
2381         config file for that assembly by calling
2382         mono_config_string_for_assembly_file() (see below) before looking
2383         for one in the file system.
2384         (get_runtimes_from_exe): Corrsponding change to call of
2385         app_config_parse().
2386         (get_runtimes_from_exe): Check for bundled assembly exe file first
2387         by calling mono_assembly_open_from_bundle(). If no bundled
2388         assembly exe file is found, call mono_image_open() as before to
2389         look it up in the file system.
2390
2391         * mono-config.c: Add variable bundled_machinec_onfig.
2392         (mono_config_string_for_assembly_file): New function.
2393         (mono_config_for_assembly): Move code snippet that looks for a
2394         bundled assembly .config file into the above new function. Call
2395         it.
2396         (mono_register_machine_config, mono_get_machine_config): New
2397         functions to set and retrieve
2398
2399         * assembly.h: Declare mono_register_machine_config().
2400
2401         * mono-config.h: Declare mono_get_machine_config() and
2402         mono_config_string_for_assembly_file().
2403
2404         * icall.c: No declaration of environ necessary on Win32. It is
2405         declared (as a macro expanding to a function call) in stdlib.h.
2406         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
2407         New internal mono function. Returns the value of
2408         mono_get_machine_config() as a Mono string.
2409
2410         * icall-def.h: Add get_bundled_machine_config().
2411
2412 2007-01-04  Raja R Harinath  <rharinath@novell.com>
2413
2414         Remove redundant field
2415         * class-internals.h (_MonoGenericContext.container): Remove field.
2416         * loader.c (mono_method_get_signature_full): Don't parse a
2417         "container" for a signature parse when the signature is inflated
2418         immediately.
2419         (method_from_methodspec): Likewise, for a generic_inst.
2420         * class.c, metadata.c, reflection.c: Update to changes.
2421
2422 2006-01-04  Raja R Harinath  <rharinath@novell.com>
2423
2424         * class-internals.h (_MonoGenericClass): Rename 'context' field to
2425         'cached_context', and change semantics -- it starts off NULL, and
2426         is initialized on demand.
2427         * class.c (mono_generic_class_get_context): New accessor to
2428         replace 'context' field accesses.
2429         (mono_class_get_context): New helper.
2430         (*): Update to changes.
2431         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
2432
2433 2007-01-03  Miguel de Icaza  <miguel@novell.com>
2434
2435         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
2436         before the memcpy.   Fixes Marshal2 regression.
2437
2438 2007-01-02  Jb Evain  <jbevain@gmail.com>
2439
2440         * blob.h: add a MONO_TYPE_ENUM definition
2441         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
2442         fix the encoding of arrays of enums in custom attributes.
2443
2444         Fixes #79666.
2445
2446 2007-01-01  Miguel de Icaza  <miguel@novell.com>
2447
2448         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
2449         string is null terminated, but only cut the string short if it
2450         overflows the buffer.   
2451         
2452         (mono_string_to_byvalstr): Also fix this routine.   The code here
2453         was not properly terminating a string (it was only terminated
2454         because of the previous catch-all memset). 
2455
2456         I left the memset, because I do not know if applications expect
2457         the runtime to clear this region. 
2458
2459         Fixes #79944.
2460
2461         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2462         Clear the error before returning to unmanaged code to prevent the
2463         runtime from being confused later on (fixes  80420).
2464         (ves_icall_type_from_name): Always call mono_loader_clear_error
2465         after parsing a type that could have failed.
2466         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
2467
2468         * loader.c (mono_loader_clear_error): Fix indentation.
2469
2470 2006-12-28  Martin Baulig  <martin@ximian.com>
2471
2472         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
2473
2474 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
2475
2476         * reflection.c: patch from Rolf Bjarne Kvinge to fix
2477         getting a token for an EnumBuilder.
2478
2479 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
2480
2481         * reflection.c: be more careful in case resource generation
2482         fails to create the data array.
2483
2484 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
2485
2486         * sgen-gc.c: write barrier for clone and fix unregister handles.
2487
2488 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
2489
2490         * reflection.c: some fixes needed in the generics code for the moving GC.
2491
2492 2006-12-22  Robert Jordan  <robertj@gmx.net>
2493
2494         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
2495         account. Fixes bug #80299.
2496
2497 2006-12-21  Raja R Harinath  <rharinath@novell.com>
2498
2499         Fix WaitHandle usage in delegates.
2500         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
2501         * object.c (mono_wait_handle_new): Use the property set method to
2502         initialize the handle.
2503         (mono_wait_handle_get_handle): New.
2504         * threadpool.c (mono_async_invoke): Use it.
2505         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
2506         Likewise.
2507         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
2508
2509 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
2510
2511         * marshal.c (emit_marshal): Call emit_marshal_variant and
2512         emit_marshal_com_interface when applicable.
2513         (emit_marshal_variant, emit_marshal_com_interface): Add
2514         methods for this case and remove if's from emit_marshal_object.
2515         
2516 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
2517
2518         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
2519
2520 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
2521
2522         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
2523         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
2524         and GlobalFree on Windows. Remove FIXME.
2525
2526 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2527
2528         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
2529         implementation for managed objects.
2530
2531 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
2532
2533         * object.c: implemented code to be used for checking
2534         that no reference field overlaps with non-references.
2535
2536 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2537
2538         * threadpool.c: fix queue code to be compatible with the
2539         moving GC.
2540
2541 2006-12-18  Miguel de Icaza  <miguel@novell.com>
2542
2543         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
2544         in structures by throwing ArgumentNullException.
2545
2546         (emit_marshal_safehandle): Also when they are null parameters.
2547
2548         (emit_marshal_safehandle): Add support for ref
2549         SafeHandles parameters
2550
2551 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2552
2553         * profiler.c: updated to use the mono-dl API instead of
2554         gmodule.
2555
2556 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2557
2558         * profiler.c: updated to use the mono-dl dynamic loading
2559         API instead of gmodule.
2560
2561 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
2562
2563         * profiler.c: use readlink, older versions of glib don't have
2564         g_file_read_link ().
2565
2566 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2567
2568         * profiler.c: try to detect the path to mono if libc fails to provide
2569         a useful name (bug #80286).
2570
2571 2006-12-16  Raja R Harinath  <rharinath@novell.com>
2572
2573         Fix #80242
2574         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
2575         instance, use the generic type definition instead.
2576         (ves_icall_Type_GetNestedTypes): Likewise.
2577         * class.c (mono_class_create_generic): Always set the
2578         nested_classes of a generic instance to NULL, even if the generic
2579         type definition has nested types.
2580
2581 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
2582
2583         * marshal.c (mono_string_from_bstr): Revert previous Windows change
2584         and fix on Linux.
2585         
2586 2006-12-15  Miguel de Icaza  <miguel@novell.com>
2587
2588         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
2589         my arguments were in the wrong order.   I also fixed the Windows
2590         version which seems to have had the same issue.
2591
2592         (mono_free_bstr): On Unix, this is g_free.
2593         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
2594         conversions (for the tests in corlib to pass).
2595
2596 2006-12-14  Miguel de Icaza  <miguel@novell.com>
2597
2598         * marshal.c (emit_ptr_to_object_conv): For now, ignore
2599         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
2600         exception if a ref SafeHandle in a struct has changed).
2601         
2602         (emit_struct_conv): Do not perform layout checks for classes
2603         derived from SafeHandle, as those are specially handled. 
2604
2605         (emit_object_to_ptr_conv): Add support for
2606         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
2607
2608         (emit_marshal_safehandle): Implement conversion of return values
2609         of safehandles (MARSHAL_ACTION_CONV_RESULT).
2610         
2611         * threads.c: WaitHandle now is compiled with two different handles
2612         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
2613         for 2.0.
2614         
2615         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
2616         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
2617         these routines to cope with both kinds of fields.
2618
2619 2006-12-12  Miguel de Icaza  <miguel@novell.com>
2620
2621         * metadata.c (mono_type_to_unmanaged): Handle the case where
2622         type->data.klass is a SafeHandle, and in that case, return the
2623         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
2624         MONO_MARSHAL_CONV_SAFEHANDLE. 
2625
2626 2006-12-11  Miguel de Icaza  <miguel@novell.com>
2627
2628         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
2629         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
2630         calling emit_marshal_object.
2631
2632         (emit_marshal_safehandle): Implement marshalling of
2633         SafeHandle parameters (no ref support yet).
2634
2635         (MarshalAction): Document the defines as I implement
2636         them for SafeHandle.
2637
2638         (emit_marshal_object): indentation police.
2639
2640         * class-internals.h: Define MonoSafeHandle.
2641         Add safehandle_class to MonoDefaults type.
2642
2643         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
2644         list of classes to check for fields. 
2645
2646         * domain.c (mono_init_internal): Add SafeHandle to the list of
2647         mono_defaults loaded.
2648
2649 2006-12-15  Raja R Harinath  <rharinath@novell.com>
2650
2651         Fix #80253
2652         * reflection.c (mono_reflection_bind_generic_parameters): If the
2653         generic type definition is a type builder, ensure that it is fully
2654         initialized before instantiating it.  Kill some dead code.
2655
2656 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
2657
2658         * object.c: clear the loader_error () before loading
2659         more metadata stuff (bug #80258).
2660
2661 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
2662
2663         * icall.c, icall-defs.h: type modifiers icalls for
2664         parameters and properties.
2665
2666 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
2667
2668         * object.c, icall.c: fixed warnings.
2669
2670 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
2671
2672         * marshal.c: fixed a couple of leaks and coding style in a few places.
2673
2674 2006-12-08  Dick Porter  <dick@ximian.com>
2675
2676         * process.c: Cope with NULL ProcessStartInfo arguments on windows
2677         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
2678         80173.
2679
2680 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
2681
2682         * process.c: ProcessStartInfo may have only filename set and
2683         arguments can be NULL.
2684
2685 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2686
2687         * icall.c: fix leak found by Robert Jordan.
2688
2689 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
2690
2691         * marshal.c, marshal.h: generate managed method to access an element
2692         of a multi-dimensional array.
2693
2694 2006-11-30  Paolo Molaro (lupus@ximian.com)
2695
2696         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
2697
2698 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2699
2700         * icall.c: back out GetFields () fix until the serialization code is
2701         fixed to not depend on the incorrect behaviour.
2702
2703 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
2704
2705         * profiler.c: provide defaults if none are set.
2706
2707 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
2708
2709         * Makefile.am, attrdefs.h: new public header file with
2710         constants for attributes for use by embedders.
2711
2712 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
2713
2714         * icall.c: GetFields () fix for bug #80064.
2715
2716 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
2717
2718         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
2719         removed long unused icalls.
2720
2721 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
2722   
2723         * marshal.c: 
2724                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
2725                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
2726                 can be generated without a delegate class.
2727                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
2728         
2729         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
2730
2731 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2732
2733         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
2734         #80069.
2735
2736 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2737
2738         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
2739         icall-def.h: added icalls needed by System.GC.
2740
2741 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
2742
2743         * loader.c: ensure the class in catch clauses is handled
2744         correctly for generics methods (fixes bug#79980).
2745
2746 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
2747
2748         * monitor.h, monitor.c: added mono_locks_dump () function
2749         to help debug deadlocks involving managed locks.
2750
2751 2006-11-13  Dick Porter  <dick@ximian.com>
2752
2753         * file-io.c (get_file_attributes): If the file is a symlink try
2754         and get the stat data for the target, but also add the
2755         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
2756         the specs for the windows symlink support, but will probably have
2757         to be reworked when I have test data from a vista machine.  Fixes
2758         bug 79887.
2759
2760 2006-11-13  Dick Porter  <dick@ximian.com>
2761
2762         * gc.c (mono_domain_finalize): 
2763         * marshal.c (mono_delegate_begin_invoke): 
2764         * threadpool.c (socket_io_init, mono_thread_pool_init)
2765         (mono_thread_pool_finish): 
2766         * monitor.c (mono_monitor_try_enter_internal): 
2767         * threads.c (mono_thread_resume, mono_thread_init)
2768         (mono_thread_suspend_all_other_threads)
2769         (mono_thread_execute_interruption): 
2770         * appdomain.c (mono_domain_unload): Check for NULL error returns
2771         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
2772         75733.
2773
2774 2006-11-11  Miguel de Icaza  <miguel@novell.com>
2775
2776         * process.c
2777         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
2778         Only close the handle if the value of the handle is not
2779         INVALID_HANDLE_VALUE.  This just makes the process a bit more
2780         robust.
2781
2782         Improvement for #75733, so that we do not run into this problem. 
2783
2784         
2785         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
2786         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
2787         internal variables.  Fixes #79462 
2788         
2789
2790 2006-11-09  Dick Porter  <dick@ximian.com>
2791
2792         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
2793         Use poll() not select().  Fixes bug 79397.
2794
2795 2006-11-09  Raja R Harinath  <rharinath@novell.com>
2796
2797         Fix #79872
2798         * assembly.c (mono_assembly_load_from_full): Check that the given
2799         image has an assembly manifest.
2800
2801 2006-11-09  Ankit Jain  <jankit@novell.com>
2802
2803         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
2804         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
2805         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
2806
2807 2006-11-07  Dick Porter  <dick@ximian.com>
2808
2809         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
2810         Put the old resolver behaviour back for pre-2.0 profiles.
2811
2812 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2813
2814         * threadpool.c: precise GC and locking fixes.
2815
2816 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
2817
2818         * class.c: don't load types that have an explicit unaligned
2819         managed reference. Provide better info in the TypeLoad exception.
2820         Part of the fix for bug #79744.
2821         * object.c: use the correct check for class type load issues.
2822
2823 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2824
2825         * class.c: enforce alignment of fields with managed references
2826         even when Pack=1 is forced by the user (bug #77788).
2827
2828 2006-11-03  Dick Porter  <dick@ximian.com>
2829
2830         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
2831         If the address reverse lookup fails, return it as the hostname
2832         anyway.  Fixes bug 79721.
2833
2834 2006-11-03  Dick Porter  <dick@ximian.com>
2835
2836         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
2837         Fix build on Windows.
2838
2839 2006-11-02  Dick Porter  <dick@ximian.com>
2840
2841         * icall-def.h: 
2842         * object-internals.h: 
2843         * exception.c (mono_get_exception_thread_interrupted): 
2844         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
2845         Fixes bug 74525.
2846
2847         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
2848         Check for pending Thread.Interrupt.
2849
2850 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
2851         * loader.c: Fixed bug 79684.
2852
2853 2006-10-27  Dick Porter  <dick@ximian.com>
2854
2855         * file-io.c (get_file_attributes): Force symlinks to directories
2856         to be returned as a regular file.  Fixes bug 79733.
2857 2006-10-26  Dick Porter  <dick@ximian.com>
2858
2859         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
2860         CreateFile to open a directory then we need to set the
2861         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
2862
2863 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
2864
2865         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
2866         friends.
2867
2868 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
2869
2870         * sgengc.c: small cleanup of timer code.
2871
2872 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
2873
2874         * sgen-gc.c: fix some warnings and start adding support for
2875         complete object removal on domain unload.
2876
2877 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
2878
2879         * assembly.c: build_assembly_name should not consider a version
2880         number without build or revision number invalid. Fixes bug #79715.
2881
2882 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
2883
2884         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
2885         call kernel32 function OutputDebugString directly.
2886         
2887         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
2888         
2889 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
2890
2891         * reflection.c: small cleanup, using a function to insert a MonoString
2892         in the string heap.
2893
2894 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
2895
2896         * reflection.c: moving GC fixes.
2897
2898 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
2899
2900         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
2901         all the objects with finalizers belonging to an unloading appdomain.
2902
2903 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
2904
2905         * sgen-gc.c: added ability to allocate even when the nursery is fully
2906         pinned and fixed a couple of bugs.
2907
2908 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
2909
2910         * threads.h: Revert the last change for now.
2911
2912         * threads.h (mono_thread_get_pending_exception): Rename this to
2913         mono_thread_get_undeniable_exception ().
2914
2915 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
2916
2917         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
2918         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
2919         when fname does not refer to valid assembly. This result in a more
2920         meaningful error message.
2921         * exception.c: added mono_get_exception_bad_image_format2 which 
2922         constructs a BadImageFormatException using the ctor taking a custom
2923         message and the file name. Passing in a NULL msg results in a default
2924         message.
2925         * exception.h: define mono_get_exception_bad_image_format2 function.
2926         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
2927         when file name pointed to an invalid IL image. Use 
2928         mono_get_exception_file_not_found2 to construct FileNotFoundException,
2929         as this results in a more meaningful error message.
2930
2931 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
2932
2933         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
2934         #79465.
2935
2936 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
2937
2938         * metadata.c (mono_type_size): Change the align parameter to guint32 for
2939         consistency with the other _size functions.
2940         (mono_type_stack_size): Ditto.
2941
2942         * class.c object.c icall.c: Fix warnings caused by the above change.
2943
2944         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
2945
2946         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
2947
2948         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
2949
2950 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
2951
2952         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
2953         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
2954         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
2955         threadpool.h, threads-types.h: mark more internal functions.
2956
2957 2006-10-11  Dick Porter  <dick@ximian.com>
2958
2959         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
2960         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
2961         reproduce the bug even before applying the fix.)
2962
2963 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
2964
2965         * reflection.c: allow retrieving attributes for arguments in generic
2966         methods (bug #79241).
2967
2968 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
2969
2970         * debug-mono-symfile.c: properly check fopen () result (found by
2971         coverity).
2972
2973 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
2974
2975         * reflection.c: make error message clearer and fixed two
2976         issuelets found by Coverity.
2977
2978 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
2979
2980         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
2981
2982 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
2983
2984         * object-internals.h, gc-internal.h, profiler-private.h:
2985         mark internal functions.
2986
2987 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
2988
2989         * reflection.c: put data in the text section.
2990         * icall.c: recognize more types in type_from_typename ().
2991         * process.c, marshal.c: added some GC FIXMEs.
2992
2993 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
2994
2995         * loader.c: check for NULL before initializing.
2996
2997 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
2998
2999         * gc.c (finalizer_thread): Use a non-alertable wait here.
3000
3001         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
3002         until the correct solution is found.
3003
3004 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
3005
3006         * reflection.c (mono_module_get_object): Avoid an assert when operating on
3007         modules with no metadata. Fixes #79596.
3008
3009         * image.c (load_metadata_ptrs): Put back the error message when
3010         the #- heap is encountered since the support is not complete yet.
3011
3012 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
3013
3014         * gc.c: do not allow the user to SuppressFinalize () a
3015         delegate because it would leak the trampoline if present.
3016
3017 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
3018
3019         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
3020         PropertyPtr table.
3021
3022 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
3023
3024         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
3025
3026         * metadata.c (mono_metadata_get_param_attrs): Ditto.
3027
3028         * row-indexes.h: Add definitions for *Ptr tables.
3029
3030         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
3031
3032         * metadata.c (mono_metadata_translate_token_index): New helper function to
3033         translate table indexes used in uncompressed metadata.
3034         (mono_metadata_decode_table_row): Ditto.
3035         (mono_metadata_decode_table_row_col): Ditto.
3036
3037         * metadata.c: Add table schema for *Ptr tables.
3038
3039         * class.c loader.c: Use the new helper function to access the affected metadata
3040         tables.
3041         
3042         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
3043         #38532.
3044         
3045 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
3046
3047         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
3048         sequences which can be unbounded in size. Fixes #79583.
3049
3050 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
3051
3052         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
3053         static initialization.
3054
3055         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
3056
3057         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
3058
3059         * domain.c (mono_domain_free): Free up type_init_exception_hash.
3060
3061         * object.c (mono_runtime_class_init): Implement correct semantics when a static
3062         ctor fails, i.e. throw the same exception on subsequent accesses.
3063         
3064 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
3065
3066         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
3067         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
3068         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
3069         Handle marshalling of interfaces and VARIANTs contained in structs.
3070         
3071         Code is contributed under MIT/X11 license.
3072         
3073 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
3074
3075         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
3076         
3077         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
3078         mempool.
3079
3080 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3081
3082         * console-io.c: ignore previous SIGINT handler.
3083
3084 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
3085
3086         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
3087         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
3088         #79460, #79461, #79485.
3089
3090         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
3091
3092         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
3093         #79217.
3094
3095 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
3096
3097         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
3098         could be generated from it.
3099
3100 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
3101
3102         * rand.c: fix read loop to correctly handle EINTR.
3103
3104 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
3105
3106         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
3107         internal calls are defined to keep methods closer to the declaring
3108         type and allow a significant reduction in runtime relocations and
3109         memory usage.
3110
3111 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
3112
3113         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
3114         exception message to have FileNotFoundException use the default
3115         assembly load error message. Fixes bug #79426.
3116         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
3117
3118 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3119
3120         * threadpool.c: (start_thread_or_queue) use the root domain when
3121         creating the thread instead of the async object one.
3122
3123 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
3124
3125         * class.c, object.c, class-internals.h, reflection.c:
3126         for arrays, store element_size inside MonoClass (speedup
3127         for array object creation).
3128
3129 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
3130
3131         * icall.c: fixed CodeBase to use the file name and not the module
3132         name (bug #79365).
3133
3134 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
3135
3136         * mono-debug.c, mono-debug.h: export find_method as
3137         mono_debug_find_method ().
3138
3139 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
3140
3141         * debug-helpers.c, class-internals.h: added a few functions useful
3142         when debugging under gdb.
3143
3144 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3145
3146         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
3147         characters that need special handling.
3148
3149 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
3150
3151         * mono-config.c: make the os/cpu specification more flexible,
3152         allowing lists and negation.
3153
3154 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
3155
3156         * marshal.c: COM Interop fixes. Handle case where method->klass.
3157         is interface. Handle BSTR/MonoString when null. Use CDECL as 
3158         calling convention on non-windows platforms. This is for
3159         compatibility with XPCOM and MainWin COM.
3160         
3161         Code is contributed under MIT/X11 license.
3162         
3163
3164 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
3165
3166         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
3167         correctly. Fixes #79217.
3168
3169         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
3170
3171 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
3172
3173         * mono-config.c: allow both an os and cpu attribute for dllmap
3174         and dllentry elemnets to enable a single config file to be used
3175         for multiple architectures.
3176
3177 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
3178
3179         * loader.c: MonoLoaderError was cleared too soon on load failure.
3180         Fixes bug #79424.
3181
3182 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
3183
3184         * icall.c: use the defining class vtable when accessing a
3185         static field, not a pobblibly derived class.
3186
3187 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
3188
3189         * icall.c string-icalls.c: Remove references to unicode.h.
3190
3191         * unicode.h unicode.c Makefile.am: Remove these unused source files.
3192
3193         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
3194
3195         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
3196         indicating the image where custom marshaller types should be looked up.
3197         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
3198         custom marshallers, instead of corlib. Fixes #79425.
3199
3200 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
3201
3202         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
3203
3204 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
3205
3206         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
3207         Implement Environment.ProcessorCount.
3208         
3209         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
3210         Implement Environment.ProcessorCount.
3211         
3212         * icall.c: 
3213         Add Environment.ProcessorCount icall.
3214         
3215         Patch by Jason McFall.
3216
3217 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3218
3219         * assembly.c: don't append .exe/.dll when the filename already contains
3220         one of those extensions.
3221
3222 2006-09-12  Martin Baulig  <martin@ximian.com>
3223
3224         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
3225         to array interfaces.
3226
3227 2006-09-11  Martin Baulig  <martin@ximian.com>
3228
3229         * reflection.c (mono_image_build_metadata): Create the
3230         MethodImpl's after emitting all types and methods, so we don't
3231         need another fixup pass for them.
3232
3233 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
3234
3235         * class.c (mono_class_from_name_case): Fix regression introduced by the last
3236         change.
3237
3238 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
3239
3240         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
3241         unload.
3242
3243 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
3244
3245         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
3246         args is not set. Fixes #78926.
3247
3248 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
3249
3250         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
3251
3252         * image.c (load_class_names): Move this to class.c, and rename it to 
3253         'mono_image_init_name_cache'.
3254         (load_modules): Fix a warning.
3255
3256         * class.c icall.c image.c: Initialize image->name_cache lazily.
3257
3258         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
3259         on its name using information in the AOT file.
3260
3261         * class.c (mono_class_from_name): Use the new hook function.
3262
3263 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
3264
3265         * reflection.c (mono_param_get_objects): Handle enum default parameter values
3266         correctly.
3267
3268         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
3269         Fixes #79289.
3270         
3271 2006-09-06  Martin Baulig  <martin@ximian.com>
3272
3273         * icall.c (mono_lookup_internal_call): Small fix.
3274
3275 2006-09-05  Raja R Harinath  <rharinath@novell.com>
3276
3277         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
3278         double g_free.
3279
3280 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
3281
3282         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
3283         when --debug is specified.
3284
3285 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
3286
3287         * class.c (setup_generic_array_ifaces): Fix a warning.
3288
3289 2006-09-04  Miguel de Icaza  <miguel@novell.com>
3290
3291         * Temporarily remove the patch to assemly.c that checks the
3292         assembly versions as it breaks our gacutil.
3293
3294 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
3295
3296         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
3297
3298         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
3299         a net 1.0 runtime.
3300
3301         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
3302         created using the default ctor. Fixes #79152.
3303         (mono_string_builder_to_utf16): Ditto.
3304
3305 2006-09-01  Martin Baulig  <martin@ximian.com>
3306
3307         Fix handling of the generic array interfaces.
3308
3309         * class-internals.h
3310         (MonoDefaults): Removed `generic_array_class' and added
3311         `generic_ilist' class.
3312
3313         * class.c
3314         (mono_bounded_array_class_get): Add the new generic array interfaces.
3315         (setup_generic_array_ifaces): New static method; create vtable
3316         entries for each method in the generic array interfaces.
3317
3318         * metadata.c
3319         (select_container): Allow "parent-less" generic methods.
3320
3321         * marshal.c
3322         (mono_marshal_get_generic_array_helper): New public method.
3323
3324         * icall.c
3325         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
3326         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
3327         moved the interncall into System.Array.
3328
3329 2006-09-01  Raja R Harinath  <rharinath@novell.com>
3330
3331         A few more cases of avoiding work on types with ->byref set.
3332         Has the real fix for #79238
3333         * icall.c (is_generic_parameter): New helper.
3334         (ves_icall_Type_GetGenericParameterPosition): Use it.
3335         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
3336         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
3337         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
3338         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
3339         reference types.
3340         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
3341         reference types.
3342         (ves_icall_Type_get_IsGenericInstance): Likewise.
3343         (ves_icall_Type_get_IsGenericType): Likewise.
3344
3345 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
3346
3347         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
3348         class if possible.
3349
3350         * mempool.h (mono_mempool_get_allocated): New helper function.
3351
3352         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
3353         change.
3354
3355         * mempool.c: Fix warnings and the calculation of stats.
3356
3357         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
3358
3359         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
3360
3361         * loader.c (mono_get_method_from_token): Update method_count stat.
3362
3363         * class-internals.h (MonoStats): Add some stats.
3364
3365 2006-08-31 Robert Jordan  <robertj@gmx.net>
3366
3367         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
3368         with managed variants.
3369         All code is contributed under the MIT/X11 license.
3370         
3371 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
3372
3373         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
3374         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
3375
3376         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
3377
3378         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
3379         with cycles in classes.
3380
3381         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
3382
3383         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
3384         missing a [MarshalAs] directive. Fixes #79203.
3385
3386         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
3387         klass->marshal_info. Fixes #79217.
3388
3389 2006-08-30  Martin Baulig  <martin@ximian.com>
3390
3391         Committing a patch from Joachim Ante <joe@otee.dk>:
3392         Add support for binary data symbol stores.
3393
3394         * debug-mono-symfile.c
3395         (mono_debug_open_mono_symbol_file): Renamed into
3396         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
3397         arguments.
3398
3399         * mono-debug.c
3400         (mono_debug_open_image): Added `raw_contents' and `size' args.
3401         (mono_debug_init_2_memory): New public function.
3402
3403 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
3404
3405         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
3406
3407 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3408
3409         * appdomain.c: implement support for ShadowCopyFiles.
3410
3411 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
3412
3413         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
3414         when value is NULL (and should remove CID #51).
3415
3416 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3417
3418         * image.c: moved 2 functions to ../utils.
3419
3420 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
3421
3422         * gc.c: cope with the target object of a GC handle being NULL
3423         (bug #78877).
3424
3425 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
3426
3427         * class.c: recursively check parent's explicit implementations
3428         of interface methods (fixes bug #79125).
3429
3430 2006-08-19  Miguel de Icaza  <miguel@novell.com>
3431
3432         * filewatcher.c: Avoid warnings when building, do not redefine
3433         constants that are defined.
3434
3435         Remove warnings.
3436
3437 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3438
3439         * image.c: don't fail when the link points to an absolute path.
3440
3441 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
3442
3443         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
3444         Fix CID #3.
3445
3446 2006-08-17  Miguel de Icaza  <miguel@novell.com>
3447
3448         * image.c (full_path): A new method used to obtain the actual path
3449         of an assembly even in the presence of symbolic links.  
3450
3451         This is necessary for the case where we are running a binary that
3452         has been GACed, but we are using the "published" path name
3453         ($prefix/mono/1.0/blah.exe) which happens to point to the real
3454         file in the GAC.
3455
3456         This was the source of the failure for the `xsp' command with the
3457         recent AppDomain changes, as far as the runtime was concerned,
3458         there were two different assemblies: $prefix/mono/1.0/blah.exe and
3459         $prefix/mono/gac/blah/version/blah.exe.
3460
3461         (do_mono_image_open): use full path
3462
3463 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
3464
3465         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
3466
3467 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
3468
3469         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
3470         domain_id is supplied. Fix CID #241 and corlib's unit tests.
3471
3472 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
3473
3474         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
3475         small structures. Fixes #78990.
3476
3477 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
3478
3479         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
3480
3481         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
3482
3483 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3484
3485         * appdomain.c:
3486         * marshal.c: don't load all the assemblies from a domain into newly
3487         created ones. The new domains might have different rules and load
3488         assemblies from different locations. Fixes bug #76757.
3489
3490         Patch by Lluis. Conflicts resolved by Brian Crowell.
3491
3492 2006-08-16  Alp Toker  <alp@atoker.com>
3493
3494         * socket-io.c: First half of the fix for #79084.
3495         Set sa_size to the length of the content, not that of the struct.
3496         Don't add NULL suffix to the content, this should be done in
3497         managed code if needed.
3498
3499 2006-08-14  Raja R Harinath  <rharinath@novell.com>
3500
3501         Fix part of #79012
3502         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
3503         mono_metadata_parse_type returns NULL.
3504
3505 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
3506
3507         * normalization-tables.h : new file for string normalization data.
3508         * locales.c, locales.h, icall.c :
3509           added load_normalization_resource() for string normalization,
3510           and icall as well.
3511         * Makefile.am : added normalization-tables.h to the sources.
3512
3513 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
3514
3515         * marshal.c: Add more helper functions to reduce code duplication and use them
3516         everywhere.
3517
3518 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
3519
3520         * marshal.c: Fix non-x86 stdcall warnings.
3521         
3522         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
3523         them everywhere.
3524
3525 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
3526
3527         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
3528         type check on multi-dimensional arrays. Fixes #79000.
3529
3530 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
3531
3532         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
3533         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
3534         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
3535         * class-internals.h: add is_com_object to class structure.
3536         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
3537         null checks to COM object marshalling. Fix .ctor call on RCW.
3538         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
3539         
3540         All code is contributed under the MIT/X11 license.
3541
3542 2006-08-09  Dick Porter  <dick@ximian.com>
3543
3544         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
3545         racing mono_monitor_allocator_lock() somewhere, so don't delete
3546         the critical section for now.  Found by running and exiting
3547         monodevelop.
3548
3549 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
3550
3551         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
3552         (ves_icall_System_ComObject_FindInterface): Ditto.
3553         (ves_icall_System_ComObject_CacheInterface): Ditto.
3554
3555         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
3556         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
3557
3558 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3559
3560         * threadpool.c: treat pipes from process asynchronous reads as sockets
3561         when reading from them, so we get select/poll or epoll to wait for
3562         data.
3563
3564 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
3565
3566         * loader.c: Fix a typo (CID #233) in the null check.
3567
3568 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
3569
3570         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
3571         Hopefully fixes #78949.
3572         
3573         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
3574         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
3575         bytes. Fixes #78972.
3576
3577 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3578
3579         * filewatcher.c: we need to set errno here.
3580
3581 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3582
3583         * filewatcher.c: let Win32Exception get the error value.
3584
3585 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3586
3587         * filewatcher.c: translate errno into win32 errors for Win32Exception
3588         to know what happened.
3589
3590 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
3591
3592         * threadpool.c: Fix more warnings.
3593
3594         * assembly.c (search_loaded): Fix warnings.
3595
3596         * threadpool.c (mono_thread_pool_finish): Fix warnings.
3597         (mono_async_invoke): Ditto.
3598
3599 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
3600
3601         * object.c (mono_remote_class_vtable): Need to create proxy vtable
3602         entries for __ComObject type in addition to ComImport types.
3603         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
3604         about hash table.
3605         
3606         All code is contributed under the MIT/X11 license.
3607
3608 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
3609
3610         * image.c: avoid tentative loading of modulerefs that contain
3611         no metadata (P/Invoke library names).
3612
3613 2006-07-28  Dick Porter  <dick@ximian.com>
3614
3615         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
3616         mono_loader_lock() somewhere, so don't delete the critical section
3617         for now.  Found by running and exiting monodevelop.
3618
3619 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3620
3621         * filewatcher.c: define the inotify syscalls when we're building on
3622         linux and have sys/syscall.h. The build system might not have support
3623         for inotify but the target system might have it.
3624
3625 2006-07-26  Miguel de Icaza  <miguel@novell.com>
3626
3627         * domain.c: Documentation updates.
3628
3629         * loader.c (mono_free_method): Do not release the method
3630         information if we are being profiled, as profilers will use this
3631         information at shut down to present some data to the user.
3632
3633         This is needed so that the profiler does not crash, as the
3634         profiler tends to keep MonoMethods around, and they might become
3635         invalid if we free these.
3636
3637         (mono_get_method_constrained): Return the original CIL stream
3638         method as well, so verification can be performed against it.
3639
3640 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3641
3642         * filewatcher.[ch]: support for inotify file system watcher.
3643         * icall.c: add new internal calls for the inotify file system watcher.
3644
3645 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3646
3647         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
3648         #78888.
3649
3650 2006-07-20  Dick Porter  <dick@ximian.com>
3651
3652         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
3653         warning.
3654
3655 2006-07-20  Dick Porter  <dick@ximian.com>
3656
3657         * threads.c (start_wrapper): Do the thread cleanup while we still
3658         hold a reference to its object.  Fixes bug 78123.
3659
3660 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
3661
3662         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
3663         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
3664           "managed-to-managed".
3665         * icall.c: Redirect string constructors that take sbyte* to
3666           ves_icall_System_String_ctor_RedirectToCreateString.
3667         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
3668           to CreateString () methods with matching signature.
3669         * reflection.c: Use original security informations for
3670           MONO_WRAPPER_MANAGED_TO_MANAGED.
3671         * security-manager.c: Use original security informations for
3672           MONO_WRAPPER_MANAGED_TO_MANAGED.
3673         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
3674           that is a placeholder and only its address should be used.
3675         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
3676           that is a placeholder and only its address should be used.
3677
3678 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
3679
3680         Begin implementing COM Interop.
3681         * appdomain.c: Increment corlib version.
3682         * class.c: Set ComImport classes' parent to __ComObject.
3683         * loader.c: Mark cominterop methods as such.
3684         * domain.c: Add __ComObject class to MonoDefaults structure.
3685         * image.c: Add 2 hashtables to the image for COM Interop related methods
3686         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
3687         using the mempool allocator
3688         
3689         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
3690         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
3691         declaration for mono_metadata_type_dup_mp.
3692         
3693         * debug-helpers.c: Added strings for two additional wrapper types
3694         * object.c: Create proxy objects for ComImport classes
3695         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
3696         and added __ComObject class to MonoDefaults structure.
3697         
3698         * object-internals.h: Finish MonoRealProxy definition, and add definition of
3699         MonoComInteropProxy and MonoComObject.
3700         
3701         * marshal.c: Added support for COM Interop
3702         (signature_cominterop): Converts managed signature to corresponding
3703         unmanaged COM signature.
3704         (cominterop_get_function_pointer): gets unmanaged function pointer via
3705         COM object vtable
3706         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
3707         (cominterop_get_method_interface): returns interface type that method is defined on
3708         (mono_mb_emit_cominterop_call): emits native call to function pointer
3709         gotten from vtable
3710         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
3711         that matches signature of unmanaged function.
3712         (cominterop_get_native_wrapper): wrapper around adjusted method call.
3713         (cominterop_get_invoke): forwards call from proxy to __ComObject
3714         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
3715         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
3716         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
3717         
3718         * marshal.h: Added Marshal icall declarations.
3719         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
3720         so we can access them in finalizer
3721         
3722 2006-07-14  Dick Porter  <dick@ximian.com>
3723
3724         * object.c (mono_type_initialization_cleanup): Fix a race
3725         condition by temporarily commenting out the critical section
3726         deletion.
3727
3728 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
3729
3730         * reflection.c (create_custom_attr): Fix some warnings.
3731         (create_custom_attr_data): Ditto.
3732         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
3733         types. Fixes #78855.
3734
3735 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
3736
3737         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
3738
3739         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
3740
3741 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
3742
3743         * reflection.c (resolve_object): Add support for DynamicMethod.
3744
3745         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
3746         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
3747
3748 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
3749
3750         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
3751         don't leak GPtrArray's pdata has we have no use (nor free) for it.
3752
3753 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
3754
3755         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
3756         Fixes #77888.
3757
3758 2006-06-30  Raja R Harinath  <rharinath@novell.com>
3759
3760         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
3761         slightly: remove a shadow local variable.
3762
3763 2006-06-29  Raja R Harinath  <rharinath@novell.com>
3764
3765         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
3766         definition that introduces the virtual function slot.
3767         Also fix Coverity #105.
3768
3769 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
3770
3771         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
3772         for dynamic assemblies. Fixes #78724.
3773
3774 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
3775
3776         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
3777         Fixes #78722.
3778
3779 2006-06-21  Martin Baulig  <martin@ximian.com>
3780
3781         * reflection.c
3782         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
3783         fixes #76484.
3784
3785 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
3786
3787         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
3788
3789 2006-06-20  Raja R Harinath  <rharinath@novell.com>
3790
3791         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
3792         nor TYPEREFs.
3793         * class.c (mono_class_create_from_typespec): Add 'context' argument.
3794         Inflate result if necessary.
3795         (mono_class_get_full): Remove old version.  Rename from
3796         'mono_class_get' and add 'context' argument.  Pass it to
3797         ..._create_from_typespec.
3798         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
3799         (mono_ldtoken): Revert change below.
3800
3801 2006-06-20  Martin Baulig  <martin@ximian.com>
3802
3803         * class.c (mono_ldtoken): Don't pass the generic context to
3804         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
3805
3806 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
3807
3808         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
3809         and later freeing it. Fixes #78638.
3810
3811 2006-06-15  Miguel de Icaza  <miguel@novell.com>
3812
3813         * icall.c (mono_class_get_throw): Revert over-zealous error
3814         throwing, the caller for mono_class_get_throw will cope with
3815         errors when classes are not properly initialized already.
3816
3817         The code still copes with loader exceptions though.
3818
3819         Fixes the regression in reftype1 and reftype3 from the CAS tests.
3820         
3821 2006-06-14  Miguel de Icaza  <miguel@novell.com>
3822
3823         Fixes the `make run1' version of RuntimeAbort (to be commited,
3824         source is in Bugzilla).
3825         
3826         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
3827         FALSE on class loading failure instead of returning true.
3828
3829         * class.c (mono_class_create_from_typedef): It is possible for
3830         mono_metadata_interfaces_from_typedef_full to fail if a class is
3831         not found, cope with this.
3832         
3833
3834 2006-06-14  Dick Porter  <dick@ximian.com>
3835
3836         * socket-io.c: 
3837         * process.c: Fix a bunch of signed/unsigned warnings from gcc
3838         4.1.1
3839
3840 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
3841
3842         * culture-info-table.h : oops, forgot to make it nsync with r61548.
3843
3844 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
3845
3846         * icall.c: Another fix for building mono in Visual Studio.
3847
3848 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
3849
3850         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
3851         
3852 2006-06-09  Martin Baulig  <martin@ximian.com>
3853
3854         * debug-mono-symfile.c: Put this back and really fix it this
3855         time. Sorry for all the trouble.
3856
3857 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
3858
3859         * icall.c (mono_class_get_throw): Fix a warning.
3860         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
3861         ReflectionTypeLoadException if needed. Fixes #78606.
3862
3863         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
3864         (mono_class_init): Ditto.
3865
3866         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
3867         ref_only exceptions.
3868         (mono_loader_clear_error): Make this work even if there is no error.
3869
3870 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
3871
3872         * object-internals.h marshal.c marshal.h icall.c: Implement method 
3873         Marshal.GetComSlotForMethodInfo using internal call.
3874
3875 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
3876
3877         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
3878         a function for signalling it.
3879
3880         * class.c (mono_class_from_typeref): Use the new kind of loader error when
3881         a referenced assembly is not found.
3882
3883         * loader.c (mono_loader_error_prepare_exception): Add support for 
3884         LOADER_ERROR_ASSEMBLY. Fix formatting.
3885
3886 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
3887
3888         * domain.c appdomain.c class-internals.h marshal.c: Add support 
3889         for VARIANT marshalling on windows and increment corlib version
3890         since Variant struct was added.
3891
3892 2006-06-03  Miguel de Icaza  <miguel@novell.com>
3893
3894         * debug-mono-symfile.c: Revert Martin's previous patch which broke
3895         stack trace line information:
3896
3897         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
3898         (Martin) when looking up B which is between A and C, return A not C.
3899
3900         Bug is #78573.
3901
3902         Thanks to Alexander Olk for tracking this down.
3903
3904 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
3905
3906         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
3907         
3908         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
3909         avoid clobbering its value.
3910         (mono_string_to_lpstr): Fix a warning on windows.
3911
3912 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
3913
3914         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
3915
3916         * reflection.c loader.c: Removed references to 'dummy' flag.
3917
3918         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
3919
3920         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
3921         it gets GC tracking.
3922
3923         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
3924         GC tracking.
3925         
3926         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
3927
3928         * marshal.c threadpool.c: Update callers of mono_async_result_new.
3929
3930         * appdomain.c: Bump corlib version.
3931
3932 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
3933
3934         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
3935         CEE_STIND_REF when working with object references.
3936
3937 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
3938
3939         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
3940         Fixes #78539.
3941
3942 2006-05-30  Miguel de Icaza  <miguel@novell.com>
3943
3944         * loader.c (method_from_memberref): Fix argument value for
3945         mono_loader_set_error_method_load (I was passing the MonoClass
3946         instead of the class name char *).
3947
3948 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
3949
3950         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
3951         CEE_STIND_REF when working with object references.
3952
3953 2006-05-30  Martin Baulig  <martin@ximian.com>
3954
3955         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
3956         mono_method_full_name() change and replace the ':' with a '.'
3957         here.
3958
3959 2006-05-30  Martin Baulig  <martin@ximian.com>
3960
3961         * debug-mono-symfile.c
3962         (mono_debug_symfile_lookup_location): Fix the algorithm:
3963         when looking up B which is between A and C, return A not C.
3964
3965 2006-05-29  Martin Baulig  <martin@ximian.com>
3966
3967         * mono-debug.h
3968         (MonoDebugMethodInfo): Make the typedef public.
3969         (MonoDebugSourceLocation): New public struct.
3970
3971         * mono-debug.c
3972         (mono_debug_source_location_from_address): Removed.
3973         (mono_debug_source_location_from_il_offset): Removed.
3974         (mono_debug_il_offset_from_address): Removed.
3975         (mono_debug_address_from_il_offset): Removed.
3976         (mono_debug_lookup_method): New public function.
3977         (mono_debug_lookup_source_location): New public function; replaces
3978         the old mono_debug_source_location_from_*() functions; see the
3979         inline documentation.
3980         (mono_debug_free_source_location): New public function.
3981         (mono_debug_print_stack_frame): New public function; see the
3982         inline documentation.
3983
3984         * debug-mono-symfile.c
3985         (mono_debug_find_source_location): Renamed into
3986         mono_debug_symfile_lookup_location(); only take a
3987         `MonoDebugMethodInfo *' and an `offset' argument; added inline
3988         documentation.
3989         (mono_debug_find_method): Renamed into
3990         mono_debug_symfile_lookup_method().
3991
3992 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
3993
3994         * assembly.c (mono_assembly_open_full): Dont overwrite the status
3995         returned by mono_image_open_full ().
3996
3997         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
3998         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
3999         #78517.
4000
4001         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
4002         #78518.
4003
4004 2006-05-27  Miguel de Icaza  <miguel@novell.com>
4005
4006         * class.c (mono_class_from_typeref): handle missing images
4007         earlier, deals with bug #78418.   Refactor code; 
4008
4009         Fix a warning introduced in my previous commit (some stale code
4010         from before I revisited my patch).
4011
4012         * class.c (mono_class_create_from_typedef): On failure, remove the
4013         class from the MonoImage->class_cache as the class is not
4014         initialized;   Fixes the leak pointed out by Paolo.
4015
4016 2006-05-25  Dick Porter  <dick@ximian.com>
4017
4018         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
4019         DeleteCriticalSections until I figure out which one may still be
4020         sometimes locked when mono_thread_cleanup is called.
4021
4022 2006-05-24  Dick Porter  <dick@ximian.com>
4023
4024         * threads.c (mono_thread_cleanup): Move the threading cleanup out
4025         of mono_thread_manage and back into its own function, so it can be
4026         called after the finalizer thread has finished.
4027
4028         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
4029
4030 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
4031
4032         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
4033         Fixes #78495.
4034
4035         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
4036         with non-blittable elements.
4037         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
4038
4039 2006-05-24  Martin Baulig  <martin@ximian.com>
4040
4041         * mono-debug-debugger.h (MonoDebuggerEvent): Added
4042         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
4043
4044         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
4045         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
4046         `mono_debugger_event_handler' to NULL.
4047
4048 2006-05-24  Martin Baulig  <martin@ximian.com>
4049
4050         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
4051
4052 2006-05-24  Martin Baulig  <martin@ximian.com>
4053
4054         * mono-debug-debugger.h
4055         (mono_debugger_create_notification_function): Added
4056         `MonoCodeManager *' argument.
4057
4058 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
4059
4060         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
4061
4062 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
4063
4064         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
4065         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
4066         implementation.
4067
4068 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
4069
4070         * icall.c: precise GC support: objects can't be stored in unmanaged
4071         memory anymore, even if they are kept alive by other references: since
4072         they can move the GC needs to be able to always find them.
4073
4074 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4075
4076         * object.c: precise GC support for static fields. Support
4077         for moving GCs: write barriers and pinned allocation for interned
4078         strings.
4079
4080 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
4081
4082         * domain.c, domain-internals.h: precise GC support for the MonoDomain
4083         structure.
4084
4085 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4086
4087         * class.c, gc.c: sgen and precise GC updates.
4088
4089 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4090
4091         * marshal.h, marshal.c: added write barrier wrapper and precise type
4092         fixes.
4093
4094 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
4095
4096         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
4097         support.
4098
4099 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
4100
4101         * reflection.c: precise and sgen GC updates.
4102
4103 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4104
4105         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
4106
4107 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
4108
4109         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
4110
4111 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
4112
4113         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
4114         MONO_TYPE_OBJECT. Fixes #78462.
4115
4116 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
4117
4118         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
4119         and blittable types.
4120
4121 2006-05-17  Miguel de Icaza  <miguel@novell.com>
4122
4123         * class.c (mono_class_get_exception_for_failure): Implement parts
4124         of a TODO: if the loader error is set (instead of the class
4125         error), we return a Loader exception that can be properly thrown
4126         elsewhere.
4127
4128         This was exposed by some Winforms 2.0 code that I tried to run
4129         (Atsushi pointed me to it).
4130
4131 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
4132
4133         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
4134         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
4135         
4136         * marshal.c (emit_marshal_vtype): Add limited support for 
4137         UnmanagedType.LPStruct. Fixes #78427.
4138
4139         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
4140         Applied a patch from kangaroo to fix #77523.
4141
4142 2006-05-17  Martin Baulig  <martin@ximian.com>
4143
4144         * threads.c
4145         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
4146         (debugger_thread_created): Removed.
4147         (debugger_thread_exited): Removed.
4148
4149 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
4150
4151         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4152
4153         * object-internals.h (MonoReflectionResource): Sync with managed version.
4154
4155 2006-05-12  Wade Berrier <wberrier@novell.com>
4156
4157         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
4158
4159 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
4160
4161         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
4162         functions try to allocate from the image mempool.
4163
4164 2006-05-12  Dick Porter  <dick@ximian.com>
4165
4166         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
4167
4168 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
4169
4170         * object.c: The FieldGetter and FieldSetter methods require the full
4171         name of the class, not only the name. Fixes bug #78277.
4172
4173 2006-05-11  Miguel de Icaza  <miguel@novell.com>
4174
4175         * loader.c (method_from_memberref): Do not pass the NULL klass to
4176         mono_loader_set_error_() methods.  Pass the non-NULL value
4177         (class). 
4178
4179 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
4180
4181         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
4182         (mono_assembly_close): Null out assembly->image->references after freeing it.
4183
4184         * image.c (mono_image_close): Free image->references.
4185         
4186         * reflection.c (mono_image_basic_init): Fix a small memory leak.
4187
4188 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
4189
4190         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
4191         before checking if it's NULL (g_assert).
4192
4193 2006-05-10  Martin Baulig  <martin@ximian.com>
4194
4195         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
4196         I thought I already killed that two months ago, but now it somehow reappeared.
4197
4198 2006-05-10  Martin Baulig  <martin@ximian.com>
4199
4200         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
4201
4202 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
4203
4204         * reflection.c: Allocate memory for dynamically created methods in the image
4205         mempools.
4206
4207 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
4208
4209         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
4210         don't use the ad pointer before checking if it's NULL (g_assert).
4211
4212 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
4213
4214         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
4215         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
4216
4217         * marshal.c: Allocate all signatures from mempools.
4218
4219         * marshal.c: Allocate some more signatures from mempools.
4220
4221 2006-05-09  Miguel de Icaza  <miguel@novell.com>
4222
4223         * object.c (mono_load_remote_field): The code used to provide a
4224         temporary variable for returning results if the user did not
4225         provide a result pointer.  But our temporary variable was allocted
4226         on the satck.
4227
4228         Fix calling code to always pass a result area.   Coverity ID 103.
4229
4230 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
4231
4232         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
4233         value, not the old. Fixes #78312.
4234         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
4235
4236         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
4237         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
4238         per-image cache.
4239
4240         * assembly.c (mono_assembly_close): Free image->references.
4241
4242         * assembly.c (mono_assembly_names_equal): Fix a warning.
4243         (mono_assemblies_cleanup): Cleanup more global data.
4244
4245         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
4246
4247         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
4248         ptr_cache and image->modules.
4249
4250         * image.c (mono_image_init): Allocate array_cache lazily.
4251         
4252 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4253
4254         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
4255         behavior was changed recently and has bad side effects.
4256
4257 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
4258
4259         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
4260         
4261         * assembly.c (mono_assembly_close): Remove a debug printf.
4262
4263         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
4264
4265         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
4266         to also allow for temporary references between mono_image_open ()/close ().
4267
4268         * domain.c (get_runtimes_from_exe): Add a FIXME.        
4269
4270 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
4271
4272         * marshal.c: Fix support for dynamic methods.
4273
4274         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
4275
4276         * marshal.c (mono_marshal_cleanup): New cleanup function.
4277
4278         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
4279         image mempools.
4280
4281         * class.c (mono_class_init): Fix leaking class->nested_classes.
4282
4283         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
4284
4285         * image.c (mono_image_init): Initialize the new cashes.
4286
4287         * image.c (mono_image_close): Destroy the new cashes.
4288
4289         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
4290
4291         * mempool.c (mono_mempool_strdup): New helper function.
4292
4293         * class-internals.h: Add prototype for mono_loader_unlock ().
4294
4295         * domain.c (mono_jit_info_table_find): Fix a warning.
4296         (mono_debugger_check_runtime_version): Ditto.
4297
4298         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
4299         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
4300         functions to these modules.
4301
4302         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
4303         metadata modules.
4304         
4305         * marshal.c (mono_free_bstr): Fix a warning.
4306
4307         * assembly.c (mono_assembly_open_full): Fix another small leak.
4308
4309         * object.c: Fix some unload leaks in the remoting code.
4310
4311         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
4312         function.
4313
4314         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
4315
4316         * reflection.c: Fix some unload leaks in dynamic assemblies.
4317
4318 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
4319
4320         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
4321         * marshal.h: Add BSTR support on Win32
4322         * icall.c: Add BSTR icalls
4323         * metadata.h: Add BSTR enums
4324
4325 2006-04-28  Miguel de Icaza  <miguel@novell.com>
4326
4327         Work to catch the crash from #76795 and turn it into an
4328         exception.   As I stubbed out pieces of the VisualBasic support,
4329         I found a number of places where the code was failing and I added
4330         checks to those places. 
4331         
4332         * metadata.c (do_mono_metadata_parse_generic_class): Make this
4333         function return a status code.  If we fail to parse the signature
4334         from mono_metadata_parse_generic_inst, return FALSE.
4335
4336         * loader.c (mono_get_method_from_token): If we fail to load the
4337         method (mono_class_get) return NULL.   
4338
4339         * (method_from_memberref): Return NULL if we are unable to parse
4340         the method signature
4341
4342         (mono_loader_error_prepare_exception): Since we now use the
4343         loader_error flag internally to stop processing, and obtaining
4344         exceptions that might be thrown will walk this code path the
4345         proper way of going from a MonoLoaderError into a
4346         MonoException was convoluted.   This new routine encapsulates the
4347         process of turning the error into an exception and *clearing* the
4348         error afterwards.
4349         
4350 2006-04-27  Miguel de Icaza  <miguel@novell.com>
4351
4352         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
4353         with missing assemblies), and to cope with:
4354
4355                 * Missing fieldref from a non-existing assembly.
4356                 * Missing methodref from a non-existing assembly.
4357
4358         The first batch of work to address *some* of the issues from 76661.
4359         
4360         * object.c (mono_class_create_runtime_vtable): If we fail to
4361         initialize the class raise the exception here. 
4362
4363         * metadata.c (mono_class_get_overrides_full): If any methods fail
4364         to load return the failure to the caller.
4365
4366         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
4367         flagging assemblies that failed to load.   
4368
4369         Do not crash if we are unable to load the assembly.
4370
4371         (mono_assembly_close): Do nothing with REFERENCE_MISSING
4372         assemblies. 
4373
4374         * loader.c (mono_loader_set_error_type_load): Change the
4375         convention to always pass unallocated strings, so we make our own
4376         copies (I know our own code had duplicated strings before, but
4377         this keeps the normal conventions).
4378         (method_from_memberref): Call mono_loader_set_error_method_load
4379         for all possible failures of loading the class. 
4380         Remove assert, turn into a loader error.
4381
4382         (mono_loader_error_to_exception): Move this routine from mini
4383         (mini_loader_error_to_exception) there was no need to have that in
4384         mini. 
4385
4386         * class.c (mono_class_from_typeref): If we were not able to load
4387         the assembly with mono_assembly_load_reference, call the
4388         mono_loader_set_error_type_load to register the problem.
4389
4390         (mono_class_setup_fields): If we fail to load the type from
4391         mono_metadata_parse_type_full, call mono_class_set_failure and
4392         break from the loop.
4393
4394         If class->exception_type is set, we do not layout the fields as
4395         that might crash the runtime, and instead return (from breaking
4396         from the previous loop).
4397
4398         (mono_class_setup_vtable): This now returns a boolean indicating
4399         whether the table was properly setup.   The decision is driven by
4400         mono_class_get_overrides_full which might run into non-existing
4401         methods. 
4402         
4403         (mono_class_init): Returns TRUE on success or FALSE if there was a
4404         problem in loading the type (incorrect assemblies, missing
4405         assemblies, methods, etc).
4406
4407         When we call mono_class_setup_fields we also check for a potential
4408         error inside this call (either a class exception or a general
4409         loader exception).
4410
4411         (mono_class_create_from_typedef): If the parent fails to load
4412         (calling mono_class_get_full) return NULL.
4413         
4414         ** Important **
4415
4416         calls to mono_metadata_parse_type_full should be checked
4417         everywhere and set the mono_class_set_failure
4418         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
4419
4420         The current patch checks the places where my manually constructed
4421         tests show the errors are showing up, but we should do it
4422         everywhere. 
4423
4424         ** Important2 **
4425
4426         mono_class_init return values should be tested everywhere, like
4427         the previous case this is something that we should audit
4428         everywhere and not only on the cases exposed by the tests I
4429         created. 
4430
4431 2006-04-26  Miguel de Icaza  <miguel@novell.com>
4432
4433         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
4434         boolean parameter and instead pass the information on `options'
4435         parameter (FileOptions).
4436
4437         * icall.c: Register the new signature for MonoIO.Open.
4438
4439         * debug-helpers.c (dis_one): Trying to understand how coverity
4440         works.  Fix Run 5, item 78.
4441
4442 2006-04-26  Dick Porter  <dick@ximian.com>
4443
4444         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
4445         dereference.
4446
4447 2006-04-25  Martin Baulig  <martin@ximian.com>
4448
4449         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
4450
4451         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
4452         debugger_thread_created().
4453         (debugger_gc_push_all_stacks): Don't handle the main thread in any
4454         special way.
4455         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
4456         (mono_debugger_finalize_threads): New function; undo the effects
4457         of mono_debugger_init_threads().
4458         (mono_debugger_create_all_threads): Removed.
4459
4460 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
4461
4462         * image.c (mono_image_close): Tidy up trace messages.
4463
4464         * assembly.c (mono_assembly_close): Ditto.
4465
4466         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
4467         no longer references an already freed assembly. Fixes #78168.
4468
4469 2006-04-21  Dick Porter  <dick@ximian.com>
4470
4471         * threads.c (mono_thread_detach): Fix reference counting when
4472         detaching threads.
4473
4474 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
4475
4476         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
4477         #78155.
4478
4479 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
4480
4481         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
4482         (mono_type_to_stind): Ditto.
4483
4484         * marshal.c: Use the new helper functions to simplify code.
4485
4486         * image.c (mono_image_close): Add some code for help debug assembly unloading
4487         problems.
4488
4489         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
4490         image mempool.
4491
4492         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
4493         assembly was already loaded in another appdomain. Fixes #78083.
4494
4495 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
4496
4497         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
4498         referenced assemblies.
4499         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
4500
4501         * domain.c (mono_domain_free): Add a trace message.
4502
4503         * appdomain.c (add_assemblies_to_domain): Ditto.        
4504
4505         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
4506         field.  
4507
4508 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
4509
4510         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
4511
4512 2006-04-12  Martin Baulig  <martin@ximian.com>
4513
4514         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
4515         `USE_INCLUDED_LIBGC'.   
4516
4517 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
4518
4519         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
4520         the patch contains ../ and a small directory name later. Hopefully fixes
4521         #78035.
4522
4523 2006-04-10  Martin Baulig  <martin@ximian.com>
4524
4525         Clean up the debugger's thread-handling code.
4526
4527         The debugger's thread-handling code has been moved from
4528         ../mini/debug-debugger.c to threads.c.  We now iterate directly
4529         over the `threads' hash, keep track of exiting threads and also
4530         use proper locking.
4531
4532         We can now debug XSP and XSP based applications with the debugger.
4533
4534         * object-internals.h (MonoThread): Added `gpointer end_stack'.
4535
4536         * threads.h
4537         (MonoThreadCallbacks): Removed; this was only used by the debugger.
4538         (mono_install_thread_callbacks): Likewise.      
4539
4540         * threads.c (mono_thread_callbacks): Removed.
4541         (debugger_thread_created, debugger_thread_exited): New static functions.
4542         (start_wrapper): Call debugger_thread_created().
4543         (thread_cleanup): Call debugger_thread_exited().
4544         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
4545         (mono_debugger_init_threads): New public function.
4546         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
4547         iterate directly over the `threads' hash and also use proper locking.
4548
4549         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
4550
4551         * mono-debug-debugger.h
4552         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
4553
4554 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
4555
4556         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
4557         argument type=array. Fixes #78057.
4558
4559 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
4560
4561         * culture-info-table.h : regenerated. Fixed bug #69652.
4562
4563 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
4564
4565         * loader.c metadata.c: Reapply a variant r59116.
4566         
4567         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
4568
4569         * class.c (mono_class_setup_interface_offsets): New internal function.
4570
4571         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
4572         interfaces too. Fixes #77398.
4573
4574         * reflection.c (encode_cattr_value): Add support for 
4575         parameter type=object, argument type=array.
4576         (load_cattr_value): Ditto. Fixes #77916.
4577
4578         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
4579         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
4580
4581         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
4582         a byval char array and CharSet is Ansi.
4583
4584         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
4585
4586 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
4587
4588         * metadata.c: Add some locking comments.
4589         
4590         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
4591         mempool.
4592         (mono_metadata_free_method_signature): Don't free the signature itself.
4593
4594         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
4595
4596         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
4597         reference the same MonoImage.
4598         (mono_assembly_load_from_full): Add an assert.
4599
4600 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
4601
4602         * image.c (mono_image_close): Don't put the image we are about to free into the
4603         loaded_images_guid_hash.
4604
4605         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
4606         to reduce code duplication.
4607
4608         * marshal.c: Register the native functions called by this module as icalls, to
4609         somewhat centralize the creation of MonoMethodSignature's.
4610
4611         * loader.c (mono_method_signature): Add a cache for method signatures.
4612
4613         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
4614         the parameter attributes of a method.
4615         (mono_metadata_parse_method_signature_full): Refactored the computation of
4616         parameter attributes into a separate function. Also avoid one allocation in
4617         most cases.
4618
4619         * assembly.c (mono_assembly_close): Ditto.
4620
4621         * image.c (mono_image_close): Log trace messages with INFO level.
4622
4623         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
4624
4625         * image.c reflection.c: Correct reference counting of image modules.
4626         
4627         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
4628         of this function from the image mempool.
4629         
4630         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
4631         to allow more cached types to be used.
4632
4633         * mono-debug.c (mono_debug_add_method): Appled patch from
4634         David S. Miller  <davem@sunset.davemloft.net>: Access 
4635         minfo->lexical_blocks[] entry elements using read32().
4636
4637 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
4638
4639         * loader.c (mono_free_method): No longer free the method header for non-dynamic
4640         methods as it is allocated from the mempool.
4641
4642         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
4643         image mempool.
4644
4645         * metadata-internals.h: Add comments describing the reference counting scheme
4646         used for MonoImage and MonoAssembly.
4647
4648         * image.c assembly.c reflection.c: Rework reference counting of images and 
4649         assemblies so they are freed when the runtime is shut down. Free some 
4650         additional memory structures when an image is unloaded.
4651         
4652 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
4653
4654         * class.c loader.c reflection.c: Allocate more data structures in
4655         the image mempool.
4656
4657 2006-03-31  Miguel de Icaza  <miguel@novell.com>
4658
4659         * icall.c
4660         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
4661         build on pre glib 2.4 systems.
4662
4663 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
4664
4665         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
4666
4667         * icall.c: Fix some warnings.
4668
4669 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
4670
4671         * culture-info-table.h : regenerated.
4672
4673 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
4674
4675         * threads.c, object-internals.h, verify.c: changed the culture caching
4676         code to use a normal MonoArray for storage so the GC can keep track of
4677         them easily. Fixed bits of the cache logic, too and simplified the
4678         code.
4679
4680 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
4681
4682         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
4683         thread for non-Boehm GCs.
4684
4685 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
4686
4687         * domain.c, object.c, domain-internals.h: reduce the amount of memory
4688         needed to keep track of the data for static fields.
4689
4690 2006-03-29  Raja R Harinath  <rharinath@novell.com>
4691
4692         Fix #75172
4693         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
4694         for interface classes.  Use 'num_methods' instead.
4695         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
4696         before using '->vtable_size' field.
4697
4698 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4699
4700         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
4701         doesn't contain managed pointers, so use a normal hashtable.
4702
4703 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4704
4705         * reflection.c, class-internals.h, domain.c: fixed handling of types
4706         used as values for objects in custom attributes (bug #77915):
4707
4708 2006-03-24  Martin Baulig  <martin@ximian.com>
4709
4710         * class.c (mono_class_setup_fields): Added support for generic
4711         instances; fixes #77580.
4712
4713 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4714
4715         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
4716
4717 2006-03-24  Dick Porter  <dick@ximian.com>
4718
4719         * file-io.c (get_file_attributes): More stat macro breakage.
4720         Fixes bug 77759.
4721
4722 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
4723
4724         * profiler.c: added the file=filename option in the default profiler
4725         to output the profile data to filename.
4726
4727 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4728
4729         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
4730         bug #77877.
4731
4732 2006-03-22  Martin Baulig  <martin@ximian.com>
4733
4734         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
4735         allocated `MonoClassField *' in `fb->handle'.
4736
4737 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4738
4739         * class.c, image.c, metadata-internals.h: implemented new mechanism to
4740         allocate interface ID to save memory and allow better ID reuse on
4741         appdomain unload. setup_generic_vtable () removal from Martin.
4742
4743 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
4744
4745         * object.h, appdomain.c, domain.c, exception.c, icall.c,
4746         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
4747         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
4748         write barriers for reference stores with managed objects accessed with
4749         C structures in the runtime and in embedding programs.
4750
4751 2006-03-20  Raja R Harinath  <rharinath@novell.com>
4752
4753         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
4754         'interface_id' and 'max_interface_id' fields of MonoClasses
4755         representing open generic types.
4756
4757 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
4758
4759         * object.h, object.c, icall.c: added functions to deal with
4760         storing valuetypes that contain references in managed objects.
4761         * reflection.c, string-icalls.c, threads.c, marshal.c: small
4762         fixes and comments around uses of mono_array_addr ().
4763
4764 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
4765
4766         * object.h, icall.c, monitor.c: object.GetHashCode ()
4767         implementation that supports the moving garbage collector.
4768
4769 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4770
4771         * icall.c, threads-types.h, threads.c: implemented finalizer for
4772         LocalDataStoreSlot.
4773
4774 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
4775
4776         * metadata.c (mono_type_size): Add a fixme.
4777         (mono_type_stack_size): Ditto.
4778
4779         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
4780         'type_forwarders' field.
4781
4782         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
4783         attribute from net 2.0.
4784
4785         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
4786         from class.c.
4787
4788         * class.c (mono_class_setup_fields): Fix a warning.
4789         
4790         * class.c (mono_class_from_name): Add support for assemblyref entries
4791         in the EXPORTEDTYPE table.
4792
4793         * reflection.c: Add support for handling type forwarders under net 2.0.
4794
4795         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
4796         
4797 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
4798
4799         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
4800         overwriting entries in ModuleBuild->types, also clean up the code
4801         a little. Fixes #77774.
4802
4803 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4804
4805         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
4806         load friend assembly info when present.
4807
4808 2006-03-14  Raja R Harinath  <rharinath@novell.com>
4809
4810         Fix crasher on gtest-158.cs.
4811         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
4812         the return value if the MonoClass we want is yet in an
4813         inconsistent state.
4814         * class.c (mono_class_create_from_typedef): Add an comment
4815         explaining an order dependency between mono_class_setup_parent and
4816         mono_class_setup_mono_type.
4817
4818 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4819
4820         * class.c: documentation updates and events bug fix.
4821
4822 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
4823
4824         * class.c: some cleanup, locking fixes.
4825
4826 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4827
4828         * class.c: fix the generics code to setup nested
4829         type info to the instantiated type (bug #77770).
4830
4831 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4832
4833         * marshal.c: fixed a few type correctness issues.
4834
4835 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4836
4837         * loader.c: the Set/Get/Addrtess array methods should be public.
4838
4839 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
4840
4841         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
4842         
4843         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
4844         info->wrapper.
4845
4846 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
4847
4848         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
4849
4850         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
4851
4852         * mempool.c (mono_mempool_alloc): Speed this up a bit.
4853         (mono_mempool_alloc0): Ditto.
4854
4855 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4856
4857         * socket-io.c:
4858         (create_object_from_sockaddr): it was allocating 4 extra bytes
4859         for the AF_UNIX data. Fixes bug #77747.
4860
4861 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
4862
4863         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
4864
4865 2006-03-09  Dick Porter  <dick@ximian.com>
4866
4867         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
4868         Fixes bug 76966 again.
4869
4870 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
4871
4872         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
4873         names from r57532
4874         * appdomain.c: Bumped corlib version to 48 (due to r57532)
4875
4876 2006-03-07  Martin Baulig  <martin@ximian.com>
4877
4878         * object.c
4879         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
4880
4881 2006-03-07  Martin Baulig  <martin@ximian.com>
4882
4883         * class.c
4884         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
4885         regression introduced in r56970; see gtest-252.cs.
4886
4887         * loader.c (mono_get_method_constrained): Correctly handle generic
4888         methods; see gtest-253.cs.
4889
4890 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
4891
4892         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
4893
4894 2006-03-04  Martin Baulig  <martin@ximian.com>
4895
4896         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
4897         compute the parent type at runtime, just like we're already doing
4898         it for interfaces.
4899
4900         * reflection.c
4901         (mono_reflection_bind_generic_parameters): Don't compute the
4902         parent type anymore.
4903
4904         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
4905
4906 2006-03-04  Martin Baulig  <martin@ximian.com>
4907
4908         * mono-debug-debugger.h
4909         (mono_debugger_create_notification_function): Allocate memory at
4910         runtime and return a pointer to it.
4911
4912 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
4913
4914         * assembly.c: Fix windows build.
4915         
4916         * assembly.c: Fix build.
4917
4918         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
4919
4920         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
4921         
4922 2006-03-03  Dick Porter  <dick@ximian.com>
4923
4924         * process.c
4925         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
4926         Check parameters before dereferencing them.  Fixes Aaron's part of
4927         bug 77393.
4928
4929 2006-03-03  Raja R Harinath  <rharinath@novell.com>
4930
4931         Fix performance regression.
4932         * loader.c (find_method_in_class): Add 'from_class' argument.
4933         Rename 'klass' argument to 'in_class'.  The signature is compared
4934         against the method in 'in_class', and the corresponding method is
4935         returned from 'from_class'.
4936         (find_method): Walk both 'in_class' and 'from_class' in parallel.
4937         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
4938         type definition and generic instantiation in parallel.
4939         (mono_get_method_constrained): Update to changes.
4940
4941 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4942
4943         * threads.c: make sure the domain is correct, too when doing
4944         mono_thread_attach ().
4945
4946 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
4947
4948         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
4949         windows. Fixes #77683.
4950
4951 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
4952
4953         * object.h, *: introduced specific way to set elements of an array
4954         of references to be used as write barrier. Still need to audit the
4955         uses of mono_array_addr.
4956
4957 2006-03-01  Miguel de Icaza  <miguel@novell.com>
4958
4959         * object-internals.h: New field to cache the assmebly name, patch
4960         from Tambet Ingo (tambet@ximian.com)
4961
4962 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
4963
4964         * decimal.h, class-internals.h, metadata-internals.h,
4965         file-io.h: mark a few function declarations as internal, to
4966         reduce the number of PLT entries.
4967
4968 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4969
4970         * file-io.c: fix typo in warning message.
4971
4972 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
4973
4974         * loader.c: on unix, lookup the "*A" version of a function
4975         if charset is auto as a second option before failing.
4976
4977 2006-02-28  Raja R Harinath  <rharinath@novell.com>
4978
4979         * class.h (mono_class_inflate_generic_method): Revert to two
4980         argument version.
4981         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
4982         (mono_class_inflate_generic_method_full): Add.
4983         * class.c (mono_class_inflate_generic_method_full): Rename from
4984         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
4985         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
4986         * loader.c, reflection.c: Update to changes.
4987
4988 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
4989
4990         * icall.c: const fixes and small improvements.
4991
4992 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4993
4994         * threadpool.c: for asynchronous connect(), enable the same workaround
4995         for BSD 6 as for the Mac. Fixes bug #77637.
4996
4997 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
4998
4999         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
5000         formatted classes. Fixes #77524.
5001
5002 2006-02-24  Raja R Harinath  <rharinath@novell.com>
5003
5004         * class.c (inflate_generic_type): Add a couple more
5005         micro-optimizations.
5006         (inflate_generic_context): Don't use the 'gmethod' from
5007         'inflate_with'.
5008         (mono_class_inflate_generic_method): If the method has generic
5009         parameters, but the passed-in context doesn't have a 'gmethod',
5010         create one.  Use the possibly simplified generic instantiation
5011         from the declaring class instead of the one passed in.
5012
5013 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5014
5015         Make generic method signature and method header handling lazy.
5016         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
5017         (inflate_generic_header): Likewise.
5018         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
5019         parameter to avoid inflating types.
5020         (mono_get_inflated_method): Empty out.
5021         * class.h (mono_class_inflate_generic_method): Update to changes.
5022         * loader.c (mono_get_method_from_token): Don't parse signature for
5023         generic methods, nor methods of generic classes.
5024         (mono_method_signature): Rename from 'mono_method_signature'.
5025         Inflate signature on demand.
5026         (mono_method_get_header): Inflate method header on demand.
5027         * reflection.c: Update to changes.
5028
5029 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5030
5031         * metadata.c (mono_metadata_inflate_generic_inst): If the
5032         instantiation is closed, don't bother expanding it in the new
5033         context.
5034         * class.c (inflate_generic_class): If the generic instantiation
5035         doesn't change after inflation, return the argument itself.
5036         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
5037         Add bounds checks.
5038         (inflate_generic_context): If neither the generic class nor the
5039         generic method instantiations change, return the original context.
5040         * reflection.c (mono_method_get_object): Do
5041         'mono_get_inflated_method' before accessing the ->klass field.
5042         (inflate_mono_method): Don't create a MonoGenericMethod unless
5043         necessary.
5044         (inflate_method): Don't pass a constructed type as the declaring
5045         type of a methodbuilder.
5046
5047 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
5048
5049         * object.c: fix memory overwrite.
5050
5051 2006-02-22  Dick Porter  <dick@ximian.com>
5052
5053         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
5054         it doesn't work any more.
5055         (mono_threads_request_thread_dump): Fix unused variable warnings.
5056
5057 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5058
5059         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
5060         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
5061         the public header file.
5062
5063 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
5064
5065         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
5066
5067 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5068
5069         * class-internals.h, object.c: reduce the size of MonoVTable
5070         and store the interface_offsets array at negative offsets.
5071
5072 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
5073
5074         * metadata.c: tweak table descriptors data structures to reduce
5075         size and runtime relocations.
5076
5077 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5078
5079         * marshal.c: fix some types and opcodes to be type-safe
5080         in marshaling wrappers.
5081
5082 2006-02-21  Ankit Jain  <jankit@novell.com>
5083
5084         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
5085
5086 2006-02-21  Raja R Harinath  <rharinath@novell.com>
5087
5088         * metadata.c (get_constraints): Relax debugging checks for monodis.
5089
5090 2006-02-21  Ankit Jain  <jankit@novell.com>
5091
5092         * metadata.c (mono_metadata_load_generic_params): Move the code
5093         checking for ambiguous generic params from here to mono/dis/get.c
5094         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
5095
5096 2006-02-21  Raja R Harinath  <harinath@gmail.com>
5097
5098         Fix assertion triggered when compiling nemerle.
5099         * class.c (mono_get_shared_generic_inst): Rename from
5100         get_shared_inst and make non-static.
5101         * loader.c (mono_get_shared_generic_method): New.  Used to create
5102         the MonoGenericContext-equivalent of a MonoGenericContainer.
5103         (mono_get_method_from_token): Initialize the 'context' field of
5104         the created MonoGenericContainer.
5105         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
5106         * metadata.c (get_constraints): Add sanity check.
5107         * class-internals.h: Add new internal methods.
5108
5109         * reflection.c (verify_safe_for_managed_space): New sanity check.
5110         Currently checks that owner-less generic parameters aren't allowed
5111         in managed space.
5112         (mono_type_get_object): Use it.
5113         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
5114         that are now in mono_type_get_object.
5115         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
5116
5117 2006-02-19  Raja R Harinath  <harinath@gmail.com>
5118
5119         * metadata.c (mono_type_create_from_typespec): Rename from
5120         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
5121         argument and caching of types in the generic container.
5122         (unwrap_arrays, find_generic_param): Remove.
5123         * metadata-internals.h: Update.
5124         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
5125
5126 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
5127
5128         * class.c (mono_class_get_exception_for_failure): Fix a warning.
5129
5130         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
5131         return values. Fixes #77581.
5132
5133         * class.c (mono_fnptr_class_get): Switch name and name_space.
5134
5135         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
5136         classes and add support for [In, Out] attributes.
5137         (mono_marshal_free_asany): Ditto. Fixes #77524.
5138
5139 2006-02-18  Raja R Harinath  <harinath@gmail.com>
5140
5141         * class.c (mono_class_from_generic_parameter): Make more robust to
5142         incomplete MonoGenericContainers from monodis.
5143
5144 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
5145
5146         * class-internals.h: added some more exception types.
5147         * class.c, metadata.c: added a few checks to handle missing
5148         types.
5149
5150 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5151
5152         Use owner-less generic-params some more.
5153         * class.c (my_mono_class_from_generic_parameter): Remove.
5154         (mono_class_from_generic_parameter): Handle null image,
5155         param->name and param->owner.
5156         (mono_class_from_mono_type): Update.
5157         (mono_class_create_from_typespec): Remove 'container' parameter.
5158         If that parameter is non-null, the result is always inflated by
5159         'mono_class_get_full' anyway.
5160         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
5161         parameter.
5162         (mono_class_get_full): Update.
5163
5164         * class.c (inflate_generic_type) [GENERICINST]: If the generic
5165         instance is not open, don't bother inflating.
5166         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
5167         parse metadata for inflated classes.
5168         (_mono_class_get): Change GenericContext* parameter to
5169         GenericContainer*.
5170         (mono_class_create_from_typespec): Likewise.  Simplify, and
5171         implement trivially.  All the cases are handled in
5172         mono_class_from_mono_type.  Don't inflate returned class.
5173         (mono_class_get_full): Delegate GENERICINST optimization to
5174         inflate_generic_type.
5175         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
5176
5177 2006-02-16  Dick Porter  <dick@ximian.com>
5178
5179         * socket-io.c (create_object_from_sockaddr): Fix typo.
5180         (create_sockaddr_from_object): Check array lengths before
5181         potentially accessing items off the end.
5182         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
5183         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
5184         (ves_icall_System_Net_Sockets_Socket_Send_internal)
5185         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
5186         length checks to avoid wraparound overflows.
5187         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
5188         contents of the array of sockets
5189         (hostent_to_IPHostEntry2)
5190         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
5191         Check return value of inet_ntop ().
5192         (addrinfo_to_IPHostEntry): Fix typo
5193
5194 2006-02-16  Raja R Harinath  <rharinath@novell.com>
5195
5196         Type metadata parsing doesn't use generic-instantiation information.
5197         * metadata.c (mono_metadata_parse_array_full): Change
5198         MonoGenericContext* parameter to MonoGenericContainer*.
5199         (mono_metadata_parse_type_full): Likewise.
5200         (mono_type_create_from_typespec_full): Likewise.
5201         (mono_metadata_parse_mh_full): Likewise.
5202         (mono_metadata_parse_generic_inst): Likewise.
5203         (do_mono_metadata_parse_generic_class): Likewise.
5204         (do_mono_metadata_parse_type): Likewise.
5205         * metadata-internals.h: Update to changes.
5206         * class.c (mono_class_find_enum_basetype): Likewise.
5207         (mono_class_setup_fields): Likewise.
5208         (mono_class_create_from_typespec): Likewise.
5209         * loader.c (method_from_methodspec): Likewise.
5210         (mono_get_method_from_token): Likewise.
5211         (mono_method_get_header): Likewise.
5212
5213 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5214
5215         * marshal.c: handle additional GENERICINST case (patch from
5216         Thong Nguyen <tum@veridicus.com>).
5217         Fix a few cases where LDIND_I/STIND_I was used for references.
5218
5219 2006-02-16  Raja R Harinath  <rharinath@novell.com>
5220
5221         * reflection.c (mono_reflection_get_token): Remove unused variable.
5222
5223 2006-02-16  Martin Baulig  <martin@ximian.com>
5224
5225         * reflection.c (mono_reflection_get_token): Add support for fields
5226         in instantiated generic types.
5227
5228         * icall.c
5229         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
5230
5231 2006-02-15  Martin Baulig  <martin@ximian.com>
5232
5233         * icall.c
5234         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
5235         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
5236         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
5237         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
5238
5239 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
5240
5241         * class.c, metadata.c, metadata.h, object.c, icall.c,
5242         marshal.c: changed mono_type_get_underlying_type () to do
5243         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
5244         Fixed handling of instantiated generic valuetypes (bug #75479).
5245
5246 2006-02-15  Raja R Harinath  <rharinath@novell.com>
5247
5248         * metadata.c (mono_metadata_decode_signed_value): Simplify.
5249         Delegate to mono_metadata_decode_value, and work on the returned value.
5250
5251         * icall.c (ves_icall_MonoType_GetGenericArguments):
5252         Add consistency check here too.
5253         
5254 2006-02-15  Ankit Jain  <jankit@novell.com>
5255
5256         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
5257         char/short etc.
5258
5259 2006-02-15  Ankit Jain  <jankit@novell.com>
5260
5261         * metadata.c (mono_metadata_decode_signed_value): New function to decode
5262         signed values, used only for representing lower bounds of arrays.
5263         (mono_metadata_parse_array_full): Use new
5264         mono_metadata_decode_signed_value to decode lower bounds.
5265
5266 2006-02-14  Martin Baulig  <martin@ximian.com>
5267
5268         * reflection.c
5269         (mono_reflection_get_token): Support "MonoGenericMethod" and
5270         "MonoGenericCMethod" and allow generic instances / methods.
5271
5272 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
5273
5274         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
5275         to obtain the terminal size using an ioctl.
5276
5277         * object.c (mono_nullable_init): Revert this as nullable reference
5278         types are not valid.
5279         (mono_nullable_box): Ditto.
5280
5281 2006-02-09  Dick Porter  <dick@ximian.com>
5282
5283         * threads.c (mono_thread_detach): Drop a reference to the thread
5284         we're detaching.
5285
5286 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
5287
5288         * object.c (mono_nullable_init): Handle nullable reference types.
5289         (mono_nullable_box): Ditto. Fixes #77446.
5290
5291 2006-02-07  Martin Baulig  <martin@ximian.com>
5292
5293         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
5294
5295 2006-02-07  Ankit Jain  <jankit@novell.com>
5296
5297         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
5298         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
5299         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
5300         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
5301         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
5302         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
5303
5304 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
5305
5306         * class.c (mono_class_create_generic): Set type_token as well.
5307
5308         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
5309         compatible with MS.
5310
5311 2006-02-02  Martin Baulig  <martin@ximian.com>
5312
5313         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
5314         has never been used so far.
5315
5316 2006-02-02  Martin Baulig  <martin@ximian.com>
5317
5318         * mono-debug-debugger.h: Changed comment at the top of this file;
5319         the header is not installed, but it's safe to #include it from
5320         within the JIT.
5321
5322         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
5323         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
5324
5325 2006-02-02  Martin Baulig  <martin@ximian.com>
5326
5327         * mono-debug.h
5328         (MonoSymbolTable): Removed the `metadata_info' field.
5329
5330         * mono-debug.c
5331         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
5332
5333         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
5334         (mono_debugger_add_builtin_types): Removed.
5335         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
5336         (mono_debugger_create_notification_function): We now operate on a
5337         pre-allocated area; take a `gpointer' and return `void'.
5338
5339         * mono-debug-debugger.c
5340         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
5341         (mono_debugger_add_builtin_types): Removed.
5342
5343 2006-02-02  Martin Baulig  <martin@ximian.com>
5344
5345         * threads.c (mono_debugger_create_all_threads): New public method.
5346
5347 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
5348
5349         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
5350         breaks on several platforms.
5351
5352 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
5353
5354         * assembly.c: the VS.NET build doesn't supply default values for
5355         MONO_ASSEMBLIES and MONO_CFG_DIR.
5356
5357 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
5358
5359         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
5360         helper function.
5361
5362         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
5363
5364         * loader.c (method_from_memberref): Fix a warning.
5365
5366         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
5367
5368         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
5369         with explicit layout. Fixes #77433.
5370
5371 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
5372
5373         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
5374         max_interface_id is initialized before using it. Fixes #77398.
5375         (ves_icall_Type_GetInterfaces): Ditto.
5376
5377 2006-01-30  Raja R Harinath  <rharinath@novell.com>
5378
5379         * metadata.c (mono_metadata_parse_method_signature_full): Don't
5380         allocate memory for parameter attributes when parsing memberref
5381         signatures.
5382         * loader.c (mono_loader_set_error_method_load): Don't warn.
5383         (method_from_memberref): Ensure MissingMethodException gets thrown
5384         if method is not found.  Make warning more informative.
5385
5386 2006-01-29  Raja R Harinath  <harinath@gmail.com>
5387
5388         Fix #77397
5389         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
5390         return true if is byref.
5391         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
5392         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
5393         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
5394
5395 2006-01-27  Raja R Harinath  <rharinath@novell.com>
5396
5397         Fix tests/find-method.2.il
5398         * loader.c (find_method, find_method_in_class): Remove is_inflated
5399         argument.  Revert 2006-01-18 change.
5400         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
5401         is generic, search for method in its generic definition.
5402         * class.c (mono_class_setup_vtable_general): Print generic
5403         arguments of generic types in debugging printf.
5404
5405 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
5406
5407         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
5408
5409         * threads.c (mono_threads_request_thread_dump): New helper function.
5410
5411 2006-01-25  Raja R Harinath  <rharinath@novell.com>
5412
5413         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
5414
5415 2006-01-25  Ankit Jain  <jankit@novell.com>
5416
5417         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
5418         move definition to ..
5419         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
5420         
5421 2006-01-25  Ankit Jain  <jankit@novell.com>
5422             Raja R Harinath  <rharinath@novell.com>
5423
5424         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
5425         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
5426         as necessary.
5427
5428 2006-01-25  Martin Baulig  <martin@ximian.com>
5429
5430         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
5431         `MonoDebuggerThread' into debug-debugger.c.
5432
5433 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5434
5435         * profiler.c: fix printing of data.
5436
5437 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
5438
5439         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
5440           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
5441
5442 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5443
5444         * object.c: fix deadlock related to string interning.
5445
5446 2006-01-23  Martin Baulig  <martin@ximian.com>
5447
5448         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
5449
5450         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
5451
5452 2006-01-23  Martin Baulig  <martin@ximian.com>
5453
5454         * mono-debug.h: Moved the prototypes of some functions which are
5455         used by the JIT here from mono-debug-debugger.h.
5456
5457 2006-01-21  Martin Baulig  <martin@ximian.com>
5458
5459         * Makefile.am: Don't install mono-debug-debugger.h.
5460
5461 2006-01-21  Martin Baulig  <martin@ximian.com>
5462
5463         * mono-debug-debugger.h: Enforce the private status of this header
5464         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
5465         Moved some stuff from mono-debugger-jit-wrapper.h here.
5466
5467 2006-01-20  Raja R Harinath  <rharinath@novell.com>
5468
5469         * class.c (mono_class_from_typeref): Add a sanity test to help
5470         catch lack of assembly load/search hooks.
5471
5472 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
5473
5474         * marshal.c (emit_struct_conv): Relax the fields with same offset
5475         check even more. Fixes #77230.
5476
5477 2006-01-18  Martin Baulig  <martin@ximian.com>
5478
5479         * loader.c (find_method_in_class): Added `gboolean is_inflated'
5480         argument; if false, we compare the uninstantiated signatures.
5481         (method_from_memberref): Compare the uninstantiated signatures;
5482         fixes #76417.
5483
5484 2006-01-18  Robert Jordan  <robertj@gmx.net>
5485
5486         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
5487         Clear the weak link. Fixes bug #77170.
5488
5489         * gc.c (mono_gchandle_free):
5490         Reflect *-gc.c changes (tiny optimization).
5491
5492 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
5493
5494         * metadata.c (mono_metadata_signature_dup): Applied patch from
5495         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
5496         Fixes #77288.
5497
5498 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
5499
5500         * marshal.c (emit_struct_conv): Allow fields with the same offset when
5501         marshalling from native to managed code. Fixes #77230.
5502
5503 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5504
5505         * threadpool.c: fix problem (Mac only) when more than one asynchronous
5506         connect. Fixes bug #77020.
5507
5508 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5509
5510         * class.c: fixed id assignement for nested interfaces (bug #77275).
5511         Added also better info for --print-vtable debugging.
5512
5513 2006-01-12  Martin Baulig  <martin@ximian.com>
5514
5515         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
5516         interfaces on-the-fly; fixes #76625.
5517
5518         * class-internals.h
5519         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
5520         don't need that anymore.
5521
5522 2006-01-12  Miguel de Icaza  <miguel@novell.com>
5523
5524         * socket-io.c
5525         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
5526         To avoid initing the nested_classes when not needed I turned the
5527         PeerCredData as a toplevel internal class, as it has to be shared
5528         anyways. 
5529
5530         Fixes the CASA issue.
5531
5532 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
5533
5534         * domain.c: Accessors for MonoJitInfo
5535
5536         * profiler-private.h: Add jitinfo to the end jit hook
5537
5538         * profiler.[ch]: Define new hooks, called after jitting which give
5539         the MonoJitInfo that was compiled
5540
5541 2006-01-10  Martin Baulig  <martin@ximian.com>
5542
5543         * class.c (mono_class_setup_events): Add support for generic
5544         classes; fixes #76440.
5545
5546 2006-01-06  Raja R Harinath  <rharinath@novell.com>
5547
5548         Fix #77160.
5549         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
5550         on passed-in method.
5551
5552 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
5553
5554         * object.c (mono_runtime_invoke_array): Add Nullable support.
5555
5556         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
5557
5558 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
5559
5560         * file-io.c: Don't consider sockets as directory and avoid an endless
5561         loop. Fix bug #76966.
5562
5563 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
5564
5565         * object.c (mono_nullable_init): New helper function.
5566         (mono_nullable_box): Ditto.
5567
5568         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
5569
5570         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
5571
5572         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
5573         
5574 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
5575
5576         * class.c (mono_class_is_assignable_from): Make T assignable to 
5577         Nullable<T>.
5578
5579 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
5580
5581         * appdomain.c: Bump corlib version to 46.
5582         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
5583         serialization purpose) and changed ves_icall_System_Reflection_
5584         Assembly_get_code_base signature to accept a boolean (to escape, or 
5585         not, the assembly code base).
5586
5587 2005-12-23  Dick Porter  <dick@ximian.com>
5588
5589         * icall.c: 
5590         * threads-types.h: 
5591         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
5592         CreateEvent icall now returns "created" boolean parameter.
5593
5594 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
5595
5596         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
5597         #76967.
5598
5599         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
5600         when attr_klass is an interface. Fixes #77045.
5601
5602 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
5603
5604         * marshal.c (emit_struct_conv): Fix previous patch.
5605         
5606         * marshal.c (emit_struct_conv): Add a check for fields with the same
5607         offset.
5608
5609 2005-12-20  Raja R Harinath  <rharinath@novell.com>
5610
5611         Fix regression in Mono.C5.
5612         * class.c (mono_class_create_generic): If 'klass' is an interface
5613         set up the interface offsets.
5614         (mono_class_is_assignable_from): Don't throw away generic arguments.
5615
5616 2005-12-19  Raja R Harinath  <rharinath@novell.com>
5617
5618         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
5619         type parameters.
5620
5621 2005-12-15  Raja R Harinath  <rharinath@novell.com>
5622
5623         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
5624         dead store.
5625         (do_mono_metadata_parse_generic_class): Don't pass the current
5626         generic context when parsing the type being instantiated: it
5627         cannot use it, anyway.
5628
5629         * loader.c (method_from_memberref): Don't inflate a signature if
5630         it doesn't contain any type parameters.
5631
5632 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
5633
5634         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
5635
5636 2005-12-14  Martin Baulig  <martin@ximian.com>
5637
5638         * class.c
5639         (mono_type_get_name_recurse): Don't return null for type
5640         parameters and open generic classes.
5641         (mono_class_setup_methods): Don't exclude generic instances.
5642         (mono_get_unique_iid): Use different IDs for different
5643         instantiations of the same generic type.
5644         (mono_class_setup_vtable): Only use setup_generic_vtable() for
5645         open generic instances; create a normal vtable for closed generic
5646         instances.
5647         (mono_class_setup_vtable_general): We're now also called for
5648         closed generic instances.
5649
5650         * reflection.c
5651         (mono_reflection_bind_generic_parameters): Correctly use
5652         mono_metadata_lookup_generic_inst() everywhere.
5653
5654 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
5655
5656         * object.c (mono_class_create_runtime_vtable): Call 
5657         mono_class_setup_vtable ().
5658
5659         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
5660         function.
5661         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
5662         #76959.
5663
5664         * loader.c (mono_loader_set_error_type_load): Print the type load
5665         warnings to the console so they are more visible to the user.
5666         (mono_loader_set_error_method_load): Ditto.
5667
5668         * reflection.c (ensure_runtime_vtable): Revert the last change as it
5669         is still broken.
5670         
5671         * reflection.c (ensure_runtime_vtable): Fix build.
5672
5673         * reflection.c (ensure_runtime_vtable): Disable an optimization which
5674         doesn't work in all cases.
5675
5676 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
5677
5678         * object.c (mono_array_new_full): Treat a single dimensional array
5679         with 0 lower bounds as an szarray. Fixes #76973.
5680
5681         * reflection.c (custom_attr_visible): Really fix this.
5682
5683 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
5684
5685         * reflection.c (custom_attr_visible): Allow nested public attributes
5686         as well.
5687
5688         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
5689         interface check.
5690
5691 2005-12-12  Raja R Harinath  <harinath@gmail.com>
5692
5693         * class.c (set_generic_param_owner): Delete.
5694         (mono_class_create_from_typedef): Don't set ->owner field of
5695         generic parameters to "param containers" of enclosing classes.
5696         * reflection.c (mono_reflection_initialize_generic_parameter):
5697         Likewise.
5698
5699 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
5700
5701         * reflection.c (custom_attr_visible): Fix build.
5702
5703 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
5704
5705         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
5706         private attributes.
5707         
5708         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
5709         handling of null parameter defaults.
5710
5711 2005-12-09  Raja R Harinath  <rharinath@novell.com>
5712
5713         * class.c (mono_class_from_generic_parameter): Don't set
5714         klass->generic_container.
5715         (my_mono_class_from_generic_parameter): Likewise.
5716
5717 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
5718
5719         * reflection.c (load_public_key): Fix a warning.
5720         (method_encode_code): Fix unaligned accesses.
5721
5722 2005-12-07  Martin Baulig  <martin@ximian.com>
5723
5724         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
5725
5726         * reflection.c
5727         (write_generic_param_entry): Encode our custom attrs.
5728
5729         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
5730
5731 2005-12-07  Martin Baulig  <martin@ximian.com>
5732
5733         * reflection.c (encode_new_constraint): Removed; we don't use the
5734         `NewConstraintAttribute' anymore.
5735
5736 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
5737
5738         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
5739         not fire a TypeResolve event when Assembly.GetType () is called.
5740
5741 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
5742
5743         Beginning of support for nullable types in the runtime. Parts of
5744         this patch are from Martin.
5745
5746         * appdomain.c (MONO_CORLIB_VERSION): Bump
5747
5748         * domain.c (mono_init_internal): get the nullable type
5749
5750         * class.c (mono_class_is_nullable): New method
5751         (mono_class_get_nullable_param): New mehod
5752         (mono_class_create_generic): In types T? set cast_class to T
5753
5754         * class-internals.h (MonoDefaults): new nullable default class
5755         (mono_class_get_nullable_param, mono_class_get_nullable_param):
5756         new methods.
5757
5758 2005-12-05  Raja R Harinath  <rharinath@novell.com>
5759
5760         * metadata.c (select_container): New.  Refactor code to select the
5761         appropriate GenericContainer given the type of generic parameter
5762         we are looking for.
5763         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
5764         not a MonoGenericContext.  Use select_container.  Update parameters.
5765         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
5766         and MONO_TYPE_MVAR.
5767         (unwrap_arrays): Remove duplicate tests.
5768         (find_generic_param): Rename from 'has_same_context'.  Now walks a
5769         generic instantiated class to find any arguments that are generic
5770         parameters.
5771         (mono_type_create_from_typespec_full): Use find_generic_param to
5772         avoid evicting some generic instantiations from the typespec
5773         cache.
5774
5775 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
5776
5777         * reflection.c: fixed writing of doubles on ARM FPA.
5778
5779 2005-12-02  Robert Jordan  <robertj@gmx.net>
5780
5781         * icall.c: Fixed EventInfo.ReflectedType (#76829).
5782
5783 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5784
5785         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
5786         least on SUSE 10 they are not the same (on debian, they are just the
5787         same thing).
5788
5789 2005-12-01  Raja R Harinath  <rharinath@novell.com>
5790
5791         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
5792         DeclaringType for VARs and MVARs.
5793         * class.c (set_generic_param_owner): Fix initialization of owner
5794         fields.
5795
5796 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
5797
5798         * icall.c: fixed Enum.ToObject() to correctly convert the values.
5799
5800 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5801
5802         * threadpool.c: workaround for a bug that shows up on the Mac:
5803         select()+connect() on a blocking socket is not like it should
5804         be, so we proceed to connect() in that case, wasting the I/O
5805         threadpool thread until connect succeedes. Fixes bug #75436.
5806
5807 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5808
5809         * threadpool.c: fix typo when setting file descriptor states.
5810
5811 2005-11-28  Raja R Harinath  <rharinath@novell.com>
5812
5813         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
5814         * metadata.c (mono_metadata_parse_method_signature_full): Don't
5815         create a temporary signature container.
5816         (mono_metadata_parse_generic_param): Update to changes.
5817         (mono_type_create_from_typespec_full): Update to changes.
5818         * loader.c (method_from_memberref): Don't use a
5819         MonoGenericContainer while parsing a memberref signature.
5820         (method_from_methodspec): Remove dead-store of the 'container'
5821         variable.  It's overwritten before use.
5822
5823         * metadata.c (mono_type_create_from_typespec_full): Make debugging
5824         checks tighter.
5825         (mono_metadata_parse_generic_param): Likewise.
5826         * loader.c (find_method_in_class): Does not need a
5827         MonoGenericContainer.  Use 'mono_method_signature' rather than
5828         'mono_method_signature_full'.
5829         (find_method, mono_get_method_constrained, method_from_memberref):
5830         Update to changes.
5831
5832         * metadata.c (mono_type_create_from_typespec_full): Ensure that
5833         owner-less generic-parameters are never evicted from the typespec
5834         cache.
5835
5836         * loader.c (method_from_memberref): Don't use the current context
5837         when parsing signatures.
5838         (method_from_methodspec, mono_get_method_from_token): Update to changes.
5839
5840         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
5841         side-effects in g_assert.
5842         * loader.c (mono_get_method_from_token): Resolve klass earlier so
5843         that we don't potentially lose information.
5844
5845 2005-11-26  Dick Porter  <dick@ximian.com>
5846
5847         * icall.c:
5848         * threads.c: icalls to implement basic (ie, not named)
5849         System.Threading.Semaphore.
5850
5851 2005-11-24  Dick Porter  <dick@ximian.com>
5852
5853         * process.c
5854         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
5855         Use GetProcessId() if it's available.
5856
5857 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
5858
5859         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
5860
5861 2005-11-23  Raja R Harinath  <rharinath@novell.com>
5862             Ankit Jain  <jankit@novell.com>
5863
5864         * loader.c (mono_get_method_from_token): Initialize 'method' field
5865         of all generic parameters before parsing the signature.  Remove
5866         code that "fixed"-up MVAR references.
5867
5868 2005-11-23  Ankit Jain  <jankit@novell.com>
5869
5870         * metadata.c (mono_metadata_has_generic_params):
5871         (mono_metadata_load_generic_param_constraints):
5872         (mono_metadata_load_generic_params): Move duplicate code ...
5873         (mono_metadata_get_generic_param_row): ... here. Returns the
5874         first row-id in GenericParam table for a given owner (token).
5875         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
5876         prototype.
5877
5878 2005-11-23  Raja R Harinath  <rharinath@novell.com>
5879             Ankit Jain  <jankit@novell.com>
5880
5881         * metadata.c (mono_metadata_class_equal): Pass signature_only when
5882         comparing VARs too.
5883         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
5884         type->data.generic_param only if the type is an MVAR.
5885         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
5886         leak owner-less VARs and MVARs into managed space.
5887
5888 2005-11-21  Martin Baulig  <martin@ximian.com>
5889
5890         * class-internals.h
5891         (MonoMethod): Moved the `generic_container' here from
5892         `MonoMethodNormal' since we now also need it for
5893         `MonoMethodPInvoke';
5894         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
5895         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
5896         an union containing both `MonoMethodNormal' and
5897         `MonoMethodPInvoke'.
5898
5899         * loader.c
5900         (mono_get_method_from_token): Allow implementing generic methods
5901         as interncalls.
5902
5903         * threads.c
5904         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
5905         icall.
5906
5907 2005-11-17  Dick Porter  <dick@ximian.com>
5908
5909         * icall.c: 
5910         * process.h: 
5911         * process.c: Split the Process Start_internal icall into
5912         ShellExecuteEx_internal and CreateProcess_internal, which are
5913         called depending on whether UseShellExecute is true.  Fixes bug
5914         76670.
5915
5916         * appdomain.c (MONO_CORLIB_VERSION): Incremented
5917
5918 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
5919
5920         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
5921         'msize' parameters, use the information in 'mspec' instead.
5922         (emit_object_to_ptr_conv): Ditto.
5923
5924         * marshal.c (emit_struct_conv): Handle explicit layout structs with
5925         fields out of order. Fixes #76733.
5926
5927 2005-11-17  Ankit Jain  <jankit@novell.com>
5928
5929         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
5930
5931 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
5932
5933         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
5934           bug #76575.
5935
5936 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
5937
5938         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
5939         for types with non-auto layout. Fixes #76717.
5940
5941 2005-11-16  Ankit Jain  <jankit@novell.com>
5942
5943         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
5944         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
5945         if generic_context is null.
5946           (mono_metadata_generic_param_equal): param->owner can be null.
5947           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
5948         null.
5949
5950 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
5951
5952         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
5953         the correct value.
5954
5955 2005-11-15  Martin Baulig  <martin@ximian.com>
5956
5957         * object.c (set_value): Use mono_class_from_mono_type() instead of
5958         the hack for generic instances; fixes #76136.
5959
5960 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
5961
5962         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
5963         fields.
5964
5965         * image.c (load_metadata_ptrs): Initialize the new fields.
5966
5967         * reflection.c (create_dynamic_mono_image): Ditto.
5968
5969         * reflection.c (build_compressed_metadata): Use the new fields.
5970
5971         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
5972         icall.
5973
5974         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
5975         icall.
5976         
5977 2005-11-15  Ankit Jain  <jankit@novell.com>
5978             Raja R Harinath  <harinath@gmail.com>
5979
5980         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
5981         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
5982         new per-generic_container cache if the cached MonoType's context matches
5983         the current context.
5984           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
5985         to the expected context.
5986           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
5987
5988 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5989
5990         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
5991         we changed the signature of an icall.
5992         * icall.c: Modify to mono_double_ParseImpl return true/false 
5993         depending on the success, instead of throwing the exception. This will
5994         help us in Double.TryParse methods.
5995         
5996 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
5997
5998         * marshal.c (emit_marshal_object): Throw an exception when
5999         marshalling 'object' instead of crashing. Fixes #76696.
6000
6001 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6002
6003         * class-internals.h: Add prototype for mono_type_get_full_name ().
6004
6005 2005-11-11  Dick Porter  <dick@ximian.com>
6006
6007         * threads.c (mono_thread_manage): Make sure the main thread has
6008         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
6009
6010 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6011
6012         * loader.c (mono_loader_set_error_type_load): Log a warning to the
6013         console about the missing type.
6014         (mono_loader_set_error_method_load): Ditto.
6015
6016 2005-11-09  Miguel de Icaza  <miguel@novell.com>
6017
6018         * mono-config.c (mono_get_config_dir): Set the system defaults if
6019         none is specified.
6020
6021         * assembly.c (mono_set_dirs): New API entry point to set the
6022         assembly and the config directory in one call
6023
6024 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
6025
6026         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
6027         the ftnptr was created from a delegate in a domain other than the
6028         current domain. Fixes #75377.
6029
6030         * exception.h exception.c: Add mono_get_exception_not_supported ().
6031
6032 2005-11-08  Martin Baulig  <martin@ximian.com>
6033
6034         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
6035
6036 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
6037
6038         * security-manager.h: Added definitions to deal with strongname key 
6039         pairs bigger (and smaller) than 1024 bits.
6040         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
6041         adjust wrt the public key length being used.
6042
6043 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
6044
6045         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
6046           Windows build (r51396-51397).
6047
6048 2005-11-03  Martin Baulig  <martin@ximian.com>
6049
6050         * class.c (mono_class_setup_vtable_general): Also add generic
6051         methods to the vtable; fixes #76581.
6052
6053 2005-11-01  Miguel de Icaza  <miguel@novell.com>
6054
6055         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
6056         sure that we lookup GetString method from the System.Text.Encoding
6057         class, not the derived class or we get an empty method.
6058
6059         Fixed class #76612.
6060
6061 2005-10-25  Miguel de Icaza  <miguel@novell.com>
6062
6063         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
6064         if it has been previously set (embedders). 
6065
6066         Make mono_set_rootdir available also on Unix.
6067
6068 005-10-24  Robert Jordan  <robertj@gmx.net>
6069
6070         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
6071
6072 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6073
6074         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
6075         only calls which are made to native code use this flag.
6076
6077         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
6078
6079 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6080
6081         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
6082         Add support for FieldBuilders.
6083
6084 2005-10-29  Martin Baulig  <martin@ximian.com>
6085
6086         * mono-debug.c
6087         (mono_debug_using_mono_debugger): New public method; returns
6088         whether we're running inside the debugger.
6089
6090 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
6091
6092         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
6093         for Method/Constructor/FieldBuilders.
6094
6095 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6096
6097         * reflection.c (module_add_cattrs): Save custom attributes for global methods
6098         and fields as well.
6099
6100 2005-10-26  Martin Baulig  <martin@ximian.com>
6101
6102         * mono-debug-debugger.c
6103         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
6104
6105 2005-10-24  Raja R Harinath  <harinath@gmail.com>
6106
6107         * icall.c (base64_to_byte_array): Don't pass an out-of-range
6108         integer to isspace.
6109
6110 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6111
6112         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
6113         when passing valuetypes byref. Fixes #76502.
6114
6115 2005-10-19  Jackson Harper  <jackson@ximian.com>
6116
6117         * profiler.c: Don't put a . in front of types that are not in a
6118         namespace.
6119
6120 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6121
6122         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
6123
6124 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
6125
6126         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
6127         #76436.
6128         (mono_marshal_get_ldflda_wrapper): Fix a warning.
6129
6130 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6131
6132         * assembly.c metadata-internals.h icall.c: Define an additional
6133         parameter for mono_assembly_name_parse_full, so we can avoid creating
6134         S.R.AssemblyName.Version when no version info wasn't passed.
6135         
6136 2005-10-09  Miguel de Icaza  <miguel@novell.com>
6137
6138         * class.c (mono_type_get_full_name): Reimplement method that was
6139         removed. 
6140
6141         * image.c: Some docs
6142
6143 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6144
6145         * profiler.c (output_newobj_profile): Fix printing of Total memory
6146         on x86.
6147
6148 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6149
6150         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
6151
6152 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
6153
6154         * threads.c: remove debug output.
6155
6156 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6157
6158         * threads.c (mono_thread_manage): Fix crashes if more than 64
6159         threads need to be aborted. Hopefully fixes #75899.
6160
6161         * assembly.c (mono_stringify_assembly_name): New helper function.
6162
6163         * class.c: Use mono_stringify_assembly_name instead of the similar
6164         static function.
6165
6166         * assembly.h assembly.c: Add support for calling a postload search 
6167         hook if an assembly cannot be loaded.
6168
6169         * appdomain.c: Register new search hooks which call the AssemblyResolve
6170         events in AppDomain. Fixes #75231
6171
6172 2005-10-07  Martin Baulig  <martin@ximian.com>
6173
6174         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
6175         methods without debug info.
6176
6177 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6178
6179         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
6180         wrappers.
6181
6182 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6183
6184         * file-io.c: now that we return symlinks, use lstat and, when the file
6185         is a symbolic link, stat, to get the file attributes. Also avoid the
6186         conversion to/from utf16/external.
6187
6188 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
6189
6190         * class.c (mono_class_layout_fields): Compute klass->has_references
6191         correctly if an embedded valuetype is not yet initialized. Fixes
6192         #76331.
6193
6194 2005-10-04  Martin Baulig  <martin@ximian.com>
6195
6196         * metadata.c
6197         (mono_metadata_load_generic_param_constraints): New public
6198         function; splitted the constraints loading out from
6199         mono_metadata_load_generic_params().
6200
6201         * class.c (mono_class_create_from_typedef): Call
6202         mono_metadata_load_generic_param_constraints() after setting up
6203         the type and creating our parent; fixes #75329.
6204
6205 2005-10-04  Martin Baulig  <martin@ximian.com>
6206
6207         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
6208         non-dynamic parent classes.
6209
6210 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
6211
6212         * file-io.c : win32 build fix (ETXTBSY seems not found).
6213
6214 2005-10-04  Martin Baulig  <martin@ximian.com>
6215
6216         * reflection.c
6217         (mono_image_get_methodspec_token): Make the cache actually work;
6218         fixes #75974.
6219
6220 2005-10-04  Martin Baulig  <martin@ximian.com>
6221
6222         * class.c (mono_class_name_from_token): Removed the unneccessary
6223         `MonoGenericContext *' argument.
6224
6225 2005-10-04  Martin Baulig  <martin@ximian.com>
6226
6227         * loader.c
6228         (method_from_methodspec): Make the caching work again; fixes the
6229         performance regression from #76262.
6230
6231 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6232
6233         * file-io.c:
6234         * file-io.h:
6235         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
6236         GetFileSystemEntries that performs the same work but without going
6237         into io-layer, locking, etc.
6238
6239 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6240
6241         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
6242         ThreadState_Stopped as well. Fixes #76047.
6243
6244 2005-09-29  Martin Baulig  <martin@ximian.com>
6245
6246         * class.c
6247         (inflate_generic_context): If the new context has a `gmethod', set
6248         its `container' that that gmethod's `container'.
6249
6250         * metadata.c
6251         (mono_metadata_parse_generic_param): Simplify things;
6252         `generic_container = generic_context->container;' is just fine.
6253
6254         * loader.c (method_from_methodspec): Code cleanups.
6255
6256 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
6257
6258         * decimal.c: fix warning (and let gcc generate correct
6259         code on ARM with optimizations).
6260
6261 2005-09-28  Martin Baulig  <martin@ximian.com>
6262
6263         * loader.c
6264         (method_from_memberref): Added `MonoGenericContext *class_context'
6265         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
6266         (method_from_methodspec): If we're a memberref, use the enclosing
6267         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
6268
6269 2005-09-28  Martin Baulig  <martin@ximian.com>
6270
6271         * object.c (mono_runtime_invoke_array): Added support for
6272         MONO_TYPE_GENERICINST; fixes #75917.
6273
6274 2005-09-27  Martin Baulig  <martin@ximian.com>
6275
6276         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
6277         `k->byval_arg.type' to determine the actual type.
6278
6279         * loader.c (method_from_methodspec): Removed some hacks.
6280
6281 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6282
6283         * class-internals.h (mono_field_is_deleted): Do the test for
6284         rtspecialname before we check the actual name of the field. This
6285         prevents us from dereferencing a pointer into the string table,
6286         saving us from accessing a few pages
6287
6288         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6289         macros. This will allow a deadlock debugger to easily be plugged
6290         in.
6291
6292 2005-09-27  Martin Baulig  <martin@ximian.com>
6293
6294         * loader.c (method_from_methodspec): Create a "signature"
6295         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
6296
6297 2005-09-27  Martin Baulig  <martin@ximian.com>
6298
6299         * class.c
6300         (inflate_generic_class): Correctly set the new context's
6301         container.
6302
6303         * loader.c
6304         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
6305         instead of a `MonoGenericContext *'.
6306         (mono_method_signature_full): Take a `MonoGenericContainer *'
6307         instead of a `MonoGenericContext *'.
6308
6309         * metadata.c
6310         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
6311         instead of a `MonoGenericContext *'.
6312         (mono_metadata_parse_method_signature_full): Likewise.
6313
6314 2005-09-26  Martin Baulig  <martin@ximian.com>
6315
6316         * class.c
6317         (mono_class_from_generic_parameter): Set `klass->generic_container'
6318         (mono_class_from_generic_parameter): Likewise.
6319         (mono_bounded_array_class_get): We inherit the generic container
6320         from the element class.
6321
6322         * loader.c
6323         (find_method, find_method_in_class): Take a `MonoGenericContext *'
6324         argument rather than computing it here.
6325         (method_from_memberref): Correctly set the generic context before
6326         parsing the signature.  Fixes #75681.
6327
6328 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6329
6330         * object.c (mono_class_has_special_static_fields): Fix warnings.
6331
6332 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6333
6334         * assembly.c: Add parse_public_key function, to
6335         par the public keys. Also added mono_assembly_name_parse_full,
6336         to define it the parsed key should be freed or not.
6337         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
6338         to parse a long format assembly name.
6339         * metadata-internals.h: Keep mono_assembly_name_parse_full as
6340         private, since calling it to preserve the key requires
6341         freeing it manually.
6342         
6343 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
6344
6345         * locales.c : removed HAVE_ICU part.
6346
6347 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6348
6349         * object.c (mono_class_create_runtime_vtable): Avoid calling 
6350         field_is_special_static if the klass has no special static fields.
6351
6352         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
6353         (MonoCachedClassInfo): Likewise.
6354
6355         * object.c (mono_class_has_special_static_fields): New helper function.
6356
6357 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6358
6359         * class.c (mono_class_create_from_typedef): Don't call 
6360         interfaces_from_typedef_full for enums.
6361         (mono_class_create_from_typedef): Compute the base types of enums directly
6362         without calling mono_class_setup_fields ().
6363         (mono_class_find_enum_basetype): New helper function.
6364
6365         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
6366         one place inside the string heap.
6367         
6368 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
6369
6370         * class.c: locking fixes, code cleanups, some docs added.
6371         Allocate some data structures in the image mempool.
6372
6373 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6374
6375         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
6376         the example code.
6377         
6378 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
6379
6380         * class-internals.h, class.c, reflection.c: reduce memory taken by
6381         MonoClass.
6382
6383 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
6384
6385         * metadata.c, metadata.h, loader.h: documentation updates, code and
6386         API cleanups.
6387
6388 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6389
6390         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
6391         the example code.
6392
6393         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
6394         page faults caused by the runtime while reading metadata.
6395
6396 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6397
6398         * socket-io.c: the field names were changed 3 months ago and no one
6399         realized until bug #76077 got filed!
6400
6401 2005-09-20  Martin Baulig  <martin@ximian.com>
6402
6403         * icall.c (assembly_icalls): Removed some unused debugger icalls.
6404
6405 2005-09-20  Martin Baulig  <martin@ximian.com>
6406
6407         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
6408         write the rank into the class entry.
6409
6410 2005-09-20  Martin Baulig  <martin@ximian.com>
6411
6412         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
6413
6414 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
6415
6416         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6417
6418         * icall.c (custom_attrs_defined_internal): New icall.
6419
6420         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
6421         function.
6422         (mono_custom_attrs_construct_by_type): New helper function.
6423
6424 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
6425
6426         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
6427         terminate the resulting string. Fixes #76123.
6428
6429 2005-09-16  Martin Baulig  <martin@ximian.com>
6430
6431         * mono-debug.c
6432         (mono_debug_add_method): Ignore inflated methods for the moment.
6433
6434 2005-09-14  Martin Baulig  <martin@ximian.com>
6435
6436         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
6437
6438 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
6439
6440         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
6441         return a success/failure indication.
6442         (mono_metadata_interfaces_from_typedef_full): Ditto.
6443         (get_constraints): Ditto.
6444
6445 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6446
6447         * marshal.c (emit_marshal_array): Fix handling of null arrays.
6448         
6449         * marshal.c (emit_marshal_array): Add support for returning string
6450         arrays from delegates. Fixes #76063.
6451
6452         * marshal.c: Use the emit_ldloc/stloc macros where possible.
6453
6454 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6455
6456         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
6457         icall.
6458
6459 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6460
6461         * reflection.c icall.c: Fix after mono_get_exception_type_load
6462         signature change.
6463
6464         * assembly.c (mono_assembly_get_assemblyref): New helper function.
6465         (mono_assembly_load_reference): Use the new helper.
6466
6467         * class-internals.h (MonoLoaderError): New structure containing 
6468         information about type loading errors.
6469
6470         * class-internals.h loader.c: Add APIs to store per-thread loader
6471         error information.
6472
6473         * loader.c class.c: Set the loader error if needed.
6474
6475         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
6476
6477 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
6478
6479         * decimal.c: fixed to handle the broken ARM fp format.
6480
6481 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
6482
6483         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
6484         broken.
6485
6486 2005-09-06  Martin Baulig  <martin@ximian.com>
6487
6488         * domain.c (supported_runtimes): Added v2.0.50727.
6489
6490 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
6491
6492         * culture-info.h: reduce the size of some structures.
6493
6494 2005-09-05  Martin Baulig  <martin@ximian.com>
6495
6496         Reflect latest API changes in the August CTP.
6497
6498         * icall.c
6499         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
6500         ("MonoType.HasGenericArguments"): Removed.
6501         ("MonoMethod.BindGenericParameters"): Renamed to
6502         "MakeGenericMethod".
6503         ("MethodBuilder.BindGenericParameters"): Renamed to
6504         "MakeGenericMethod".    
6505
6506 2005-09-05  Martin Baulig  <martin@ximian.com>
6507
6508         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
6509
6510 2005-09-05  Martin Baulig  <martin@ximian.com>
6511
6512         Applying a patch from Michal Moskal <malekith@nemerle.org>.
6513
6514         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
6515         generic_container is non-NULL.
6516
6517 2005-09-05  Martin Baulig  <martin@ximian.com>
6518
6519         Applying a patch from Michal Moskal <malekith@nemerle.org>.
6520
6521         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
6522
6523 2005-08-29  Michal Moskal  <malekith@nemerle.org>
6524
6525         * reflection.c (encode_locals,
6526         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
6527         for large generic types.
6528
6529 2005-09-05  Martin Baulig  <martin@ximian.com>
6530
6531         Applying a patch from Michal Moskal <malekith@nemerle.org>.
6532
6533         * class.c (mono_dup_array_type): New public method.
6534         (mono_metadata_signature_deep_dup): New public method.
6535         (dup_type): Correctly duplicate array and function types.
6536
6537 2005-09-05  Martin Baulig  <martin@ximian.com>
6538
6539         Applying a patch from Michal Moskal <malekith@nemerle.org>.
6540
6541         * reflection.c (get_default_param_value_blobs): Handle generic types
6542         and generic methods.
6543
6544 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
6545
6546         * class.c: Fixed error reporting (method/class were inversed) for 
6547         inheritance demands.
6548         * security-manager.c|h: Added the AppDomain when calling the managed
6549         System.Security.SecurityManager.InheritanceDemand method.
6550
6551 2005-09-01  Raja R Harinath  <rharinath@novell.com>
6552
6553         * reflection.c (encode_marshal_blob): 'marshaltype' and
6554         'marshaltyperef' are alternate sources for the custom marshaler
6555         name.
6556
6557 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
6558
6559         * class.c: fix creation of array classes with rank == 1
6560         (patch by Ankit Jain <jankit@novell.com>).
6561
6562 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
6563
6564         * object.c: fix check for creating the bound data for arrays vs
6565         szarrays.
6566
6567 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6568
6569         * object.c: configuration file name is now based on the executable name,
6570         not the image name. Fixes bug #75931.
6571
6572 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
6573
6574         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
6575         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
6576
6577 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
6578
6579         * rand.c: Use wincrypt.h instead of WinCrypt.h.
6580
6581 2005-08-24  Ankit Jain  <jankit@novell.com>
6582             Raja R Harinath  <rharinath@novell.com>
6583
6584         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
6585           called by it recursively.
6586           (mono_class_init): Remove special case in pending_init handling, since it's
6587           superseded by the fix to mono_class_from_typeref.
6588
6589 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6590
6591         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
6592         BROKEN_THREAD_START stuff.
6593
6594 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
6595
6596         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
6597         trampoline.
6598
6599         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
6600         
6601         * object.c (mono_delegate_ctor): Replace the original function address with
6602         a delegate trampoline.
6603
6604 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
6605
6606         * icall.c: add boolean argument to base64_to_byte_array and 
6607         InternalFromBase64String to control whether a whitespace-only string
6608         is allowed (or should casue a FormatException to be thrown). We need
6609         this as the behavior has changed between MS.NET 1.x and 2.0, and we
6610         to match the MS behaviour in both profiles.
6611         * appdomain.c: Bump corlib version.
6612
6613 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6614
6615         This patch implements a big portion of publisher policy
6616         support, used to bind assembly versions and redirect
6617         one assembly from version A to version B.
6618
6619         * assembly.c:
6620         New GSList loaded_assembly_bindings, for storing the cached
6621         assembly bindings.
6622         (assembly_binding_maps_name): New static function for checking if a 
6623         assembly binding information maps an assembly name.
6624         (mono_assembly_binding_info_free): New function for freeing
6625         assembly binding information resources.
6626         (get_publisher_policy_info): New static function for retrieving 
6627         assembly binding information from a MonoImage.
6628         (compare_versions): New static function for comparing an assembly
6629         binding information data and the version of an assembly name.
6630         (check_policy_versions): New static function for checking if an
6631         assembly binding info mapping an assembly name is valid for it.
6632         (mono_assembly_load_publisher_policy): New static function for
6633         loading the 'policy.major.minor.MyAssembly' image for an assembly
6634         with an assembly name 'aname'.
6635         (mono_assembly_bind_version): New static function for updating
6636         assembly redirection.
6637         (mono_assembly_apply_binding): New static function for applying
6638         assembly binding.
6639         (search_binding_loaded): New static function for searching 
6640         loaded assembly binding infos in the cache domain.
6641         (mono_assembly_load_full): Don't apply assembly binding for
6642         reflection only assemblies.
6643
6644         * metadata-internals.h: Add MonoAssemblyBindingInfo,
6645         which contains information about assembly binding. Also
6646         declare signature for mono_config_parse_publisher_policy ()
6647         function, used to retrieve pub policy info.
6648         
6649         * mono-config.c:
6650         (publisher_policy_start): New static function used to parse publisher 
6651         policy config files.
6652         (publisher_policy_parser): New static MonoParseHandler containing 
6653         the functions used when parsing config files.
6654         (mono_config_parse_publisher_policy): New function for parsing
6655         publisher policy files.
6656         
6657 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
6658
6659         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
6660
6661         * marshal.c (mono_delegate_free_ftnptr): Ditto.
6662
6663         * object.c (mono_get_addr_from_ftnptr): New helper function.
6664
6665         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
6666
6667         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6668
6669 2005-08-19  Dick Porter  <dick@ximian.com>
6670
6671         * threads.c, threads.h, appdomain.c, appdomain.h,
6672         profiler-private.h, monitor.c, object.c, object-internals.h,
6673         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
6674         store the thread ID, so it can hold a 64 bit value if needed.
6675
6676 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
6677
6678         * reflection.c (mono_reflection_create_dynamic_method): Store the
6679         handle class into the method references as well so ldtoken works in
6680         dynamic methods.
6681
6682         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
6683         types.
6684
6685 2005-08-19  Ankit Jain <jankit@novell.com>
6686
6687         Fix #75847.
6688         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
6689           here rather than using the method signature of a arbitrary function
6690           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
6691           two arguments.
6692           Hack done with Harinath.
6693
6694 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6695
6696         * threadpool.c: disable printing stack traces when we get a exception
6697         in a threadpool thread. I need to do more testing to figure out which
6698         cases actually print this. Fixes bug #75828.
6699
6700 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6701
6702         * icall.c: there might be ignored whitespace after the last '='. This
6703         fixes length computation and bug #75840.
6704
6705 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
6706
6707         * assembly.c (mono_assembly_load_full): Consider .exe extension as
6708         well. Fixes #75809.
6709
6710         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
6711         #75784.
6712         
6713         * reflection.c (create_custom_attr_data): Ditto.
6714
6715 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
6716
6717         * locales.c, culture-info.h : removed RegionLCIDMap.
6718         * culture-info-tables.h : regenerated.
6719
6720 2005-08-16  Martin Baulig  <martin@ximian.com>
6721
6722         * class.c (mono_type_get_name_recurse): Small fix.
6723
6724 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
6725
6726         * locales.c : indentation fixie.
6727
6728 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
6729
6730         * object-internals.h,
6731           locales.h,
6732           locales.c,
6733           culture-info.h,
6734           icall.c : added RegionInfo table support.
6735         * culture-info-table.h : regenerated for region support.
6736
6737 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
6738
6739         * reflection.c (resolve_object): handle all kinds of MonoMethod
6740         including generic ones
6741
6742 2005-08-12  Ankit Jain <jankit@novell.com>
6743
6744         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
6745           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
6746
6747 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
6748
6749         * process.c: Don't close a thread handle when it's NULL. This is a
6750         workaround for bug #75733.
6751
6752 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
6753
6754         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
6755
6756 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
6757
6758         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
6759
6760 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6761
6762         * threadpool.c: if a work item in the thread pool has a callback that
6763         catches a exception, don't propagate it after invoking the callback.
6764         Fixes bug #75336.
6765
6766 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
6767
6768         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
6769
6770         * class-internals.h (MonoCachedClassInfo): Add some new fields.
6771
6772         * class.c (mono_class_init): Load field info lazily in the AOT case.    
6773
6774         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
6775
6776 2005-08-03  Ankit Jain  <jankit@novell.com>
6777
6778         Fix #75683.
6779         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
6780           PInvoke calling convention is 0.
6781
6782 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
6783
6784         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
6785         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
6786
6787 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
6788
6789         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
6790         to handle threads not started by the GC (patch by Michael Meeks
6791         <michael.meeks@novell.com>).
6792
6793 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
6794
6795         * reflection.c: Make buffer used in emitting types larger for some
6796         big generic types (patch by Michal Moskal).
6797
6798 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
6799
6800         * mono-debug.c: Fix some (not all) alignment problems.
6801
6802 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6803
6804         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
6805         Invoke mono_image_load_from_data_full passing the refonly
6806         parameter.
6807
6808         * assembly.c
6809         (mono_assembly_open_from_bundle): Add the refonly argument, 
6810         in order to pass it to other methods it calls to.
6811         (do_mono_assembly_open): Add the refonly argument, in order 
6812         to pass it to other methods it calls to.
6813         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
6814         the refonly parameter to it.
6815
6816         * image.c: Add loaded_images_refonly_hash and
6817         loaded_images_refonly_guid_hash to cache the reflection
6818         only loaded images.
6819         (mono_images_init): Initialize the hash tables used for
6820         caching the reflection only images.
6821         (load_modules): Invoke mono_image_open_full passing the refonly
6822         parameter to load the modules the correct way.
6823         (build_guid_table): Add the refonly argument, to re-build the 
6824         correct hash table.
6825         (do_mono_image_open): Added the refonly argument, in order to
6826         define it for the loaded image.
6827         (mono_image_loaded_full): New function, which receives an
6828         additional parameter to look for the image in the refonly or
6829         non-refonly section.
6830         (mono_image_loaded): Updated, using mono_image_loaded_full.
6831         (mono_image_loaded_by_guid_full): The same case that happens
6832         with mono_image_loaded_full.
6833         (mono_image_loaded_by_guid): Likewise.
6834         (register_image): Use the ref_only variable inside MonoImage
6835         to decide in which hash table store the current image.
6836         (mono_image_open_from_data_full): Rename
6837         mono_image_open_from_data to mono_image_open_from_data_full,
6838         adding the refonly argument, to define the ref_only variable 
6839         inside MonoImage.
6840         (mono_image_open_from_data): Return 
6841         mono_image_open_from_data_full.
6842         (mono_image_open_full): Rename mono_image_open to
6843         mono_image_open_full, receiving the new refonly argument,
6844         to pass it to inner methods.
6845         (mono_pe_file_open): Update this function, to open
6846         a MonoImage as a non-refonly image.
6847         (mono_image_close): Use the refonly variable inside
6848         MonoImage to remove the image from the correct caches.
6849
6850         * image.h: Add the signatures of mono_image_open_full,
6851         mono_image_open_from_data_full, mono_image_loaded_full,
6852         mono_image_loaded_by_guid_full.
6853
6854         * metadata-internals.h: Add the ref_only field to 
6855         MonoImage.
6856         
6857 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6858
6859         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
6860         Fix the last behavior, which used to load the assemblies and
6861         extract MonoReflectionAssemblyName information, instead of
6862         extract it from the metadata tables. Needed for Reflection
6863         Only assemblies.
6864         
6865 2005-07-29  Martin Baulig  <martin@ximian.com>
6866
6867         * mono-debug-debugger.c
6868         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
6869         not initialized.
6870
6871         * mono-debug.c
6872         (mono_debug_address_from_il_offset): Check whether we have
6873         debugging support before attempting to take the lock.
6874         (mono_debug_source_location_from_address): Likewise.
6875         (mono_debug_source_location_from_il_offset): Likewise.
6876         (mono_debug_il_offset_from_address): Likewise.
6877         (mono_debug_address_from_il_offset): Likewise.
6878
6879 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
6880
6881         * class.c (mono_class_from_name_case): Add support for dynamic images.
6882         Fixes #75650.
6883
6884         * object.c (mono_class_compute_gc_descriptor): Add a workaround
6885         for #75479.
6886
6887 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
6888         
6889         * reflection.c (mono_method_get_object): Fix warning.
6890
6891 2005-07-28  Martin Baulig  <martin@ximian.com>
6892
6893         * mono-debug.c
6894         (mono_debug_add_wrapper): Also write the wrapper type.
6895
6896 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
6897
6898         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
6899         
6900         * class.c (mono_class_init): Avoid reading nested classes if the AOT
6901         data indicates the class has none.
6902
6903 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
6904
6905         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
6906         loader lock with the debugger lock. Prevents deadlocks for beagle.
6907
6908         Beagle can now run on an smp box for a weekend without any
6909         issues. Woohoo!
6910
6911 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
6912
6913         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
6914         in a module. Fixes #75629.
6915
6916 2005-07-26  Martin Baulig  <martin@ximian.com>
6917
6918         * mono-debug.c (mono_debug_add_wrapper): New static method.
6919         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
6920         interncall or a wrapper.
6921
6922         * mono-debug.h (MonoDebugWrapperData): New public typedef.
6923         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
6924         (MONO_DEBUGGER_VERSION): Bump to 51.
6925
6926         * mono-debug-debugger.c
6927         (mono_debugger_add_type): Removed this empty function.
6928         (mono_debugger_add_method): Likewise.
6929
6930 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
6931
6932         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
6933         before accessing method->slot.
6934
6935 2005-07-21  Jb Evain  <jbevain@gmail.com>
6936
6937         * reflection.c (method_encode_clauses/class): Handle filters clauses.
6938         Fixes #75010.
6939
6940 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
6941
6942         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
6943         #75587.
6944
6945 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
6946
6947         * image.h image.c: Add mono_image_get_guid () API function.
6948
6949 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
6950
6951         There were issues when multiple threads tried to load
6952         assemblies. A deadlock was created between assemblies_mutex and
6953         mono_domain_assemblies_lock. This fixes the issue by making the
6954         assembly ref counting be lock free. See bug 75586.
6955         
6956         * image.c (mono_image_close): The add ref function here was using
6957         Interlocked operations while the unref was using a mutex and a
6958         --. I don't think this was ever a bug that would be exposed in a
6959         non-pendantic way (ie, by an embedder doing a ref on one thread
6960         and an unref on another), but for the sake of correctness, this is
6961         now Interlocked.
6962
6963         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
6964         (mono_assembly_load_reference): Call mono_assembly_addref rather
6965         than touching the refcount ourselves.
6966         (mono_assembly_close): Use InterlockedDecrement to unref the
6967         assembly. Don't acquire the lock unless it is actually needed.
6968
6969 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
6970
6971         * class.c (mono_class_layout_fields): Fix calculation of has_references
6972         for generic types.
6973
6974 2005-07-12  Martin Baulig  <martin@ximian.com>
6975
6976         Applying a patch from Michal Moskal <malekith@nemerle.org>.
6977
6978         * metadata.c
6979         (mono_type_hash): Provide better hashing for generic instances.
6980         (mono_generic_inst_hash): Improve hashing.
6981         (mono_generic_class_hash): Likewise.
6982
6983         * reflection.c (mymono_metadata_type_hash): Improve hashing for
6984         generic instances.
6985
6986 2005-07-12  Martin Baulig  <martin@ximian.com>
6987
6988         * reflection.c (mono_reflection_create_runtime_class): Remove the
6989         hack for generic type definitions and non-`Run' assemblies.
6990         (mono_reflection_bind_generic_parameters): Also use
6991         `klass->wastypebuilder' to check for TypeBuilders.
6992
6993 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
6994
6995         * class.c (mono_class_layout_fields): Fix calculation of has_references
6996         for generic types.
6997
6998         * class.c (inflate_generic_class): Fix a leak.
6999         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
7000         for generic types.
7001
7002 2005-07-11  Martin Baulig  <martin@ximian.com>
7003
7004         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
7005         on error.
7006
7007 2005-07-11  Martin Baulig  <martin@ximian.com>
7008
7009         * loader.c (find_method): Also lookup in
7010         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
7011
7012 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7013
7014         * appdomain.c (mono_domain_unload): Don't free the error message
7015         before passing it to mono_get_exception_...
7016
7017         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
7018         
7019 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
7020
7021         * threads.c: try to better guess an available RT signal (bug #75387).
7022
7023 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7024
7025         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
7026         and CACHE_OBJECT.
7027
7028 2005-07-07  Martin Baulig  <martin@ximian.com>
7029
7030         * class.c (mono_type_get_name_full): Return NULL for
7031         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
7032         fixes #75408.
7033
7034 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7035
7036         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
7037         exit the appdomain as well being aborted.
7038
7039         * threadpool.c: Create all threadpool threads inside the root appdomain, and
7040         change back to the root domain after calling managed code. This enables
7041         appdomains using threadpools to be unloaded.
7042
7043 2005-07-07  Martin Baulig  <martin@ximian.com>
7044
7045         * class-internals.h
7046         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
7047         into `MonoDynamicGenericClass' since we only need it for dynamic
7048         types.
7049
7050         * reflection.c (mono_class_bind_generic_parameters): We don't need
7051         to compute the `parent' here.
7052
7053 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
7054
7055         * culture-info-table.h : regenerated.
7056
7057 2005-07-06  Martin Baulig  <martin@ximian.com>
7058
7059         * icall.c
7060         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
7061
7062         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
7063
7064 2005-07-06  Martin Baulig  <martin@ximian.com>
7065
7066         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
7067         we're doing a signature-only comparision; fixes #74945.
7068
7069 2005-07-06  Martin Baulig  <martin@ximian.com>
7070
7071         * class-internals.h (MonoGenericClass): Moved some things out into
7072         a new `MonoInflatedGenericClass' type.  
7073         (MonoInflatedGenericClass): New type; the `klass' of a
7074         `MonoGenericClass' is now computed lazyly in
7075         mono_get_inflated_generic_class().      
7076
7077         * class.c (mono_get_inflated_generic_class): New public function.
7078         (mono_class_inflate_generic_method): Removed the unused
7079         `MonoClass *' argument.
7080         (setup_generic_vtable): Don't call mono_get_inflated_method() on
7081         all the methods.
7082         (mono_class_create_generic): Make this static and merge it with
7083         mono_class_create_generic_2(); we're now called automatically from
7084         mono_get_inflated_generic_class().
7085
7086         * loader.c (mono_method_signature): Call
7087         mono_get_inflated_method() here.
7088
7089 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
7090
7091         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
7092         type of fields with RVA.
7093
7094         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
7095         for this pseudo class.
7096         (my_mono_class_from_generic_parameter): Likewise.
7097         (mono_class_init): Allow interfaces to have cctors.
7098
7099 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7100
7101         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
7102         lazily for AOT methods.
7103
7104 2005-07-05  Martin Baulig  <martin@ximian.com>
7105
7106         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
7107         returns FALSE for a successful match, not TRUE.
7108
7109 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7110
7111         * loader.c (mono_method_get_index): Optimize this a bit.
7112
7113 2005-07-04  Martin Baulig  <martin@ximian.com>
7114
7115         * class.c
7116         (class_compute_field_layout): Move the check for generic type
7117         definitions into mono_class_layout_fields().  Fixes #74684.
7118         (mono_class_from_generic_parameter): Correctly compute
7119         `klass->parent'; fixes #75457.
7120
7121         * reflection.c (register_assembly, register_module): Make sure
7122         `domain->rejobject_hash' is already created.
7123
7124 2005-07-02  Martin Baulig  <martin@ximian.com>
7125
7126         * class-internals.h
7127         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
7128         `MonoDynamicGenericClass'.      
7129
7130 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
7131
7132         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
7133         returned by a field getter is null, since null is a valid value.
7134
7135 2005-07-01  Martin Baulig  <martin@ximian.com>
7136
7137         * reflection.c (mono_reflection_generic_class_initialize): Update
7138         the `dgclass->fields [i].parent' to the correct class.
7139         (mono_image_get_fieldref_token): Use the declaring type, not the
7140         reflected type.
7141
7142 2005-07-01  Martin Baulig  <martin@ximian.com>
7143
7144         * loader.c (find_method): Also look in the interfaces; fixes #75429.
7145
7146 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
7147
7148         * threads.c (thread_cleanup): assert that thread != NULL
7149         (wait_for_tids_or_state_change): We were using the wrong variable
7150         when accessing wait->threads. `i' was always out of the bounds of
7151         the array.
7152
7153 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7154
7155         * loader.c: map user32 and kernel32 to libMonoSupportW
7156
7157 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7158
7159         * appdomain.c (unload_thread_main): Mark this as WINAPI.
7160
7161 2005-06-28  Martin Baulig  <martin@ximian.com>
7162
7163         * loader.c (method_from_methodspec): Fix #75334.
7164
7165 2005-06-28  Martin Baulig  <martin@ximian.com>
7166
7167         Fix #74953 - Arrays now implement the generic IList<T> interface
7168         on the 2.0 platform.
7169
7170         * class-internals.h (MonoDefaults): Added `generic_array_class'.
7171
7172         * reflection.c (mono_class_bind_generic_parameters): New public
7173         function; similar to mono_reflection_bind_generic_parameters(),
7174         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
7175
7176         * domain.c (mono_init_internal): Try to initialize.
7177         `mono_defaults.generic_array_class' here; this'll only succeed if
7178         we're using the 2.0 corlib.
7179
7180         * icall.c
7181         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
7182         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
7183         (mono_lookup_internal_call): Added support for nested classes.
7184
7185         * loader.c
7186         (mono_get_method_from_token): Set `result->signature->pinvoke' if
7187         we're an interncall and have generic arguments.
7188
7189         * class.c
7190         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
7191         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
7192         instance of System.Array.InternalArray<T> for arrays, so they
7193         implement the generic IList<T> interface.
7194
7195 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
7196
7197         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
7198         (chastamar@yahoo.com). Fixes #75374.    
7199
7200 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
7201
7202         * culture-info-table.h: regenerated.
7203
7204 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7205
7206         * icall.c: handle spaces correctly for base64 strings.
7207
7208 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7209
7210         * *.c: Kill some warnings.
7211
7212 2005-06-23  Duncan Mak  <duncan@novell.com>
7213
7214         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
7215         that this builds on Solaris 10 (x86).
7216
7217 2005-06-23  Martin Baulig  <martin@ximian.com>
7218
7219         * class.c
7220         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
7221         generic type definitions.
7222
7223 2005-06-23  Martin Baulig  <martin@ximian.com>
7224
7225         Fix #75331.
7226
7227         * metadata.c (mono_class_get_overrides): Renamed to
7228         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
7229         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
7230         pass it to mono_get_method_full().
7231
7232 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
7233
7234         * reflection.c (mono_reflection_create_runtime_class): take the
7235         mono_domain_lock in this method. Prevents deadlocks
7236
7237 2005-06-22  Martin Baulig  <martin@ximian.com>
7238
7239         * loader.c (method_from_methodspec): Fix #75330.
7240
7241 2005-06-22  Martin Baulig  <martin@ximian.com>
7242
7243         * reflection.c (type_get_qualified_name): Use
7244         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
7245         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
7246         argument; use it if we don't have an assembly name.
7247
7248 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
7249
7250         * object.c: In mono_message_init, set "copy out" flag for in
7251         parameters with the [Out] flag.
7252
7253 2005-06-21  Martin Baulig  <martin@ximian.com>
7254
7255         * class.c
7256         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
7257         and MONO_TYPE_PTR.
7258
7259 2005-06-21  Martin Baulig  <martin@ximian.com>
7260
7261         * class.c (mono_class_init): Don't initialize `class->fields' for
7262         generic instances since they're initialized again in
7263         compute_field_layout(). 
7264         (compute_field_layout): Set the field's `generic_info' here; fix
7265         #75320. 
7266
7267 2005-06-21  Martin Baulig  <martin@ximian.com>
7268
7269         * class-internals.h
7270         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
7271
7272         * metadata.c (mono_metadata_generic_method_equal): Also
7273         distinguish the `generic_class'; fixes #75334.
7274
7275 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7276
7277         * domain.c:
7278         * appdomain.c:
7279         * domain-internals.h:
7280         * reflection.c: 'domain_assemblies' field is now protected by its own
7281         lock. Don't call into managed code to run the AssemblyLoad event if we
7282         now there are no registered delegates for it.
7283
7284 2005-06-20  Martin Baulig  <martin@ximian.com>
7285
7286         * class.c (mono_class_is_assignable_from): Use a custom version of
7287         mono_class_has_parent() to make things work for generic instances;
7288         fix #75300.
7289
7290 2005-06-20  Martin Baulig  <martin@ximian.com>
7291
7292         * loader.c (method_from_methodspec): Apply a patch from
7293         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
7294
7295 2005-06-20  Martin Baulig  <martin@ximian.com>
7296
7297         * class.c (mono_class_init): Reverted Zoltan's last change; it
7298         breaks generics.
7299
7300 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7301
7302         * threads.c (wait_for_tids_or_state_change): Add missing locking.
7303
7304 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7305
7306         * socket-io.c: fix the index in the socket array for writable/error
7307         sockets. Fixes bug #75306.
7308
7309 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7310
7311         * class.c (mono_class_init): Allow interfaces to have static ctors.
7312
7313 2005-06-17  Martin Baulig  <martin@ximian.com>
7314
7315         * loader.c (method_from_methodspec): Use `context->container' when
7316         parsing the `gmethod->inst'.
7317
7318 2005-06-17  Martin Baulig  <martin@ximian.com>
7319
7320         * class.c (mono_type_get_name_recurse): Don't add the assembly
7321         name for type arguments.
7322
7323 2005-06-15  Martin Baulig  <martin@ximian.com>
7324
7325         * reflection.c (mono_image_get_inflated_method_token): Encode
7326         correct klass; fixes #75260.
7327
7328 2005-06-13 Michal Moskal <malekith@nemerle.org>
7329
7330         * icall.c: Make GetCorrespondingMethod/Constructor take
7331         MonoReflectionMethod method not MonoMethod. Removed
7332         MonoType.GetCorrespondingField, and make
7333         MonoGenericType.GetCorrespondingField take name not
7334         MonoClassField.
7335
7336 2005-06-13  Michal Moskal <malekith@nemerle.org>
7337
7338         * reflection.c (field_encode_signature, encode_locals):
7339          Make sizes of buffers for types larger (for big generic types).
7340          (create_generic_typespec,
7341          mono_reflection_sighelper_get_signature_local,
7342          mono_reflection_sighelper_get_signature_field):
7343          Add asserts for too small buffers.
7344
7345 2005-06-15  Martin Baulig  <martin@ximian.com>
7346
7347         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
7348         if our parent is not a dynamic type.
7349
7350 2005-06-15  Martin Baulig  <martin@ximian.com>
7351
7352         * class-internals.h (MonoTypeNameFormat): New enum.
7353
7354         * class.c
7355         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
7356         (mono_type_get_full_name): Removed.
7357         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
7358         argument instead of the boolean's.
7359
7360         * icall.c (ves_icall_System_MonoType_getFullName):
7361         Added `gboolean assembly_qualified'.    
7362
7363         * reflection.h
7364         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
7365
7366         * reflection.c (mono_reflection_parse_type): Parse the new type
7367         name format.
7368
7369 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7370
7371         * icall.c: no need to convert from utf16 to utf8 and then back again
7372         after the call to GetLogicalDrives.
7373
7374 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7375
7376         * icall.c: frombase64. Fix problems exposed by new tests.
7377
7378 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7379
7380         * icall.c: added internal calls for converting char [] and strings in
7381         base64 into byte [].
7382
7383 2005-06-10  Martin Baulig  <martin@ximian.com>
7384
7385         * class.c (mono_class_create_generic_2): Read the nested classes
7386         from the metadata rather than from `gklass->nested_classes' since
7387         `gklass' might not be initialized yet.
7388
7389 2005-06-09  Duncan Mak  <duncan@novell.com>
7390
7391         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
7392         all public headers. Fixes #74919.
7393
7394 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
7395
7396         * domain.c: The key for proxy_vtable_hash is now a pointer
7397         array. Added new GHashFunc and GCompareFunc functions for this.
7398
7399         * class.h: The list of interfaces in MonoRemoteClass is known in
7400         advance and can't grow (we create a new MonoRemoteClass if needed),
7401         so now the interface array can be allocated together with
7402         MonoRemoteClass.
7403         
7404         * object.c: Added a new method create_remote_class_key.
7405         Fixed mono_remote_class so it does not depend on
7406         mono_upgrade_remote_class.
7407         Removed extend_interface_array.
7408         Added new method clone_remote_class(), which makes a copy of a remote
7409         class and adds a new interface or class to it.
7410         mono_upgrade_remote_class() now creates a new remote class (or gets
7411         it from the cache) if an vtable upgrade is needed. In this way
7412         we make sure that other objects sharing the same remote class
7413         don't get the new vtable with unwanted interfaces.
7414         
7415         * object-internals.h:
7416         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
7417         
7418         * marshal.c: Track changes in mono_upgrade_remote_class().
7419
7420 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
7421         * icall.c: Add runtime methods for obtaining members of inflated
7422         class, which were created from supplied non-inflated members. It
7423         is used in internal Get{Method,Constructor,Field} methods in
7424         System.Type
7425
7426 2005-06-09  Martin Baulig  <martin@ximian.com>
7427
7428         * reflection.c
7429         (mono_reflection_bind_generic_method_parameters): Fix #75169.
7430
7431 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7432         * reflection.c (mono_image_basic_init): Define
7433         Version in MonoDynamicAssembly. 
7434         
7435 2005-06-08  Martin Baulig  <martin@ximian.com>
7436
7437         Fix #75136.
7438
7439         * loader.c
7440         (mono_method_signature_full): New public method; takes a
7441         `MonoGenericContext *'.
7442         (find_method): Use mono_method_signature_full() and pass the
7443         klass'es context to it.
7444
7445         * class.c (mono_class_is_inflated_method): Use
7446         mono_method_signature_full() and pass the context to it.
7447
7448 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
7449
7450         * object.c: add proper locking in mono_remote_class_vtable(),
7451         fixes possible memory corruption.
7452
7453 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
7454
7455         * marshal.c (mono_remoting_marshal_init): set
7456         initialized after initialization.
7457
7458 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
7459
7460         * locales.c : hush.
7461
7462 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
7463
7464         * object.c (extend_interface_array): fix really silly
7465         memory corrupting / comparison bug.
7466
7467 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7468
7469         * reflection.c: Functions added to support the creation
7470         of CustomAttributeData, which includes Attribute data
7471         used by ReflectionOnly methods.
7472
7473         * reflection.h:  mono_reflection_get_custom_attrs_data and
7474          mono_custom_attrs_data_construct added (functions exposed).
7475
7476          * icall.c: Added mono_reflection_get_custom_attrs_data
7477          as icall.
7478         
7479 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7480
7481         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
7482         lupus's request.
7483
7484 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
7485
7486         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
7487
7488         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
7489         dynamic DllImportAttribute.
7490
7491         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
7492         dynamic DllImportAttribute.
7493
7494         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
7495         Fixes #75162.
7496
7497 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7498
7499         * threads.c: avoid segfault when an unstarted thread is aborted.
7500
7501 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
7502
7503         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
7504         Returns the name and version of the runtime for reporting.
7505
7506 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7507
7508         * appdomain.c: bump corlib version.
7509         * object-internals.h: new field in MonoReflectionAssembly.
7510
7511 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7512
7513         * object-internals.h: Carlos forgot to add this field.
7514
7515 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7516
7517         * icall.c: Added create_version to create instances
7518         of Version of MonoReflectionAssemblyName. This change helps
7519         the AssemblyName tests to keep running fine.
7520         
7521 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
7522   
7523         * object.c (mono_method_return_message_restore): A somehow less
7524         intrusive fix for #75138.
7525
7526 2005-06-03  Raja R Harinath  <rharinath@novell.com>
7527
7528         * object.c (mono_method_return_message_restore): Fix computation
7529         of expected number of out args.
7530
7531 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
7532
7533         * reflection.c (mono_image_get_method_info): Fix the case when the
7534         charset is empty.
7535
7536 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
7537
7538         * object.c: Added missing null check in
7539           mono_method_return_message_restore.
7540
7541 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
7542
7543         * reflection.c (mono_image_get_method_info): Handle the case when
7544         dllentry is empty.
7545
7546 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
7547
7548         * object.c: When creating the vtable for a proxy, take into account
7549         all inherited interfaces, not only the ones registered in
7550         iclass->interfaces. This fixs bug #74996.
7551         Also, in mono_method_return_message_restore, verify that the array
7552         of out args has the expected lengh.
7553
7554 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7555
7556         * socket-io.c: update the timeout in Poll when the call is interrupte.
7557
7558 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7559
7560         * socket-io.c: support abort/suspend in Select_internal after last
7561         change.
7562
7563 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7564
7565         * threadpool.c: remove warning.
7566
7567 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7568
7569         * icall.c:
7570         * socket-io.[ch]: Select_internal uses poll() now when available, thus
7571         removing the 1024 limit from select(). Runtime part of the fix for
7572         bug #71203.
7573
7574 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7575
7576         * socket-io.c: when resolving the addresses for the same
7577         host returned by gethostname(), get the local IPs from the interface
7578         list. Loopback addresses are discarded if the are interfaces up with
7579         non-loopback ones. Fixes bug #63265.
7580
7581 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
7582
7583         * appdomain.c, verify.c, object-internals.h, reflection.c:
7584         bumped corlib number to 36, and added new extra_flags field
7585         to ReflectionMethodBuilder and friends.  Fixes #75060.
7586
7587 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
7588
7589         * gc.c: register a new weak link only if the object is non-null
7590         (fixes bug#75047).
7591
7592 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
7593
7594         * culture-info.h : short time pattern too.
7595
7596 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
7597
7598         * culture-info.h : expand long time pattern string length.
7599
7600 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
7601
7602         * culture-info-table.h : update (more French date format; #72788).
7603
7604 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
7605
7606         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
7607         the method is static. Fixes #75029.
7608
7609 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
7610
7611         * reflection.c: Update the table_idx field of method builders after
7612         saving the module, since it can change. This is a workaround for
7613         bug #74914. 
7614
7615 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
7616
7617         * culture-info-table.h : update (additional French date format).
7618
7619 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7620
7621         * icall.c (ves_icall_type_Equals): Revert last change.
7622         
7623         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
7624
7625         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
7626
7627 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
7628
7629         * class-internals.h: Added executioncontext_class field to 
7630         MonoDefaults structure.
7631         * domain.c: Cache System.Threading.ExecutionContext class in 
7632         mono_defaults.
7633         * object.c: Capture the ExecutionContext for asynchroneous calls in
7634          mono_async_result_new.
7635         * object-internals.h: Added execution_context and original_context 
7636         fields to MonoAsyncResult. Added execution_context to MonoThread.
7637         * security-manager.c|.h: Added mono_get_context_capture_method to 
7638         return the capture method (if required by the security manager or by
7639         the framework version used).
7640         * threadpool.c: Apply capture (if present) ExecutionContext in 
7641         mono_async_invoke and revert to original context after it completes.
7642
7643 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
7644
7645         * culture-info-table.h : updated (real hacky solution for zh-CHT).
7646
7647 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
7648
7649         * culture-info-table.h : zh-CHT related workaround.
7650
7651 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
7652
7653         * marshal.c (emit_marshal_custom): Add some error checking and call the
7654         methods in the ICustomMarshaler interface. Fixes #74875.
7655         
7656         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
7657         native->managed wrappers.
7658
7659 2005-05-12  Martin Baulig  <martin@ximian.com>
7660
7661         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
7662         here and use the loader lock.
7663
7664         * mono-debug.c: Properly lock when the debugger is not attached.
7665         (mono_debug_init): Release the initial lock if we're not running
7666         in the debugger.
7667
7668 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
7669
7670         * marshal.c (emit_marshal_custom): Pass through NULL values without
7671         calling the custom marshalling routines.
7672
7673         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
7674         conversion in structures. Fixes #74882.
7675
7676 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
7677
7678         * culture-info-table.h : zh-* cultures were missing.
7679
7680 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
7681
7682         * threads.c: Added a new event background_change_event which is signaled
7683         when a thread changes its background mode.
7684         Moved here several checks previously done in managed code. The checks
7685         require the thread lock, and using the thread lock in managed code
7686         can result in deadlocks.
7687         Merged Start_internal and Thread_internal into a single method. Now 
7688         Thread_internal does all work of creating and starting a thread.
7689         Added icalls for setting and getting the state of the object. Moved from
7690         managed code to avoid locking there.
7691         Added wait_for_tids_or_state_change() which is called instad of
7692         wait_for_tids when waiting for non-backround threads to end. This method
7693         will return if one of the threads ends or the background_change_event
7694         is signaled.
7695         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
7696         the background mode. This method signals the background_change_event
7697         event.
7698         * icall.c:
7699         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
7700         removed Start_internal.
7701         
7702 2005-05-11  Martin Baulig  <martin@ximian.com>
7703
7704         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
7705         to order of some fields to get proper alignment on 64-bit machines.
7706
7707 2005-05-11  Martin Baulig  <martin@ximian.com>
7708
7709         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
7710         changes as they're broken and completely fuck up the debugger.
7711
7712         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
7713
7714 2005-05-10  Martin Baulig  <martin@ximian.com>
7715
7716         * reflection.c (mono_reflection_generic_class_initialize): Don't
7717         call mono_class_setup_parent() here.
7718
7719 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7720
7721         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
7722         send/receive timeout use an integer in milliseconds. We were using a
7723         struct timeval.
7724
7725 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7726
7727         * locales.c:
7728         (internal_get_cultures): reserve the first slot of the array for the
7729         InvariantCulture, which will be filled in managed code.
7730
7731 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
7732
7733         * reflection.c (mono_image_fill_module_table): Initialize the
7734         GENERATION field as well.
7735
7736 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7737
7738         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
7739         Monitor.Enter on the object.
7740
7741 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7742
7743         * threads.c: Enable the wait for running threads when exiting.
7744         * icall.c: Suspend all threads before exiting.
7745
7746 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7747
7748         * assembly.c (mono_assembly_load_reference): Fix warning.
7749
7750 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7751
7752         * threadpool.c: changed the default number of threads per cpu. From now
7753         on, the default will be 20 + (5 * number of cpus) instead of 50.
7754
7755 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
7756
7757         * loader.c (mono_method_get_signature_full): Add locking here.
7758
7759 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
7760
7761         * appdomain.c: Moved methods for parsing and freeing assembly
7762         names to assembly.c.
7763         * assembly.c, domain-internals.h: Created public methods for parsing
7764         assembly names. Fixed mono_assembly_load_with_partial_name:
7765         it now finds the best match, taking into account the version,
7766         token and culture specified in the partial name. Also return
7767         the latest version if no version information is specified.
7768
7769 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
7770
7771         * threadpool.c: replace check for SocketAsyncCall class.
7772
7773 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7774
7775         * threadpool-internals.h:
7776         * Makefile.am: added threadpool-internals.h
7777
7778         * threadpool.c: call mono_unhandled_exception on exceptions not handled
7779         that happen in threadpool threads (tested on MS).
7780         (mono_thread_pool_remove_socket): new function that dispatch any pending
7781         AIO call on a socket that is closing. By now only epoll really needs it,
7782         as select/poll wake up when the socket closes.
7783
7784
7785         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
7786
7787 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
7788
7789         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
7790
7791 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
7792
7793         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
7794
7795 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
7796
7797         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
7798         has an abort request, convert it into a suspend request.
7799
7800 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
7801
7802         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
7803         warning for the usage of `UnmanagedFunctionPointerAttribute' which
7804         is not supported yet.
7805
7806 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7807
7808         * image.c: register assemblies loaded from data (bundles) in the loaded
7809         assemblies hash. Fixes bug #74772.
7810
7811 2005-04-29  Martin Baulig  <martin@ximian.com>
7812
7813         * class.c (mono_type_get_name_recurse): Update to the new naming
7814         schema from the latest .NET 2.x beta2.
7815         (mono_class_setup_vtable_general): If we're a generic instance,
7816         copy the vtable from our generic type definition and inflate all
7817         the methods in it.
7818
7819         * loader.c (find_method): Update to the new naming schema from the
7820         latest .NET 2.x beta2.
7821
7822 2005-04-29  Raja R Harinath  <harinath@gmail.com>
7823
7824         * class.c (mono_class_init): Add a mono_loader_unlock to the
7825         #74734 fix.
7826
7827 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7828
7829         * icall.c (ves_icall_System_Environment_Exit): Remove the 
7830         suspend_all_other_threads () call for the time being, since it can hang.
7831
7832         * threads.c (mono_thread_manage): Similarly, disable the waiting for
7833         the background threads to exit, since it can also hang.
7834
7835         * class.c (mono_class_init): Applied patch from Ankit Jain 
7836         (radical@gmail.com). Avoid pending init errors when a field refers
7837         to a nested class using a typeref. Fixes #74734.
7838
7839         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
7840         this for dynamic modules.
7841
7842 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7843
7844         * threads.c: don't wait for threads that are in the process of aborting
7845         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
7846         and waiting for background threads to finish. This makes xsp and
7847         mod-mono-server exit without random length delays and/or hangs.
7848
7849 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7850
7851         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
7852
7853 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
7854
7855         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
7856         dynamic types to prevent infinite loops. Fixes #74727.
7857
7858         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
7859         ..._is_assignable_to.
7860
7861 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
7862
7863         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
7864
7865 2005-04-25  Martin Baulig  <martin@ximian.com>
7866
7867         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
7868
7869         * domain.c
7870         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
7871
7872         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
7873
7874         * reflection.c (build_compressed_metadata): Set metadata header
7875         version to 2.0.
7876
7877 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7878
7879         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
7880         number into an integral and a decimal part. Fixes #70473.
7881
7882         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
7883
7884 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
7885
7886         * culture-info-table.h : reflected the latest locale-builder output.
7887
7888 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7889
7890         * threadpool.c: check for SuspendRequested too when deciding if
7891         mono_thread_interruption_checkpoint should be called.
7892
7893 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7894
7895         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
7896         * threads.c: remove interruption_mutex and use Interlocked instead. When
7897         suspending all the threads, wait for all the suspended events at once.
7898         If we're shutting down and get an APC that is going to be queued,
7899         call mono_thread_execute_interruption immediately, as the thread might
7900         be sleeping on a pthread condition or mutex.
7901
7902         * icall.c: call mono_runtime_set_shutting_down before suspending the
7903         threads.
7904
7905         Fixes bug #74693. And now xsp is happier when exiting.
7906
7907 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7908
7909         * loader.c (mono_stack_walk): Fix #74690.
7910
7911 2005-04-22  Martin Baulig  <martin@ximian.com>
7912
7913         * mono-debug.h (MonoDebugMethodJitInfo): Added
7914         `MonoDebugMethodJitInfo *jit'.
7915
7916         * mono-debug.c (mono_debug_read_method): Cache the
7917         MonoDebugMethodJitInfo in `address->jit'.
7918         (mono_debug_free_method_jit_info): New public method.
7919
7920 2005-04-22  Martin Baulig  <martin@ximian.com>
7921
7922         * class.c (mono_class_is_assignable_from): Disallow
7923         type parameter -> interface.
7924
7925 2005-04-21  Dick Porter  <dick@ximian.com>
7926
7927         * threads.c (mono_thread_create): Turn an assertion into an error.
7928
7929 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7930
7931         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
7932         
7933         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
7934         Fix some gcc 4.0 warnings.
7935
7936 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
7937
7938         * file-io.c: fix alt dir separator char on unix systems
7939         and cleanup (fixes bug #71214).
7940
7941 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
7942
7943         * marshal.c: Use CALLVIRT instead of CALL when dispatching
7944         a call to a remote domain, since the method may be an
7945         interface method in the client domain. This fixes bug #74192.
7946
7947 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7948
7949         * threadpool.c: recv/send are now performed before going back to managed
7950         code to save one transition.
7951
7952 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7953
7954         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
7955
7956         * metadata/threadpool.c: removed hack to workaround the bug above.
7957
7958         Fixes bug #74618.
7959
7960 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7961
7962         * reflection.c reflection.h: Fix handling of parameter defaults in
7963         dynamic methods. Also fixes handling of parameter attributes.
7964         Fixes #74609.
7965
7966         * mono-debug.c (mono_debug_close_image): Fix warning.
7967
7968 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7969
7970         * socket-io.h: replaced old unused field with new 'blocking'.
7971         * threadpool.c: restore socket blocking state on windows(tm).
7972
7973 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
7974
7975         * icall.c: don't return the codebase in the AssemblyName[] returned by
7976         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
7977         * object-internals.h: Removed FIXME (fields were presents) and fixed
7978         versioncompat declaration.
7979
7980 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7981
7982         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
7983         not closed, so don't cleanup when it happens.
7984
7985 2005-04-13  Chris Toshok  <toshok@ximian.com>
7986
7987         * mono-debug-debugger.h: change prototype for
7988         mono_debugger_lookup_type.
7989
7990         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
7991         this function, although it should probably be named
7992         mono_debugger_init_type.
7993
7994 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7995
7996         * threadpool.c: fix non-AIO case.
7997
7998 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7999
8000         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
8001         the built-in profiler to measure just JIT compilation times.
8002
8003 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8004
8005         * threadpool.c: the epollfd might be closed by another thread at
8006         any time, so ignore EBADF at treat it as a "we're closing" sign.
8007
8008 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8009
8010         * threadpool.c: release the semaphores with a count equals to the number
8011         of working threads in both IO and regular pools. Fixed typo that messed
8012         up the count of IO pool threads. Don't initialize the pipe handles if
8013         we're using epoll.
8014
8015 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8016
8017         * threadpool.c: some systems don't like a NULL when deleting the socket
8018         from epoll.
8019
8020 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8021
8022         * threadpool.c: fix semaphore allocation.
8023
8024 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8025
8026         * threadpool.c: added epoll() based implementation for asynchronous IO
8027         that is used instead of the default poll() when available.
8028         It can be disabled by setting MONO_DISABLE_AIO.
8029
8030 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8031
8032         * threadpool.c: windows needs 'closesocket' and instead of returning
8033         0 when the stream is closed while in select, it returns -1. Fixes bug
8034         #74573.
8035
8036 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
8037
8038         * class.c (class_compute_field_layout): Fix the regression caused by
8039         the previous try.
8040
8041 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8042
8043         * threadpool.c: separate pool for socket async. IO.
8044         * threadpool.h: mono_max_worker_threads is not a global any more.
8045
8046 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
8047
8048         * class.c (class_compute_field_layout): Fix #74549.
8049
8050 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8051
8052         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
8053         use 2 connected sockets instead.
8054
8055 2005-04-08  Miguel de Icaza  <miguel@novell.com>
8056
8057         * mono-config.c: Add new entry point for mkbundle
8058         mono_config_parse_memory. 
8059
8060 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8061
8062         * threadpool.c: removed another unused function.
8063
8064 2005-04-08  Ankit Jain  <radical@corewars.org>
8065
8066         * reflection.c (get_default_param_value_blobs): Add 'types'
8067         parameter to get the types encoded in the constant table.
8068         (mono_param_get_objects): Use the type from the constant table,
8069         not the type of the parameter, when creating default values.
8070         Handle null default values correctly.
8071
8072 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8073
8074         * file-io.c:
8075         * file-io.h:
8076         * threadpool.c:
8077         * threadpool.h:
8078         * icall.c:
8079         * socket-io.c: removed dead code for async IO.
8080
8081 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8082
8083         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
8084
8085         * threadpool.c: intercept socket async. calls and pass them to a thread
8086         that is polling and dispatching the job items to the threadpool as
8087         socket become ready. Fixes bugs #71217, #71933.
8088
8089         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
8090         between char and short/ushort arrays.
8091
8092         * socket-io.c: remove dead code.
8093
8094 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
8095
8096         * locales.c,
8097           icall.c : removed InternalToUpper_Comp() and
8098           InternalToLower_Comp().
8099
8100 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
8101
8102         * char-conversions.h : The tables were incorrectly generated. Should
8103           be generated against invariant culture.
8104
8105 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
8106
8107         * object.c (mono_runtime_invoke_array): Fix return value when 
8108         passing pre-created valuetype objects to ctors.
8109
8110         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
8111         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
8112         Fixes #74338.
8113
8114 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
8115
8116         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
8117         only used with --security and hides the wrong corlib version error.
8118
8119 2005-03-30  Joshua Tauberer  <tauberer@for.net>
8120
8121         * class.c: Changed mono_class_name_from_token so that types
8122         outside of a namespace don't have an initial period.  Improved
8123         the g_warning message used in _mono_class_get when loading
8124         fails.
8125         * assembly.c: In mono_assembly_load_reference, when an assembly
8126         can't be found, "No such file or directory" is misleading and
8127         unhelpful because a few paths were checked for the presence of
8128         the assembly.  When that happens (ENOENT), display a nicer
8129         message indicating the directories that were searched.  In all
8130         cases, the warning is made easier to read for non-hackers.
8131
8132 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
8133
8134         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
8135         project/solution.
8136         * appdomain.h|domain.c: Removed inline from functions.
8137         * appdomain.c: Reduced warnings when compiling on windows.
8138         * icall.c: Fixed output_debug declaration to gunichar2*.
8139         * mono-config.c: Reduced warnings when compiling on windows.
8140         * rand.c: Added missing "windows.h". Added missing return value.
8141         * rawbuffer.c: Added missing winsock2.h for windows.
8142         * sysmath.h: Added mono-compiler.h header to allow/ease 
8143         compilation with non-GCC compilers.
8144         * threads.c: Fixed declarations to compile with VS.NET C compiler.
8145         Removed cast warnings.
8146
8147         Adapted from the work of J Lothian (for VC6).
8148
8149 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
8150
8151         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
8152         from default_path.
8153
8154 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
8155
8156         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
8157         the 2.0 profile.
8158
8159 2005-03-27  Raja R Harinath  <harinath@gmail.com>
8160
8161         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
8162         has to be in $(exec_prefix).  $(prefix) is for arch-independent
8163         stuff, and it would probably use $(prefix)/share rather than
8164         $(prefix)/lib.
8165
8166 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8167
8168         * console-io.c: added 2 includes that might be missing.
8169
8170 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
8171
8172         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
8173         profile.
8174
8175         * reflection.c (create_custom_attr): Allocate the params array using
8176         alloca so it gets GC tracking.
8177
8178 2005-03-23  Chris Toshok  <toshok@ximian.com>
8179
8180         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
8181         out some spew.
8182
8183 2005-03-24  Raja R Harinath  <rharinath@novell.com>
8184
8185         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
8186         changes to pick up any changes in prefix, etc.
8187
8188 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
8189
8190         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
8191         
8192         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
8193         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
8194
8195 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
8196
8197         * class-internals.h object-internals.h class.c reflection.c: Extend the
8198         mono_lookup_dynamic_token () function to return the class of the
8199         token as well. 
8200
8201         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
8202         well. Fixes #73848.
8203
8204 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
8205
8206         * security-manager.c: Skip inheritance checks for intra-corlib
8207         class inheritance and method overrides. This skips a lot of checks
8208         and (anyway) permissions cannot work until corlib is loaded.
8209
8210 2005-03-23  Martin Baulig  <martin@ximian.com>
8211
8212         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
8213         MONO_TYPE_GENERICINST.  
8214
8215 2005-03-23  Martin Baulig  <martin@ximian.com>
8216
8217         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
8218
8219 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8220
8221         * class.c: added locking comments to some functions.
8222         Cache the interface offsets arrays (saves about 20 KB
8223         of runtime memory in a typical app).
8224         Reduce the time overhead in mono_class_setup_supertypes ().
8225
8226 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
8227
8228         * icall.c: speedup and fix leaks in GetMethodsByName and
8229         GetPropertiesByName.
8230
8231 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
8232
8233         * reflection.c: some locking fixes.
8234
8235 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
8236
8237         * metadata.c: added missing break in case statement.
8238
8239 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
8240
8241         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
8242         typedbyref return values. Fixes #73941.
8243
8244 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
8245
8246         * security-manager.c|h: Added demandunmanaged method and 
8247         suppressunmanagedcodesecurity class to MonoSecurityManager.
8248         Renamed aptc class to allowpartiallytrustedcallers.
8249
8250 2005-03-17  Martin Baulig  <martin@ximian.com>
8251
8252         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
8253
8254 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8255
8256         * file-io.c: disabled file async. IO using aio_*. It uses the
8257         threadpool now. Workaround for bug #73718.
8258
8259 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
8260
8261         * assembly.h, mono-config.c: added code to deal with bundled configs
8262         for bundled assemblies.
8263
8264 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
8265
8266         * *.c, private.h: cleanup, removing old private.h header file.
8267
8268 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
8269
8270         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
8271         and throw_on_unmappable_char attributes.
8272
8273 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
8274
8275         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
8276         _ProcessName_internal.
8277
8278 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
8279
8280         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
8281         #73631.
8282
8283         * icall.c threads.c threads-types.h: Remove slothash icalls as they
8284         are no longer used.
8285
8286 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
8287
8288         * object.c (compute_class_bitmap): Add support for generics. Fixes
8289         #73527.
8290
8291 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
8292
8293         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
8294
8295 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8296
8297         * filewatcher.c: commented out the code for windows watcher, as we don't
8298         use it (we use the managed implementation instead).
8299
8300 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
8301
8302         * object-internals.h (MonoThread): Remove 'unused1' field.
8303
8304         * appdomain.c: Bump corlib version.
8305
8306         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
8307
8308         * reflection.c (mono_reflection_create_runtime_class): Remove the
8309         AssemblyBuilder.Save optimization since it causes too many problems.
8310
8311 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
8312
8313         * exception.c|h: Added mono_get_exception_reflection_type_load to
8314         create a ReflectionTypeLoadException object.
8315         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
8316         to return NULL is a InheritanceDemand fails during reflection. Updated
8317         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
8318         ReflectionTypeLoadException if an InheritanceDemand fails during 
8319         reflection. Added icall mapping for GetLinkDemandSecurity.
8320         * security-manager.c|h: Added ves_icall_System_Security_
8321         SecurityManager_GetLinkDemandSecurity internal call to return the
8322         class and methods permissions set for a LinkDemand. Removed unused
8323         fields in MonoSecurityManager.
8324
8325 2005-03-10  Martin Baulig  <martin@ximian.com>
8326
8327         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
8328         it's a generic instance.
8329
8330 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
8331
8332         * reflection.c (mono_get_object_from_blob): Applied patch from
8333         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
8334
8335         * class.c (mono_class_is_assignable_from): Another try at fixing 
8336         #73469 without breaking anything.
8337
8338 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
8339
8340         * class.c: (mono_class_is_assignable_from): Revert the last changes
8341         since they don't work with generics.
8342         
8343         * class.c (mono_class_is_assignable_from): Fix build bustage.
8344
8345         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
8346         the managed IsAssignableFrom method. Fixes #73469.
8347
8348         * reflection.c (mono_reflection_call_is_assignable_from): New helper
8349         function.
8350
8351 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
8352
8353         * object.c (mono_load_remote_field_new): Fix returning uninitialized
8354         memory when the remoting callback does not sets the out arguments.
8355         Fixes #73007.
8356
8357         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
8358         by mistake.
8359
8360         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
8361
8362         * object-internals.h (MonoStackFrame): Sync with managed object layout.
8363
8364         * appdomain.c: Bump corlib version.
8365
8366 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
8367
8368         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
8369         function.
8370
8371         * threads.c (mono_thread_attach): Detect threads which are not started
8372         by the GC pthread wrappers.
8373
8374 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
8375
8376         * icall.c: Added new icall for RNG.
8377         * rand.c|h: Added new icall to open the RNG. This allows to share a 
8378         single handle on Linux to access /dev/urandom and fix #73183.
8379
8380 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
8381
8382         * object.c: setting the new vtable in a transparent proxy object must
8383         not change the GC descriptor.
8384
8385 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
8386
8387         * object.c: fixed compilation without GCJ support.
8388         * reflection.c: for runtime-created types ensure klass->has_references
8389         is correct (bug #73215).
8390
8391 2005-03-02  Martin Baulig  <martin@ximian.com>
8392
8393         * class.c (mono_class_is_assignable_from): Make this work if
8394         `oklass' is a generic instance; fixes #72831.
8395
8396 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
8397
8398         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
8399         with hasthis set.
8400         
8401         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
8402
8403         * marshal.c: Reorganize native->managed marshalling code to also use
8404         the emit_marshal_... functions.
8405
8406 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
8407
8408         * object.c: typed allocs have issues with bitmap sizes > 30,
8409         so check for max_set >= 30.
8410
8411 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
8412
8413         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
8414         managed code. Fixes #73012.
8415
8416         * metadata.h (MonoMarshalSpec): Add elem_mult field.
8417
8418         * metadata.c reflection.c: Load/Emit elem_mult as well.
8419         
8420         * metadata.h (MonoMarshalSpec): Add comment.
8421
8422         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
8423
8424         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
8425         num_elem to -1 if not given.
8426
8427         * object-internals.h (MonoReflectionMarshal): Add has_size field.
8428
8429         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
8430         given values.
8431
8432 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
8433
8434         * null-gc.c (mono_gc_free_fixed): Was not compilable.
8435
8436 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
8437
8438         * reflection.c (encode_marshal_blob): Encode param_num field as well.
8439
8440         * object-internals.h (MonoReflectionMarshal): Add param_num field.
8441
8442 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
8443
8444         * object.c: generalized the reference bitmap creation
8445         and added hooks for the new GC.
8446         * class-internals.c: removed the gc_bitmap field from MonoClass.
8447
8448 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8449
8450         * domain.c: help the compiler to produce better code
8451         in mono_jit_info_table_find ().
8452
8453 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
8454
8455         * object.c: make all allocations look typed.
8456
8457 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8458
8459         * socket-io.c: load Mono.Posix if it's not loaded already
8460         (fixes bug#73033).
8461
8462 2005-02-24  Martin Baulig  <martin@ximian.com>
8463
8464         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
8465         * reflection.c (dup_type): Likewise.
8466
8467 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
8468
8469         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
8470         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
8471
8472 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8473
8474         * domain.c, threads.c, object-internals.h: make the critical thread
8475         local vars use the fast access mode (even when we're compiled in
8476         a lib). Provide accessors to be used by the jit during codegen.
8477
8478 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8479
8480         * appdomain.c: Changed hook functios behavior to include
8481         support for the reflection only assemblies. Some icalls were changed
8482         to support the mentioned assemblies too. Signatures of static methods
8483         try_assembly_resolve and real_load now have an additional parameter:
8484         refonly.
8485
8486         * assembly.c: General changes to mono_assembly_ methods to support
8487         reflection only api. Functions mono_assembly_open, mono_assembly_load,
8488         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
8489         suffix, to support an additional gbool parameter to specify whether
8490         the assembli is reflection only or not. Created some new hook functions 
8491         to add support for reflection only assemblies. Signatures of static 
8492         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
8493         have now an additional parameter: refonly.
8494
8495         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
8496         indicating whether the assembly is reflection only or not.
8497
8498         * exception.c: Add mono_get_exception_invalid_operation.
8499
8500         * icall.c: Throw an InvalidOperationException when trying to invoke
8501         a property/method/event, or trying to set/get the value of a field.
8502         Also add an icall to retrieve the ref_only flag to the
8503         MonoReflectionAssembly.
8504
8505 2005-02-23  Chris Toshok  <toshok@ximian.com>
8506
8507         Part of fix for #72827.
8508         * mono-debug.c (mono_debug_add_method): add lexical block data to
8509         the info we write.  Kind of a hack at the moment - we copy the
8510         lexical block info from the MonoDebugMethodInfo to the
8511         MonoDebugMethodJitInfo here, before writing it.
8512         (mono_debug_read_method): read the lexical block info.
8513
8514         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
8515
8516         * debug-mono-symfile.h: add lexical block support.
8517
8518         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
8519         support.
8520
8521 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
8522
8523         * loader.c (mono_lookup_pinvoke_call): Fix warning.
8524
8525         * object.c (mono_runtime_free_method): Call mono_free_method () and
8526         put the TODOs there.
8527
8528         * loader.c (mono_free_method): Free up most memory allocated for 
8529         dynamic methods.
8530
8531 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8532
8533         * reflection.c: properly flag a Type argument to a
8534         named custom attr value (bug #72248).
8535
8536 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8537
8538         * reflection.c: reduce code duplication in named custom
8539         attribute encoding.
8540
8541 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
8542
8543         * reflection.c: properly encode custom attrs of type object
8544         (bug #72649).
8545
8546 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
8547
8548         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
8549
8550 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
8551
8552         * socket-io.c: load System.dll if it's not loaded already
8553         (bug #72850 and #70477).
8554
8555 2005-02-21  Martin Baulig  <martin@ximian.com>
8556
8557         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
8558         generic instances.
8559
8560 2005-02-21  Martin Baulig  <martin@ximian.com>
8561
8562         * reflection.c (mono_image_build_metadata): We also need to
8563         "fixup" the MethodImpl table after we computed the final method
8564         indices.  Call fixup_methodimpl() to do that.
8565         (fixup_methodimpl): New private method.
8566
8567 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
8568
8569         * assembly.c: special case mscorlib.dll (bug#72536),
8570         patch from Carlos Alberto Cortez.
8571
8572 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
8573
8574         * threads-types.h threads.c: Fix build bustage.
8575
8576         * threads.c: Use a union for long<->double conversions.
8577
8578         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
8579         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
8580
8581         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
8582         containing the checkpoint call with NOT_TAKEN.
8583         
8584         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
8585         checkpoint before pushing the arguments, so they won't have to be
8586         spilled to stack.
8587
8588 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
8589
8590         * domain.c, assembly.c, domain-internals.h: make some data
8591         const and relocation-free.
8592
8593 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8594
8595         * object.c, appdomain.c, class-internals.h: introduce the
8596         MonoClassRuntimeInfo structure to hold the info needed to
8597         use a class at runtime. Made mono_class_vtable() lock-free
8598         for all the appdomains.
8599
8600 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
8601
8602         * metadata-internals.h, image.c: introduce a per-image mempool to
8603         be used for memory that has the same lifetime as the image.
8604
8605 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
8606
8607         * domain.c: In mono_init_internal(), instead of selecting the first
8608         runtime version supported by an executable, get a list of all
8609         supported versions and select the one for which an mscorlib exists
8610         (since even if the runtime supports a given version, it doesn't mean
8611         that the framework for that version is installed).
8612         Modified get_runtimes_from_exe to support this behavior.
8613         In supported_runtimes, added information about additional system
8614         assembly versions.
8615         
8616         * assembly.c: Added support for more than one system assembly version
8617         per runtime version. Updated the assembly list.
8618         In mono_assembly_remap_version, removed the initial version check,
8619         since we don't know to which version we need to compare until we
8620         get the version set on which the assembly is based.
8621         Moved the code for loading corlib into the new method
8622         mono_assembly_load_corlib(), so it can be used by the initialization
8623         code.
8624         
8625         * domain-internals.h: Updated data structures and added declaration
8626         for mono_assembly_load_corlib.
8627
8628 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8629
8630         * reflection.c (resolve_object): Fix the creation of the signature in 
8631         the SignatureHelper case.
8632
8633         * assembly.c (mono_assembly_remap_version): Fix binary search.
8634         
8635 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
8636  
8637         * class.c: Added inheritance check when a method is overloaded (from a
8638         virtual method or when implementing an interface) and when a class is
8639         inherited. Added functions to set a failure for a class and to 
8640         retreive the exception from a failure.
8641         * class-internals.h: Added fields to MonoClass to keep the exception
8642         information status for inheritance (or other exceptions) to be thrown
8643         later (i.e. not at load time).
8644         * object.c: Throw the inheritance SecurityException when a type is to 
8645         be created with either class or method inheritance violations.
8646         * reflection.c|h: Fix when getting declsec from a class. Removed 
8647         unrequired code for class. Improved sanity in parameter naming.
8648         * security-manager.c|h: Added functions to check for class and method
8649         inheritance.
8650
8651 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8652
8653         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
8654         and has_finalize in dynamic types as well.
8655
8656 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
8657
8658         * culture-info-table.h : fixed currency format for en-GB (and so on).
8659
8660 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
8661
8662         * gc.c: ensure the GC handles never have 0 as a value.
8663
8664 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
8665
8666         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
8667         a pointer to a struct to unmanaged code. Fixes #72625.
8668
8669 2005-02-16  Martin Baulig  <martin@ximian.com>
8670
8671         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
8672
8673 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
8674
8675         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
8676
8677 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
8678
8679         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
8680
8681         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
8682         UnmanagedFunctionPointerAttribute, use it for determining calling convention
8683         etc. Fixes #71471.
8684
8685         * reflection.c (mono_custom_attrs_get_attr): New helper function.
8686
8687         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
8688
8689 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
8690
8691         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
8692         changes to make the current context a field in MonoThread.
8693
8694 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
8695
8696         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
8697         the last change.
8698         
8699         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
8700         extracted from mono_marshal_get_native_wrapper.
8701
8702         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
8703         to create wrappers around native functions.
8704
8705         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
8706         delegates for arbitrary function pointers. Fixes #71472.
8707
8708 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
8709
8710         * threads.c: cleaned up the code a little.
8711
8712 2005-02-15  Martin Baulig  <martin@ximian.com>
8713
8714         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
8715         the data table.
8716
8717         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
8718         allocate larger chunks if needed.
8719
8720 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8721
8722         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
8723         in by mistake.
8724
8725 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
8726
8727         * domain.c: keep the domains in an array and ensure the domain ids
8728         are kept small, so they can be used as indexes to domain-specific data
8729         with a small memory overhead.
8730
8731 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8732
8733         * icall.c: Handle byref types in Type icalls. Fixes #72544.
8734
8735 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
8736
8737         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
8738
8739 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8740
8741         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
8742
8743         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
8744         values.
8745
8746         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
8747         
8748 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8749
8750         * domain-internals.h: add the hashtable here.
8751
8752         * class-internals.h: Remove `info' from MonoMethod
8753
8754         * domain.c: Add a new hashtable, jit_trampoline_hash
8755
8756 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8757
8758         * object.c: don't set the value of static fields
8759         (fixes bug#72494).
8760
8761 2005-02-11  Martin Baulig  <martin@ximian.com>
8762
8763         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
8764         (mono_debug_add_method): Silently ignore the method if it's too big.
8765         (mono_debug_add_type): Likewise.
8766
8767 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
8768
8769         * threads.c, appdomain.c: remove #ifdefs from the code.
8770
8771 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8772
8773         * metadata-internals.h: Added flags to MonoAssembly to cache the most
8774         common security informations. This allows us to stay in unmanaged code
8775         when doing LinkDemand and it's special cases (except for the first 
8776         time for initialization). The flags a very much used with --security.
8777         * reflection.c|h: Added code to get declarative security attributes 
8778         for LinkDemand and InheritanceDemand. This required to refactor the
8779         existing code for Demand.
8780         * security-manager.c|h: Added new method fields for the special cases
8781         of LinkDemand.
8782
8783 2005-02-10  Martin Baulig  <martin@ximian.com>
8784
8785         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
8786         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
8787
8788 2005-02-10  Martin Baulig  <martin@ximian.com>
8789
8790         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
8791         debugging code; this is almost a complete rewrite.
8792
8793         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
8794
8795 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8796
8797         * domain.c, object.h: expose mono_string_equal () and 
8798         mono_string_hash ().
8799         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
8800         it's implemented in managed code.
8801
8802 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
8803
8804         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
8805         lo leak objects between appdomains.
8806
8807 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
8808
8809         * assembly.c: old compilers compilation fix from 
8810         robertj@gmx.net (Robert Jordan).
8811
8812 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
8813
8814         * class-internals.h: Little reminder for the future.
8815
8816         * debug-helpers.c: Fix up wrapper_type_names
8817
8818 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
8819
8820         * image.c, metadata-internals.h: when loading an image from a file,
8821         mmap all of it and use the same codepaths as when using a
8822         in-memory image: the code is simpler and we use less memory
8823         (both writable and readonly).
8824
8825 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
8826
8827         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
8828         API to alloc runtime data structures that need to be tracked by the
8829         GC and contain pointers.
8830         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
8831         make the code more readable and eventually use a different GC.
8832
8833 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
8834
8835         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
8836         for out arguments.
8837         
8838 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
8839
8840         * object.c: In release_type_locks(), don't release the cctor lock
8841         if it has already been released. This fixes a crash in the
8842         thread5 test.
8843
8844 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8845
8846         * gc.c, marshal.c, icall.c: register a delegate for finalization
8847         only when the native function pointer has been allocated for it.
8848
8849 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8850
8851         * object.c: cleaned up some code, allocate objects that are
8852         pointer free with the atomic malloc variant. Allocate memory
8853         for static data from the mempool if it's pointer-free.
8854         Allocate the bounds array at the end of the array data, when needed.
8855         * object-internals.h, object.h: move a private function in a private
8856         header.
8857         * class.c: handle missing case in tracking references in fields.
8858
8859 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
8860
8861         * class.c, class-internals.h: keep track if a type has
8862         reference fields in either the instance or static fields.
8863
8864 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
8865
8866         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
8867         and renamed to MonoRuntimeInfo. Added fields to store the expected
8868         framework assembly version. Changed mono_get_framework_version and
8869         mono_get_runtime_version for a single mono_get_runtime_info method.
8870         
8871         * assembly.c: Added method to remap system assembly versions to the
8872         current executing runtime version. Removed old mapping code.
8873         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
8874         
8875         * icall.c, reflection.c: Track api changes.
8876
8877 2005-02-06  Miguel de Icaza  <miguel@novell.com>
8878
8879         * loader.c (method_from_memberref): Improve error reporting,
8880         produce the class name instead of the typeref/typedef index. 
8881
8882 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
8883
8884         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
8885
8886 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8887
8888         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
8889         stdcall and charset name mangling.  Reorganize the code and add
8890         some tracing stuff.
8891
8892 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
8893
8894         * monodiet.c: More iters!
8895
8896         * marshal.c: Iter usage.
8897
8898         * icall.c: Iter usage.
8899
8900         * object.c: Use iters.
8901
8902         * debug-helpers.c: More iters
8903
8904 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8905
8906         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
8907         under win32.
8908
8909 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
8910
8911         * mono-debug-debugger.c: use iters
8912
8913         * class.c, class-internals.h: mono_class_setup_events is static
8914         now
8915
8916         * All callers: use iters
8917
8918 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8919
8920         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
8921         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8922
8923 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8924
8925         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
8926
8927         * marshal.h: Add prototypes for ldfld/stfld_remote.
8928
8929         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
8930         this is called during startup.
8931         
8932 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8933
8934         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
8935         MonoThreadsSync struct private in monitor.c. Changed the way
8936         MonoThreadsSync is allocated so it's faster and there is no
8937         need to keep track of it with a finalizer and it uses less memory.
8938         This also finally allows us to allocate mono objects as ptrfree when
8939         there are no reference fields.
8940
8941 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
8942
8943         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
8944         disappearing link to the GC interface and use them to simplify
8945         the gchandles code.
8946
8947 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8948
8949         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
8950         stfld_remote which call mono_load/store_field_new. This allows methods
8951         calling ldfld/stfld wrappers to be AOTed.
8952
8953         * console-io.c: Include sys/filio.h under solaris.
8954         
8955         * console-io.c: Include curses.h if needed correctly.
8956
8957 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8958         
8959         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
8960         method->klass as well.
8961
8962         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
8963
8964         * class.c (mono_class_init): Switch on lazy initialization of 
8965         methods.
8966
8967         * class.c (mono_class_get_finalizer): Handle the case when the 
8968         finalizer is inherited.
8969
8970 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8971
8972         * console-io.c: <curses.h> is needed by term.h on solaris.
8973
8974 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
8975
8976         * icall.c, class-internals.h, monodiet.c, class.c: Remove
8977         mono_class_setup_properties where possible. Remove this ftn from
8978         the header file, and make it static.
8979
8980 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8981
8982         * loader.c: Add missing setup_... call.
8983
8984         * class.c: Add missing setup_... calls.
8985
8986         * class.c (mono_class_init): Switch on lazy initialization of 
8987         the generic vtable.
8988         
8989         * class.c (mono_class_init): Fix generics broken by the recent changes.
8990
8991         * monodiet.c (handle_type): Add missing setup_... calls.
8992
8993         * class.c: Back out garbage in previous patch.
8994         
8995         * class.c: Add missing setup_... calls.
8996
8997         * class.c (mono_class_get_method_from_name_flags): Avoid calling
8998         mono_class_setup_methods () if possible.
8999
9000         * class-internals.h (MonoClass): Add 'has_cctor' flag.
9001
9002         * class-internals.h (MonoCachedClassInfo): New structure.
9003
9004         * class.c: Initialize properties and events fields of MonoClass lazily.
9005
9006         * class.c: Add infrastructure for lazily initializing the methods and
9007         vtable fields of MonoClass. Not yet used.
9008
9009         * class.c (mono_class_get_finalizer): New helper function.
9010
9011         * class.c: Add infrastructure for loading some class related data from
9012         an AOT file.
9013
9014         * object.c: Add infrastructure for initializing the vtable from data
9015         in the AOT file.
9016
9017         * gc.c (run_finalize): Use mono_class_get_finalizer ().
9018
9019         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
9020         appropriate initialization function before accessing parts of the
9021         MonoClass structure.
9022
9023         * marshal.c: Fix warnings.
9024         
9025         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
9026
9027         * mono-debug-debugger.c (get_exception_message): Use 
9028         mono_class_get_method_from_name_flags ().
9029
9030 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
9031
9032         * reflection.c, appdomain.c: Replace a few manual searches that
9033         Zoltan missed. (Paolo approved this part of my initial patch).
9034
9035 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
9036
9037         * profiler.c: disable recording statistical events at report time.
9038
9039 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
9040
9041         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
9042         to byteswap arrays of enum values, too (bug #72080).
9043
9044 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
9045
9046         * appdomain.c (set_domain_search_path): Allow this to be called if
9047         domain->setup is not yet set.
9048
9049         * loader.c (mono_method_get_index): New helper function.
9050
9051         * loader.c reflection.c: Use mono_method_get_index ().
9052
9053         * class.c (mono_class_get_method_from_name_flags): New helper method.
9054
9055         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
9056         this.
9057
9058         * class.c (mono_class_get_cctor): New helper method.
9059
9060         * string-icalls.c object.c class.c marshal.c reflection.c: Use
9061         mono_class_get_method () to look up methods.
9062
9063 2005-02-01  Miguel de Icaza  <miguel@novell.com>
9064
9065         * console-io.c: Fix the build, this should work on Windows.
9066
9067 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
9068
9069         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
9070         be set to null to keep things valid
9071
9072 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9073
9074         * icall.c: added Console 2.0 icalls.
9075         * Makefile.am: added console-io.[ch]
9076         * console-io.[ch]: internal calls for Console 2.0 API.
9077
9078 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9079
9080         * class.c: make sure we consider all the interfaces
9081         when calculating max_interface_id (bug found by
9082         Jeroen Frijters running ikvm).
9083
9084 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
9085
9086         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
9087         valuetype fields to null.
9088
9089         * object.c (set_value): Ditto. Fixes #71669.    
9090
9091 2005-01-31  Martin Baulig  <martin@ximian.com>
9092
9093         * metadata.c (mono_metadata_has_generic_params): New public
9094         function; checks whether something is a generic method.
9095
9096 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9097
9098         * appdomain.c: fix infinite recursion when adding assemblies.
9099
9100 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
9101
9102         * object.c: Fix small typo to return all items for Environment.
9103         GetCommandLineArgs.
9104
9105 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9106
9107         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
9108         reflection.c: more domain and assembly-unload related fixes
9109         and memory leaks plugs.
9110
9111 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
9112
9113         * 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.
9114
9115 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
9116
9117         * loader.c (mono_method_signature): Make this method lazy
9118         (mono_get_method_from_token): Don't computate the signature here.
9119
9120         Doing this saves quite a bit of memory. I got 90 kb on starting up
9121         monodoc. It should also save some disk reads on startup.
9122
9123         * *: MonoMethod->signature might be NULL now. You *MUST* use
9124         mono_method_signature.
9125
9126 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
9127
9128         * object.c (mono_runtime_get_main_args): Return an array from the
9129         current domain here. Fixes #71938.
9130
9131 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
9132
9133         * monitor.c: formatting changes to comply with the
9134         mono coding style and remove #ifdefs from the code.
9135
9136 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9137
9138         * metadata.c, private.h: remove some unneeded data
9139         and use a more compact representation for table schemas.
9140
9141 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
9142
9143         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
9144         to get a better distribution in hash tables.
9145         * *.c: use mono_aligned_addr_hash() where appropriate.
9146         * assembly.c: make var static.
9147
9148 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9149
9150         * domain-internals.h: Put MonoJitInfo on a diet.
9151
9152         * domain.c: Fix a warning.
9153
9154 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
9155
9156         * gc.c: rework the gc handles code to reuse handles
9157         when freed.
9158
9159 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
9160
9161         * domain.c: fixed long standing bug in mono_string_equal() which
9162         was brought to light with the ldstr changes.
9163
9164 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
9165
9166         * reflection.c: Remove warning by adding missing include for marshal.h
9167
9168 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
9169
9170         * domain.c, object.c: change the ldstr_table to hold
9171         MonoString* as keys: makes the runtime isinterned lookup
9172         faster and simplifies memory management.
9173
9174 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
9175  
9176         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
9177         possible to add imperative security checks before calling the icall.
9178         * reflection.c: Return security attributes on the original MonoMethod
9179         (and not the wrapped one). This fix permissions on icalls.
9180
9181 2005-01-25  Dick Porter  <dick@ximian.com>
9182
9183         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
9184         the check for mktime() support actually test the mktime() return
9185         value.  "Fixes" bug 71682, though the output is still different to
9186         MS.
9187
9188 2005-01-25  Martin Baulig  <martin@ximian.com>
9189
9190         * class.c (mono_class_is_assignable_from): Make this work for
9191         generic instances.
9192
9193 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
9194
9195         * marshal.c (mono_string_utf8_to_builder)
9196         (mono_string_builder_to_utf16): We might not have ownership of the
9197         string. In thise case, we need to create a new buffer.
9198
9199         * object-internals.h (mono_stringbuilder_capacity): sb->str might
9200         be null, in which case, use the default capacity.
9201
9202 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9203
9204         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
9205         GC events to the profiler.
9206
9207 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9208
9209         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
9210         if you don't want the GC to run.
9211
9212 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
9213
9214         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
9215         start providing a GC API and keeping different implementations in
9216         their own file.
9217         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
9218
9219 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
9220
9221         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
9222         mmap rather than allocating a huge buffer.
9223         (mono_debug_close_mono_symbol_file): Free the buffer allocated
9224         above.
9225
9226 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
9227
9228         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
9229         and CheckExecutionRights.
9230         * reflection.c|h: Keep the index of the declarative security to be 
9231         used, instead of the pointer, when AOT compiler is used. Also add 
9232         class initialization when requesting demands.
9233         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
9234         CheckExecutionRights. Both properties are now FALSE by default, and
9235         unmodifiable, unless the --security option is used.
9236
9237 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9238
9239         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
9240         reflection.c: properly refcount images and assemblies, many leaks fixed.
9241
9242 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9243
9244         * threadpool.c: increase the timeout for threads in the thread pool to
9245         10s.  Fixes bug #67159.
9246
9247 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
9248
9249         * class-internals.h: Sun's compiler insists on explicit
9250         signed on bit fields to handle then correctly.
9251
9252 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
9253
9254         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
9255         Make the size of the array fit only the number of invalid path
9256         chars that we have.
9257
9258         * class.c (_mono_class_get): Improve the error reporting when a
9259         class referenced is not found, to assist debugging. 
9260
9261 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
9262
9263         * threads.c: fix off-by-one error.
9264         * domain.c: free data allocated in the domain.
9265
9266 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
9267
9268         * reflection.c (mono_method_body_get_object): Fill out exception info
9269         as well.
9270
9271         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
9272         structure.
9273         
9274 2005-01-19  Martin Baulig  <martin@ximian.com>
9275
9276         * loader.c (mono_get_method_constrained): Make this work again.
9277
9278 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
9279
9280         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
9281         guint16 to match the managed side.
9282
9283         * reflection.c (mono_reflection_body_get_object): Fill out local
9284         variables array.
9285
9286         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
9287         as well.
9288
9289         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
9290         'local_var_sig_token'.
9291
9292 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9293
9294         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
9295         System.Drawing.
9296
9297         * reflection.c (mono_method_body_get_object): Handle abstract and
9298         runtime methods.
9299
9300 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
9301
9302         * marshal.c, loader.c, class-internals.h, reflection.c:
9303         store the emthod data for a wrapper in an array instead of a list.
9304
9305 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
9306
9307         * marshal.c: change the code to allocate memory more
9308         conservatively for method wrappers.
9309
9310 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9311
9312         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
9313         fields from MonoClass to the marshal info structure where they belong.
9314
9315 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
9316
9317         * class.c, object.c, class-internals.h, marshal.c: rearrange
9318         some fields and tweak some types to lower memory usage.
9319
9320 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9321
9322         * threads.c (signal_thread_state_change): Handle the case when the
9323         target thread is the current thread.
9324
9325         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
9326
9327         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
9328         emit_ptr_to_object_conv. 
9329
9330         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
9331         marshalling. Fixes #71352.
9332
9333 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9334
9335         * metadata.h, blob.h: move table enum to blob.h so it can be included
9336         in any header.
9337         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
9338         cut the size of MonoImage/MonoDynamicImage.
9339
9340 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
9341
9342         * profiler.c (mono_profiler_install_simple): Fix default arguments.
9343
9344 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
9345
9346         * reflection.c, reflection.h, icall.c: add a function to check
9347         if an attribute type is defined for a metadata object.
9348
9349 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
9350
9351         * object-internals.h: Added some needed fields from StringBuilder class.
9352         * marshal.c: Set the maxCapacity when creating a StringBuilder.
9353
9354 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
9355
9356         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
9357         threads before shutting down the runtime.
9358
9359         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
9360
9361 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9362
9363         * object-internal.h, threads.c: implement stacksize and 
9364         parameterized thread start functionality (requires
9365         matching corlib). Marked broken code for later removal.
9366
9367 2005-01-12  Martin Baulig  <martin@ximian.com>
9368
9369         * class-internals.h (MonoGenericClass): Moved the `initialized'
9370         flag to MonoDynamicGenericClass, removed `init_pending'.
9371         (MonoGenericInst): Added `is_reference' flag.
9372
9373 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
9374
9375         * reflection.c (mono_image_create_pefile): Only set the pe_offset
9376         inside the MSDOS header. Fixes #71201.
9377
9378         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
9379         gc thread.
9380         (mono_domain_finalize): Ditto.
9381
9382 2005-01-12  Martin Baulig  <martin@ximian.com>
9383
9384         * class.c (mono_get_shared_generic_class): Use the cache for
9385         non-dynamic generic classes.
9386
9387         * class-internals.h (mono_class_create_generic_2): Removed
9388         function prototype, this function is now static inside class.c.
9389
9390         * class.c (mono_class_create_generic_2): Made this static, only
9391         call it from mono_class_init() and mono_class_setup_parent().
9392         (collect_implemented_interfaces_aux): Call mono_class_init() on
9393         the interfaces we collect.
9394         (mono_class_setup_vtable): Call mono_class_init (class->parent).
9395
9396 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
9397
9398         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
9399         it a real thread handle.
9400
9401         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
9402         MonoJitExceptionInfo, since each catch clause needs its own variable.
9403         
9404 2005-01-11  Dick Porter  <dick@ximian.com>
9405
9406         * image.c (mono_pe_file_open): New variant on mono_image_open()
9407         that does not set up the CLI metadata; used for FileVersionInfo so
9408         it can get the data for windows binaries too.
9409         
9410         * process.c (process_read_string_block): Don't read off the end of
9411         the StringTable block.
9412
9413         These both fix bug 70766.
9414
9415 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
9416
9417         * gc.c: set some fields to NULL at GC cleanup time.
9418         * threads.c: if we quit the main thread, call exit ().
9419
9420 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
9421
9422         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
9423
9424 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
9425
9426         * threads.h, threads.c, object.c: added accessor and settor for
9427         main_thread. Handle it specially when exiting from it: wait
9428         for other foreground threads to exit.
9429
9430 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
9431
9432         * process.c, verify.c: remove some bloat.
9433
9434 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
9435
9436         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
9437         the calling convention to cdecl under win32.
9438
9439 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
9440
9441         * object.c (mono_object_get_size): New function to get the size of
9442         an object instance.
9443
9444         * profiler.c (simple_allocation): Use above.
9445
9446 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
9447
9448         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
9449         ves_icall_System_AppDomain_getRootDomain (as it's not required to
9450         get an appdomain by it's id and we can't assume the root's id is 0).
9451         * domain-internals.h: Change the function prototype to match.
9452         * icall.c: Change the icall table for AppDomain.
9453
9454 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
9455
9456         * locales.c (string_invariant_compare_char): Only compute
9457         GUnicodeTypes in the case where we need them.  Test for ordinality
9458         first and return if so.
9459
9460         From the commit:
9461
9462                 /*
9463                  * FIXME: here we must use the information from c1type and c2type
9464                  * to find out the proper collation, even on the InvariantCulture, the
9465                  * sorting is not done by computing the unicode values, but their
9466                  * actual sort order.
9467                  */
9468
9469 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9470
9471         * loader.c: for P/Invoke methods, allow the "Internal" shared
9472         library name to refer to the calling process symbol namespace.
9473
9474 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
9475
9476         * Makefile.am: Add the security manager to the build.
9477         * security-manager.c|h: New. Initialization of the security manager.
9478
9479 2005-01-07  Dick Porter  <dick@ximian.com>
9480
9481         * threads.c: 
9482         * monitor.c: Update thread state during Monitor and WaitHandle
9483         waits.  Fixes bug 71031.
9484
9485 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
9486
9487         * reflection.c (property_encode_signature): Correctly handle when the
9488         property has no methods.
9489
9490 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
9491
9492         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
9493         
9494         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
9495         fields from mb, not rmb. Fixes #71017.
9496
9497         * marshal.c (emit_ptr_to_str_conv): Add support for 
9498         ByValTStr -> string conversion. Fixes #71015.
9499
9500         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
9501
9502         * mempool.c (mono_mempool_contains_addr): New helper function.
9503
9504 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
9505
9506         * metadata.c (mono_metadata_compute_size): Fix size calculation of
9507         HasSematics encoded fields.
9508         
9509         * metadata.c (mono_type_to_unmanaged): Improve error message for 
9510         invalid string marshalling.
9511
9512         * metadata.c: Fix warnings.
9513         
9514 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9515
9516         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
9517         profiler support.
9518
9519 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
9520
9521         * domain.c object.c domain-internals.h: Revert part of r38077 since the
9522         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
9523         tests.
9524
9525 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
9526
9527         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
9528         so methods containing these can be AOTed.
9529
9530 2005-01-03  Martin Baulig  <martin@ximian.com>
9531
9532         * loader.c (find_method): Removed the hack for generic instances.
9533         (method_from_memberref): If our parent is a generic instance, pass
9534         its generic type definition to find_method() and then inflate the
9535         method.
9536         (mono_get_method_constrained): Pass the generic type definition to
9537         find_method() and inflate the method later.
9538
9539         * class-internals.h (MonoStats): Added `generic_class_count'.
9540
9541         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
9542         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
9543
9544         * reflection.c (mono_custom_attrs_from_params): Don't ignore
9545         generic type definitions.
9546
9547 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
9548
9549         * loader.c icall.c: Fix warnings.
9550
9551 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
9552
9553         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
9554         blittable types. Fixes #70864.
9555
9556 2004-12-29  Martin Baulig  <martin@ximian.com>
9557
9558         * icall.c
9559         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
9560
9561         * reflection.c (mono_method_get_object): Create a
9562         "System.Reflection.MonoGenericMethod" for inflated methods; don't
9563         call mono_get_inflated_method().
9564
9565         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
9566
9567 2004-12-27  Martin Baulig  <martin@ximian.com>
9568
9569         * class-internals.h (MonoMethod): Added `is_inflated' flag.
9570         (MonoMethodInflated): Added `inflated' field.
9571
9572         * class.c (mono_class_inflate_generic_method): Don't really
9573         inflate the method here; just set the `is_inflated' flag in the
9574         MonoMethod.
9575         (mono_class_get_inflated_method): Actually inflate the method here
9576         if it's not already inflated; we use the MonoMethodInflated's new
9577         `inflated' field as a cache.
9578
9579 2004-12-26  Martin Baulig  <martin@ximian.com>
9580
9581         * class.c
9582         (inflate_generic_class): Moved some code out of inflate_generic_type().
9583         (mono_class_inflate_generic_method): If we're already inflated,
9584         inflate the context and use the declaring method; ie. make sure
9585         the declaring method of an inflated method is always the generic
9586         method definition.
9587         (mono_class_create_from_typedef): Create
9588         `class->generic_container->context->gclass'.
9589
9590 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
9591
9592         * metadata-internals.h, marshal.c, reflection.c: More
9593         MonoGHashTable->GHashTable.
9594
9595         * domain-internals.h, class.c: Change MonoGHashTable's into
9596         GHashTables for some cases where no gc stuff is used
9597
9598         All users: update apis
9599
9600 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
9601
9602         * metadata.c (builtin_types): Make this `const'. Makes this get
9603         put into the shareable section.
9604         (mono_metadata_init): Casts to make gcc happy.
9605
9606 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
9607
9608         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
9609
9610 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
9611
9612         * icall.c: Added an internal call to retrieve the position and length
9613         of assembly-level declarative security attributes (RequestMinimum, 
9614         RequestOptional and RequestRefuse). This is used by the Assembly class
9615         to re-create the corresponding permission sets.
9616
9617 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9618
9619         * marshal.c: fix the stelemref wrapper to be type correct
9620         (and faster).
9621
9622 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9623
9624         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
9625         to do key & 0x7fffffff. Hashtable already does this. It just
9626         results in longer code.
9627
9628 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
9629
9630         * appdomain.c: Bump corlib version.
9631         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
9632         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
9633         * reflection.c|h: Add functions to get declarative security infos
9634         (blob position and length) for assemblies, classes and methods.
9635
9636 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
9637
9638         * reflection.c: sort the constant table (bug #70693).
9639
9640 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
9641
9642         * object-internals.h, threads.c, domain.c: add accessors for
9643         the MonoThread and MonoDomain tls keys.
9644
9645 2004-12-18  Martin Baulig  <martin@ximian.com>
9646
9647         * class.c (inflate_generic_type): If we're inflating a generic
9648         instance, set `ngclass->context->container = context->container';
9649         ie. the container we inflated into.
9650
9651         * metadata.c (mono_metadata_parse_generic_param): Reflect above
9652         inflate_generic_type() changes.
9653
9654 2004-12-17  Martin Baulig  <martin@ximian.com>
9655
9656         * class-internals.h
9657         (MonoGenericClass): Replaced `MonoType *generic_type' with
9658         `MonoClass *generic_class'.  Removed `dynamic_info'; if
9659         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
9660         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
9661
9662 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
9663
9664         * exception.c (mono_exception_from_token): New helper function.
9665
9666 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
9667
9668         * assembly.c (mono_assembly_load_with_partial_name): Call 
9669         mono_assembly_loaded before invoking the preload hooks. Fixes
9670         #70564.
9671
9672         * object-internals.h (MonoThread): Change culture_info and 
9673         ui_culture_info into an array.
9674
9675         * threads.c: Cache culture info objects from more than one appdomain.
9676
9677         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
9678         current UI culture.
9679
9680 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9681
9682         * threads.h threads.c appdomain.c: Clear the culture_info field of
9683         all threads during unloading if they point to an object in the dying
9684         appdomain.
9685
9686 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
9687
9688         * culture-info.h (TextInfoEntry): New struct
9689         * object-internals.h: sync with managed
9690         * locales.c: fill the `text_info_data' field
9691         * culture-info-tables.h: update
9692
9693 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
9694
9695         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
9696         collector.
9697
9698 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
9699
9700         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
9701         (ves_icall_ModuleBuilder_getMethodToken): Ditto
9702
9703 2004-12-12  Martin Baulig  <martin@ximian.com>
9704
9705         * mono-debug-debugger.c (write_type): If we're an enum and the
9706         builtin types have already been initialized, call mono_class_init().
9707
9708 2004-12-11  Martin Baulig  <martin@ximian.com>
9709
9710         * metadata.c (mono_metadata_load_generic_params): Added
9711         `MonoGenericContainer *parent_container' argument; automatically
9712         compute `container->is_method'; pass the correct owner to
9713         get_constraints().      
9714
9715         * reflection.c (compare_genericparam): Sort the GenericParam table
9716         according to increasing owners. 
9717
9718 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9719
9720         * profiler.c: allow disabling the default profiler.
9721
9722 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
9723
9724         * decimal.c, icall.c: allow disabling System.Decimal support.
9725
9726 2004-12-09  Marek Safar <marek.safar@seznam.cz>
9727
9728         * reflection.c: Add support for null attribute arguments.
9729
9730 2004-12-09  Martin Baulig  <martin@ximian.com>
9731
9732         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
9733         names to get rid of compiler warnings.
9734
9735 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9736
9737         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
9738         mono_marshal_load_type_info (). Fixes #69625.
9739         (mono_marshal_get_ptr_to_struct): Likewise.
9740
9741 2004-12-08  Martin Baulig  <martin@ximian.com>
9742
9743         * mono-debug.h: Bumped version number to 47.
9744
9745         * mono-debug-debugger.c
9746         (mono_debugger_event_handler, mono_debugger_event): Take two
9747         guint64 arguments insteed of a gpointer and a guint32.  
9748
9749 2004-12-08  Martin Baulig  <martin@ximian.com>
9750
9751         * debug-mono-symfile.h
9752         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
9753         `address' to `native_offset'.
9754
9755 2004-12-08  Martin Baulig  <martin@ximian.com>
9756
9757         * class.c (mono_class_create_from_typespec): Only inflate if we
9758         either have `context->gclass' or `context->gmethod'.
9759
9760 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9761
9762         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
9763
9764         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
9765
9766         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
9767
9768         * reflection.c (mono_assembly_get_object): Remove the workaround put
9769         in for the release.
9770         
9771         * appdomain.c: Use the corlib_internal field from MonoAssembly.
9772
9773         * appdomain.c: Bump corlib version.
9774
9775         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
9776         be visible in other appdomains.
9777
9778 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
9779
9780         * threads.c: Interlocked inc and dec for longs were messed up,
9781         use a KISS based impl for this. Fixes 70234
9782
9783 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9784
9785         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
9786
9787 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
9788
9789         * icall.c: fix to follow policy not to allow struct
9790         arguments in icalls.
9791
9792 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9793
9794         * process.c: make the patch that handles spaces in file paths work
9795         on mono/windows too.
9796
9797 2004-12-06  Martin Baulig  <martin@ximian.com>
9798
9799         * class.c (mono_class_create_generic): Call
9800         mono_class_setup_supertypes() if we're dynamic.
9801         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
9802
9803 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9804
9805         * object-internals.h: Add new fields to MonoThread.
9806
9807         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9808
9809         * icall.c threads-types.h threads.c: Add new icalls.
9810
9811         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
9812
9813         * object-internals.h (MonoReflectionAssembly): Sync object layout with
9814         managed side.
9815
9816         * appdomain.c: Bump corlib version.
9817
9818         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
9819         internal assemblies. Fixes #69181.
9820
9821 2004-12-05  Martin Baulig  <martin@ximian.com>
9822
9823         * class.c (mono_class_inflate_generic_signature): Make this a
9824         no-op if `context' is NULL or we don't have any type parameters;
9825         also copy `sentinelpos'.        
9826
9827 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
9828
9829         * image.c: Add unbox_wrapper_cache.
9830
9831         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
9832
9833         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
9834         function generator.
9835         
9836         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
9837         Fixes #70173.
9838
9839         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
9840         
9841 2004-12-04  Martin Baulig  <martin@ximian.com>
9842
9843         * loader.c (mono_method_get_signature_full): New public function;
9844         like mono_method_get_signature(), but with an additional
9845         `MonoGenericContext *' argument.
9846
9847         * class.c (mono_class_inflate_generic_signature): Formerly known
9848         as inflate_generic_signature(); make this public.
9849
9850 2004-12-04  Martin Baulig  <martin@ximian.com>
9851
9852         * metadata.c
9853         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
9854         instead of a `MonoGenericContainer *'.  
9855         (mono_metadata_parse_array_full): Likewise.
9856         (mono_metadata_parse_signature_full): Likewise.
9857         (mono_metadata_parse_method_signature_full): Likewise.
9858         (mono_metadata_parse_generic_inst): Likewise.
9859         (mono_metadata_parse_generic_param): Likewise.
9860         (mono_metadata_parse_mh_full): Likewise.
9861         (mono_type_create_from_typespec_full): Likewise.
9862
9863 2004-12-03  Martin Baulig  <martin@ximian.com>
9864
9865         * class-internals.h (MonoGenericContainer): Replaced the
9866         `MonoGenericContext * pointer with a `MonoGenericContext'
9867         structure and made it the first element.
9868
9869 2004-12-03  Martin Baulig  <martin@ximian.com>
9870
9871         * class.c
9872         (inflate_generic_type): Set the `context->container' when creating
9873         a new MonoGenericContext.
9874         (mono_class_inflate_generic_method): Likewise.
9875         (mono_class_create_from_typespec): Just use `context->container'
9876         to get the container.
9877
9878         * loader.c (method_from_methodspec): Set `context->parent' from
9879         `context->container' - and if that's a method container, use its
9880         parent.  Also set the `context->container' when creating a new
9881         MonoGenericContext.
9882         (mono_get_method_from_token): Use just `context->container' to get
9883         the container.
9884
9885         * metadata.c (do_mono_metadata_parse_generic_class): Also set
9886         `gclass->context->container'.
9887
9888         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
9889         the `context->container' when creating a new MonoGenericContext.
9890
9891 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
9892
9893         * reflection.c (compare_genericparam): Sort params with identical
9894         owner by their number. Fixes gen-111 on sparc.
9895
9896 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9897
9898         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
9899         around the domain changes.
9900
9901         * appdomain.c (mono_domain_unload): Handle the case when the thread
9902         calling Unload is itself being aborted during unloading. Fixes #70022.
9903
9904         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
9905
9906         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
9907         checkpoint_func as an icall so it gets a wrapper.
9908         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
9909         in the cross-appdomain wrappers too.
9910
9911         * threads.c (mono_thread_has_appdomain_ref): Make this public.
9912
9913         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
9914
9915         * reflection.c: Fix some memory leaks.
9916         
9917 2004-12-02  Martin Baulig  <martin@ximian.com>
9918
9919         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
9920
9921         * metadata.c (generic_class_cache): New static hashtable.
9922         (mono_metadata_lookup_generic_class): New public method.
9923
9924 2004-12-02  Martin Baulig  <martin@ximian.com>
9925
9926         * class.c (mono_class_create_from_typedef): Call
9927         mono_class_setup_parent() and mono_class_create_mono_type() before
9928         parsing the interfaces.
9929
9930 2004-12-02  Martin Baulig  <martin@ximian.com>
9931
9932         * metadata.c (generic_inst_cache): New static hashtable.
9933         (mono_metadata_lookup_generic_inst): New public function.
9934         (mono_metadata_inflate_generic_inst): New public function.
9935         (mono_metadata_parse_generic_inst): New public function.
9936         (do_mono_metadata_parse_generic_class): Use the new
9937         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
9938         since this'll also use the cache.
9939
9940         * reflection.c (mono_reflection_bind_generic_method_parameters):
9941         Use mono_metadata_lookup_generic_inst() to use the new cache.
9942
9943         * class.c (inflate_mono_type): Use
9944         mono_metadata_inflate_generic_inst() to inflate a generic
9945         instance; this'll also use the new cache.
9946
9947         * loader.c (method_from_methodspec): Use
9948         mono_metadata_parse_generic_inst() and
9949         mono_metadata_inflate_generic_inst() rather than parsing it
9950         manually, so we can use the new cache.
9951
9952 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9953
9954         * threads.c (wait_for_tids): Do not incorrectly free threads when 
9955         the wait times out.
9956
9957 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9958
9959         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
9960         iter->args based on whether parameters are passed in registers (i.e.
9961         MONO_ARCH_REGPARMS is defined)
9962
9963 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
9964
9965         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
9966         the exception message. Fixes #70070.
9967         (method_from_methodspec): Fix warnings.
9968
9969 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9970
9971         * process.c: (complete_path) return the path quoted
9972
9973 2004-12-01  Martin Baulig  <martin@ximian.com>
9974
9975         * class-internals.h (MonoGenericInst): New structure.
9976         (MonoGenericClass): Replaced `type_argc', `type_argv' and
9977         `is_open' with `MonoGenericInst *inst'.
9978         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
9979         `is_open' with `MonoGenericInst *inst'.
9980
9981 2004-11-30  Martin Baulig  <martin@ximian.com>
9982
9983         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
9984
9985         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
9986         to `generic_class_cache'.
9987
9988         * metadata.c
9989         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
9990         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
9991         (mono_generic_inst_is_valuetype): Renamed to
9992         mono_generic_class_is_valuetype().
9993
9994         * class-internals.h
9995         (MonoGenericInst): Renamed to MonoGenericClass.
9996         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
9997         (MonoClass): Renamed `generic_inst' to `generic_class'.
9998         (MonoGenericContext): Renamed `ginst' to `gclass'.
9999
10000         * object-internals.h
10001         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
10002
10003         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
10004         mono_reflection_generic_class_initialize().
10005
10006         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
10007         now known as "System.Reflection.MonoGenericClass".
10008         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
10009
10010 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
10011
10012         * class-internals.h: Added a flag field to MonoClass to cache the
10013         declarative security attributes actions associated with the class.
10014         * domain-internals.h: Added booleans to MonoJitInfo to cache the
10015         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
10016         applicable to the JITted method.
10017         * reflection.c|h: Added functions to extract (as flags) which security
10018         actions are available (declaratively) for a method, class or assembly.
10019         * metadata.c|h: Added functions to search the declarative security
10020         table in the metadata.
10021         
10022 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
10023
10024         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
10025         EXPORTEDTYPES are already in the class name cache, so there is no
10026         need to add extra code here to look at them. Just removes a bit of
10027         cruft.
10028
10029         (ves_icall_System_Environment_get_TickCount): No need for #if
10030         WINDOWS. We already have the code in io-layer.
10031
10032 2004-11-28  Martin Baulig  <martin@ximian.com>
10033
10034         * loader.c
10035         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
10036         Fixes gen-112.cs.
10037
10038 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
10039
10040         * assembly.c (do_mono_assembly_open): Instead of having a
10041         conditional WITH_BUNDLE, incorporate support for bundles here, by
10042         having a global `bundles' variable holding a pointer to the actual
10043         bundles. 
10044
10045         (mono_register_bundled_assemblies): New API call used by the
10046         bundle code. 
10047
10048         See mkbundle.1 for details.
10049         
10050 2004-11-27  Martin Baulig  <martin@ximian.com>
10051
10052         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
10053         the vtable for generic methods.
10054
10055 2004-11-26  Martin Baulig  <martin@ximian.com>
10056
10057         * metadata.c
10058         (mono_metadata_generic_method_hash): New public function.
10059         (mono_metadata_generic_method_equal): Likewise.
10060
10061         * class-internals.h
10062         (MonoGenericContainer): Added `GHashTable *method_hash'.
10063
10064         * reflection.c (ReflectionMethodBuilder): Added
10065         `MonoGenericContainer *generic_container'.
10066         (reflection_methodbuilder_to_mono_method): Don't create a new
10067         MonoGenericContainer each time we're called.
10068         (mono_reflection_bind_generic_method_parameters): Use
10069         `container->method_hash' to cache the results so we don't create a
10070         different method if we're called several times with the same
10071         arguments.
10072
10073         * loader.c (method_from_methodspec): Use the new
10074         `container->method_hash' here, too.
10075
10076 2004-11-26  Martin Baulig  <martin@ximian.com>
10077
10078         * class.c (inflate_generic_signature): Correctly compute
10079         `res->has_type_parameters'.
10080         (mono_class_vtable): Use the `has_type_parameters' flag to
10081         determine whether we're a generic method.
10082
10083         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
10084
10085 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
10086
10087         * object.c (mono_runtime_run_main): Fix a small memory leak.
10088
10089 2004-11-25  Martin Baulig  <martin@ximian.com>
10090
10091         * class.c (set_generic_param_owner): Fixed the loop.
10092
10093 2004-11-25  Martin Baulig  <martin@ximian.com>
10094
10095         * object.c (mono_class_vtable): Don't create any JIT wrappers for
10096         generic methods.
10097
10098 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
10099
10100         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
10101         names. Fixes #69787.
10102
10103 2004-11-24  Martin Baulig  <martin@ximian.com>
10104
10105         * class.c (mono_class_create_generic_2): If we don't have a
10106         `ginst->parent', inflate `gklass->parent' to get our parent.
10107
10108 2004-11-24  Martin Baulig  <martin@ximian.com>
10109
10110         * reflection.c (compare_genericparam): Correctly sort the
10111         GenericParam table; fixes #69779.
10112
10113 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
10114
10115         * reflection.c: When writing a PE file, don't create a huge
10116         buffer in memory. Just write the arrays we have to the file.
10117         This reduces memory usage.
10118
10119         * metadata-internals.h: MonoDynamicStream pefile is no longer used
10120         globally.
10121
10122 2004-11-17  Martin Baulig  <martin@ximian.com>
10123
10124         * class.c (mono_class_init): Don't setup `class->parent' for
10125         dynamic instances; moved this to mono_class_generic_2().
10126         (mono_class_create_generic): Also set `klass->inited' for dynamic
10127         generic instances.
10128         (mono_class_create_generic_2): Don't do anything for dynamic
10129         generic instances.  Set `klass->parent' here and also call
10130         mono_class_setup_parent() here. 
10131
10132         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
10133         `MonoType *parent' argument; set `ginst->parent' before calling
10134         mono_class_create_generic_2(), so we set the correct parent.
10135
10136 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
10137
10138         * reflection.c: allow getting attributes from ModuleBuilder
10139         (used by ikvm).
10140
10141 2004-11-17  Martin Baulig  <martin@ximian.com>
10142
10143         * class.c (mono_class_create_from_typedef): If a type parameter is
10144         inherited from an outer class, set its owner to that class.
10145
10146 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
10147
10148         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
10149           for (int*) written size. This fixes bug #69592.
10150
10151 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
10152
10153         * icall.c: Added IsAuthenticodePresnet internal call.
10154         * image.c|h: New function that check a MonoImage for an Authenticode
10155         signature in the certificate PE data directory.
10156         * security.c|h: New internal call to ask the runtime if an 
10157         Authenticode signature seems referenced in the PE header.
10158
10159 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
10160
10161         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
10162
10163         * reflection.c (mono_image_create_pefile): Free the assembly streams
10164         after writing out the assembly file.
10165
10166         * object.c (mono_runtime_run_main): Fix small memory leak.
10167
10168         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
10169         property access modifiers. Fixes #69389.
10170
10171 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10172
10173         * domain.c, object.c, object-internals.h, domain-internals.h,
10174         object.h, marshal.c: keep dynamic code info per domain.
10175
10176 2004-11-15  Martin Baulig  <martin@ximian.com>
10177
10178         * class.c (mono_type_get_name_recurse): Put type arguments in
10179         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
10180         see bug #68387.
10181
10182 2004-11-15  Martin Baulig  <martin@ximian.com>
10183
10184         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
10185         (mono_class_setup_vtable): When computing `the_cname' for a
10186         generic instance, don't include the namespace since we'd otherwise
10187         add it twice.
10188
10189 2004-11-15  Martin Baulig  <martin@ximian.com>
10190
10191         * class.c (mono_class_create_generic): Changed return type to void.
10192         (mono_class_create_generic_2): New public function; setup
10193         `class->method', `class->field' and `class->interfaces' here
10194         instead of in mono_class_init().
10195
10196         * class.h (mono_class_create_generic): Moved to class-internals.h.
10197
10198 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
10199
10200         * reflection.c (mono_image_create_pefile): take a file HANDLE.
10201         rather than writing to memory, write to this file. Right now,
10202         we are just writting into a buffer, and copying that. However
10203         we can avoid the buffer later.
10204
10205         (mono_dynamic_stream_reset): new function
10206
10207         * icall.c, object-internals.h: update for the above.
10208
10209 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
10210
10211         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
10212         have been using gc'd memory. First it is slower, unlikely
10213         the comment in the source code said, secondly, it increases
10214         our footprint to do it in the gc.
10215
10216         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
10217         the method so that it does not have to copy to managed code.
10218
10219 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
10220
10221         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
10222
10223 2004-11-12  Martin Baulig  <martin@localhost>
10224
10225         * reflection.c (mono_image_create_token): Allow generic method
10226         definitions here, since they may appear in an `.override'; see
10227         gen-98/gen-99 for an example.
10228
10229 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
10230
10231         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
10232         #69365.
10233
10234         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
10235         descriptive.
10236
10237 2004-11-11  Martin Baulig  <martin@ximian.com>
10238
10239         * class.c (mono_class_setup_vtable): In an explicit interface
10240         implementation, the method name now includes the arity.
10241
10242 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
10243
10244         * object.c (mono_array_full_copy): Fix warning.
10245
10246 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
10247
10248         * appdomain.c: Removed look_for_method_by_name(). Use the new method
10249         mono_class_get_method_from_name() instead.
10250         
10251         * class-internals.h: Added two new types of wrappers. 
10252         Added MonoRemotingTarget enum. Added new trampoline function type, which
10253         takes an additional MonoRemotingTarget value as parameter, so it is
10254         possible to request a trampoline for a specific target.
10255         
10256         * class.c: Added new mono_class_get_method_from_name() method.
10257         
10258         * class.h: In MonoRemoteClass, we can have now to vtables, one for
10259         general remoting sinks and one specific for cross domain calls.
10260         
10261         * debug-helpers.c: Added new wrapper names.
10262         
10263         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
10264         of a remote class.
10265         
10266         * image.c: Porperly delete value objects form the remoting invoke hashtable.
10267         
10268         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
10269         with several other methods (mono_marshal_get_xappdomain_dispatch,
10270         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
10271         and others) can generate a fast remoting wrapper for cross domain calls.
10272         More information can be found in docs/remoting.
10273         Other changes: Removed mono_find_method_by_name, and used
10274         mono_class_get_method_from_name instead.
10275         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
10276         is stored in the remoting invoke hashtable.
10277         
10278         * marshal.h: published the new method for getting the xdomain wrapper,
10279         and also added a method for getting the adequate wrapper for a given
10280         method and target.
10281         
10282         * object-internals.h, object.c: Added a couple of methods for capying and
10283         cloning arrays.
10284         Modified mono_install_remoting_trampoline, which takes the new remoting
10285         trampoline that has a remoting target as parameter.
10286         mono_class_proxy_vtable now also takes a remoting target as parameter, and
10287         will return the most suitable vtable for the target.
10288         Added mono_remote_class_vtable, which returns the vtable of a remote class
10289         (which can be the normal remoting vtable or the xdomain vtable).
10290         
10291         * threads.c: the xdomain invoke and dispatch wrappers must also be
10292         protected against interruptions.
10293
10294 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10295
10296         * icall.c: use memmove in BlockCopyInternal when the source and
10297         destination arrays are the same.
10298
10299 2004-11-09  Martin Baulig  <martin@ximian.com>
10300
10301         * class-internals.h (MonoGenericContainer): Removed `method' and
10302         `signature', replaced them with `is_method' and `is_signature'
10303         flags.  Added `context'.
10304
10305         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
10306         instead of a `MonoGenericContainer *'.
10307
10308         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
10309         for dynamic type parameters.
10310         (mono_metadata_load_generic_params): Setup `container->context'.
10311
10312         * reflection.c (mono_reflection_setup_generic_class): Setup
10313         `tb->generic_container->context'.
10314         (do_mono_reflection_bind_generic_parameters): Use
10315         mono_class_inflate_generic_type() to correctly inflate types,
10316         rather than using our own hack just for MONO_TYPE_VAR.
10317
10318 2004-11-09  Martin Baulig  <martin@ximian.com>
10319
10320         * class.c (mono_class_inflate_generic_method): Small fix; don't
10321         crash here.
10322
10323         * icall.c
10324         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
10325         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
10326         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
10327         (ves_icall_Type_BindGenericParameters): Likewise.
10328         (ves_icall_Type_get_IsGenericInstance): Likewise.
10329         (ves_icall_Type_GetGenericParameterPosition): Likewise.
10330         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
10331         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
10332         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
10333
10334 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
10335
10336         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
10337         assembly versions and public key tokens. Fixes #69113.
10338
10339 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
10340
10341         * metadata.c: fix bug introduced with the type cache changes
10342         on 2004-11-06.
10343
10344 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
10345
10346         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
10347         the MonoClass pointer instead of the token in exception clauses.
10348         * reflection.c: updates for the above and make the code not depend
10349         on the structure of MonoExceptionClause.
10350
10351 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10352
10353         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
10354         Add support for dynamic assemblies. Fixes #69114.
10355
10356         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
10357
10358 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
10359
10360         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
10361         since most only those methods use it. the code member of
10362         MonoMethodPInvoke was dead, so that can be removed too. Also,
10363         remove inline_count (again, not used), and move slot so that it
10364         can share bits with some other flags. This saves 8 bytes in the
10365         structure and gives us about 50 kb back for mcs helloworld.cs
10366
10367         * *.[ch]: Do naming changes for the above.
10368
10369         * loader.c (mono_method_get_header): Lazily init the header
10370         on first access.
10371         (mono_get_method_from_token): don't init the header here
10372         (mono_free_method): the header may never be allocated
10373
10374         Overall, this saves 150 kb of unmanaged allocations
10375         for mcs helloworld.cs. That accounts for 10% of the unmanaged
10376         memory at runtime.
10377         
10378         * loader.c, loader.h (mono_method_get_header): new accessor.
10379
10380         * *.[ch]: use the above method. Prepares us to lazily load
10381         the header.
10382
10383         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
10384         three warnings, which are actual bugs (see 69206).
10385
10386         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
10387         unused. Saves a cool 4 bytes / method.
10388
10389 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
10390
10391         * metadata.c (builtin_types): Add types for System.Object here.
10392         (mono_metadata_parse_type_full): Cache MonoType*'s that are
10393         for a class or valuetype from klass->this_arg or klass->byval_arg.
10394
10395         On mcs for a hello world, this gets us down from 21836 MonoType's
10396         to 14560.
10397
10398         (mono_metadata_free_type): Account for the above change.
10399
10400 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
10401
10402         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
10403         exception instead of asserting if name is null.
10404         (ves_icall_System_AppDomain_GetData): Ditto.
10405
10406 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
10407
10408         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
10409         EnumBuilder.
10410
10411         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
10412         Return NULL when the domain does not have entry_assembly set.
10413
10414         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
10415         Add a 'resource_modules' argument.
10416         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
10417
10418         * reflection.c (mono_reflection_create_runtime_class): Move setting
10419         of wastypebuilder here, so mono_get_type_object () returns a MonoType
10420         for enums too.
10421
10422         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
10423         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
10424         Throw an ArgumentNullException if 'ptr' is null.
10425
10426         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
10427         assemblies here. Fixes #69020.
10428
10429 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
10430
10431         * reflection.c (build_compressed_metadata): Fix the previous patch for
10432         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
10433         the stack.
10434
10435 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
10436
10437         * assembly.c (mono_assembly_names_equal): Allow a match if one of
10438         the cultures is false. Fixes #69090.
10439
10440         * reflection.c (build_compressed_metadata): Fix invalid memory read 
10441         detected by valgrind.
10442         
10443         * reflection.c (mono_reflection_get_type): Avoid triggering a 
10444         TypeResolve multiple times for the same type. Fixes #65577.
10445
10446 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
10447
10448         * marshal.c: Avoid using ldftn to call managed functions. It is
10449         much slower than just a call.
10450
10451         * reflection.c (mono_module_get_object): free the basename we
10452         allocate here from glib.
10453         
10454         * reflection.c (ensure_runtime_vtable): make sure to free
10455         overrides.  Also, we were allocating an array of MonoMethod not an
10456         array of MonoMethod*.
10457
10458         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
10459
10460         * image.c (mono_image_close): free image->guid here.
10461
10462 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
10463
10464         * reflection.c: Fix some spec conformance issues with the PE file
10465         structures so mcs compiled apps run on the Net 2.0 beta.
10466
10467 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
10468
10469         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
10470         Implement this. Fixes #67264.
10471
10472         * debug-helpers.h debug-helpers.c marshal.c: Move 
10473         mono_find_method_by_name to debug-helpers.c.
10474
10475 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
10476
10477         * object.c (mono_release_type_locks): type_initialization_hash is
10478         a GHashTable.
10479
10480         * reflection.c object.c object-internals.h: Fix warnings.
10481
10482         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
10483         without accessors. Fixes #61561.
10484
10485         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
10486         application base from the root domain if not set. Fixes #65641.
10487         (mono_runtime_init): Fix warning.
10488
10489 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10490
10491         * appdomain.c: call mono_thread_pool_init.
10492         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
10493         of worker threads based on the number of CPUs and the environment
10494         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
10495         for non-windows (windows) systems.
10496
10497 2004-10-27  Chris Toshok  <toshok@ximian.com>
10498
10499         * mono-debug-debugger.c (write_class): don't call mono_class_init
10500         here, as even with the check for (!klass->init_pending), we get
10501         into a situation where we're hitting cycles in class
10502         initialization.  Fixes #68816.
10503
10504 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
10505
10506         * image.c: Avoid overwriting values in the loaded_images_hash when an
10507         assembly is loaded multiple times. Fixes #61152.
10508
10509         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
10510         so multiple satellite assemblies for the same name can be loaded.
10511         Fixes #68259.
10512
10513         * mono_domain_assembly_preload: Actually return the loaded assembly, 
10514         not NULL.
10515
10516         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
10517         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
10518
10519         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
10520         pending finalizers are not invoked after the appdomain has been 
10521         unloaded. Fixes #67862.
10522
10523 2004-10-22  Martin Baulig  <martin@ximian.com>
10524
10525         * mono-debug-debugger.c
10526         (mono_debugger_runtime_invoke): Don't box valuetypes.
10527
10528 2004-10-22  Chris Toshok  <toshok@ximian.com>
10529
10530         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
10531         don't hide private methods.
10532
10533 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
10534
10535         * icall.c: Allows the runtime to "share" (when known) the public key
10536         token of an assembly. This avoid the need to recalculate the token 
10537         (from the public key) in managed code.
10538
10539 2004-10-21  Chris Toshok  <toshok@ximian.com>
10540
10541         * debug-helpers.c (append_class_name): argh, revert last patch.
10542         
10543 2004-10-21  Chris Toshok  <toshok@ximian.com>
10544
10545         * debug-helpers.c (append_class_name): use '+' as the delimiter,
10546         not '/', so that it matches what the debugger uses to look up
10547         methods.
10548
10549 2004-10-21  Martin Baulig  <martin@ximian.com>
10550
10551         * mono-debug-debugger.c (mono_debugger_throw_exception): New
10552         public method; this is called each time an exception is thrown and
10553         allows the debugger to use exception catch points.
10554
10555 2004-10-21  Martin Baulig  <martin@ximian.com>
10556
10557         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
10558         the stack pointer and the exception object in some struct and pass
10559         that to the debugger.
10560
10561 2004-10-21  Chris Toshok  <toshok@ximian.com>
10562
10563         * mono-debug-debugger.c (do_write_class): add instance/static
10564         event support.  We don't expose "raise" or "other" yet.
10565         (event_is_static): new method.
10566
10567 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
10568
10569         * mono-debug-debugger.c
10570         (mono_debugger_handle_exception): Remove
10571         bogus return value for fussy compilers.
10572
10573 2004-10-20  Martin Baulig  <martin@ximian.com>
10574
10575         * mono-debug-debugger.c
10576         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
10577         (mono_debugger_handled_exception): Likewise.
10578
10579 2004-10-20  Martin Baulig  <martin@ximian.com>
10580
10581         * mono-debug-debugger.h (MonoDebuggerEvent): Added
10582         MONO_DEBUGGER_EVENT_EXCEPTION.
10583
10584         * mono-debug-debugger.c (mono_debugger_handle_exception): New
10585         public function to send the debugger a notification for an
10586         exception and inform it about a catch/finally clause.
10587
10588 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
10589
10590         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
10591         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
10592         fix 2.95 build. 
10593
10594         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
10595
10596 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
10597
10598         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
10599         marshalled as [In,Out]. Fixes #58325.
10600
10601 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
10602
10603         * reflection.c (mono_method_body_get_object): Implement some fields.
10604
10605 2004-10-12  Martin Baulig  <martin@ximian.com>
10606
10607         * reflection.c (mono_reflection_bind_generic_parameters): Small
10608         fix, correctly retrieve our parent from a generic instance.
10609
10610 2004-10-12  Martin Baulig  <martin@ximian.com>
10611
10612         * metadata.c (mono_metadata_generic_param_equal): We always have
10613         an owner.
10614
10615         * class.c
10616         (mono_class_from_generic_parameter): We need to have an owner.
10617         (my_mono_class_from_generic_parameter): Likewise.
10618
10619         * reflection.c (mono_reflection_setup_generic_class): Renamed to
10620         mono_reflection_create_generic_class() and added a new
10621         mono_reflection_setup_generic_class().  
10622         (mono_reflection_initialize_generic_param): If we're a nested
10623         generic type and inherited from the containing class, set our
10624         owner to the outer class.
10625
10626 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
10627
10628         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
10629
10630         * reflection.c (mono_method_body_get_object): New function to create
10631         a MethodBody object.
10632
10633         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
10634
10635 2004-10-11  Martin Baulig  <martin@ximian.com>
10636
10637         * metadata.c (_mono_metadata_type_equal): Renamed to
10638         do_mono_metadata_type_equal() and made static.
10639
10640 2004-10-11  Martin Baulig  <martin@ximian.com>
10641
10642         * appdomain.c: Bump corlib version number to 28.
10643
10644 2004-10-10  Martin Baulig  <martin@ximian.com>
10645
10646         * class-internals.h
10647         (MonoGenericInst): Added `MonoGenericContainer *container'.
10648         (MonoGenericMethod): Likewise.
10649         (MonoGenericContext): Likewise.
10650         (MonoGenericParam): Added `MonoGenericContainer *owner'.
10651
10652         * metadata.c
10653         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
10654         (do_mono_metadata_parse_generic_inst): Likewise.
10655         (mono_metadata_parse_type_full): New public method.  This is the actual
10656         mono_metadata_parse_type() implementation - with an additional
10657         `MonoGenericContainer *' argument.
10658         (mono_metadata_parse_array_full): Likewise.
10659         (mono_metadata_parse_signature_full): Likewise.
10660         (mono_metadata_parse_method_signature_full): Likewise.
10661         (mono_metadata_parse_mh_full): Likewise.
10662         (mono_type_create_from_typespec): Likewise.
10663         (mono_metadata_interfaces_from_typedef_full): New public method;
10664         this is similar to the other _full() methods, but we take a
10665         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
10666         (mono_metadata_parse_generic_param): Take an additional
10667         `MonoGenericContainer *' argument and lookup the MonoGenericParam
10668         from that container.
10669         (mono_metadata_generic_param_equal): New static method to compare
10670         two type parameters.
10671         (_mono_metadata_type_equal): New static method; takes an
10672         additional `gboolean signature_only' argument - if true, we don't
10673         compare the owners of generic parameters.
10674         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
10675         with a TRUE argument - do a signature-only comparision.
10676
10677         * loader.c: Use the new _full() methods and pass the
10678         MonoGenericContainer to them.
10679
10680         * object-internals.h (MonoReflectionTypeBuilder): Added
10681         `MonoGenericContainer *generic_container' field.
10682         (MonoReflectionMethodBuilder): Likewise.
10683
10684 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
10685
10686         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
10687         case initial images of dynamic assemblies.
10688
10689         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
10690
10691         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
10692
10693         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
10694         length of event->other array.
10695         (typebuilder_setup_events): Ditto.
10696
10697         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
10698         'assembly_by_name' and add an 'assemblies' list.
10699
10700         * assembly.h assembly.c: Add a new search hook for determining whenever
10701         an assembly is already loaded. Use this instead of searching in the
10702         loaded_assemblies list.
10703
10704         * domain.c appdomain.c: Implement the new search hook so loaded 
10705         assemblies are now scoped by appdomain. Fixes #67727.
10706
10707 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
10708
10709         * threads.c (mono_thread_attach): Initialize synch_lock field so
10710         mono_thread_detach works again.
10711
10712         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
10713         'lib' too. Fixes #63130.
10714
10715 2004-10-06  Jackson Harper  <jackson@ximian.com>
10716
10717         * culture-info-tables.h: regenerated.
10718
10719 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
10720
10721         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
10722         implemented by other interfaces in the result. Fixes #65764.
10723         
10724         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
10725         Handle unloadable modules without crashing.
10726
10727         * image.c (load_modules): Revert the previous patch since modules must
10728         have a fixed index inside the array.
10729         
10730         * image.c (load_modules): Don't include native modules in the modules
10731         array.
10732
10733 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
10734
10735         * reflection.h: Add param_defaults field.
10736
10737         * reflection.c: Add support for parameter defaults in dynamic methods.
10738         Fixes #64595.
10739
10740         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
10741         an empty string when a type has no namespace. Fixes #64230.
10742
10743 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
10744
10745         * tabledefs.h: Added "internal" security actions to support non-CAS
10746         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
10747         Note: they do not seems to be used anymore in 2.0 (new metadata format)
10748
10749 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
10750
10751         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
10752         constructor of abstract class. Fixes #61689.
10753
10754 2004-10-04  Martin Baulig  <martin@ximian.com>
10755
10756         * class-internals.h (MonoGenericContainer): New type.
10757         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
10758         `MonoGenericContainer *generic_container'.
10759         (MonoClass): Replaced `gen_params' and `num_gen_params' with
10760         `MonoGenericContainer *generic_container'.
10761
10762         * metadata.c (mono_metadata_load_generic_params): Return a
10763         `MonoGenericContainer *' instead of a `MonoGenericParam *';
10764         removed the `num' argument.
10765
10766 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
10767
10768         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
10769         for dynamic images.
10770
10771         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
10772         machine fields.
10773
10774         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
10775
10776         * reflection.c: Save pe_kind and machine values into the generated
10777         image file.
10778
10779         * appdomain.c: Bump corlib version number.
10780
10781         * object-internals.h: Reorganize layout of LocalBuilder.
10782
10783         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
10784         New helper function.
10785
10786         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
10787         created MonoType for dynamic types. Fixes #66180.
10788
10789 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
10790
10791         * threadpool.c: the ares hashtable needs a critical section around it.
10792         this prevents some nasty segfaults
10793
10794 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
10795
10796         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
10797         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
10798         bug 67324).
10799         
10800 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
10801
10802         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
10803         
10804 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
10805
10806         * image.c: Always canonicalize image file names, to avoid loading
10807         the same assembly twice when referenced using a relative path.
10808
10809 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
10810
10811         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
10812
10813         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
10814
10815         * marshal.c: Fix warnings.
10816
10817 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
10818
10819         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
10820         attempting to marshal the delegate_trampoline as the method_addr.
10821         This patch has a static hashtable of marshalled delegates so that 
10822         we can map delegate_trampoline addresses back to delegates.  This
10823         allows a delegate passed to managed code to be passed back into native
10824         code.  Fixes #67039
10825
10826 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
10827
10828         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
10829
10830         * reflection.c (method_encode_code): Align method headers properly.
10831         Fixes #66025.
10832
10833 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
10834
10835         * marshal.c: In the runtime invoke wrapper, reset the abort
10836         exception if it is cached. This avoids the automatic rethrowal of 
10837         the exception after the catch of the wrapper. Also check for pending
10838         interruptions before calling the managed method. This is done using
10839         the new method emit_thread_force_interrupt_checkpoint, since the
10840         normal checkpoint method is ignored when running the invoke wrapper.
10841         * object.c: If the abort exception is rethrown, set the abort_exc
10842         field of the thread, so it will be rethrown aftere every catch.
10843         * threadpool.c: Only run an interruption checkpoint if what has been
10844         requested is a stop of the thread (aborts will be ignored).
10845         * threads.c: By default, a thread will now never be interrumped while
10846         running the runtime invoke wrapper (this ensures that runtime_invoke
10847         will always return to the caller if an exception pointer is provided).
10848         There is a new special method mono_thread_force_interruption_checkpoint()
10849         to force an interruption checkpoint even if running a protected
10850         wrapper, which is used by the same runtime invoke wrapper to do a check
10851         at a safe point.
10852
10853 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
10854
10855         * object.c, object-internals.h: Implemented mono_release_type_locks,
10856         which releases the cctor locks held by a thread.
10857         * threads.c, threads.h: In thread_cleanup, release cctor locks held
10858         by a thread. Added mono_thread_exit() method to be used to safely stop
10859         a thread.
10860
10861 2004-09-28  Raja R Harinath  <rharinath@novell.com>
10862
10863         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
10864         Move null check before dereference.  Avoid indexing beyond the end
10865         of the 'modules' array.
10866
10867 2004-09-28  Raja R Harinath  <rharinath@novell.com>
10868
10869         * metadata-internals.h (MonoImage): Add module_count field.
10870         * image.c (load_modules): Set image->module_count.
10871         (mono_image_load_file_for_image): Use image->module_count.
10872         * reflection.c (mono_image_load_module): Append to image->modules array 
10873         of dynamic assembly.
10874         (mono_module_get_object): Fix loop to actually increment index.
10875         Use image->module_count.
10876         * assembly.c (mono_assembly_load_references): Use image->module_count.
10877         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
10878         Likewise.
10879
10880 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
10881
10882         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
10883         Avoid assert on generic types.
10884
10885 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
10886
10887         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
10888
10889         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
10890
10891         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
10892         function to convert a MarshalSpec structure to its managed counterpart.
10893
10894         * reflection.c: Fix warnings.
10895         
10896         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
10897         field.
10898
10899         * icall.c (mono_create_icall_signature): Fix build.
10900
10901 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * icall.c: Add MakePointType icall.
10904
10905         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
10906         warnings.
10907
10908 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10909
10910         * threadpool.c: reuse allocated slots in the queue.
10911
10912 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
10913
10914         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
10915
10916         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
10917
10918         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
10919         previous change.
10920
10921         * tabledefs.h: Add constants for pinvoke attributes BestFit and
10922         ThrowOnUnmappableChar.
10923
10924         * icall.c (ves_icall_Type_GetPacking): New icall.
10925
10926 2004-09-24  Martin Baulig  <martin@ximian.com>
10927
10928         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
10929
10930 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10931
10932         * appdomain.c:
10933         (mono_domain_set): allow setting a domain that is being unloaded.
10934         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
10935         being unloaded.
10936
10937 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
10938
10939         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
10940         the GetCustomAttributes icall.
10941
10942 2004-09-23  Martin Baulig  <martin@ximian.com>
10943
10944         * object-internals.h (MonoReflectionGenericParam): Replaced
10945         'has_ctor_constraint', `has_reference_type' and `has_value_type'
10946         with `guint32 attrs'.
10947
10948 2004-09-23  Martin Baulig  <martin@ximian.com>
10949
10950         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
10951
10952 2004-09-23  Martin Baulig  <martin@ximian.com>
10953
10954         * object-internals.h (GenericParameterAttributes): New enum.
10955
10956 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
10957
10958         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
10959         
10960         * class.c (init_events): Fill out event->other field.
10961
10962         * class.c: Fix warnings.
10963
10964         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
10965
10966 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
10967
10968         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
10969         walk which doesn't supply the IL offset.
10970
10971 2004-09-22  Martin Baulig  <martin@ximian.com>
10972
10973         * reflection.c (mono_reflection_setup_internal_class): If we're
10974         System.ValueType, System.Object or System.Enum, set
10975         `klass->instance_size' and create the vtable.
10976         (mono_reflection_create_internal_class): If we're an enum type,
10977         get the base class from our current corlib.
10978
10979 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
10980
10981         * reflection.h (MonoResolveTokenError): New type.
10982
10983         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
10984         icall.
10985
10986         * icall.c: Add an 'error' argument to the ResolveToken icalls.
10987
10988 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
10989
10990         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
10991         Support also calling constructors, but only for already allocated objects.
10992
10993 2004-09-17  Geoff Norton <gnorton@customerdna.com>
10994
10995         * reflection.c (type_get_qualified_name): If the klass is null
10996         return the typename to avoid a NullRefEx.
10997         (encode_cattr_value): Get the qualified name of the boxed type,
10998         not the underlying enumtype.  Fixes #62984.
10999
11000 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
11001
11002         * marshal.c: Fix problems with previous checkin.
11003
11004 2004-09-21    <vargaz@freemail.hu>
11005
11006         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
11007         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
11008
11009         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
11010
11011 2004-09-21  Geoff Norton <gnorton@customerdna.com>
11012
11013         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
11014         should only return a type for pointers, arrays, and passbyref types.
11015         Fixes bug #63841.
11016
11017 2004-09-21  Martin Baulig  <martin@ximian.com>
11018
11019         * domain.c (mono_debugger_check_runtime_version): New public
11020         function.
11021
11022         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
11023
11024 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
11025
11026         * reflection.c: Added missing sort to the declarative security 
11027         attributes table. MS implementation stops seeing the attributes if the
11028         token number regress in the table (as shown by ildasm and permview).
11029
11030 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
11031
11032         * object-internals.h (MonoReflectionModule): Add 'token' field.
11033         
11034         * reflection.c (mono_reflection_get_token): Add support for Module
11035         and Assembly.
11036         (mono_module_get_object): Set 'token' field.
11037         (mono_module_file_get_object): Set 'token' field.
11038
11039         * icall.c: Add new Assembly and Module icalls.
11040
11041         * appdomain.c: Bump corlib version.
11042
11043 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
11044
11045         * loader.h loader.c class.h class.c: Add helper functions for obtaining
11046         tokens of metadata objects.
11047
11048         * reflection.h reflection.c (mono_reflection_get_token): New function
11049         to obtain the token of a metadata object.
11050
11051         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
11052
11053 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
11054
11055         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
11056         
11057         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
11058
11059 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
11060
11061         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
11062         * object-internals.h: Added 3 MonoArray* members to MonoReflection
11063         AssemblyBuilder to access the permissions set in the class lib.
11064         * reflection.c: Added security attributes encoding step in 
11065         mono_image_build_metadata.
11066         * tabledefs.h: Added new security actions defined in 2.0:
11067         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
11068
11069 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
11070
11071         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
11072         macro parameter.
11073
11074 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
11075  
11076         * locales.c: nullify the ICU_collator member of CompareInfo when it is
11077           finalized. There where random SIGSEVs at program termination, when
11078           an object being finalized was trying to do a string comparison and
11079           the current culture was already finalized.
11080  
11081 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11082
11083         * threads.c: call thread_cleanup before finishing the thread if we get
11084         there.
11085
11086 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
11087
11088         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
11089         assemblies from the parent. Fixes #65665.
11090
11091 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
11092
11093         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
11094         modifiers.
11095
11096 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
11097
11098         * reflection.h: add prototype for mono_get_dbnull_object
11099         * reflection.c: add prototypes for get_default_param_value_blobs 
11100         and mono_get_object_from_blob for fussier compilers
11101
11102 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
11103  
11104         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
11105         false deadlock checks in class initialization.
11106  
11107 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
11108
11109         * image.c (mono_image_addref): Fix comment.
11110
11111         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
11112         possible.
11113
11114 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
11115
11116         * reflection.c (mono_param_get_objects): Modified to return
11117         ParameterInfo.DefaultValue object.
11118
11119         (get_default_param_value_blobs):
11120         (mono_get_object_from_blob):
11121         (mono_get_dbnull_object): New helper routines. 
11122
11123         * object.c (mono_get_constant_value_from_blob): New helper routine
11124         carved out from get_default_field_value ()
11125
11126         * object-internals.h (mono_get_constant_value_from_blob): Added
11127         function declaration.
11128
11129 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11130
11131         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
11132         referenced assemblies. Fixes #62135.
11133
11134         * exception.h exception.c (mono_get_exception_file_not_found2): New
11135         helper function.
11136
11137 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
11138
11139         * class.h class.c: Add mono_type_get_underlying_type ().
11140
11141 2004-09-09  Geoff Norton <gnorton@customerndna.com>
11142
11143         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
11144         Fix GetTypes() to support dynamically created assemblies.
11145
11146 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
11147
11148         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
11149         
11150         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
11151         previous patch.
11152
11153         * reflection.h reflection.c loader.c: Allow dynamic construction of
11154         pinvoke methods. Fixes #65571.
11155         
11156         * reflection.c (mono_reflection_get_type): Revert previous change since
11157         it causes regressions.
11158
11159 2004-09-08  Martin Baulig  <martin@ximian.com>
11160
11161         * class.c (class_compute_field_layout): Don't call
11162         mono_class_layout_fields() for open generic instances.
11163
11164 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
11165         * threads.c appdomain.c: fix typo in GC macro
11166
11167 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11168
11169         * threads.c: don't call mono_thread_detach() in start_wrapper(),
11170         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
11171
11172 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
11173
11174         * image.c (mono_image_close): Applied patch from 
11175         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
11176         assembly is loaded multiple times from data.
11177         
11178         * image.c (mono_image_open): Fix warning.
11179
11180 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11181
11182         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
11183         once. Fixes #58334.
11184         
11185         * reflection.c (mono_reflection_create_runtime_class): Initialize
11186         klass->nested_classes. Fixes #61224.
11187
11188 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11189
11190         * threads.c: sched_yield() on exit, to allow threads to quit.
11191
11192 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11193
11194         * object.c (mono_unhandled_exception): Remove leftover debug code.
11195
11196 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
11197
11198         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
11199
11200 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11201
11202         * marshal.c (emit_marshal_array): Really null terminate string arrays.
11203         
11204         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
11205
11206 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11207
11208         * marshal.c (emit_marshal_array): Null terminate string arrays.
11209         
11210         * marshal.c (raise_auto_layout_exception): Fix warning.
11211
11212         * reflection.c (mono_param_get_objects): Initialize the default value
11213         with DBNull.Value, not null. Fixes #62123.
11214
11215 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
11216
11217         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
11218         throw an exception with a cute explanation.
11219
11220 2004-09-06  Dick Porter  <dick@ximian.com>
11221
11222         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
11223         Close the new process's thread handle, as we don't use it.  The
11224         handle stays around forever otherwise.
11225
11226 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11227
11228         * object.c (arith_overflow): Fix warning.
11229
11230         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
11231         calling conventions in method refs. Fixes #65352.
11232
11233         * reflection.c: Fix warnings.
11234
11235 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
11236
11237         * icall.c: Add a new icall for Array.Clear
11238
11239 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
11240
11241         * object.c: When allocating an array, we have to throw
11242         an overflow exception if any of the lengths are < 0.
11243
11244 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11245
11246         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
11247         properly. Also move implementation of string array marshalling to 
11248         managed code. Fixes #42316.
11249
11250 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11251
11252         * assembly.c: provide more information when loading an assembly fails.
11253
11254 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11255
11256         * filewatcher.c: don't expect the development fam package to be
11257         installed.
11258
11259 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
11260
11261         * marshal.c: Make a copy of the signature cookie since it will be
11262         freed by the caller.
11263         
11264         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
11265
11266         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
11267
11268         * metadata.c (mono_metadata_free_marshal_spec): New function to free
11269         marshal specs.
11270
11271         * marshal.c: More refactoring.
11272         
11273         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
11274         smaller functions.
11275
11276 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
11277
11278         * object.c: In mono_message_invoke, fill the output parameter array after
11279           calling the managed method (it was done before the call). This fixes
11280           bug #59299.
11281
11282 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11283
11284         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
11285         as well.
11286
11287 2004-09-02  Martin Baulig  <martin@ximian.com>
11288
11289         * class.c (mono_class_instance_size): Don't allow generic type
11290         definitions or open generic instances.
11291         (mono_class_array_element_size): If we're a value type, call
11292         mono_class_instance_size() on the original class.
11293
11294         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
11295         handle generic instances.
11296
11297         * mono-debug-debugger.c (write_type): Handle generic instances
11298         like classes.
11299
11300 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11301
11302         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
11303         the allocation request fails. Fixes #65089.
11304
11305         * object.c (mono_runtime_free_method): Do not call mono_free_method.
11306         
11307         * object.c (mono_runtime_free_method): New function to free a dynamic
11308         method.
11309
11310         * marshal.c (mono_delegate_free_ftnptr): New function to free the
11311         delegate trampoline.
11312
11313         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
11314         with hasthis as dynamic,
11315
11316         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
11317
11318         * domain.c (mono_jit_info_table_remove): New function to remove an
11319         entry from the jit info table.
11320
11321         * class-internals.h (MonoMethod): Add 'dynamic' field.
11322
11323         * loader.c: Fix warnings.
11324
11325 2004-09-01  Martin Baulig  <martin@ximian.com>
11326
11327         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
11328         instead of mono_debugger_lock() because the latter one is a no-op
11329         unless running in the debugger.
11330
11331 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
11332
11333         * class.c (class_compute_field_layout): Classes with auto-layout or
11334         reference fields are not blittable.
11335         
11336 2004-09-01  Dick Porter  <dick@ximian.com>
11337
11338         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
11339         mono_image_get_filename() to get the assembly location.
11340
11341         * icall.c:
11342         * metadata.h: Fix compile warnings
11343
11344 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
11345
11346         * class.c (class_compute_field_layout): System.Object is blittable.
11347
11348         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
11349         as in/out. Fixes #59909.
11350
11351 2004-09-01  Martin Baulig  <martin@ximian.com>
11352
11353         * metadata.h (MONO_TYPE_ISREFERENCE): Call
11354         mono_metadata_generic_inst_is_valuetype() if we're a generic
11355         instance to check whether our underlying type is a reference type.
11356
11357 2004-09-01  Martin Baulig  <martin@ximian.com>
11358
11359         * metadata.c (mono_type_size): If we're a generic instance, call
11360         mono_class_value_size() for value types.
11361
11362 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
11363
11364         * marshal.c: Implement more custom marshalling functionality. Fixes
11365         #64915.
11366
11367 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11368
11369         * mono-debug.c, debug-mono-symfile.c: add some locking love.
11370
11371 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
11372
11373         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
11374
11375         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
11376
11377         * icall.c: Fix some warnings.
11378
11379         * threads.c (abort_appdomain_thread): Fix unref errors.
11380         (mono_thread_current): Fix THREAD_DEBUG define.
11381
11382 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
11383
11384         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
11385
11386         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
11387
11388 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
11389
11390         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
11391         string arrays.
11392
11393 2004-08-28  Martin Baulig  <martin@ximian.com>
11394
11395         * metadata.c
11396         (mono_metadata_generic_inst_is_valuetype): New public function.
11397
11398         * metadata.h (MONO_TYPE_ISSTRUCT): Call
11399         mono_metadata_generic_inst_is_valuetype() if we're a generic
11400         instance to check whether our underlying type is a valuetype.
11401
11402 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
11403
11404         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
11405         #63768.
11406
11407 2004-08-25  Martin Baulig  <martin@ximian.com>
11408
11409         * loader.c (mono_get_method_from_token): Abstract methods can also
11410         be generic and thus have type parameters.
11411
11412         * metadata-internals.h
11413         (MonoDynamicImage): Added `GPtrArray *gen_params'.
11414
11415         * reflection.c (mono_image_get_generic_param_info): Don't create a
11416         metadata row, just add an entry to the `gen_params' array.
11417         (build_compressed_metadata): Sort the `gen_params' array and then
11418         actually create the metadata.
11419
11420 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11421
11422         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
11423
11424 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11425
11426         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
11427
11428 2004-08-24  Martin Baulig  <martin@ximian.com>
11429
11430         * class.cs (mono_class_is_subclass_of): Like an interface, a
11431         generic instance also derives from System.Object.
11432
11433 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
11434
11435         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
11436         custom modifiers to be in any order. Fixes #61990.
11437
11438 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11439
11440         * object.c: Register mono_object_new_fast icall.
11441         
11442         * object.c (mono_class_get_allocation_ftn): Return to calling
11443         mono_object_new_fast, since it seems faster to compute the object 
11444         size in unmanaged code than passing it as a parameter.
11445
11446         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
11447
11448         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
11449         this function with Boehm as the oom handler, so we don't have to check
11450         the result of GC_malloc.
11451
11452         * object.c: Remove checks for oom.
11453
11454         * object.h object.c (mono_class_get_allocation_ftn): New function to
11455         return the icall which can be used to allocate an instance of a given
11456         class. 
11457
11458         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
11459
11460         * class-internals.h: Add 'enabled' field.
11461
11462 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
11463
11464         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
11465
11466 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
11467         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
11468         value 0x0010.
11469
11470 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11471
11472         * appdomain.c: use the Tls function for appdomain too,
11473         at Zoltan's request. Actually return in mono_context_get
11474
11475         * appdomain.c, profiler.c, threads.c: use __thread
11476
11477 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11478
11479         * appdomain.c threads.c: Call GC_CreateThread on windows.
11480
11481         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
11482         multiple libraries since this don't work on windows.
11483
11484 2004-08-18  Martin Baulig  <martin@ximian.com>
11485
11486         * class-internals.h
11487         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
11488         MonoMethodHeader.
11489
11490         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
11491         MonoMethodNormal since we also need it for abstract and interface
11492         methods.
11493
11494         * reflection.c
11495         (build_compressed_metadata): Sort the GenericParam table.
11496         (mono_image_create_token): Added `gboolean create_methodspec'
11497         argument; this is false when generating a MethodImpl token.
11498         (reflection_methodbuilder_to_mono_method): Abstract and interface
11499         methods may also have generic parameters.
11500
11501 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11502
11503         * appdomain.c: thread local alloc
11504
11505 2004-08-17  Martin Baulig  <martin@ximian.com>
11506
11507         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
11508
11509         * icall.c
11510         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
11511         argument.
11512
11513         * class.c (mono_type_get_full_name): New public function.
11514         (mono_type_get_name): Don't include the type arguments.
11515
11516 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
11517
11518         * Makefile.am: Build static versions of libmetadata and libmonoruntime
11519         for inclusion into the mono executable.
11520
11521 2004-08-16  Martin Baulig  <martin@ximian.com>
11522
11523         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
11524         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
11525
11526 2004-08-14  Martin Baulig  <martin@ximian.com>
11527
11528         * class.c (dup_type): Also copy the `byref' field.
11529
11530 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
11531
11532         * reflection.c (create_dynamic_mono_image): Revert the last change 
11533         since it breaks bootstrap.
11534
11535 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11536
11537         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
11538
11539         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
11540         not free them with g_free.
11541
11542 2004-08-11  Martin Baulig  <martin@ximian.com>
11543
11544         * reflection.c (mono_reflection_setup_internal_class): Also call
11545         mono_class_setup_mono_type() if we already have a `tb->type.type'.
11546
11547 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
11548
11549         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
11550         called during default (first) AppDomain creation. Keep track of
11551         Evidence when loading assemblies.
11552
11553 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
11554
11555         * opcodes.c, opcodes.h: reduce runtime relocations.
11556
11557 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
11558
11559         * culture-info.h, locales.c: fixes and chages to sue the new
11560         optimized format of the locale data.
11561         * culture-info-tables.h: regenerated.
11562
11563 2004-08-06  Geoff Norton <gnorton@customerdna.com>
11564         
11565         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
11566
11567 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
11568
11569         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
11570         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
11571         * domain-internals.h: icall declaration.
11572         * icall.c: icall registration.
11573         * object-internals.h: New fields in MonoAssembly for CAS.
11574
11575 2004-08-05  Duncan Mak  <duncan@ximian.com>
11576
11577         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
11578         CEE_LDELEM_ANY.
11579
11580 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
11581
11582         * reflection.c: fix to deal with object[] arrays in custom ctors
11583         (bug #62550).
11584
11585 2004-08-05  Martin Baulig  <martin@ximian.com>
11586
11587         * class.c (mono_class_array_element_size): Added support for
11588         generic instances and correctly handle "recursive" types.
11589
11590 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11591
11592         * assembly.c: Fix warnings.
11593
11594 2004-08-04  Martin Baulig  <martin@ximian.com>
11595
11596         * class.c
11597         (mono_type_get_name_recurse): Added `gboolean include_arity'
11598         argument specifying whether or not we should include the generic
11599         arity in the type name.
11600         (_mono_type_get_name): New static function.
11601         (mono_class_setup_vtable): If we're a generic instance, don't
11602         include the generic arity in the names of explicit method
11603         implementations.        
11604
11605 2004-08-03  Martin Baulig  <martin@ximian.com>
11606
11607         * class.c (mono_type_get_name_recurse): Enclose the generic type
11608         arguments in `<', '>'.
11609
11610 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
11611
11612         * gc.c: make GC warning messages use the trace API, they are just
11613         noise to most of the users.
11614
11615 2004-08-03  Martin Baulig  <martin@ximian.com>
11616
11617         * debug-mono-symfile.c (read_string): Correctly read the string.
11618
11619 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11620
11621         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
11622         
11623         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
11624         icalls.
11625         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
11626
11627 2004-07-30  Martin Baulig  <martin@ximian.com>
11628
11629         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
11630         Reflect latest symbol writer changes.   
11631
11632 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
11633
11634         * object.c: always create an object if null is passed
11635         to Invoke() where a valuetype is expected.
11636
11637 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
11638
11639         * marshal.c (mono_marshal_init): make managed
11640         signatures match native ones better for 64bits.
11641
11642 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11643
11644         * appdomain.c: hack to build correctly the private bin path on windows.
11645         Fixes bug #61991.
11646
11647 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
11648
11649         * assembly.c: Load mscorlib from the correct framework directory
11650           (mono/<version>/mscorlib.dll).
11651         * appdomain.h: Added prototypes for new functions.
11652         * internals.h: Added some prototypes.
11653         * domain.c: When initializing the runtime, get from the executable and
11654           the configuration files the runtime version that the app supports.
11655           Added support methods for reading app.exe.config. Added list of versions
11656           supported by the JIT. Added two new methods: mono_init_from_assembly,
11657           which initializes the runtime and determines the required version from
11658           the provided exe file, and mono_init_version, which initializes
11659           the runtime using the provided version.
11660         * icall.c: Get machine.config from version-specific directory.
11661         * reflection.c: When generating an image, embed the version number
11662           of the current runtime.
11663
11664 2004-07-28  Dick Porter  <dick@ximian.com>
11665
11666         * socket-io.c
11667         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
11668         returned sockaddr size before creating the remote address object.
11669         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
11670         61608.
11671
11672 2004-07-28  Dick Porter  <dick@ximian.com>
11673
11674         * locales.c (string_invariant_compare_char): Fix invariant char
11675         compares between upper and lower cases.  Fixes bug 61458.
11676
11677 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
11678         
11679         * marshal.c: actually cache stelem.ref wrappers.
11680         
11681 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11682
11683         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
11684         sections and remove the mono_cli_rva_map () function.
11685
11686 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
11687
11688         * debug-mono-symfile.c: fix one more endianess issue, from a patch
11689         by Geoff Norton (<gnorton@customerdna.com>).
11690
11691 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
11692
11693         * class.c: fix class loads for pointer types (typeof(int) !=
11694         typeof(int*)).
11695
11696 2004-07-27  Martin Baulig  <martin@ximian.com>
11697
11698         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
11699         reading the debugging information from an external ".mdb" file.
11700
11701 2004-07-24  Martin Baulig  <martin@ximian.com>
11702
11703         * reflection.c (mono_image_get_type_info): Only write a class
11704         layout entry if we actually have a size or a packing size.
11705
11706 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
11707
11708         * reflection.c (type_get_fully_qualified_name): 
11709         insert cast to get type checking of ?: with non-gcc compilers
11710
11711 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
11712
11713         * rand.c: use g_getenv for both lookups of
11714         MONO_EGD_SOCKET
11715
11716 2004-07-17  Martin Baulig  <martin@ximian.com>
11717
11718         * reflection.c (mono_reflection_bind_generic_method_parameters):
11719         Set `gmethod->reflection_info'.
11720
11721 2004-07-17  Martin Baulig  <martin@ximian.com>
11722
11723         * class.c (mono_class_create_from_typedef): Insert the newly
11724         created class into the hash table before computing the interfaces
11725         since we could be called recursively.
11726
11727 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
11728
11729         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
11730         function to implement stelem.ref in managed code
11731         * class-internals.h, debug-helpers.c: a new wrapper type
11732         for the above.
11733
11734 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
11735
11736         * gc.c: allow GC handles to work even when no GC is compiled in.
11737         Fix part of bug #61134 (GetAddrOfPinnedObject).
11738
11739 2004-07-13  Peter Williams  <peter@newton.cx>
11740  
11741         * process.c (complete_path): Make sure we don't attempt to execute
11742         directories.
11743  
11744 2004-07-12  Geoff Norton <gnorton@customerdna.com>
11745
11746         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
11747           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
11748           and will add/subtract the hour if needed
11749
11750 2004-07-12  Martin Baulig  <martin@ximian.com>
11751
11752         * reflection.c (mono_field_get_object): If we have
11753         `field->generic_info', take the attributes from
11754         `field->generic_info->generic_type'.    
11755
11756 2004-07-12  Martin Baulig  <martin@ximian.com>
11757
11758         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
11759         This function must be called before initializing the runtime.
11760         (mono_debug_init_1): New function; call this after initializing
11761         the runtime, but before loading the assembly.  It tells the
11762         debugger to load corlib and the builtin types.
11763
11764         * mono-debug-debugger.c: Did some larger changes in the debugging
11765         code; support recursive class declarations, make sure we actually
11766         add all classes.
11767
11768 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11769
11770         * debug-helpers.c: undo my previous patch and fixed the real issue in
11771         ../mini/exceptions-x86.c
11772
11773 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11774
11775         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
11776         when no HOME env. variable was set and a NullRef was thrown in a .cctor
11777         called from other .cctors.
11778
11779 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
11780
11781         * loader.c: Removed the mono_loader_wine_init hack now that we are
11782         doing a managed version of Windows.Forms.
11783
11784 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
11785
11786         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
11787         threadpool.c, threads.c: remove static data from rootset.
11788
11789 2004-07-09  Dick Porter  <dick@ximian.com>
11790
11791         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
11792         Don't do any more processing if the matched length was 0.  It was
11793         increasing the size of the string before.  Fixes bug 61167.
11794
11795 2004-07-09  Dick Porter  <dick@ximian.com>
11796
11797         * socket-io.h:
11798         * socket-io.c
11799         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
11800         Add support for SO_PEERCRED if its available.
11801
11802 2004-07-09  Peter Bartok <pbartok@novell.com>
11803         * loader.c: winelib.exe.so error message is now only displayed if
11804         MONO_DEBUG is set. To help us avoid questions when people are trying
11805         out the new Managed.Windows.Forms.
11806
11807 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
11808
11809         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
11810         for isinst and castclass wrappers.
11811
11812         * class-internals.h icall.c: Move registration and lookup of JIT icalls
11813         to libmetadata from the JIT, so they could be used by the marshalling
11814         code and the interpreter.
11815
11816         * marshal.c: Register marshalling related JIT icalls here instead of
11817         in mini.c. Use CEE_MONO_ICALL instead of the family of 
11818         CEE_MONO_PROC<x> opcodes to call marshalling functions.
11819
11820         * metadata.h: Remove unneeded marshalling conversions.
11821
11822         * opcodes.c: Update for new opcodes.
11823         
11824 2004-07-08  Martin Baulig  <martin@ximian.com>
11825
11826         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
11827         (mono_debug_get_domain_data): Make this function static.
11828
11829 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
11830
11831         * gc.c, object.h: add nice GC handle API for embedders.
11832
11833 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
11834
11835         * reflection.c: more changes for the new api
11836
11837         * object.c: When we reflect on a field w/ a constant value, it
11838         will not have a memory location, so we must access metadata. Also,
11839         allow easier reading of strings so that we can read them from
11840         the constant data.
11841
11842         * class.c (mono_class_layout_fields): no need for literal fields here.
11843
11844         * class-internals.h: api changes for const fields
11845
11846         * icall.c (ves_icall_get_enum_info): use new apis for const fields
11847
11848 2004-07-06  Martin Baulig  <martin@ximian.com>
11849
11850         * mono-debug.h: Increment version number to 44.
11851
11852         * mono-debug.c (mono_debug_add_wrapper): The second argument is
11853         now a gpointer, rewrote this whole method.
11854
11855         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
11856         function.  Add information about the wrapper in a new "misc table".
11857
11858         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
11859         for the new misc table.
11860
11861 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
11862
11863         * metadata-internals.h image.c: Add a cache for helper signatures.
11864
11865         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
11866
11867 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
11868
11869         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
11870         delegates from a delegate. Fixes #61033.
11871         
11872         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
11873         marshalling of stringbuilder arrays. Fixes #59900.
11874
11875 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11876
11877         * icall.c: Add EnumBuilder:setup_enum_type icall.
11878
11879 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
11880
11881         * icall.c: Added a new icall for the property version of
11882         OffsetOfStringData.
11883
11884 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11885
11886         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
11887         it has a constant size across platforms.
11888
11889         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
11890         stack trace.
11891
11892 2004-06-29  Martin Baulig  <martin@ximian.com>
11893
11894         * mono-debug.c (mono_debug_add_method): Protect the whole function
11895         in mono_debugger_lock(), not just parts of it.
11896
11897 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11898
11899         * reflection.c: make sure padding bytes in heaps are zeroed.
11900
11901 2004-06-24  David Waite  <mass@akuma.org>
11902
11903         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
11904         image.c, loader.c, locales.c, marshal.c, metadata.c,
11905         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
11906         string-icalls.c, threads.c: change to C90-style comments from C99 /
11907         C++ -style
11908
11909 2004-06-24  Dick Porter  <dick@ximian.com>
11910
11911         * threads.c
11912         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
11913         return createdNew.  Fixes bug 60412.
11914
11915         * threads-types.h: 
11916         * icall.c: Add createdNew parameter to CreateMutex icall
11917
11918 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11919
11920         * reflection.c, object-internals.h: save default value in params.
11921
11922 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11923
11924         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
11925         no need to build a new path combining that with the application base.
11926         Fixes bug #60442.
11927
11928 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
11929
11930         * reflection.c: fixed minor standard compliance issues.
11931
11932 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
11933
11934         * reflection.c: fixed issue with encoding some custom attributes
11935         (arrays in properties and fields, bug #60411).
11936
11937 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11938
11939         * reflection.c: fix start address when copying the public key token.
11940
11941 2004-06-23  Martin Baulig  <martin@ximian.com>
11942
11943         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
11944         the `exc' object in a static object to put it into the GC's root set.
11945
11946 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11947
11948         * reflection.c: make mono_reflection_setup_internal_class ()
11949         callable a second time to setup a new parent class.
11950
11951 2004-06-23  Dick Porter  <dick@ximian.com>
11952
11953         * threads.c: Check for WAIT_IO_COMPLETION return values.
11954
11955 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
11956
11957         * appdomain.c: Removed the g_free on the public key token. Now copy 
11958         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
11959         * assembly.c: Added public key token string value when loading 
11960         assemblies. Fix bug #60439.
11961         * icall.c: Added missing informations (like public key) in 
11962         GetReferencedAssemblies. Fix #60519.
11963         * image.h: Changed definition for public key token from const char*
11964         public_tok_value to guchar public_key_token [17];
11965         * reflection.c: Updated for changes to public key token.
11966
11967 2004-06-22  Lluis Sanchez Gual
11968
11969         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
11970         for the field in base classes.
11971
11972 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
11973
11974         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
11975         mark headers as not supported, they are installed only for use by the
11976         debugger.
11977
11978 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
11979
11980         * *.c, *.h: avoid namespace pollution in public headers.
11981
11982 2004-06-21  Martin Baulig  <martin@ximian.com>
11983
11984         * exception.c (mono_get_exception_security): It's in
11985         "System.Security", not in "System".
11986
11987         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
11988         the exception classes.
11989
11990 2004-06-21  Martin Baulig  <martin@ximian.com>
11991
11992         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
11993         Protect the exception object from being finalized.
11994
11995 2004-06-21  Martin Baulig  <martin@ximian.com>
11996
11997         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
11998         public function.
11999
12000 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
12001
12002         * reflection.c: Load the assembly in mono_reflection_type_from_name,
12003         if it was not loaded before. Fix parts of #60439.
12004
12005 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
12006
12007         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
12008         code that was broken since Ben's change: wrappers are now
12009         dependent on the method signature only again.
12010
12011 2004-06-21  Martin Baulig  <martin@ximian.com>
12012
12013         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
12014         added interface support.
12015
12016 2004-06-21  Martin Baulig  <martin@ximian.com>
12017
12018         * class.c (mono_vtable_get_static_field_data): New public method.
12019
12020 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
12021
12022         * filewatcher.c : Windows build fix to be compliant with API changes.
12023
12024 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12025
12026         * class.h, class.c: more accessors.
12027         * metadata.h, metadata.c: prepare for hiding MonoType and
12028         MonoMethodSignature: people should use the accessors from now on
12029         outside of the tree.
12030
12031 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12032
12033         * *.c, *.h: more API cleanups.
12034
12035 2004-06-18  Jackson Harper  <jackson@ximian.com>
12036
12037         * assembly.c: Trace loading assemblies.
12038         * loader.c: Trace loading native libraries.
12039         * mono-config.c: Trace loading config files.
12040         
12041 2004-06-18  Dick Porter  <dick@ximian.com>
12042
12043         * locales.c: Tell ICU the lengths of strings, it can cope with
12044         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
12045
12046 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12047
12048         * image.c: swapped name/filename;
12049
12050 2004-06-18  Martin Baulig  <martin@ximian.com>
12051
12052         * mono-debug-debugger.c (write_class): Write the parent class at
12053         the end of the header.
12054
12055 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
12056
12057         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
12058
12059 2004-06-17  Raja R Harinath  <rharinath@novell.com>
12060
12061         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
12062         (bundle_obj): New conditional define.
12063         (BUILT_SOURCES): Remove.
12064         ($(bundle_srcs)): Make parallel-make safe.
12065         (libmonoruntime_la_LIBADD): Make unconditional.
12066         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
12067         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
12068
12069 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
12070
12071         * culture-info-tables.h: It was inconsistent with the latest
12072           supp info files.
12073
12074 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
12075
12076         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
12077         be loaded.
12078
12079         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
12080         with gcc 2.95.
12081
12082 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12083
12084         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
12085         cleaned up public header threads.h.
12086
12087 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12088
12089         * Makefile.am, *.c, *.h: more API cleanups.
12090
12091 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12092
12093         * Makefile.am: removed monosn from compilation.
12094         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
12095         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
12096         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
12097         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
12098         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
12099         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
12100
12101 2004-06-15  Jackson Harper  <jackson@ximian.com>
12102
12103         * assembly.c: Make locales lower case when searching the GAC for
12104         assemblies. gacutil will always make locales lowercase when
12105         installing so this effectively makes them case insensitive.
12106         
12107 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
12108
12109         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
12110         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
12111           parameter which allows to choose whether the wait can be interrupted or 
12112           not. Also added the method mono_monitor_enter(), which locks the monitor
12113           using an infinite wait and without allowing interruption.
12114           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
12115           interrupted.
12116         * object.h: Added new fields in MonoThread. suspend_event holds the event
12117           used to susped/resume the thread. synch_lock is the lock object to use for
12118           modifying the thread state.
12119         * threads.c: Use the new synch_lock object for locking, instead of "this",
12120           which can generate deadlocks.
12121           Moved thread state change in Thread.Sleep and Thread.Join from managed
12122           to unmanaged code. This avoids a deadlock when the thread was suspended
12123           just after acquiring the thread lock.
12124           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
12125           Implemented Thread.Suspend using an event instead of ThreadSuspend,
12126           which is not fully implemented in the io-layer.
12127         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
12128
12129 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
12130
12131         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
12132         threads-types.h: more API cleanups.
12133
12134 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12135
12136         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
12137         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
12138         threadpool.c, threads.c: first pass at the exported API cleanup.
12139
12140 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12141
12142         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
12143
12144 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12145
12146         * icall.c: added internalGetHome.
12147
12148 2004-06-14  Dick Porter  <dick@ximian.com>
12149
12150         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
12151         possible to return successfully when '.' or '..' were the only
12152         entries in a directory, but were skipped.  The MonoIOStat was not
12153         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
12154         Fixes bug 59574.
12155
12156 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12157
12158         * reflection.c: make binaries run on .Net 1.1 by default.
12159
12160 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12161
12162         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
12163
12164 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
12165
12166         * marshal.c: keep track of struct size with explicit layout
12167         (bug #59979).
12168
12169 2004-06-12  Martin Baulig  <martin@ximian.com>
12170
12171         * mono-debug-debugger.c: Comment out a debugging g_message().
12172
12173 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
12174
12175         * reflection.c, reflection.h: do not free custom attrs that are cached.
12176         * icall.c: use braces to make code clearer.
12177
12178 2004-06-11  Martin Baulig  <martin@ximian.com>
12179
12180         * class.h (MonoInflatedField): New type.
12181         (MonoClassField): Replaced `MonoType *generic_type' with
12182         `MonoInflatedField *generic_info'.
12183
12184         * icall.c
12185         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
12186
12187 2004-06-11  Martin Baulig  <martin@ximian.com>
12188
12189         * reflection.c (mono_image_create_method_token): Correctly encode
12190         varargs methods.
12191
12192 2004-06-11  Martin Baulig  <martin@ximian.com>
12193
12194         * metadata.c (mono_metadata_parse_method_signature): When parsing
12195         a MethodDef which has VarArgs, also set sentinelpos if we don't
12196         have any parameters.
12197
12198 2004-06-11  Martin Baulig  <martin@ximian.com>
12199
12200         * verify.c (mono_method_verify): In CEE_CALL, use
12201         mono_method_get_signature() to get the method's signature, unless
12202         we're a PInvoke method.
12203
12204 2004-06-10  Jackson Harper  <jackson@ximian.com>
12205
12206         * assembly.c: Use <path>/lib/mono/gac for the extra paths
12207         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
12208         logical name as the supplied path is just a prefix to the gac not
12209         the direct path to it.
12210         
12211 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
12212
12213         * reflection.c: make the token for a created method match
12214         the token of the MethodBuilder it was created from
12215         (IKVM requires this behaviour now).
12216
12217 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
12218
12219         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
12220         reflection.c, socket-io.c: leak fixes.
12221
12222 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12223
12224         * icall.c: handle sentinel pos in vararg methods in position different
12225         from 0.
12226
12227 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12228
12229         * culture-info-tables.h: freshly generated.
12230
12231 2004-06-09  Martin Baulig  <martin@ximian.com>
12232
12233         * loader.c (mono_get_method_constrained): Call `mono_class_init
12234         (constrained_class)'.   
12235
12236 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
12237
12238         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
12239         any methods. Fixes #59629.
12240
12241 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
12242
12243         * culture-info-tables.h: reflecting locale-builder updates.
12244
12245 2004-06-08  Dick Porter  <dick@ximian.com>
12246
12247         * object.h:
12248         * locales.c: Fixed compile warnings, including a real bug in
12249         CompareInfo_internal_compare.
12250         
12251 2004-06-08  Dick Porter  <dick@ximian.com>
12252
12253         * locales.c
12254         (ves_icall_System_Globalization_CompareInfo_internal_index):
12255         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
12256         Double-check the resuls of usearches, because ICU currently
12257         ignores most of the collator settings here.  Fixes bug 59720.
12258         
12259 2004-06-08  Dick Porter  <dick@ximian.com>
12260
12261         * locales.c
12262         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
12263         Fix memory leak and segfault-causing typo.  No idea how this one
12264         lasted so long without being noticed.
12265
12266 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
12267
12268         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
12269         any methods. Fixes #59629.
12270
12271 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12272
12273         * assembly.c:
12274         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
12275         own the critical section before). Removed dead code (that's done
12276         in the preload hook).
12277
12278         (mono_assembly_load_with_partial_name): call the preload hook.
12279
12280 2004-06-08  Martin Baulig  <martin@ximian.com>
12281
12282         * metadata.c (mono_metadata_signature_alloc): Default
12283         `sentinelpos' to -1.
12284
12285         * reflection.c (mono_image_get_array_token): Likewise.
12286
12287 2004-06-08  Martin Baulig  <martin@ximian.com>
12288
12289         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
12290
12291         * metadata.c (mono_metadata_parse_method_signature): When parsing
12292         a MethodDef which has VarArgs, set sentinelpos.
12293
12294         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
12295         `gint16' since we're using -1 for non-varargs methods.
12296
12297         * reflection.c
12298         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
12299         (method_encode_signature): Added varargs support.
12300         (method_builder_encode_signature): Likewise.
12301         (mono_image_get_varargs_method_token): New static method.
12302         (mono_image_create_method_token): New public method; this is
12303         called via an icall instead of mono_image_create_token() when
12304         calling a varargs method.       
12305
12306 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
12307
12308         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
12309
12310 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
12311
12312         * culture-info-tables.h : Reflecting the latest locale-builder that
12313           fixed empty array representation ({} to {0}).
12314
12315 2004-06-07  Jackson Harper  <jackson@ximian.com>
12316
12317         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
12318         looking up extra gac paths. This allows MONO_GAC_PATH to act
12319         exactly like a prefix.
12320         
12321 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
12322
12323         * reflection.c (mono_reflection_type_from_name): Make a copy of the
12324         type name before modifying it. Fixes #59405.
12325
12326 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
12327
12328         * culture-info.h: added fields for "all datetime patterns".
12329         * locales.c: (  ves_icall_System_Globalization_CultureInfo
12330           _construct_datetime_format ()): fill xxx_patterns fields.
12331         * object.h: added fields for "all datetime patterns" to
12332           MonoDateTimeFormatInfo.
12333         * culture-info-tables.h: reflecting locale-builder updates.
12334
12335 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
12336
12337         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
12338         the event has no add and remove methods. Fixes #59629.
12339
12340 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
12341
12342         * object.c: Fixed possible integer overflow when allocating large
12343         strings.
12344
12345 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
12346
12347         * culture-info-tables.h: reflecting locale-builder updates.
12348
12349 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
12350
12351         * culture-info-tables.h: reflecting locale-builder updates.
12352
12353 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
12354
12355         * culture-info-tables.h: reflecting locale-builder updates.
12356
12357 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
12358
12359         * threads.c: Made Thread.Sleep abortable.
12360
12361 2004-06-02  Martin Baulig  <martin@ximian.com>
12362
12363         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
12364
12365         * debug-mono-symfile.h: Bumped symbol file version number to 37.
12366
12367 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
12368
12369         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
12370
12371 2004-05-30  Jackson Harper  <jackson@ximian.com>
12372
12373         * reflection.c: Do not hardcode assembly versions or public key
12374         tokens anymore. All of this except the corlib section was dead
12375         code anyways.
12376         
12377 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
12378
12379         * object.c (mono_runtime_invoke_array): Automatically create boxed
12380         objects for byref valuetypes if needed. Fixes #59300.
12381         
12382         * object.c (mono_method_return_message_restore): Handle 
12383         MONO_TYPE_OBJECT as well.
12384
12385 2004-05-28  Jackson Harper  <jackson@ximian.com>
12386
12387         * reflection.c: The modified type encoding was causing build
12388         problems. Reverted for now.
12389         
12390 2004-05-28  Jackson Harper  <jackson@ximian.com>
12391
12392         * reflection.c/h: Take an assembly ref so that we dont create
12393         fully qualified names when encoding types in the same assembly as
12394         the custom attribute being emitted.
12395         * appdomain.c: Increment version number.
12396         
12397 2004-05-26  Duncan Mak  <duncan@ximian.com>
12398
12399         * icall.c
12400         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
12401         Set the full version number (major, minor, build, revision).
12402
12403 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
12404
12405         * marshal.c (emit_struct_conv): increment src/dst after blit
12406         (mono_marshal_get_managed_wrapper,
12407         mono_marshal_get_native_wrapper): make sure we have marshalling
12408         info before marshalling params (info computation affects
12409         blittable)
12410
12411         * class.c (class_compute_field_layout): correctly deal with
12412         blittable
12413         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
12414         value types (as per what windows dows by default)
12415         (mono_class_setup_mono_type): System.ValueType is blittable
12416         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
12417         blittable
12418
12419         * marshal.c (mono_marshal_load_type_info): flag types  as
12420         non-blittable if the native layout doesn't match the managed
12421         layout
12422
12423 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12424
12425         * appdomain.c: don't add stuff in the private search path that is
12426         above the application base. If application base is not set, there's
12427         no private search path.
12428
12429 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12430
12431         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
12432         byref struct arguments in native->managed marshalling.
12433
12434 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
12435
12436         * marshal.c (mono_marshal_get_runtime_invoke): correctly
12437         cache methods using signature (special case for methods
12438         that are value type or string class)
12439         
12440         * image.c (mono_image_close): clean up allocated GSList's
12441         in runtime_invoke_cache.
12442
12443 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12444
12445         * mono-config.c: set the correct path for mono_cfg_dir on windows when
12446         there's no MONO_CFG_DIR environment variable defined.
12447
12448 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12449
12450         * threads.c: windows version must be >= 0x0500 to include OpenThread.
12451
12452 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
12453
12454         * threadpool.c: Really wait for 500ms after the async call, even if the wait
12455           is interrumped.
12456         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
12457           before waiting for it, and call CloseHandle after the wait to unref it.
12458           This will make sure that handles are not disposed too early.
12459
12460 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12461
12462         * appdomain.c:
12463         * appdomain.h:
12464         * icall.c: removed
12465         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
12466         needed now.
12467
12468         * object.c: se the application_base only for the domain that runs
12469         Main. Fixes bug #59216,
12470
12471 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12472
12473         * appdomain.c:
12474         * object.c: only the domain in which Main is run have
12475         SetupInformation.ConfigurationFile set, so moved a few lines from
12476         appdomain.c to object.c.
12477
12478 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12479
12480         * appdomain.c: we tried to load [name].(dll|exe), but according
12481         to bug #57710, we must also try [culture]/[name].(dll|exe) and
12482         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
12483         There's a test case attached to bug #58922.
12484
12485 2004-05-27  Dick Porter  <dick@ximian.com>
12486
12487         * icall.c:
12488         * file-io.c: Implemented icalls for locking and unlocking regions
12489         in a file.
12490         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
12491         FALSE on error (fixes both compiler warning and real bug.)
12492
12493 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
12494
12495         * culture-info-tables.h: reflecting locale-builder updates.
12496
12497           (Added missing ChangeLog entry for 05/26)
12498
12499 2004-05-27  Jackson Harper  <jackson@ximian.com>
12500
12501         * locales.c: Fix some cut and paste errors.
12502         
12503 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12504
12505         * mono-config.c: set the correct path for config. directory on windows.
12506
12507 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
12508
12509         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
12510           on win32.
12511
12512 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12513
12514         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
12515         from pinvoke functions.
12516         
12517         * marshal.c (mono_ftnptr_to_delegate): Implement this.
12518
12519 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
12520
12521         * culture-info-tables.h: reflecting locale-builder updates.
12522
12523 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12524
12525         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
12526         #59086.
12527
12528 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
12529
12530         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
12531         * icall.c: Modified icalls for RNG.
12532         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
12533         Windows (CryptoAPI).
12534
12535 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12536
12537         * locales.c: Fix build.
12538
12539 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
12540
12541         * culture-info-tables.h: reflecting locale-builder updates.
12542
12543 2004-05-25  Jackson Harper  <jackson@ximian.com>
12544
12545         * locales.c: When creating the current culture use the $LANGs
12546         specific culture. So DateTimeFormat and NumberFormat entries are created.
12547         
12548 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12549
12550         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
12551         a char array as parameter.
12552
12553 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
12554
12555         * image.c: In mono_image_open(), always use an absolute path name to
12556           look for already loaded images.
12557
12558 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
12559
12560         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
12561         missing in the windows build (like older cygwin include files).
12562
12563 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
12564
12565         * icall.c: Fixed check for possible integer overflow in Buffer_
12566         BlockCopy icall. Replaced comments style // by /* */.
12567
12568 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
12569
12570         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
12571         
12572         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
12573         check after MONO_VTADDR. Fixes pinvoke2.exe.
12574
12575         * marshal.h marshal.c metadata.h: Add beginnings of support for
12576         ftnptr -> delegate marshalling.
12577
12578 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
12579
12580         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
12581         * threads.c: Fix warnings.
12582
12583 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
12584
12585         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
12586         * icall.c: Registered icalls for Suspend and Resume.
12587         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
12588           Thread.Abort.
12589         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
12590         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
12591         * process.c: Use WaitForSingleObjectEx.
12592         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
12593           checkpoints.
12594         * threads.c, threads.h: Make use of new Ex wait methods. Improved
12595           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
12596           for Suspend and Resume. Added new mono_thread_stop, used for stoping
12597           background threads. Added basic support for Abort in Windows.
12598           Start new threads using a managed delegate invoke wrapper. This wrapper
12599           has an interruption checkpoint that is needed since an interruption
12600           can be requested before the thread leaves the unmanaged code that starts 
12601           the thread.
12602         * marshal.c: Added interruption checkpoint after every native call, and
12603           also before managed calls for wrappers called from unmanaged code to
12604           go into managed code.
12605         * object.h: Added new field in MonoThread to keep track of interruption
12606           requests.
12607
12608 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
12609
12610         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
12611         calls.
12612
12613 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12614
12615         * appdomain.c:
12616         * assembly.c:
12617         * gc.c:
12618         * locales.c:
12619         * mono-config.c:
12620         * rand.c: getenv -> g_getenv (windows!)
12621
12622         * process.c: complete_path is also used on non-windows platforms.
12623
12624 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12625
12626         * icall.c: new signature for Process_Start.
12627
12628         * process.[ch]: new signature for Process_Start. If we're on windows
12629         and UseShellExecute is false, we have to search for the program by
12630         ourselves if we don't get a full path.
12631
12632 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12633
12634         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
12635         marshalling and call CleanUpNativeData if needed. Fixes #58646.
12636
12637 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12638
12639         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
12640         Fixes bug #58373.
12641
12642 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12643
12644         * process.c: use double quotes to quote program name and arguments on
12645         windows. Fixes bug #58575.
12646
12647 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12648
12649         * file-io.c: don't return "." and ".." when using windows Find*File.
12650
12651 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
12652
12653         * marshal.c: Don't pass wrappers to message init because method 
12654         addressed used to lookup metadata. part of remoting[2|3] fix.
12655
12656 2004-05-15  Jackson Harper  <jackson@ximian.com>
12657
12658         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
12659         path is essentially the same as MONO_PATH except that it points to
12660         GACs instead of lib directories.
12661         * loader.h: The user gac is gone so we dont need function to
12662         enable/disable it.
12663         * mono-config.c: user gac option is now gone.
12664         
12665 2004-05-15  Jackson Harper  <jackson@ximian.com>
12666
12667         * culture-info.h: Make defines more consistent, add calendar data
12668         to the culture info table.
12669         * culture-info-tables.h: Add basic calendar data. Basically
12670         everyone gets default gregorian until all the data is
12671         updated.
12672         * locales.c: Use the new consistent defines. Set calendar data for
12673         culture info objects.
12674         * object.h: add a field for calendar data to CultureInfo
12675         
12676 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
12677
12678         * image.c: image->runtime_invoke_cache is keyed on signatures now.
12679         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
12680         a signature.
12681         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
12682         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
12683         an extra param that is the pointer of the method to invoke. The IL for
12684         the invoke method is no longer specific to the method, but to the
12685         signature of the method. Thus, we can share the same code for multiple
12686         methods. This reduces the number of methods that have to be compiled.
12687
12688 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
12689
12690         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
12691
12692         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12693
12694         * icall.c: Optimize Buffer.BlockCopy.
12695
12696 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12697
12698         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
12699         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
12700         quote). Changed them to "MMMM yyyy".
12701
12702 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
12703
12704         * rand.c
12705         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
12706
12707 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
12708
12709         * reflection.h: Updated after changes to managed structures.
12710
12711         * appdomain.c: Bump corlib version.
12712
12713 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12714
12715         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
12716         windows.
12717
12718 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12719
12720         * Makefile.am: link to ../os/libmonoos.la on windows.
12721
12722         * assembly.c:
12723                 -If MONO_DEBUG, warn about non-existing directories in
12724                 MONO_PATH.
12725                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
12726                 compile time variable.
12727                 -Removed init_default_path and call mono_set_rootdir from
12728                 libmonoos.a instead (windows only).
12729
12730         * assembly.h: declare mono_assembly_getrootdir().
12731
12732         * domain.c:
12733         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
12734
12735         * loader.c: s/getenv/g_getenv/
12736
12737 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
12738
12739         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
12740
12741         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
12742
12743         * metadata.h: Add new marshalling conversions.
12744
12745         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
12746         function.
12747
12748         * reflection.c (mono_reflection_get_type): Lookup the type in all
12749         modules of a multi-module assembly. Fixes #58291.
12750
12751 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
12752
12753         * threads.c: Before aborting a background, set the StopRequested
12754         state.  This avoids throwing the Abort exception.
12755         In mono_thread_manage, don't continue with the shutdown until all
12756         aborted threads have actually stopped.
12757
12758 2004-05-10  Jackson Harper  <jackson@ximian.com>
12759
12760         * locales.c: Remove the modifier from culture names.
12761         
12762 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12763
12764         * Makefile.am: monosn is not installed any more. It has been deprecated
12765         in favor of sn.
12766
12767 2004-05-07  Jackson Harper  <jackson@ximian.com>
12768
12769         * locales.c
12770         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
12771         Fix array construction, add bailout if the length is 0.
12772
12773 2004-05-07  Dick Porter  <dick@ximian.com>
12774
12775         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
12776         machine doesn't have a DNS entry.  Patch by Urs Muff
12777         (umuff@quark.com), fixes bug 57928.
12778
12779 2004-05-06  Jackson Harper  <jackson@ximian.com>
12780
12781         * reflection.c: Handle null PublicTokens properly. alloc mem for
12782         assembly names culture so we dont crash when freeing it.
12783         
12784 2004-05-06  Jackson Harper  <jackson@ximian.com>
12785
12786         * assembly.c: Check the usergac when loading with partial names.
12787         
12788 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
12789
12790         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
12791         does nothing for now (not required for Linux/Windows) but the class
12792         library can call it (and a newer or modified runtime could need it).
12793         * icall.c: Registred icall.
12794
12795 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12796
12797         * loader.c: prints a message on module loading error we set MONO_DEBUG
12798         environment variable.
12799
12800 2004-05-05  Jackson Harper  <jackson@ximian.com>
12801
12802         * appdomain.c: Handle PublicKeyToken=null properly.
12803         
12804 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
12805
12806         * environment.c|h: Added icall ves_icall_System_Environment_
12807         GetOSVersionString to get the current OS version as a string.
12808         * icall.c: Registred icall.
12809
12810 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
12811
12812         * object.c: in mono_object_get_virtual_method(), take into account that
12813         non-virtual methods don't have a slot in the vtable. Check needed when
12814         the object is a proxy.
12815
12816 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
12817
12818         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
12819         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
12820
12821         * object.c (mono_class_compute_gc_descriptor): Fix warning.
12822
12823         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
12824         passed when a valuetype is expected.
12825
12826         * object.c (mono_unhandled_exception): Only set the exit code if the
12827         exception happens in the main thread. Fixes thread5.exe.
12828
12829         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
12830         invalid names. Fixes #58047.
12831
12832 2004-05-03  Jackson Harper  <jackson@ximian.com>
12833
12834         * assembly.c: This line was committed accidently and is unneeded.
12835         
12836 2004-05-03  Jackson Harper  <jackson@ximian.com>
12837
12838         * icall.c: Add new icall for Assembly::LoadWithPartialName
12839         * assembly.c/.h: new function that probes the GAC to load partial
12840         assembly names by Paolo Molaro.
12841         
12842 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12843
12844         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
12845         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
12846         (type_get_fully_qualified_name): Added PublicKeyToken when building a
12847         full type name.
12848
12849 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12850
12851         * appdomain.c: fixed check for 'neutral' culture and removed warning.
12852         * reflection.c: fix bug when parsing a full type name and Version is not
12853         the last thing in the string.
12854
12855 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
12856
12857         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
12858         crashes when it is freed.
12859
12860 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12861
12862         * assembly.c: print the compat warning to stderr.
12863
12864 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
12865
12866         * assembly.c (mono_assembly_load_references): Add a compatibility
12867         hack to run old applications that might be still referencing the
12868         3300-based assemblies, only do this for System.xxx.
12869
12870 2004-05-01  Jackson Harper  <jackson@ximian.com>
12871
12872         * appdomain.c: If the culture is neutral we set it to "".
12873         
12874 2004-04-29  Jackson Harper  <jackson@ximian.com>
12875
12876         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
12877
12878 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
12879  
12880         * string-icalls.c: added low overhead function for copying chars
12881         * icall.c: added needed icall for the above function
12882  
12883 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12884
12885         * icall.c: fix return value of get_global_assembly_cache.  Implemented
12886         Environment.GetLogicalDrives.
12887
12888 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
12889
12890         * rand.c: try and talk to egd or prngd
12891         for random bytes if opening devices fail.
12892
12893 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
12894
12895         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
12896         alignment for the type using the native alignment of its members 
12897         instead of using klass->min_align.
12898
12899         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
12900
12901 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12902
12903         * file-io.c:
12904         * socket-io.c: added check for sys/aio.h.
12905
12906 2004-04-28  Dick Porter  <dick@ximian.com>
12907
12908         * threads.c: Don't abort a thread thats already aborting, when
12909         terminating everything.
12910
12911 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12912
12913         * icall.c: added 2 new async calls for Socket.
12914
12915         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
12916         IO on *nix systems.
12917
12918         * threadpool.c: removed unused variable.
12919
12920 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
12921
12922         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
12923
12924 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
12925
12926         * locales.c: put back string_invariant_tolower () and
12927         string_invariant_toupper ().
12928
12929 2004-04-26 David Waite <mass@akuma.org>
12930
12931         * file-io.h:
12932         * socket-io.h:
12933         * threads.h:
12934         * unicode.h: remove comma from end of enumeration declarations
12935
12936 2004-04-26 David Waite <mass@akuma.org>
12937
12938         * debug-mono-symfile.h:
12939         * decimal.c:
12940         * mono_debug.h:
12941         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
12942
12943
12944 2004-04-26  Jackson Harper  <jackson@ximian.com>
12945
12946         * appdomain.c: Increment version number.
12947         
12948 2004-04-26  Jackson Harper  <jackson@ximian.com>
12949
12950         * appdomain.c: Set assembly references public token value when
12951         PublicKeyToken is specified, not the hash_value. Free public token
12952         values when free assembly name data. Previously the public key
12953         token was hex decoded, however we are using hex encoded public key
12954         tokens, so this is not neccasary.
12955         * assembly.c: Lookup assemblies in the gac if their public token
12956         value is set. Add function to allow enabling user gac
12957         lookups. Specify whether or not the assembly was loaded from the
12958         GAC. Compare full assembly names when checking the cache for
12959         assemblies (Temporarily disabled see comment in code). Remove
12960         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
12961         specifies trace-loader they get extra info to stdout on the
12962         loading of assemblies.
12963         * image.h: Add a field for an assembly references public token
12964         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
12965         whether an assembly has been loaded from the GAC.
12966         * image.c: Remove a corlib -> mscorlib name mapping.
12967         * loader.h: Add function to enable/disable the user gac.
12968         * mono-config.c: Check if the usergac is enabled in the config
12969         file.
12970         * icall.c: New icall to determine whether or not an assembly has
12971         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
12972         * tabldefs.h: Add constant for assemblyref flag that specifies a
12973         full public key is used instead of a public token.
12974         * reflection.c: Remove mscorlib -> corlib mappings. Set
12975         PublicTokenValue instead of hash value. This value is a hex
12976         string so it does not need to be expanded.
12977
12978 2004-04-26  Martin Baulig  <martin@ximian.com>
12979
12980         * mono-debug-debugger.c (mono_debugger_initialize): Set
12981         `mono_debugger_initialized' before calling mono_debug_lock().
12982
12983 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
12984
12985         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
12986           InternalToUpper/InternalToLower.
12987         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
12988           removed invariant culture shortcut.  This is now done in managed code.
12989         * locales.c: (string_invariant_toupper/tolower) removed.
12990
12991 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12992
12993         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
12994         Added Poll internal call.
12995
12996         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
12997         call for Poll. Select was too heavy for polling a single socket.
12998
12999         * threadpool.[ch]: added mono_threadpool_cleanup.
13000         * threads.c: use it. Don't use Thread_Abort on windows.
13001
13002 2004-04-23  Martin Baulig  <martin@ximian.com>
13003
13004         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
13005
13006 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
13007
13008         * icall.c: Registred new icalls for key pair protection and added an
13009         icall for Environment.GetFolderPath on Windows.
13010         * security.c|h: Added new icalls for key pair protection.
13011
13012 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13013
13014         * socket-io.c: don't display the non-supported family warning for known
13015         families. Now this is not displayed on windows when checking support
13016         for IPv4/IPv6.
13017
13018 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13019
13020         * class.c: don't display the layout warning for static fields.
13021
13022 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
13023
13024         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
13025         * locales.c, locales.h: Added new icalls for culture-specific
13026         Char.ToLower and Char.ToUpper.
13027
13028 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13029
13030         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
13031         by David Waite.
13032
13033 2004-04-20  Martin Baulig  <martin@ximian.com>
13034
13035         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
13036         of the type name before passing it to mono_reflection_type_from_name().
13037
13038 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13039
13040         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
13041         encodings here. Fixes #56965.
13042
13043 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
13044
13045         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
13046         fix test on strstr result not that I can see anything that
13047         relies on the result.
13048
13049 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13050
13051         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
13052         Fixes #57081.
13053
13054         * marshal.c (mono_marshal_get_string_encoding): New helper function.
13055
13056         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
13057         function to determine which marshalling to use for strings. Fixes
13058         #56965.
13059
13060         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
13061
13062         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
13063
13064 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
13065
13066         * icall.c: #include mono-config.h
13067
13068 2004-04-15  Jackson Harper  <jackson@ximian.com>
13069
13070         * culture-info-tables.h: Fix date formats for en-US culture.
13071         
13072 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
13073
13074         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
13075         ThreadPool.SetMinThreads.
13076         * threadpool.c: Implemented ThreadPool.GetMinThreads and
13077         ThreadPool.SetMinThreads.
13078
13079 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13080
13081         * mono-config.c: also load the .config file in the directory
13082         where the assembly was found.
13083
13084 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13085
13086         * assembly.c: load per-assembly config files.
13087         * icall.c: decrapified code to get the config dir and moved to
13088         mono-config.c.
13089         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
13090         per-assembly config files. When doing a dll map lookup give precedence
13091         to the per-assembly data.
13092
13093 2004-04-14  Martin Baulig  <martin@ximian.com>
13094
13095         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
13096         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
13097         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
13098
13099         * mono-debugger-debugger.c: While the debugger is locked, remember
13100         whether the symbol tables have changes and send one single
13101         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
13102
13103 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13104
13105         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
13106
13107         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
13108         function.
13109
13110         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
13111         account when marshalling string arrays. Fixes #56965.
13112
13113 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
13114
13115         * icall.c: Add new icalls mapping for security.
13116         * security.c|h: Add internal calls for WindowsIdentity,
13117         WindowsImpersonationContext and WindowsPrincipal.
13118
13119 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
13120
13121         * class.c: Added comment to ensure the System.MonoDummy class
13122         is removed when no longer necessary
13123
13124 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13125
13126         * appdomain.c: Pass arguments to the bootstraping exceptions to
13127         minimize JITed methods at boot
13128
13129         * metadata.c (mono_exception_from_name_two_strings): Allow for the
13130         second string to be null.
13131
13132         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
13133         Change the protocol to minimize the JIT methods at startup.  Now
13134         it Returns the internal codepage, if the value of "int_code_page"
13135         is 1 at entry, and we can not compute a suitable code page
13136         number, returns the code page as a string.
13137
13138 2004-04-13  Jackson Harper  <jackson@ximian.com>
13139
13140         * culture-info-tables.h: Fix number of decimal digits for all
13141         english locales.
13142
13143 2004-04-13  Jackson Harper  <jackson@ximian.com>
13144
13145         * icall.c: Clairfy out of sync error message. It is not always
13146         your corlib that is out of sync.
13147
13148 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
13149
13150         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
13151         properties when only the set accessor is overriden. Fixes #55874.
13152
13153 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
13154
13155         * assembly.c (mono_assembly_load_references): Make this thread safe.
13156         Fixes #56327.
13157
13158 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13159
13160         * monosn.c: Add missing initialization calls.
13161
13162 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
13163
13164         * locales.c:
13165         ves_icall_System_Globalization_CultureInfo_construct_number_format
13166         Fix g_assert so it compiles on fussier compilers re int/ptr
13167         mismatch
13168
13169 2004-04-08  Dick Porter  <dick@ximian.com>
13170
13171         * socket-io.h:
13172         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
13173         53992.  Also rearrange the code so that the internal calls return
13174         an error value and exceptions are thrown from managed code.
13175
13176         * icall.c: Add type info to the socket icalls.
13177
13178 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13179
13180         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
13181         owes me a beer.
13182
13183 2004-04-07  Martin Baulig  <martin@ximian.com>
13184
13185         * class.c (mono_class_from_generic_parameter): Don't default
13186         `klass->parent' to `mono_defaults.object_type'.
13187
13188 2004-04-07  Martin Baulig  <martin@ximian.com>
13189
13190         * reflection.c (mono_reflection_initialize_generic_parameter): Set
13191         `param->pklass->reflection_info'.       
13192
13193 2004-04-07  Jackson Harper  <jackson@ximian.com>
13194
13195         * culture-info-tables.h: Fix date separator symbol.
13196         
13197 2004-04-07  Martin Baulig  <martin@ximian.com>
13198
13199         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
13200         from System.Type to System.MonoType.
13201
13202 2004-04-07  Martin Baulig  <martin@ximian.com>
13203
13204         * reflection.h
13205         (MonoReflectionGenericParam): Added `has_reference_type' and
13206         `has_value_type' fields.
13207
13208         * reflection.c (mono_image_get_generic_param_info): Encode the
13209         correct flags if we have the `class' or `struct' constraint.
13210
13211 2004-04-07  Martin Baulig  <martin@ximian.com>
13212
13213         * reflection.h
13214         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
13215
13216 2004-04-07  Jackson Harper  <jackson@ximian.com>
13217
13218         * appdomain.c: Revert extra patches, just wanted to bump the
13219         version number.
13220         
13221 2004-04-07  Jackson Harper  <jackson@ximian.com>
13222
13223         * Makefile.am: Add culture-info private headers.
13224         * icall.c: Add new icalls for contructing locales.
13225         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
13226         * locales.h: Declare new culture info construction methods.
13227         * object.h: Add new fields used to avoid the CultureMap to
13228         MonoCultureInfo.
13229         * culture-info.h: Definition of structs used in the culture info
13230         tables.
13231         * culture-info-tables.h: Autogenerated tables that contain culture
13232         info data. This file was generated with the locale-builder tool.
13233         * appdomain.c: Incement corlib version number.
13234         
13235 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
13236
13237         * appdomain.c: (mono_runtime_init) move mono_thread_init
13238         to before mono_object_new calls so critical sections
13239         are initialized before use.
13240
13241 2004-04-07  Martin Baulig  <martin@ximian.com>
13242
13243         * icall.c
13244         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
13245         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
13246         (ves_icall_MonoGenericParam_initialize): Removed.
13247         (monogenericparam_icalls): Removed.
13248         (generictypeparambuilder_icalls): Added new table for
13249         System.Reflection.Emit.GenericTypeParameterBuilder.
13250
13251         * reflection.c
13252         (mono_reflection_define_generic_parameter): Removed.
13253         (mono_reflection_initialize_generic_parameter): This is now called
13254         from GenericTypeParameterBuilder's .ctor.
13255
13256 2004-04-06  Martin Baulig  <martin@ximian.com>
13257
13258         * class.c (mono_class_init): Don't inflate nested classes in a
13259         generic instance.
13260         (mono_type_get_name_recurse): Include the generic arguments for
13261         generic instances and generic type declarations.
13262         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
13263         (_mono_class_get_instantiation_name): Removed.
13264         (mono_class_create_generic): Always use `gklass->name' as our name.
13265
13266         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
13267
13268         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
13269         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
13270         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
13271         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
13272         closed generic methods here.
13273
13274         * reflection.c
13275         (mono_reflection_generic_inst_get_nested_types): Removed.
13276         (inflate_mono_method): Copy the generic parameters from the
13277         MonoMethodHeader into out MonoGenericMethod.
13278
13279 2004-04-06  Martin Baulig  <martin@ximian.com>
13280
13281         * row-indexes.h
13282         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
13283
13284         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
13285
13286         * reflection.c (build_compressed_metadata): If we have any entries
13287         in the GenericParam, MethodSpec or GenericParamConstraint tables,
13288         set the header version to 1.1.
13289
13290 2004-04-06  Martin Baulig  <martin@ximian.com>
13291
13292         * class.c (mono_class_init): If we're a generic instance,
13293         initialize our nested classes, too.
13294         (_mono_class_get_instantiation_name): Deal with the new `!%d'
13295         suffix. 
13296
13297 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13298
13299         * process.c: quote the argument passed to the shell on windows.
13300
13301 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13302
13303         * threads.c (mono_alloc_special_static_data): Allow this to be
13304         called during startup.
13305
13306 2004-04-02  Martin Baulig  <martin@ximian.com>
13307
13308         * icall.c
13309         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
13310
13311 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13312
13313         * icall.c: Fix build.
13314
13315 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
13316
13317         * Makefile.am: Added security.c|h.
13318         * icall.c: Added icall for get_UserName;
13319         * security.c: New file for security related icalls. Added function
13320         get_UserName for System.Environment (fix #56144).
13321         * security.h: New. Header file for security.c
13322
13323 2004-04-02  Dick Porter  <dick@ximian.com>
13324
13325         * icall.c: Deleted the icalls that were obsoleted some time ago
13326         by the ICU string code, and which were mixed into the icall
13327         rearranging.  Fixes bug 55969.
13328
13329         * string-icalls.h: 
13330         * string-icalls.c: Deleted the code that those icalls reference.
13331
13332 2004-04-01  Martin Baulig  <martin@ximian.com>
13333
13334         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
13335
13336         * class.c (mono_class_from_generic_parameter): Don't set 
13337         TYPE_ATTRIBUTE_INTERFACE.
13338         (my_mono_class_from_generic_parameter): Likewise.
13339
13340 2004-04-01  Martin Baulig  <martin@ximian.com>
13341
13342         * loader.c (find_method): Added an optional `MonoClass *ic'
13343         argument to search in a specific interface.
13344         (mono_get_method_constrained): New public function.
13345
13346 2004-04-01  Martin Baulig  <martin@ximian.com>
13347
13348         * reflection.c (mono_image_get_generic_field_token): Use the
13349         `handleref' cache here.
13350
13351 2004-04-01  Martin Baulig  <martin@ximian.com>
13352
13353         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
13354
13355         * reflection.c (create_generic_typespec): Use the `typespec' hash
13356         here, not the `typeref' one.    
13357
13358 2004-04-01  Martin Baulig  <martin@ximian.com>
13359
13360         * class.c (mono_class_inflate_generic_type): Moved the
13361         functionality into a new static inflate_generic_type() which
13362         returns NULL if it didn't do anything.  Only increment the
13363         `mono_stats.inflated_type_count' if we actually inflated
13364         something.
13365         (mono_class_get_full): Check the classes type to see whether we
13366         need to inflate it; also inflate MONO_TYPE_(M)VAR.
13367
13368 2004-04-01  Jackson Harper  <jackson@ximian.com>
13369
13370         * reflection.c: Set culture for assembly references.
13371         
13372 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
13373
13374         * reflection.[ch], icall.[ch], Fix support for pinning variables.
13375
13376 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13377
13378         * assembly.c:
13379         (do_mono_assembly_open): the critical section also covers
13380         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
13381
13382 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13383
13384         * threads.c:
13385         (mono_manage_threads): abort the background threads when finishing.
13386         Fixes bug #47232.
13387
13388 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13389
13390         * gc.c: only close the done_event handle if there was no timeout.
13391         C-ified comments.
13392
13393 2004-03-30  Martin Baulig  <martin@ximian.com>
13394
13395         * icall.c (icall_entries): It's called "System.Activator", not
13396         "System.Activation".    
13397
13398 2004-03-30  Martin Baulig  <martin@ximian.com>
13399
13400         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
13401         (mono_class_create_from_typespec): Likewise.
13402
13403 2004-03-30  Martin Baulig  <martin@ximian.com>
13404
13405         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
13406         `has_ctor_constraint' and `initialized'.
13407
13408 2004-03-30  Martin Baulig  <martin@ximian.com>
13409
13410         * reflection.c (encode_new_constraint): New static function to add
13411         the constructor constraint attribute to a type parameter.
13412         (encode_constraints): Call encode_new_constraint() if necessary.
13413
13414         * reflection.h
13415         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
13416
13417         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
13418         
13419 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
13420
13421         * reflection.c, icall.c: add support for pinning variables. 
13422
13423 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
13424
13425         * marshal.c (mono_marshal_get_managed_wrapper):
13426         init bool local with zero rather than null.
13427
13428 2004-03-29  Martin Baulig  <martin@ximian.com>
13429
13430         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
13431         the "official" behavior here.
13432         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
13433
13434 2004-03-29  Martin Baulig  <martin@ximian.com>
13435
13436         * icall.c: Reflect latest API changes.
13437
13438 2004-03-29  Martin Baulig  <martin@ximian.com>
13439
13440         * loader.c (mono_get_method_from_token): Also call
13441         mono_metadata_load_generic_params () for abstract and interface
13442         methods; replace the type arguments in the method signature with
13443         the ones which are loaded from the metadata.
13444
13445 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
13446
13447         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
13448         of the lock is not the current thread. MS.NET don't do it, in spite of
13449         what the documentation says. See bug #56157.
13450
13451 2004-03-28  Martin Baulig  <martin@ximian.com>
13452
13453         * class.c (mono_class_init): Don't call init_properties() and
13454         init_events() for generic instances; set `prop->parent' when
13455         inflating properties.
13456
13457         * reflection.c (mono_generic_inst_get_object): Call
13458         `mono_class_init (ginst->klass)'.
13459         (mono_type_get_object): Only create a MonoGenericInst if your
13460         generic type is a TypeBuilder.
13461         (do_mono_reflection_bind_generic_parameters): Only set
13462         `ginst->is_dynamic' if our generic type is a TypeBuilder.
13463
13464 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13465
13466         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
13467         Fixes #56091.
13468
13469 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13470
13471         * icall.c: added Kill_internal icall.
13472         * process.[ch]: added Kill_internal icall.
13473
13474 2004-03-25  Martin Baulig  <martin@ximian.com>
13475
13476         * class.h (MonoStats): Added `generic_instance_count',
13477         `inflated_method_count', `inflated_type_count' and
13478         `generics_metadata_size'.       
13479
13480 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13481
13482         * reflection.c: no warnings now.
13483
13484 2004-03-25  Martin Baulig  <martin@ximian.com>
13485
13486         * class.c (mono_class_get_full): New public function; does a
13487         mono_class_get(), but also takes a `MonoGenericContext *'.
13488
13489         * loader.c (mono_field_from_memberref): Renamed to
13490         `field_from_memberref', made static and added `MonoGenericContext *'
13491         argument.
13492         (mono_field_from_token): Added `MonoGenericInst *' argument.
13493         (method_from_memberef): Likewise.
13494         (mono_get_method_from_token): Likewise.
13495         (mono_get_method_full): New public function; does a
13496         mono_get_method(), but also takes a `MonoGenericContext *'.
13497
13498         * verify.c (mono_method_verify): Get the method's generic context
13499         and pass it to mono_field_from_token(), mono_get_method_full() and
13500         mono_class_get_full().
13501
13502 2004-03-25  Martin Baulig  <martin@ximian.com>
13503
13504         * class.c (mono_class_inflate_generic_type): Take a
13505         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
13506         `MonoGenericMethod *'.
13507
13508 2004-03-25  Martin Baulig  <martin@ximian.com>
13509
13510         * loader.h (MonoMethodInflated): Store the MonoGenericContext
13511         instead of the MonoGenericMethod here.
13512
13513 2004-03-25  Martin Baulig  <martin@ximian.com>
13514
13515         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
13516         each time we create a new MonoGenericInst, we also create a new
13517         context which points back to us.
13518
13519         * class.c (inflate_method): Use `ginst->context' instead of
13520         creating a new context.
13521
13522         * loader.c (method_from_memberref): Use
13523         `klass->generic_inst->context' instead of creating a new context.
13524
13525 2004-03-25  Martin Baulig  <martin@ximian.com>
13526
13527         * class.h (MonoGenericContext): New struct.
13528         (MonoGenericMethod): Removed `generic_inst'.
13529
13530         * class.c (mono_class_inflate_generic_method): Take a
13531         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
13532
13533 2004-03-25  Martin Baulig  <martin@ximian.com>
13534
13535         * loader.h (MonoMethodInflated): New typedef.
13536
13537         * metadata.h (MonoMethodSignature): Removed `gen_method', make
13538         `generic_param_count' consume just 30 bits, added `is_inflated'
13539         and `has_type_parameters' flags (one bit each).
13540
13541         * class.c (mono_class_inflate_generic_method): Create a
13542         MonoMethodInflated instead of a MonoMethodNormal and set
13543         `is_inflated' in the method signature.
13544
13545         * class.h (MonoGenericMethod): Removed `generic_method'.
13546
13547 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
13548
13549         * image.c: Make sure the name of a MonoImage is always an absolute path.
13550           This fixes bug #54415.
13551
13552 2004-03-24  Martin Baulig  <martin@ximian.com>
13553
13554         * class.c (mono_class_setup_vtable): If we're a generic instance,
13555         use our generic type's vtable size.
13556
13557 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13558
13559         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
13560         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
13561         problems.
13562
13563 2004-03-23  Martin Baulig  <martin@ximian.com>
13564
13565         * class.h (MonoDynamicGenericInst): Added `int count_events' and
13566         `MonoEvent *events'.
13567
13568         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
13569         (typebuilder_icalls): Added "get_event_info"; calls
13570         mono_reflection_event_builder_get_event_info(). 
13571
13572         * reflection.c (mono_reflection_generic_inst_initialize): Added
13573         `MonoArray *events'.
13574         (mono_reflection_event_builder_get_event_info): New function.
13575
13576 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
13577
13578         * object.h: add mono_type_initialization_init
13579
13580         * object.c (mono_runtime_class_init): 
13581         implement class constructor synchronization rules
13582         to cope with threading issues.  
13583         add mono_type_initialization_init
13584
13585         * appdomain.c (mono_runtime_init): call 
13586         mono_type_initialization_init
13587
13588         * class.h: removing initializing field from MonoVTable
13589
13590 2004-03-23  Martin Baulig  <martin@ximian.com>
13591
13592         * class.c (my_mono_class_from_generic_parameter): Use
13593         `param->name' if it's not NULL. 
13594
13595 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
13596
13597         * class.c: do not insert non-virtual methods in the vtable.
13598         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
13599         that means the method is non-virtual. This never would have
13600         happened before.
13601
13602 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13603
13604         * profiler.c: Added lock for accessing coverage_hash.
13605
13606 2004-03-22  Martin Baulig  <martin@ximian.com>
13607
13608         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
13609         `method->method->signature->generic_param_count != 0' to make it
13610         work for interface methods.
13611
13612 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13613
13614         * process.c: quote the string passed to the shell using g_shell_quote.
13615
13616 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13617
13618         * threads.c:
13619         (mono_threads_manage): don't remove the finalizer thread and self
13620         from the threads hash table so that mono_thread_manage can be called
13621         more than once.
13622
13623 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13624
13625         * process.c: quote the arguments when UseShellExecute is true. Fixes
13626         bug #55790.
13627
13628 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13629
13630         * threads.c: set mono_thread_detach as a cleanup routine for every
13631         thread. This way it's always executed upon thread termination, either
13632         aborted or finished normally. No more xsp hangs!
13633
13634 2004-03-17  Martin Baulig  <martin@ximian.com>
13635
13636         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
13637         `int count_nested' and a `MonoType **nested'.
13638
13639         * reflection.c (mono_reflection_bind_generic_parameters): Moved
13640         most of the functionality into a new static
13641         do_mono_reflection_bind_generic_parameters() and don't take a
13642         `MonoType *nested_in' argument any more.  Don't compute nested
13643         types here.
13644         (mono_reflection_generic_inst_get_nested_types): New public method
13645         to get nested types.
13646
13647         * class.c (mono_class_create_generic): Set `klass->nested_in' if
13648         we're a nested class.
13649
13650         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
13651         mono_reflection_generic_inst_get_nested_types() to compute the
13652         nested types.
13653
13654 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13655
13656         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
13657         descriptive error message under windows.
13658         
13659 2004-03-17  Martin Baulig  <martin@ximian.com>
13660
13661         * class.c (dup_type): Added `const MonoType *original' argument;
13662         copy the attrs from the original type.
13663
13664 2004-03-17  Martin Baulig  <martin@ximian.com>
13665
13666         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
13667         `m->generic_inst_cache' here.
13668
13669 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13670
13671         * exception.h exception.c: Add stack_overflow_exception.
13672
13673 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13674
13675         * threadpool.c:
13676         (overlapped_callback): call SetEvent *after* invoking the callback.
13677         No need to call CloseHandle.
13678
13679 2004-03-16  Martin Baulig  <martin@ximian.com>
13680
13681         * reflection.c (mono_image_get_fieldref_token): Take a
13682         `MonoReflectionField *' instead of a `MonoClassField *' and a
13683         `MonoClass *'; store the `MonoReflectionField *' in the hash.
13684
13685 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13686
13687         * appdomain.c: don't add the culture to the filename we're looking for
13688         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
13689
13690 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13691
13692         * locales.c: don't ignore symbols when doing case insensitive compares.
13693         Thanks Dick! Fixes bug #54046.
13694
13695         * threads.c: surround 'threads' usage with enter/leave in
13696         mono_thread_manage.
13697
13698 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
13699
13700         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
13701         implicitly marshalled as [Out]. Fixes #55450.
13702
13703         (mono_marshal_get_runtime_invoke): Zero out the result if there is
13704         an exception.
13705
13706 2004-03-16  Martin Baulig  <martin@ximian.com>
13707
13708         * class.c (mono_class_from_generic_parameter): Use the actual
13709         parameter name. 
13710
13711 2004-03-16  Martin Baulig  <martin@ximian.com>
13712
13713         * reflection.c (type_get_signature_size): New static function.
13714         Compues the size of the type in a method signature.
13715         (method_get_signature_size): New static function; calls
13716         type_get_signature_size() to compute the actual size of the
13717         method's signature.
13718         (method_encode_signature): Use method_get_signature_size() to get
13719         the signature's size rather than using `nparams * 10'.
13720
13721 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13722
13723         * file-io.h: define here WapiOverlapped on windows. I don't want the
13724         regular OVERLAPPED one.
13725
13726         * file-io.c:
13727         * threadpool.c: somehow, BindIoCompletionCallback is not found.
13728         Disabling AIO on windows.
13729
13730 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13731
13732         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
13733         bug #55385.
13734
13735 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13736
13737         * appdomain.c: upgraded corlib version.
13738
13739         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
13740         and BeginWrite. Allow opening files for asynchrnous operations.
13741
13742         * file-io.h: new struct that maps FileStreamAsyncResult.
13743         * icall.c: added new icalls.
13744         * process.[ch]: support setting child process environment variables
13745         and use the SHELL or COMSPEC when UseShellExecute is true.
13746
13747         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
13748         callback for async. IO is here and also BindHandle.
13749
13750         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
13751         from here.
13752
13753 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
13754
13755         * reflection.c (create_custom_attr): Allow len == 0.
13756
13757         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
13758         computation on big-endian machines.
13759
13760 2004-03-13  Martin Baulig  <martin@ximian.com>
13761
13762         * class.h (MonoGenericInst): Added `int count_ifaces'.
13763
13764         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
13765         `ginst->count_ifaces' instead `klass->interface_count' since we
13766         may get called before the vtable is created.
13767
13768         * loader.c (mono_method_get_param_names): If we're a generic
13769         instance, return and don't initialize the class.
13770
13771         * reflection.c (mono_reflection_setup_generic_class): Don't call
13772         ensure_runtime_vtable().
13773         (mono_reflection_bind_generic_parameters): Set
13774         `ginst->count_ifaces'.
13775
13776 2004-03-11  Jackson Harper <jackson@ximian.com>
13777
13778         * icall.c:
13779         * unicode.c:
13780         * unicode.h: Remove unused System.Char icalls.
13781         
13782 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
13783
13784         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
13785         code when we P/Invoke the first library in Windows.Forms, instead
13786         of when we first open the assembly.
13787
13788         * assembly.c: Drop the lookup from here.
13789
13790 2004-03-10  Martin Baulig  <martin@ximian.com>
13791
13792         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
13793         class for properties, fields and events.  Finally fixes #54945.
13794
13795 2004-03-10  Martin Baulig  <martin@ximian.com>
13796
13797         * metadata.c (mono_metadata_class_equal): New static function;
13798         checks whether two generic instances or two generic parameters are
13799         equal.
13800         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
13801         compare classes.        
13802
13803 2004-03-10  Martin Baulig  <martin@ximian.com>
13804
13805         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
13806
13807         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
13808         argument and write it into the `reflection_info' field.
13809
13810         * icall.c
13811         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
13812         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
13813
13814 2004-03-09  Jackson Harper  <jackson@ximian.com>
13815
13816         * char-conversions.h: use 8 bits for numeric data its all we need
13817         * icall.c: numeric data is only 8 bits now.
13818
13819 2004-03-09  Martin Baulig  <martin@ximian.com>
13820
13821         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
13822
13823         * class.c (init_properties, init_events): Initialize the new
13824         `parent' field.
13825
13826         * reflection.c (typebuilder_setup_properties): Likewise.
13827         (typebuilder_setup_events): Likewise.
13828
13829         * reflection.h (MonoEventInfo): Replaced `parent with
13830         `declaring_type' and `reflected_type'.
13831
13832         * icall.c (ves_icall_get_property_info): Distinguish between
13833         declaring and reflected type.
13834         (ves_icall_get_event_info): Likewise.
13835
13836 2004-03-09  Martin Baulig  <martin@ximian.com>
13837
13838         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
13839         (ves_icall_Type_GetField): Correctly set field->klass.
13840
13841 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13842
13843         * loader.h: Fix warning.
13844
13845 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
13846
13847         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
13848         library routine if present.  Notice that it will still continue
13849         executing even if its missing, for those working on the Gtk#
13850         edition of Windows.Forms.
13851
13852         * assembly.c (do_mono_assembly_open): If loading the
13853         System.Windows.Forms call mono_loader_wini_init.
13854
13855 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
13856
13857         * class.h: Added MonoRemoteClass struct.
13858         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
13859         function for MonoStrings.
13860         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
13861         Added internal call for getting the proxy type.
13862         * marshal.c: Get the type of transparent proxies from its remote_class.
13863         Added methods that generate the IL for type checks and casts:
13864         mono_marshal_get_isinst, mono_marshal_get_castclass, 
13865         mono_marshal_get_proxy_cancast.
13866         * marshal.h: Declaration of the previous new methods.
13867         * object.c: Added new moethods for creating and updating MonoRemoteClass
13868         instances: mono_remote_class, mono_upgrade_remote_class, 
13869         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
13870         * verify.c: FIx transparent_proxy_fields layout.
13871         * appdomain.c: Bump corlib version.
13872
13873 2004-03-04  Jackson Harper  <jackson@ximian.com>
13874
13875         * icall.c: Add icall to access char conversion tables.
13876         * char-conversions.h: Character conversion tables.
13877         * Makefile.am: Add char-conversions.h private header file.
13878         
13879 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
13880
13881         * appdomain.c (unload_thread_main): Increase unloading timeout to
13882         10 sec as a temporary workaround for Nant problems.
13883
13884 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
13885
13886         * gc.c: Add checks for GC_enable and GC_disable.
13887
13888         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
13889         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
13890         (bug #54988).
13891         
13892 2004-02-27  Martin Baulig  <martin@ximian.com>
13893
13894         * reflection.c (mono_reflection_bind_generic_parameters): Take a
13895         `MonoReflectionType *' instead of a `MonoType *'.
13896
13897 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
13898
13899         * gc.c (run_finalize): Avoid finalizing the object representing the
13900         finalizer thread.
13901         (finalizer_thread): Fix warning.
13902
13903 2004-02-25  Martin Baulig  <martin@ximian.com>
13904
13905         * class.c (_mono_class_get_instantiation_name): Added `int offset'
13906         argument for nested types.
13907         (mono_class_create_generic): Added support for nested generictypes.
13908
13909         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
13910         `GList *nested'.
13911
13912         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
13913
13914         * reflection.c (method_encode_signature): Increase the minimum
13915         value of `size' from 10 to 11.
13916         (mono_reflection_bind_generic_parameters): Take `int type_argc'
13917         and `MonoType **types' arguments instead of the `MonoArray
13918         *types'; added `MonoType *nested_in'.  Recursively instantiate
13919         nested classes. 
13920
13921 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
13922
13923         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
13924         stack_overflow_ex members which are used by exception handling.
13925
13926         * appdomain.c (mono_runtime_init): Initialize the new members.
13927
13928         * gc.c (mono_gc_enable): New helper function.
13929         * gc.c (mono_gc_disable): New helper function.
13930
13931 2004-02-23  Martin Baulig  <martin@ximian.com>
13932
13933         * icall.c: I must have been really stupid - make it actually work
13934         this time ;-)
13935
13936 2004-02-23  Martin Baulig  <martin@ximian.com>
13937
13938         * loader.c (method_from_memberref): Only inflate the method if
13939         it's in another klass.
13940
13941 2004-02-23  Martin Baulig  <martin@ximian.com>
13942
13943         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
13944         (mono_class_init): If we're a generic instance and an interface,
13945         compute `class->interface_id'; also create `class->interfaces'
13946         here and inflate them.
13947
13948         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
13949         `ginst->is_open'.
13950         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
13951
13952         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
13953
13954 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
13955
13956         * reflection.c (method_encode_code): Improved the error message
13957         generated by the exception.
13958
13959 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13960
13961         * icall.c: Martin did not do what he said in the ChangeLog for
13962         2004-02-18, but put back the changes for properties and events.
13963         Commenting those changes out again and adding comment to bug #54518.
13964         
13965         * process.c: removed warning.
13966
13967 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
13968
13969         * marshal.c (emit_struct_conv): Print an error message instead of
13970         asserting when a type does not have the StructLayout attribute.
13971
13972 2004-02-20  Martin Baulig  <martin@ximian.com>
13973
13974         * reflection.c (mono_type_get_object): Also use the cache for
13975         generic instances.
13976         (mono_reflection_bind_generic_parameters): Always compute
13977         `ginst->ifaces'.        
13978
13979 2004-02-20  Martin Baulig  <martin@ximian.com>
13980
13981         * class.h (MonoGenericMethod): Removed `klass'.
13982
13983         * class.c (mono_class_inflate_generic_method): Added `MonoClass
13984         *klass' argument.
13985
13986 2004-02-20  Martin Baulig  <martin@ximian.com>
13987
13988         * reflection.c (method_encode_methodspec): Actually use the
13989         uninflated signature for the memberref.
13990
13991 2004-02-20  Martin Baulig  <martin@ximian.com>
13992
13993         * class.h (MonoGenericMethod): Removed `declaring'.
13994
13995         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
13996         is NULL, compute it here.
13997
13998 2004-02-20  Martin Baulig  <martin@ximian.com>
13999
14000         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
14001
14002         * metadata.c (mono_metadata_generic_inst_hash): New method.
14003         (mono_metadata_generic_inst_equal): New method.
14004
14005         * reflection.c (mono_reflection_bind_generic_parameters): Use the
14006         `klass->image->generic_inst_cache' cache to avoid creating
14007         duplicate MonoGenericInst's.
14008
14009         * class.c (mono_class_inflate_generic_type): Use the cache.
14010
14011 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
14012
14013         * object.c: fixed gc descriptor calculation for embedded valuetypes.
14014
14015 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14016
14017         * icall.c: added Socket.WSAIoctl icall.
14018
14019         * socket-io.[ch]: implemented
14020         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
14021
14022 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
14023
14024         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
14025
14026 2004-02-18  Urs C Muff  <umuff@quark.com>
14027
14028         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
14029         this work on PPC and other big-endian architectures.
14030
14031         * debug-mono-symfile.h: Prepended the names of all the `guint32'
14032         fields with an underscore to make sure they're only accessed by
14033         the read32() macro.
14034
14035 2004-02-18  Martin Baulig  <martin@ximian.com>
14036
14037         * icall.c: Put the klass->refclass changes back for methods and
14038         fields, but not for properties and events.  We're currently not
14039         distinguishing between DeclaringType and ReflectedType for
14040         properties and events, that's what caused the regressions.
14041
14042 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14043
14044         * object.c:
14045         (mono_async_result_new): the handle can be NULL.
14046
14047         * threadpool.c: Use an event instead of a semaphore, don't initialize
14048         it until needed. This saves quite a few semaphores from being created
14049         when using the threadpool.
14050
14051 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
14052
14053         * object.c (mono_string_is_interned_lookup): Fix interning of long
14054         strings. Fixes #54473.
14055
14056         * domain.c (ldstr_equal): Optimize if the two strings are equal.
14057
14058         * icall.c: Revert the klass->refclass changes since they introduce
14059         regressions (bug #54518).
14060
14061 2004-02-18  Martin Baulig  <martin@ximian.com>
14062
14063         * class.c (mono_class_init): If we're a generic instance and don't
14064         come from a TypeBuilder, inflate our members here.
14065         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
14066         (mono_class_create_generic): New public method.
14067         (mono_class_initialize_generic): Removed.
14068         (get_instantiation_name): Renamed to
14069         _mono_class_get_instantiation_name() and made it public.
14070
14071 2004-02-18  Martin Baulig  <martin@ximian.com>
14072
14073         * class.c (mono_class_inflate_generic_type): Clear the new
14074         instance's `nginst->klass' when inflating a generic instance.
14075         (mono_class_is_subclass_of): Added (basic) support for generic
14076         instances.
14077
14078 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
14079
14080         * appdomain.h, domain.c: use a MonoCodeManager instead of a
14081         MonoMempool to hold compiled native code.
14082
14083 2004-02-17  Martin Baulig  <martin@ximian.com>
14084
14085         * class.h (MonoDynamicGenericInst): Added `count_properties' and
14086         `properties'.
14087
14088         * reflection.c (mono_reflection_generic_inst_initialize): Added
14089         `MonoArray *properties' argument.
14090
14091         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
14092
14093 2004-02-17  Martin Baulig  <martin@ximian.com>
14094
14095         * icall.c (ves_icall_Type_GetFields): Renamed to
14096         ves_icall_Type_GetFields_internal() and added a
14097         `MonoReflectionType *rtype' argument; pass it to
14098         mono_field_get_object() to set the field's "reflected" type.
14099         (ves_icall_Type_GetConstructors): Likewise.
14100         (ves_icall_Type_GetEvents): Likewise.
14101         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
14102         argument; pass it to mono_method_get_object() to set the method's
14103         "reflected" type.       
14104
14105 2004-02-17  Martin Baulig  <martin@ximian.com>
14106
14107         * class.h (MonoDynamicGenericInst): New type.
14108         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
14109
14110         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
14111         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
14112         (ves_icall_MonoGenericInst_GetFields): New interncall.
14113
14114         * class.c (mono_class_from_generic): Don't call
14115         mono_class_initialize_generic() if this is a dynamic instance;
14116         ie. it's being created from a TypeBuilder.
14117         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
14118         `class->byval_arg.type'.
14119
14120         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
14121         to `inflate_method' and made static.
14122         (mono_reflection_inflate_field): Removed.
14123         (mono_reflection_generic_inst_initialize): New public method.
14124
14125         * reflection.h (MonoReflectionGenericInst): Removed `methods',
14126         `ctors' and `fields'; added `initialized'.
14127
14128 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14129
14130         * debug-helpers.c (mono_method_full_name): Fix output for empty
14131         namespaces.
14132
14133 2004-02-12  Martin Baulig  <martin@ximian.com>
14134
14135         * class.h (MonoClassField): Added `MonoType *generic_type'.
14136
14137         * reflection.c (mono_image_get_fieldref_token): Added support for
14138         instantiated generic types.
14139         (field_encode_inflated_field): Removed.
14140         (mono_image_get_inflated_field_token): Removed.
14141         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
14142
14143         * reflection.h (MonoReflectionInflatedField): Removed.
14144
14145 2004-02-12  Martin Baulig  <martin@ximian.com>
14146
14147         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
14148         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
14149
14150         * reflection.c (mono_image_get_methodspec_token): Take a
14151         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
14152         (mono_image_create_token): Check whether we have a
14153         `method->signature->gen_method' and call
14154         mono_image_get_methodspec_token() if appropriate.
14155         (inflated_method_get_object): Removed.
14156         (mono_reflection_bind_generic_method_parameters): Return a
14157         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
14158         (mono_reflection_inflate_method_or_ctor): Likewise.
14159
14160         * reflection.h (MonoReflectionInflatedMethod): Removed.
14161
14162 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
14163
14164         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
14165         for custom valuetype marshalling.
14166
14167         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
14168
14169 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14170
14171         * icall.c: fixed WSAGetLastError_internal name.
14172
14173 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14174
14175         * threads.c (mono_thread_attach): Allow this to be called multiple
14176         times for a thread.
14177         
14178         * threads.c (build_wait_tids): Do not wait for ourselves.
14179
14180         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
14181         appdomain list is empty.
14182
14183         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
14184         memory returned by mono_string_builder_to_utf16, since it points into
14185         managed memory. Thanks to Bernie Solomon for noticing this.
14186
14187         * icall.c: Add AppDomainSetup icalls.
14188
14189         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
14190
14191         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
14192         types.
14193
14194         * reflection.c (reflection_methodbuilder_to_mono_method): Save
14195         custom attributes to the method_aux struct. Also fix array indexes etc.
14196
14197         * loader.c (mono_method_get_param_names): Make dynamic case work again.
14198         
14199 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
14200
14201         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
14202         (both static and runtime) and reduce startup time.
14203
14204 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14205
14206         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
14207         AsAny marshalling conversion instead of crashing.
14208
14209         * marshal.c: Fix warnings.
14210
14211 2004-02-09  Martin Baulig  <martin@ximian.com>
14212
14213         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
14214
14215         * reflection.h (MonoReflectionInflatedMethod): Removed the
14216         `declaring' field, it's now in the unmanaged MonoGenericMethod.
14217
14218         * reflection.c (method_encode_methodspec): Removed the `method'
14219         argument; we get it from `gmethod->declaring'.
14220         (inflated_method_get_object): Removed the `declaring' argument.
14221
14222 2004-02-09  Martin Baulig  <martin@ximian.com>
14223
14224         * class.h (MonoGenericMethod): New type.
14225         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
14226         `generic_method'.
14227
14228         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
14229         a `MonoGenericMethod *gen_method' one.
14230
14231         * class.c (mono_class_inflate_generic_type): Take an additional
14232         `MonoGenericMethod * argument.  This is only non-NULL if we're
14233         inflating types for a generic method.   
14234         (mono_class_inflate_generic_signature): Renamed to
14235         inflate_generic_signature() and made static; take a
14236         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
14237         (inflate_generic_header): Take a `MonoGenericMethod *' argument
14238         instead of a `MonoGenericInst *' one.
14239         (mono_class_inflate_generic_method): Likewise.
14240
14241         * reflection.c (encode_generic_method_sig): Take a
14242         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
14243         (method_encode_methodspec): Likewise.
14244         (inflated_method_get_object): Likewise. 
14245
14246         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
14247         field with a `MonoGenericMethod *gmethod' one.  
14248
14249 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
14250
14251         * class.h (mono_class_has_parent): add parens to expansion
14252         so you can ! this.
14253
14254 2004-02-08  Martin Baulig  <martin@ximian.com>
14255
14256         * image.h (MonoImage): Removed `generics_cache'.
14257
14258         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
14259         instead of a `MonoType *' argument; removed the `inflate_methods'
14260         argument.  Don't inflate methods here.
14261
14262         * loader.c (find_method): If it's a generic instance, call
14263         mono_class_init() on the `sclass->generic_inst->generic_type'.
14264
14265         * metadata.c (mono_type_size): Make this work on uninitialized
14266         generic instances; call it on the `ginst->generic_type's class.
14267
14268         * reflection.c (mono_reflection_bind_generic_parameters): Call
14269         mono_class_from_generic() to create the `ginst->klass'.
14270
14271 2004-02-08  Martin Baulig  <martin@ximian.com>
14272
14273         * class.h (MonoClass): Changed type of `generic_inst' from
14274         `MonoType *' to `MonoGenericInst *'.
14275
14276 2004-02-08  Martin Baulig  <martin@ximian.com>
14277
14278         * icall.c (ves_icall_Type_BindGenericParameters): Just call
14279         mono_type_get_object(), this is now creating a `MonoGenericInst'
14280         for MONO_TYPE_GENERICINST.
14281         (ves_icall_MonoGenericInst_GetParentType): Likewise.
14282         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
14283
14284         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
14285         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
14286         (inflated_method_get_object): Added `MonoClass *refclass' argument.
14287         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
14288         and reflected type.
14289
14290         * reflection.h (MonoReflectionInflatedMethod): Removed
14291         `declaring_type' and `reflected_type'.
14292
14293 2004-02-08  Martin Baulig  <martin@ximian.com>
14294
14295         * class.h (MonoGenericInst): Added `MonoType *parent' and
14296         `MonoType **ifaces'.
14297
14298         * reflection.h (MonoReflectionGenericInst): Removed `klass',
14299         `parent' and `interfaces'.
14300
14301         * reflection.c (mono_reflection_bind_generic_parameters): Take a
14302         `MonoType *' argument and return a `MonoType *'.
14303
14304         * icall.c
14305         (ves_icall_MonoGenericInst_GetParentType): New interncall.
14306         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
14307
14308 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
14309
14310         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
14311         valuetype marshalling.
14312
14313 2004-02-06  Martin Baulig  <martin@ximian.com>
14314
14315         * class.c
14316         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
14317         (my_mono_class_from_generic_parameter): Likewise.
14318
14319 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
14320
14321         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
14322         contents of the symbol files lazily.
14323
14324         * object.h (MonoThread): Add 'name' and 'name_len' fields.
14325
14326         * threads.h threads.c icall.c: New icalls for getting and setting the
14327         threads name.
14328
14329 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
14330
14331         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
14332         Raise an exception when the domain is not found.
14333
14334 2004-02-03  Martin Baulig  <martin@ximian.com>
14335
14336         * reflection.c (mono_image_get_methodspec_token): Use the
14337         uninflated signature; fixes gen-33.
14338
14339 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14340
14341         * gc.c threads.c: Make the finalizer thread a normal managed thread so
14342         the finalizer code can use thread functionality.
14343
14344         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
14345         the finalizer thread.
14346
14347         * threads.c: Make some functions more robust.
14348
14349         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
14350
14351         * metadata.h: Add new marshalling conventions.
14352
14353         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
14354         stringbuilder marshalling. Fixes #53700.
14355
14356         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
14357
14358         * reflection.c (mono_image_get_type_info): Save declarative security
14359         info.
14360
14361         * reflection.c (mono_image_get_field_info): Handle uninitialized 
14362         unmanaged fields as well.
14363
14364         * appdomain.c: Bump corlib version.
14365
14366 2004-02-01  Martin Baulig  <martin@ximian.com>
14367
14368         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
14369         method type arguments.  
14370
14371 2004-01-30  Duncan Mak  <duncan@ximian.com>
14372
14373         * marshal.h: Add prototype for
14374         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
14375         and
14376         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
14377         fix the build.
14378
14379 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
14380
14381         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
14382         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
14383
14384 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
14385
14386         * marshal.c (mono_marshal_get_native_wrapper): Add support for
14387         custom marshalling of valuetypes.
14388
14389         * marshal.c: Fix some warnings.
14390
14391 2004-01-29  Martin Baulig  <martin@ximian.com>
14392
14393         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
14394         for generic method parameters.
14395
14396         * reflection.c (method_encode_methodspec): Write the uninflated
14397         signature into the methodspec table.
14398         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
14399         is always the uninflated method.
14400         (reflection_methodbuilder_to_mono_method): Copy the generic
14401         parameters from the MethodBuilder into `header->gen_params'.
14402
14403 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
14404
14405         * class.c (mono_class_from_generic_parameter): Fix warning.
14406
14407 2004-01-27  Martin Baulig  <martin@ximian.com>
14408
14409         * class.c (mono_class_from_generic_parameter): Don't create
14410         `klass->methods' here.  
14411
14412 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
14413
14414         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
14415         extension since it does not work with libraries named lib<FOO>.dll.so.
14416
14417 2004-01-25  Martin Baulig  <martin@ximian.com>
14418
14419         * class.c (mono_class_inflate_generic_type): Added support for
14420         MONO_TYPE_GENERICINST.
14421
14422         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
14423         inflate methods on open constructed types.      
14424
14425 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14426
14427         * object.c: fire ProcessExit event in the root AppDomain after running
14428         Main. Fixes bug #53299.
14429
14430 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14431
14432         * socket-io.c: include the new socket-wrappers.h header.
14433         Use the wrappers instead of the unix socket functions to make the code
14434         more clear.
14435
14436 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14437
14438         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
14439
14440         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
14441         Fixes #22532.
14442
14443 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
14444
14445         * reflection.c (mono_image_create_pefile): Handle the case when the
14446         entry point is not a MethodBuilder.
14447
14448         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
14449         field to ReflectionMethod since it is not allways a builder.
14450
14451         * reflection.c (type_get_fully_qualified_name): New helper function to
14452         return the fully qualified name of a type.
14453
14454         * reflection.c (encode_marshal_blob): Always emit the fully qualified
14455         type name for custom marshallers.
14456
14457         * reflection.c (mono_marshal_spec_from_builder): Ditto.
14458
14459         * class.c (mono_class_setup_vtable): If a parent class already 
14460         implements an interface, use the implementing methods from that class.
14461         Fixes #53148.
14462
14463 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14464
14465         * threadpool.c: just return instead of ExitThread to allow for thread
14466         clean up earlier.
14467
14468 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
14469
14470         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
14471         when closing resource modules.
14472
14473         * reflection.c (mono_image_create_pefile): Handle the case when the
14474         entry point is not a MethodBuilder.
14475
14476         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
14477         field to ReflectionMethod since it is not allways a builder.
14478
14479 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
14480
14481         * marshal.c (mono_marshal_get_managed_wrapper): 
14482         mono_marshal_alloc takes native int so CONV_I
14483         the arg for 64bits.
14484
14485 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
14486
14487         * reflection.c (fixup_cattrs): New function to fixup the methoddef
14488         tokens in the cattr table. Fixes #53108.
14489
14490 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14491
14492         * loader.c: don't trim ".dll" before looking up in the config file.
14493         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
14494
14495 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14496
14497         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
14498         Return the module which contains the resource as well.
14499         (ves_icall_System_Reflection_Module_Close): New icall.
14500
14501         * appdomain.c: Bump corlib version number.
14502
14503         * image.c (mono_image_addref): New public function.
14504
14505         * assembly.c: Call mono_image_addref.
14506
14507         * reflection.c (mono_module_get_object): Increase reference count of 
14508         the image.
14509
14510         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
14511         Fixes #22532.
14512
14513         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
14514         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
14515         proper exceptions on DllImport problems.
14516
14517 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
14518
14519         * class.c, metadata.c: eliminate CSIZE macro.
14520
14521 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
14522
14523         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
14524         * object.h: Added async_callback field in MonoAsyncResult.
14525         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
14526         * verify.c: Added async_callback in MonoAsyncResult layout.
14527
14528 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
14529
14530         * reflection.c (mono_reflection_get_custom_attrs): Add support
14531         for Modules.
14532
14533 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14534
14535         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
14536         marshalling.
14537         (mono_marshal_method_from_wrapper): Add null pointer check.
14538
14539 2004-01-16  Martin Baulig  <martin@ximian.com>
14540
14541         * debug-mono-symfile.h: Set version number to 36 and reflect
14542         latest symbol writer changes.
14543
14544 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14545
14546         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
14547         multi-dimensional arrays.
14548         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
14549         (mono_class_from_mono_type): Use bounded_array_class_get.
14550         
14551         * class.c (mono_bounded_array_class_get): New function which takes
14552         a 'bounded' bool argument to distinguish vectors from one dimensional
14553         arrays.
14554
14555         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
14556         bounded_array_class_get if the array has bounds.
14557
14558         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
14559         Search modules loaded using AssemblyBuilder:AddModule as well.
14560
14561 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14562
14563         * appdomain.c: increased corlib version.
14564         * filewatcher.c: removed g_print.
14565         * icall.c:
14566         (get_property_info): only allocate what is actually requested.
14567         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
14568
14569 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14570
14571         * Makefile.am: added filewatcher.[ch]
14572         * filewatcher.[ch]: FileSystemWatcher runtime support.
14573         * icall.c: added new FSW icalls.
14574
14575 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14576
14577         * string-icalls.c: fix stringbuilder regression as suggested by
14578         Iain McCoy <iain@mccoy.id.au>.
14579
14580 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14581
14582         * process.c (process_read_stringtable_block): Recognize '007f' as
14583         a language neutral stringtable block.
14584
14585 2004-01-12  Patrik Torstensson
14586
14587         * object.h (MonoStringBuilder) : Changed layout to support our
14588         new stringbuilder class.
14589         * marshal.c: Change marshalling to support the new layout of 
14590         string builder.
14591         * appdomain.c: increased version number because new layout of
14592         string builder.
14593
14594 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
14595
14596         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
14597         assembly name as an string instead of an AssemblyName, since it is
14598         easier to extract info from it.
14599
14600         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
14601         the culture subdirectories too. Fixes #52231.
14602
14603 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14604
14605         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
14606         It takes 2 new parameters with an optional name for the method to look
14607         for and case ignoring info.
14608
14609         * threadpool.c: removed unused variable.
14610
14611 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14612
14613         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
14614         It takes 2 new parameters with an optional name for the property to look
14615         for and case ignoring info.
14616         Fixes bug #52753.
14617
14618 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14619
14620         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
14621         Fix #52451.
14622
14623 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14624
14625         * appdomain.c:
14626         * assembly.c: escape the uri before passing it to g_filename_from_uri.
14627         Fixes bug #52630.
14628
14629 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
14630
14631         * reflection.c: Add support for more than one unmanaged resource.
14632
14633         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
14634         in field->def_value, as done in all other cases.
14635
14636         * reflection.c (mono_reflection_get_custom_attrs): Add support for
14637         TypeBuilders.
14638
14639         * reflection.c (mono_reflection_create_runtime_class): Remove 
14640         errorneous assignment to klass->element_class, since it is already
14641         done in mono_reflection_setup_internal_class.
14642
14643 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14644
14645         * gc.c: added missing LeaveCriticalSection.
14646         * icall.c: indented a couple of lines.
14647         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
14648         if we call EndInvoke inside a callback. Fixes bug #52601.
14649
14650 2004-01-07  Martin Baulig  <martin@ximian.com>
14651
14652         * mono-debug-debugger.h
14653         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
14654
14655 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
14656
14657         * appdomain.c: Use messages in NotImplementedException.
14658
14659         * exception.c (mono_get_exception_not_implemented): Now this takes
14660         a message argument.
14661
14662         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
14663         exception instead of g_asserting an aborting when something is not
14664         implemented.
14665
14666         Add some inline docs.
14667
14668 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
14669
14670         * reflection.h: Update after changes to object layout.
14671
14672         * reflection.c: Implement saving of unmanaged aka win32 resources.
14673
14674         * appdomain.c: Bump version number.
14675
14676         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
14677         Handle missing domains gracefully.
14678
14679 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
14680
14681         * file-io.c : On Windows, there are much more invalid_path_chars.
14682
14683 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14684
14685         * class.h, object.c: prepare for GetType () speedup.
14686
14687 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
14688
14689         * profiler.c: workaround for --profile null reference exception on
14690           cygwin. Patch by Patrik Torstensson.
14691
14692 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
14693
14694         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
14695         make work for unaligned access.
14696
14697 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
14698
14699         * class.c: small cleanup (class->fields [i] -> field).
14700         * image.c: check address of metadata is valid.
14701
14702 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
14703
14704         * assembly.h assembly.c (mono_assembly_loaded): New public function to
14705         search the list of loaded assemblies.
14706
14707         * reflection.c (mono_reflection_type_from_name): Use 
14708         mono_assembly_loaded instead of mono_image_loaded.
14709
14710         * reflection.c: Fix warnings.
14711
14712 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
14713
14714         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
14715         is dynamic. This is needed since an assembly can contain both dynamic and
14716         non-dynamic images.
14717
14718         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
14719         assembly->dynamic.
14720
14721         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
14722
14723         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
14724         to store modules loaded using AddModule.
14725
14726         * reflection.c (mono_image_fill_file_table): Generalize this so it works
14727         on Modules.
14728
14729         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
14730
14731         * reflection.c (mono_image_fill_export_table_from_module): New function to
14732         fill out the EXPORTEDTYPES table from a module.
14733
14734         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
14735         into a separate function. Also handle loaded non-dynamic modules.
14736
14737         * reflection.c (mono_image_basic_init): Fix memory allocation.
14738
14739         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14740
14741         * assembly.c (mono_assembly_load_references): Make this public.
14742
14743 2003-12-19  Martin Baulig  <martin@ximian.com>
14744
14745         * class.c (mono_class_initialize_generic): Made this static, take
14746         a `MonoGenericInst *' instead of a `MonoClass *'.
14747         (mono_class_from_generic): Call mono_class_initialize_generic()
14748         unless we're already initialized or being called from
14749         do_mono_metadata_parse_generic_inst().
14750
14751         * class.h (MonoGenericInst): Added `initialized' and
14752         `init_pending' flags.
14753
14754         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
14755         `mono_class_init (gklass)' or mono_class_initialize_generic()
14756         here; set `generic_inst->init_pending' while parsing the
14757         `type_argv'.
14758
14759 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
14760
14761         * locales.c: include string.h for memxxx prototypes
14762
14763 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14764
14765         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
14766         constructor when accessing literal fields.
14767
14768 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
14769
14770         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14771
14772         * reflection.c (assembly_add_resource_manifest): New function to fill
14773         the MANIFESTRESOURCE table.
14774
14775         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
14776
14777         * reflection.h: Update to changes in class layout.
14778
14779         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
14780         Reenable call to mono_runtime_is_shutting_down ().
14781
14782         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
14783         determine if the runtime is shutting down.
14784
14785 2003-12-16  Jackson Harper <jackson@ximian.com>
14786
14787         * icall.c: comment out call to mono_runtime_is_shutting_down to
14788         fix build.
14789         
14790 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
14791
14792         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
14793         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
14794
14795 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
14796
14797         * reflection.c: move definition of swap_with_size
14798         to before its first call
14799
14800 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
14801
14802         * appdomain.c (mono_runtime_is_shutting_down): New public function.
14803
14804         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
14805         icall.
14806
14807         * object.c: Fix warnings.
14808
14809         * icall.c (ves_icall_Type_Get...): Only consider inherited static
14810         members if FlattenHierarchy is set.
14811
14812         * reflection.c (mono_image_add_decl_security): New function to emit
14813         declarative security.
14814
14815         * reflection.h reflection.c: Add support for declarative security.
14816
14817         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
14818         
14819 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14820
14821         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
14822         
14823         * appdomain.c verify.c: Moved corlib version checking into its own
14824         function in appdomain.c since it needs to create vtables etc.
14825
14826 2003-12-13  Patrik Torstensson <p@rxc.se>
14827
14828         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
14829         instead of unwrapped server.
14830
14831 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
14832
14833         * verify.c (check_corlib): Fix field index.
14834
14835 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
14836
14837         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
14838         GetGacPath icall.
14839
14840 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
14841
14842         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
14843         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
14844         cope with sizeof(size_t) != sizeof(guint32).
14845
14846 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14847
14848         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
14849         in case of failure.
14850
14851 2003-12-10  Mark Crichton <crichton@gimp.org>
14852
14853         * icall.c: removed the GetNonZeroBytes.  We now handle this case
14854         in managed code.
14855
14856         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
14857
14858 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
14859
14860         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
14861         marked as deleted.
14862
14863 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14864
14865         * verify.c (check_corlib): Handle the case when the version field is 
14866         initialized by a static constructor.
14867
14868 2003-12-08  Patrik Torstensson  <p@rxc.se>
14869
14870     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
14871
14872 2003-12-08  Martin Baulig  <martin@ximian.com>
14873
14874         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
14875         a MonoReflectionGenericParameter, also take the parameter index
14876         and name as arguments.
14877         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
14878         (ves_icall_MonoGenericParam_initialize): New interncall.
14879         (ves_icall_Type_make_byref_type): New interncall.
14880
14881         * reflection.h (MonoReflectionGenericParam): Derive from
14882         MonoReflectionType, not just from MonoObject.  Added `refobj' and
14883         `index' fields.
14884
14885         * reflection.c (mono_reflection_define_generic_parameter): Create
14886         and return a new MonoReflectionGenericParam; don't initialize the
14887         constraints here.
14888         (mono_reflection_initialize_generic_parameter): New public method;
14889         initializes the constraints and creates the `param->pklass'.
14890
14891 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14892
14893         * reflection.h reflection.c: Use the new fields 'num_types', 
14894         'num_fields' and 'num_methods' to track the number of types etc.
14895
14896         * verify.c (check_corlib): Check corlib version number.
14897
14898 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
14899
14900         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
14901         function works on all methods.
14902
14903 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14904
14905         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
14906         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
14907         the custom_type_info flag of the transparent proxy.
14908         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
14909         objects that supports IRemotingTypeInfo.
14910         * object.h: Added custom_type_info field in transparent proxy.
14911
14912 2003-12-06  Martin Baulig  <martin@ximian.com>
14913
14914         * class.c (mono_class_create_from_generic): Removed.
14915         (mono_class_from_generic): Check `ginst->klass' before doing
14916         anything else.  This is important to fully support "recursive"
14917         generic types.
14918
14919         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
14920         empty `generic_inst->klass' before doing anything else.
14921
14922 2003-12-06  Dick Porter  <dick@ximian.com>
14923
14924         * verify.c: 
14925         * object.h:
14926         * icall.c:
14927         * locales.c: Use C structs to access class fields.  Don't do a
14928         conversion between MonoString and UChar because both are
14929         platform-endian UTF-16.  Compare now takes startindex and count
14930         parameters.  Add a char overload for IndexOf.  Speed up the
14931         invariant string IndexOf.
14932
14933 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
14934
14935         * Makefile.am (monosn_LDADD): Fix parallel build.
14936
14937 2003-12-04  Martin Baulig  <martin@ximian.com>
14938
14939         * icall.c
14940         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14941         (ves_icall_Type_make_array_type): New interncall.       
14942
14943 2003-12-04  Martin Baulig  <martin@ximian.com>
14944
14945         * locales.c: also change it in the !HAVE_ICU case.
14946
14947 2003-12-04  Dick Porter  <dick@ximian.com>
14948
14949         * icall.c:
14950         * locales.c: construct_compareinfo is now in CompareInfo, not
14951         CultureInfo.
14952
14953 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14954
14955         * image.c (mono_image_load_file_for_image): Cache loaded images in the
14956         image->files array.
14957
14958         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
14959         table as well.
14960
14961         * assembly.c (mono_assembly_load_references): Only load references
14962         once.
14963
14964         * class.c (mono_class_from_name): Avoid linear search of the 
14965         EXPORTEDTYPE table.
14966
14967         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
14968
14969 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14970
14971         * image.h (MonoImage): Add 'field_cache' field.
14972
14973         * loader.c (mono_field_from_token): Cache field lookups.
14974         
14975         * reflection.c (mono_module_get_object): Fix name property.
14976
14977         * icall.c (ves_icall_get_enum_info): Update after changes to 
14978         mono_metadata_get_constant_index ().
14979
14980         * icall.c: Get rid of get_type_info icall, use a separate icall for
14981         each type property to avoid needless memory allocations. Fixes #51514.
14982
14983         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
14984         to avoid needless binary searches.
14985
14986         * class.c (class_compute_field_layout): Move the initialization of
14987         field->def_value to mono_class_vtable ().
14988
14989         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
14990         non-corlib types.
14991
14992         * object.c (mono_object_allocate): Make it inline.
14993
14994         * object.c (mono_object_allocate_spec): Make it inline.
14995         
14996 2003-12-02  Dick Porter  <dick@ximian.com>
14997
14998         * locales.c (create_NumberFormat): NumberFormatInfo construction.
14999         Patch by Mohammad DAMT (mdamt@cdl2000.com).
15000
15001 2003-12-01  Dick Porter  <dick@ximian.com>
15002
15003         * threads.c: Fix signature and call in CreateMutex and
15004         CreateEvent.
15005
15006 2003-12-01  Dick Porter  <dick@ximian.com>
15007
15008         * icall.c: 
15009         * locales.c: Implement string compares and searching
15010
15011         * object.h: Add extra Thread field
15012
15013 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
15014
15015         * reflection.c (fixup_method): Add support for MonoCMethod.
15016
15017 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
15018
15019         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
15020
15021         * reflection.c (assembly_name_to_aname): Allow extra characters in
15022         assembly names. Fixes #51468.
15023
15024 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15025
15026         * exception.c (mono_exception_from_name_domain): New helper function.
15027
15028         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
15029         exception object in the correct domain.
15030
15031         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
15032         formatting + make a copy a the input data.
15033
15034         * loader.c (mono_get_method_from_token): Methods which contain
15035         native code do not have entries in the ImplMap.
15036
15037         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
15038         Thanks to Gonzalo for spotting this.
15039         
15040         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
15041         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
15042
15043         * assembly.h (mono_assembly_load_from): Split the second part of 
15044         assembly loading into a new public function.
15045
15046         * exception.h (mono_get_exception_bad_image_format): New function.
15047
15048 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
15049
15050         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
15051         Enumerate all modules inside a dynamic assembly. Fixes #51293.
15052         
15053         * icall.c: Add new icall for creating dynamic methods.
15054
15055         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
15056
15057         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
15058
15059         * reflection.c (mono_reflection_create_dynamic_method): New icall to
15060         create a dynamic method.
15061
15062         * reflection.c (resolve_object): New helper function.
15063
15064         * reflection.c: Generalize ReflectionMethodBuilder and the functions
15065         which manipulate it so they can also work on dynamic methods.
15066
15067         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
15068         creating the MonoReflectionMethodAux structure if it is not needed.
15069         
15070         * reflection.h verify.c: Update after changes to object layout.
15071
15072         * reflection.c (method_builder_encode_signature): Fix compilation on
15073         gcc 2.95.x.
15074
15075 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
15076
15077         * appdomain.h: Added support for context static fields. Added static_data
15078           field to MonoAppContext and renamed thread_static_fields to a more
15079           generic special_static_fields in MonoAppDomain, since it can now contain
15080           context static fields.
15081         * domain.c: Updated hashtable name.
15082         * object.c: Replaced field_is_thread_static() for a more generic
15083           field_is_special_static() which also checks for context static attribute.
15084           In mono_class_vtable(), added support for static context fields.
15085         * threads.c: Changed methods that manage thread static fields to more
15086           generic methods so they can be reused both for thread and context static
15087           data.
15088         * threads.h: Declared some new methods.
15089
15090 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
15091
15092         * reflection.h: Update after changes to the managed types.
15093
15094         * reflection.c (encode_custom_modifiers): New helper function.
15095
15096         * reflection.c (method_encode_signature): Emit custom modifiers.
15097
15098         * reflection.c (field_encode_signature): Emit custom modifiers.
15099
15100 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15101
15102         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
15103
15104         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
15105         implementation.
15106
15107         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
15108         icall.
15109
15110         * object.c (mono_field_get_value_object): New function.
15111
15112         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
15113         specific.
15114
15115 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15116
15117         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
15118         return a preallocated out-of-memory exception instance.
15119
15120         * object.c (out_of_memory): Use the new function.
15121
15122         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
15123         flag is before the custom modifiers. Fixes #49802.
15124
15125 2003-11-16  Martin Baulig  <martin@ximian.com>
15126
15127         * class.c (mono_class_is_open_constructed_type): Implemented the
15128         MONO_TYPE_GENERICINST case.
15129
15130 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15131
15132         * assembly.c (mono_assembly_fill_assembly_name): New function to
15133         fill out the MonoAssemblyName structure.
15134         (mono_assembly_open): Use the new function.
15135
15136         * icall.c (fill_reflection_assembly_name): New helper function.
15137
15138         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
15139         new function.
15140
15141         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
15142
15143 2003-11-15  Martin Baulig  <martin@ximian.com>
15144
15145         * class.c (mono_class_is_open_constructed_type): New public
15146         function; checks whether a type is an open constructed type,
15147         ie. whether it still contains type parameters.
15148         (mono_class_inflate_generic_type): If we're a type parameter and
15149         the inflated type is also a MONO_TYPE_(M)VAR, return the original
15150         type.
15151
15152         * class.h (MonoGenericInst): Added `guint32 is_open'.
15153
15154         * loader.c (method_from_methodspec): Check whether we're an open
15155         or closed constructed type and set `ginst->is_open'.
15156
15157         * reflection.c (mono_reflection_bind_generic_parameters): Check
15158         whether we're an open or closed constructed type and set
15159         `ginst->is_open'.
15160         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
15161         from open constructed types.
15162
15163 2003-11-15  Martin Baulig  <martin@ximian.com>
15164
15165         * reflection.c (mono_reflection_bind_generic_parameters): If we're
15166         a generic instance (instead of a generic type declaration) with
15167         unbound generic parameters, bind them to our actual types.
15168
15169 2003-11-14  Martin Baulig  <martin@ximian.com>
15170
15171         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
15172
15173         * reflection.c (mono_reflection_bind_generic_parameters): If we're
15174         an interface type, populate `res->interfaces' with instantiated
15175         versions of all the interfaces we inherit.
15176
15177 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
15178
15179         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
15180         when MONO_PATH is set but doesn't contain the install dir.
15181
15182 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15183
15184         * icall.c:
15185         (ves_icall_Type_GetInterfaces): don't return an interface twice when
15186         it's also implemented in base classes. Fixes bug #50927.
15187
15188 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
15189
15190         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
15191         if this method is called from a finalizer. Fixes #50913.
15192
15193 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
15194
15195         * threads.c: Implement VolatileRead/VolatileWrite
15196
15197         * icall.c: Add new icalls for VolatileRead/VolatileWrite
15198
15199 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15200
15201         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
15202         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
15203         2.95.3.
15204
15205         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
15206         from Peter Ross (pro@missioncriticalit.com).
15207         
15208 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
15209
15210         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
15211
15212 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15213
15214         * assembly.c (mono_assembly_load_references): Disable check because it
15215         triggers on older corlibs which lots of people have.
15216
15217 2003-11-12  Jackson Harper  <jackson@ximian.com>
15218
15219         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
15220         load corlib.dll if mscorlib.dll is not found.
15221         * assembly.h: Remove corlib name define.
15222         * class.c:
15223         * domain.c:
15224         * image.c: Change corlib name to mscorlib.
15225         
15226 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15227
15228         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
15229
15230 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
15231
15232         * appdomain.h: Added loader_optimization here to sync with the C#
15233         code, and add disallow_binding_redirects field.
15234
15235 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
15236
15237         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
15238
15239         * reflection.c (mono_image_build_metadata): Fix crash on modules
15240         with no types.
15241
15242         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
15243
15244         * icall.c (ves_icall_get_method_info): Return callingConvention as
15245         well.
15246
15247         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
15248         namespaces from the EXPORTEDTYPE table as well.
15249
15250         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
15251         from all modules inside the assembly.
15252         
15253 2003-11-11  Martin Baulig  <martin@ximian.com>
15254
15255         * reflection.c (mono_reflection_bind_generic_parameters): Make
15256         this work for interfaces.
15257
15258 2003-11-11  Martin Baulig  <martin@ximian.com>
15259
15260         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
15261
15262 2003-11-11  Martin Baulig  <martin@ximian.com>
15263
15264         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
15265         "MonoInflatedMethod" and "MonoInflatedCtor".
15266
15267 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
15268
15269         * reflection.c (resolution_scope_from_image): Use the assembly table
15270         from the manifest module, since other modules don't have it.
15271
15272         * debug-helpers.c (mono_type_full_name): New helper function.
15273
15274         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
15275
15276         * image.c (mono_image_load_file_for_image): New public function which
15277         is a replacement for the load_file_for_image in class.c.
15278
15279         * assembly.c (mono_assembly_load_module): A wrapper for the function
15280         above which does assembly association and reference loading too.
15281
15282         * class.c (mono_class_from_name): Call mono_assembly_load_module.
15283
15284 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15285
15286         * appdomain.c: not all of the attributes for the full assembly name
15287         are required and the order doesn't matter. Fixes bug #50787.
15288
15289 2003-11-10  Dick Porter  <dick@ximian.com>
15290
15291         * locales.c: Use platform-endian UTF16
15292
15293 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
15294
15295         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
15296         
15297 2003-11-10  Martin Baulig  <martin@ximian.com>
15298
15299         * metadata.c
15300         (mono_metadata_load_generic_params): Make this actually work.
15301
15302         * reflection.c (mono_reflection_bind_generic_parameters): If our
15303         parent is a generic instance, pass all the `types' to it, no
15304         matter whether it has the same number of type parameters or not.
15305
15306 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
15307
15308         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
15309
15310         * assembly.c (mono_assembly_load_references): Move the image<->assembly
15311         assignment code to this function so it gets called recursively for all
15312         modules.
15313
15314         * image.c (load_modules): Remove the assembly assignment since it is
15315         now done by mono_assembly_load_references.
15316         
15317         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
15318         Add 'module' argument.
15319         (mono_module_get_types): New helper function.
15320         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
15321
15322 2003-11-08  Martin Baulig  <martin@ximian.com>
15323
15324         * class.c (mono_class_inflate_generic_method): Interface method
15325         don't have a header.
15326
15327         * reflection.c (mono_image_get_methodspec_token): Take an
15328         additional `MonoGenericInst *' argument instead of reading it from
15329         the header; this is necessary to support interfaces.
15330         (mono_image_create_token): Pass the `MonoGenericInst *' from the
15331         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
15332         (inflated_method_get_object): Take an additional `MonoGenericInst *'
15333         argument.
15334
15335         * reflection.h (MonoReflectionInflatedMethod): Added
15336         `MonoGenericInst *ginst'.
15337
15338 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
15339
15340         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
15341
15342 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
15343
15344         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
15345
15346 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
15347
15348         * reflection.c 
15349         (reflection_methodbuilder_from_method_builder):
15350         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
15351         initialize a ReflectionMethodBuilder structure.
15352         (mono_image_get_methodbuilder_token):
15353         (mono_image_get_ctorbuilder_token): New functions to emit memberref
15354         tokens which point to types in another module inside the same assembly.
15355
15356         * reflection.c: Use the new helper functions.
15357         
15358         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
15359
15360         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
15361         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
15362
15363         * reflection.c (resolution_scope_from_image): Emit a moduleref if
15364         neccesary.
15365
15366         * reflection.c (mono_image_build_metadata): Emit metadata only for the
15367         current module. Emit the manifest only for the main module.
15368
15369         * reflection.c (mono_image_create_token): Add assertion when a 
15370         memberref needs to be created.
15371
15372         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
15373
15374         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
15375         larger buffer for the custom attribute blob. Fixes #50637.
15376         
15377 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15378
15379         * threadpool.c: notify listener on async processing handles after
15380         invoking the async callback. Thanks to Zoltan.
15381
15382 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
15383
15384         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
15385         avoid code duplication.
15386
15387         * reflection.h (MonoDynamicImage): New type which is currently unused,
15388         but will be used through the ref.emit code in place of 
15389         MonoDynamicAssembly.
15390
15391         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
15392         object layout.
15393
15394         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
15395         a MonoDynamicImage instead of just a MonoImage.
15396         
15397         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
15398         icalls to ModuleBuilder but keep their semantics, so they will work
15399         with moduleb->assemblyb. This will change later.
15400         
15401 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
15402
15403         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
15404         object layout.
15405
15406         * reflection.c (mono_image_build_metadata): Avoid creation of a default
15407         main module, since it is now done by the managed code.
15408
15409 2003-11-03  Martin Baulig  <martin@ximian.com>
15410
15411         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
15412         `ginst->klass' here.
15413         (method_encode_methodspec): Don't use the `ginst->generic_method's
15414         klass if it's a generic instance, use `ginst->klass' in this case.
15415
15416 2003-11-03  Martin Baulig  <martin@ximian.com>
15417
15418         * reflection.c (mono_image_get_generic_method_param_info):
15419         Removed, use mono_image_get_generic_param_info() instead.
15420         (mono_image_get_type_info): Write the GenericParam table before
15421         the Method table.  This is neccessary because in the GenericParam
15422         table, type parameters of the class (ie. '!0' etc.) must come
15423         before the ones from its generic methods (ie. '!!0' etc).
15424
15425 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
15426
15427         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
15428
15429 2003-11-02  Martin Baulig  <martin@ximian.com>
15430
15431         * reflection.c (create_generic_typespec): Take a
15432         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
15433         the generic parameters from it.
15434
15435 2003-11-02  Martin Baulig  <martin@ximian.com>
15436
15437         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
15438         instead of a `MonoClassField *' since we just need the type.
15439         (create_generic_typespec): New static function.  Creates a
15440         TypeSpec token for a generic type declaration.
15441         (mono_image_get_generic_field_token): New static function.
15442         (mono_image_create_token): If we're a FieldBuilder in a generic
15443         type declaration, call mono_image_get_generic_field_token() to get
15444         the token.
15445
15446 2003-11-02  Martin Baulig  <martin@ximian.com>
15447
15448         * reflection.h
15449         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
15450         `MonoReflectionGenericInst *declaring_type' and
15451         `MonoReflectionGenericInst *reflected_type' fields.
15452
15453         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
15454         `MonoReflectionGenericInst *declaring_type' and a
15455         `MonoReflectionGenericInst *reflected_type' argument instead of a
15456         single `MonoReflectionGenericInst *type' one.  Set
15457         `res->declaring_type' and `res->reflected_type' from them.
15458         (mono_reflection_inflate_field): Likewise.      
15459
15460 2003-11-02  Martin Baulig  <martin@ximian.com>
15461
15462         * class.c (mono_class_setup_vtable): Don't store generic methods
15463         in the vtable.  
15464
15465 2003-11-02  Martin Baulig  <martin@ximian.com>
15466
15467         * reflection.h (MonoReflectionGenericInst): Added
15468         `MonoReflectionType *declaring_type'.
15469
15470         * reflection.c (mono_reflection_bind_generic_parameters): Use
15471         `if (tb->parent)' instead of `klass->parent'.
15472
15473 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
15474
15475         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
15476         with an empty ASSEMBLY table.
15477
15478         * reflection.c (mono_image_build_metadata): Avoid using the same loop
15479         variable in the inner and outer loops.
15480
15481 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
15482
15483         * metadata.h (mono_metadata_make_token): Put parentheses around macro
15484         argument.
15485
15486         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
15487         
15488         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
15489         icalls. Instead, do everything in managed code. This is needed since
15490         it is hard to restore the original domain etc. in unmanaged code in the
15491         presence of undeniable exceptions.
15492
15493         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
15494         New icalls to push and pop appdomain refs.
15495
15496 2003-10-31  Martin Baulig  <martin@ximian.com>
15497
15498         * class.c (inflate_generic_type): Renamed to
15499         mono_class_inflate_generic_type() and made it public.
15500
15501         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
15502         New interncall.
15503
15504         * loader.c (mono_field_from_memberref): Also set the retklass for
15505         typespecs.
15506
15507         * fielder.c (mono_image_get_inflated_field_token): New static
15508         method; creates a metadata token for an inflated field.
15509         (mono_image_create_token, fixup_method): Added support for
15510         "MonoInflatedField".
15511         (fieldbuilder_to_mono_class_field): New static function.
15512         (mono_reflection_inflate_field): New public function.
15513
15514         * reflection.h
15515         (MonoReflectionGenericInst): Added `MonoArray *fields'.
15516         (MonoReflectionInflatedField): New typedef.     
15517
15518 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
15519
15520         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
15521         for Solaris and other platforms without s6_addr16
15522
15523 2003-10-30  Martin Baulig  <martin@ximian.com>
15524
15525         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
15526         argument instead of two.
15527         (mono_class_inflate_generic_signature): Likewise.
15528         (inflate_generic_header): Likewise.
15529         (mono_class_inflate_generic_method): Likewise.  In addition, if
15530         `ginst->klass' is set, it becomes the new `method->klass'.
15531
15532         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
15533         field.
15534
15535         * reflection.c (encode_generic_method_sig): Write a 0xa as the
15536         first byte. [FIXME]
15537         (method_encode_methodspec): If we have generic parameters, create
15538         a MethodSpec instead of a MethodRef.
15539         (fixup_method): Added support for "MonoInflatedMethod" and
15540         "MonoInflatedCtor".
15541         (mono_image_create_token): Added support for "MonoInflatedMethod"
15542         and "MonoInflatedCtor".
15543         (inflated_method_get_object): New static function; returns a
15544         managed "System.Reflection.MonoInflatedMethod" object.
15545         (mono_reflection_bind_generic_method_parameters): Return a
15546         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
15547         (mono_reflection_inflate_method_or_ctor): Likewise.
15548         (mono_image_get_generic_method_param_info): Initialize unused
15549         fields to zero.
15550         (mono_image_get_generic_param_info): Likewise.
15551
15552         * reflection.h (MonoReflectionInflatedMethod): New public
15553         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
15554         "S.R.MonoInflatedCtor" classes.
15555
15556         * loader.c (method_from_memberref): If we're a TypeSpec and it
15557         resolves to a generic instance, inflate the method.
15558
15559 2003-10-28  Dick Porter  <dick@ximian.com>
15560
15561         * object.c (mono_runtime_run_main): Convert command-line arguments
15562         into utf8, falling back to the user's locale encoding to do so.
15563
15564 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
15565
15566         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
15567         at this time.
15568
15569         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
15570
15571         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
15572         up icalls at method definition time. Partially fixes #33569.
15573
15574 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
15575
15576         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
15577         marshalling of arrays. Fixes #50116.
15578
15579         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
15580
15581         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
15582         points to a vtable in the dying appdomain.
15583
15584         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
15585         listeners into unmanaged code inside the lock.
15586
15587         * object.c (mono_class_vtable): Turn off typed allocation in non-root
15588         domains and add some comments.
15589
15590 2003-10-25  Martin Baulig  <martin@ximian.com>
15591
15592         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
15593
15594         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
15595
15596         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
15597         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
15598         currently parsing.  Create the generic class and store it in
15599         `generic_inst->klass' before parsing the type arguments.  This is
15600         required to support "recursive" definitions; see mcs/tests/gen-23.cs
15601         for an example.
15602         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
15603         to support recursive typespec entries.
15604
15605         * class.c (mono_class_setup_parent): If our parent is a generic
15606         instance, we may get called before it has its name set.
15607         (mono_class_from_generic): Splitted into
15608         mono_class_create_from_generic() and mono_class_initialize_generic().
15609
15610 2003-10-25  Martin Baulig  <martin@ximian.com>
15611
15612         * icall.c (ves_icall_Type_BindGenericParameters): Return a
15613         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
15614         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
15615         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
15616
15617         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
15618         (create_typespec): Likewise.
15619         (mono_reflection_bind_generic_parameters): Return a
15620         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
15621         (mono_reflection_inflate_method_or_ctor): New public function.
15622
15623         * reflection.h (MonoReflectionGenericInst): New typedef.        
15624
15625 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
15626
15627         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
15628         inside the domain lock. Fixes #49993.
15629         
15630         * object.c (mono_class_vtable): When typed allocation is used, 
15631         allocate vtables in the GC heap instead of in the mempool, since the
15632         vtables contain GC descriptors which are used by the collector even
15633         after the domain owning the mempool is unloaded.
15634
15635         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
15636
15637         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
15638         reflect what it does. Also invalidate mempools instead of freeing
15639         them if a define is set.
15640
15641         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
15642         of the appdomain.
15643         
15644         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
15645         hold the finalizable objects in this domain.
15646
15647         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
15648         appdomain.
15649
15650         * appdomain.c (mono_domain_set): New function to set the current
15651         appdomain, but only if it is not being unloaded.
15652
15653         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
15654         appdomain which is being unloaded.
15655         
15656         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
15657         unloading of the root appdomain.
15658
15659         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
15660         icall to execute a method in another appdomain. Intended as a 
15661         replacement for InternalSetDomain, which can confuse the code 
15662         generation in the JIT.
15663
15664         * appdomain.c (mono_domain_is_unloading): New function to determine
15665         whenever an appdomain is unloading.
15666
15667         * appdomain.c (mono_domain_unload): New function to correctly unload
15668         an appdomain.
15669
15670         * assembly.c (mono_assembly_load_references): Check that an assembly
15671         does not references itself.
15672
15673         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
15674         domain manually, it asks the finalizer thread to do it, then waits for
15675         the result. Also added a timeout.
15676
15677         * icall.c: Register the new icalls.
15678
15679         * threads.h threads.c: Export the mono_gc_stop_world and 
15680         mono_gc_start_world functions.
15681         
15682         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
15683         function to fill out the mempool with 0x2a.
15684
15685 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
15686
15687         * reflection.h (MonoReflectionMethodAux): New structure to store
15688         information which is rarely used, thus is not in the MonoMethod
15689         structure.
15690
15691         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
15692         store the aux info.
15693
15694         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
15695         and marshalling info into the aux structure.
15696
15697         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
15698         from the aux structure.
15699
15700         * loader.c (mono_method_get_param_names): Retrieve the param names from
15701         the aux structure.
15702         
15703 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
15704
15705         * exception.h exception.c: Add AppDomainUnloadedException && fix 
15706         warning.
15707
15708 2003-10-21  Dick Porter  <dick@ximian.com>
15709
15710         * socket-io.c
15711         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
15712         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
15713
15714 2003-10-21  Martin Baulig  <martin@ximian.com>
15715
15716         * reflection.c (mono_reflection_bind_generic_parameters):
15717         `klass->parent' is NULL for interfaces.
15718
15719 2003-10-21  Martin Baulig  <martin@ximian.com>
15720
15721         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
15722
15723 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
15724
15725         * exception.c (mono_exception_from_name_msg): New helper function for
15726         creating exceptions and initializing their message field.
15727
15728         * exception.c: Simplify functions using the new helper.
15729
15730         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
15731         New function.
15732
15733         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
15734         mono_raise_exception, since otherwise gcc doesn't generate the function
15735         epilog for raise_exception, confusing the stack unwinding in the JIT.
15736         Fixes #45043.
15737
15738         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
15739         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
15740         Fixes #49499.
15741
15742 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15743
15744         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
15745         utf8.
15746
15747 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
15748
15749         * icall.c: Removed GetUninitializedObject method because
15750           AllocateUninitializedClassInstance does the same.
15751
15752 2003-10-18  Martin Baulig  <martin@ximian.com>
15753
15754         * class.c (inflate_generic_signature): Renamed to
15755         mono_class_inflate_generic_signature() and made it public.
15756         (my_mono_class_from_generic_parameter): New static function; if we
15757         don't already have the generic parameter's MonoClass, create a
15758         very simple one which is just used internally in the runtime and
15759         not passed back to managed code.
15760
15761         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
15762
15763         * metadata.h (MonoMethodSignature): Moved the
15764         `MonoGenericParam *gen_params' to the MonoMethodHeader.
15765         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
15766
15767         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
15768         ves_icall_MonoMethod_GetGenericArguments(); this is now an
15769         interncall on the MonoMethod class, not on MethodInfo.
15770         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
15771         calling mono_reflection_bind_generic_method_parameters() directly.
15772
15773         * loader.c (mono_method_get_signature): If this is a MethodSpec;
15774         return the already computed `method->signature'.
15775         (method_from_methodspec): New static function to load a method
15776         from a MethodSpec entry.
15777         (mono_get_method_from_token): Call the new method_from_methodspec()
15778         for MethodSpec tokens.  
15779         (mono_get_method_from_token): If we're a generic method, load the
15780         type parameters.
15781
15782         * reflection.c (mono_image_get_memberref_token): Allow
15783         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
15784         table.
15785         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
15786         (mono_image_create_token): First check whether it's a generic
15787         method (so we'd need to create a MethodSpec), then do the other
15788         two alternatives.
15789         (mono_reflection_bind_generic_method_parameters): Return a
15790         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
15791         called directly from the interncall.
15792
15793 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
15794
15795         * reflection.c (load_public_key): Move loading of the public key
15796         into managed code.
15797
15798         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
15799
15800         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
15801         fields.
15802
15803         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
15804         culture, hash_alg and public_key. Fixes #49555.
15805
15806 2003-10-17  Martin Baulig  <martin@ximian.com>
15807
15808         * class.h (MonoGenericInst): Moved this declaration here and added
15809         `MonoMethod *generic_method'.
15810
15811         * icall.c
15812         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
15813         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
15814
15815         * metadata.c (mono_metadata_type_equal): Two types of
15816         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
15817         index; ie. don't compare the address of the `MonoGenericParam'
15818         structure.
15819         (mono_metadata_load_generic_params): Removed the `MonoMethod
15820         *method' argument.
15821
15822         * metadata.h (MonoGenericInst): Moved declaration to class.h.
15823         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
15824
15825         * reflection.c (method_encode_signature): Encode the number of
15826         generic parameters.
15827         (encode_generic_method_sig): New static function.
15828         (method_encode_methodspec): New static function; creates an entry
15829         in the MethodSpec table for a generic method.
15830         (mono_image_get_methodspec_token): New static function.
15831         (mono_image_create_token): Call mono_image_get_methodspec_token()
15832         for generic methods.
15833         (mono_reflection_bind_generic_method_parameters): New public
15834         function.  Instantiates a generic method.
15835
15836 2003-10-16  Martin Baulig  <martin@ximian.com>
15837
15838         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
15839         *gen_params' here from MonoMethodHeader.
15840
15841         * metadata.c (mono_metadata_parse_method_signature): If we have
15842         generic parameters, initialize `method->gen_params' and then set
15843         the correct `type->data.generic_param' in all the parameters.
15844
15845 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
15846
15847         * threads.c (mono_threads_get_default_stacksize): New function to 
15848         return the default stacksize.
15849
15850         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
15851         termination of the finalizer thread, since the previous method had
15852         race conditions. Fixes #49628.
15853
15854         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
15855         as for the other managed threads.
15856
15857 2003-10-16  Martin Baulig  <martin@ximian.com>
15858
15859         * class.c (inflate_generic_signature): Copy `generic_param_count'
15860         and `gen_params'.
15861
15862         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
15863         New interncall.
15864
15865         * metadata.c (mono_metadata_parse_method_signature): Actually set
15866         the `method->generic_param_count' here.
15867         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
15868
15869 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
15870
15871         * object.h: Add a new field to TypedRef to simplify the implementation
15872         of the REFANY opcodes in the JIT.
15873
15874         * icall.c: Make use of the new field.
15875
15876         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
15877         dynamically.
15878
15879 2003-10-15  Martin Baulig  <martin@ximian.com>
15880
15881         * class.c (mono_class_from_gen_param): Renamed to
15882         mono_class_from_generic_parameter() and moved most of the
15883         functionality from mono_reflection_define_generic_parameter()
15884         here; ie. we create a "real" class here.
15885         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
15886         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
15887         previously been called.
15888
15889         * class.h (MonoGenericParam): Moved the declaration of this struct
15890         here from metadata.h and added `MonoMethod *method'.
15891
15892         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
15893         interncall.
15894
15895         * loader.c (mono_get_method_from_token): If we have any generic
15896         parameters, call mono_metadata_load_generic_params() to read them
15897         from the MONO_TABLE_GENERICPAR.
15898
15899         * metadata.c (mono_metadata_load_generic_params): Added
15900         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
15901
15902         * metadata.h (MonoMethodSignature): Replaced
15903         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
15904         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
15905
15906         * reflection.c (mono_reflection_define_generic_parameter): Moved
15907         most of the functionality into the new
15908         mono_class_from_generic_parameter(); set the `method' field if
15909         we're a method parameter.       
15910
15911 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
15912
15913         * marshal.c (emit_struct_conv): if native size is 0
15914         emit no code.
15915
15916 2003-10-14  Martin Baulig  <martin@ximian.com>
15917
15918         * icall.c: The generics API has changed in the spec since it was
15919         added to System.Type; these modifications make it match the spec
15920         again.
15921         (ves_icall_Type_GetGenericParameters): Renamed to
15922         `ves_icall_Type_GetGenericArguments'.
15923         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
15924         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
15925         `ves_icall_MonoType_get_HasGenericArguments'.
15926         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
15927         `ves_icall_MonoType_get_IsGenericParameter'.
15928         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
15929         this is no interncall anymore.
15930         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
15931         `ves_icall_TypeBuilder_get_IsGenericParameter'.
15932
15933 2003-10-14  Martin Baulig  <martin@ximian.com>
15934
15935         * reflection.c (mono_reflection_bind_generic_parameters): Also
15936         inflate generic methods if we're reading the class from IL.
15937
15938 2003-10-13  Martin Baulig  <martin@ximian.com>
15939
15940         * reflection.c (mono_reflection_define_generic_parameter): This
15941         method isn't called directly from the icall anymore; take a
15942         `MonoReflectionAssemblyBuilder *' so we can use this for type and
15943         method generic parameters.
15944         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
15945         (method_builder_encode_signature): Encode generic parameters.
15946         (mono_image_get_method_info): Write generic params to the
15947         MONO_TABLE_GENERICPARAM table.
15948
15949         * reflection.h (MonoReflectionMethodBuilder): Added
15950         `MonoArray *generic_params'.
15951
15952         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
15953
15954         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
15955         wrapper for mono_reflection_define_generic_parameter().
15956         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
15957
15958 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
15959
15960         * marshal.h: Add missing function to fix build.
15961
15962         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
15963         the SetLastError pinvoke attribute.
15964
15965         * marshal.c (mono_marshal_set_last_error): New helper function called
15966         by the generated code.
15967         
15968         * marshal.c (mono_mb_emit_branch): New helper function.
15969
15970         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
15971
15972         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
15973         classes as parameters and return values of delegates. Fixes #29256. 
15974
15975 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
15976
15977         * locales.c: use gint32 in non HAVE_ICU case
15978
15979 2003-10-11  Martin Baulig  <martin@ximian.com>
15980
15981         * mono-debug.c (mono_debug_add_method): Added a workaround for
15982         bug #48591.
15983
15984 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
15985
15986         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
15987         delegates passed to native code must use the STDCALL calling 
15988         convention. Fixes #35987.
15989
15990 2003-10-10  Martin Baulig  <martin@ximian.com>
15991
15992         * class.c (inflate_generic_type): If we're inflating for a generic
15993         type instance (and not for a generic method), return
15994         MONO_TYPE_MVAR unchanged.
15995
15996 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15997
15998         * string-icalls.c: Join ignores null strings in the source array.
15999         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
16000         * threads.c: GetAvailableTheads is slightly more accurate.
16001
16002 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
16003
16004         * threads.h threads.c : add mono_threads_set_default_stacksize
16005         and pass default to CreateThread calls.
16006
16007 2003-10-09  Dick Porter  <dick@ximian.com>
16008
16009         * icall.c:
16010         * locales.h:
16011         * locales.c: Internal calls for constructing CultureInfo and
16012         related objects from libicu (if its available.)
16013
16014 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
16015
16016         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
16017
16018 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16019
16020         * threadpool.c: added an argument to async_invoke_thread that is the
16021         item to process, pass the MonoAsyncResult to the thread start function
16022         when creating a new thread. This way we don't need to acquire any lock
16023         when we're creating a new thread. Readded a semaphore for faster
16024         response times (instead of that Sleep i added).
16025
16026 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
16027
16028         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
16029         get daylight change dates better on Windows, fix handling
16030         of platforms without tm_gmtoff.
16031
16032 2003-10-06  Martin Baulig  <martin@ximian.com>
16033
16034         * class.c (inflate_generic_method): Renamed to
16035         mono_class_inflate_generic_method() and made public.
16036         (mono_class_init): Don't inflate the generic methods here.
16037         (mono_class_from_generic): Added `gboolean inflate_methods'
16038         argument.  Inflate the methods here.
16039
16040         * loader.c (mono_method_get_param_names): Ignore instances of
16041         generic types for the moment.
16042
16043         * reflection.c (fixup_method): Added support for inflated methods.
16044         (mono_image_create_token): Use mono_image_get_methodref_token()
16045         for inflated methods.
16046         (mono_custom_attrs_from_param): Ignore instances of generic types
16047         for the moment.
16048         (mono_reflection_bind_generic_parameters): New public function.
16049         Moved all the functionality from
16050         ves_icall_Type_BindGenericParameters() here and added support for
16051         dynamic types.
16052         (mono_reflection_define_generic_parameter): Initialize
16053         `klass->methods' here.
16054
16055         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
16056         functionality into mono_reflection_define_generic_parameter().
16057         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
16058         TypeBuilder, return that TypeBuilder.
16059
16060 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16061
16062         * appdomain.c: removed mono_delegate_semaphore.
16063
16064         * threadpool.c:
16065         (mono_thread_pool_add): moved hash table creation inside and the thread 
16066         creation outside of the critical region.
16067         (mono_thread_pool_finish): removed obsolete code.
16068         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
16069         continue or exit the thread depending on the queue.
16070
16071 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
16072
16073         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
16074         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
16075         handle more bool marshalling options
16076
16077 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
16078
16079         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
16080         arrays of structs. Also add a more descriptive error message when
16081         a structure member is marshalled as LPArray.
16082
16083 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
16084
16085         * marshal.c (mono_marshal_get_native_wrapper): Add support for
16086         marshalling arrays of complex types. Fixes #29098. Also remove an
16087         usused and incomplete function.
16088
16089 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
16090
16091         * gc.c: report heap_size - free_bytes as total memory allocated
16092         (bug#49362).
16093
16094 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
16095
16096         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
16097         fix timezone handling problems on Windows.
16098         
16099         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
16100         asserts when the year is outside the range handled by ms the functions.
16101
16102         * class.c (setup_interface_offsets): If the class is an interface,
16103         fill out its interface_offsets slot.
16104
16105 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16106
16107         * threadpool.c: mark threadpool threads as background.
16108
16109 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
16110
16111         * decimal.c - define DECINLINE to nothing if not using GCC
16112
16113 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
16114
16115         * assembly.c: More refcount fixes.
16116
16117 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16118
16119         * string-icalls.c: if we're not trimming, return the same string.
16120         When not splitting, don't create a new string.
16121
16122 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16123
16124         * image.c:
16125         (mono_image_open): increment the ref_count inside the critical section.
16126
16127 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
16128
16129         * image.c (mono_image_open): Fix reference counting bug.
16130
16131 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
16132
16133         * marshal.c (mono_marshal_type_size) struct alignment changed for 
16134         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
16135         64bits. Avoid leak in mono_marshal_get_native_wrapper when
16136         mono_lookup_pinvoke_call throws.        
16137
16138 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
16139
16140         * reflection.c (mono_reflection_parse_type): Fix #49114.
16141
16142         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
16143         temporary workaround for cygwin header problem.
16144
16145         * object.c (mono_object_isinst): Synchronize this with the code
16146         generated by the JIT for casts.
16147
16148 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
16149
16150         * reflection.c (encode_type): Fix #38332.
16151
16152 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
16153
16154         * marshal.c (mono_marshal_method_from_wrapper): New function to return
16155         the original method from the wrapper method.
16156
16157 2003-09-25  Martin Baulig  <martin@ximian.com>
16158
16159         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
16160         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
16161         (ves_icall_Type_get_IsGenericInstance): New interncall.
16162
16163 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
16164
16165         * object.c: fix cast warning in big endian code.
16166
16167 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
16168
16169         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
16170         
16171 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16172
16173         * assembly.c: don't call check_env from mono_assembly_load. It's
16174         already done once in mono_assemblies_init and may cause headaches when
16175         multiple threads are loading assemblies.
16176
16177 2003-09-19  Martin Baulig  <martin@ximian.com>
16178
16179         * reflection.c (mono_reflection_define_generic_parameter): Don't
16180         allocate `klass->methods', set `klass->flags' to
16181         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
16182
16183 2003-09-18  Martin Baulig  <martin@ximian.com>
16184
16185         * class.c (mono_class_init): Don't create `class->methods' if it's
16186         already initialized.
16187
16188         * metadata.c (mono_metadata_load_generic_params): Make this
16189         actually work.
16190
16191         * reflection.c (mono_reflection_define_generic_parameter): Set
16192         parent class and interfaces from the constraints.
16193
16194         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
16195         to keep this struct in sync with the declaration in TypeBuilder.cs.
16196
16197 2003-09-17  Martin Baulig  <martin@ximian.com>
16198
16199         * metadata.h (MonoType): Replaced the data's `int type_param'
16200         field with `MonoGenericParam *generic_param'.
16201         (MonoGenericParam): Added `MonoClass *klass'.
16202
16203         * class.c (mono_class_from_gen_param): Removed the
16204         `MonoImage *image' and `int type_num' arguments.
16205
16206         * metadata.c (mono_metadata_parse_generic_param): New static
16207         method; creates a MonoGenericParam which just contains the index.
16208         (do_mono_metadata_parse_type): Call
16209         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
16210         MONO_TYPE_MVAR.
16211
16212         * reflection.c (mono_image_typedef_or_ref): Generic type
16213         parameters may be in the same assembly, but never use a typedef
16214         for them.
16215         (mono_reflection_define_generic_parameter): We're now creating a
16216         "real" class for the type parameter; it's now safe to call
16217         mono_class_from_mono_type() on the class'es type, it'll do the
16218         right thing.
16219
16220 2003-09-16  Martin Baulig  <martin@ximian.com>
16221
16222         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
16223         `symfile->range_entry_size' and `symfile->class_entry_size' here;
16224         the `symfile' data structure must be fully initialized before it
16225         gets added to the table.
16226
16227 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
16228
16229         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
16230
16231         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
16232         class init trampolines.
16233
16234 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
16235
16236         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
16237         to the built-in profiler to turn off time and allocation profiling
16238         respectively.
16239
16240 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
16241
16242         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
16243         g_direct_equal.
16244
16245         * debug-helpers.c (mono_method_full_name): Print the wrapper type
16246         in human readable form.
16247
16248 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
16249
16250         * reflection.c icall.c: Fixed warnings.
16251
16252         * image.c (load_class_names): Use a temporary hash table to hold the
16253         namespaces in order to avoid doing many string comparisons.
16254
16255         * image.h: Fix typo.
16256
16257         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
16258         Pass NULL instead of g_direct_equal to the GHashTable constructor 
16259         since the NULL case is short-circuited inside g_hash_table_lookup, 
16260         leading to better performance.  
16261
16262         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
16263         obtain the first custom attribute for a given index. Depends on the
16264         CustomAttribute table being sorted by the parent field.
16265
16266         * reflection.c (mono_custom_attrs_from_index): Use the new function 
16267         for better performance.
16268
16269 2003-09-07  Martin Baulig  <martin@ximian.com>
16270
16271         * class.c (mono_class_init): If we're a generic instance, inflate
16272         all our methods instead of loading them from the image.
16273         (mono_class_from_generic): Set `class->methods = gklass->methods'.
16274
16275 2003-09-07  Martin Baulig  <martin@ximian.com>
16276
16277         * mono-debug-debugger.c: Added support for constructors.
16278
16279 2003-09-06  Martin Baulig  <martin@ximian.com>
16280
16281         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
16282         New interncall.
16283
16284         * reflection.c (mono_reflection_setup_generic_class): Call
16285         ensure_runtime_vtable() to create the vtable.
16286
16287 2003-09-05  Martin Baulig  <martin@ximian.com>
16288
16289         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
16290         MONO_TYPE_MVAR.
16291
16292 2003-09-04  Martin Baulig  <martin@ximian.com>
16293
16294         * reflection.c (mono_reflection_define_generic_parameter): Generic
16295         parameters start with zero.
16296
16297 2003-09-04  Martin Baulig  <martin@ximian.com>
16298
16299         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
16300
16301         * reflection.h (MonoReflectionGenericParam): New typedef.
16302         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
16303         the generic parameters from the managed TypeBuilder.
16304
16305         * reflection.c (mono_reflection_define_generic_parameter): New function.
16306         (mono_reflection_create_runtime_class): Encode generic parameters.
16307         (mono_reflection_setup_generic_class): New function; this is
16308         called after adding adding all generic params to the TypeBuilder.
16309         (encode_type): Added MONO_TYPE_VAR.
16310
16311 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16312
16313         * class.h class.c (mono_class_needs_cctor_run): Moved this method
16314         here from the JIT.
16315
16316         * assembly.h assembly.c: Moved the AOT loading code into an assembly
16317         load hook.
16318
16319 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
16320
16321         * reflection.h reflection.c class.h class.c: Delete duplicate 
16322         definition of mono_type_get_name () from reflection.c and export the
16323         one in class.c.
16324
16325         * class.c: Class loading fixes from Bernie Solomon 
16326         (bernard@ugsolutions.com).
16327
16328         * reflection.c: Endianness fixes from Bernie Solomon 
16329         (bernard@ugsolutions.com).
16330         
16331 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
16332
16333         * assembly.h assembly.c: Define a file format version for AOT
16334         libraries.
16335         
16336         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
16337
16338         * appdomain.h (MonoJitInfo): New field to determine whenever the
16339         code is domain neutral.
16340         
16341 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
16342
16343         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
16344
16345 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
16346
16347         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
16348         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
16349         Avoid caching the result since strings must be domain specific. Fixes
16350         #48050.
16351
16352 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
16353
16354         * marshal.c (mono_marshal_init): Make this callable multiple times
16355         since it is hard to find a correct place to call it.
16356
16357         * object.c (mono_runtime_class_init): Execute static constructors in
16358         the correct appdomain.
16359
16360         * image.c (build_guid_table): Handle the case when multiple images have
16361         the same GUID.
16362
16363 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16364
16365         * icall.c: added a couple of icalls for System.Web.
16366
16367 2003-08-28  Martin Baulig  <martin@ximian.com>
16368
16369         * icall.c (ves_icall_Type_BindGenericParameters): Use
16370         `klass->generic_inst' instead of `&klass->byval_arg' in the
16371         mono_type_get_object() call.  The returned type must be
16372         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
16373
16374 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
16375
16376         * NOTES: New file.
16377
16378         * object.c (mono_class_proxy_vtable): Make it thread safe.
16379
16380         * pedump.c: Fix warning.
16381
16382         * object.c appdomain.h: Get rid of metadata_section. 
16383         It is no longer needed and it was causing deadlocks with domain->lock.
16384
16385         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
16386
16387 2003-08-26  Martin Baulig  <martin@ximian.com>
16388
16389         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
16390
16391 2003-08-26  Martin Baulig  <martin@ximian.com>
16392
16393         * pedump.c (main): Call mono_metadata_init(),
16394         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
16395         and mono_loader_init().
16396
16397 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
16398
16399         * loader.h: Add missing include to fix build.
16400
16401         * image.h: mono_image_load_references is no more.
16402
16403         * assembly.c: Reworked assembly loading to make it really thread safe.
16404         After these changes, the assembly returned by mono_assembly_open is
16405         fully initialized, i.e. all its references assemblies are loaded.
16406
16407         * assembly.c (mono_image_load_references): Renamed to 
16408         mono_assembly_load_references, and made private, since clients no
16409         longer need to call it.
16410
16411         * class.c: Removed calls to mono_assembly_load_references, since it was
16412         a source of deadlocks.
16413
16414         * loader.h loader.c class.h class.c: Protect data structures using a 
16415         new lock, the loader lock.
16416
16417         * class.c (mono_class_setup_vtable): Create temporary hash tables and
16418         GPtrArrays only when needed.
16419
16420         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
16421         into empty structures by mcs. Fixes pinvoke7.cs.
16422         
16423         * domain.c (mono_init): Call a new initialization function.
16424
16425         * appdomain.c (mono_runtime_init): Call the new initializer function
16426         of the marshal module.
16427
16428         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
16429         inserted into empty structures by mcs. Fixes pinvoke7.cs.
16430
16431         * marshal.h marshal.c: Added locks around the wrapper caches to make
16432         this module thread safe.
16433
16434         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
16435         this argument. Fixes pinvoke1.exe.
16436
16437 2003-08-25  Lluis Sanchez <lluis@ximian.com>
16438
16439         * object.h: Added call_type field to MonoMethodMessage and the corresponding
16440         enumeration of values. Removed fields to store remote call output values in
16441         MonoAsyncResult. Not needed any more.
16442         * object.c: Initialize call_type and async_result fields in mono_message_init.
16443         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
16444         dispatching the message.
16445         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
16446         async call to finish. To do it use a message with EndInvoke call type.
16447
16448 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
16449
16450         * loader.h loader.c (mono_method_hash_marhal_info): New function which
16451         determines whenever a method has marshalling info.
16452
16453 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16454
16455         * assembly.c: fix the build on windows.
16456
16457 2003-08-22 Lluis Sanchez <lluis@ximian.com>
16458
16459         * object.cs: Fixed bug #47785.
16460
16461 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
16462
16463         * string-icalls.c (StringReplace): If their are no occurances of
16464         the old string found return a reference to the supplied
16465         string. This saves some memory and matches MS behavoir.
16466         
16467 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16468
16469         * socket-io.c: fixed compilation for systems that define AF_INET6
16470         and don't define SOL_IP/SOL_IPV6.
16471
16472 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
16473
16474         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
16475         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
16476
16477         * rawbuffer.c rawbuffer.h: Make this module thread safe.
16478
16479         * domain.c: Make this module thread safe.
16480
16481         * domain.c (mono_init): Call new initialization function.
16482
16483         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
16484         reference types too. Fixes #38812.
16485
16486         * image.c (mono_image_init): Fixed warnings.
16487
16488         * class.c (mono_class_from_typeref): Handle assembly load failure
16489         correctly.
16490
16491         * appdomain.c (add_assemblies_to_domain): Handle the case when
16492         the references of an assembly are not yet loaded.
16493
16494         * metadata.c image.c assembly.c: Moved initialization of global
16495         variables to a separate function called at startup since lazy 
16496         initialization of these variables is not thread safe.
16497         
16498         * image.c assembly.c: Made this module thread safe by adding locks in 
16499         the appropriate places.
16500
16501         * domain.c (mono_init): Call the new initialization functions of the
16502         three modules.
16503
16504 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
16505
16506         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
16507           make a direct call. It is proxy's work to make the call asynchronous.
16508           mono_delegate_end_invoke(): If the targe is a proxy, just collect
16509           the return values.
16510         * object.cs: mono_method_call_message_new(): read AsyncResult and
16511           state object from parameters list, if this info is requested.
16512         * object.h: Added fields to store remote call output values in
16513           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
16514
16515 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16516
16517         * object.h: add needed fields to MonoThread.
16518         * threads.c, threads.h: allow registering a function to cleanup data
16519         allocated per thread by the JIT.
16520
16521 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16522
16523         * loader.h: portability fix by Bernie Solomon
16524         * <bernard@ugsolutions.com>.
16525
16526 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
16527
16528         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
16529         return a MonoArray. This simplifies the code and also ensures that
16530         the cache allways contains an object reference as a value.
16531
16532         * icall.c (ves_icall_get_parameter_info): Simplified using the new
16533         function.
16534
16535 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16536
16537         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
16538         fixes a problem with byte ordering when getting the address family for
16539         a socket.
16540
16541 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
16542
16543         * .cvsignore: Added monosn.
16544
16545         * reflection.h reflection.c loader.c: Added support for parameter
16546         marshalling to dynamically created types. Fixes #47295.
16547
16548 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16549
16550         * rand.c: remove useless warnings.
16551
16552 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16553
16554         * class.c: implemented ldtoken for methods and fieldrefs.
16555
16556 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16557
16558         * threadpool.c: when mono_async_invoke was called, no one took care of
16559         monitoring the queue. So if the method invoked took some time and we
16560         got new async invoke requests after 500 ms (the thread created waited
16561         that long in WaitForSingleObject), the new async invoke was not called
16562         until the previous one finished.
16563
16564         This is fixed now. Thanks to Totte for helping with it.
16565
16566 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16567
16568         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
16569
16570 2003-08-11  Martin Baulig  <martin@ximian.com>
16571
16572         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
16573
16574 2003-08-06  Martin Baulig  <martin@ximian.com>
16575
16576         * mono-debug-debugger.c: Added support for static fields,
16577         properties and methods.
16578
16579 2003-08-06  Martin Baulig  <martin@ximian.com>
16580
16581         * mono-debug-debugger.c: Don't store the MonoString's vtable to
16582         make this work for applications with multiple application domains.
16583
16584 2003-08-04  Martin Baulig  <martin@ximian.com>
16585
16586         * mono-debug-debugger.c: Completely reworked the type support; the
16587         most important thing is that we're now just using one single
16588         `MonoType' instance per type.
16589
16590 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
16591
16592         * mono-endian.h, mono-endian.c, icall.c: Added icall
16593         ves_icall_System_Double_AssertEndianity to assert double word endianity
16594         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
16595
16596 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16597
16598         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
16599         support, icalls and fixes.
16600
16601 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
16602
16603         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
16604         classes that are a punctuation character in .NET is not the same a
16605         g_unichar_ispunct.
16606
16607 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16608
16609         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
16610
16611 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
16612
16613         * icall.c: Add new MemCopy internalcall.
16614         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
16615         Simplified code; It is not necessary to handle all the cases here,
16616         as the C# code takes care of it.  Only handle the case of the name
16617         resource embedded into the assembly.
16618
16619         Changed signature to return the data pointer and the size of the
16620         data. 
16621
16622 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
16623
16624         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
16625         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
16626
16627 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
16628
16629         * socket-io.c: ignore EINTR error in select.
16630
16631 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
16632
16633         * class.h, class.c: removed unused subclasses field in MonoClass.
16634
16635 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
16636
16637         * icall.c: improve fix of get_base_definition(). If the parent class
16638           doesn't have the mehod, look at the parent of the parent.
16639         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
16640           to check if a parameter is an in or out parameter
16641           (PARAM_ATTRIBUTE_IN is not set by default).
16642           mono_method_return_message_restore(): Use mono_class_value_size to
16643           get the size of a value type. mono_type_stack_size (parameterType)
16644           does not return the correct value if parameterType is byRef.
16645           mono_load_remote_field(), mono_load_remote_field_new(),
16646           mono_store_remote_field(), mono_store_remote_field_new():
16647           raise exception if the remote call returns an exception.
16648
16649 2003-07-28  Martin Baulig  <martin@ximian.com>
16650
16651         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
16652         method.  This is a wrapper around mono_runtime_invoke() which
16653         boxes the instance object if neccessary.
16654
16655 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16656
16657         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
16658         metadata.h, row-indexes.h, verify.c: first cut of generics support.
16659
16660 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16661
16662         * icall.c: disable mcs bug workaround.
16663
16664 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
16665
16666         * object.c (mono_runtime_class_init): Take the metadata_section
16667         mutex before obtaining the domain mutex.
16668
16669         * appdomain.h: Added definition of metadata_section mutex here. 
16670
16671         * object.c: define metadata_mutex here.
16672
16673 2003-07-24  Ravi Pratap  <ravi@ximian.com>
16674
16675         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
16676         fixed.
16677
16678 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
16679
16680         * reflection.c: Fix bug #46669
16681
16682 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16683
16684         * exception.c:
16685         * exception.h:
16686         * icall.c:
16687         * object.h: fill in the type name for TypeLoadException.
16688
16689 2003-07-23  Ravi Pratap  <ravi@ximian.com>
16690
16691         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
16692         relationship between TypeBuilders while compiling corlib) and bug
16693         45993 (Array types returned from the runtime while compiling
16694         corlib were from the loaded corlib).
16695
16696 2003-07-22  Martin Baulig  <martin@ximian.com>
16697
16698         * mono-debug-debugger.c: Reworked the type support a bit more;
16699         distinguish between types and classes.
16700
16701 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
16702
16703         * icall.c: add IsArrayImpl icall.
16704
16705 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
16706
16707         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
16708         initializing real_size only once. Also fix bug #46602.
16709
16710 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
16711
16712         * object.c: Renamed mono_metadata_section to metadata_section.
16713
16714 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
16715
16716         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
16717           empty array if the type is an array. Fixed.
16718           ves_icall_MonoMethod_get_base_definition: if the base method
16719           is abstract, get the MethodInfo from the list of methods of
16720           the class.
16721         * reflection.c: ParameterInfo.PositionImpl should be zero-based
16722           and it was 1-based. Fixed in mono_param_get_objects.
16723
16724 2003-07-20  Martin Baulig  <martin@ximian.com>
16725
16726         * mono-debug.h: Set version number to 31.
16727         (mono_debug_init): Added `MonoDomain *' argument.
16728
16729         * mono-debug-debugger.c: Reworked the type support; explicitly
16730         tell the debugger about builtin types; pass the `klass' address to
16731         the debugger.
16732
16733 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
16734
16735         * image.c: Allow new metadata tables to be loaded without a
16736         warning. Also update the warning message to give the new constant value.
16737                 
16738 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16739
16740         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
16741         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
16742         array type representation changes.
16743
16744 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16745
16746         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
16747         on Environment.Exit () call.
16748
16749 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16750
16751         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
16752         requires a matching corlib.
16753
16754 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
16755
16756         * Changelog: My editor decided to add a CR to each line. Sorry about that.
16757           Committed again without the CRs.
16758         
16759 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
16760
16761         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
16762           getting it from the "this" socket instance. Did not work
16763           if the socket is a subclass of Socket.
16764           Also fixed bug #35371.
16765
16766 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16767
16768         * metadata.c: fixed size for TypedByRef.
16769         * loader.c: when searching for a method, consider the vararg amrker.
16770         * unicode.c, decimal.c: constify some arrays.
16771
16772 2003-07-15  Dick Porter  <dick@ximian.com>
16773
16774         * socket-io.c: Fixed compilation for gcc < 3.2.
16775
16776         Fixed compilation for machines that don't have AF_INET6 (thanks to
16777         Bernie Solomon <bernard@ugsolutions.com> for that part.)
16778
16779         Fixed compile warnings.
16780         
16781         Fixed formatting and line endings.
16782
16783 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
16784
16785         * socket-io.h:
16786         * socket-io.c: Added IPv6 support.
16787
16788 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
16789
16790         * class.c (mono_class_is_assignable_from): New function to implement
16791         the is_assignable_from logic. Used by mono_object_isinst, 
16792         Type::IsAssignableFrom () and the interpreter.
16793
16794         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
16795         Object, even interfaces.
16796         
16797         * object.c (mono_object_isinst): Implement in terms of 
16798         is_assignable_from.
16799
16800         * icall.c (ves_icall_type_is_assignable_from): New icall.
16801
16802 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
16803
16804         * domain.c (foreach_domain): fix compiler warning.
16805
16806 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
16807
16808         * image.c (load_metadata_ptrs): use g_strndup because strndup is
16809         not available on all plattforms
16810
16811 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
16812
16813         * image.h image.c: Store the metadata version string in MonoImage.
16814         * icall.c: New icall to retrieve the image version.
16815         * reflection.c (create_dynamic_image): Fill in the image version field
16816         * reflection.c (build_compressed_metadata): Use the image version
16817         from the image structure.
16818
16819 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16820
16821         * appdomain.c: modified comment.
16822         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
16823         That will be its last iteration when mono_gc_cleanup is called from
16824         mono_runtime_cleanup and before the domain is unloaded.
16825
16826         Fixes bug #45962.
16827
16828 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
16829
16830         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
16831         attributes.
16832
16833 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16834
16835         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
16836         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
16837         Bernie Solomon <bernard@ugsolutions.com>.
16838
16839 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16840
16841         * object.c, object.h: provide mono_object_new_fast() for faster
16842         allocation in some special cases.
16843
16844 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16845
16846         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
16847         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
16848
16849 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16850
16851         * threadpool.c: fix leaks.
16852
16853 2003-07-01  Dick Porter  <dick@ximian.com>
16854
16855         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
16856         using MonoGHashTables.  Fixes threadpool bug posted to list.
16857
16858 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
16859
16860         * image.h, image.c: added support to load an assembly from a byte array.
16861         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
16862         assembly bundle support.
16863
16864 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
16865
16866         * threadpool.c (mono_thread_pool_add): keep a reference to the
16867         AsyncResult to prevent GC
16868
16869 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16870
16871         * class.c: leak fix.
16872
16873 2003-06-25  Dick Porter  <dick@ximian.com>
16874
16875         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
16876         for the async object, the WaitHandle object will close the handle.
16877         Fixes bug 45321.
16878
16879 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16880
16881         * class.c: in mono_array_class_get (), lookup from the hash with the
16882         same type we insert: this works around a bug in
16883         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
16884         lluis. The real fix will have to wait for after the release.
16885
16886 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16887
16888         * icall.c: fix memory leak when getting type members.
16889
16890 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
16891
16892         * reflection.c: added more pubtoken special cases.
16893
16894 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16895
16896         * class.c: handle field offset correctly when class size
16897         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
16898
16899 2003-06-20  Martin Baulig  <martin@ximian.com>
16900
16901         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
16902         *image' field.
16903
16904 2003-06-20  Martin Baulig  <martin@ximian.com>
16905
16906         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
16907
16908 2003-06-20  Martin Baulig  <martin@ximian.com>
16909
16910         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
16911         just distinguish between variables in registers and variables at
16912         an offset relative to a register.
16913
16914 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16915
16916         * icall.c: #ifdef out latest changes until mcs is fixed.
16917
16918 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16919
16920         * icall.c: return members in metadata order.
16921
16922 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16923
16924         * icall.c: avoid infinite loop in GetTimeZoneData.
16925
16926 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16927
16928         * icall.c: added Marshal.Prelink/All icalls.
16929
16930 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
16931
16932         * object.c, object.h: fix warnings and do some overflow checking
16933         when creating arrays.
16934
16935 2003-06-17  Dick Porter  <dick@ximian.com>
16936
16937         * file-io.h:
16938         * file-io.c: File attributes need to be tweaked slightly when
16939         passed from the managed to the w32 world.
16940
16941 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16942         * profiler.h profiler-private.h profiler.c: Rework last patch
16943         based on suggestion by Paolo.
16944         
16945 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16946
16947         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
16948         instruction level coverage data collection.
16949         * profiler.h profiler.c (: Added new callback function which can be
16950         used by the profiler to limit which functions should have coverage
16951         instrumentation.
16952         * profiler.c (mono_profiler_load): Call g_module_build_path to
16953         generate the file name of the profiler library.
16954
16955 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16956
16957         * profiler.c, profiler.h, profiler-private.h: added basic block 
16958         coverage profiling API.
16959
16960 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
16961
16962         * reflection.c (mono_reflection_create_runtime_class): Add support
16963         for events in dynamically generated code.
16964
16965         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
16966         not allocated.
16967
16968 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16969
16970         * icall.c: when getting timezone info, return reasonable values if we
16971         can't get the actual data.
16972
16973 2003-06-14  Dick Porter  <dick@ximian.com>
16974
16975         * threads.c (start_wrapper): Remove the reference to the thread
16976         object in the TLS data, so the thread object can be finalized.
16977         This won't be reached if the thread threw an uncaught exception,
16978         so those thread handles will stay referenced :-( (This is due to
16979         missing support for scanning thread-specific data in the Boehm GC
16980         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
16981
16982 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
16983
16984         * reflection.c: ensure streams and tables are first allocated with
16985         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
16986
16987 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16988
16989         * icall.c: fixed GetElementType for byrefs (bug# 44792).
16990
16991 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
16992
16993         * reflection.c (mono_reflection_create_runtime_class): Add support for
16994         properties to dynamically created classes.
16995         * reflection.c: Fix a few places where non-MonoObjects were inserted
16996         into the tokens hashtable.
16997
16998 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16999
17000         * object.c: some support to handle out of memory exceptions.
17001
17002 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
17003
17004         * marshal.c (mono_marshal_get_native_wrapper): support reference
17005         return types
17006
17007 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
17008
17009         * object.h, object.c: more portability stuff from Bernie Solomon.
17010         Unexport mono_object_allocate(). Added mono_object_unbox ().
17011         Set exitcode when an unhandled exception is thrown.
17012
17013 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
17014
17015         * marshal.c (mono_marshal_get_native_wrapper): use custom
17016         marshaler for return types.
17017
17018 2003-06-10  Dick Porter  <dick@ximian.com>
17019
17020         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
17021         ip_mreq is available
17022
17023 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17024
17025         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
17026         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
17027         by Bernie Solomon <bernard@ugsolutions.com>.
17028
17029 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
17030
17031         * gc.c (mono_gc_init): Avoid error message on shutdown when
17032         GC_DONT_GC=1 is used.
17033
17034         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
17035         New icall to return the GUID of a module.
17036
17037 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
17038
17039         * class.c: ensure instance size always includes the parent's size
17040         even whem class size is set explicitly (fixes bug#44294).
17041
17042 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17043
17044         * profiler.h, profiler.c: made the simple profiler thread-safe,
17045         get more accurate timing info. Allow the loading of an
17046         externally-developed profiler module.
17047
17048 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
17049
17050         * marshal.c (mono_marshal_get_native_wrapper): improved
17051         class/byref arguments.
17052         (mono_marshal_get_native_wrapper): better string marshaling support.
17053
17054 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
17055
17056         * class.c: ensure .pack and .size are handled correctly and
17057         simplified layout of static fields.
17058
17059 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
17060
17061         * appdomain.c
17062         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
17063
17064         * loader.c (mono_lookup_pinvoke_call): look for modules in the
17065         current directory (fix bug 44008)
17066
17067 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
17068
17069         * marshal.c (mono_marshal_get_native_wrapper): started support for
17070         custom marshalers.
17071         (mono_delegate_to_ftnptr): consider marshalling specifications
17072
17073 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17074
17075         * reflection.c, reflection.h: emit custom marshal info.
17076
17077 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17078
17079         * object.c: free the GError.
17080         * icall.c: added CloseEvent_internal.
17081         * threads.[ch]:
17082         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
17083         call.
17084
17085 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
17086
17087         * loader.c (mono_method_get_signature): Add support for dynamic
17088         assemblies.
17089
17090 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17091
17092         * reflection.c: fixed bug #43905.
17093
17094 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17095
17096         * class.c, domain.c, icall.c, metadata.h, object.h: support for
17097         handling TypedReference and ArgIterator.
17098         * loader.c, loader.h: added function to get signature at call site.
17099
17100 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
17101
17102         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
17103         data readonly. Buglets and warning fixes. Some MethodSpec support.
17104
17105 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17106
17107         * class.h, class.c, object.c: remove relative numbering support.
17108
17109 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
17110
17111         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
17112         free the string, until we get a chance to fix Gtk#
17113
17114 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17115
17116         * marshal.c: revert last patch.
17117
17118 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17119
17120         * icall.c: updates for new mono_class_vtable() not calling
17121         the type constructor anymore.
17122
17123 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
17124
17125         * object.h, object.c: separate vtable creation from type
17126         initialization. Make running the .cctor thread safe.
17127
17128 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
17129
17130         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
17131
17132 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
17133
17134         * loader.c (mono_get_method): consider calling convention
17135
17136 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
17137
17138         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
17139         to return the invisible global type for a module.
17140
17141         * reflection.c (mono_image_build_metadata): Emit global fields too.
17142
17143 2003-05-20  Peter Williams  <peterw@ximian.com>
17144
17145         * loader.c (mono_lookup_internal_call): Add a few newlines.
17146
17147 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
17148
17149         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
17150         literal strings.
17151
17152         * appdomain.c (set_domain_search_path): Recalculate search path when
17153         AppDomainSetup.PrivateBinPath changes.
17154
17155         * object.c (mono_class_compute_gc_descriptor): It turns out some
17156         parts of the class libs (like System.Thread) holds pointers to
17157         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
17158         to treat native int a pointer type here.
17159         
17160 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
17161
17162         * appdomain.h, domain.c: add hashtable for jump target resolution.
17163
17164 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
17165
17166         * reflection.h reflection.c icall.c: Added new icalls 
17167         GetManifestResourceInfoInternal, GetModulesInternal and support
17168         infrastructure.
17169
17170 2003-05-16  Dick Porter  <dick@ximian.com>
17171
17172         * icall.c:
17173         * file-io.h:
17174         * file-io.c: Implement System.IO.MonoIO::GetTempPath
17175
17176 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
17177
17178         * object.c: mono_store_remote_field: little fix to previous patch.
17179
17180 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
17181
17182         * class.c: add constructors to array classes.
17183         * icall.c: special case array construction for InternalInvoke (),
17184
17185 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
17186
17187         * class.h class.c reflection.c object.c: Added support for field
17188         defaults in dynamically generated classes.
17189
17190 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17191
17192         * reflection.c: properly encode charset for ddlimport.
17193
17194 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
17195
17196         * threads.c: allow compiling without GC.
17197
17198 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17199
17200         * appdomain.h, object.c, object.h, threads.c, threads.h: added
17201         handling of thread static data.
17202
17203 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17204
17205         * reflection.h, reflection.c: added mono_custom_attrs_free ().
17206
17207 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
17208
17209         * class.c (mono_array_class_get): always set the serializable flags
17210         (mono_array_class_get): always set the SEALED attribute for array types
17211
17212 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
17213
17214         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
17215         attributes (fix for bug 42021).
17216
17217 2003-05-12  Dick Porter  <dick@ximian.com>
17218
17219         * gc.c: Don't run finalizers when the finalizer thread is
17220         finishing up, because the default domain has already been
17221         destroyed.
17222
17223 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
17224
17225         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
17226         value is null, we should throw an exception.   This is slightly
17227         different than the other conventions used for the constructor.
17228
17229 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17230
17231         * socket-io.c: fixed windows build.
17232
17233 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17234
17235         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
17236
17237 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
17238
17239         * object.c (mono_string_new_wrapper): Compatibility fix for MS
17240         compilers.
17241
17242 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
17243
17244         * class.c (mono_class_layout_fields): Add experimental GC aware
17245         auto layout facility. Requires class library changes to work correctly.
17246
17247         (mono_class_setup_vtable): Avoid overriding explicit interface
17248         method implementations. Fixes iface3.exe test.
17249
17250         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
17251         object reference.
17252         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
17253         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
17254
17255         * metadata.h: Add new type classification macro which determines
17256         whenever the type holds an object reference.
17257
17258 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
17259
17260         * marshal.c (mono_marshal_get_native_wrapper): cleanups
17261
17262 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
17263
17264         * gc.c (finalizer_thread): Work around a GC bug.
17265
17266 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
17267
17268         * marshal.c (emit_struct_conv): allow unions
17269
17270         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
17271
17272 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
17273
17274         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
17275
17276 2003-05-06  Martin Baulig  <martin@ximian.com>
17277
17278         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
17279
17280 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17281
17282         * socket-io.c:
17283         (Select_internal): allow NULLs, don't create arrays if not needed.
17284         Coupled with Socket.cs changes.
17285
17286         * threadpool.c:
17287         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
17288         register a finalizer for it that will close the semaphore handle. This
17289         fixes the leak and make Lupus' test run with > 4080 loops.
17290
17291 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
17292
17293         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
17294         Jerome Laban (bug #42287)
17295
17296 2003-05-02  Martin Baulig  <martin@ximian.com>
17297
17298         * debug-mono-symfile.h
17299         (MonoSymbolFile): Moved declaration into mono-debug.h.
17300         (MonoDebugMethodJitInfo): Likewise.
17301         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
17302         argument.
17303         (_mono_debug_address_from_il_offset): Take a
17304         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
17305
17306         * mono-debug.h
17307         (MonoDebugDomainData): New struct.
17308         (mono_debug_get_domain_data): New function.
17309         (mono_debug_add_method): Take an additional `MonoDomain *'
17310         argument.
17311         (mono_debug_source_location_from_address): Likewise.
17312         (mono_debug_il_offset_from_address): Likewise.
17313         (mono_debug_address_from_il_offset): Likewise.
17314
17315 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
17316
17317         * reflection.c: one more check for null type in custom attrs.
17318
17319 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17320
17321         * reflection.c: avoid warning (comparison is always false due to limited
17322         range of data type).
17323
17324 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17325
17326         * icall.c: throw an exception in Type.GetField if the argument 'name'
17327         is NULL.
17328
17329 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
17330
17331         * reflection.c: fixed handling of enums in named arguments to custom
17332         attributes (bug #42123).
17333
17334 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17335
17336         * reflection.c: use the right array element type and handle
17337         a null for a Type argument, too.
17338
17339 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
17340
17341         * reflection.c: handle arrays as arguments to custom attributes.
17342
17343 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
17344
17345         * reflection.c: handle a string value in a custom attr
17346         ctor that takes an object.
17347
17348 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
17349
17350         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
17351         (fix bug #42063)
17352
17353 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
17354
17355         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
17356
17357 2003-04-27  Martin Baulig  <martin@ximian.com>
17358
17359         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
17360         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
17361         MONO_DEBUGGER_EVENT_BREAKPOINT.
17362         (mono_breakpoint_trampoline_code): Removed.
17363         (mono_debugger_event_handler): The last argument is now a
17364         `guint32'.
17365         (mono_debugger_insert_breakpoint_full): Removed the
17366         `use_trampoline' argument.
17367         (mono_debugger_method_has_breakpoint): Likewise.
17368         (mono_debugger_trampoline_breakpoint_callback): Renamed to
17369         mono_debugger_breakpoint_callback(); take the method and
17370         breakpoint number as arguments.
17371
17372 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17373
17374         * metadata.c: fix off by one when loading parameters attributes.
17375
17376 2003-04-24  Martin Baulig  <martin@ximian.com>
17377
17378         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
17379
17380 2003-04-24  Martin Baulig  <martin@ximian.com>
17381
17382         * mono-debug-debugger.c: Moved all code which interacts with the
17383         Mono Debugger here.
17384
17385         * debug-mono-symfile.c: This code now just deals with the symbol
17386         file itself, the debugger code is now in mono-debug-debugger.c.
17387
17388 2003-04-23  Martin Baulig  <martin@ximian.com>
17389
17390         * mono-debug.c (mono_debug_source_location_from_il_offset):
17391         New method; like mono_debug_source_location_from_address(), but
17392         takes an IL offset instead of a machine address.
17393
17394 2003-04-23  Martin Baulig  <martin@ximian.com>
17395
17396         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
17397         `line' field; this is now computed by the debugger.
17398
17399 2003-04-23  Martin Baulig  <martin@ximian.com>
17400
17401         * mono-debug.[ch]: New files.  This is the new debugging interface.
17402
17403         * mono-debug-debugger.[ch]: New files.  Moved all code which
17404         interacts with the Mono Debugger here.
17405
17406 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
17407
17408         * domain.c (mono_init): initialize mono_defaults.monitor_class
17409
17410 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
17411
17412         * reflection.c (method_encode_code): Add a spicy exception to help
17413         future compiler authors.
17414
17415 2003-04-21  Martin Baulig  <martin@ximian.com>
17416
17417         * icall.c
17418         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
17419         Make this work with relative pathnames; g_filename_to_uri() needs
17420         an absolute filename.
17421
17422 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
17423
17424         * icall.c: Track name changes in Object and ValueType.
17425
17426 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
17427
17428         * metadata.c (mono_type_stack_size): size should be a multiple of
17429         sizeof (gpointer)
17430
17431 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17432
17433         * gc.c:
17434         (internal_domain_finalize): moved into mono_domain_finalize. No need
17435         to create another thread because the finalizers will be run in the
17436         finalizer thread.
17437         
17438         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
17439         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
17440         to be run (MS does this too).
17441
17442 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
17443
17444         * object.c (mono_class_compute_gc_descriptor): Update comment.
17445
17446         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
17447
17448         * image.h: Add synchronized wrapper cache.
17449
17450         * image.c (do_mono_image_open): Initialize cache.
17451
17452         * reflection.c (create_dynamic_mono_image): Initialize cache.
17453
17454 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17455
17456         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
17457         ves_icall_System_Buffer_ByteLengthInternal.
17458
17459 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
17460
17461         * reflection.c: setup klass->nested_in earlier. Allow
17462         a dash in the assembly name.
17463
17464 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
17465
17466         * metadata.c (mono_type_to_unmanaged): dont access
17467         type->data.klass for MONO_TYPE_OBJECT
17468         (mono_type_to_unmanaged): consider System.Delegate class
17469
17470 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
17471
17472         * class.c: just setup supertypes in the proper place instead of
17473         initializing the full element class for arrays.
17474
17475 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
17476
17477         * class.c: ensure the element class of arrays is initialized.
17478         Setup the supertype info for array classes, too.
17479
17480 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
17481
17482         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
17483
17484 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17485
17486         * Makefile.am: re-added -m option when running cygpath. This way,
17487         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
17488         separator.
17489         * mono-config.c: same codepath for locating mono config file for WIN32
17490         and the rest.
17491         * assembly.c: if mono_assembly_setrootdir is called, don't override
17492         the value set.
17493
17494 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17495
17496         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
17497         MONO_ASSEMBLIES variable.
17498
17499 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
17500
17501         * icall.c: added Assembly::GetNamespaces() icall.
17502
17503 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17504
17505         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
17506
17507 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
17508
17509         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
17510         * object.c: fixed bug in the construction of vtable for proxies
17511
17512 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
17513
17514         * object.c (mono_array_new): Mark mono_array_new as an icall.
17515
17516 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17517
17518         * class.c: fixed test for public method when overriding interfaces.
17519         Closes bug #40970.
17520
17521 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17522
17523         * appdomain.h, domain.c: added mono_domain_foreach() to
17524         be able to access the currently loaded appdomains.
17525         * object.c: make string interning work across sppdomains.
17526         Mark some functions for use as icalls.
17527
17528 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
17529
17530         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
17531
17532         * reflection.h reflection.c: Allocate long living data using 
17533         GC_MALLOC_ATOMIC so the collector does not need to scan it.
17534
17535         * reflection.c: Double the allocation size in streams instead of
17536         increasing it, to prevent unneccesary copying on large assemblies.
17537         
17538         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
17539         creation if the assembly does not have the Run flag set.
17540
17541 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17542
17543         * class.h: avoid the C++ keywords in header files (Jerome Laban
17544         spotted and fixed this).
17545
17546 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17547
17548         * object.c:
17549         (mono_unhandled_exception): fill in the arguments for the
17550         UnhandledException event. Only trigger that event for the default
17551         domain (as MS does).
17552
17553 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
17554
17555         * object.c: Improve typed allocation stuff based on suggestions from
17556         Paolo. Also turn it on if the GC library supports it.
17557
17558 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
17559
17560         * object.c object.h class.h: Added experimental typed allocation
17561         facility using the interfaces in gc_gcj.h.
17562
17563         * os/gc_wrapper.h: Added new include files.
17564         
17565 2003-04-03  Martin Baulig  <martin@ximian.com>
17566
17567         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
17568         which is not yet enabled by default.
17569
17570         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
17571         functions.
17572         (mono_gc_lock, mono_gc_unlock): New static functions.
17573
17574         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
17575         functions; stop/start the world for the garbage collector.  This
17576         is using the windows API; we need to complete the SuspendThread()/
17577         ResumeThread() implementation in the io-layer to make this work on Unix.
17578         (mono_gc_push_all_stacks): New public function; tells the garbage
17579         collector about the stack pointers from all managed threads.
17580
17581 2003-04-03  Martin Baulig  <martin@ximian.com>
17582
17583         * object.h (MonoThread): Added `gpointer stack_ptr'.
17584
17585         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
17586
17587 2003-04-03  Martin Baulig  <martin@ximian.com>
17588
17589         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
17590
17591 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
17592
17593         * reflection.c (typebuilder_setup_fields): Initialize field.first and
17594         field.last.
17595
17596 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
17597
17598         * loader.c (mono_lookup_internal_call): Report the corlib that is
17599         out of sync.
17600
17601 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
17602
17603         * icall.c (ves_icall_type_GetTypeCode): fixed check for
17604         System.DBNull (it's class not valuetype).
17605
17606 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
17607
17608         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
17609         if the array method was already assigned a token (fixes bug#40646).
17610
17611 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
17612
17613         * reflection.c (mono_reflection_get_type): Attempt type resolve even
17614         if no assembly is given.
17615
17616 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
17617
17618         * metadata.h: Added the new tables.
17619
17620         * row-indexes.h: Added definitions for new tables.
17621
17622         * metadata.c: Add schemas for new tables, and add support for
17623         computing the sizes of them.
17624
17625         * class.c: Update for handling the new type cases.
17626
17627 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
17628
17629         * metadata.h (MONO_TYPE_IS_VOID): new macro
17630
17631 2003-03-31  Martin Baulig  <martin@ximian.com>
17632
17633         * threads.h (MonoThreadCallbacks): Added `thread_created'.
17634
17635         * threads.c (mono_thread_new_init): Call `thread_created' in the
17636         mono_thread_callbacks.
17637
17638 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
17639
17640         * loader.h: added marshalbyrefobject_class to mono_defaults
17641         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
17642         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
17643           generation of output parameters.
17644           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
17645         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
17646           contextbound and the target object belongs to the context of the caller.
17647         * object.h: added context and unwrapped_server variables in MonoRealProxy.
17648         * object.c: Implemented support for interfaces and abstract classes
17649           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
17650           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
17651
17652 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
17653
17654         * class.h class.c (mono_class_is_subclass_of): New function.
17655         
17656         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
17657         routines for most common case (calls from ArrayList::ToArray).
17658
17659         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
17660         routine so programs which call Environment::Exit() can be profiled.
17661
17662         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
17663         Added MONO_ARCH_SAVE_REGS.
17664
17665         * icall.c (ves_icall_type_is_subtype_of): Use new function.
17666
17667 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
17668
17669         * blob.h: Add a couple of new MonoType types definitions.
17670
17671         * tabledefs.h: Add a couple of new call convs.
17672
17673 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
17674
17675         * reflection.h (MonoReflectionDynamicAssembly): track changes in
17676         the layout of the class.
17677
17678         * reflection.c (alloc_table): double the size on overflow to avoid
17679         unnecessary copying.
17680
17681         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
17682         avoid filling out metadata tables and blobs. Also set mb->ilgen to
17683         null so it can be garbage collected.
17684         
17685 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
17686
17687         * reflection.c (mono_reflection_get_type): Return the resolved type
17688         only if it is in the assembly we searched.
17689
17690         * reflection.c (ensure_runtime_vtable): Initialize method slots.
17691
17692         * class.c (mono_class_setup_vtable): Set the slot of the overriding
17693         method.
17694
17695 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17696
17697         * appdomain.c:
17698         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
17699         the right one is 'file:///blah', but MS allows it.
17700         * assembly.c:
17701         (mono_assembly_open): allow 'file://blah'
17702
17703         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
17704
17705 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
17706
17707         * socket-io.c: fixes bug #40310.
17708
17709 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
17710
17711         * reflection.c (mono_reflection_parse_type): handle deeply nested
17712         types correctly.
17713
17714         * reflection.c (mono_image_create_token): Use unique token values
17715         since they will be put into a hash table.
17716
17717         * class.c (mono_class_setup_vtable): If a method occurs in more than
17718         one place in the vtable, and it gets overriden, then change the
17719         other occurances too.
17720
17721         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
17722         object as return type.
17723
17724 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
17725
17726         * icall.c: Deleted "ToString" implementation for double and float
17727         because they are full implemented in managed code.
17728
17729 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17730
17731         * reflection.c, reflection.h: implemented and exported functions
17732         to retrieve info about custom attributes.
17733
17734 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17735
17736         * appdomain.c: moved Uri handling to assembly.c
17737         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
17738         work when using a file Uri in *nix and windows.
17739
17740         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
17741         GetReferencedAssemblies.
17742
17743 2003-03-18  Dick Porter  <dick@ximian.com>
17744
17745         * icall.c: Rename a couple of internal calls
17746
17747         * threads.c: Set the thread state to Stopped when a thread exits.
17748         Fixes bug 39377.
17749
17750 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
17751
17752         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
17753         New icall.
17754
17755         * object.c (mono_class_vtable): fix warning.
17756
17757 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
17758
17759         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
17760
17761         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
17762         memory.
17763         (method_encode_clauses): Create exception info structures in the right
17764         order.
17765         (mono_reflection_setup_internal_class): Initialize supertypes field.
17766
17767         * class.c object.c: Handle interfaces which implement other interfaces 
17768         correctly.
17769
17770         * class.h class.c: Move the supertypes array initialization code into 
17771         a separate function so it can be used for dynamic types too. Also call
17772         it earlier, in mono_class_init(), since it can be used before the
17773         type is initialized.
17774
17775 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17776
17777         * Makefile.am:
17778         * assembly.c:
17779         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
17780
17781         * appdomain.c:
17782         * appdomain.h:
17783         * marshal.c:
17784         * object.c: remove warnings.
17785
17786 2003-03-13  Martin Baulig  <martin@ximian.com>
17787
17788         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
17789         (MonoDebugLexicalBlockEntry): New types.
17790
17791         * debug-mono-symfile.c
17792         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
17793
17794 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17795
17796         * process.c: ret can be any non-zero value accroding to MS doc.
17797
17798 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
17799
17800         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
17801         fixing a warning for a miss-used prototype, would have cause
17802         random memory corruption.
17803
17804 2003-03-07  Martin Baulig  <martin@ximian.com>
17805
17806         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
17807         getting really annoying ....
17808
17809 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
17810
17811         * reflection.c (fixup_method): added support for array methods.
17812
17813 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17814
17815         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
17816         (pointed out by Michael Adams).
17817
17818 2003-03-04  Dick Porter  <dick@ximian.com>
17819
17820         * icall.c: Temporarily reverted the Double and Single ToString()
17821         change, because it broke nunit.
17822
17823 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
17824
17825         * object.h, threads.h: make include files compatible with C++
17826         (patch by Jerome Laban <jlaban@wanadoo.fr>).
17827
17828 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
17829
17830         * icall.c: Erased ToString helper functions for Double and Single.
17831         Now, that implementations ar all in managed code (Double and Single
17832         Formatters).
17833
17834 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
17835
17836         * appdomain.c: Added method for initializing the default context of
17837         a domain. Added internal call for getting the default context.
17838         * appdomain.h: Added context variable in MonoDomain struct.
17839         * domain.c: mono_domain_set also sets the default context of the domain
17840         * icall.c: Mapped internal method InternalGetDefaultContext.
17841         * object.c: mono_object_get_virtual_method returns always a remoting
17842         wrapper if the object is a transparent proxy.
17843         mono_runtime_invoke_array: when creating an object by calling the
17844         constructor, if the created object is a proxy, then the constructor should
17845         be called using the a remoting wrapper.
17846
17847 2003-03-03  Dick Porter  <dick@ximian.com>
17848
17849         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
17850         variable so it compiles on solaris.  Problem spotted by
17851         Christopher Taylor <ct@cs.clemson.edu>
17852
17853 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17854
17855         * appdomain.c:
17856         (get_info_from_assembly_name): don't leak value.
17857
17858         * icall.c:
17859         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
17860         result.
17861
17862 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17863
17864         * assembly.c: export mono_image_load_references ().
17865         * class.c: handle function pointers. mono_class_from_name() now
17866         supports nested type names directly.
17867
17868 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
17869
17870         * reflection.h reflection.c: Encode already created dynamic methods 
17871         and fields correctly as a DEF instead of a REF.
17872
17873         * reflection.c: Get rid of the force_ref argument to 
17874         mono_image_typedef_or_ref since it was wrong in the first place.
17875
17876         * string-icalls.c: add error checking to string constructors according
17877         to the MSDN docs.
17878
17879         * reflection.c: Emit types in the order their TypeBuilders were 
17880         created. Previously, a new table index was assigned to each type before
17881         the tables were emitted. This was wrong because the signature blob
17882         might already refer to a type by its original table index.
17883
17884 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
17885
17886         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
17887         change.
17888         
17889 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17890
17891         * Makefile.am: make assemblies dir have \ instead of / on windows.
17892
17893 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
17894
17895         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
17896         iterate over the NESTEDCLASS table using a linear search since the
17897         table is not guaranteed to be sorted by the secondary key.
17898
17899         * class.c (mono_class_create_from_typedef): fixed up call to
17900         mono_metadata_nesting_typedef.
17901         
17902 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
17903
17904         * marshal.c (mono_string_to_byvalstr): clear the memory as
17905         suggested by Jerome Laban <jlaban@wanadoo.fr>
17906
17907 2003-02-26  Dick Porter  <dick@ximian.com>
17908
17909         * process.c: Cope with padding in .rsrc blocks
17910
17911 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
17912
17913         * metadata.h: reverted the filter_len change, it breaks reflection
17914         
17915 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
17916
17917         * metadata.h: added a new field to store the filter_len
17918         
17919
17920 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17921
17922         * reflection.c: handle custom attributes for types and members
17923         created with Reflection.Emit (bug#38422).
17924
17925 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
17926
17927         * reflection.c: define RTSpecialName automatically for constructors for
17928         compatibility with MS.NET.
17929
17930         * reflection.c (mono_reflection_create_runtime_class): initialize
17931         nested_in field of dynamically created classes.
17932
17933 2003-02-22  Martin Baulig  <martin@ximian.com>
17934
17935         * debug-mono-symfile.h: Incremented version number.
17936
17937 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
17938
17939         * object.h icall.c process.c: fix warnings.
17940
17941 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
17942
17943         * appdomain.h appdomain.c:
17944         (mono_domain_try_type_resolve): split the 
17945         name_or_tb argument into a name and a tb argument.
17946         (mono_domain_has_type_resolve): new function to check whenever the
17947         application has registered a TypeResolve event handler.
17948         
17949         * icall.c reflection.h reflection.c: move the type resolve logic into
17950         mono_reflection_get_type () so it will be invoked when 
17951         Assembly::GetType () is called.
17952
17953         * reflection.c:
17954         (mono_reflection_get_type): renamed to get_type_internal.
17955         (mono_reflection_get_type): fixed type name generation so it works 
17956         for nested types too.
17957         (mono_reflection_get_type): call has_type_resolve () to avoid the 
17958         costly type name generation if there is no resolve event handler.
17959
17960 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17961
17962         * class.c, image.c: load exported types from file references.
17963
17964 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
17965
17966         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
17967           used to cache the managed methods used to create proxies and make 
17968           remote invocation of methods.
17969         * class.h: Added in MonoVTable a flag to indicate that a class needs 
17970           to be remotely created.
17971         * object.c: Modified the method mono_class_vtable(). It now initializes 
17972           the remote flag of the vtable. Modified mono_object_new_specific(), 
17973           so now it checks the remote flag.
17974         * icall.c: Added a couple of internal methods, one for enabling instance 
17975           creation interception for a type, and one for creating objects bypassing
17976           the remote check.
17977
17978 2003-02-18  Martin Baulig  <martin@ximian.com>
17979
17980         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
17981         New interncall to get a method's metadata token.
17982
17983         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
17984         New interncall for the debugger.
17985
17986 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
17987
17988         * class.c (mono_class_setup_vtable): allocate supertype array
17989
17990 2003-02-18  Martin Baulig  <martin@ximian.com>
17991
17992         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
17993
17994 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17995
17996         * reflection.c:
17997         (assembly_name_to_aname): jump over unknown properties (i've found
17998         something like: 'type, assembly, version=xxx, custom=null, public...',
17999         so now will ignore custom=null and still get the rest of the values).
18000
18001 2003-02-17  Dick Porter  <dick@ximian.com>
18002
18003         * threads.c: Have Thread.Start() wait for a semaphore to signal
18004         that the thread has set up all its local data.  This fixes bug
18005         34323, where Abort() raced the new thread's TLS data.
18006
18007         Also removes the handle_store() call from start_wrapper, because
18008         threads are now always created suspended and there is no longer a
18009         race between the parent and child threads to store the info.
18010
18011 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
18012
18013         * image.c: explain the #- heap issue in a message, hopefully
18014         avoiding FAQs on mono-list.
18015
18016 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18017
18018         * icall.c:
18019         (GetEntryAssembly): if the domain has not invoked
18020         AppDomain.ExecuteAssembly yet, return the assembly of the default
18021         AppDomain.
18022
18023 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
18024
18025         * class.c (mono_ldtoken): make it work in dynamic assemblies.
18026
18027 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
18028
18029         * metadata.c, reflection.c: simple speedup to type hash
18030         and equals code.
18031
18032 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
18033
18034         * image.c, image.h, class.c, assembly.c: move module loading
18035         to MonoImage. When loading metadata, consider alignemnet from
18036         the start of metadata, not from the metadata address in memory.
18037
18038 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
18039
18040         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
18041         AssemblyBuilder objects. Factored out custom attribute creation into
18042         a separate function.
18043         (create_custom_attr): new function to create custom attributes.
18044
18045 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
18046
18047         * Makefile.am: Got tired of typing the full pathname to pedump.
18048         Until there is another option, am installing this.
18049
18050 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
18051
18052         * class.c (class_compute_field_layout): always set field->parent 
18053         (mono_ldtoken): use mono_defaults.fieldhandle_class;
18054
18055 2003-02-11  Dick Porter  <dick@ximian.com>
18056
18057         * threads-types.h:
18058         * monitor.c: Rewrote Monitor, making lock much faster and
18059         Pulse/Wait work as specified.  Also uses much fewer handles, and only
18060         creates them as needed.
18061
18062         * exception.c: Added SynchronizationLockException
18063
18064         * threads.c: Deleted old Monitor implementation.  The new one is
18065         in a new file.
18066
18067 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
18068
18069         * class.c: handled TypedReference type code. Set the correct size for
18070         class data. Setup interface_offsets for interface classes, too.
18071
18072 2003-02-09  Martin Baulig  <martin@ximian.com>
18073
18074         * debug-mono-symfile.h: Reflect latest symbol writer changes.
18075
18076 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
18077
18078         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
18079         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
18080         * object.c: fixed mono_object_get_virtual_method () for interfaces.
18081         * verify.c: check for code that runs after the end of the method.
18082
18083 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
18084
18085         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
18086         "System.Math::Round2".
18087         * sysmath.h: Added Floor, Round and Round2 definitions.
18088         * sysmath.c: Modified certain functions that were not 100% compliant
18089         with MS.NET (math precision) and added the implementation of Floor,
18090         Round and Round2.
18091
18092 2003-02-07  Martin Baulig  <martin@ximian.com>
18093
18094         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
18095
18096 2003-02-07  Martin Baulig  <martin@ximian.com>
18097
18098         * debug-mono-symfile.c: Reflected latest symwriter changes.
18099         (mono_debug_create_mono_symbol_file): Removed.
18100         (mono_debug_open_mono_symbol_file): Take an argument which
18101         specifies whether to create a dynamic symbol file.
18102
18103 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
18104
18105         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
18106
18107 2003-02-05  Martin Baulig  <martin@ximian.com>
18108
18109         * reflection.c (mono_image_build_metadata): Make this public,
18110         protect it against being called multiple times, don't create
18111         resources and don't build the compressed metadata here.
18112         (mono_image_create_pefile): Do this here.
18113
18114         * icall.c
18115         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
18116
18117 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18118
18119         * socket-io.c: fixed bug #36322.
18120
18121 2003-02-06  Piers Haken <piersh@friskit.com>
18122
18123         * appdomain.[ch]:
18124         * class.h:
18125         * debug-mono-symfile.c:
18126         * icall.c:
18127         * loader.c:
18128         * mono-config.c:
18129         * monosn.c:
18130         * reflection.c:
18131         * socket-io.c: warning cleanups
18132
18133 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
18134
18135         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
18136         function. works like remoting invoke, but does a check for the Proxy first.
18137
18138 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
18139
18140         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
18141
18142 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
18143
18144         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
18145         array of pointers.
18146         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
18147         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
18148
18149         * object.c (mono_store_remote_field_new): used by the new jit
18150         instead of mono_store_remote_field
18151         (mono_load_remote_field_new): used by the new jit
18152         instead of mono_load_remote_field
18153
18154 2003-02-05  Patrik Torstensson
18155
18156         * appdomain.c: changed unload to take the domain id instead
18157         of domain
18158         
18159         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
18160
18161
18162 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18163
18164         * appdomain.c: don't look for assemblies in ApplicationBase if
18165         PrivateBinPathProbe is set.
18166
18167 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18168
18169         * object.c: make the first argument in main_args contain the absolute
18170         path to the assembly. Fixes bug #37511.
18171
18172 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18173
18174         * icall.c: get correct UTC offset for countries not using daylight
18175         time saving. Fixes bug #30030.
18176
18177 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18178
18179         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
18180         and 1 are the family).
18181
18182 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
18183
18184         * icall.c (ves_icall_InternalExecute): removed wrong assertion
18185
18186         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
18187
18188 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
18189
18190         * reflection.c: added support for SignatureHelper tokens, which is
18191         needed by the Calli opcode.
18192
18193         * reflection.h: track changes to SignatureHelper class.
18194
18195         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
18196
18197 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18198
18199         * appdomain.c: fixed loading assemblies from PrivateBinPath.
18200
18201 2003-02-03  Patrik Torstensson
18202         * appdomain.[c|h], domain.c : 
18203          - Added support for getting a domain via domain id
18204          - Support for setting and getting domain from System.AppDomain 
18205            (used in cross appdomain channel)
18206          - Added support for get/set for a MonoAppContext on a thread 
18207            (Context class in System.Runtime.Remoting.Contexts),
18208          - Removed hack in Get/SetData and ExecuteAssembly.
18209         
18210         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
18211         the managed world to get control when a proxy is created.
18212
18213         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
18214         
18215 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
18216
18217         * icall.c
18218         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
18219         Populate the codebase field as well.
18220
18221 2003-02-02  Martin Baulig  <martin@ximian.com>
18222
18223         * debug-mono-symfile.c
18224         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
18225         (mono_debug_symfile_add_method): Allow interncalls.
18226
18227 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18228
18229         * icall.c: throw parse exception if strtod fails or the string is empty.
18230
18231 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
18232
18233         * marshal.c: handle object type separately from defined
18234         class types.
18235
18236 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
18237
18238         * marshal.c: handle NATIVE_LPSTR for strings when it's
18239         explicitly specified.
18240
18241 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
18242
18243         * reflection.c, reflection.h, icall.c: setup the reflection
18244         handle cache for ModuleBuilders and AssemblyBuilders.
18245
18246 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
18247
18248         * reflection.c (reflection_methodbuilder_to_mono_method): set
18249         pinvoke flag
18250
18251 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18252
18253         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
18254
18255 2003-01-29  Dick Porter  <dick@ximian.com>
18256
18257         * threads.c: No need for the fake_thread kludge now that Thread
18258         doesn't run a class constructor
18259         
18260 2003-01-29  Dick Porter  <dick@ximian.com>
18261
18262         * threads.c: Use g_direct_hash instead of the rather bogus
18263         g_int_hash
18264
18265 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
18266
18267         * marshal.c (mono_marshal_get_native_wrapper): add check for null
18268         (fix pinvoke12.exe)
18269         (mono_marshal_get_struct_to_ptr): generate valid IL code
18270         (mono_marshal_get_ptr_to_struct): generate valid IL code
18271         (*): correctly set sig->pinvoke, we need to memdup the signature
18272         to do that
18273
18274 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
18275
18276         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
18277         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
18278
18279 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
18280
18281         * profiler.c: provide more callers information.
18282
18283 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
18284
18285         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
18286
18287         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
18288
18289         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
18290
18291 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
18292
18293         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
18294         exception instead of going into an infinite loop on dates which it 
18295         can't yet handle.
18296
18297         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
18298         out-of-range exception if needed.
18299
18300         * class.c (mono_class_setup_vtable): allow a virtual method to provide
18301         an implementation for an interface method and to override an inherited
18302         method at the same time. 
18303         Imagine a scenario when a virtual method is used to override a
18304         virtual abstract method in a parent class, and this same method 
18305         provides an implementation for an method inherited from an interface. 
18306         In this case, the interface resolution code will set im->slot, which 
18307         means that the virtual method override pass will skip this method 
18308         which means a pointer to the abstract method inherited from the parent
18309         will remain in the vtable of this non-abstract class.
18310
18311         * class.c: (mono_class_setup_vtable): continue search for a real 
18312         method if only an abstract method is found.     
18313
18314 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
18315
18316         * reflection.c: add size to encoding for ByValStr and ByValArray
18317         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
18318
18319 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
18320
18321         * class.c (mono_class_setup_vtable): pass the override info as an
18322         argument.
18323
18324         * class.c (mono_class_setup_vtable): set the slot of overriding methods
18325         correctly.
18326         
18327         * reflection.c (ensure_runtime_vtable); add support for method 
18328         overrides.
18329         
18330 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
18331
18332         * reflection.c (resolution_scope_from_image): Hack to work to work with
18333         dynamic assemblies.
18334
18335         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
18336         added a 'force_ref' argument to force this function to allways return 
18337         a TypeRef. This is needed by mono_image_get_memberref_token ().
18338         
18339 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
18340
18341         * reflection.c (mono_image_get_type_info): interfaces really don't have
18342         a parent.
18343
18344         * reflection.c (mono_image_basic_init): fill out missing fields of
18345         image structure.
18346
18347         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
18348         dynamic assemblies. This is required so dynamic assemblies show up in
18349         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
18350         Type::GetType() etc. This is consistent with MS behaviour.
18351
18352         * image.c image.h reflection.c: add newly created classes to the name 
18353         cache so mono_class_get () will find them.      
18354
18355 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
18356
18357         First part of changes to get IKVM.NET running under mono.
18358         
18359         * appdomain.h, appdomain.c: added new function 
18360         mono_domain_try_type_resolve() which will emit TypeResolve events. 
18361         This function will call AppDomain::DoTypeResolve to do the actual work.
18362
18363         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
18364         moved existing code dealing with dynamic tokens to a new function 
18365         called mono_reflection_lookup_dynamic_token (). This function will 
18366         raise TypeResolve events when appropriate. Since reflection.c is not 
18367         part of libmetadata, a new hook function called 
18368         mono_lookup_dynamic_token() is added to class.c which will call this.
18369
18370         * assembly.h assembly.c: make the invoke_load_hook function public,
18371         so it can be called for dynamic assemblies.
18372
18373         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
18374
18375         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
18376         type isn't found.
18377
18378         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
18379         MonoGHashTable, since it contains pointers to objects which the GC 
18380         needs to track.
18381
18382         * assembly.c (search_loaded): remove unused variable.
18383         
18384 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
18385
18386         * object.c: fixed issue exposed by gcc-generated IL programs
18387         that use RVA data for pointers.
18388
18389 2003-01-25  Martin Baulig  <martin@ximian.com>
18390
18391         * threads.c (start_wrapper): Moved the initialization of
18392         `start_func' above the mono_new_thread_init() call to which we
18393         pass it as argument.
18394
18395 2003-01-24  Martin Baulig  <martin@ximian.com>
18396
18397         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
18398         the MonoThread pointer.
18399
18400 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
18401
18402         * icall.c: Rename `PowImpl' to Pow.
18403
18404 2003-01-23  Dick Porter  <dick@ximian.com>
18405
18406         * threads.c (start_wrapper): Create a Thread object if needed, so
18407         the Main() thread can do the class initialisation in a subthread
18408         that has been set up to allow managed code execution.
18409
18410         Pass the thread ID instead of the MonoThread pointer to the thread
18411         start and attach callbacks.  This change is required, because the
18412         jit thread start callback must be called _before_ the Thread
18413         object can be created.
18414         
18415         (mono_thread_init): Removed much object creation code that is no
18416         longer needed.  No managed code is called from here now.
18417
18418         * object.c (mono_runtime_exec_managed_code): Create a subthread
18419         for Main, and call back to the runtime to use it.
18420         Set the exit code when Main exits.
18421
18422         * gc.c: Make sure domain finalisation happens in a subthread.
18423         Re-enable threaded GC, fixing bug 31333 (again).
18424
18425         * environment.c: System.Environment internall calls (so far just
18426         ExitCode is here, the others are still in icall.c)
18427
18428         * appdomain.c (mono_runtime_cleanup): All threads running managed
18429         code should have finished before mono_runtime_cleanup() is
18430         reached, so no need to clean up threads.
18431
18432 2003-01-22  Martin Baulig  <martin@ximian.com>
18433
18434         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
18435         `gpointer func' arguments.      
18436         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
18437         but added `MonoThread *thread' argument.
18438         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
18439
18440         * threads.c (mono_new_thread_init): Added `gpointer func' argument
18441         and pass it to the mono_thread_start_cb callback.
18442         (mono_install_thread_callbacks): New public function to install a
18443         set of callbacks which are set by the debugger.
18444         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
18445
18446 2003-01-22  Martin Baulig  <martin@ximian.com>
18447
18448         * Makefile.am: Install debug-mono-symfile.h.
18449
18450 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
18451
18452         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
18453
18454 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
18455
18456         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
18457         * class.c (mono_ptr_class_get): correctly set access levels of pointers
18458         (mono_array_class_get): correctly set access levels of arrays
18459
18460 2003-01-20      Patrik Torstensson
18461         * image.h (MonoAssemblyName): changed major, minor, build, revision
18462         from signed to unsigned.
18463
18464 2003-01-20  sean kasun <skasun@azstarnet.com>
18465
18466         * reflection.c (load_cattr_value): Now this handles
18467         MONO_TYPE_SZARRAY.  Fixes bug #35629
18468
18469 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
18470
18471         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
18472         integer value
18473
18474 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18475
18476         * decimal.c: fixed bug #26056.
18477
18478 2003-01-17  Martin Baulig  <martin@ximian.com>
18479
18480         * gc.c: Raise an ExecutionEngineException instead of using g_error().
18481
18482 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18483
18484         * exception.[ch]:
18485         (mono_get_exception_type_initialization): new function.
18486
18487         * object.c: throw a TypeInitializationException when an exception is
18488         thrown invoking the class constructor.
18489
18490 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18491
18492         * reflection.c: fixed attribute reading.
18493
18494 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18495
18496         * icall.c:
18497         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
18498         provided, look for the type in the calling assembly and then in
18499         mscorlib; if the assembly name is provided, only try that one.
18500
18501 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
18502
18503         * object.c: register the vtable before there is a chance it's
18504         queried again recursively.
18505
18506 2003-01-13  Duncan Mak  <duncan@ximian.com>
18507
18508         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
18509         gc-internal.h. 
18510         
18511 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
18512
18513         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
18514
18515 2003-01-11  Martin Baulig  <martin@ximian.com>
18516
18517         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
18518         this to 20 for the release.
18519
18520 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
18521
18522         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
18523
18524         * loader.c (mono_method_get_marshal_info): bug fix
18525
18526         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
18527         structures with explicit layout
18528
18529 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
18530
18531         * profiler.c: made the output more readable (and sorted). 
18532         Added caller information for the allocation profiler.
18533
18534 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
18535
18536         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
18537
18538 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18539
18540         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
18541         to get value types.
18542         
18543 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
18544
18545         * object.c, profiler.h, profiler.c, profiler-private.h:
18546         Added object allocation profiler.
18547
18548 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
18549
18550         * reflection.h, reflection.c: handle global methods.
18551         Compress blob entries.
18552
18553 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
18554
18555         * marshal.c: fix compilation.
18556
18557 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
18558
18559         * loader.c (mono_method_get_marshal_info): impl.
18560
18561         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
18562
18563 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18564
18565         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
18566         for reference types.
18567
18568 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
18569
18570         * loader.c: fixed off by one error in loaded parameter names.
18571
18572 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
18573
18574         * marshal.c (mono_marshal_get_icall_wrapper): like
18575         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
18576         instead of a MonoMethod.
18577
18578 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18579
18580         * decimal.c: fixed bug #36537.
18581
18582 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
18583
18584         * marshal.c: throw a missing method exception if a
18585         P/Invoke method is not found.
18586
18587 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
18588
18589         * icall.c: allow a null this for constructors.
18590
18591 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
18592
18593         * icall.c: raise the proper exceptions if the arguments to the
18594         internal Invoke are incorrect.
18595
18596 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
18597
18598         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
18599
18600 2003-01-03  Martin Baulig  <martin@ximian.com>
18601
18602         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
18603
18604 2002-12-31  Martin Baulig  <martin@ximian.com>
18605
18606         * debug-mono-symfile.c: Completely rewrote the type section.
18607         Instead of using individual malloc()ed fields, we use one big
18608         continuous memory area and offsets into this area.
18609         See the comments in the source code for details.
18610
18611 2002-12-30  Martin Baulig  <martin@ximian.com>
18612
18613         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
18614
18615 2002-12-30  Martin Baulig  <martin@ximian.com>
18616
18617         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
18618         line number table in this data blob instead of using an external
18619         pointer.
18620
18621 2002-12-28  Martin Baulig  <martin@ximian.com>
18622
18623         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
18624
18625 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
18626
18627         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
18628         as a boxed return type.
18629
18630 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
18631
18632         * appdomain.c
18633         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
18634         g_build_filename to properly get separators on the filename created.
18635
18636         * object.h: Small change, introduce MonoMarshalByRefObject to
18637         track the layout of that structure in the C# universe as we make
18638         changes there.
18639
18640 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
18641
18642         * object.c: removed assert to allow static fields on interfaces.
18643         * loader.c: a TypeSpec may be used for any type, not just arrays.
18644
18645 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18646
18647         * class.c, class.h: added mono_class_array_element_size ().
18648         Ignore static methods in interfaces.
18649
18650 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18651
18652         * threads.c: fixed the build under cygwin.
18653
18654 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18655
18656         * reflection.c: handle nullref constants. Allocate keys for
18657         reflection handles with the GC.
18658
18659 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18660
18661         * threads.c, threads.h: added mono_thread_get_abort_signal()
18662         to get a suitable signal for thread abort.
18663
18664 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18665
18666         * metadata.c: fix handling of ExportedType table.
18667
18668 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18669
18670         * icall.c: added WriteWindowsDebugString internal call.
18671
18672 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18673
18674         * reflection.h: added fields to match C# implementation.
18675
18676 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18677
18678         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
18679
18680 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
18681
18682         * gc.h, gc-internal.h: Rename header for GC internal calls to
18683         gc-internal.h from gc.h as to not clash with Boehm GC having its
18684         header installed as <gc.h> in outside include paths.
18685         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
18686         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
18687
18688 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18689
18690         * icall.c: assign minor, build and revision in FillName.
18691
18692 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
18693
18694         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
18695         Added support for running code generated by Reflection.Emit.
18696
18697 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18698
18699         * appdomain.c: check for NULL argument in LoadFrom.
18700
18701 2002-12-10  Dick Porter  <dick@ximian.com>
18702
18703         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
18704
18705 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18706
18707         * appdomain.c: fix buglet when building exe file name.  Handle full
18708         assembly name (needed after latest changes to AssemblyName).
18709         * image.c:
18710         (mono_image_close): free some hashtables.
18711
18712 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
18713
18714         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
18715         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
18716         on some systems (redhat 7.3) 
18717
18718 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
18719
18720         * threads.c: delete the critical section of a sync block,
18721         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
18722
18723 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
18724
18725         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
18726
18727 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18728
18729         * appdomain.[ch]: handle the assembly preload event to try loading the
18730         assemblies using the paths we have in the current domain.
18731
18732         * assembly.[ch]: created an assembly preload hook that is called to try
18733         loading the assembly by other means that the ones provided here.
18734
18735         * domain.c: initialize the domain search path.
18736
18737         From now on, assemblies (TODO: except corlib and System) are loaded
18738         according to these rules when using mono_assembly_load ():
18739
18740                 1. It tries to load the assembly from the ApplicationBase
18741                 of the current domain appending .dll and .exe (TODO: have to
18742                 try loading from name/name.dll and name/name.exe).
18743
18744                 2. It tries the search path specified in PrivateBinPath for the
18745                 current domain (if any).
18746
18747                 3. Previous behavior.
18748
18749 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
18750
18751         * icall.c: implemented GetInterfaceMap() related icall.
18752         * domain.c, loader.h: load MethodInfo in mono_defaults.
18753
18754 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18755
18756         * gc.c: disable the finalizer thread for now, untill all the issues
18757         with it are resolved.
18758
18759 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18760
18761         * string-icalls.c: handle embedded nulls in string ctor when the
18762         length is specified.
18763
18764 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18765
18766         * class.c: look for explicit interface implementation in parent
18767         classes, too.
18768
18769 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
18770
18771         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
18772
18773 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18774
18775         * gc.c: protect handles with a critical section.
18776
18777 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18778
18779         * icall.c:
18780         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
18781         parameters. If no assembly specified, try getting the type from all
18782         the assemblies in the current domain, else, load the assembly and get
18783         the type from it.
18784
18785 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18786
18787         * marshal.c: applied patch from Aleksey Demakov that fixes
18788         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
18789
18790 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18791
18792         * icall.c: fixed get_location.
18793
18794 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
18795
18796         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
18797         declarations to make it work with older gcc. 
18798
18799         * loader.c (mono_get_method): set signature->pinvoke for native calls
18800
18801 2002-11-20  Dick Porter  <dick@ximian.com>
18802
18803         * threads.c (mono_thread_init): Set the main thread's handle
18804
18805 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18806
18807         * gc.c: allow compilation without GC support. Changed to match the
18808         mono coding style.
18809
18810 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18811
18812         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
18813
18814 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
18815
18816         * reflection.c: set a public key token on the core assemblies.
18817
18818 2002-11-18  Dick Porter  <dick@ximian.com>
18819
18820         * threads.c: Split out some thread initialisation so that other
18821         files can set the start callback function.
18822
18823         * gc.c: Run finalisers in a separate thread, to avoid stack
18824         overflow.  Fixes bug 31333.
18825
18826         * appdomain.c: Set up GC finalisation thread.
18827
18828         * reflection.c: 
18829         * object.c: 
18830         * domain.c: Use gc.h macros for GC_malloc
18831         
18832 2002-11-15  Dick Porter  <dick@ximian.com>
18833
18834         * threadpool.c: 
18835         * threads.c:
18836         * appdomain.c: Removed mono_runtime_init_with_attach(),
18837         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
18838         merging the extra parameter with the existing function.  Removed
18839         unneeded code in mono_thread_attach().
18840
18841 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
18842
18843         * image.c (mono_image_loaded_by_guid): a method to get loaded
18844         images by guid. 
18845         (load_metadata_ptrs): we store the guid as string.
18846
18847 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
18848
18849         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
18850
18851         * metadata.c (mono_guid_to_string): imported method form Zoltan
18852         Varga (slightly modified)
18853
18854         * assembly.c (mono_assembly_open): load precompiled code
18855
18856         * loader.h (MonoMethod): we store the method token for use in the
18857         aot compiler. 
18858
18859 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18860
18861         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
18862         the hook function called when an assembly is loaded.
18863         
18864         * domain.c: Modified file.
18865         (mono_domain_assembly_load): removed hash table insertion of assemblies.
18866
18867         Fixes bug #33196.
18868
18869 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
18870
18871         * reflection.c: Map PEFileKind to the value expected by the WinNT
18872         image loader. 
18873
18874 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18875
18876         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
18877         Read until the buffer is filled completely.
18878
18879 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18880
18881         * icall.c: implemented MonoType.InternalGetEvent ().
18882
18883 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18884
18885         * appdomain.c: implemented InitAppDomainSetup. Delayed
18886         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
18887         the entry_assembly.
18888
18889         * assembly.c: base_dir is now an absolute path ending with
18890         G_DIR_SEPARATOR.
18891
18892         * icall.c: modified get_location according to the above changes.
18893
18894         * object.c: init AppDomain.SetupInformation for the default domain after
18895         we have the entry assembly.
18896
18897         * domain.c: when unloading a domain, setup = NULL.
18898
18899 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
18900
18901         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
18902
18903 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
18904
18905         * object.h, object.c: introduced mono_object_get_virtual_method ()
18906         to lookup the method invoked on an object when a callvirt is done on
18907         a method.
18908         * icall.c: make MethodInfo::Invoke() always do a virtual call.
18909
18910 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18911
18912         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
18913         current domain when loaded an assembly and failed to load it.
18914
18915         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
18916
18917 2002-10-31  Dick Porter  <dick@ximian.com>
18918
18919         * icall.c: 
18920         * file-io.h: 
18921         * file-io.c: Return the error status in a parameter, as the
18922         GetLastError() value has long since been blown away if we try and
18923         look it up in a subsequent internal call invocation.  Delete the
18924         GetLastError() internal call, because it's useless.
18925
18926 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
18927
18928         * class.[ch]: added cast_class to fix bug 29517
18929
18930 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
18931
18932         * marshal.c: create valid IL code in the filter clause:
18933         the new JIT is less forgiving:-)
18934
18935 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18936
18937         * icall.c: removed get_property internal call.
18938
18939 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
18940
18941         * appdomain.h domain.c: Added an ID to appdomains.
18942         
18943         * threads.c threads.h icall.c: Implement icall
18944         Thread:GetDomainID(), and remove unused icall 
18945         CurrentThreadDomain_internal.
18946
18947 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18948
18949         * icall.c: Don't recurse through the base types in GetConstructor.
18950         Fixes bug #32063. 
18951
18952 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
18953
18954         * mempool.h, mempool.c: added mono_mempool_empty() and
18955         mono_mempool_stats().
18956
18957 2002-10-23  Dick Porter  <dick@ximian.com>
18958
18959         * file-io.c: 
18960         * file-io.h: 
18961         * icall.c: Added MonoIO.GetFileType internal call
18962
18963 2002-10-17  Dick Porter  <dick@ximian.com>
18964
18965         * appdomain.c (mono_runtime_cleanup): Don't signal the async
18966         delegate semaphore before waiting for all threads to finish,
18967         because new threads can also call async delegates.  Fixes bug
18968         32004.
18969
18970         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
18971         of 3 seconds, in case another async job is queued.  (This part is
18972         needed because the bug fix reintroduced the 3s exit lag.)  This
18973         makes the mono_runtime_shutdown flag superfluous.
18974
18975 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
18976
18977         * reflection.c: include ehader size in method section headers.
18978         Really check for suplicated modules entries.
18979
18980 2002-10-17  Martin Baulig  <martin@gnome.org>
18981
18982         * debug-mono-symfile.c: Added back support for locals.
18983
18984 2002-10-14  Martin Baulig  <martin@gnome.org>
18985
18986         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
18987         MONO_TYPE_VOID.
18988
18989 2002-10-14  Martin Baulig  <martin@gnome.org>
18990
18991         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
18992         mono_class_get() instead of looking in the class cache. 
18993
18994 2002-10-13  Martin Baulig  <martin@gnome.org>
18995
18996         * debug-mono-symfile.c: Set version number to 28, include the
18997         signature in method names.
18998
18999 2002-10-13  Martin Baulig  <martin@gnome.org>
19000
19001         * debug-mono-symfile.h: Set version number to 27.
19002
19003 2002-10-11  Martin Baulig  <martin@gnome.org>
19004
19005         * gc.c: Don't register/unregister NULL pointers as disappearing links.
19006
19007 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19008
19009         * metadata.c, metadata.h: added helper function to allocate signatures.
19010
19011 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19012
19013         * icall.c: added internal call to get the location of machine.config.
19014
19015 2002-10-08  Martin Baulig  <martin@gnome.org>
19016
19017         * debug-mono-symfile.c: Ignore classes with a pending init for the
19018         moment.
19019
19020 2002-10-03  Dick Porter  <dick@ximian.com>
19021
19022         * threads.c: Freebsd pthread_t is a pointer
19023
19024 2002-10-03  Dick Porter  <dick@ximian.com>
19025
19026         * socket-io.c: Implemented GetHostName_internal
19027
19028 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19029
19030         * mono-config.c:
19031         (mono_config_parse_file): don't leak the text.
19032
19033 2002-10-02  Martin Baulig  <martin@gnome.org>
19034
19035         * debug-mono-symfile.c: Added support for methods.
19036
19037 2002-10-01  Martin Baulig  <martin@gnome.org>
19038
19039         * debug-mono-symfile.c: Don't emit methods and line numbers for
19040         the dynamic symbol file, just write the type table.  We can easily
19041         have an external helper program which creates a symbol file for an
19042         IL file.        
19043
19044 2002-10-01  Dick Porter  <dick@ximian.com>
19045
19046         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
19047         Only add the handle to the cleanup array when we're about to
19048         launch the thread.  Bug 31425 deadlocked when the test was run on
19049         mono under w32.
19050
19051 2002-10-01  Martin Baulig  <martin@gnome.org>
19052
19053         * debug-mono-symfile.c: Added support for properties.
19054
19055 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19056
19057         * reflection.c: unaligned store fix from Mark Crichton
19058         <crichton@gimp.org>.
19059
19060 2002-09-27  Martin Baulig  <martin@gnome.org>
19061
19062         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
19063         New interncall.
19064
19065 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
19066
19067         * assembly.h, assembly.c: use a sane API to hook into the assembly
19068         loading process instead of a useless special-purpouse hack
19069         (ngen needs a hook, too, for example).
19070
19071 2002-09-27  Dick Porter  <dick@ximian.com>
19072
19073         * threads.c (mono_thread_init): Call GetCurrentProcess() so
19074         io-layer can set up some process handle info.  Not needed on w32,
19075         but doesn't hurt either.
19076
19077         * process.c: Pass the program name in the second parameter to
19078         CreateProcess, so the path is searched.  Include the working
19079         directory. Implemented process name, process enumeration, and some
19080         process detail internal calls.
19081         
19082         * icall.c: Added internal calls for process lookup, and some
19083         process details
19084
19085 2002-09-26  Martin Baulig  <martin@gnome.org>
19086
19087         * assembly.c (mono_install_open_assembly_hook): New global
19088         function to install a function to be invoked each time a new
19089         assembly is loaded.
19090         (mono_assembly_open): Run this callback function if set.
19091
19092         * debug-mono-symfile.c: Put back line numbers for the dynamic
19093         symbol file and also record the .il file as source file.  This
19094         allows us to install the temporary symbol file as `file.dbg' just
19095         like a compiler-generated one.
19096
19097 2002-09-26  Nick Zigarovich <nick@chemlab.org>
19098
19099         * Corrected typo in gc.c (BOHEM vs BOEHM).
19100
19101 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19102
19103         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
19104         GetProperties. Also avoid calling g_slist_length in GetProperties and
19105         GetMethods.
19106
19107 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
19108
19109         * reflection.c: avoid unaligned stores (bug spotted by
19110         Mark Crichton  <crichton@gimp.org>).
19111
19112 2002-09-25  Martin Baulig  <martin@gnome.org>
19113
19114         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
19115         instead of guint64 for addresses and added prologue/epilogue info.
19116
19117 2002-09-25  Martin Baulig  <martin@gnome.org>
19118
19119         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
19120         store line number info.  For the dynamic symbol file, we only need
19121         to provide the JIT generated dynamic line number info for the dynamic
19122         symbol file.
19123
19124 2002-09-25  Martin Baulig  <martin@gnome.org>
19125
19126         * debug-mono-symfile.h: Incremented version number.
19127
19128 2002-09-24  Martin Baulig  <martin@gnome.org>
19129
19130         * class.c (mono_debugger_class_init_func): New global function
19131         pointer variable.
19132         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
19133         call it.
19134
19135         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
19136         function.  This is called via the mono_debugger_class_init_func
19137         hook to add all types to the dynamic type table.
19138         (ves_icall_MonoDebugger_GetType): New interncall to get a class
19139         from its metadata token.
19140
19141         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
19142         New interncall for the debugger.
19143
19144 2002-09-24  Nick Drochak <ndrochak@gol.com>
19145
19146         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
19147         before using it in case it is null.
19148         
19149 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19150
19151         * metadata.c: allow custom modifiers in local var signatures
19152         (bug spotted by Zoltan Varga).
19153
19154 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19155
19156         * class.c: deal with the <Module> class that may have a NULL vtable.
19157         Eliminate warnings.
19158
19159 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
19160
19161         * image.c, image.h: more strong name helpers.
19162         * monosn.c: more work: convert pem keys to cryptoapi format.
19163
19164 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
19165
19166         * string-icalls.c: speedup IndexOf.
19167
19168 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
19169
19170         * icall.c: updates from Zoltan.2.Varga@nokia.com.
19171
19172 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
19173
19174         * icall.c: cleanup: use mono_object_domain ().
19175
19176 2002-09-23  Martin Baulig  <martin@gnome.org>
19177
19178         * debug-mono-symfile.c: Improved type support.
19179
19180 2002-09-22  Martin Baulig  <martin@gnome.org>
19181
19182         * debug-mono-symfile.c: Added support for reference types and strings.
19183
19184 2002-09-22  Martin Baulig  <martin@gnome.org>
19185
19186         * debug-mono-symfile.c: Started to work on the type table.
19187
19188 2002-09-21  Martin Baulig  <martin@gnome.org>
19189
19190         * debug-mono-symfile.c: Largely reworked the symbol table format.
19191         The symbol table is now incrementally updated each time a new
19192         method is added.  We're now also using our own magic and version
19193         so that you don't need to recompile all your classes if the
19194         dynamic table changes.
19195         (mono_debug_update_mono_symbol_file): Removed.
19196         (mono_debug_symfile_add_method): New function to add a method.
19197
19198 2002-09-21  Martin Baulig  <martin@gnome.org>
19199
19200         * icall.c
19201         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
19202         New interncall.
19203
19204         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
19205         New interncall to get a method from its metadata token.
19206
19207 2002-09-21  Martin Baulig  <martin@gnome.org>
19208
19209         * debug-mono-symfile.c: Create type table.
19210
19211 2002-09-20  Martin Baulig  <martin@gnome.org>
19212
19213         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
19214
19215 2002-09-20  Martin Baulig  <martin@gnome.org>
19216
19217         * debug-mono-symfile.c: Provide information about params and locals.
19218
19219 2002-09-20  Martin Baulig  <martin@gnome.org>
19220
19221         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
19222         New interncall.
19223
19224         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
19225         interncall to get a method from its metadata token.
19226
19227 2002-09-20  Martin Baulig  <martin@gnome.org>
19228
19229         * debug-mono-symfile.c: Added a few checks for method->header
19230         being non-NULL.  This should never happen, but for the moment
19231         let's use a g_warning() rather than a g_assert().
19232
19233 2002-09-19  Mark Crichton  <crichton@gimp.org>
19234
19235         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
19236         even if support for it isn't present.  Added an #ifdef to fix this.
19237
19238         * socket-io.c: Added checks back for Solaris support.
19239
19240 2002-09-19  Martin Baulig  <martin@gnome.org>
19241
19242         * debug-mono-symfile.c (read_string, write_string): Reflect latest
19243         changes in the symbol file format.
19244
19245 2002-09-18  Martin Baulig  <martin@gnome.org>
19246
19247         * debug-mono-symfile.c: Set version number to 21.
19248
19249 2002-09-18  Dick Porter  <dick@ximian.com>
19250
19251         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
19252         on netbsd.  Fixes bug 30051.
19253
19254 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19255
19256         * reflection.c:
19257         (set_version_from_string): little fix.
19258
19259 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
19260
19261         * monosn.c, Makefile.am: added strong name utility.
19262         * reflection.h, reflection.c: implemented delayed signing,
19263         locale, version and hash id assembly attributes.
19264
19265 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
19266
19267         * loader.c, metadata.c: load param attributes in signatures.
19268
19269 2002-09-16  Martin Baulig  <martin@gnome.org>
19270
19271         * debug-mono-symfile.c: Added string table with all method names.
19272
19273 2002-09-14  Martin Baulig  <martin@gnome.org>
19274
19275         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
19276         fast method lookup.
19277
19278 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
19279
19280         * reflection.c: record the public key token of referenced assemblies.
19281
19282 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
19283
19284         * image.c, image.h: added functions to get the strong name and the
19285         public key of an assembly.
19286         * pedump.c: use them.
19287
19288 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
19289
19290         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
19291
19292 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
19293
19294         * marshal.c (mono_marshal_get_managed_wrapper): Added
19295         MONO_TYPE_BOOLEAN 
19296
19297 2002-09-11  Martin Baulig  <martin@gnome.org>
19298
19299         * gc.c: Call GC_unregister_disappearing_link() on all links when
19300         finalizing them, this is necessary to aviod a crash in boehm's
19301         finalize handler.
19302
19303 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19304
19305         * gc.c: handle GetTarget for finalized objects spotted and fixed by
19306         nick@chemlab.org.
19307
19308 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
19309
19310         * icall.c: implemented MonoType::Module.
19311         * reflection.c, reflection.h: mono_module_get_object () from
19312         Tomi Pakarinen <tomi.pakarinen@welho.com>.
19313
19314 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19315
19316         * icall.c: ignore overridden methods in GetMethods ().
19317         Fix for FieldInfo::SetValue().
19318         * object.c: handle float/double in runtime invoke.
19319
19320 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19321
19322         * object.c: allow a constructor to be called again on an object.
19323
19324 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
19325
19326         * class.h, class.c: move field layout code to it's own function and
19327         export it. Get an interface id earlier. Move fields in MonoClass
19328         so they are more cache friendly and align the bitfields.
19329         * loader.c: temporary handle get_param_names() for a runtime method.
19330         * reflection.c, reflection.h: more code to handle runtime creation of
19331         types.
19332
19333 2002-09-09  Martin Baulig  <martin@gnome.org>
19334
19335         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
19336         signature with the pinvoke field being set for the actual call.
19337
19338 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19339
19340         * icall.c: removed some unused icalls. Start of map of glib charsets
19341         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
19342
19343 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
19344
19345         * debug-helpers.c: break infinite loop (found and fixed by
19346         Holger Arnold <harnold@gmx.de>).
19347
19348 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
19349
19350         * icall.c: target may be null in create_delegate.
19351
19352 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
19353
19354         * marshal.c: handle a boolean return type.
19355
19356 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
19357
19358         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
19359
19360 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
19361
19362         * gc.c: fix weakreferences.
19363
19364 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
19365
19366         * icall.c: added icall to get default codepage.
19367
19368 2002-09-03  Dick Porter  <dick@ximian.com>
19369
19370         * threads.h: 
19371         * threads.c: Use MonoThread instead of MonoObject where
19372         apropriate.
19373
19374         Store running thread objects in a hash table, so that we have all
19375         the info to hand when waiting for them to finish
19376         (means we don't need OpenThread() any more, so mingw builds should
19377         be fully functional again.)
19378
19379         * verify.c:
19380         * object.h: Added thread ID to MonoThread
19381
19382 2002-09-03  Martin Baulig  <martin@gnome.org>
19383
19384         * icall.c (System.Reflection.Assembly::get_location): New interncall.
19385
19386 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19387
19388         * icall.c: fixed leak in get_temp_path. Thanks lupus.
19389
19390 2002-09-03  Martin Baulig  <martin@gnome.org>
19391
19392         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
19393         argument to store the end address of the disassembled instruction.
19394
19395         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
19396         here from debug-symfile.h.
19397         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
19398         JIT into this struct.
19399         (MonoSymbolFile): Added `char *image_file' field.
19400         (MonoDebugGetMethodFunc): Removed.
19401         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
19402         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
19403         (mono_debug_find_method): New method.
19404
19405         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
19406         create a full symbol file.
19407         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
19408         and static symbol files.
19409         (mono_debug_find_method): The symbol file keeps an internal method hash,
19410         call this to get a MonoDebugMethodInfo from a MonoMethod.
19411
19412         * debug-symfile.[ch]: Removed.
19413
19414 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
19415
19416         * image.c (do_mono_image_open): Remove linker version check.
19417
19418 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
19419
19420         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
19421         wrappers for instance methods.
19422         
19423 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19424
19425         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
19426
19427 2002-08-28  Dick Porter  <dick@ximian.com>
19428
19429         * Makefile.am: Export HOST_CC for w32 builds
19430
19431 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19432
19433         * file-io.c process.c: MonoString are null terminated, no
19434         need for mono_string_to_utf16() anymore.
19435
19436 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19437
19438         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
19439
19440 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
19441
19442         * icall.c, reflection.h: speedup System.MonoType.
19443
19444 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19445
19446         * reflection.c: allow null as the value of a string argument in
19447         custom attributes constructors.
19448
19449 2002-08-27  Martin Baulig  <martin@gnome.org>
19450
19451         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
19452         `trampoline_address' field.
19453
19454 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
19455
19456         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
19457         check (fixes bug #29486) 
19458
19459 2002-08-27  Martin Baulig  <martin@gnome.org>
19460
19461         * debug-mono-symfile.c: Changed the file format in a way that allows us
19462         open it read-only and to use a specially malloced area for all the
19463         dynamic data.  We can now also generate a symbol file on-the-fly if we're
19464         debugging IL code and there is no MCS generated symbol file for it.
19465
19466 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
19467
19468         * object.c: added a define for a good string and array
19469         creation speedup (not enabled by default because we need to deal with
19470         the synch stuff).
19471
19472 2002-08-26  Martin Baulig  <martin@gnome.org>
19473
19474         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
19475         function to create a dynamic symbol file.  This is used by the
19476         debugger to create a symbol file for IL code on-the-fly.
19477
19478 2002-08-26  Martin Baulig  <martin@gnome.org>
19479
19480         * loader.c (mono_lookup_pinvoke_call): Include the error message
19481         from g_module_error() in the error message.
19482
19483 2002-08-24  Martin Baulig  <martin@gnome.org>
19484
19485         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
19486         function to update the symbol file.  The symbol file is mmap()ed
19487         writable, but private.  This allows us to install the symbol file
19488         together with the assembly.
19489
19490 2002-08-24  Martin Baulig  <martin@gnome.org>
19491
19492         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
19493         but they can read the new symbol file format which mcs is now creating.
19494
19495         * debug-symfile.c (mono_debug_find_source_location): Moved to
19496         debug-mono-symfile.c; this is now operating on the new symbol file.
19497
19498 2002-08-23  Martin Baulig  <martin@gnome.org>
19499
19500         * debug-helpers.c (mono_method_desc_from_method): New function to get
19501         a MonoMethodDesc from a MonoMethod.
19502
19503 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
19504
19505         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
19506         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
19507
19508 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
19509
19510         * string-icalls.[ch]: make helper methods static.
19511
19512 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19513
19514         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
19515         types to it and to SetValueInternal.
19516
19517         * object.c: Moved handle_enum label to its proper place. This was the
19518         f... bug! ;-)
19519
19520         This time i compiled mcs and gtk-sharp and they both work.
19521
19522 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19523
19524         * icall.c: reverted partially my previous patch until 
19525         object.c:set_value handles enums correcly.
19526
19527 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19528
19529         * icall.c:
19530         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
19531         (ves_icall_System_Environment_get_MachineName): removed warning when
19532         compiling under cygwin.
19533
19534 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19535
19536         * object.c: fixed field_get_value() for reference types.
19537
19538 2002-08-22  Dick Porter  <dick@ximian.com>
19539
19540         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
19541         Don't free a buffer while it's still needed.  Patch from Jonathan
19542         Liger <Jonathan.liger@wanadoo.fr>
19543
19544 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
19545
19546         * icall.c (ves_icall_System_Environment_get_Platform): Add new
19547         internal call.
19548
19549 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
19550
19551         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
19552         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
19553
19554         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
19555         we call unmanaged code which throws exceptions.
19556
19557 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19558
19559         * appdomain.h: added per-domain entry_assembly.
19560         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
19561         arguments.
19562         * icall.c: Assembly::GetEntryAssembly icall.
19563         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
19564         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
19565
19566 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
19567
19568         * appdomain.h, gc.c: added mono_domain_finalize ().
19569
19570 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19571
19572         * object.c:
19573         (mono_print_unhandled_exception): changed g_warning by g_printerr
19574         because g_log has a 1024 characters limit (yeah, i got a big stack
19575         trace). Don't print exception name, that should be in ToString 
19576         returned string.
19577
19578 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19579
19580         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
19581         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
19582
19583 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19584
19585         * object.c:
19586         (mono_print_unhandled_exception): after previous commit, i realized
19587         that MS calls ToString on the exception. I changed this function to
19588         do that. This way we get stack_trace for free.
19589
19590 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19591
19592         * object.c:
19593         (mono_print_unhandled_exception): invoke Message property instead of
19594         getting 'message' field from Exception. Don't allocate memory for
19595         'trace' and 'message' if not needed.
19596
19597 2002-08-18  Dick Porter  <dick@ximian.com>
19598
19599         * unicode.c: Fix asserts to match Encoder.cs checks
19600
19601 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19602
19603         * marshal.c: fix unaligned store issue and a few wrong
19604         opcode argument types.
19605
19606 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19607
19608         * icall.c: added GetUninitializedObjectInternal internal call.
19609
19610 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
19611
19612         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
19613         to the right domain.
19614
19615 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
19616
19617         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
19618
19619         * class.c (class_compute_field_layout): set blittable to false for Strings
19620
19621         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
19622
19623 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19624
19625         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
19626         first chunk of code to create types at runtime. Code to
19627         handle ReflectedType/DeclaringType. Make reflection handles
19628         domain specific.
19629
19630 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
19631
19632         * class.c: set correct name in arrays.
19633
19634 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
19635
19636         * appdomain.c (mono_domain_transfer_object): make it work with
19637         valuetypes. bug fixes.
19638
19639 2002-08-12  Dick Porter  <dick@ximian.com>
19640
19641         * object.h: Rename some parameters to avoid c++ keywords (Patch
19642         from Joseph Wenninger <kde@jowenn.at>)
19643
19644 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
19645
19646         * icall.c: added icall to implement Assembly.GetFile*.
19647
19648 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
19649
19650         * reflection.h, reflection.c: code to embed managed resources.
19651
19652 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
19653
19654         * class.c: move all the type size stuff into
19655         class_compute_field_layout().
19656
19657 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19658
19659         * class.c: ensure enums have always the correct instance size.
19660         * unicode.c: remove wrong assert.
19661
19662 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
19663
19664         * assembly.c: fix mem corruption issue.
19665         * image.h, image.c: added mono_image_get_resource () to access
19666         managed resources.
19667         * icall.c: implemented Assembly.EntryPoint property and some
19668         Managed Resources related internalcalls.
19669
19670
19671 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
19672
19673         * image.c, image.h: impemented mono_image_get_entry_point ().
19674         * appdomain.c: use mono_image_get_entry_point.
19675
19676 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
19677
19678         * reflection.c: support the object type argument when loading
19679         custom attributes.
19680
19681 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
19682
19683         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
19684         String as return type.
19685
19686 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
19687
19688         * reflection.c: fix encoding of named args for custom attrs to match
19689         the ms implementation. Read them back when instantiating custom
19690         attributes.
19691
19692 2002-08-02  Radek Doulik  <rodo@ximian.com>
19693
19694         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
19695         by Dietmar as quick fix
19696         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
19697         16 as stack size, used on more places as quick fix before Dietmar
19698         will fix it properly
19699
19700 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
19701
19702         * object.h, object.c: added accessors for fields and properties.
19703
19704 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
19705
19706         * class.c, class.h: made mono_class_get_field_from_name ()
19707         loop on parent types.
19708         Added mono_class_get_property_from_name ().
19709
19710 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
19711
19712         * class.c, class.h: move the code to setup the type vtable in its own
19713         function so that it can be reused also for types created at runtime.
19714         Eliminate the "class" identifier from the header file.
19715         * reflection.c: setup the vtable for enums so that we can create
19716         objects for use in SetConstant ().
19717
19718 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
19719
19720         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
19721         instead of the delegate itself as this pointer (bug #28383)
19722
19723 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
19724
19725         * marshal.c (mono_marshal_get_managed_wrapper): added return type
19726         conversions.
19727
19728 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19729
19730         * loader.c: don't set the pinvoke bit on icalls.
19731
19732 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
19733
19734         * debug-helpers.c (mono_method_full_name): only print a number to
19735         indicate wrapper type (so that the output is more readable in traces).
19736
19737 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
19738
19739         * class.c (mono_class_init): include method override patch from Paolo
19740
19741 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
19742
19743         * icall.c: fixed GetTypeCode().
19744
19745 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
19746
19747         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
19748         use real delegate invoke function to make it work with multicast
19749         delegates (fix bug# 28291).
19750
19751 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19752
19753         * object.c: load constant strings.
19754
19755 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19756
19757         * reflection.c: no magic numbers.
19758         * tabledefs.h: security action enum.
19759
19760 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19761
19762         * assembly.c: fix possible memory corruption.
19763
19764 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
19765
19766         * reflection.h, reflection.c: added support for linking resources.
19767         * verify.c: check we have an updated corlib.
19768
19769 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
19770
19771         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
19772         string arrays.
19773         (mono_marshal_string_array): null terminate unmanaged string arrays.
19774         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
19775
19776 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19777
19778         * icall.c: Type.GetType () can now return also types from the
19779         calling assembly.
19780
19781 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
19782
19783         * loader.h, loader.c: stack walking support.
19784         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
19785         GetCallingAssembly.
19786
19787 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
19788
19789         * marshal.c: added optimisations for blittable types 
19790
19791         * class.c (mono_array_class_get): do not set blittable attribute on arrays
19792         (mono_class_setup_mono_type): set blittable attribute for single
19793         and double.
19794
19795         * marshal.c (mono_string_utf8_to_builder): impl.
19796         (mono_string_builder_to_utf8): impl.
19797         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
19798
19799 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
19800
19801         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
19802         (mono_marshal_get_managed_wrapper): impl. byref types
19803
19804 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19805
19806         * icall.c:
19807         (search_method): don't display debug message. 
19808
19809 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
19810
19811         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
19812
19813 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
19814
19815         * appdomain.c: set the missing filename when throwing exception.
19816
19817 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
19818
19819         * metadata.c (mono_type_size): code cleanup
19820         (mono_type_stack_size): removed some test code
19821
19822 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
19823
19824         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
19825         mono_get_exception_file_not_found now.
19826
19827         * exception.c (mono_exception_from_name_two_strings): New version
19828         that will call a constructor with two string arguments. 
19829         (mono_get_exception_file_not_found): New helper routine, used to
19830         report file-not-found errors.
19831
19832 2002-07-20  Dick Porter  <dick@ximian.com>
19833
19834         * process.h:
19835         * process.c: Pass file handles to CreateProcess
19836         
19837         * icall.c:
19838         * file-io.h:
19839         * file-io.c: Implemented CreatePipe
19840
19841 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
19842
19843         * metadata.c (mono_get_param_info): set alignment for value types
19844
19845 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19846
19847         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
19848         Constify mono_domain_assembly_open().
19849         * loader.c: handle null namespace in icalls.
19850
19851 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
19852
19853         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
19854         (emit_str_to_ptr_conv): marshal object as structs
19855
19856         * metadata.c (mono_type_to_unmanaged): marshal object as structs
19857
19858         * marshal.c (mono_marshal_get_runtime_invoke): support value types
19859
19860 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
19861
19862         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
19863         (mono_marshal_get_native_wrapper): we an now return value types
19864
19865 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19866
19867         * verify.c: more checks implemented.
19868
19869 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
19870
19871         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
19872         (fix bug #27695)
19873         (mono_marshal_get_native_wrapper): allow byref arguments
19874         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
19875         impl. PtrToStringXXX methods
19876         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
19877         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
19878         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
19879         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
19880         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
19881
19882 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19883
19884         * reflection.c: fix buglet in parsing an assembly name.
19885
19886 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
19887
19888         * marshal.c (emit_ptr_to_str_conv): first impl.
19889
19890 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
19891
19892         * object.c, class.h: cache the vtable in the class as suggested by
19893         vargaz@freemail.hu (Zoltan Varga).
19894
19895 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19896
19897         * class.h, loader.c: added mono_field_from_token().
19898         * verify.c: first cut of type checking code.
19899
19900 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
19901
19902         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
19903
19904 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
19905
19906         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
19907         (fix bug #27782)
19908         (mono_marshal_get_remoting_invoke): impl.
19909         (mono_delegate_begin_invoke): impl.
19910         (mono_mb_emit_save_args): impl.
19911         (mono_delegate_end_invoke): impl.
19912         (mono_marshal_get_delegate_begin_invoke):
19913         (mono_marshal_get_delegate_end_invoke):
19914         (mono_marshal_get_delegate_invoke): generate a special name for
19915         those methods (including the signature) and associate them whith
19916         the delegate class. 
19917
19918 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
19919
19920         * reflection.[ch]: 
19921         (mono_reflection_type_from_name): now it has a MonoImage parameter
19922         which is used as the default image to search the type in. If the image
19923         is NULL or getting the type from it fails, it defaults to corlib.
19924
19925         * icall.c: changed 1 call to mono_reflection_type_from_name to match
19926         new parameter.
19927
19928 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19929
19930         * reflection.c: update the parameter table index.
19931
19932 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
19933
19934         * domain.c: don't include the mark byte in the string hash.
19935
19936 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
19937
19938         * icall.cs: icall for Type.GetTypeCode ().
19939         * verify: a couple of fixes and disabled local initialization checks.
19940
19941 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
19942
19943         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
19944
19945         * debug-helpers.c (mono_method_full_name): print the type of the
19946         runtime wrapper
19947
19948         * metadata.c (mono_signature_hash): a hash function for signatures
19949         (mono_signature_hash): better hash algorithm
19950
19951         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
19952
19953         * debug-helpers.c (mono_method_full_name): this can now generate
19954         method names with signatures
19955
19956         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
19957         method dont have this pointers.
19958
19959 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19960
19961         * reflection.c: fixup typebuilder tokens.
19962         * image.c: fix buglet.
19963         * marshal.h: remove whitespace.
19964         * metadata.h, metadata.c: reinstate code that was removed.
19965         * verify.c: handle catch directives and fix another couple of bugs.
19966
19967 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
19968
19969         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
19970         (mono_marshal_get_native_wrapper): make it comp. with the old code
19971         (mono_marshal_get_native_wrapper): support boolean
19972         (mono_marshal_get_managed_wrapper): support more types
19973
19974 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
19975
19976         * class.c (class_compute_field_layout): compute class->blittable attribute.
19977
19978 2002-07-09  Dick Porter  <dick@ximian.com>
19979
19980         * threads.c: Make the thread cleaning up cope with threads that
19981         call ExitThread()
19982
19983 2002-07-08  Radek Doulik  <rodo@ximian.com>
19984
19985         * reflection.c (method_encode_code): use non-translated values to
19986         compute finally_start, this fixes exception handling on ppc, yay!
19987
19988         * decimal.h (struct signscale): fix endianess
19989
19990 2002-07-07  Radek Doulik  <rodo@ximian.com>
19991
19992         * reflection.c: swap box_val and not val
19993
19994 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
19995
19996         * reflection.c, reflection.h: handle full assembly info in type name.
19997         Handle Type arguments when loading custom attributes.
19998         * icall.c: updated to use new mono_reflection_type_from_name () method.
19999
20000 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20001
20002         * loader.c:
20003         (method_from_memberref): also print assembly name when method not found.
20004
20005 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20006
20007         * icall.c:
20008         (ves_icall_TypeGetProperties): fixed bug #27473. 
20009
20010 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20011
20012         * reflection.c: display image name and token when cannot find the
20013         .ctor for an attribute.
20014
20015 2002-07-05  Martin Baulig  <martin@gnome.org>
20016
20017         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
20018
20019 2002-07-04  Dick Porter  <dick@ximian.com>
20020
20021         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
20022         compile on mingw.  This will cause mingw builds to not wait for
20023         subthreads to terminate after the main thread does.  I've lodged a
20024         bug with the mingw developers for them to wrap OpenThread().
20025
20026 2002-07-03  Dick Porter  <dick@ximian.com>
20027
20028         * threads.c: Store thread IDs instead of handles, because
20029         GetCurrentThread() returns a pseudohandle and therefore stores
20030         useless values.  mono_thread_cleanup() continues checking the
20031         array of threads until it is empty, to cope with subthreads
20032         spawning new threads after the main thread has finished.
20033
20034         * profiler.h:
20035         * profiler.c:
20036         * profiler-private.h: Pass the thread ID to thread profiler
20037         functions, instead of a handle
20038
20039 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
20040
20041         * verify.c: fixes to make it more usable.
20042         * pedump.c: added --verify code to verify IL code in an assembly.
20043
20044 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20045
20046         * reflection.c: turn errors into warnings to allow compiling corlib.
20047
20048 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
20049
20050         * reflection.c: add special cases to compile corlib.
20051
20052 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20053
20054         * reflection.c: handle properties with only a set method.
20055
20056 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20057
20058         * opcodes.h: add enum with opcodes in opval order.
20059
20060 2002-07-01  Dick Porter  <dick@ximian.com>
20061         
20062         * object.h:
20063         * object.c (mono_runtime_run_main): Removed unneeded argument
20064
20065 2002-06-28  Martin Baulig  <martin@gnome.org>
20066
20067         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
20068
20069 2002-06-27  Dick Porter  <dick@ximian.com>
20070
20071         * threads.c: Store the handle in both the parent thread and in the
20072         subthread, to minimise the time between starting a new thread and
20073         storing its ID.
20074
20075 2002-06-26  Dick Porter  <dick@ximian.com>
20076
20077         * appdomain.c (mono_runtime_cleanup): Close the socket library
20078         after all the threads have finished, not before
20079
20080 2002-06-26  Martin Baulig  <martin@gnome.org>
20081
20082         * debug-symfile.c (mono_debug_find_source_location): Added
20083         `guint32 *line_number' argument.  If it's not NULL, store the line number
20084         there and return the file name without the line number.
20085
20086 2002-06-25  Dick Porter  <dick@ximian.com>
20087
20088         * icall.c:
20089         * process.h:
20090         * process.c: Process forking and other support functions
20091
20092 2002-06-25  Dick Porter  <dick@ximian.com>
20093
20094         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
20095         things dont happen when the image is closed.
20096         (mono_image_lookup_resource): Walk the resource section looking
20097         for a particular entry
20098
20099         * cil-coff.h: PE resource section decoding
20100
20101 2002-06-25  Dick Porter  <dick@ximian.com>
20102         
20103         * assembly.h:
20104         * assembly.c: 
20105         (mono_assembly_foreach): Accessor functions to walk the list of
20106         loaded assemblies
20107         (mono_assembly_set_main):
20108         (mono_assembly_get_main): Process methods need to know which
20109         assembly is the "main" one
20110
20111         * object.c (mono_runtime_run_main): Record the main assembly
20112
20113         * debug-helpers.c: Fix typo
20114
20115 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
20116
20117         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
20118         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
20119
20120 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
20121
20122         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
20123
20124 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
20125
20126         * image.c (do_mono_image_open): Initialize reference count,
20127         otherwise we leak the MonoImage.
20128
20129 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
20130
20131         * reflection.c: small tweak to handle self-hosting.
20132
20133 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20134
20135         * reflection.c: fix type name parse code.
20136
20137 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
20138
20139         * reflection.c: break out of the loop.
20140         * image.c: special case corlib.
20141
20142 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
20143
20144         * reflection.c: add all the custom attrs at the end to ensure the
20145         ctors have been properly initialized when the attributes are defined
20146         in the current assembly.
20147
20148 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20149
20150         * reflection.c: handle correctly multiple-nested types.
20151
20152 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
20153
20154         * row-indexes.h: fix typos.
20155         * reflection.c: adjust for typos and fix method_def_or_ref
20156         encoding in MethodImpl table.
20157
20158 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
20159
20160         * reflection.c: fix entry point patching (thanks Serge!).
20161
20162 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
20163
20164         * verify.c: add check for System.Exception
20165
20166 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
20167
20168         * image.c, class.c: minifix for code just c&p'ed.
20169         * reflection.c: warning fix.
20170         * object.h, loader.h, domain.c: load also StringBuilder.
20171
20172 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20173
20174         * marshal.h, marshal.c: some support code to handle complex marshaling.
20175
20176 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20177
20178         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
20179         Better signatures with vtable error dump.
20180
20181 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
20182
20183         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
20184
20185 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
20186
20187         * icall.c (ves_icall_Type_GetField): impl.
20188
20189 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20190
20191         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
20192         to retrieve a marshal description blob for a field or param.
20193
20194 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
20195
20196         * reflection.h, reflection.c: change order of nested type emission
20197         to avoid table corruption. The NestedTypes table is sorted.
20198         * icall.c: change order of GetConstructor results to workaround mcs bug.
20199
20200 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
20201
20202         * reflection.h, reflection.c: handle field and param marshal
20203         information.
20204
20205 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
20206
20207         * icall.c, marshal.c marshal.h: more Marshal class implementation.
20208
20209 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20210
20211         * reflection.c: fix call convention.
20212
20213 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20214
20215         * reflection.h, reflection.c: mono_image_get_memberref_token()
20216         takes a type instead of a class, now. Added
20217         mono_image_get_array_token() to create tokens for the special
20218         multi-dim array methods.
20219
20220 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20221
20222         * assembly.c: handle modules (no assembly table). Split
20223         loading references in its own function.
20224         * class.c: handle moduleref resolution scope.
20225         * image.c, image.h: cache module name in image.
20226
20227 2002-06-07  Martin Baulig  <martin@gnome.org>
20228
20229         * reflection.c (mono_image_get_type_info): Only add a class layout entry
20230         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
20231
20232 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
20233
20234         * icall.c: more signature fixes that used uint instead of int.
20235
20236 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20237
20238         * reflection.c: fixed signature of field refs.
20239
20240 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20241
20242         * class.c, reflection.c: handle typerefs of nested types
20243         (both on read and when writing files).
20244
20245 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
20246
20247         * icall.c: fix method signatures that tried to workaround the previous
20248         typo, d'oh!
20249
20250 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
20251
20252         * debug-helpers.c: fix typo.
20253
20254 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
20255
20256         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
20257         rewrote the PE/COFF writing code (our programs are understood by the
20258         ms runtime, now).
20259
20260 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
20261
20262         * gc.c, gc.h, icall.c: weakreference support.
20263
20264 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20265
20266         * Makefile.am, mono-config.c: use $(sysconfdir).
20267
20268 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
20269
20270         * icall.c: changed default precision of Double.ToString() to 15.
20271         Fixed memory leak. Unified with Single.ToString.
20272
20273 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
20274
20275         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
20276
20277 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20278
20279         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
20280         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
20281         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
20282         and myself.
20283
20284 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
20285
20286         * debug-symfile.c, sysmath.c: yet more compilation fixes.
20287
20288 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20289
20290         * reflection.c, socket-io.c: more compilation fixes.
20291
20292 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
20293
20294         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
20295         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
20296         unicode.c: warning and compiler compatibility fixes.
20297
20298 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20299
20300         * class.h, metadata.c: fixed warnings/compilation errors.
20301
20302 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
20303
20304         * Makefile.am, mono-config.c, mono-config.h: configuration file
20305         support routines.
20306         * loader.c, loader.h: make Dll mapping configurable at runtime in the
20307         config file. Export methods to insert and lookup mappings.
20308
20309 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
20310
20311         * reflection.c: handle types and boxed objects in custom attr
20312         constructors.
20313
20314 2002-05-30  Martin Baulig  <martin@gnome.org>
20315
20316         * debug-symfile.c
20317         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
20318
20319 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
20320
20321         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
20322         to lookup the implmap row for a P/Invoke method.
20323         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
20324         P/Invoke method from the runtime on an as needed basis.
20325
20326 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
20327
20328         * metadata.c (mono_metadata_parse_signature): impl.
20329
20330 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
20331
20332         * class.c: handle .pack directive.
20333
20334 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20335
20336         * object.c: initialize static fields with RVA data.
20337
20338 2002-05-25  Martin Baulig  <martin@gnome.org>
20339
20340         * debug-symfile.c
20341         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
20342
20343 2002-05-24  Martin Baulig  <martin@gnome.org>
20344
20345         * debug-symfile.c
20346         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
20347         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
20348         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
20349
20350 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
20351
20352         * object.c: special case string ctros in invoke.
20353         * gc.c: silly whitespace changes.
20354
20355 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
20356
20357         * threadpool.[ch]: impl. a threadpool that can
20358         be used by mint and mono.
20359
20360 2002-05-22  Martin Baulig  <martin@gnome.org>
20361
20362         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
20363         The first argument is now a `MonoReflectionModuleBuilder *', the return
20364         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
20365         `methods' field to get the method builder.  The `token' argument is the
20366         unfixed token.
20367
20368         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
20369         invalid characters instead of g_assert_not_reached()ing.  This seems
20370         to be the behaviour of mscorlib.
20371
20372 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
20373
20374         * object.c (mono_runtime_invoke_array): applied patch from Rachel
20375         Hestilow to fix bug #25104
20376
20377 2002-05-21  Martin Baulig  <martin@gnome.org>
20378
20379         * debug-symfile.c (mono_debug_find_source_location): New function.
20380         Looks up an IL offset in the line number table and returns the source
20381         location as a string.
20382
20383 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20384
20385         * icall.c:
20386         (mono_double_ToStringImpl): changed %f by %g until we have something
20387         better.
20388
20389 2002-05-21  Nick Drochak  <ndrochak@gol.com>
20390
20391         * icall.c : Use different name for Math.Pow's icall.  Needed to check
20392         parameters first in C#.
20393
20394 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
20395
20396         * icall.c, reflection.h: added icall to get info about an event.
20397
20398 2002-05-20  Radek Doulik  <rodo@ximian.com>
20399
20400         * object.c (mono_value_box): don't use memcpy for boxing on BIG
20401         endian
20402         (mono_value_box): don't use memcpy for small sizes on
20403         architectures with unaligned access
20404
20405 2002-05-20  Martin Baulig  <martin@gnome.org>
20406
20407         * reflection.c (mono_reflection_setup_internal_class): Don't crash
20408         if `tb->parent == NULL'.
20409         (mono_reflection_create_internal_class): New function.  This is
20410         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
20411         for enum types.
20412
20413         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
20414         New interncall.
20415
20416 2002-05-19  Martin Baulig  <martin@gnome.org>
20417
20418         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
20419         argument to get the length, don't default to the array length.
20420
20421 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
20422
20423         * assembly.c (mono_assembly_setrootdir): New function used to
20424         override the MONO_ASSEMBLIES directory.
20425
20426 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20427
20428         * icall.c: ValueType_GetHashCode() initialize local var.
20429
20430 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
20431
20432         * reflection.c: sort custom attributes table.
20433
20434 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20435
20436         * reflection.c: support named args in custom attributes (write support).
20437
20438 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
20439
20440         * reflection.c: fix finally position calculation.
20441
20442 2002-05-15  Radek Doulik  <rodo@ximian.com>
20443
20444         * reflection.c: fixed endianess at many places
20445
20446         * icall.c (ves_icall_InitializeArray): comment out debug msg
20447
20448 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
20449
20450         * object.c (mono_unhandled_exception): new function to handle
20451         unhandled exceptions.
20452         (mono_unhandled_exception): call the UnhandledException event.
20453         (mono_runtime_delegate_invoke): impl.
20454
20455 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
20456
20457         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
20458         returns the RVA, not the direct pointer to the data. Handle the case
20459         when the class size is fixed.
20460
20461 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
20462
20463         * reflection.c: fix some endianess issues.
20464
20465 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
20466
20467         * object.c (mono_runtime_invoke): is now able to catch exceptions.
20468
20469         * threads.c (mono_thread_init): added a callback which is invoked
20470         at thread start.
20471
20472 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
20473         
20474         * icall.c: make GetHashCode return non-negative values.
20475
20476 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
20477
20478         * object.c, icall.c, gc.c: revert to address-based hashcode.
20479
20480 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
20481
20482         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
20483
20484 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
20485
20486         * icall.c, class.c: special case <Module>.
20487
20488 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
20489
20490         * icall.c: fix bug in GetNow().
20491
20492 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
20493
20494         * object.c (mono_runtime_class_init): make sure that we call all
20495         static class constructors.
20496
20497 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20498
20499         * reflection.c: sort methodsemantics table.
20500
20501 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
20502
20503         * reflection.h, reflection.c: honour init locals setting.
20504
20505 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
20506
20507         * icall.c: copied Double ToStringImpl for Single ToStringImpl
20508
20509 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
20510
20511         * reflection.c: support ContructorBuilders in attribute blob creation.
20512
20513 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20514
20515         * reflection.c: some changes to build a binary that can be run
20516         directly in windows.
20517
20518 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
20519
20520         * loader.c: print a big message when an icall can't be found.
20521
20522 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20523
20524         * string-icalls.c: fix bug 24248.
20525
20526 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
20527
20528         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
20529         icall.c, reflection.h: separate assembly loading by pathname and by
20530         assembly name. Use the MONO_PATH env var to search for assemblies.
20531
20532 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
20533
20534         * assembly.c, image.h: add some support for assemblies
20535         with multiple modules.
20536         * class.c, class.h: export mono_class_from_typeref().
20537         * loader.c: remove duplicated code and use mono_class_from_typeref(),
20538         instead.
20539
20540 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20541
20542         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
20543         documentation says (the ECMA one is correct).
20544
20545 2002-05-02  Dick Porter  <dick@ximian.com>
20546
20547         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
20548         Don't name the synchronisation mutex.
20549
20550 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
20551
20552         * rand.c
20553         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
20554         Make the prototypes match.
20555         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
20556         Same.
20557
20558         * icall.c
20559         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
20560         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
20561         all systems have tm.tm_zone, so use strftime() with %Z to print
20562         the timezone abreviation into a temp string.
20563
20564         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
20565         rather than mono_array_addr() on a MonoString on Big Endian
20566         machines.
20567
20568 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
20569
20570         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
20571         fix bug 24041
20572
20573 2002-04-30  Dick Porter  <dick@ximian.com>
20574
20575         * socket-io.c: Cope with SOCKET being an integer rather than a
20576         pointer now.
20577
20578         * threads.c: Added Thread_free_internal, to deal with thread
20579         handle cleanup.  Moved calls to handle_store() and handle_remove()
20580         to start_wrapper(), so each can only be called once.  Allocate
20581         synchronisation blocks with GC_malloc(), and use GC finalisation
20582         to close the handles.
20583
20584         * icall.c: added System.Threading.Thread::Thread_free_internal
20585
20586 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
20587
20588         * icall.c: support Environment.Exit, CommandLineArgs().
20589
20590 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
20591
20592         * object.c, object.h: added mono_runtime_run_main () and
20593         mono_runtime_get_main_args () for use in System.Environment.
20594
20595 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20596
20597         * gc.c: fix thinko, enable actual finalization since the jit is now
20598         fixed.
20599
20600 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
20601
20602         * gc.c, object.c: take into account that an object may be offset wrt the address
20603         returned by GC_malloc().
20604
20605 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
20606
20607         * image.c: handle files without entries in the assembly table (modules).
20608
20609 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
20610
20611         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
20612         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
20613         allowed to be null when it's System.Object class setup.
20614
20615 2002-04-27  Martin Baulig  <martin@gnome.org>
20616
20617         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
20618         if `tb->parent == NULL' rather than crashing.
20619
20620 2002-04-28  Nick Drochak  <ndrochak@gol.com>
20621
20622         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
20623         calling acos() where asin() should have been called.
20624
20625 2002-04-26  Martin Baulig  <martin@gnome.org>
20626
20627         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
20628         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
20629         there's a subdirectory called `System', but we don't want to read that
20630         subdirectory as an assembly.
20631
20632 2002-04-25  Martin Baulig  <martin@gnome.org>
20633
20634         * debug-symfile.c: Reflect latest MonoString changes.
20635
20636 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20637
20638         * rand.c, rand.h: instance method icalls need to have an explicit
20639         this pointer as first argument in the C implementation.
20640
20641 2002-04-25  Nick Drochak <ndrochak@gol.com>
20642
20643         * icall.c: Fix typo in map for GetNonZeroBytes
20644
20645 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
20646
20647         * string-icalls.c : String does now passes unit tests without any 
20648         errors, the following changes has been made:
20649         
20650         Implemented replace methods.
20651         Renaming of methods to (try) follow the standard.
20652         Fixed compare ordinal
20653         Made all memory allocated directly to function instead of via icall function.
20654         Small performance fix in is_in_array function
20655                         
20656  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
20657
20658         c (mono_string_Internal_ctor_charp_int_int):
20659         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
20660         sindex < 0, throw ArgumentOutOfRangeException instead of
20661         ArgumentNullException.
20662
20663         Added new check for length == 0, however
20664         I need to make it return String.Empty from the C code.
20665         
20666         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
20667         that calculate the length for us here.
20668         
20669         (mono_string_Internal_ctor_sbytep_int_int): Replaced
20670         mono_string_new_utf16 with mono_string_new, since value is utf8.
20671
20672 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
20673
20674         * object.c: register the object for finalization if needed.
20675         Allocate one more char in the string for the terminating 0 char.
20676
20677 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
20678
20679         * class.c, class.h, image.c: check if a type implemenst a destructor.
20680         Use the proper key for array class lookups.
20681         * icall.c: register the icalls in the System.GC class.
20682         * gc.c, gc.h: GC-related functions and icalls.
20683
20684 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20685
20686         * icall.c:
20687         * socket-io.c:
20688         * unicode.c: free some strings gotten from mono_string_to_utf8 and
20689         changed a couple of free () by g_free ().
20690
20691         * decimal.c: one-liner in the comments for decimal2string ().
20692
20693 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
20694
20695         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
20696
20697 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
20698
20699         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
20700         * object.c (mono_runtime_invoke_array) : handle null in params
20701
20702 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
20703
20704         * string-icalls.c: fixed bug in split (one off bug)
20705
20706 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
20707
20708         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
20709         * icalls.c: added String::Equals as internal method
20710
20711 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
20712
20713         * threads.c: fixed bug in the double interlocked functions
20714
20715 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
20716
20717         * threads.c: implemented all of the new interlocked icalls.
20718         * string-icalls.c: fix a bug in insert.
20719         * icalls.c: added the icalls for interlocked, removed old string functions.
20720         
20721 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20722
20723         * loader.c: fix off-by-one error when reading argument names.
20724
20725 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20726
20727         * profiler.c: win32 counter implementation (untested).
20728         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
20729         (the latter needs testing and more complete impl. from win32 folks).
20730
20731 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
20732
20733         * object.c: mono_array_new_full workaround mono_array_class_get
20734         problem.
20735
20736 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
20737
20738         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
20739         * object.h (mono_string_chars): Changed casting type.
20740
20741 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
20742
20743         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
20744                            method signatures to use gunichar2 instead of gint16.
20745
20746 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
20747
20748         * object.h, object.c: domain-specific versions of mono_object_new and
20749         mono_array_new.
20750
20751 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
20752
20753         * object.c: changed String layout
20754
20755         * string-icalls.c (mono_string_Internal_ctor_chara): added
20756         internal string constructors.
20757
20758 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
20759
20760         * threads.c: pass 'this' to the thread start routine.
20761
20762 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20763
20764         * string-icalls.c: fix IndexOf and LastIndexOf. Now
20765         InternalCompareStr don't call twice mono_string_cmp_char for the last
20766         character. Improved performance in mono_string_cmp_char.
20767
20768 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
20769
20770         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
20771         code into its own library: libmonoruntime.
20772
20773 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
20774
20775         * object.h, object.c: changed array format so that szarrays do not
20776         require a bounds structure.
20777         * icall.c, appdomain.c: support for new szarray format.
20778
20779 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
20780
20781         * metadata.c: compare also the retuns type when comparing signatures:
20782         we didn't do this as an optimization since really overloaded methods
20783         must differ also in the arguments, but this doesn't work with
20784         low-level IL code (or when using explicit conversion operators: see
20785         bug#23498 for an example).
20786
20787 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
20788
20789         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
20790
20791 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
20792
20793         * icall.c: make MonoType::GetElementType its own icall.
20794
20795 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
20796
20797         * icall.c: remove MonoMethod_get_Name().
20798         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
20799         object.
20800
20801 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
20802
20803         * string-icalls.c: optimized a few methods.
20804
20805 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
20806
20807         * icall.c: added all new string internal calls
20808         * string-icalls.c: added, new string internal call implementation.
20809         * object.c: added mono_string_new_size for allocating a string a size
20810
20811 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
20812
20813         * object.c (mono_object_isinst): use the same code as in the
20814         optimized x86 version.
20815
20816 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
20817
20818         * profiler.c: TSC-based timer code (faster and more accurate).
20819         Not hooked up in configure, yet (set USE_X86TSC to 1).
20820
20821 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
20822
20823         * profiler.c, profiler.h: track time spent compiling methods.
20824         * threads.c: track thread creation/destruction.
20825
20826 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
20827
20828         * profiler.c, profiler.h, profiler-private.h: profiling interface
20829         and sample implementation. Moved here so that it can be used also by
20830         the jit.
20831
20832 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
20833
20834         * reflection.c, reflection.h: keep types and other handles separate in
20835         the hash tables for referred tokens. Add guid for modules.
20836
20837 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
20838
20839         * assembly.c: fix bugs found with valgrind.
20840         * metadata.h, metadata.c: added mono_metadata_guid_heap().
20841
20842 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
20843
20844         * threads: added icall support for getting current domain for
20845                    the thread.
20846  
20847 2002-04-13  Martin Baulig  <martin@gnome.org>
20848
20849         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
20850         (MonoDebugVarInfo): Added `index' field for register based addresses.
20851         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
20852         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
20853         `MonoDebugVarInfo *params' and `guint32 this_offset' with
20854         `MonoDebugVarInfo *this_var'.
20855
20856         * debug-symfile.c (relocate_variable): New static function to write
20857         a location description for a local variable or method parameter.
20858
20859 2002-04-12  Martin Baulig  <martin@gnome.org>
20860
20861         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
20862         stack offset and begin/end scope address of a local variable.
20863         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
20864         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
20865         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
20866
20867         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
20868         Added new relocation types for start/end scope of a local variable.
20869
20870 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
20871
20872         * object.h: add mono_object_domain() macro.
20873         * reflection.c: handle typespecs.
20874         * icall.c: MonoMethod::get_Name() implementation.
20875
20876 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20877
20878         * icall.c: String::GetHashCode() icall implementation.
20879
20880 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20881
20882         * icall.c: String::IndexOfAny icall.
20883         * object.c, object.h: make array->max_length more useful.
20884         Intrduced mono_object_class() and mono_string_length() macros.
20885
20886 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20887
20888         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
20889         instead of g_unichar_isdigit.
20890
20891 2002-04-11  Nick Drochak  <ndrochak@gol.com>
20892
20893         * icall.c: Implement a simple Double.ToString().
20894
20895 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20896
20897         * appdomain.h: only io-layer.h is supposed to be included.
20898         * icall.c: explicitly import environ. Fix warning.
20899
20900 2002-04-10  Nick Drochak  <ndrochak@gol.com>
20901
20902         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
20903                 return true even if it's not Daylight Savings time.
20904                 Only return false for the case where the function isn't
20905                 implemented for a plaform (read Windows).
20906
20907 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20908
20909         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
20910         data with a mutex.
20911
20912 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
20913
20914         * mempool.c (mono_mempool_alloc): only use g_malloc when
20915         absolutely necessary.
20916
20917 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
20918
20919         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
20920
20921         * class.c (mono_class_vtable): use domain mempool to allocate vtable
20922         (mono_class_proxy_vtable): use domain mempool
20923
20924 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
20925
20926         * appdomain.h, appdomain.c: split initialization that requires the
20927         execution engine support into mono_runtime_init().
20928
20929 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
20930
20931         * class.c (mono_class_init): don't include vtable inside MonoClass
20932         to save some memory, gather some statistics.
20933         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
20934
20935 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
20936
20937         * icall.c: internalcall implementation for ValueType.Equals().
20938
20939 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
20940
20941         * object.c (mono_message_init): moved 
20942         (mono_runtime_exec_main): new arch. independent impl.
20943         (mono_runtime_invoke_array): new method - like
20944         mono_runtime_invoke, but you can pass an array of objects.
20945         (mono_remoting_invoke): new arch. independent impl.
20946         (mono_message_invoke): new arch. independent impl.
20947         (mono_runtime_class_init): new arch. independent impl.
20948         (mono_runtime_object_init): new arch. independent impl.
20949
20950 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20951
20952         * metadata.c, object.c, reflection.c: documented the exported
20953         functions.
20954
20955 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
20956
20957         * icall.c: simpler code to pass the assembly builder data to corlib.
20958         Implement GetNestedTypes() internalcall.
20959
20960 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
20961
20962         * class.c: warn if a type can't be loaded.
20963
20964 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
20965
20966         * image.h: typedef MonoImageOpenStatus
20967         * types.h: removed unused file
20968         
20969 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
20970
20971         * icall.c: Enum_ToObject accepts enum value arguments.
20972
20973 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
20974
20975         * class.c: move initialization of properties, events and nested
20976         classes, so that they happen for interfaces, too.
20977
20978 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
20979
20980         * icall.c: cleanup some ugly casts in Array_SetValue*.
20981
20982 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20983
20984         * icall.c: the values array fro enums is of the correct type, now.
20985         Implement (correctly) getFullName instead of assQualifiedName for
20986         MonoType.
20987         * reflection.h, reflection.c: added mono_type_get_name ().
20988
20989 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
20990
20991         * assembly.c, image.h: for each MonoImage, record from wich assembly
20992         it was loaded.
20993         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
20994         Make Type.Assembly work.
20995
20996 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
20997
20998         * debug-symfile.h: use char* instead of gpointer to avoid
20999         unnecessary casts.
21000
21001         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
21002
21003         * icall.c (ves_icall_InternalExecute): impl. FielSetter
21004         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
21005
21006 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
21007
21008         * icall.c (mono_message_init): impl. (code cleanup)
21009         (ves_icall_InternalExecute): impl. FieldGetter
21010
21011         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
21012         defined we call all (non-static)methods through the vtable. 
21013
21014 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
21015
21016         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
21017         finalizer even though the memory is still referenced (and the chunk of
21018         memory is not freed).
21019
21020 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
21021
21022         * assembly.c: fix brokeness.
21023
21024 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
21025
21026         * class.c: kill some warnings. Check explicit interface method
21027         implementation also without considering the namespace.
21028         Load also literal strings in static class data.
21029
21030 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
21031
21032         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
21033         (default_assembly_name_resolver): Make the resolver take the
21034         "base" directory where the assembly was originally defined, so we
21035         can load DLLs that are in the same directory as the assembly that
21036         is being referenced.
21037
21038 2002-03-28  Dick Porter  <dick@ximian.com>
21039
21040         * file-io.h: 
21041         * file-io.c:
21042         * socket-io.c: 
21043         * unicode.h: 
21044         * unicode.c: Warning cleanups
21045
21046 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
21047
21048         * object.h, reflection.h: use the correct type instead of MonoObject.
21049
21050 2002-03-28  Martin Baulig  <martin@gnome.org>
21051
21052         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
21053         (mono_debug_update_symbol_file): Initialize classes if necessary.
21054
21055 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
21056
21057         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
21058         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
21059
21060 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
21061
21062         * assembly.h: fix function prototype.
21063         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
21064         * mono-endian.h: use const cast.
21065
21066 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
21067
21068         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
21069
21070 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
21071
21072         * loader.c: don't assert when a typeref can't be loaded, give
21073         a chance to the runtime to trow an exception instead.
21074         * loader.h: fix warning.
21075
21076 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
21077
21078         * class.c (mono_class_proxy_vtable): added proxy support
21079
21080 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
21081
21082         * icall.c: removed last of PAL calls, added System.Environment
21083         * file-io.h, file-io.c: MonoIO implementation
21084         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
21085
21086 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
21087
21088         * appdomain.c: do not use the byte marker in ldstr table lookup.
21089         * debug-helpers.c: allow two ':' to separate class and method name.
21090         * object.c: allocate arrays bounds with the GC, too.
21091         * verify: add a few more checks.
21092
21093 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
21094
21095         * reflection.c: output also literal strings. Allocate parameter data
21096         with GC_malloc() (thanks, Martin, for catching this!).
21097
21098 2002-03-26  Martin Baulig  <martin@gnome.org>
21099
21100         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
21101         include the `this' offset in the `param_offsets'.
21102
21103 2002-03-25  Martin Baulig  <martin@gnome.org>
21104
21105         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
21106         mono_debug_get_class() function to get the classes. Added new
21107         relocation types for arrays and strings.
21108         (mono_debug_get_class): New static function to search in all
21109         referenced assemblies for a metadata token.
21110
21111         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
21112
21113 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
21114
21115         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
21116         hold gc-allocated objects. Make the string heap a stream like the
21117         others. Removed duplicated code when writing stream info.
21118         Added asserts to catch possible buffer overflows. Set the sorted map
21119         for tables that need sorting. Added some documentation.
21120
21121 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
21122
21123         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
21124         for interned strings and vtables.
21125
21126 2002-03-24  Martin Baulig  <martin@gnome.org>
21127
21128         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
21129         it in the array since it was created with g_slist_prepend().
21130
21131 2002-03-24  Martin Baulig  <martin@gnome.org>
21132
21133         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
21134         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
21135         (mono_debug_method_from_token): Renamed to
21136         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
21137         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
21138
21139         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
21140         relocation types.
21141
21142         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
21143
21144 2002-03-24  Martin Baulig  <martin@gnome.org>
21145
21146         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
21147         (mono_debug_method_from_token): New func.
21148
21149         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
21150         New interncall, calls mono_debug_local_type_from_signature().
21151         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
21152         calls mono_debug_method_from_token().
21153
21154 2002-03-23  Martin Baulig  <martin@gnome.org>
21155
21156         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
21157         specifies the number of bytes to be converted, not the array size.
21158         Return the number of chars, not the number of bytes.
21159         (ves_icall_iconv_get_chars): The `byteCount' argument
21160         specifies the number of bytes to be converted, not the array size.
21161
21162 2002-03-23  Martin Baulig  <martin@gnome.org>
21163
21164         * reflection.h (MonoReflectionSigHelper): New type.
21165
21166         * reflection.c (mono_reflection_sighelper_get_signature_local),
21167         (mono_reflection_sighelper_get_signature_local): New functions.
21168
21169         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
21170         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
21171         interncalls.
21172
21173 2002-03-23  Martin Baulig  <martin@gnome.org>
21174
21175         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
21176         is_writeable is set.
21177         (mono_raw_buffer_update): New function to write the modified map
21178         back to disk.
21179
21180         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
21181
21182         * debug-symfile.c (mono_debug_update_symbol_file): Call
21183         mono_raw_buffer_update() when done writing.
21184
21185 2002-03-23  Martin Baulig  <martin@gnome.org>
21186
21187         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
21188
21189         * debug-symfile.c: Added support for arguments and local variables.
21190
21191 2002-03-23  Dick Porter  <dick@ximian.com>
21192
21193         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
21194         protected by ifdefs, hence breaking the w32 build.
21195
21196 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
21197
21198         * object.c: implement is_interned() the right way.
21199
21200 2002-03-21  Martin Baulig  <martin@gnome.org>
21201
21202         * debug-symfile.[ch]: New files to handle debugging information
21203         files. There's also support to dynamically update these symbol
21204         files to include machine dependent information.
21205
21206 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
21207
21208         * threads.c (mono_thread_create): new function to create thread
21209         from C
21210
21211 2002-03-20  Martin Baulig  <martin@gnome.org>
21212
21213         * icall.c (ves_icall_InternalInvoke): Create a new object if the
21214         method is a constructor.
21215         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
21216         points to ves_icall_InternalInvoke().
21217
21218 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
21219
21220         * file-io.c: Flush shouldn't throw exceptions.
21221
21222 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
21223
21224         * file-io.c: FileStream flush support; FileSetLength now
21225         restores file pointer.
21226
21227 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
21228
21229         * class.c: set image for pointer classes.
21230
21231 2002/03/19  Nick Drochak <ndrochak@gol.com>
21232
21233         * sysmath.c: Forgot one.
21234
21235 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
21236
21237         * sysmath.c: Avoid redefining existing names.
21238
21239 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
21240
21241         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
21242         handled by runtime as icall rather than dllimport from libm.so
21243         * file-io.c, file-io.h: fixed handle argument type.
21244
21245 2002-03-18  Dick Porter  <dick@ximian.com>
21246
21247         * reflection.c (mono_image_get_type_info): rename interface to
21248         iface, because of "#define interface struct" on windows.
21249
21250 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
21251
21252         * class.c, class.h: rename and export mono_ptr_class_get().
21253         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
21254         * reflection.c, reflection.h, icall.c: better/saner type name
21255         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
21256         method signatures.
21257
21258 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
21259
21260         * class.c (mono_class_init): removed hardcoded GHC_SLOT
21261
21262         * icall.c (ves_icall_InternalInvoke): impl.
21263
21264 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
21265
21266         * reflection.c: output the interface map table, too.
21267
21268 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
21269
21270         * class.c (class_compute_field_layout): separate computation of 
21271         static field layout
21272
21273 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
21274
21275         * icall.c: added System.Buffer support.
21276         * file-io.c: moved file icalls from PAL to FileStream.
21277
21278 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
21279
21280         * icall.c (ves_icall_System_Object_GetHashCode): impl.
21281
21282 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
21283
21284         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
21285
21286 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
21287
21288         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
21289
21290 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
21291
21292         * debug-helpers.{c,h}: moved here from monograph some useful functions
21293         to locate a method by name/signature in a class or image. Included
21294         also a small and flexible IL disassembler.
21295
21296 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
21297
21298         * reflection.c: fixup tokens in methods with small header size, too.
21299
21300 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
21301
21302         * object.c (mono_string_to_utf8): remove assert(!error), instead
21303         print a warning. 
21304
21305 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
21306
21307         * icall.c: update to the new mono_Array_class_get interface.
21308
21309 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
21310
21311         * appdomain.c, object.c: Boehm-GC enable.
21312         * icall.c: make get_data_chunk() support split data requests.
21313         Ensure a class is initialized in more cases. Return only the first
21314         property found in GetProperties() or the compiler gets confused. 
21315         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
21316         * reflection.h, reflection.c: add fixup mechanism for field and method
21317         tokens. Initialize assembly->typeref in a single place. Output
21318         properties after events. Support custom attributes for events, too.
21319         Typo fix for paramter custom attrs.
21320
21321 2002-03-07  Martin Baulig  <martin@gnome.org>
21322
21323         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
21324
21325 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
21326
21327         * class.c (mono_array_class_get): fix. for multi. dim. arrays
21328
21329 2002-03-06  Martin Baulig  <martin@gnome.org>
21330
21331         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
21332         non-zero lower bounds. See testcases #F10-#F13.
21333
21334 2002-03-05  Martin Baulig  <martin@gnome.org>
21335
21336         * exception.c (mono_get_exception_argument_out_of_range): New exception.
21337
21338         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
21339         ves_icall_System_Array_GetValue(), only calculate the absolute array position
21340         here.
21341         (ves_icall_System_Array_SetValue): Likewise.
21342         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
21343         as argument and does the actual work. This function is used when copying a
21344         multi-dimensional array.
21345         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
21346         now do all the widening conversions of value types.
21347         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
21348
21349 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
21350
21351         * class.c: remove some magic numbers and use the smbolic names,
21352         instead. Added init_events() to load event info at class init time.
21353         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
21354         and mono_metadata_methods_from_event().
21355         * reflection.h, reflection.c: added support for writing out the evnets
21356         related information.
21357
21358 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
21359
21360         * reflection.h, icall.c: use a different method (GetInterfaces)
21361         to gather interface info and add isbyref, isprimitive and
21362         ispointer to the ves_icall_get_type_info() return value.
21363
21364 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
21365
21366         * class.h: stared adding support for events.
21367         * icall.c: split find_members implementation. Added debug icall to get
21368         the address of an object.
21369         * reflection.c: handle TypeBuilders in mono_type_get_object().
21370
21371 2002-03-01  Martin Baulig  <martin@gnome.org>
21372
21373         * icall.c (ves_icall_System_Array_GetLength): This must throw an
21374         ArgumentOutOfRangeException(), not an ArgumentException().
21375         (ves_icall_System_Array_GetLowerBound): Likewise.
21376         (ves_icall_System_Array_GetValue): Improved argument checking.
21377         (ves_icall_System_Array_SetValue): Improved argument checking.
21378
21379 2002-03-01  Martin Baulig  <martin@gnome.org>
21380
21381         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
21382         called with invalid arguments rather than just dying with g_assert().
21383         (ves_icall_System_Array_SetValue): Likewise.
21384         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
21385         raise a NotImplementedException instead.
21386         (ves_icall_System_Array_GetLength): Added argument checking.
21387         (ves_icall_System_Array_GetLowerBound): Added argument checking.
21388
21389 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
21390
21391         * object.h (mono_assert): new macros mono_assert and
21392         mono_assert_not_reached
21393
21394 2002-02-28  Martin Baulig  <martin@gnome.org>
21395
21396         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
21397         and "System::String::IsInterned" to "System::String::_IsInterned".
21398
21399 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
21400
21401         * icall.c: remove hacks for typebuilder. Added icall to create a
21402         modified type from a tybebuilder.
21403         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
21404         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
21405         to create a backing MonoClass for a TypeBuilder.
21406
21407 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
21408
21409         * class.c, class.h: more refactoring of class init.
21410         Export mono_class_setup_mono_type() and mono_class_setup_parent().
21411
21412 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
21413
21414         * marshal.c, marshal.h: start of marshaling interface.
21415
21416 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
21417
21418         * icall.c: fix order in assembly qualified name icall.
21419
21420 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
21421
21422         * class.c: do not free str, since we store it in the hash table.
21423         * reflection.h: add label field to MonoILExceptionInfo.
21424         * reflection.c: handle references to more than one assembly. Handle
21425         case when there isn't a module created in the assembly.
21426
21427 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
21428
21429         * class.c: Fix typo. Start refactoring of class init code.
21430
21431 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
21432
21433         * appdomain.c: exit with 1 on error.
21434         * class.c: we already have the name in MonoClassField.
21435         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
21436         MonoStreamHeader instead of an offset of image->raw_metadata.
21437
21438 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
21439
21440         * appdomain.c (mono_init): Be even more descriptive about the error.
21441
21442 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
21443
21444         * appdomain.c: give the user an informative message when corlib can't
21445         be loaded.
21446
21447 2002-02-26  Martin Baulig  <martin@gnome.org>
21448
21449         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
21450         New icall to get the time zone data.
21451
21452 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
21453
21454         * reflection.c: set virtual and raw size of section correctly.
21455         * threads.c: transfer domain information to newly created threads.
21456
21457 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
21458
21459         * class.c: when instancing a class in a domain, load the default
21460         vaules for static fields from the constant table. Fix System.Enum to
21461         not be an enum.
21462         * icall.c: implement Object::GetType() internalcall. Implemented
21463         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
21464         Fixed checking of binding flags in find_members().
21465         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
21466         * reflection.c: handle enumerations when writing to the constant
21467         table. Use a different object cache for types.
21468
21469
21470 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
21471
21472         * object.c (mono_object_isinst): fix for arrays
21473
21474         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
21475
21476 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
21477
21478         * object.c: don't use mprotect ()  and fix intern pool hash table
21479         lookup for big endian systems.
21480
21481 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
21482
21483         * icall.c: change type_is_subtype_of () signature.
21484
21485 2002-02-21  Mark Crichton  <crichton@gimp.org>
21486
21487         * rand.c, rand.h: Added random number generator for
21488         System.Security.Cryptography classes.
21489
21490         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
21491
21492         * icall.c: Added System.Security.Cryptography calls.
21493
21494 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
21495
21496         * class.c, icall.c, metadata.c: better support for pointer types.
21497         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
21498         * reflection.c: Add support for getting custom attrs for properties
21499         and simplify some code.
21500
21501 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
21502
21503         * icall.c: change getToken () and add custom attribute GetBlob()helper
21504         method.
21505         * reflection.h: add custom attrs array to the reflection builder structures.
21506         * reflection.c: encode and emit custom attributes for all the relevant
21507         reflection objects. Cache fieldref and methodref tokens. Change
21508         mono_image_create_token() interface to take a MonoDynamicAssembly.
21509         More complete custom attributes decoder. Load custom attributes for
21510         Assembly, Field, Method and Constructor objects, too. Make the
21511         returned array an Attribute[] one, not object[]. Added
21512         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
21513         custom attribute constructor.
21514
21515 2002-02-20  Dick Porter  <dick@ximian.com>
21516
21517         * icall.c:
21518         * rawbuffer.c:
21519         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
21520         problem code out for now).
21521
21522 2002-02-19  Radek Doulik  <rodo@ximian.com>
21523
21524         * object.c (mono_ldstr): use hash table to avoid multiple swapping
21525
21526 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
21527
21528         * icall.c: register the GetCustomAttributes method.
21529         * object.c, object.h: add mono_string_new_len ().
21530         * reflection.h, reflection.c: added mono_runtime_invoke(),
21531         mono_install_runtime_invoke(). Added
21532         mono_reflection_get_custom_attrs () to load custom attributes and
21533         create the attribute objects.
21534
21535 2002-02-19  Dick Porter  <dick@ximian.com>
21536         * threads-dummy-types.c:
21537         * threads-dummy-types.h:
21538         * threads-dummy.c:
21539         * threads-dummy.h:
21540         * threads-pthread-types.c:
21541         * threads-pthread-types.h:
21542         * threads-pthread.c:
21543         * threads-pthread.h:  Deleted obsolete files
21544
21545 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
21546
21547         * class.c (mono_class_vtable): runtime init the class when we
21548         allocate static class data.
21549
21550         * icall.c (ves_icall_System_Array_SetValue): check for null values.
21551
21552         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
21553         and String - but we will need generic marshalling support in the
21554         future. 
21555         (mono_init): set the domain name in a ms compatible way
21556
21557         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
21558         String[].
21559
21560 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
21561
21562         * object.c (mono_array_clone): use alloca() instead of g_malloc  
21563         for sizes
21564
21565         * appdomain.c (mono_domain_unload): impl.
21566
21567 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
21568
21569         * appdomain.c, object.c: fix intern pool implementation.
21570         * class.c: fix alignment code.
21571
21572 2002-02-16  Radek Doulik  <rodo@ximian.com>
21573
21574         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
21575         and s2 > s1, just copy lower bytes to be compatible with little
21576         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
21577         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
21578
21579         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
21580         force big_endian to be 1 for big endian machines 
21581         (ves_icall_iconv_new_decoder): ditto
21582
21583 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
21584
21585         * socket-io.c (convert_sockopt_level_and_name): If the system
21586         doesn't define SOL_IP or SOL_TCP, get them by hand using
21587         getprotobyname() and caching the values (because this could be a
21588         slow operation).
21589         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
21590         Use the appropriate struct when the system does support it. Ie,
21591         not all systems have struct ip_mreqn so use struct ip_mreq when
21592         appropriate.
21593
21594 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
21595
21596         * reflection.c: handle finally clauses.
21597
21598 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
21599
21600         * socket-io.c: use g_snprintf() instead of snprintf.
21601
21602 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
21603
21604         * reflection.c (mono_param_get_objects): Cast second argument to
21605         mono_method_get_param_names to a const char** to silence the
21606         compiler warning.
21607
21608         * appdomain.c (mono_domain_assembly_open): Put parens around the
21609         truth statement in the for-loop.
21610
21611         * unicode.c (iconv_convert): Got rid of a compiler warning about
21612         int i being unused when the system has a new iconv.
21613         (iconv_get_length): Same.
21614
21615         * image.c (load_class_names): Cast the second argument to
21616         g_hash_table_insert() to char* to hush compiler warnings about the
21617         arg being a const.
21618         (mono_image_open): Same here.
21619
21620         * socket-io.c: Don't conditionally include sys/filio.h or
21621         sys/sockio.h here anymore since we now get them from
21622         io-layer/io-layer.h
21623         (inet_pton): If the system doesn't support inet_aton, implement
21624         using inet_addr and also #define INADDR_NONE if it isn't defined
21625         by the system.
21626
21627 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
21628
21629         * metadata.c, metadata.h: added function to get packing and size info
21630         of a typedef.
21631         * reflection.h, reflection.c: handle field RVA data. Save info about
21632         the table layout if needed. Assign typedef indexes to all the types
21633         before dumping the info about them to avoid forward reference problems.
21634
21635 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
21636
21637         * socket-io.c (convert_sockopt_level_and_name): ifdef
21638         SO_ACCEPTCONN because it is not defined on my system (old debian)
21639
21640 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
21641
21642         * opcode.c: use stddef.h to get NULL.
21643
21644 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
21645
21646         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
21647         for FIONBIO, FIONREAD and SIOCATMARK.
21648         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
21649         define INADDR_NONE and besides, inet_addr() is deprecated and
21650         should not be used. Use inet_pton() instead - it also has the
21651         added bonus that it can easily handle IPv6 addresses as well.
21652         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
21653
21654 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
21655
21656         * decimal.c: remove _MSC_VER conditional.
21657
21658 2002-02-13  Dick Porter  <dick@ximian.com>
21659
21660         * socket-io.c: 
21661         * icall.c: Internal calls for Blocking, Select, Shutdown,
21662         GetSocketOption and SetSocketOption
21663
21664 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
21665
21666         * assembly.cs: better resolver: use it instead of some kludgy
21667         code.
21668
21669 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
21670
21671         * reflection.c: the best way to speed-up the compiler is to avoid
21672         infinite loops.
21673
21674 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
21675
21676         * class.c (mono_class_vtable): changed the object layout
21677         (obj->vtable->class). 
21678         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
21679
21680 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
21681
21682         * assembly.c: look for assemblies in the assembly dir, too.
21683
21684 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
21685
21686         * class.c: fix thinko in mono_class_from_type().
21687
21688 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
21689
21690         * exception.h, exception.c: added TypeLoadException.
21691         * object.h, object.c: added mono_array_clone ().
21692         * icall.c: handle throwOnError in AssemblyGetType().
21693         Added Array.Clone().
21694         * opcode.h, opcode.c: use a single value for the opcode val.
21695         Compile fix for non-gcc compilers.
21696
21697 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
21698
21699         * opcodes.c, opcodes.h: export interesting info about opcodes.
21700
21701 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
21702
21703         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
21704         icalls. 
21705
21706         * class.c (class_compute_field_layout): set element_class for enums
21707         (mono_class_create_from_typedef): set element_class for normal classes
21708
21709         * icall.c (ves_icall_System_Enum_get_value): impl.
21710
21711         * class.c (mono_class_create_from_typedef): do not set valuetype
21712         flag for System.ValueType and System.Enum
21713
21714 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
21715
21716         * unicode.c (iconv_convert): fix big endian problem.
21717
21718 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
21719
21720         * class.c: add asserts if we are ever going to scribble over memory.
21721         * socket-io.c: not all systems have AF_IRDA defined.
21722
21723 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
21724
21725         * class.c (class_compute_field_layout): do not consider static
21726         fields to compute alignment
21727
21728 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
21729
21730         * appdomain.c (mono_appdomain_get): impl.
21731         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
21732
21733 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
21734
21735         * icall.c: ignore "file://" prefix when loading an assembly.
21736
21737 2002-01-23  Dick Porter  <dick@ximian.com>
21738
21739         * socket-io.c:
21740         * icall.c:
21741         * Makefile.am: Added socket support
21742
21743 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
21744
21745         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
21746         code back.  This should return the assemblies that are loaded by
21747         the runtime on behalf of an application domain. 
21748
21749         The current implementation is still broken, it just returns every
21750         assembly loaded, but until we get real applications domain this
21751         will do.
21752
21753 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
21754
21755         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
21756         AppDomain object.
21757
21758 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
21759
21760         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
21761         the mono_class_from_name lookup.
21762         (ves_icall_get_parameter_info): ditto.
21763         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
21764         method.
21765         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
21766
21767 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
21768
21769         * class.c: load also nested classes on class init.
21770         System.ValueType instance methods gets passed boxed
21771         values, unless methods in derived classed that get a pointer to the
21772         data.
21773         * icall.c: use better name parsing code in GetType().
21774         * image.c, image.h: add mono_image_loaded ().
21775         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
21776         * reflection.c, reflection.h: added mono_reflection_parse_type().
21777
21778 2002-01-22  Veronica De Santis <veron78@interfree.it>
21779
21780         * icall.c : Added mapping of internal calls for Manual and Auto reset events
21781         * threads.c : Added the implementation of internal calls for events
21782         * threads.h : Added prototypes of internal calls for events
21783         
21784 2002-01-21  Radek Doulik  <rodo@ximian.com>
21785
21786         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
21787
21788 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
21789
21790         * class.c (mono_class_init): set min_align to 1 (instead of 0)
21791         (mono_class_value_size): use min_align
21792
21793 2002-01-20  Dick Porter  <dick@ximian.com>
21794
21795         * threads.h:
21796         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
21797         so it compiles on w32.
21798
21799 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
21800
21801         * metadata.c (mono_type_stack_size): impl.
21802
21803         * class.c (mono_class_get_field): impl. memberref token
21804
21805 2002-01-16 Veronica De Santis <veron78@@interfree.it>
21806
21807         * icall.h : Added the internal calls mapping for CreateMutex_internal
21808                     and ReleaseMutex_internal.
21809         * threads.h : Added the prototype of mutexes internal calls.
21810         * threads.c : Added the implementations of mutexes internal calls.
21811
21812 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
21813
21814         * metaparse.h: removed unused file.
21815         * reflection.c, reflection.h: added stream_data_align () function 
21816         to align data in streams and keep stream aligned. Add support for
21817         exception support in method headers.
21818
21819 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
21820
21821         * unicode.c: make iconv_convert () return the number of bytess written
21822         in the output buffer.
21823
21824 2002-01-15  Dick Porter  <dick@ximian.com>
21825         * threads.c: Make the runtime's idea of infinite timeouts coincide
21826         with the class library's
21827
21828         Fix a particularly egregious bug in mono_thread_cleanup(). That
21829         code was so utterly bogus it must have been written on a Monday.
21830
21831 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
21832
21833         * reflection.h: add subtypes field to TypeBuilder.
21834         * reflection.c: encode constants for literal fields.
21835         Handle subtypes. Fix user string token (and add a zero byte)
21836         at the end.
21837         
21838 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
21839
21840         * class.c (mono_class_init): bug fix: assign slot numbers for
21841         abstract methods.
21842
21843 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
21844
21845         * reflection.c: don't try to output a code RVA for abstract methods.
21846         Small fixes for method header format. Output parameter info to the
21847         ParamDef table. Save method overriding info to MethodImpl table.
21848         Fix property support. Allow typedef.extends to be a type in the
21849         building assembly.
21850         * verify.c: fix off-by-one error.
21851
21852 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
21853
21854         * class.c: fix mono_class_from_mono_type () for szarray types.
21855         Remove unused cache check in mono_class_from_type_spec().
21856         * icall.c: *type_from_name () functions handle simple arrays and byref.
21857         * reflection.c: handle byref and szarray types. Handle methods without
21858         body (gets P/Invoke compilation working). Handle types and fields in
21859         get_token ().
21860         * reflection.h: add rank to MonoTypeInfo.
21861
21862 2002-01-10  Dick Porter  <dick@ximian.com>
21863
21864         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
21865         internal calls
21866
21867 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
21868
21869         * icall.c: initialize class in type_from_handle ().
21870         Loop also in parent classes for get_method ().
21871         * reflection.c: properly encode class and valuetype types.
21872         Start on encoding TypeBuilder types. Handle fieldrefs.
21873         Use correct length when registering a user string.
21874         Handle ConstructorBuilder and MonoMethod in get_token ().
21875         Make mono_type_get_object () aware of cached types.
21876         * object.c: back out change to mono_string_new ().
21877
21878 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
21879         * object.c: mono_string_new should return a NULL when the string 
21880         passed in is NULL -- not try to deference it.
21881         
21882 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
21883
21884         * icall.c: hack to make IsSubType work for TypeBuilders.
21885         * reflection.c: emit constructors before methods.
21886         Retrieve param names in mono_param_get_objects().
21887
21888 2002/01/05  Nick Drochak  <ndrochak@gol.com>
21889
21890         * Makefile.am: fix list of headers and sources so automake 1.5
21891         doesn't complain. Removed \# at end of list.
21892
21893 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
21894
21895         * reflection.c: get token for a method ref. Set return type of
21896         constructor to void.
21897         * loader.c: debug message.
21898         * class.c: typo fix.
21899
21900 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
21901
21902         * icall.c: fix array init with rank > 1. FindMembers
21903         loops in parent class as well.
21904         * image.c: do not insert nested types in name cache.
21905         * reflection.c: warning fix.
21906         * reflection.h: add override method (for interface impl).
21907
21908 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
21909
21910         * metadata.c: fix customattr decoding.
21911
21912 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
21913
21914         * rawbuffer.cs: Added native Win32 implementation, avoids using
21915         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
21916
21917 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
21918
21919         * class.c: make the low-level routines handle the cache.
21920
21921 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
21922
21923         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
21924
21925 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
21926
21927         * class.c: fix mono_array_element_size() for objects.
21928         * class.h, class.c: add properties to MonoClass and load them
21929         at init time.
21930         * icall.c: check with isinst() when assigning a value to an array
21931         instead of requiring the classes to match exactly.
21932         Implemented icall for System.Type::GetType().
21933         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
21934         enums. Handle bindingflags when looking for methods and fields.
21935         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
21936         and mono_metadata_methods_from_property().
21937         * reflection.h, reflection.c: added structures for propreties,
21938         parameters and enums. Implemented mono_property_get_object() and
21939         mono_param_get_objects().
21940
21941 2001-12-18  Dick Porter  <dick@ximian.com>
21942
21943         * file-io.c: Use mono_string_to_utf16() instead of
21944         mono_string_chars()
21945
21946         * object.c: Added mono_string_to_utf16(), which copies the non
21947         NULL-terminated MonoString into a new double-null-terminated
21948         buffer.
21949
21950 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
21951
21952         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
21953
21954 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
21955
21956         * file-io.c: raise exceptions if handle is invalid.
21957
21958 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
21959
21960         * assembly.c: yet another check for mscorlib.
21961         * class.c, class.h: load nesting info for classes.
21962         * icall.c: many new functions to support the Reflection classes.
21963         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
21964         * reflection.h, reflection.c: mono_image_create_token(),
21965         mono_assembly_get_object(), mono_type_get_object(),
21966         mono_method_get_object(), mono_field_get_object(): methods to return
21967         objects that parallel the C representation of assemblies, types,
21968         methods, fields.
21969
21970 2001-12-11  Dick Porter  <dick@ximian.com>
21971
21972         * icall.c:
21973         * file-io.c: Internal calls for file IO.
21974
21975 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
21976
21977         * tabledefs.h: missing FileAttributes.
21978         * verify.h, verify.c: use is_valid_string () to simplify and check for
21979         valid strings more correctly. Fix warnings and speeling.
21980         Check more tables: Filed, File, ModuleRef, StandAloneSig.
21981         Check code: branches, maxstack, method calls.
21982
21983 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
21984
21985         * object.c (mono_object_allocate): removed static, so that the jit
21986         can allocate value types.
21987
21988         * icall.c (ves_icall_System_DateTime_GetNow): impl.
21989
21990 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
21991
21992         * class.c: init enum types right away and register the
21993         token->MonoClass map in mono_class_create_from_typedef ().
21994         * verify.h, verify.c: first cut of the verifier.
21995         * pedump.c: add --verify switch to verify metadata tables.
21996         * tabledefs.h: add some missing enums.
21997
21998 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
21999
22000         * class.c (mono_install_runtime_class_init): impl.
22001         (mono_class_init): renamed mono_class_metadata_init to
22002         mono_class_init, also removed the metadata_inited flag
22003
22004         * object.c (mono_object_isinst): use faster algorithm
22005
22006 2001-11-30  Radek Doulik  <rodo@ximian.com>
22007
22008         * mono-endian.h: reverted last change
22009         added function prototypes
22010
22011         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
22012         add mono-endian.c back
22013
22014         * mono-endian.c: returned back, as Paolo pointed out, it's needed
22015         for unaligned access, I've mistaked it with endianess. I am
22016         sorry.
22017         (mono_read16): fix reverted endianess
22018         (mono_read64): ditto
22019         (mono_read32): ditto
22020
22021 2001-11-30  Dick Porter  <dick@ximian.com>
22022
22023         * exception.c: Implement mono_exception_from_name()
22024
22025 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
22026
22027         * metadata.h, metadata.c: remove params_size and locals_size and their
22028         calculation from the metadata code: they are only usefult to the
22029         interp.
22030
22031 2001-11-29  Radek Doulik  <rodo@ximian.com>
22032
22033         * object.c (mono_ldstr): swap bytes here, it's probably not the
22034         best place, but works for me now, I'll redo it once I know mono
22035         better, also note that I add PROT_WRITE and don't reset back, also
22036         note that it's only affects big endians, so x86 should be OK
22037
22038         * mono-endian.h (read16): use just glib macros for both endians
22039
22040         * mono-endian.c: removed as glib macros are used in in
22041         mono-endian.h so we don't need to care about endianess for read
22042         macros as glib does that for us already
22043
22044 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
22045
22046         * class.h, class.h: take minimum alignment into consideration so
22047         that the fields of a class remain aligned also when in an array.
22048
22049 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
22050
22051         * loader.h, loader.c: add mono_method_get_param_names().
22052         * class.c: 0-init class fields.
22053
22054 2001-11-26  Dick Porter  <dick@ximian.com>
22055
22056         * icall.c:
22057         * threads-types.h:
22058         * threads.c: New file that handles System.Threading on all platforms
22059
22060         * object.c: 
22061         * object.h: Remove the synchronisation struct from MonoObject,
22062         replace it with a pointer that gets initialised on demand
22063
22064         * Makefile.am: Replace all the system-specific threading code with
22065         a single file that uses the new wrapper library
22066
22067 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
22068
22069         * class.c, class.h: add mono_install_trampoline() so that the runtime
22070         can register a function to create a trampoline: removes the ugly
22071         requirement that a runtime needed to export arch_create_jit_trampoline.
22072         * object.h, object.c: added mono_install_handler() so that the runtime
22073         can install an handler for exceptions generated in C code (with
22074         mono_raise_exception()). Added C struct for System.Delegate.
22075         * pedump.c: removed arch_create_jit_trampoline.
22076         * reflection.c: some cleanups to allow registering user strings and
22077         later getting a token for methodrefs and fieldrefs before the assembly
22078         is built.
22079         * row-indexes.h: updates and fixes from the new ECMA specs.
22080
22081 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
22082
22083         * class.h, class.c: add enum_basetype field to MonoClass.
22084         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
22085         to get index in the constant table reated to a field, param or
22086         property.
22087         * reflection.h, reflection.c: handle constructors. Set public-key and
22088         version number of the built assembly to 0.
22089         * row-indexes.h: update from new ECMA spec.
22090
22091 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
22092
22093         * class.h, class.c: add a max_interface_id to MonoClass.
22094         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
22095         since it's used to do that. Added mono_type_type_from_obj().
22096         Make GetType() return NULL instead of segfaulting if the type was not
22097         found. Handle simple arrays in assQualifiedName.
22098         * object.h: add a struct to represent an Exception.
22099         * reflection.c: output call convention in method signature.
22100         Add code to support P/Invoke methods and fixed offsets for fields.
22101
22102 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
22103
22104         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
22105         the value.
22106         * icall.c: use mono_array_addr instead of array->vector: fixes the
22107         reflection image writing.
22108         * reflection.c: init call convention byte to 0 in method signature.
22109         Encode the property signature. Don't output property-related methods
22110         twice. Really process the properties for a type (don't cast a field to
22111         a property, my mom always told me that).
22112         Fix 64 bit issues in pointer alignment in a different and more
22113         readable way.
22114
22115 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
22116
22117         * loader.h: Removed type class from MonoDefaults, added monotype
22118
22119         * loader.c: Loaded MonoType, removed loading of Type
22120
22121         * icall.c (my_mono_new_object): Now returns a System.MonoType,
22122         and fills in System.Type._impl with a RuntimeTypeHandle rather
22123         than the actual MonoClass *
22124
22125         (ves_icall_type_from_handle): change from type_class to
22126         monotype_class
22127
22128         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
22129         implemented
22130
22131         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
22132         implemented
22133
22134         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
22135
22136         (ves_icall_System_Reflection_Assembly_GetType): implemented
22137
22138         (ves_icall_System_MonoType_assQualifiedName): implemented
22139
22140         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
22141
22142 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
22143
22144         * assembly.c (mono_assembly_open): Implement a cache for the
22145         assemblies. 
22146
22147         (mono_assembly_close): only destroy the assembly when the last
22148         reference is gone.
22149         
22150 2001-11-09  Dick Porter  <dick@ximian.com>
22151
22152         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
22153
22154 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
22155
22156         * class.c (mono_class_metadata_init): bug fix: compute the right slot
22157
22158 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
22159
22160         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
22161         from Martin Weindel.
22162         * object.h: add mono_string_chars ().
22163
22164 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
22165
22166         * reflection.c (build_compressed_metadata): Eliminates warnings
22167         and uses 64-bit clean code.
22168
22169         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
22170         (mono_type_equal): Change signature to eliminate warnings.
22171
22172 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
22173
22174         * icall.c, loader.c: remove the internalcall array constructors.
22175         Changes to match the new MonoArray structure.
22176         * object.h, object.c: an array object doesn't allocate an extra
22177         vector. Add mono_array_new_full () to create jagged arrays easily.
22178
22179 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
22180
22181         * metadata.h, metadata.c: add mono_metadata_field_info () to
22182         retreive all the info about a field from vairous tables.
22183         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
22184         * class.h, class.c: augment MonoClassField with more info.
22185         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
22186         policy and load a field's RVA if needed.
22187
22188 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
22189
22190         * class.c (mono_class_metadata_init): create a trampoline for all
22191         virtual functions instead of actually compiling them.
22192
22193 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
22194
22195         * class.h, class.c: include name in MonoClassField.
22196         * class.c: fix fundamental type of System.Object and System.String.
22197         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
22198         tokens in ldtoken.
22199         * icall.c: remove internalcalls for the Reflection stuff that is now
22200         done in C# code.
22201         * loader.c: mono_field_from_memberref () implementation.
22202         * mono-endian.c: thinko (s/struct/union/g).
22203         * object.c, object.h: make the mono_string_* prototypes actually use
22204         MonoString instead of MonoObject.
22205         * reflection.c, reflection.h: updates for changes in the reflection
22206         code in corlib: we use C structures that map to the actual C# classes.
22207         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
22208         fat method header if needed and use the info from the ILGenerator for
22209         methods. Handle fields in types. Misc fixes.
22210
22211 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
22212
22213         * class.c (mono_class_metadata_init): bug fix: always allocate
22214         space for static class data
22215
22216 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
22217
22218         * class.c (mono_compute_relative_numbering): use relative
22219         numbering to support fast runtime type checks.
22220
22221 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
22222
22223         * class.c (mono_class_create_from_typeref): added debugging output
22224         to print class name when MonoDummy is returned instead of real class
22225
22226 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
22227
22228         * class.c (mono_class_metadata_init): interface offset table now
22229         contains pointers into the vtable - this is more efficient for the jit
22230
22231 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
22232
22233         * class.c (mono_class_metadata_init): use a temporary vtable (the
22234         old algorithm only worked for the interpreter, but not for the jit)
22235
22236 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
22237
22238         * loader.c (method_from_memberref): use mono_class_get to get the
22239         class of an array instead of using System.Array directly.
22240         (mono_get_method): also add MEMBERREF methods to the method cache
22241         which usefull for arrays.
22242
22243 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
22244
22245         * pedump.c (arch_compile_method): added to compute vtable entry
22246
22247         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
22248         number of interfaces.
22249         
22250         * class.h: merged MonoArrayClass into MonoClass
22251
22252         * class.c (mono_class_create_from_typedef): compute the vtable size and
22253         allocate space to include the vtable inside MonoClass
22254         (mono_class_metadata_init): initialize the vtable
22255
22256 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
22257
22258         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
22259         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
22260         * image.c: endian fixes by Laurent Rioux.
22261         * object.h, object.c: rename MonoStringObject to MonoString and
22262         MonoArrayObject to MonoArray. Change some function names to conform to
22263         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
22264         guint16* as first argument, so don't use char*.
22265         Provide macros to do the interesting things on arrays in a portable way.
22266         * threads-pthread.c: updates for the API changes and #include <sched.h>
22267         (required for sched_yield()).
22268         * icall.c: updates for the API changes above.
22269         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
22270         platforms that need them.
22271
22272 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
22273
22274         * class.c: set the correct type for all the fundamental
22275         type when loading the class.
22276
22277 2001-10-05  Dick Porter  <dick@ximian.com>
22278
22279         * threads-pthread.c (pthread_mutex_timedlock): Simple
22280         compatibility version for C libraries that lack this call.
22281
22282 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
22283
22284         * class.c: MonoTypes stored in MonoClass are stored as
22285         fundamental MonoTypes when the class represents a
22286         fundamental type (System.Int32, ...).
22287         The TypeHandle return by ldtoken is a MonoType*.
22288         * icall.c: ves_icall_get_data_chunk () write out all the
22289         PE/COFF stuff. Implement ves_icall_define_method (),
22290         ves_icall_set_method_body (), ves_icall_type_from_handle ().
22291         * image.c: properly skip unknown streams.
22292         * loader.h, loader.c: add type_class to mono_defaults.
22293         * metadata.c, metadata.h: export compute_size () as
22294         mono_metadata_compute_size () with a better interface.
22295         Typo and C&P fixes.
22296         * pedump.c: don't try to print the entry point RVA if there is no entry point.
22297         * reflection.c, reflection.h: many cleanups, fixes, output method
22298         signatures and headers, typedef and typeref info, compress the metadata
22299         tables, output all the heap streams, cli header etc.
22300         * row-indexes.h: typo fixes.
22301
22302 2001-10-04  Dick Porter  <dick@ximian.com>
22303
22304         * object.h: Add a synchronisation mutex struct to MonoObject
22305
22306         * object.c (mono_new_object): Initialise the object
22307         synchronisation mutexes
22308
22309         * icall.c: System.Threading.Monitor internal calls
22310         
22311         * threads-pthread.h:
22312         * threads-pthread.c: System.Threading.Monitor internal calls
22313
22314         * threads-types.h: New file, includes the system-specific thread
22315         structures
22316         
22317         * threads-pthread-types.h:
22318         * threads-pthread-types.c: New files, handle pthread-specific
22319         synchronisation types
22320
22321         * threads-dummy-types.h: 
22322         * threads-dummy-types.c: New files of dummy support for
22323         thread-specific types
22324
22325         * metadata.c:
22326         * image.c:
22327         * pedump.c: include mono-endian.h not endian.h
22328         
22329         * Makefile.am: More threads files.
22330         Name mono-endian.h not endian.h
22331
22332 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
22333
22334         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
22335         stuff and implement a few more bits.
22336         * icall.c: a field needs to be dereferenced twice. Do not use the same
22337         name for two variables in the same scope.
22338         * image.c, image.h: cleanups.
22339
22340 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
22341
22342         * class.c (mono_class_metadata_init): bug fix: compute the right size
22343
22344 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
22345
22346         * icall.c: implemented some of the Reflection internalcalls.
22347         * image.c, image.h: start writing out the PE/COFF image.
22348         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
22349         that does the reverse than decode_blob_size ().
22350         * object.c: use mono_metadata_encode_value (). Move here
22351         temporary implementation of mono_string_to_utf8 ().
22352         * rawbuffer.c: make malloc_map static.
22353
22354 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
22355
22356         * metadata.c: fix type comparison for arrays.
22357         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
22358         Added a couple of new classes to monodefaults.
22359         * icall.c: added a couple of Reflection-related internalcalls.
22360         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
22361         Added a byval_arg MonoType to MonoClass.
22362
22363 2001-09-28  Dick Porter  <dick@ximian.com>
22364
22365         * icall.c:
22366         * threads-pthread.h: 
22367         * threads-pthread.c: Implemented internal calls for
22368         LocalDataStoreSlot operations.  Applied mutexes around all shared
22369         data.  Reworked the thread creation and Start() operations to
22370         avoid a race condition.
22371         
22372         * threads-dummy.h:
22373         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
22374
22375 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
22376
22377         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
22378
22379 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
22380
22381         * class.c, loader.c: warn and return NULL instead of erroring out.
22382         * icall.c: added System.AppDomain::getCurDomain().
22383         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
22384
22385 2001-09-25  Dick Porter  <dick@ximian.com>
22386
22387         * threads-pthread.h:
22388         * threads-pthread.c: Implemented timed thread joining and added
22389         System.Threading.Thread::Join_internal internal call
22390
22391         * icall.c: Added System.Threading.Thread::Join_internal internal call
22392
22393         * threads-dummy.h:
22394         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
22395
22396 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
22397
22398         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
22399         mono_string_intern () to implement the semantics of the ldstr opcode
22400         and the interning of System.Strings.
22401         * icall.c: provide hooks to make String::IsIntern and String::Intern
22402         internalcalls.
22403
22404 2001-09-23  Dick Porter  <dick@ximian.com>
22405
22406         * threads-dummy.c: 
22407         * threads-dummy.h: New files of dummy threading routines
22408
22409         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
22410         support code based on system specifics
22411
22412         Rename PTHREAD_LIBS to THREAD_LIBS
22413         
22414 2001-09-23  Dick Porter  <dick@ximian.com>
22415
22416         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
22417         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
22418         internal calls.
22419         (mono_thread_init): Set up a Thread object instance to return when
22420         the main thread calls Thread.CurrentThread
22421         (mono_thread_cleanup): Wait for all subthreads to exit
22422
22423         * icall.c: New internal calls for System.Threading.Thread::Sleep
22424         (including Schedule) and CurrentThread
22425
22426         * threads.h: New file, to insulate thread-specific stuff from the
22427         rest of the code
22428
22429 2001-09-21  Dick Porter  <dick@ximian.com>
22430
22431         * threads-pthread.h: 
22432         * threads-pthread.c: New file, for handling pthreads-style
22433         threading support.  Start() now starts a new thread and executes
22434         the ThreadStart delegate instance.
22435
22436         * icall.c: Added the internalcall for
22437         System.Threading.Thread::Start_internal
22438
22439         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
22440
22441 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
22442
22443         * loader.c: work around the different signatures for delegates
22444         constructors csc generates in compiled code vs the ones compiled in mscorlib.
22445
22446 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
22447
22448         * class.h, class.c: add mono_class_get_field_from_name ().
22449         * *: Fix C comments and other ANSI C issues.
22450
22451 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
22452
22453         * endian.h, assembly.c: fix some endianness issues.
22454
22455 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
22456
22457         * loader.h, load.c: add delegate_class to mono_defaults.
22458         Handle runtime provided methods in mono_get_method ().
22459
22460 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
22461
22462         * loader.c (mono_get_method): use pinvoke for internal call
22463
22464         * icall.c: use pinvoke for internal call
22465
22466         * loader.c (method_from_memberref): set the method name
22467
22468 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
22469
22470         * metadata.c: help the compiler generate better code for
22471         mono_class_from_mono_type ().
22472
22473 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
22474
22475         * class.c (mono_class_metadata_init): delayed computing of the
22476         class size to mono_class_metadata_init ()
22477
22478 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
22479
22480         * class.c, class.h: add an interfaces member to MonoClass.
22481         * image.c, image.h: add assembly_name field to MonoImage
22482         from the assembly table.
22483         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
22484
22485 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
22486
22487         * class.c: Handle Array in mono_class_from_mono_type ().
22488         * metadata.c, pedump.c: some endian fixes.
22489
22490 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
22491
22492         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
22493         * metadata.c: fix small problem introduced with the latest commit.
22494
22495 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
22496
22497         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
22498         We don't need a MonoMetadata pointer anymore to compare signatures in
22499         mono_metadata_signature_equal (), update callers.
22500         Reduced memory usage an number of allocations for MonoMethodHeader and
22501         MonoMethodSignature.
22502
22503 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
22504
22505         * metadata.c: added compare for szarray.
22506
22507 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
22508
22509         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
22510         and add a couple more types to it and mono_defaults. Give an hint on
22511         classes that need implementing in our corlib and are referenced
22512         in mscorlib.
22513
22514 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
22515
22516         * class.h, class.c: keep track if a class is also an Enum.
22517         * loader.c: Implement a couple more types for use in libffi
22518         marshalling. Gives better diagnostics when failing to dlopen
22519         a library. Set method->klass for P/Invoke methods, too.
22520
22521 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
22522
22523         * class.c, class.h: add a MonoType this_arg to MonoClass that
22524         represents a pointer to an object of the class' type that
22525         can be used by the interpreter and later the type cache.
22526         Add best guess alignment info for valuetype objects.
22527
22528 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
22529
22530         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
22531         into MonoType: one less level of indirection and allocation and
22532         simplifies quite a bit of code. Added cache for MonoTypes that are
22533         used frequently, so that we don't need to allocate them all the time.
22534
22535 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
22536
22537         * class.c (mono_class_create_from_typedef): System.Enum is also a
22538         value type, although it does not derive from System.ValueType
22539         (maybe a bug in the ms compiler?)
22540
22541         * metadata.c (mono_type_size): return the right size for value types
22542
22543         * loader.c (mono_get_method): only initialize method header if not abstract
22544
22545         * class.c (mono_class_from_mono_type): use mono_default values. 
22546
22547 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
22548
22549         * *: use MonoClass pointers instead of <type_tokens>
22550         
22551         * class.h: new flag: metadata_inited.
22552
22553         * class.c (mono_class_metadata_init): impl.
22554         (mono_class_instance_size): impl.
22555         (mono_class_data_size): impl.
22556
22557 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
22558
22559         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
22560         MonoClass now has the name and name_space fields. 
22561         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
22562         mono_get_method () takes and optional MonoClass as argument.
22563         Removed mono_typedef_from_name() and added mono_class_token_from_name()
22564         instead that takes advantage of a map from class names to typedef
22565         tokens in MonoImage.
22566
22567 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
22568
22569         * metadata.c: zero is not a valid alignment boundary.
22570         Merge MONO_TYPE_VOID in default decoding code.
22571
22572 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
22573
22574         * image.h: merged MonoMetadata into MonoImage
22575
22576         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
22577         identify the type of elements.
22578
22579 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
22580
22581         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
22582         * cil-coff.h: split MonoMSDOSHeader and add size info.
22583         * image.c: add some consistency checks.
22584         * metadata.c: fix row size computation: one programmer
22585         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
22586         add explanation for the locator routine.
22587         Fix decoding of size in method header.
22588         
22589 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
22590
22591         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
22592         (g_concat_dir_and_file): Bring g_concat_dir_and_file
22593         function from gnome-libs.  This uses the right path separator
22594         based on the OS, and also works around a bug in some systems where
22595         a double slash is not allowed. 
22596         (default_assembly_name_resolver): Use g_concat_dir_and_file
22597         (mono_assembly_open): ditto.
22598
22599 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
22600
22601         * metadata.c (mono_metadata_signature_equal): impl.
22602
22603         * *: void is now a realy MonoType (instead of using NULL)
22604         
22605         * metadata.c (do_mono_metadata_parse_type): use
22606         mono_metadata_parse_type to parse void value.
22607
22608 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
22609
22610         * metadata.c, metadata.h: in the signature and method header store
22611         only the space required for holding the loca vars and incoming arguments.
22612
22613 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
22614
22615         * metadata.c (do_mono_metadata_parse_type): treat void like any
22616         other type (instead of assigning NULL);
22617
22618 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
22619
22620         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
22621
22622 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
22623
22624         * image.c (do_mono_image_open): added a cache for arrays.
22625
22626 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
22627
22628         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
22629         decode a single column from a row in a metadata table and changes
22630         to take advantage of it in the typedef locator (gives a nice speed up).
22631         Store offset info for function params.
22632
22633 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
22634
22635         * image.h (MONO_IMAGE_IS_CORLIB): removed 
22636
22637 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
22638
22639         * assembly.c: how could mono_assembly_close () had ever worked?
22640         * metadata.c, metadata.h: provide offset info for local vars.
22641         Implement mono_type_size () to take care of alignment as well
22642         as size (it was mono_field_type_size in cli/class.c before).
22643
22644 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
22645
22646         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
22647
22648         * assembly.h (CORLIB_NAME): set to corlib.dll
22649
22650         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
22651
22652 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
22653
22654         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
22655         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
22656         tokentype.h: massive namespace cleanup.
22657
22658 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
22659
22660         * metadata.h, metadata.c: decode exception clauses when parsing method header.
22661
22662 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
22663
22664         * metadata.c (mono_metadata_free_type): added check for type !=
22665         NULL (void) before calling mono_metadata_free_type()
22666
22667 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
22668
22669         * metadata.h, row_indexes.h: added header with enumerations to use
22670         to index in the columns from tables in metadata and to decode coded
22671         tokens: we should start using this instead of embedding magic numbers
22672         all over the code.
22673
22674 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
22675
22676         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
22677         Move metadata_t info from cli_image_info_t to MonoImage, where
22678         it's easily accessible. Changed all the uses accordingly.
22679         Added the method and class caches to MonoImage.
22680         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
22681         and mono_metadata_decode_value () signature to be more consistent
22682         with the other parse functions (and simplify code). Taken advantage
22683         of zero-length array allocation with GCC. Removed reduntant (and
22684         wrong) MonoFieldType struct and use MonoParam instead. Changed
22685         mono_metadata_parse_field_type () to use common code for parsing.
22686         Added mono_metadata_typedef_from_field () and
22687         mono_metadata_typedef_from_method () to lookup a typedef index from a
22688         field or method token.
22689         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
22690
22691 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
22692
22693         * metadata.c (mono_metadata_parse_field_type): Implement. 
22694         (do_mono_metadata_parse_type): Split engine from
22695         mono_metadata_parse_type, so that we can create smaller structures
22696         for things that just have one pointer to the MonoType (look at
22697         the MonoFieldType)
22698
22699 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
22700
22701         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
22702         as Jan Gray found out, it is incorrect. 
22703
22704 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
22705
22706         * assembly.c: Implement asssembly loading.  This loads an image
22707         and loads all the referenced assemblies.  Come to think of it, we
22708         could always do lazy loading of the assemblies. 
22709
22710         * image.c (mono_image_open): Keep loaded images in a hashtable.
22711
22712         * image.h (MonoImage): Add reference count.
22713
22714 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
22715
22716         * assembly.c (mono_assembly_open): Keep track of the file name in
22717         case the assembly has no ASSEMBLY table.
22718
22719         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
22720         from get.c here.
22721
22722 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
22723
22724         * metadata.c, metadata.h: decode local vars in method header
22725         parse function. Change callers accordingly.
22726
22727 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
22728
22729         * metadata.h, cil-coff.h: protect against multiple inclusion.
22730         Added some new structures to hold information decoded from metadata:
22731         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
22732         and relevant decoding/free functions.
22733         * metadata.c: implement decoding functions. Add warning for out of bounds
22734         index in mono_metadata_locate(). Implement mono_get_method () to retreive
22735         all the info about a method signature and invocation. Remove check on
22736         uninitialized local var in parse_mh() and fix memory leak.
22737
22738 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
22739
22740         * metadata.h: More macros.
22741
22742         * tokentype.h: New file.
22743
22744 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
22745
22746         * assembly.c: added a consistency check and initialize
22747         some structures with g_new0().
22748         * metadata.c: fixed a couple more bugs in table size computation
22749         and add other checks for out-of bound access to metadata.
22750
22751 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
22752
22753         * metatada.c: fix bugs computing table sizes. Spew a
22754         warning when index in string heap is out of bounds.
22755
22756 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
22757
22758         * metadata.h: Add a couple of macros to manipulate tokens. 
22759
22760 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
22761
22762         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
22763         cli_section_tables).
22764
22765 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
22766
22767         * metadata.c (mono_metadata_user_string): New function, provides
22768         access to the UserString heap. 
22769
22770 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
22771
22772         * metadata.c: Add inline documentation.
22773
22774 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
22775
22776         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
22777         files. 
22778
22779 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
22780
22781         * typeattr.h: New file, TypeAttribute flags. 
22782
22783 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
22784
22785         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
22786         mono_assembly_ensure_section): Section loading code.
22787         (load_section_tables): Load the sections.
22788
22789         * mono/metadata/metadata.c (mono_metadata_locate_token,
22790         mono_metadata_locate): Functions to locate the information
22791         definition given a token or a table and an index.
22792         (mono_metadata_compute_table_bases): New.
22793         (compute_size): New function to compute the sizes of the various
22794         tables.
22795
22796         * mono/metadata/metadata.h: Finish listing the different index
22797         types. 
22798
22799         * mono/metadata/pedump.c: Improve to dump new information.
22800
22801 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
22802
22803         * mono/metadata/metadata.c: Entered all the tables matching
22804         Beta2. 
22805
22806         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
22807
22808
22809