2006-05-04 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
2
3         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
4
5         * marshal.c (mono_marshal_cleanup): New cleanup function.
6
7         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
8         image mempools.
9
10         * class.c (mono_class_init): Fix leaking class->nested_classes.
11
12         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
13
14         * image.c (mono_image_init): Initialize the new cashes.
15
16         * image.c (mono_image_close): Destroy the new cashes.
17
18         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
19
20         * mempool.c (mono_mempool_strdup): New helper function.
21
22         * class-internals.h: Add prototype for mono_loader_unlock ().
23
24         * domain.c (mono_jit_info_table_find): Fix a warning.
25         (mono_debugger_check_runtime_version): Ditto.
26
27         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
28         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
29         functions to these modules.
30
31         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
32         metadata modules.
33         
34         * marshal.c (mono_free_bstr): Fix a warning.
35
36         * assembly.c (mono_assembly_open_full): Fix another small leak.
37
38         * object.c: Fix some unload leaks in the remoting code.
39
40         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
41         function.
42
43         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
44
45         * reflection.c: Fix some unload leaks in dynamic assemblies.
46
47 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
48
49         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
50         * marshal.h: Add BSTR support on Win32
51         * icall.c: Add BSTR icalls
52         * metadata.h: Add BSTR enums
53
54 2006-04-26  Miguel de Icaza  <miguel@novell.com>
55
56         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
57         boolean parameter and instead pass the information on `options'
58         parameter (FileOptions).
59
60         * icall.c: Register the new signature for MonoIO.Open.
61
62         * debug-helpers.c (dis_one): Trying to understand how coverity
63         works.  Fix Run 5, item 78.
64
65 2006-04-26  Dick Porter  <dick@ximian.com>
66
67         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
68         dereference.
69
70 2006-04-25  Martin Baulig  <martin@ximian.com>
71
72         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
73
74         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
75         debugger_thread_created().
76         (debugger_gc_push_all_stacks): Don't handle the main thread in any
77         special way.
78         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
79         (mono_debugger_finalize_threads): New function; undo the effects
80         of mono_debugger_init_threads().
81         (mono_debugger_create_all_threads): Removed.
82
83 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
84
85         * image.c (mono_image_close): Tidy up trace messages.
86
87         * assembly.c (mono_assembly_close): Ditto.
88
89         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
90         no longer references an already freed assembly. Fixes #78168.
91
92 2006-04-21  Dick Porter  <dick@ximian.com>
93
94         * threads.c (mono_thread_detach): Fix reference counting when
95         detaching threads.
96
97 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
98
99         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
100         #78155.
101
102 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
103
104         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
105         (mono_type_to_stind): Ditto.
106
107         * marshal.c: Use the new helper functions to simplify code.
108
109         * image.c (mono_image_close): Add some code for help debug assembly unloading
110         problems.
111
112         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
113         image mempool.
114
115         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
116         assembly was already loaded in another appdomain. Fixes #78083.
117
118 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
119
120         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
121         referenced assemblies.
122         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
123
124         * domain.c (mono_domain_free): Add a trace message.
125
126         * appdomain.c (add_assemblies_to_domain): Ditto.        
127
128         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
129         field.  
130
131 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
132
133         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
134
135 2006-04-12  Martin Baulig  <martin@ximian.com>
136
137         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
138         `USE_INCLUDED_LIBGC'.   
139
140 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
141
142         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
143         the patch contains ../ and a small directory name later. Hopefully fixes
144         #78035.
145
146 2006-04-10  Martin Baulig  <martin@ximian.com>
147
148         Clean up the debugger's thread-handling code.
149
150         The debugger's thread-handling code has been moved from
151         ../mini/debug-debugger.c to threads.c.  We now iterate directly
152         over the `threads' hash, keep track of exiting threads and also
153         use proper locking.
154
155         We can now debug XSP and XSP based applications with the debugger.
156
157         * object-internals.h (MonoThread): Added `gpointer end_stack'.
158
159         * threads.h
160         (MonoThreadCallbacks): Removed; this was only used by the debugger.
161         (mono_install_thread_callbacks): Likewise.      
162
163         * threads.c (mono_thread_callbacks): Removed.
164         (debugger_thread_created, debugger_thread_exited): New static functions.
165         (start_wrapper): Call debugger_thread_created().
166         (thread_cleanup): Call debugger_thread_exited().
167         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
168         (mono_debugger_init_threads): New public function.
169         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
170         iterate directly over the `threads' hash and also use proper locking.
171
172         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
173
174         * mono-debug-debugger.h
175         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
176
177 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
178
179         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
180         argument type=array. Fixes #78057.
181
182 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
183
184         * culture-info-table.h : regenerated. Fixed bug #69652.
185
186 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
187
188         * loader.c metadata.c: Reapply a variant r59116.
189         
190         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
191
192         * class.c (mono_class_setup_interface_offsets): New internal function.
193
194         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
195         interfaces too. Fixes #77398.
196
197         * reflection.c (encode_cattr_value): Add support for 
198         parameter type=object, argument type=array.
199         (load_cattr_value): Ditto. Fixes #77916.
200
201         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
202         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
203
204         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
205         a byval char array and CharSet is Ansi.
206
207         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
208
209 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
210
211         * metadata.c: Add some locking comments.
212         
213         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
214         mempool.
215         (mono_metadata_free_method_signature): Don't free the signature itself.
216
217         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
218
219         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
220         reference the same MonoImage.
221         (mono_assembly_load_from_full): Add an assert.
222
223 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
224
225         * image.c (mono_image_close): Don't put the image we are about to free into the
226         loaded_images_guid_hash.
227
228         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
229         to reduce code duplication.
230
231         * marshal.c: Register the native functions called by this module as icalls, to
232         somewhat centralize the creation of MonoMethodSignature's.
233
234         * loader.c (mono_method_signature): Add a cache for method signatures.
235
236         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
237         the parameter attributes of a method.
238         (mono_metadata_parse_method_signature_full): Refactored the computation of
239         parameter attributes into a separate function. Also avoid one allocation in
240         most cases.
241
242         * assembly.c (mono_assembly_close): Ditto.
243
244         * image.c (mono_image_close): Log trace messages with INFO level.
245
246         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
247
248         * image.c reflection.c: Correct reference counting of image modules.
249         
250         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
251         of this function from the image mempool.
252         
253         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
254         to allow more cached types to be used.
255
256         * mono-debug.c (mono_debug_add_method): Appled patch from
257         David S. Miller  <davem@sunset.davemloft.net>: Access 
258         minfo->lexical_blocks[] entry elements using read32().
259
260 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
261
262         * loader.c (mono_free_method): No longer free the method header for non-dynamic
263         methods as it is allocated from the mempool.
264
265         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
266         image mempool.
267
268         * metadata-internals.h: Add comments describing the reference counting scheme
269         used for MonoImage and MonoAssembly.
270
271         * image.c assembly.c reflection.c: Rework reference counting of images and 
272         assemblies so they are freed when the runtime is shut down. Free some 
273         additional memory structures when an image is unloaded.
274         
275 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
276
277         * class.c loader.c reflection.c: Allocate more data structures in
278         the image mempool.
279
280 2006-03-31  Miguel de Icaza  <miguel@novell.com>
281
282         * icall.c
283         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
284         build on pre glib 2.4 systems.
285
286 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
287
288         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
289
290         * icall.c: Fix some warnings.
291
292 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
293
294         * culture-info-table.h : regenerated.
295
296 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
297
298         * threads.c, object-internals.h, verify.c: changed the culture caching
299         code to use a normal MonoArray for storage so the GC can keep track of
300         them easily. Fixed bits of the cache logic, too and simplified the
301         code.
302
303 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
304
305         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
306         thread for non-Boehm GCs.
307
308 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
309
310         * domain.c, object.c, domain-internals.h: reduce the amount of memory
311         needed to keep track of the data for static fields.
312
313 2006-03-29  Raja R Harinath  <rharinath@novell.com>
314
315         Fix #75172
316         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
317         for interface classes.  Use 'num_methods' instead.
318         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
319         before using '->vtable_size' field.
320
321 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
322
323         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
324         doesn't contain managed pointers, so use a normal hashtable.
325
326 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
327
328         * reflection.c, class-internals.h, domain.c: fixed handling of types
329         used as values for objects in custom attributes (bug #77915):
330
331 2006-03-24  Martin Baulig  <martin@ximian.com>
332
333         * class.c (mono_class_setup_fields): Added support for generic
334         instances; fixes #77580.
335
336 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
337
338         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
339
340 2006-03-24  Dick Porter  <dick@ximian.com>
341
342         * file-io.c (get_file_attributes): More stat macro breakage.
343         Fixes bug 77759.
344
345 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
346
347         * profiler.c: added the file=filename option in the default profiler
348         to output the profile data to filename.
349
350 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
351
352         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
353         bug #77877.
354
355 2006-03-22  Martin Baulig  <martin@ximian.com>
356
357         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
358         allocated `MonoClassField *' in `fb->handle'.
359
360 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
361
362         * class.c, image.c, metadata-internals.h: implemented new mechanism to
363         allocate interface ID to save memory and allow better ID reuse on
364         appdomain unload. setup_generic_vtable () removal from Martin.
365
366 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
367
368         * object.h, appdomain.c, domain.c, exception.c, icall.c,
369         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
370         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
371         write barriers for reference stores with managed objects accessed with
372         C structures in the runtime and in embedding programs.
373
374 2006-03-20  Raja R Harinath  <rharinath@novell.com>
375
376         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
377         'interface_id' and 'max_interface_id' fields of MonoClasses
378         representing open generic types.
379
380 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
381
382         * object.h, object.c, icall.c: added functions to deal with
383         storing valuetypes that contain references in managed objects.
384         * reflection.c, string-icalls.c, threads.c, marshal.c: small
385         fixes and comments around uses of mono_array_addr ().
386
387 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
388
389         * object.h, icall.c, monitor.c: object.GetHashCode ()
390         implementation that supports the moving garbage collector.
391
392 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
393
394         * icall.c, threads-types.h, threads.c: implemented finalizer for
395         LocalDataStoreSlot.
396
397 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
398
399         * metadata.c (mono_type_size): Add a fixme.
400         (mono_type_stack_size): Ditto.
401
402         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
403         'type_forwarders' field.
404
405         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
406         attribute from net 2.0.
407
408         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
409         from class.c.
410
411         * class.c (mono_class_setup_fields): Fix a warning.
412         
413         * class.c (mono_class_from_name): Add support for assemblyref entries
414         in the EXPORTEDTYPE table.
415
416         * reflection.c: Add support for handling type forwarders under net 2.0.
417
418         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
419         
420 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
421
422         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
423         overwriting entries in ModuleBuild->types, also clean up the code
424         a little. Fixes #77774.
425
426 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
427
428         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
429         load friend assembly info when present.
430
431 2006-03-14  Raja R Harinath  <rharinath@novell.com>
432
433         Fix crasher on gtest-158.cs.
434         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
435         the return value if the MonoClass we want is yet in an
436         inconsistent state.
437         * class.c (mono_class_create_from_typedef): Add an comment
438         explaining an order dependency between mono_class_setup_parent and
439         mono_class_setup_mono_type.
440
441 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
442
443         * class.c: documentation updates and events bug fix.
444
445 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
446
447         * class.c: some cleanup, locking fixes.
448
449 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
450
451         * class.c: fix the generics code to setup nested
452         type info to the instantiated type (bug #77770).
453
454 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
455
456         * marshal.c: fixed a few type correctness issues.
457
458 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
459
460         * loader.c: the Set/Get/Addrtess array methods should be public.
461
462 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
463
464         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
465         
466         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
467         info->wrapper.
468
469 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
470
471         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
472
473         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
474
475         * mempool.c (mono_mempool_alloc): Speed this up a bit.
476         (mono_mempool_alloc0): Ditto.
477
478 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
479
480         * socket-io.c:
481         (create_object_from_sockaddr): it was allocating 4 extra bytes
482         for the AF_UNIX data. Fixes bug #77747.
483
484 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
485
486         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
487
488 2006-03-09  Dick Porter  <dick@ximian.com>
489
490         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
491         Fixes bug 76966 again.
492
493 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
494
495         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
496         names from r57532
497         * appdomain.c: Bumped corlib version to 48 (due to r57532)
498
499 2006-03-07  Martin Baulig  <martin@ximian.com>
500
501         * object.c
502         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
503
504 2006-03-07  Martin Baulig  <martin@ximian.com>
505
506         * class.c
507         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
508         regression introduced in r56970; see gtest-252.cs.
509
510         * loader.c (mono_get_method_constrained): Correctly handle generic
511         methods; see gtest-253.cs.
512
513 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
514
515         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
516
517 2006-03-04  Martin Baulig  <martin@ximian.com>
518
519         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
520         compute the parent type at runtime, just like we're already doing
521         it for interfaces.
522
523         * reflection.c
524         (mono_reflection_bind_generic_parameters): Don't compute the
525         parent type anymore.
526
527         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
528
529 2006-03-04  Martin Baulig  <martin@ximian.com>
530
531         * mono-debug-debugger.h
532         (mono_debugger_create_notification_function): Allocate memory at
533         runtime and return a pointer to it.
534
535 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
536
537         * assembly.c: Fix windows build.
538         
539         * assembly.c: Fix build.
540
541         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
542
543         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
544         
545 2006-03-03  Dick Porter  <dick@ximian.com>
546
547         * process.c
548         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
549         Check parameters before dereferencing them.  Fixes Aaron's part of
550         bug 77393.
551
552 2006-03-03  Raja R Harinath  <rharinath@novell.com>
553
554         Fix performance regression.
555         * loader.c (find_method_in_class): Add 'from_class' argument.
556         Rename 'klass' argument to 'in_class'.  The signature is compared
557         against the method in 'in_class', and the corresponding method is
558         returned from 'from_class'.
559         (find_method): Walk both 'in_class' and 'from_class' in parallel.
560         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
561         type definition and generic instantiation in parallel.
562         (mono_get_method_constrained): Update to changes.
563
564 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
565
566         * threads.c: make sure the domain is correct, too when doing
567         mono_thread_attach ().
568
569 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
570
571         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
572         windows. Fixes #77683.
573
574 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
575
576         * object.h, *: introduced specific way to set elements of an array
577         of references to be used as write barrier. Still need to audit the
578         uses of mono_array_addr.
579
580 2006-03-01  Miguel de Icaza  <miguel@novell.com>
581
582         * object-internals.h: New field to cache the assmebly name, patch
583         from Tambet Ingo (tambet@ximian.com)
584
585 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
586
587         * decimal.h, class-internals.h, metadata-internals.h,
588         file-io.h: mark a few function declarations as internal, to
589         reduce the number of PLT entries.
590
591 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
592
593         * file-io.c: fix typo in warning message.
594
595 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
596
597         * loader.c: on unix, lookup the "*A" version of a function
598         if charset is auto as a second option before failing.
599
600 2006-02-28  Raja R Harinath  <rharinath@novell.com>
601
602         * class.h (mono_class_inflate_generic_method): Revert to two
603         argument version.
604         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
605         (mono_class_inflate_generic_method_full): Add.
606         * class.c (mono_class_inflate_generic_method_full): Rename from
607         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
608         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
609         * loader.c, reflection.c: Update to changes.
610
611 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
612
613         * icall.c: const fixes and small improvements.
614
615 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
616
617         * threadpool.c: for asynchronous connect(), enable the same workaround
618         for BSD 6 as for the Mac. Fixes bug #77637.
619
620 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
621
622         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
623         formatted classes. Fixes #77524.
624
625 2006-02-24  Raja R Harinath  <rharinath@novell.com>
626
627         * class.c (inflate_generic_type): Add a couple more
628         micro-optimizations.
629         (inflate_generic_context): Don't use the 'gmethod' from
630         'inflate_with'.
631         (mono_class_inflate_generic_method): If the method has generic
632         parameters, but the passed-in context doesn't have a 'gmethod',
633         create one.  Use the possibly simplified generic instantiation
634         from the declaring class instead of the one passed in.
635
636 2006-02-24  Raja R Harinath  <harinath@gmail.com>
637
638         Make generic method signature and method header handling lazy.
639         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
640         (inflate_generic_header): Likewise.
641         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
642         parameter to avoid inflating types.
643         (mono_get_inflated_method): Empty out.
644         * class.h (mono_class_inflate_generic_method): Update to changes.
645         * loader.c (mono_get_method_from_token): Don't parse signature for
646         generic methods, nor methods of generic classes.
647         (mono_method_signature): Rename from 'mono_method_signature'.
648         Inflate signature on demand.
649         (mono_method_get_header): Inflate method header on demand.
650         * reflection.c: Update to changes.
651
652 2006-02-23  Raja R Harinath  <rharinath@novell.com>
653
654         * metadata.c (mono_metadata_inflate_generic_inst): If the
655         instantiation is closed, don't bother expanding it in the new
656         context.
657         * class.c (inflate_generic_class): If the generic instantiation
658         doesn't change after inflation, return the argument itself.
659         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
660         Add bounds checks.
661         (inflate_generic_context): If neither the generic class nor the
662         generic method instantiations change, return the original context.
663         * reflection.c (mono_method_get_object): Do
664         'mono_get_inflated_method' before accessing the ->klass field.
665         (inflate_mono_method): Don't create a MonoGenericMethod unless
666         necessary.
667         (inflate_method): Don't pass a constructed type as the declaring
668         type of a methodbuilder.
669
670 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
671
672         * object.c: fix memory overwrite.
673
674 2006-02-22  Dick Porter  <dick@ximian.com>
675
676         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
677         it doesn't work any more.
678         (mono_threads_request_thread_dump): Fix unused variable warnings.
679
680 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
681
682         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
683         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
684         the public header file.
685
686 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
687
688         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
689
690 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
691
692         * class-internals.h, object.c: reduce the size of MonoVTable
693         and store the interface_offsets array at negative offsets.
694
695 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
696
697         * metadata.c: tweak table descriptors data structures to reduce
698         size and runtime relocations.
699
700 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
701
702         * marshal.c: fix some types and opcodes to be type-safe
703         in marshaling wrappers.
704
705 2006-02-21  Ankit Jain  <jankit@novell.com>
706
707         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
708
709 2006-02-21  Raja R Harinath  <rharinath@novell.com>
710
711         * metadata.c (get_constraints): Relax debugging checks for monodis.
712
713 2006-02-21  Ankit Jain  <jankit@novell.com>
714
715         * metadata.c (mono_metadata_load_generic_params): Move the code
716         checking for ambiguous generic params from here to mono/dis/get.c
717         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
718
719 2006-02-21  Raja R Harinath  <harinath@gmail.com>
720
721         Fix assertion triggered when compiling nemerle.
722         * class.c (mono_get_shared_generic_inst): Rename from
723         get_shared_inst and make non-static.
724         * loader.c (mono_get_shared_generic_method): New.  Used to create
725         the MonoGenericContext-equivalent of a MonoGenericContainer.
726         (mono_get_method_from_token): Initialize the 'context' field of
727         the created MonoGenericContainer.
728         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
729         * metadata.c (get_constraints): Add sanity check.
730         * class-internals.h: Add new internal methods.
731
732         * reflection.c (verify_safe_for_managed_space): New sanity check.
733         Currently checks that owner-less generic parameters aren't allowed
734         in managed space.
735         (mono_type_get_object): Use it.
736         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
737         that are now in mono_type_get_object.
738         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
739
740 2006-02-19  Raja R Harinath  <harinath@gmail.com>
741
742         * metadata.c (mono_type_create_from_typespec): Rename from
743         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
744         argument and caching of types in the generic container.
745         (unwrap_arrays, find_generic_param): Remove.
746         * metadata-internals.h: Update.
747         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
748
749 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
750
751         * class.c (mono_class_get_exception_for_failure): Fix a warning.
752
753         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
754         return values. Fixes #77581.
755
756         * class.c (mono_fnptr_class_get): Switch name and name_space.
757
758         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
759         classes and add support for [In, Out] attributes.
760         (mono_marshal_free_asany): Ditto. Fixes #77524.
761
762 2006-02-18  Raja R Harinath  <harinath@gmail.com>
763
764         * class.c (mono_class_from_generic_parameter): Make more robust to
765         incomplete MonoGenericContainers from monodis.
766
767 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
768
769         * class-internals.h: added some more exception types.
770         * class.c, metadata.c: added a few checks to handle missing
771         types.
772
773 2006-02-17  Raja R Harinath  <rharinath@novell.com>
774
775         Use owner-less generic-params some more.
776         * class.c (my_mono_class_from_generic_parameter): Remove.
777         (mono_class_from_generic_parameter): Handle null image,
778         param->name and param->owner.
779         (mono_class_from_mono_type): Update.
780         (mono_class_create_from_typespec): Remove 'container' parameter.
781         If that parameter is non-null, the result is always inflated by
782         'mono_class_get_full' anyway.
783         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
784         parameter.
785         (mono_class_get_full): Update.
786
787         * class.c (inflate_generic_type) [GENERICINST]: If the generic
788         instance is not open, don't bother inflating.
789         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
790         parse metadata for inflated classes.
791         (_mono_class_get): Change GenericContext* parameter to
792         GenericContainer*.
793         (mono_class_create_from_typespec): Likewise.  Simplify, and
794         implement trivially.  All the cases are handled in
795         mono_class_from_mono_type.  Don't inflate returned class.
796         (mono_class_get_full): Delegate GENERICINST optimization to
797         inflate_generic_type.
798         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
799
800 2006-02-16  Dick Porter  <dick@ximian.com>
801
802         * socket-io.c (create_object_from_sockaddr): Fix typo.
803         (create_sockaddr_from_object): Check array lengths before
804         potentially accessing items off the end.
805         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
806         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
807         (ves_icall_System_Net_Sockets_Socket_Send_internal)
808         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
809         length checks to avoid wraparound overflows.
810         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
811         contents of the array of sockets
812         (hostent_to_IPHostEntry2)
813         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
814         Check return value of inet_ntop ().
815         (addrinfo_to_IPHostEntry): Fix typo
816
817 2006-02-16  Raja R Harinath  <rharinath@novell.com>
818
819         Type metadata parsing doesn't use generic-instantiation information.
820         * metadata.c (mono_metadata_parse_array_full): Change
821         MonoGenericContext* parameter to MonoGenericContainer*.
822         (mono_metadata_parse_type_full): Likewise.
823         (mono_type_create_from_typespec_full): Likewise.
824         (mono_metadata_parse_mh_full): Likewise.
825         (mono_metadata_parse_generic_inst): Likewise.
826         (do_mono_metadata_parse_generic_class): Likewise.
827         (do_mono_metadata_parse_type): Likewise.
828         * metadata-internals.h: Update to changes.
829         * class.c (mono_class_find_enum_basetype): Likewise.
830         (mono_class_setup_fields): Likewise.
831         (mono_class_create_from_typespec): Likewise.
832         * loader.c (method_from_methodspec): Likewise.
833         (mono_get_method_from_token): Likewise.
834         (mono_method_get_header): Likewise.
835
836 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
837
838         * marshal.c: handle additional GENERICINST case (patch from
839         Thong Nguyen <tum@veridicus.com>).
840         Fix a few cases where LDIND_I/STIND_I was used for references.
841
842 2006-02-16  Raja R Harinath  <rharinath@novell.com>
843
844         * reflection.c (mono_reflection_get_token): Remove unused variable.
845
846 2006-02-16  Martin Baulig  <martin@ximian.com>
847
848         * reflection.c (mono_reflection_get_token): Add support for fields
849         in instantiated generic types.
850
851         * icall.c
852         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
853
854 2006-02-15  Martin Baulig  <martin@ximian.com>
855
856         * icall.c
857         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
858         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
859         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
860         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
861
862 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
863
864         * class.c, metadata.c, metadata.h, object.c, icall.c,
865         marshal.c: changed mono_type_get_underlying_type () to do
866         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
867         Fixed handling of instantiated generic valuetypes (bug #75479).
868
869 2006-02-15  Raja R Harinath  <rharinath@novell.com>
870
871         * metadata.c (mono_metadata_decode_signed_value): Simplify.
872         Delegate to mono_metadata_decode_value, and work on the returned value.
873
874         * icall.c (ves_icall_MonoType_GetGenericArguments):
875         Add consistency check here too.
876         
877 2006-02-15  Ankit Jain  <jankit@novell.com>
878
879         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
880         char/short etc.
881
882 2006-02-15  Ankit Jain  <jankit@novell.com>
883
884         * metadata.c (mono_metadata_decode_signed_value): New function to decode
885         signed values, used only for representing lower bounds of arrays.
886         (mono_metadata_parse_array_full): Use new
887         mono_metadata_decode_signed_value to decode lower bounds.
888
889 2006-02-14  Martin Baulig  <martin@ximian.com>
890
891         * reflection.c
892         (mono_reflection_get_token): Support "MonoGenericMethod" and
893         "MonoGenericCMethod" and allow generic instances / methods.
894
895 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
896
897         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
898         to obtain the terminal size using an ioctl.
899
900         * object.c (mono_nullable_init): Revert this as nullable reference
901         types are not valid.
902         (mono_nullable_box): Ditto.
903
904 2006-02-09  Dick Porter  <dick@ximian.com>
905
906         * threads.c (mono_thread_detach): Drop a reference to the thread
907         we're detaching.
908
909 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
910
911         * object.c (mono_nullable_init): Handle nullable reference types.
912         (mono_nullable_box): Ditto. Fixes #77446.
913
914 2006-02-07  Martin Baulig  <martin@ximian.com>
915
916         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
917
918 2006-02-07  Ankit Jain  <jankit@novell.com>
919
920         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
921         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
922         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
923         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
924         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
925         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
926
927 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
928
929         * class.c (mono_class_create_generic): Set type_token as well.
930
931         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
932         compatible with MS.
933
934 2006-02-02  Martin Baulig  <martin@ximian.com>
935
936         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
937         has never been used so far.
938
939 2006-02-02  Martin Baulig  <martin@ximian.com>
940
941         * mono-debug-debugger.h: Changed comment at the top of this file;
942         the header is not installed, but it's safe to #include it from
943         within the JIT.
944
945         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
946         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
947
948 2006-02-02  Martin Baulig  <martin@ximian.com>
949
950         * mono-debug.h
951         (MonoSymbolTable): Removed the `metadata_info' field.
952
953         * mono-debug.c
954         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
955
956         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
957         (mono_debugger_add_builtin_types): Removed.
958         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
959         (mono_debugger_create_notification_function): We now operate on a
960         pre-allocated area; take a `gpointer' and return `void'.
961
962         * mono-debug-debugger.c
963         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
964         (mono_debugger_add_builtin_types): Removed.
965
966 2006-02-02  Martin Baulig  <martin@ximian.com>
967
968         * threads.c (mono_debugger_create_all_threads): New public method.
969
970 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
971
972         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
973         breaks on several platforms.
974
975 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
976
977         * assembly.c: the VS.NET build doesn't supply default values for
978         MONO_ASSEMBLIES and MONO_CFG_DIR.
979
980 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
981
982         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
983         helper function.
984
985         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
986
987         * loader.c (method_from_memberref): Fix a warning.
988
989         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
990
991         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
992         with explicit layout. Fixes #77433.
993
994 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
995
996         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
997         max_interface_id is initialized before using it. Fixes #77398.
998         (ves_icall_Type_GetInterfaces): Ditto.
999
1000 2006-01-30  Raja R Harinath  <rharinath@novell.com>
1001
1002         * metadata.c (mono_metadata_parse_method_signature_full): Don't
1003         allocate memory for parameter attributes when parsing memberref
1004         signatures.
1005         * loader.c (mono_loader_set_error_method_load): Don't warn.
1006         (method_from_memberref): Ensure MissingMethodException gets thrown
1007         if method is not found.  Make warning more informative.
1008
1009 2006-01-29  Raja R Harinath  <harinath@gmail.com>
1010
1011         Fix #77397
1012         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
1013         return true if is byref.
1014         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1015         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
1016         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1017
1018 2006-01-27  Raja R Harinath  <rharinath@novell.com>
1019
1020         Fix tests/find-method.2.il
1021         * loader.c (find_method, find_method_in_class): Remove is_inflated
1022         argument.  Revert 2006-01-18 change.
1023         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
1024         is generic, search for method in its generic definition.
1025         * class.c (mono_class_setup_vtable_general): Print generic
1026         arguments of generic types in debugging printf.
1027
1028 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
1029
1030         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
1031
1032         * threads.c (mono_threads_request_thread_dump): New helper function.
1033
1034 2006-01-25  Raja R Harinath  <rharinath@novell.com>
1035
1036         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
1037
1038 2006-01-25  Ankit Jain  <jankit@novell.com>
1039
1040         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
1041         move definition to ..
1042         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
1043         
1044 2006-01-25  Ankit Jain  <jankit@novell.com>
1045             Raja R Harinath  <rharinath@novell.com>
1046
1047         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
1048         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
1049         as necessary.
1050
1051 2006-01-25  Martin Baulig  <martin@ximian.com>
1052
1053         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
1054         `MonoDebuggerThread' into debug-debugger.c.
1055
1056 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1057
1058         * profiler.c: fix printing of data.
1059
1060 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
1061
1062         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
1063           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
1064
1065 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1066
1067         * object.c: fix deadlock related to string interning.
1068
1069 2006-01-23  Martin Baulig  <martin@ximian.com>
1070
1071         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1072
1073         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
1074
1075 2006-01-23  Martin Baulig  <martin@ximian.com>
1076
1077         * mono-debug.h: Moved the prototypes of some functions which are
1078         used by the JIT here from mono-debug-debugger.h.
1079
1080 2006-01-21  Martin Baulig  <martin@ximian.com>
1081
1082         * Makefile.am: Don't install mono-debug-debugger.h.
1083
1084 2006-01-21  Martin Baulig  <martin@ximian.com>
1085
1086         * mono-debug-debugger.h: Enforce the private status of this header
1087         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
1088         Moved some stuff from mono-debugger-jit-wrapper.h here.
1089
1090 2006-01-20  Raja R Harinath  <rharinath@novell.com>
1091
1092         * class.c (mono_class_from_typeref): Add a sanity test to help
1093         catch lack of assembly load/search hooks.
1094
1095 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
1096
1097         * marshal.c (emit_struct_conv): Relax the fields with same offset
1098         check even more. Fixes #77230.
1099
1100 2006-01-18  Martin Baulig  <martin@ximian.com>
1101
1102         * loader.c (find_method_in_class): Added `gboolean is_inflated'
1103         argument; if false, we compare the uninstantiated signatures.
1104         (method_from_memberref): Compare the uninstantiated signatures;
1105         fixes #76417.
1106
1107 2006-01-18  Robert Jordan  <robertj@gmx.net>
1108
1109         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
1110         Clear the weak link. Fixes bug #77170.
1111
1112         * gc.c (mono_gchandle_free):
1113         Reflect *-gc.c changes (tiny optimization).
1114
1115 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
1116
1117         * metadata.c (mono_metadata_signature_dup): Applied patch from
1118         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
1119         Fixes #77288.
1120
1121 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
1122
1123         * marshal.c (emit_struct_conv): Allow fields with the same offset when
1124         marshalling from native to managed code. Fixes #77230.
1125
1126 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1127
1128         * threadpool.c: fix problem (Mac only) when more than one asynchronous
1129         connect. Fixes bug #77020.
1130
1131 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1132
1133         * class.c: fixed id assignement for nested interfaces (bug #77275).
1134         Added also better info for --print-vtable debugging.
1135
1136 2006-01-12  Martin Baulig  <martin@ximian.com>
1137
1138         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
1139         interfaces on-the-fly; fixes #76625.
1140
1141         * class-internals.h
1142         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
1143         don't need that anymore.
1144
1145 2006-01-12  Miguel de Icaza  <miguel@novell.com>
1146
1147         * socket-io.c
1148         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
1149         To avoid initing the nested_classes when not needed I turned the
1150         PeerCredData as a toplevel internal class, as it has to be shared
1151         anyways. 
1152
1153         Fixes the CASA issue.
1154
1155 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
1156
1157         * domain.c: Accessors for MonoJitInfo
1158
1159         * profiler-private.h: Add jitinfo to the end jit hook
1160
1161         * profiler.[ch]: Define new hooks, called after jitting which give
1162         the MonoJitInfo that was compiled
1163
1164 2006-01-10  Martin Baulig  <martin@ximian.com>
1165
1166         * class.c (mono_class_setup_events): Add support for generic
1167         classes; fixes #76440.
1168
1169 2006-01-06  Raja R Harinath  <rharinath@novell.com>
1170
1171         Fix #77160.
1172         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
1173         on passed-in method.
1174
1175 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
1176
1177         * object.c (mono_runtime_invoke_array): Add Nullable support.
1178
1179         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
1180
1181 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
1182
1183         * file-io.c: Don't consider sockets as directory and avoid an endless
1184         loop. Fix bug #76966.
1185
1186 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
1187
1188         * object.c (mono_nullable_init): New helper function.
1189         (mono_nullable_box): Ditto.
1190
1191         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
1192
1193         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
1194
1195         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
1196         
1197 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
1198
1199         * class.c (mono_class_is_assignable_from): Make T assignable to 
1200         Nullable<T>.
1201
1202 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
1203
1204         * appdomain.c: Bump corlib version to 46.
1205         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
1206         serialization purpose) and changed ves_icall_System_Reflection_
1207         Assembly_get_code_base signature to accept a boolean (to escape, or 
1208         not, the assembly code base).
1209
1210 2005-12-23  Dick Porter  <dick@ximian.com>
1211
1212         * icall.c: 
1213         * threads-types.h: 
1214         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
1215         CreateEvent icall now returns "created" boolean parameter.
1216
1217 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
1218
1219         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
1220         #76967.
1221
1222         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
1223         when attr_klass is an interface. Fixes #77045.
1224
1225 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
1226
1227         * marshal.c (emit_struct_conv): Fix previous patch.
1228         
1229         * marshal.c (emit_struct_conv): Add a check for fields with the same
1230         offset.
1231
1232 2005-12-20  Raja R Harinath  <rharinath@novell.com>
1233
1234         Fix regression in Mono.C5.
1235         * class.c (mono_class_create_generic): If 'klass' is an interface
1236         set up the interface offsets.
1237         (mono_class_is_assignable_from): Don't throw away generic arguments.
1238
1239 2005-12-19  Raja R Harinath  <rharinath@novell.com>
1240
1241         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
1242         type parameters.
1243
1244 2005-12-15  Raja R Harinath  <rharinath@novell.com>
1245
1246         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
1247         dead store.
1248         (do_mono_metadata_parse_generic_class): Don't pass the current
1249         generic context when parsing the type being instantiated: it
1250         cannot use it, anyway.
1251
1252         * loader.c (method_from_memberref): Don't inflate a signature if
1253         it doesn't contain any type parameters.
1254
1255 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
1256
1257         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
1258
1259 2005-12-14  Martin Baulig  <martin@ximian.com>
1260
1261         * class.c
1262         (mono_type_get_name_recurse): Don't return null for type
1263         parameters and open generic classes.
1264         (mono_class_setup_methods): Don't exclude generic instances.
1265         (mono_get_unique_iid): Use different IDs for different
1266         instantiations of the same generic type.
1267         (mono_class_setup_vtable): Only use setup_generic_vtable() for
1268         open generic instances; create a normal vtable for closed generic
1269         instances.
1270         (mono_class_setup_vtable_general): We're now also called for
1271         closed generic instances.
1272
1273         * reflection.c
1274         (mono_reflection_bind_generic_parameters): Correctly use
1275         mono_metadata_lookup_generic_inst() everywhere.
1276
1277 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
1278
1279         * object.c (mono_class_create_runtime_vtable): Call 
1280         mono_class_setup_vtable ().
1281
1282         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
1283         function.
1284         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
1285         #76959.
1286
1287         * loader.c (mono_loader_set_error_type_load): Print the type load
1288         warnings to the console so they are more visible to the user.
1289         (mono_loader_set_error_method_load): Ditto.
1290
1291         * reflection.c (ensure_runtime_vtable): Revert the last change as it
1292         is still broken.
1293         
1294         * reflection.c (ensure_runtime_vtable): Fix build.
1295
1296         * reflection.c (ensure_runtime_vtable): Disable an optimization which
1297         doesn't work in all cases.
1298
1299 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
1300
1301         * object.c (mono_array_new_full): Treat a single dimensional array
1302         with 0 lower bounds as an szarray. Fixes #76973.
1303
1304         * reflection.c (custom_attr_visible): Really fix this.
1305
1306 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
1307
1308         * reflection.c (custom_attr_visible): Allow nested public attributes
1309         as well.
1310
1311         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
1312         interface check.
1313
1314 2005-12-12  Raja R Harinath  <harinath@gmail.com>
1315
1316         * class.c (set_generic_param_owner): Delete.
1317         (mono_class_create_from_typedef): Don't set ->owner field of
1318         generic parameters to "param containers" of enclosing classes.
1319         * reflection.c (mono_reflection_initialize_generic_parameter):
1320         Likewise.
1321
1322 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
1323
1324         * reflection.c (custom_attr_visible): Fix build.
1325
1326 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
1327
1328         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
1329         private attributes.
1330         
1331         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
1332         handling of null parameter defaults.
1333
1334 2005-12-09  Raja R Harinath  <rharinath@novell.com>
1335
1336         * class.c (mono_class_from_generic_parameter): Don't set
1337         klass->generic_container.
1338         (my_mono_class_from_generic_parameter): Likewise.
1339
1340 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
1341
1342         * reflection.c (load_public_key): Fix a warning.
1343         (method_encode_code): Fix unaligned accesses.
1344
1345 2005-12-07  Martin Baulig  <martin@ximian.com>
1346
1347         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
1348
1349         * reflection.c
1350         (write_generic_param_entry): Encode our custom attrs.
1351
1352         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
1353
1354 2005-12-07  Martin Baulig  <martin@ximian.com>
1355
1356         * reflection.c (encode_new_constraint): Removed; we don't use the
1357         `NewConstraintAttribute' anymore.
1358
1359 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
1360
1361         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
1362         not fire a TypeResolve event when Assembly.GetType () is called.
1363
1364 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
1365
1366         Beginning of support for nullable types in the runtime. Parts of
1367         this patch are from Martin.
1368
1369         * appdomain.c (MONO_CORLIB_VERSION): Bump
1370
1371         * domain.c (mono_init_internal): get the nullable type
1372
1373         * class.c (mono_class_is_nullable): New method
1374         (mono_class_get_nullable_param): New mehod
1375         (mono_class_create_generic): In types T? set cast_class to T
1376
1377         * class-internals.h (MonoDefaults): new nullable default class
1378         (mono_class_get_nullable_param, mono_class_get_nullable_param):
1379         new methods.
1380
1381 2005-12-05  Raja R Harinath  <rharinath@novell.com>
1382
1383         * metadata.c (select_container): New.  Refactor code to select the
1384         appropriate GenericContainer given the type of generic parameter
1385         we are looking for.
1386         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
1387         not a MonoGenericContext.  Use select_container.  Update parameters.
1388         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
1389         and MONO_TYPE_MVAR.
1390         (unwrap_arrays): Remove duplicate tests.
1391         (find_generic_param): Rename from 'has_same_context'.  Now walks a
1392         generic instantiated class to find any arguments that are generic
1393         parameters.
1394         (mono_type_create_from_typespec_full): Use find_generic_param to
1395         avoid evicting some generic instantiations from the typespec
1396         cache.
1397
1398 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
1399
1400         * reflection.c: fixed writing of doubles on ARM FPA.
1401
1402 2005-12-02  Robert Jordan  <robertj@gmx.net>
1403
1404         * icall.c: Fixed EventInfo.ReflectedType (#76829).
1405
1406 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1407
1408         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
1409         least on SUSE 10 they are not the same (on debian, they are just the
1410         same thing).
1411
1412 2005-12-01  Raja R Harinath  <rharinath@novell.com>
1413
1414         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
1415         DeclaringType for VARs and MVARs.
1416         * class.c (set_generic_param_owner): Fix initialization of owner
1417         fields.
1418
1419 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
1420
1421         * icall.c: fixed Enum.ToObject() to correctly convert the values.
1422
1423 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1424
1425         * threadpool.c: workaround for a bug that shows up on the Mac:
1426         select()+connect() on a blocking socket is not like it should
1427         be, so we proceed to connect() in that case, wasting the I/O
1428         threadpool thread until connect succeedes. Fixes bug #75436.
1429
1430 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1431
1432         * threadpool.c: fix typo when setting file descriptor states.
1433
1434 2005-11-28  Raja R Harinath  <rharinath@novell.com>
1435
1436         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
1437         * metadata.c (mono_metadata_parse_method_signature_full): Don't
1438         create a temporary signature container.
1439         (mono_metadata_parse_generic_param): Update to changes.
1440         (mono_type_create_from_typespec_full): Update to changes.
1441         * loader.c (method_from_memberref): Don't use a
1442         MonoGenericContainer while parsing a memberref signature.
1443         (method_from_methodspec): Remove dead-store of the 'container'
1444         variable.  It's overwritten before use.
1445
1446         * metadata.c (mono_type_create_from_typespec_full): Make debugging
1447         checks tighter.
1448         (mono_metadata_parse_generic_param): Likewise.
1449         * loader.c (find_method_in_class): Does not need a
1450         MonoGenericContainer.  Use 'mono_method_signature' rather than
1451         'mono_method_signature_full'.
1452         (find_method, mono_get_method_constrained, method_from_memberref):
1453         Update to changes.
1454
1455         * metadata.c (mono_type_create_from_typespec_full): Ensure that
1456         owner-less generic-parameters are never evicted from the typespec
1457         cache.
1458
1459         * loader.c (method_from_memberref): Don't use the current context
1460         when parsing signatures.
1461         (method_from_methodspec, mono_get_method_from_token): Update to changes.
1462
1463         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
1464         side-effects in g_assert.
1465         * loader.c (mono_get_method_from_token): Resolve klass earlier so
1466         that we don't potentially lose information.
1467
1468 2005-11-26  Dick Porter  <dick@ximian.com>
1469
1470         * icall.c:
1471         * threads.c: icalls to implement basic (ie, not named)
1472         System.Threading.Semaphore.
1473
1474 2005-11-24  Dick Porter  <dick@ximian.com>
1475
1476         * process.c
1477         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1478         Use GetProcessId() if it's available.
1479
1480 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
1481
1482         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
1483
1484 2005-11-23  Raja R Harinath  <rharinath@novell.com>
1485             Ankit Jain  <jankit@novell.com>
1486
1487         * loader.c (mono_get_method_from_token): Initialize 'method' field
1488         of all generic parameters before parsing the signature.  Remove
1489         code that "fixed"-up MVAR references.
1490
1491 2005-11-23  Ankit Jain  <jankit@novell.com>
1492
1493         * metadata.c (mono_metadata_has_generic_params):
1494         (mono_metadata_load_generic_param_constraints):
1495         (mono_metadata_load_generic_params): Move duplicate code ...
1496         (mono_metadata_get_generic_param_row): ... here. Returns the
1497         first row-id in GenericParam table for a given owner (token).
1498         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
1499         prototype.
1500
1501 2005-11-23  Raja R Harinath  <rharinath@novell.com>
1502             Ankit Jain  <jankit@novell.com>
1503
1504         * metadata.c (mono_metadata_class_equal): Pass signature_only when
1505         comparing VARs too.
1506         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
1507         type->data.generic_param only if the type is an MVAR.
1508         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
1509         leak owner-less VARs and MVARs into managed space.
1510
1511 2005-11-21  Martin Baulig  <martin@ximian.com>
1512
1513         * class-internals.h
1514         (MonoMethod): Moved the `generic_container' here from
1515         `MonoMethodNormal' since we now also need it for
1516         `MonoMethodPInvoke';
1517         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
1518         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
1519         an union containing both `MonoMethodNormal' and
1520         `MonoMethodPInvoke'.
1521
1522         * loader.c
1523         (mono_get_method_from_token): Allow implementing generic methods
1524         as interncalls.
1525
1526         * threads.c
1527         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
1528         icall.
1529
1530 2005-11-17  Dick Porter  <dick@ximian.com>
1531
1532         * icall.c: 
1533         * process.h: 
1534         * process.c: Split the Process Start_internal icall into
1535         ShellExecuteEx_internal and CreateProcess_internal, which are
1536         called depending on whether UseShellExecute is true.  Fixes bug
1537         76670.
1538
1539         * appdomain.c (MONO_CORLIB_VERSION): Incremented
1540
1541 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
1542
1543         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
1544         'msize' parameters, use the information in 'mspec' instead.
1545         (emit_object_to_ptr_conv): Ditto.
1546
1547         * marshal.c (emit_struct_conv): Handle explicit layout structs with
1548         fields out of order. Fixes #76733.
1549
1550 2005-11-17  Ankit Jain  <jankit@novell.com>
1551
1552         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
1553
1554 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
1555
1556         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
1557           bug #76575.
1558
1559 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
1560
1561         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
1562         for types with non-auto layout. Fixes #76717.
1563
1564 2005-11-16  Ankit Jain  <jankit@novell.com>
1565
1566         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
1567         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
1568         if generic_context is null.
1569           (mono_metadata_generic_param_equal): param->owner can be null.
1570           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
1571         null.
1572
1573 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
1574
1575         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
1576         the correct value.
1577
1578 2005-11-15  Martin Baulig  <martin@ximian.com>
1579
1580         * object.c (set_value): Use mono_class_from_mono_type() instead of
1581         the hack for generic instances; fixes #76136.
1582
1583 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
1584
1585         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
1586         fields.
1587
1588         * image.c (load_metadata_ptrs): Initialize the new fields.
1589
1590         * reflection.c (create_dynamic_mono_image): Ditto.
1591
1592         * reflection.c (build_compressed_metadata): Use the new fields.
1593
1594         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
1595         icall.
1596
1597         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
1598         icall.
1599         
1600 2005-11-15  Ankit Jain  <jankit@novell.com>
1601             Raja R Harinath  <harinath@gmail.com>
1602
1603         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
1604         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
1605         new per-generic_container cache if the cached MonoType's context matches
1606         the current context.
1607           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
1608         to the expected context.
1609           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
1610
1611 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1612
1613         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
1614         we changed the signature of an icall.
1615         * icall.c: Modify to mono_double_ParseImpl return true/false 
1616         depending on the success, instead of throwing the exception. This will
1617         help us in Double.TryParse methods.
1618         
1619 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
1620
1621         * marshal.c (emit_marshal_object): Throw an exception when
1622         marshalling 'object' instead of crashing. Fixes #76696.
1623
1624 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
1625
1626         * class-internals.h: Add prototype for mono_type_get_full_name ().
1627
1628 2005-11-11  Dick Porter  <dick@ximian.com>
1629
1630         * threads.c (mono_thread_manage): Make sure the main thread has
1631         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
1632
1633 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
1634
1635         * loader.c (mono_loader_set_error_type_load): Log a warning to the
1636         console about the missing type.
1637         (mono_loader_set_error_method_load): Ditto.
1638
1639 2005-11-09  Miguel de Icaza  <miguel@novell.com>
1640
1641         * mono-config.c (mono_get_config_dir): Set the system defaults if
1642         none is specified.
1643
1644         * assembly.c (mono_set_dirs): New API entry point to set the
1645         assembly and the config directory in one call
1646
1647 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
1648
1649         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
1650         the ftnptr was created from a delegate in a domain other than the
1651         current domain. Fixes #75377.
1652
1653         * exception.h exception.c: Add mono_get_exception_not_supported ().
1654
1655 2005-11-08  Martin Baulig  <martin@ximian.com>
1656
1657         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
1658
1659 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
1660
1661         * security-manager.h: Added definitions to deal with strongname key 
1662         pairs bigger (and smaller) than 1024 bits.
1663         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
1664         adjust wrt the public key length being used.
1665
1666 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
1667
1668         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
1669           Windows build (r51396-51397).
1670
1671 2005-11-03  Martin Baulig  <martin@ximian.com>
1672
1673         * class.c (mono_class_setup_vtable_general): Also add generic
1674         methods to the vtable; fixes #76581.
1675
1676 2005-11-01  Miguel de Icaza  <miguel@novell.com>
1677
1678         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
1679         sure that we lookup GetString method from the System.Text.Encoding
1680         class, not the derived class or we get an empty method.
1681
1682         Fixed class #76612.
1683
1684 2005-10-25  Miguel de Icaza  <miguel@novell.com>
1685
1686         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
1687         if it has been previously set (embedders). 
1688
1689         Make mono_set_rootdir available also on Unix.
1690
1691 005-10-24  Robert Jordan  <robertj@gmx.net>
1692
1693         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
1694
1695 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
1696
1697         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
1698         only calls which are made to native code use this flag.
1699
1700         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
1701
1702 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
1703
1704         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
1705         Add support for FieldBuilders.
1706
1707 2005-10-29  Martin Baulig  <martin@ximian.com>
1708
1709         * mono-debug.c
1710         (mono_debug_using_mono_debugger): New public method; returns
1711         whether we're running inside the debugger.
1712
1713 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
1714
1715         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
1716         for Method/Constructor/FieldBuilders.
1717
1718 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
1719
1720         * reflection.c (module_add_cattrs): Save custom attributes for global methods
1721         and fields as well.
1722
1723 2005-10-26  Martin Baulig  <martin@ximian.com>
1724
1725         * mono-debug-debugger.c
1726         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
1727
1728 2005-10-24  Raja R Harinath  <harinath@gmail.com>
1729
1730         * icall.c (base64_to_byte_array): Don't pass an out-of-range
1731         integer to isspace.
1732
1733 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
1734
1735         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
1736         when passing valuetypes byref. Fixes #76502.
1737
1738 2005-10-19  Jackson Harper  <jackson@ximian.com>
1739
1740         * profiler.c: Don't put a . in front of types that are not in a
1741         namespace.
1742
1743 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
1744
1745         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
1746
1747 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
1748
1749         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
1750         #76436.
1751         (mono_marshal_get_ldflda_wrapper): Fix a warning.
1752
1753 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1754
1755         * assembly.c metadata-internals.h icall.c: Define an additional
1756         parameter for mono_assembly_name_parse_full, so we can avoid creating
1757         S.R.AssemblyName.Version when no version info wasn't passed.
1758         
1759 2005-10-09  Miguel de Icaza  <miguel@novell.com>
1760
1761         * class.c (mono_type_get_full_name): Reimplement method that was
1762         removed. 
1763
1764         * image.c: Some docs
1765
1766 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
1767
1768         * profiler.c (output_newobj_profile): Fix printing of Total memory
1769         on x86.
1770
1771 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
1772
1773         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
1774
1775 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
1776
1777         * threads.c: remove debug output.
1778
1779 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
1780
1781         * threads.c (mono_thread_manage): Fix crashes if more than 64
1782         threads need to be aborted. Hopefully fixes #75899.
1783
1784         * assembly.c (mono_stringify_assembly_name): New helper function.
1785
1786         * class.c: Use mono_stringify_assembly_name instead of the similar
1787         static function.
1788
1789         * assembly.h assembly.c: Add support for calling a postload search 
1790         hook if an assembly cannot be loaded.
1791
1792         * appdomain.c: Register new search hooks which call the AssemblyResolve
1793         events in AppDomain. Fixes #75231
1794
1795 2005-10-07  Martin Baulig  <martin@ximian.com>
1796
1797         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
1798         methods without debug info.
1799
1800 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
1801
1802         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
1803         wrappers.
1804
1805 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1806
1807         * file-io.c: now that we return symlinks, use lstat and, when the file
1808         is a symbolic link, stat, to get the file attributes. Also avoid the
1809         conversion to/from utf16/external.
1810
1811 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
1812
1813         * class.c (mono_class_layout_fields): Compute klass->has_references
1814         correctly if an embedded valuetype is not yet initialized. Fixes
1815         #76331.
1816
1817 2005-10-04  Martin Baulig  <martin@ximian.com>
1818
1819         * metadata.c
1820         (mono_metadata_load_generic_param_constraints): New public
1821         function; splitted the constraints loading out from
1822         mono_metadata_load_generic_params().
1823
1824         * class.c (mono_class_create_from_typedef): Call
1825         mono_metadata_load_generic_param_constraints() after setting up
1826         the type and creating our parent; fixes #75329.
1827
1828 2005-10-04  Martin Baulig  <martin@ximian.com>
1829
1830         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
1831         non-dynamic parent classes.
1832
1833 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
1834
1835         * file-io.c : win32 build fix (ETXTBSY seems not found).
1836
1837 2005-10-04  Martin Baulig  <martin@ximian.com>
1838
1839         * reflection.c
1840         (mono_image_get_methodspec_token): Make the cache actually work;
1841         fixes #75974.
1842
1843 2005-10-04  Martin Baulig  <martin@ximian.com>
1844
1845         * class.c (mono_class_name_from_token): Removed the unneccessary
1846         `MonoGenericContext *' argument.
1847
1848 2005-10-04  Martin Baulig  <martin@ximian.com>
1849
1850         * loader.c
1851         (method_from_methodspec): Make the caching work again; fixes the
1852         performance regression from #76262.
1853
1854 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1855
1856         * file-io.c:
1857         * file-io.h:
1858         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
1859         GetFileSystemEntries that performs the same work but without going
1860         into io-layer, locking, etc.
1861
1862 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
1863
1864         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
1865         ThreadState_Stopped as well. Fixes #76047.
1866
1867 2005-09-29  Martin Baulig  <martin@ximian.com>
1868
1869         * class.c
1870         (inflate_generic_context): If the new context has a `gmethod', set
1871         its `container' that that gmethod's `container'.
1872
1873         * metadata.c
1874         (mono_metadata_parse_generic_param): Simplify things;
1875         `generic_container = generic_context->container;' is just fine.
1876
1877         * loader.c (method_from_methodspec): Code cleanups.
1878
1879 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
1880
1881         * decimal.c: fix warning (and let gcc generate correct
1882         code on ARM with optimizations).
1883
1884 2005-09-28  Martin Baulig  <martin@ximian.com>
1885
1886         * loader.c
1887         (method_from_memberref): Added `MonoGenericContext *class_context'
1888         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
1889         (method_from_methodspec): If we're a memberref, use the enclosing
1890         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
1891
1892 2005-09-28  Martin Baulig  <martin@ximian.com>
1893
1894         * object.c (mono_runtime_invoke_array): Added support for
1895         MONO_TYPE_GENERICINST; fixes #75917.
1896
1897 2005-09-27  Martin Baulig  <martin@ximian.com>
1898
1899         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
1900         `k->byval_arg.type' to determine the actual type.
1901
1902         * loader.c (method_from_methodspec): Removed some hacks.
1903
1904 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
1905
1906         * class-internals.h (mono_field_is_deleted): Do the test for
1907         rtspecialname before we check the actual name of the field. This
1908         prevents us from dereferencing a pointer into the string table,
1909         saving us from accessing a few pages
1910
1911         * *.c: Replace the use of {Enter,Leave}CriticalSection with
1912         macros. This will allow a deadlock debugger to easily be plugged
1913         in.
1914
1915 2005-09-27  Martin Baulig  <martin@ximian.com>
1916
1917         * loader.c (method_from_methodspec): Create a "signature"
1918         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
1919
1920 2005-09-27  Martin Baulig  <martin@ximian.com>
1921
1922         * class.c
1923         (inflate_generic_class): Correctly set the new context's
1924         container.
1925
1926         * loader.c
1927         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
1928         instead of a `MonoGenericContext *'.
1929         (mono_method_signature_full): Take a `MonoGenericContainer *'
1930         instead of a `MonoGenericContext *'.
1931
1932         * metadata.c
1933         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
1934         instead of a `MonoGenericContext *'.
1935         (mono_metadata_parse_method_signature_full): Likewise.
1936
1937 2005-09-26  Martin Baulig  <martin@ximian.com>
1938
1939         * class.c
1940         (mono_class_from_generic_parameter): Set `klass->generic_container'
1941         (mono_class_from_generic_parameter): Likewise.
1942         (mono_bounded_array_class_get): We inherit the generic container
1943         from the element class.
1944
1945         * loader.c
1946         (find_method, find_method_in_class): Take a `MonoGenericContext *'
1947         argument rather than computing it here.
1948         (method_from_memberref): Correctly set the generic context before
1949         parsing the signature.  Fixes #75681.
1950
1951 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
1952
1953         * object.c (mono_class_has_special_static_fields): Fix warnings.
1954
1955 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1956
1957         * assembly.c: Add parse_public_key function, to
1958         par the public keys. Also added mono_assembly_name_parse_full,
1959         to define it the parsed key should be freed or not.
1960         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
1961         to parse a long format assembly name.
1962         * metadata-internals.h: Keep mono_assembly_name_parse_full as
1963         private, since calling it to preserve the key requires
1964         freeing it manually.
1965         
1966 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
1967
1968         * locales.c : removed HAVE_ICU part.
1969
1970 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
1971
1972         * object.c (mono_class_create_runtime_vtable): Avoid calling 
1973         field_is_special_static if the klass has no special static fields.
1974
1975         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
1976         (MonoCachedClassInfo): Likewise.
1977
1978         * object.c (mono_class_has_special_static_fields): New helper function.
1979
1980 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
1981
1982         * class.c (mono_class_create_from_typedef): Don't call 
1983         interfaces_from_typedef_full for enums.
1984         (mono_class_create_from_typedef): Compute the base types of enums directly
1985         without calling mono_class_setup_fields ().
1986         (mono_class_find_enum_basetype): New helper function.
1987
1988         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
1989         one place inside the string heap.
1990         
1991 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
1992
1993         * class.c: locking fixes, code cleanups, some docs added.
1994         Allocate some data structures in the image mempool.
1995
1996 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
1997
1998         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
1999         the example code.
2000         
2001 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
2002
2003         * class-internals.h, class.c, reflection.c: reduce memory taken by
2004         MonoClass.
2005
2006 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
2007
2008         * metadata.c, metadata.h, loader.h: documentation updates, code and
2009         API cleanups.
2010
2011 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2012
2013         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2014         the example code.
2015
2016         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
2017         page faults caused by the runtime while reading metadata.
2018
2019 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2020
2021         * socket-io.c: the field names were changed 3 months ago and no one
2022         realized until bug #76077 got filed!
2023
2024 2005-09-20  Martin Baulig  <martin@ximian.com>
2025
2026         * icall.c (assembly_icalls): Removed some unused debugger icalls.
2027
2028 2005-09-20  Martin Baulig  <martin@ximian.com>
2029
2030         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
2031         write the rank into the class entry.
2032
2033 2005-09-20  Martin Baulig  <martin@ximian.com>
2034
2035         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
2036
2037 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
2038
2039         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2040
2041         * icall.c (custom_attrs_defined_internal): New icall.
2042
2043         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
2044         function.
2045         (mono_custom_attrs_construct_by_type): New helper function.
2046
2047 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
2048
2049         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
2050         terminate the resulting string. Fixes #76123.
2051
2052 2005-09-16  Martin Baulig  <martin@ximian.com>
2053
2054         * mono-debug.c
2055         (mono_debug_add_method): Ignore inflated methods for the moment.
2056
2057 2005-09-14  Martin Baulig  <martin@ximian.com>
2058
2059         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
2060
2061 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
2062
2063         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
2064         return a success/failure indication.
2065         (mono_metadata_interfaces_from_typedef_full): Ditto.
2066         (get_constraints): Ditto.
2067
2068 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
2069
2070         * marshal.c (emit_marshal_array): Fix handling of null arrays.
2071         
2072         * marshal.c (emit_marshal_array): Add support for returning string
2073         arrays from delegates. Fixes #76063.
2074
2075         * marshal.c: Use the emit_ldloc/stloc macros where possible.
2076
2077 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
2078
2079         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
2080         icall.
2081
2082 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
2083
2084         * reflection.c icall.c: Fix after mono_get_exception_type_load
2085         signature change.
2086
2087         * assembly.c (mono_assembly_get_assemblyref): New helper function.
2088         (mono_assembly_load_reference): Use the new helper.
2089
2090         * class-internals.h (MonoLoaderError): New structure containing 
2091         information about type loading errors.
2092
2093         * class-internals.h loader.c: Add APIs to store per-thread loader
2094         error information.
2095
2096         * loader.c class.c: Set the loader error if needed.
2097
2098         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
2099
2100 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
2101
2102         * decimal.c: fixed to handle the broken ARM fp format.
2103
2104 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
2105
2106         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
2107         broken.
2108
2109 2005-09-06  Martin Baulig  <martin@ximian.com>
2110
2111         * domain.c (supported_runtimes): Added v2.0.50727.
2112
2113 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
2114
2115         * culture-info.h: reduce the size of some structures.
2116
2117 2005-09-05  Martin Baulig  <martin@ximian.com>
2118
2119         Reflect latest API changes in the August CTP.
2120
2121         * icall.c
2122         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
2123         ("MonoType.HasGenericArguments"): Removed.
2124         ("MonoMethod.BindGenericParameters"): Renamed to
2125         "MakeGenericMethod".
2126         ("MethodBuilder.BindGenericParameters"): Renamed to
2127         "MakeGenericMethod".    
2128
2129 2005-09-05  Martin Baulig  <martin@ximian.com>
2130
2131         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
2132
2133 2005-09-05  Martin Baulig  <martin@ximian.com>
2134
2135         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2136
2137         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
2138         generic_container is non-NULL.
2139
2140 2005-09-05  Martin Baulig  <martin@ximian.com>
2141
2142         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2143
2144         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
2145
2146 2005-08-29  Michal Moskal  <malekith@nemerle.org>
2147
2148         * reflection.c (encode_locals,
2149         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
2150         for large generic types.
2151
2152 2005-09-05  Martin Baulig  <martin@ximian.com>
2153
2154         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2155
2156         * class.c (mono_dup_array_type): New public method.
2157         (mono_metadata_signature_deep_dup): New public method.
2158         (dup_type): Correctly duplicate array and function types.
2159
2160 2005-09-05  Martin Baulig  <martin@ximian.com>
2161
2162         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2163
2164         * reflection.c (get_default_param_value_blobs): Handle generic types
2165         and generic methods.
2166
2167 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
2168
2169         * class.c: Fixed error reporting (method/class were inversed) for 
2170         inheritance demands.
2171         * security-manager.c|h: Added the AppDomain when calling the managed
2172         System.Security.SecurityManager.InheritanceDemand method.
2173
2174 2005-09-01  Raja R Harinath  <rharinath@novell.com>
2175
2176         * reflection.c (encode_marshal_blob): 'marshaltype' and
2177         'marshaltyperef' are alternate sources for the custom marshaler
2178         name.
2179
2180 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
2181
2182         * class.c: fix creation of array classes with rank == 1
2183         (patch by Ankit Jain <jankit@novell.com>).
2184
2185 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
2186
2187         * object.c: fix check for creating the bound data for arrays vs
2188         szarrays.
2189
2190 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2191
2192         * object.c: configuration file name is now based on the executable name,
2193         not the image name. Fixes bug #75931.
2194
2195 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
2196
2197         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
2198         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
2199
2200 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
2201
2202         * rand.c: Use wincrypt.h instead of WinCrypt.h.
2203
2204 2005-08-24  Ankit Jain  <jankit@novell.com>
2205             Raja R Harinath  <rharinath@novell.com>
2206
2207         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
2208           called by it recursively.
2209           (mono_class_init): Remove special case in pending_init handling, since it's
2210           superseded by the fix to mono_class_from_typeref.
2211
2212 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
2213
2214         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
2215         BROKEN_THREAD_START stuff.
2216
2217 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
2218
2219         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
2220         trampoline.
2221
2222         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
2223         
2224         * object.c (mono_delegate_ctor): Replace the original function address with
2225         a delegate trampoline.
2226
2227 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
2228
2229         * icall.c: add boolean argument to base64_to_byte_array and 
2230         InternalFromBase64String to control whether a whitespace-only string
2231         is allowed (or should casue a FormatException to be thrown). We need
2232         this as the behavior has changed between MS.NET 1.x and 2.0, and we
2233         to match the MS behaviour in both profiles.
2234         * appdomain.c: Bump corlib version.
2235
2236 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2237
2238         This patch implements a big portion of publisher policy
2239         support, used to bind assembly versions and redirect
2240         one assembly from version A to version B.
2241
2242         * assembly.c:
2243         New GSList loaded_assembly_bindings, for storing the cached
2244         assembly bindings.
2245         (assembly_binding_maps_name): New static function for checking if a 
2246         assembly binding information maps an assembly name.
2247         (mono_assembly_binding_info_free): New function for freeing
2248         assembly binding information resources.
2249         (get_publisher_policy_info): New static function for retrieving 
2250         assembly binding information from a MonoImage.
2251         (compare_versions): New static function for comparing an assembly
2252         binding information data and the version of an assembly name.
2253         (check_policy_versions): New static function for checking if an
2254         assembly binding info mapping an assembly name is valid for it.
2255         (mono_assembly_load_publisher_policy): New static function for
2256         loading the 'policy.major.minor.MyAssembly' image for an assembly
2257         with an assembly name 'aname'.
2258         (mono_assembly_bind_version): New static function for updating
2259         assembly redirection.
2260         (mono_assembly_apply_binding): New static function for applying
2261         assembly binding.
2262         (search_binding_loaded): New static function for searching 
2263         loaded assembly binding infos in the cache domain.
2264         (mono_assembly_load_full): Don't apply assembly binding for
2265         reflection only assemblies.
2266
2267         * metadata-internals.h: Add MonoAssemblyBindingInfo,
2268         which contains information about assembly binding. Also
2269         declare signature for mono_config_parse_publisher_policy ()
2270         function, used to retrieve pub policy info.
2271         
2272         * mono-config.c:
2273         (publisher_policy_start): New static function used to parse publisher 
2274         policy config files.
2275         (publisher_policy_parser): New static MonoParseHandler containing 
2276         the functions used when parsing config files.
2277         (mono_config_parse_publisher_policy): New function for parsing
2278         publisher policy files.
2279         
2280 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
2281
2282         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
2283
2284         * marshal.c (mono_delegate_free_ftnptr): Ditto.
2285
2286         * object.c (mono_get_addr_from_ftnptr): New helper function.
2287
2288         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
2289
2290         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2291
2292 2005-08-19  Dick Porter  <dick@ximian.com>
2293
2294         * threads.c, threads.h, appdomain.c, appdomain.h,
2295         profiler-private.h, monitor.c, object.c, object-internals.h,
2296         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
2297         store the thread ID, so it can hold a 64 bit value if needed.
2298
2299 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
2300
2301         * reflection.c (mono_reflection_create_dynamic_method): Store the
2302         handle class into the method references as well so ldtoken works in
2303         dynamic methods.
2304
2305         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
2306         types.
2307
2308 2005-08-19  Ankit Jain <jankit@novell.com>
2309
2310         Fix #75847.
2311         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
2312           here rather than using the method signature of a arbitrary function
2313           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
2314           two arguments.
2315           Hack done with Harinath.
2316
2317 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2318
2319         * threadpool.c: disable printing stack traces when we get a exception
2320         in a threadpool thread. I need to do more testing to figure out which
2321         cases actually print this. Fixes bug #75828.
2322
2323 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2324
2325         * icall.c: there might be ignored whitespace after the last '='. This
2326         fixes length computation and bug #75840.
2327
2328 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
2329
2330         * assembly.c (mono_assembly_load_full): Consider .exe extension as
2331         well. Fixes #75809.
2332
2333         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
2334         #75784.
2335         
2336         * reflection.c (create_custom_attr_data): Ditto.
2337
2338 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
2339
2340         * locales.c, culture-info.h : removed RegionLCIDMap.
2341         * culture-info-tables.h : regenerated.
2342
2343 2005-08-16  Martin Baulig  <martin@ximian.com>
2344
2345         * class.c (mono_type_get_name_recurse): Small fix.
2346
2347 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
2348
2349         * locales.c : indentation fixie.
2350
2351 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
2352
2353         * object-internals.h,
2354           locales.h,
2355           locales.c,
2356           culture-info.h,
2357           icall.c : added RegionInfo table support.
2358         * culture-info-table.h : regenerated for region support.
2359
2360 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
2361
2362         * reflection.c (resolve_object): handle all kinds of MonoMethod
2363         including generic ones
2364
2365 2005-08-12  Ankit Jain <jankit@novell.com>
2366
2367         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
2368           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
2369
2370 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
2371
2372         * process.c: Don't close a thread handle when it's NULL. This is a
2373         workaround for bug #75733.
2374
2375 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
2376
2377         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
2378
2379 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
2380
2381         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
2382
2383 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2384
2385         * threadpool.c: if a work item in the thread pool has a callback that
2386         catches a exception, don't propagate it after invoking the callback.
2387         Fixes bug #75336.
2388
2389 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
2390
2391         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
2392
2393         * class-internals.h (MonoCachedClassInfo): Add some new fields.
2394
2395         * class.c (mono_class_init): Load field info lazily in the AOT case.    
2396
2397         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
2398
2399 2005-08-03  Ankit Jain  <jankit@novell.com>
2400
2401         Fix #75683.
2402         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
2403           PInvoke calling convention is 0.
2404
2405 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
2406
2407         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
2408         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
2409
2410 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
2411
2412         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
2413         to handle threads not started by the GC (patch by Michael Meeks
2414         <michael.meeks@novell.com>).
2415
2416 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
2417
2418         * reflection.c: Make buffer used in emitting types larger for some
2419         big generic types (patch by Michal Moskal).
2420
2421 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
2422
2423         * mono-debug.c: Fix some (not all) alignment problems.
2424
2425 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2426
2427         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
2428         Invoke mono_image_load_from_data_full passing the refonly
2429         parameter.
2430
2431         * assembly.c
2432         (mono_assembly_open_from_bundle): Add the refonly argument, 
2433         in order to pass it to other methods it calls to.
2434         (do_mono_assembly_open): Add the refonly argument, in order 
2435         to pass it to other methods it calls to.
2436         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
2437         the refonly parameter to it.
2438
2439         * image.c: Add loaded_images_refonly_hash and
2440         loaded_images_refonly_guid_hash to cache the reflection
2441         only loaded images.
2442         (mono_images_init): Initialize the hash tables used for
2443         caching the reflection only images.
2444         (load_modules): Invoke mono_image_open_full passing the refonly
2445         parameter to load the modules the correct way.
2446         (build_guid_table): Add the refonly argument, to re-build the 
2447         correct hash table.
2448         (do_mono_image_open): Added the refonly argument, in order to
2449         define it for the loaded image.
2450         (mono_image_loaded_full): New function, which receives an
2451         additional parameter to look for the image in the refonly or
2452         non-refonly section.
2453         (mono_image_loaded): Updated, using mono_image_loaded_full.
2454         (mono_image_loaded_by_guid_full): The same case that happens
2455         with mono_image_loaded_full.
2456         (mono_image_loaded_by_guid): Likewise.
2457         (register_image): Use the ref_only variable inside MonoImage
2458         to decide in which hash table store the current image.
2459         (mono_image_open_from_data_full): Rename
2460         mono_image_open_from_data to mono_image_open_from_data_full,
2461         adding the refonly argument, to define the ref_only variable 
2462         inside MonoImage.
2463         (mono_image_open_from_data): Return 
2464         mono_image_open_from_data_full.
2465         (mono_image_open_full): Rename mono_image_open to
2466         mono_image_open_full, receiving the new refonly argument,
2467         to pass it to inner methods.
2468         (mono_pe_file_open): Update this function, to open
2469         a MonoImage as a non-refonly image.
2470         (mono_image_close): Use the refonly variable inside
2471         MonoImage to remove the image from the correct caches.
2472
2473         * image.h: Add the signatures of mono_image_open_full,
2474         mono_image_open_from_data_full, mono_image_loaded_full,
2475         mono_image_loaded_by_guid_full.
2476
2477         * metadata-internals.h: Add the ref_only field to 
2478         MonoImage.
2479         
2480 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2481
2482         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
2483         Fix the last behavior, which used to load the assemblies and
2484         extract MonoReflectionAssemblyName information, instead of
2485         extract it from the metadata tables. Needed for Reflection
2486         Only assemblies.
2487         
2488 2005-07-29  Martin Baulig  <martin@ximian.com>
2489
2490         * mono-debug-debugger.c
2491         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
2492         not initialized.
2493
2494         * mono-debug.c
2495         (mono_debug_address_from_il_offset): Check whether we have
2496         debugging support before attempting to take the lock.
2497         (mono_debug_source_location_from_address): Likewise.
2498         (mono_debug_source_location_from_il_offset): Likewise.
2499         (mono_debug_il_offset_from_address): Likewise.
2500         (mono_debug_address_from_il_offset): Likewise.
2501
2502 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
2503
2504         * class.c (mono_class_from_name_case): Add support for dynamic images.
2505         Fixes #75650.
2506
2507         * object.c (mono_class_compute_gc_descriptor): Add a workaround
2508         for #75479.
2509
2510 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
2511         
2512         * reflection.c (mono_method_get_object): Fix warning.
2513
2514 2005-07-28  Martin Baulig  <martin@ximian.com>
2515
2516         * mono-debug.c
2517         (mono_debug_add_wrapper): Also write the wrapper type.
2518
2519 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
2520
2521         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
2522         
2523         * class.c (mono_class_init): Avoid reading nested classes if the AOT
2524         data indicates the class has none.
2525
2526 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
2527
2528         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
2529         loader lock with the debugger lock. Prevents deadlocks for beagle.
2530
2531         Beagle can now run on an smp box for a weekend without any
2532         issues. Woohoo!
2533
2534 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
2535
2536         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
2537         in a module. Fixes #75629.
2538
2539 2005-07-26  Martin Baulig  <martin@ximian.com>
2540
2541         * mono-debug.c (mono_debug_add_wrapper): New static method.
2542         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
2543         interncall or a wrapper.
2544
2545         * mono-debug.h (MonoDebugWrapperData): New public typedef.
2546         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
2547         (MONO_DEBUGGER_VERSION): Bump to 51.
2548
2549         * mono-debug-debugger.c
2550         (mono_debugger_add_type): Removed this empty function.
2551         (mono_debugger_add_method): Likewise.
2552
2553 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
2554
2555         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
2556         before accessing method->slot.
2557
2558 2005-07-21  Jb Evain  <jbevain@gmail.com>
2559
2560         * reflection.c (method_encode_clauses/class): Handle filters clauses.
2561         Fixes #75010.
2562
2563 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
2564
2565         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
2566         #75587.
2567
2568 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
2569
2570         * image.h image.c: Add mono_image_get_guid () API function.
2571
2572 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
2573
2574         There were issues when multiple threads tried to load
2575         assemblies. A deadlock was created between assemblies_mutex and
2576         mono_domain_assemblies_lock. This fixes the issue by making the
2577         assembly ref counting be lock free. See bug 75586.
2578         
2579         * image.c (mono_image_close): The add ref function here was using
2580         Interlocked operations while the unref was using a mutex and a
2581         --. I don't think this was ever a bug that would be exposed in a
2582         non-pendantic way (ie, by an embedder doing a ref on one thread
2583         and an unref on another), but for the sake of correctness, this is
2584         now Interlocked.
2585
2586         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
2587         (mono_assembly_load_reference): Call mono_assembly_addref rather
2588         than touching the refcount ourselves.
2589         (mono_assembly_close): Use InterlockedDecrement to unref the
2590         assembly. Don't acquire the lock unless it is actually needed.
2591
2592 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
2593
2594         * class.c (mono_class_layout_fields): Fix calculation of has_references
2595         for generic types.
2596
2597 2005-07-12  Martin Baulig  <martin@ximian.com>
2598
2599         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2600
2601         * metadata.c
2602         (mono_type_hash): Provide better hashing for generic instances.
2603         (mono_generic_inst_hash): Improve hashing.
2604         (mono_generic_class_hash): Likewise.
2605
2606         * reflection.c (mymono_metadata_type_hash): Improve hashing for
2607         generic instances.
2608
2609 2005-07-12  Martin Baulig  <martin@ximian.com>
2610
2611         * reflection.c (mono_reflection_create_runtime_class): Remove the
2612         hack for generic type definitions and non-`Run' assemblies.
2613         (mono_reflection_bind_generic_parameters): Also use
2614         `klass->wastypebuilder' to check for TypeBuilders.
2615
2616 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
2617
2618         * class.c (mono_class_layout_fields): Fix calculation of has_references
2619         for generic types.
2620
2621         * class.c (inflate_generic_class): Fix a leak.
2622         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
2623         for generic types.
2624
2625 2005-07-11  Martin Baulig  <martin@ximian.com>
2626
2627         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
2628         on error.
2629
2630 2005-07-11  Martin Baulig  <martin@ximian.com>
2631
2632         * loader.c (find_method): Also lookup in
2633         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
2634
2635 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
2636
2637         * appdomain.c (mono_domain_unload): Don't free the error message
2638         before passing it to mono_get_exception_...
2639
2640         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
2641         
2642 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
2643
2644         * threads.c: try to better guess an available RT signal (bug #75387).
2645
2646 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
2647
2648         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
2649         and CACHE_OBJECT.
2650
2651 2005-07-07  Martin Baulig  <martin@ximian.com>
2652
2653         * class.c (mono_type_get_name_full): Return NULL for
2654         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
2655         fixes #75408.
2656
2657 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
2658
2659         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
2660         exit the appdomain as well being aborted.
2661
2662         * threadpool.c: Create all threadpool threads inside the root appdomain, and
2663         change back to the root domain after calling managed code. This enables
2664         appdomains using threadpools to be unloaded.
2665
2666 2005-07-07  Martin Baulig  <martin@ximian.com>
2667
2668         * class-internals.h
2669         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
2670         into `MonoDynamicGenericClass' since we only need it for dynamic
2671         types.
2672
2673         * reflection.c (mono_class_bind_generic_parameters): We don't need
2674         to compute the `parent' here.
2675
2676 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
2677
2678         * culture-info-table.h : regenerated.
2679
2680 2005-07-06  Martin Baulig  <martin@ximian.com>
2681
2682         * icall.c
2683         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
2684
2685         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
2686
2687 2005-07-06  Martin Baulig  <martin@ximian.com>
2688
2689         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
2690         we're doing a signature-only comparision; fixes #74945.
2691
2692 2005-07-06  Martin Baulig  <martin@ximian.com>
2693
2694         * class-internals.h (MonoGenericClass): Moved some things out into
2695         a new `MonoInflatedGenericClass' type.  
2696         (MonoInflatedGenericClass): New type; the `klass' of a
2697         `MonoGenericClass' is now computed lazyly in
2698         mono_get_inflated_generic_class().      
2699
2700         * class.c (mono_get_inflated_generic_class): New public function.
2701         (mono_class_inflate_generic_method): Removed the unused
2702         `MonoClass *' argument.
2703         (setup_generic_vtable): Don't call mono_get_inflated_method() on
2704         all the methods.
2705         (mono_class_create_generic): Make this static and merge it with
2706         mono_class_create_generic_2(); we're now called automatically from
2707         mono_get_inflated_generic_class().
2708
2709         * loader.c (mono_method_signature): Call
2710         mono_get_inflated_method() here.
2711
2712 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
2713
2714         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
2715         type of fields with RVA.
2716
2717         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
2718         for this pseudo class.
2719         (my_mono_class_from_generic_parameter): Likewise.
2720         (mono_class_init): Allow interfaces to have cctors.
2721
2722 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
2723
2724         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
2725         lazily for AOT methods.
2726
2727 2005-07-05  Martin Baulig  <martin@ximian.com>
2728
2729         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
2730         returns FALSE for a successful match, not TRUE.
2731
2732 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
2733
2734         * loader.c (mono_method_get_index): Optimize this a bit.
2735
2736 2005-07-04  Martin Baulig  <martin@ximian.com>
2737
2738         * class.c
2739         (class_compute_field_layout): Move the check for generic type
2740         definitions into mono_class_layout_fields().  Fixes #74684.
2741         (mono_class_from_generic_parameter): Correctly compute
2742         `klass->parent'; fixes #75457.
2743
2744         * reflection.c (register_assembly, register_module): Make sure
2745         `domain->rejobject_hash' is already created.
2746
2747 2005-07-02  Martin Baulig  <martin@ximian.com>
2748
2749         * class-internals.h
2750         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
2751         `MonoDynamicGenericClass'.      
2752
2753 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
2754
2755         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
2756         returned by a field getter is null, since null is a valid value.
2757
2758 2005-07-01  Martin Baulig  <martin@ximian.com>
2759
2760         * reflection.c (mono_reflection_generic_class_initialize): Update
2761         the `dgclass->fields [i].parent' to the correct class.
2762         (mono_image_get_fieldref_token): Use the declaring type, not the
2763         reflected type.
2764
2765 2005-07-01  Martin Baulig  <martin@ximian.com>
2766
2767         * loader.c (find_method): Also look in the interfaces; fixes #75429.
2768
2769 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
2770
2771         * threads.c (thread_cleanup): assert that thread != NULL
2772         (wait_for_tids_or_state_change): We were using the wrong variable
2773         when accessing wait->threads. `i' was always out of the bounds of
2774         the array.
2775
2776 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2777
2778         * loader.c: map user32 and kernel32 to libMonoSupportW
2779
2780 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
2781
2782         * appdomain.c (unload_thread_main): Mark this as WINAPI.
2783
2784 2005-06-28  Martin Baulig  <martin@ximian.com>
2785
2786         * loader.c (method_from_methodspec): Fix #75334.
2787
2788 2005-06-28  Martin Baulig  <martin@ximian.com>
2789
2790         Fix #74953 - Arrays now implement the generic IList<T> interface
2791         on the 2.0 platform.
2792
2793         * class-internals.h (MonoDefaults): Added `generic_array_class'.
2794
2795         * reflection.c (mono_class_bind_generic_parameters): New public
2796         function; similar to mono_reflection_bind_generic_parameters(),
2797         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
2798
2799         * domain.c (mono_init_internal): Try to initialize.
2800         `mono_defaults.generic_array_class' here; this'll only succeed if
2801         we're using the 2.0 corlib.
2802
2803         * icall.c
2804         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
2805         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
2806         (mono_lookup_internal_call): Added support for nested classes.
2807
2808         * loader.c
2809         (mono_get_method_from_token): Set `result->signature->pinvoke' if
2810         we're an interncall and have generic arguments.
2811
2812         * class.c
2813         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
2814         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
2815         instance of System.Array.InternalArray<T> for arrays, so they
2816         implement the generic IList<T> interface.
2817
2818 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
2819
2820         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
2821         (chastamar@yahoo.com). Fixes #75374.    
2822
2823 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
2824
2825         * culture-info-table.h: regenerated.
2826
2827 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2828
2829         * icall.c: handle spaces correctly for base64 strings.
2830
2831 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
2832
2833         * *.c: Kill some warnings.
2834
2835 2005-06-23  Duncan Mak  <duncan@novell.com>
2836
2837         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
2838         that this builds on Solaris 10 (x86).
2839
2840 2005-06-23  Martin Baulig  <martin@ximian.com>
2841
2842         * class.c
2843         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
2844         generic type definitions.
2845
2846 2005-06-23  Martin Baulig  <martin@ximian.com>
2847
2848         Fix #75331.
2849
2850         * metadata.c (mono_class_get_overrides): Renamed to
2851         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
2852         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
2853         pass it to mono_get_method_full().
2854
2855 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
2856
2857         * reflection.c (mono_reflection_create_runtime_class): take the
2858         mono_domain_lock in this method. Prevents deadlocks
2859
2860 2005-06-22  Martin Baulig  <martin@ximian.com>
2861
2862         * loader.c (method_from_methodspec): Fix #75330.
2863
2864 2005-06-22  Martin Baulig  <martin@ximian.com>
2865
2866         * reflection.c (type_get_qualified_name): Use
2867         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
2868         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
2869         argument; use it if we don't have an assembly name.
2870
2871 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
2872
2873         * object.c: In mono_message_init, set "copy out" flag for in
2874         parameters with the [Out] flag.
2875
2876 2005-06-21  Martin Baulig  <martin@ximian.com>
2877
2878         * class.c
2879         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
2880         and MONO_TYPE_PTR.
2881
2882 2005-06-21  Martin Baulig  <martin@ximian.com>
2883
2884         * class.c (mono_class_init): Don't initialize `class->fields' for
2885         generic instances since they're initialized again in
2886         compute_field_layout(). 
2887         (compute_field_layout): Set the field's `generic_info' here; fix
2888         #75320. 
2889
2890 2005-06-21  Martin Baulig  <martin@ximian.com>
2891
2892         * class-internals.h
2893         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
2894
2895         * metadata.c (mono_metadata_generic_method_equal): Also
2896         distinguish the `generic_class'; fixes #75334.
2897
2898 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2899
2900         * domain.c:
2901         * appdomain.c:
2902         * domain-internals.h:
2903         * reflection.c: 'domain_assemblies' field is now protected by its own
2904         lock. Don't call into managed code to run the AssemblyLoad event if we
2905         now there are no registered delegates for it.
2906
2907 2005-06-20  Martin Baulig  <martin@ximian.com>
2908
2909         * class.c (mono_class_is_assignable_from): Use a custom version of
2910         mono_class_has_parent() to make things work for generic instances;
2911         fix #75300.
2912
2913 2005-06-20  Martin Baulig  <martin@ximian.com>
2914
2915         * loader.c (method_from_methodspec): Apply a patch from
2916         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
2917
2918 2005-06-20  Martin Baulig  <martin@ximian.com>
2919
2920         * class.c (mono_class_init): Reverted Zoltan's last change; it
2921         breaks generics.
2922
2923 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
2924
2925         * threads.c (wait_for_tids_or_state_change): Add missing locking.
2926
2927 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2928
2929         * socket-io.c: fix the index in the socket array for writable/error
2930         sockets. Fixes bug #75306.
2931
2932 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
2933
2934         * class.c (mono_class_init): Allow interfaces to have static ctors.
2935
2936 2005-06-17  Martin Baulig  <martin@ximian.com>
2937
2938         * loader.c (method_from_methodspec): Use `context->container' when
2939         parsing the `gmethod->inst'.
2940
2941 2005-06-17  Martin Baulig  <martin@ximian.com>
2942
2943         * class.c (mono_type_get_name_recurse): Don't add the assembly
2944         name for type arguments.
2945
2946 2005-06-15  Martin Baulig  <martin@ximian.com>
2947
2948         * reflection.c (mono_image_get_inflated_method_token): Encode
2949         correct klass; fixes #75260.
2950
2951 2005-06-13 Michal Moskal <malekith@nemerle.org>
2952
2953         * icall.c: Make GetCorrespondingMethod/Constructor take
2954         MonoReflectionMethod method not MonoMethod. Removed
2955         MonoType.GetCorrespondingField, and make
2956         MonoGenericType.GetCorrespondingField take name not
2957         MonoClassField.
2958
2959 2005-06-13  Michal Moskal <malekith@nemerle.org>
2960
2961         * reflection.c (field_encode_signature, encode_locals):
2962          Make sizes of buffers for types larger (for big generic types).
2963          (create_generic_typespec,
2964          mono_reflection_sighelper_get_signature_local,
2965          mono_reflection_sighelper_get_signature_field):
2966          Add asserts for too small buffers.
2967
2968 2005-06-15  Martin Baulig  <martin@ximian.com>
2969
2970         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
2971         if our parent is not a dynamic type.
2972
2973 2005-06-15  Martin Baulig  <martin@ximian.com>
2974
2975         * class-internals.h (MonoTypeNameFormat): New enum.
2976
2977         * class.c
2978         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
2979         (mono_type_get_full_name): Removed.
2980         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
2981         argument instead of the boolean's.
2982
2983         * icall.c (ves_icall_System_MonoType_getFullName):
2984         Added `gboolean assembly_qualified'.    
2985
2986         * reflection.h
2987         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
2988
2989         * reflection.c (mono_reflection_parse_type): Parse the new type
2990         name format.
2991
2992 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2993
2994         * icall.c: no need to convert from utf16 to utf8 and then back again
2995         after the call to GetLogicalDrives.
2996
2997 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2998
2999         * icall.c: frombase64. Fix problems exposed by new tests.
3000
3001 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3002
3003         * icall.c: added internal calls for converting char [] and strings in
3004         base64 into byte [].
3005
3006 2005-06-10  Martin Baulig  <martin@ximian.com>
3007
3008         * class.c (mono_class_create_generic_2): Read the nested classes
3009         from the metadata rather than from `gklass->nested_classes' since
3010         `gklass' might not be initialized yet.
3011
3012 2005-06-09  Duncan Mak  <duncan@novell.com>
3013
3014         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
3015         all public headers. Fixes #74919.
3016
3017 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
3018
3019         * domain.c: The key for proxy_vtable_hash is now a pointer
3020         array. Added new GHashFunc and GCompareFunc functions for this.
3021
3022         * class.h: The list of interfaces in MonoRemoteClass is known in
3023         advance and can't grow (we create a new MonoRemoteClass if needed),
3024         so now the interface array can be allocated together with
3025         MonoRemoteClass.
3026         
3027         * object.c: Added a new method create_remote_class_key.
3028         Fixed mono_remote_class so it does not depend on
3029         mono_upgrade_remote_class.
3030         Removed extend_interface_array.
3031         Added new method clone_remote_class(), which makes a copy of a remote
3032         class and adds a new interface or class to it.
3033         mono_upgrade_remote_class() now creates a new remote class (or gets
3034         it from the cache) if an vtable upgrade is needed. In this way
3035         we make sure that other objects sharing the same remote class
3036         don't get the new vtable with unwanted interfaces.
3037         
3038         * object-internals.h:
3039         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
3040         
3041         * marshal.c: Track changes in mono_upgrade_remote_class().
3042
3043 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
3044         * icall.c: Add runtime methods for obtaining members of inflated
3045         class, which were created from supplied non-inflated members. It
3046         is used in internal Get{Method,Constructor,Field} methods in
3047         System.Type
3048
3049 2005-06-09  Martin Baulig  <martin@ximian.com>
3050
3051         * reflection.c
3052         (mono_reflection_bind_generic_method_parameters): Fix #75169.
3053
3054 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3055         * reflection.c (mono_image_basic_init): Define
3056         Version in MonoDynamicAssembly. 
3057         
3058 2005-06-08  Martin Baulig  <martin@ximian.com>
3059
3060         Fix #75136.
3061
3062         * loader.c
3063         (mono_method_signature_full): New public method; takes a
3064         `MonoGenericContext *'.
3065         (find_method): Use mono_method_signature_full() and pass the
3066         klass'es context to it.
3067
3068         * class.c (mono_class_is_inflated_method): Use
3069         mono_method_signature_full() and pass the context to it.
3070
3071 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
3072
3073         * object.c: add proper locking in mono_remote_class_vtable(),
3074         fixes possible memory corruption.
3075
3076 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
3077
3078         * marshal.c (mono_remoting_marshal_init): set
3079         initialized after initialization.
3080
3081 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3082
3083         * locales.c : hush.
3084
3085 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
3086
3087         * object.c (extend_interface_array): fix really silly
3088         memory corrupting / comparison bug.
3089
3090 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3091
3092         * reflection.c: Functions added to support the creation
3093         of CustomAttributeData, which includes Attribute data
3094         used by ReflectionOnly methods.
3095
3096         * reflection.h:  mono_reflection_get_custom_attrs_data and
3097          mono_custom_attrs_data_construct added (functions exposed).
3098
3099          * icall.c: Added mono_reflection_get_custom_attrs_data
3100          as icall.
3101         
3102 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
3103
3104         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
3105         lupus's request.
3106
3107 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
3108
3109         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
3110
3111         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
3112         dynamic DllImportAttribute.
3113
3114         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
3115         dynamic DllImportAttribute.
3116
3117         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
3118         Fixes #75162.
3119
3120 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3121
3122         * threads.c: avoid segfault when an unstarted thread is aborted.
3123
3124 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
3125
3126         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
3127         Returns the name and version of the runtime for reporting.
3128
3129 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3130
3131         * appdomain.c: bump corlib version.
3132         * object-internals.h: new field in MonoReflectionAssembly.
3133
3134 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3135
3136         * object-internals.h: Carlos forgot to add this field.
3137
3138 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3139
3140         * icall.c: Added create_version to create instances
3141         of Version of MonoReflectionAssemblyName. This change helps
3142         the AssemblyName tests to keep running fine.
3143         
3144 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
3145   
3146         * object.c (mono_method_return_message_restore): A somehow less
3147         intrusive fix for #75138.
3148
3149 2005-06-03  Raja R Harinath  <rharinath@novell.com>
3150
3151         * object.c (mono_method_return_message_restore): Fix computation
3152         of expected number of out args.
3153
3154 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
3155
3156         * reflection.c (mono_image_get_method_info): Fix the case when the
3157         charset is empty.
3158
3159 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
3160
3161         * object.c: Added missing null check in
3162           mono_method_return_message_restore.
3163
3164 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
3165
3166         * reflection.c (mono_image_get_method_info): Handle the case when
3167         dllentry is empty.
3168
3169 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
3170
3171         * object.c: When creating the vtable for a proxy, take into account
3172         all inherited interfaces, not only the ones registered in
3173         iclass->interfaces. This fixs bug #74996.
3174         Also, in mono_method_return_message_restore, verify that the array
3175         of out args has the expected lengh.
3176
3177 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3178
3179         * socket-io.c: update the timeout in Poll when the call is interrupte.
3180
3181 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3182
3183         * socket-io.c: support abort/suspend in Select_internal after last
3184         change.
3185
3186 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3187
3188         * threadpool.c: remove warning.
3189
3190 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3191
3192         * icall.c:
3193         * socket-io.[ch]: Select_internal uses poll() now when available, thus
3194         removing the 1024 limit from select(). Runtime part of the fix for
3195         bug #71203.
3196
3197 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3198
3199         * socket-io.c: when resolving the addresses for the same
3200         host returned by gethostname(), get the local IPs from the interface
3201         list. Loopback addresses are discarded if the are interfaces up with
3202         non-loopback ones. Fixes bug #63265.
3203
3204 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
3205
3206         * appdomain.c, verify.c, object-internals.h, reflection.c:
3207         bumped corlib number to 36, and added new extra_flags field
3208         to ReflectionMethodBuilder and friends.  Fixes #75060.
3209
3210 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
3211
3212         * gc.c: register a new weak link only if the object is non-null
3213         (fixes bug#75047).
3214
3215 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
3216
3217         * culture-info.h : short time pattern too.
3218
3219 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
3220
3221         * culture-info.h : expand long time pattern string length.
3222
3223 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
3224
3225         * culture-info-table.h : update (more French date format; #72788).
3226
3227 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
3228
3229         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
3230         the method is static. Fixes #75029.
3231
3232 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
3233
3234         * reflection.c: Update the table_idx field of method builders after
3235         saving the module, since it can change. This is a workaround for
3236         bug #74914. 
3237
3238 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
3239
3240         * culture-info-table.h : update (additional French date format).
3241
3242 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
3243
3244         * icall.c (ves_icall_type_Equals): Revert last change.
3245         
3246         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
3247
3248         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
3249
3250 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
3251
3252         * class-internals.h: Added executioncontext_class field to 
3253         MonoDefaults structure.
3254         * domain.c: Cache System.Threading.ExecutionContext class in 
3255         mono_defaults.
3256         * object.c: Capture the ExecutionContext for asynchroneous calls in
3257          mono_async_result_new.
3258         * object-internals.h: Added execution_context and original_context 
3259         fields to MonoAsyncResult. Added execution_context to MonoThread.
3260         * security-manager.c|.h: Added mono_get_context_capture_method to 
3261         return the capture method (if required by the security manager or by
3262         the framework version used).
3263         * threadpool.c: Apply capture (if present) ExecutionContext in 
3264         mono_async_invoke and revert to original context after it completes.
3265
3266 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
3267
3268         * culture-info-table.h : updated (real hacky solution for zh-CHT).
3269
3270 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
3271
3272         * culture-info-table.h : zh-CHT related workaround.
3273
3274 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
3275
3276         * marshal.c (emit_marshal_custom): Add some error checking and call the
3277         methods in the ICustomMarshaler interface. Fixes #74875.
3278         
3279         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
3280         native->managed wrappers.
3281
3282 2005-05-12  Martin Baulig  <martin@ximian.com>
3283
3284         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
3285         here and use the loader lock.
3286
3287         * mono-debug.c: Properly lock when the debugger is not attached.
3288         (mono_debug_init): Release the initial lock if we're not running
3289         in the debugger.
3290
3291 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
3292
3293         * marshal.c (emit_marshal_custom): Pass through NULL values without
3294         calling the custom marshalling routines.
3295
3296         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
3297         conversion in structures. Fixes #74882.
3298
3299 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
3300
3301         * culture-info-table.h : zh-* cultures were missing.
3302
3303 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
3304
3305         * threads.c: Added a new event background_change_event which is signaled
3306         when a thread changes its background mode.
3307         Moved here several checks previously done in managed code. The checks
3308         require the thread lock, and using the thread lock in managed code
3309         can result in deadlocks.
3310         Merged Start_internal and Thread_internal into a single method. Now 
3311         Thread_internal does all work of creating and starting a thread.
3312         Added icalls for setting and getting the state of the object. Moved from
3313         managed code to avoid locking there.
3314         Added wait_for_tids_or_state_change() which is called instad of
3315         wait_for_tids when waiting for non-backround threads to end. This method
3316         will return if one of the threads ends or the background_change_event
3317         is signaled.
3318         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
3319         the background mode. This method signals the background_change_event
3320         event.
3321         * icall.c:
3322         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
3323         removed Start_internal.
3324         
3325 2005-05-11  Martin Baulig  <martin@ximian.com>
3326
3327         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
3328         to order of some fields to get proper alignment on 64-bit machines.
3329
3330 2005-05-11  Martin Baulig  <martin@ximian.com>
3331
3332         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
3333         changes as they're broken and completely fuck up the debugger.
3334
3335         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
3336
3337 2005-05-10  Martin Baulig  <martin@ximian.com>
3338
3339         * reflection.c (mono_reflection_generic_class_initialize): Don't
3340         call mono_class_setup_parent() here.
3341
3342 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3343
3344         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
3345         send/receive timeout use an integer in milliseconds. We were using a
3346         struct timeval.
3347
3348 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3349
3350         * locales.c:
3351         (internal_get_cultures): reserve the first slot of the array for the
3352         InvariantCulture, which will be filled in managed code.
3353
3354 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
3355
3356         * reflection.c (mono_image_fill_module_table): Initialize the
3357         GENERATION field as well.
3358
3359 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3360
3361         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
3362         Monitor.Enter on the object.
3363
3364 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
3365
3366         * threads.c: Enable the wait for running threads when exiting.
3367         * icall.c: Suspend all threads before exiting.
3368
3369 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
3370
3371         * assembly.c (mono_assembly_load_reference): Fix warning.
3372
3373 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3374
3375         * threadpool.c: changed the default number of threads per cpu. From now
3376         on, the default will be 20 + (5 * number of cpus) instead of 50.
3377
3378 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
3379
3380         * loader.c (mono_method_get_signature_full): Add locking here.
3381
3382 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
3383
3384         * appdomain.c: Moved methods for parsing and freeing assembly
3385         names to assembly.c.
3386         * assembly.c, domain-internals.h: Created public methods for parsing
3387         assembly names. Fixed mono_assembly_load_with_partial_name:
3388         it now finds the best match, taking into account the version,
3389         token and culture specified in the partial name. Also return
3390         the latest version if no version information is specified.
3391
3392 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
3393
3394         * threadpool.c: replace check for SocketAsyncCall class.
3395
3396 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3397
3398         * threadpool-internals.h:
3399         * Makefile.am: added threadpool-internals.h
3400
3401         * threadpool.c: call mono_unhandled_exception on exceptions not handled
3402         that happen in threadpool threads (tested on MS).
3403         (mono_thread_pool_remove_socket): new function that dispatch any pending
3404         AIO call on a socket that is closing. By now only epoll really needs it,
3405         as select/poll wake up when the socket closes.
3406
3407
3408         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
3409
3410 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
3411
3412         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
3413
3414 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
3415
3416         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
3417
3418 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
3419
3420         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
3421         has an abort request, convert it into a suspend request.
3422
3423 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
3424
3425         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
3426         warning for the usage of `UnmanagedFunctionPointerAttribute' which
3427         is not supported yet.
3428
3429 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3430
3431         * image.c: register assemblies loaded from data (bundles) in the loaded
3432         assemblies hash. Fixes bug #74772.
3433
3434 2005-04-29  Martin Baulig  <martin@ximian.com>
3435
3436         * class.c (mono_type_get_name_recurse): Update to the new naming
3437         schema from the latest .NET 2.x beta2.
3438         (mono_class_setup_vtable_general): If we're a generic instance,
3439         copy the vtable from our generic type definition and inflate all
3440         the methods in it.
3441
3442         * loader.c (find_method): Update to the new naming schema from the
3443         latest .NET 2.x beta2.
3444
3445 2005-04-29  Raja R Harinath  <harinath@gmail.com>
3446
3447         * class.c (mono_class_init): Add a mono_loader_unlock to the
3448         #74734 fix.
3449
3450 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
3451
3452         * icall.c (ves_icall_System_Environment_Exit): Remove the 
3453         suspend_all_other_threads () call for the time being, since it can hang.
3454
3455         * threads.c (mono_thread_manage): Similarly, disable the waiting for
3456         the background threads to exit, since it can also hang.
3457
3458         * class.c (mono_class_init): Applied patch from Ankit Jain 
3459         (radical@gmail.com). Avoid pending init errors when a field refers
3460         to a nested class using a typeref. Fixes #74734.
3461
3462         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
3463         this for dynamic modules.
3464
3465 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3466
3467         * threads.c: don't wait for threads that are in the process of aborting
3468         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
3469         and waiting for background threads to finish. This makes xsp and
3470         mod-mono-server exit without random length delays and/or hangs.
3471
3472 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3473
3474         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
3475
3476 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
3477
3478         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
3479         dynamic types to prevent infinite loops. Fixes #74727.
3480
3481         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
3482         ..._is_assignable_to.
3483
3484 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
3485
3486         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
3487
3488 2005-04-25  Martin Baulig  <martin@ximian.com>
3489
3490         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
3491
3492         * domain.c
3493         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
3494
3495         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
3496
3497         * reflection.c (build_compressed_metadata): Set metadata header
3498         version to 2.0.
3499
3500 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
3501
3502         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
3503         number into an integral and a decimal part. Fixes #70473.
3504
3505         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
3506
3507 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
3508
3509         * culture-info-table.h : reflected the latest locale-builder output.
3510
3511 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3512
3513         * threadpool.c: check for SuspendRequested too when deciding if
3514         mono_thread_interruption_checkpoint should be called.
3515
3516 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3517
3518         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
3519         * threads.c: remove interruption_mutex and use Interlocked instead. When
3520         suspending all the threads, wait for all the suspended events at once.
3521         If we're shutting down and get an APC that is going to be queued,
3522         call mono_thread_execute_interruption immediately, as the thread might
3523         be sleeping on a pthread condition or mutex.
3524
3525         * icall.c: call mono_runtime_set_shutting_down before suspending the
3526         threads.
3527
3528         Fixes bug #74693. And now xsp is happier when exiting.
3529
3530 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
3531
3532         * loader.c (mono_stack_walk): Fix #74690.
3533
3534 2005-04-22  Martin Baulig  <martin@ximian.com>
3535
3536         * mono-debug.h (MonoDebugMethodJitInfo): Added
3537         `MonoDebugMethodJitInfo *jit'.
3538
3539         * mono-debug.c (mono_debug_read_method): Cache the
3540         MonoDebugMethodJitInfo in `address->jit'.
3541         (mono_debug_free_method_jit_info): New public method.
3542
3543 2005-04-22  Martin Baulig  <martin@ximian.com>
3544
3545         * class.c (mono_class_is_assignable_from): Disallow
3546         type parameter -> interface.
3547
3548 2005-04-21  Dick Porter  <dick@ximian.com>
3549
3550         * threads.c (mono_thread_create): Turn an assertion into an error.
3551
3552 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
3553
3554         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
3555         
3556         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
3557         Fix some gcc 4.0 warnings.
3558
3559 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
3560
3561         * file-io.c: fix alt dir separator char on unix systems
3562         and cleanup (fixes bug #71214).
3563
3564 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
3565
3566         * marshal.c: Use CALLVIRT instead of CALL when dispatching
3567         a call to a remote domain, since the method may be an
3568         interface method in the client domain. This fixes bug #74192.
3569
3570 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3571
3572         * threadpool.c: recv/send are now performed before going back to managed
3573         code to save one transition.
3574
3575 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3576
3577         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
3578
3579         * metadata/threadpool.c: removed hack to workaround the bug above.
3580
3581         Fixes bug #74618.
3582
3583 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
3584
3585         * reflection.c reflection.h: Fix handling of parameter defaults in
3586         dynamic methods. Also fixes handling of parameter attributes.
3587         Fixes #74609.
3588
3589         * mono-debug.c (mono_debug_close_image): Fix warning.
3590
3591 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3592
3593         * socket-io.h: replaced old unused field with new 'blocking'.
3594         * threadpool.c: restore socket blocking state on windows(tm).
3595
3596 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
3597
3598         * icall.c: don't return the codebase in the AssemblyName[] returned by
3599         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
3600         * object-internals.h: Removed FIXME (fields were presents) and fixed
3601         versioncompat declaration.
3602
3603 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3604
3605         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
3606         not closed, so don't cleanup when it happens.
3607
3608 2005-04-13  Chris Toshok  <toshok@ximian.com>
3609
3610         * mono-debug-debugger.h: change prototype for
3611         mono_debugger_lookup_type.
3612
3613         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
3614         this function, although it should probably be named
3615         mono_debugger_init_type.
3616
3617 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3618
3619         * threadpool.c: fix non-AIO case.
3620
3621 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
3622
3623         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
3624         the built-in profiler to measure just JIT compilation times.
3625
3626 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3627
3628         * threadpool.c: the epollfd might be closed by another thread at
3629         any time, so ignore EBADF at treat it as a "we're closing" sign.
3630
3631 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3632
3633         * threadpool.c: release the semaphores with a count equals to the number
3634         of working threads in both IO and regular pools. Fixed typo that messed
3635         up the count of IO pool threads. Don't initialize the pipe handles if
3636         we're using epoll.
3637
3638 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3639
3640         * threadpool.c: some systems don't like a NULL when deleting the socket
3641         from epoll.
3642
3643 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3644
3645         * threadpool.c: fix semaphore allocation.
3646
3647 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3648
3649         * threadpool.c: added epoll() based implementation for asynchronous IO
3650         that is used instead of the default poll() when available.
3651         It can be disabled by setting MONO_DISABLE_AIO.
3652
3653 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3654
3655         * threadpool.c: windows needs 'closesocket' and instead of returning
3656         0 when the stream is closed while in select, it returns -1. Fixes bug
3657         #74573.
3658
3659 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
3660
3661         * class.c (class_compute_field_layout): Fix the regression caused by
3662         the previous try.
3663
3664 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3665
3666         * threadpool.c: separate pool for socket async. IO.
3667         * threadpool.h: mono_max_worker_threads is not a global any more.
3668
3669 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
3670
3671         * class.c (class_compute_field_layout): Fix #74549.
3672
3673 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3674
3675         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
3676         use 2 connected sockets instead.
3677
3678 2005-04-08  Miguel de Icaza  <miguel@novell.com>
3679
3680         * mono-config.c: Add new entry point for mkbundle
3681         mono_config_parse_memory. 
3682
3683 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3684
3685         * threadpool.c: removed another unused function.
3686
3687 2005-04-08  Ankit Jain  <radical@corewars.org>
3688
3689         * reflection.c (get_default_param_value_blobs): Add 'types'
3690         parameter to get the types encoded in the constant table.
3691         (mono_param_get_objects): Use the type from the constant table,
3692         not the type of the parameter, when creating default values.
3693         Handle null default values correctly.
3694
3695 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3696
3697         * file-io.c:
3698         * file-io.h:
3699         * threadpool.c:
3700         * threadpool.h:
3701         * icall.c:
3702         * socket-io.c: removed dead code for async IO.
3703
3704 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3705
3706         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
3707
3708         * threadpool.c: intercept socket async. calls and pass them to a thread
3709         that is polling and dispatching the job items to the threadpool as
3710         socket become ready. Fixes bugs #71217, #71933.
3711
3712         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
3713         between char and short/ushort arrays.
3714
3715         * socket-io.c: remove dead code.
3716
3717 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
3718
3719         * locales.c,
3720           icall.c : removed InternalToUpper_Comp() and
3721           InternalToLower_Comp().
3722
3723 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
3724
3725         * char-conversions.h : The tables were incorrectly generated. Should
3726           be generated against invariant culture.
3727
3728 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
3729
3730         * object.c (mono_runtime_invoke_array): Fix return value when 
3731         passing pre-created valuetype objects to ctors.
3732
3733         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
3734         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
3735         Fixes #74338.
3736
3737 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
3738
3739         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
3740         only used with --security and hides the wrong corlib version error.
3741
3742 2005-03-30  Joshua Tauberer  <tauberer@for.net>
3743
3744         * class.c: Changed mono_class_name_from_token so that types
3745         outside of a namespace don't have an initial period.  Improved
3746         the g_warning message used in _mono_class_get when loading
3747         fails.
3748         * assembly.c: In mono_assembly_load_reference, when an assembly
3749         can't be found, "No such file or directory" is misleading and
3750         unhelpful because a few paths were checked for the presence of
3751         the assembly.  When that happens (ENOENT), display a nicer
3752         message indicating the directories that were searched.  In all
3753         cases, the warning is made easier to read for non-hackers.
3754
3755 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
3756
3757         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
3758         project/solution.
3759         * appdomain.h|domain.c: Removed inline from functions.
3760         * appdomain.c: Reduced warnings when compiling on windows.
3761         * icall.c: Fixed output_debug declaration to gunichar2*.
3762         * mono-config.c: Reduced warnings when compiling on windows.
3763         * rand.c: Added missing "windows.h". Added missing return value.
3764         * rawbuffer.c: Added missing winsock2.h for windows.
3765         * sysmath.h: Added mono-compiler.h header to allow/ease 
3766         compilation with non-GCC compilers.
3767         * threads.c: Fixed declarations to compile with VS.NET C compiler.
3768         Removed cast warnings.
3769
3770         Adapted from the work of J Lothian (for VC6).
3771
3772 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
3773
3774         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
3775         from default_path.
3776
3777 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
3778
3779         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
3780         the 2.0 profile.
3781
3782 2005-03-27  Raja R Harinath  <harinath@gmail.com>
3783
3784         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
3785         has to be in $(exec_prefix).  $(prefix) is for arch-independent
3786         stuff, and it would probably use $(prefix)/share rather than
3787         $(prefix)/lib.
3788
3789 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3790
3791         * console-io.c: added 2 includes that might be missing.
3792
3793 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
3794
3795         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
3796         profile.
3797
3798         * reflection.c (create_custom_attr): Allocate the params array using
3799         alloca so it gets GC tracking.
3800
3801 2005-03-23  Chris Toshok  <toshok@ximian.com>
3802
3803         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
3804         out some spew.
3805
3806 2005-03-24  Raja R Harinath  <rharinath@novell.com>
3807
3808         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
3809         changes to pick up any changes in prefix, etc.
3810
3811 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
3812
3813         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
3814         
3815         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
3816         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
3817
3818 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
3819
3820         * class-internals.h object-internals.h class.c reflection.c: Extend the
3821         mono_lookup_dynamic_token () function to return the class of the
3822         token as well. 
3823
3824         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
3825         well. Fixes #73848.
3826
3827 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
3828
3829         * security-manager.c: Skip inheritance checks for intra-corlib
3830         class inheritance and method overrides. This skips a lot of checks
3831         and (anyway) permissions cannot work until corlib is loaded.
3832
3833 2005-03-23  Martin Baulig  <martin@ximian.com>
3834
3835         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
3836         MONO_TYPE_GENERICINST.  
3837
3838 2005-03-23  Martin Baulig  <martin@ximian.com>
3839
3840         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
3841
3842 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3843
3844         * class.c: added locking comments to some functions.
3845         Cache the interface offsets arrays (saves about 20 KB
3846         of runtime memory in a typical app).
3847         Reduce the time overhead in mono_class_setup_supertypes ().
3848
3849 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
3850
3851         * icall.c: speedup and fix leaks in GetMethodsByName and
3852         GetPropertiesByName.
3853
3854 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3855
3856         * reflection.c: some locking fixes.
3857
3858 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
3859
3860         * metadata.c: added missing break in case statement.
3861
3862 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
3863
3864         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
3865         typedbyref return values. Fixes #73941.
3866
3867 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
3868
3869         * security-manager.c|h: Added demandunmanaged method and 
3870         suppressunmanagedcodesecurity class to MonoSecurityManager.
3871         Renamed aptc class to allowpartiallytrustedcallers.
3872
3873 2005-03-17  Martin Baulig  <martin@ximian.com>
3874
3875         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
3876
3877 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3878
3879         * file-io.c: disabled file async. IO using aio_*. It uses the
3880         threadpool now. Workaround for bug #73718.
3881
3882 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3883
3884         * assembly.h, mono-config.c: added code to deal with bundled configs
3885         for bundled assemblies.
3886
3887 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
3888
3889         * *.c, private.h: cleanup, removing old private.h header file.
3890
3891 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
3892
3893         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
3894         and throw_on_unmappable_char attributes.
3895
3896 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
3897
3898         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
3899         _ProcessName_internal.
3900
3901 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
3902
3903         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
3904         #73631.
3905
3906         * icall.c threads.c threads-types.h: Remove slothash icalls as they
3907         are no longer used.
3908
3909 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
3910
3911         * object.c (compute_class_bitmap): Add support for generics. Fixes
3912         #73527.
3913
3914 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
3915
3916         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
3917
3918 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3919
3920         * filewatcher.c: commented out the code for windows watcher, as we don't
3921         use it (we use the managed implementation instead).
3922
3923 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
3924
3925         * object-internals.h (MonoThread): Remove 'unused1' field.
3926
3927         * appdomain.c: Bump corlib version.
3928
3929         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
3930
3931         * reflection.c (mono_reflection_create_runtime_class): Remove the
3932         AssemblyBuilder.Save optimization since it causes too many problems.
3933
3934 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
3935
3936         * exception.c|h: Added mono_get_exception_reflection_type_load to
3937         create a ReflectionTypeLoadException object.
3938         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
3939         to return NULL is a InheritanceDemand fails during reflection. Updated
3940         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
3941         ReflectionTypeLoadException if an InheritanceDemand fails during 
3942         reflection. Added icall mapping for GetLinkDemandSecurity.
3943         * security-manager.c|h: Added ves_icall_System_Security_
3944         SecurityManager_GetLinkDemandSecurity internal call to return the
3945         class and methods permissions set for a LinkDemand. Removed unused
3946         fields in MonoSecurityManager.
3947
3948 2005-03-10  Martin Baulig  <martin@ximian.com>
3949
3950         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
3951         it's a generic instance.
3952
3953 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
3954
3955         * reflection.c (mono_get_object_from_blob): Applied patch from
3956         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
3957
3958         * class.c (mono_class_is_assignable_from): Another try at fixing 
3959         #73469 without breaking anything.
3960
3961 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
3962
3963         * class.c: (mono_class_is_assignable_from): Revert the last changes
3964         since they don't work with generics.
3965         
3966         * class.c (mono_class_is_assignable_from): Fix build bustage.
3967
3968         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
3969         the managed IsAssignableFrom method. Fixes #73469.
3970
3971         * reflection.c (mono_reflection_call_is_assignable_from): New helper
3972         function.
3973
3974 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
3975
3976         * object.c (mono_load_remote_field_new): Fix returning uninitialized
3977         memory when the remoting callback does not sets the out arguments.
3978         Fixes #73007.
3979
3980         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
3981         by mistake.
3982
3983         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
3984
3985         * object-internals.h (MonoStackFrame): Sync with managed object layout.
3986
3987         * appdomain.c: Bump corlib version.
3988
3989 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
3990
3991         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
3992         function.
3993
3994         * threads.c (mono_thread_attach): Detect threads which are not started
3995         by the GC pthread wrappers.
3996
3997 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
3998
3999         * icall.c: Added new icall for RNG.
4000         * rand.c|h: Added new icall to open the RNG. This allows to share a 
4001         single handle on Linux to access /dev/urandom and fix #73183.
4002
4003 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4004
4005         * object.c: setting the new vtable in a transparent proxy object must
4006         not change the GC descriptor.
4007
4008 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4009
4010         * object.c: fixed compilation without GCJ support.
4011         * reflection.c: for runtime-created types ensure klass->has_references
4012         is correct (bug #73215).
4013
4014 2005-03-02  Martin Baulig  <martin@ximian.com>
4015
4016         * class.c (mono_class_is_assignable_from): Make this work if
4017         `oklass' is a generic instance; fixes #72831.
4018
4019 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
4020
4021         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
4022         with hasthis set.
4023         
4024         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
4025
4026         * marshal.c: Reorganize native->managed marshalling code to also use
4027         the emit_marshal_... functions.
4028
4029 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4030
4031         * object.c: typed allocs have issues with bitmap sizes > 30,
4032         so check for max_set >= 30.
4033
4034 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
4035
4036         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4037         managed code. Fixes #73012.
4038
4039         * metadata.h (MonoMarshalSpec): Add elem_mult field.
4040
4041         * metadata.c reflection.c: Load/Emit elem_mult as well.
4042         
4043         * metadata.h (MonoMarshalSpec): Add comment.
4044
4045         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
4046
4047         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
4048         num_elem to -1 if not given.
4049
4050         * object-internals.h (MonoReflectionMarshal): Add has_size field.
4051
4052         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
4053         given values.
4054
4055 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
4056
4057         * null-gc.c (mono_gc_free_fixed): Was not compilable.
4058
4059 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
4060
4061         * reflection.c (encode_marshal_blob): Encode param_num field as well.
4062
4063         * object-internals.h (MonoReflectionMarshal): Add param_num field.
4064
4065 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4066
4067         * object.c: generalized the reference bitmap creation
4068         and added hooks for the new GC.
4069         * class-internals.c: removed the gc_bitmap field from MonoClass.
4070
4071 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4072
4073         * domain.c: help the compiler to produce better code
4074         in mono_jit_info_table_find ().
4075
4076 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4077
4078         * object.c: make all allocations look typed.
4079
4080 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4081
4082         * socket-io.c: load Mono.Posix if it's not loaded already
4083         (fixes bug#73033).
4084
4085 2005-02-24  Martin Baulig  <martin@ximian.com>
4086
4087         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
4088         * reflection.c (dup_type): Likewise.
4089
4090 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
4091
4092         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
4093         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
4094
4095 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4096
4097         * domain.c, threads.c, object-internals.h: make the critical thread
4098         local vars use the fast access mode (even when we're compiled in
4099         a lib). Provide accessors to be used by the jit during codegen.
4100
4101 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4102
4103         * appdomain.c: Changed hook functios behavior to include
4104         support for the reflection only assemblies. Some icalls were changed
4105         to support the mentioned assemblies too. Signatures of static methods
4106         try_assembly_resolve and real_load now have an additional parameter:
4107         refonly.
4108
4109         * assembly.c: General changes to mono_assembly_ methods to support
4110         reflection only api. Functions mono_assembly_open, mono_assembly_load,
4111         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
4112         suffix, to support an additional gbool parameter to specify whether
4113         the assembli is reflection only or not. Created some new hook functions 
4114         to add support for reflection only assemblies. Signatures of static 
4115         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
4116         have now an additional parameter: refonly.
4117
4118         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
4119         indicating whether the assembly is reflection only or not.
4120
4121         * exception.c: Add mono_get_exception_invalid_operation.
4122
4123         * icall.c: Throw an InvalidOperationException when trying to invoke
4124         a property/method/event, or trying to set/get the value of a field.
4125         Also add an icall to retrieve the ref_only flag to the
4126         MonoReflectionAssembly.
4127
4128 2005-02-23  Chris Toshok  <toshok@ximian.com>
4129
4130         Part of fix for #72827.
4131         * mono-debug.c (mono_debug_add_method): add lexical block data to
4132         the info we write.  Kind of a hack at the moment - we copy the
4133         lexical block info from the MonoDebugMethodInfo to the
4134         MonoDebugMethodJitInfo here, before writing it.
4135         (mono_debug_read_method): read the lexical block info.
4136
4137         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
4138
4139         * debug-mono-symfile.h: add lexical block support.
4140
4141         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
4142         support.
4143
4144 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4145
4146         * loader.c (mono_lookup_pinvoke_call): Fix warning.
4147
4148         * object.c (mono_runtime_free_method): Call mono_free_method () and
4149         put the TODOs there.
4150
4151         * loader.c (mono_free_method): Free up most memory allocated for 
4152         dynamic methods.
4153
4154 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4155
4156         * reflection.c: properly flag a Type argument to a
4157         named custom attr value (bug #72248).
4158
4159 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4160
4161         * reflection.c: reduce code duplication in named custom
4162         attribute encoding.
4163
4164 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
4165
4166         * reflection.c: properly encode custom attrs of type object
4167         (bug #72649).
4168
4169 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4170
4171         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
4172
4173 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
4174
4175         * socket-io.c: load System.dll if it's not loaded already
4176         (bug #72850 and #70477).
4177
4178 2005-02-21  Martin Baulig  <martin@ximian.com>
4179
4180         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4181         generic instances.
4182
4183 2005-02-21  Martin Baulig  <martin@ximian.com>
4184
4185         * reflection.c (mono_image_build_metadata): We also need to
4186         "fixup" the MethodImpl table after we computed the final method
4187         indices.  Call fixup_methodimpl() to do that.
4188         (fixup_methodimpl): New private method.
4189
4190 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4191
4192         * assembly.c: special case mscorlib.dll (bug#72536),
4193         patch from Carlos Alberto Cortez.
4194
4195 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
4196
4197         * threads-types.h threads.c: Fix build bustage.
4198
4199         * threads.c: Use a union for long<->double conversions.
4200
4201         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
4202         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
4203
4204         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
4205         containing the checkpoint call with NOT_TAKEN.
4206         
4207         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
4208         checkpoint before pushing the arguments, so they won't have to be
4209         spilled to stack.
4210
4211 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4212
4213         * domain.c, assembly.c, domain-internals.h: make some data
4214         const and relocation-free.
4215
4216 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4217
4218         * object.c, appdomain.c, class-internals.h: introduce the
4219         MonoClassRuntimeInfo structure to hold the info needed to
4220         use a class at runtime. Made mono_class_vtable() lock-free
4221         for all the appdomains.
4222
4223 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
4224
4225         * metadata-internals.h, image.c: introduce a per-image mempool to
4226         be used for memory that has the same lifetime as the image.
4227
4228 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
4229
4230         * domain.c: In mono_init_internal(), instead of selecting the first
4231         runtime version supported by an executable, get a list of all
4232         supported versions and select the one for which an mscorlib exists
4233         (since even if the runtime supports a given version, it doesn't mean
4234         that the framework for that version is installed).
4235         Modified get_runtimes_from_exe to support this behavior.
4236         In supported_runtimes, added information about additional system
4237         assembly versions.
4238         
4239         * assembly.c: Added support for more than one system assembly version
4240         per runtime version. Updated the assembly list.
4241         In mono_assembly_remap_version, removed the initial version check,
4242         since we don't know to which version we need to compare until we
4243         get the version set on which the assembly is based.
4244         Moved the code for loading corlib into the new method
4245         mono_assembly_load_corlib(), so it can be used by the initialization
4246         code.
4247         
4248         * domain-internals.h: Updated data structures and added declaration
4249         for mono_assembly_load_corlib.
4250
4251 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4252
4253         * reflection.c (resolve_object): Fix the creation of the signature in 
4254         the SignatureHelper case.
4255
4256         * assembly.c (mono_assembly_remap_version): Fix binary search.
4257         
4258 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
4259  
4260         * class.c: Added inheritance check when a method is overloaded (from a
4261         virtual method or when implementing an interface) and when a class is
4262         inherited. Added functions to set a failure for a class and to 
4263         retreive the exception from a failure.
4264         * class-internals.h: Added fields to MonoClass to keep the exception
4265         information status for inheritance (or other exceptions) to be thrown
4266         later (i.e. not at load time).
4267         * object.c: Throw the inheritance SecurityException when a type is to 
4268         be created with either class or method inheritance violations.
4269         * reflection.c|h: Fix when getting declsec from a class. Removed 
4270         unrequired code for class. Improved sanity in parameter naming.
4271         * security-manager.c|h: Added functions to check for class and method
4272         inheritance.
4273
4274 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4275
4276         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
4277         and has_finalize in dynamic types as well.
4278
4279 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
4280
4281         * culture-info-table.h : fixed currency format for en-GB (and so on).
4282
4283 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
4284
4285         * gc.c: ensure the GC handles never have 0 as a value.
4286
4287 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
4288
4289         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
4290         a pointer to a struct to unmanaged code. Fixes #72625.
4291
4292 2005-02-16  Martin Baulig  <martin@ximian.com>
4293
4294         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
4295
4296 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
4297
4298         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
4299
4300 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
4301
4302         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
4303
4304         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
4305         UnmanagedFunctionPointerAttribute, use it for determining calling convention
4306         etc. Fixes #71471.
4307
4308         * reflection.c (mono_custom_attrs_get_attr): New helper function.
4309
4310         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
4311
4312 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
4313
4314         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
4315         changes to make the current context a field in MonoThread.
4316
4317 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
4318
4319         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
4320         the last change.
4321         
4322         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
4323         extracted from mono_marshal_get_native_wrapper.
4324
4325         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
4326         to create wrappers around native functions.
4327
4328         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
4329         delegates for arbitrary function pointers. Fixes #71472.
4330
4331 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4332
4333         * threads.c: cleaned up the code a little.
4334
4335 2005-02-15  Martin Baulig  <martin@ximian.com>
4336
4337         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
4338         the data table.
4339
4340         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
4341         allocate larger chunks if needed.
4342
4343 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
4344
4345         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
4346         in by mistake.
4347
4348 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
4349
4350         * domain.c: keep the domains in an array and ensure the domain ids
4351         are kept small, so they can be used as indexes to domain-specific data
4352         with a small memory overhead.
4353
4354 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
4355
4356         * icall.c: Handle byref types in Type icalls. Fixes #72544.
4357
4358 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
4359
4360         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
4361
4362 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
4363
4364         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
4365
4366         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
4367         values.
4368
4369         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
4370         
4371 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
4372
4373         * domain-internals.h: add the hashtable here.
4374
4375         * class-internals.h: Remove `info' from MonoMethod
4376
4377         * domain.c: Add a new hashtable, jit_trampoline_hash
4378
4379 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4380
4381         * object.c: don't set the value of static fields
4382         (fixes bug#72494).
4383
4384 2005-02-11  Martin Baulig  <martin@ximian.com>
4385
4386         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
4387         (mono_debug_add_method): Silently ignore the method if it's too big.
4388         (mono_debug_add_type): Likewise.
4389
4390 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
4391
4392         * threads.c, appdomain.c: remove #ifdefs from the code.
4393
4394 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
4395
4396         * metadata-internals.h: Added flags to MonoAssembly to cache the most
4397         common security informations. This allows us to stay in unmanaged code
4398         when doing LinkDemand and it's special cases (except for the first 
4399         time for initialization). The flags a very much used with --security.
4400         * reflection.c|h: Added code to get declarative security attributes 
4401         for LinkDemand and InheritanceDemand. This required to refactor the
4402         existing code for Demand.
4403         * security-manager.c|h: Added new method fields for the special cases
4404         of LinkDemand.
4405
4406 2005-02-10  Martin Baulig  <martin@ximian.com>
4407
4408         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
4409         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
4410
4411 2005-02-10  Martin Baulig  <martin@ximian.com>
4412
4413         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
4414         debugging code; this is almost a complete rewrite.
4415
4416         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
4417
4418 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4419
4420         * domain.c, object.h: expose mono_string_equal () and 
4421         mono_string_hash ().
4422         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
4423         it's implemented in managed code.
4424
4425 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4426
4427         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
4428         lo leak objects between appdomains.
4429
4430 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4431
4432         * assembly.c: old compilers compilation fix from 
4433         robertj@gmx.net (Robert Jordan).
4434
4435 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
4436
4437         * class-internals.h: Little reminder for the future.
4438
4439         * debug-helpers.c: Fix up wrapper_type_names
4440
4441 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4442
4443         * image.c, metadata-internals.h: when loading an image from a file,
4444         mmap all of it and use the same codepaths as when using a
4445         in-memory image: the code is simpler and we use less memory
4446         (both writable and readonly).
4447
4448 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
4449
4450         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
4451         API to alloc runtime data structures that need to be tracked by the
4452         GC and contain pointers.
4453         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
4454         make the code more readable and eventually use a different GC.
4455
4456 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
4457
4458         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
4459         for out arguments.
4460         
4461 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
4462
4463         * object.c: In release_type_locks(), don't release the cctor lock
4464         if it has already been released. This fixes a crash in the
4465         thread5 test.
4466
4467 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4468
4469         * gc.c, marshal.c, icall.c: register a delegate for finalization
4470         only when the native function pointer has been allocated for it.
4471
4472 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4473
4474         * object.c: cleaned up some code, allocate objects that are
4475         pointer free with the atomic malloc variant. Allocate memory
4476         for static data from the mempool if it's pointer-free.
4477         Allocate the bounds array at the end of the array data, when needed.
4478         * object-internals.h, object.h: move a private function in a private
4479         header.
4480         * class.c: handle missing case in tracking references in fields.
4481
4482 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
4483
4484         * class.c, class-internals.h: keep track if a type has
4485         reference fields in either the instance or static fields.
4486
4487 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
4488
4489         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
4490         and renamed to MonoRuntimeInfo. Added fields to store the expected
4491         framework assembly version. Changed mono_get_framework_version and
4492         mono_get_runtime_version for a single mono_get_runtime_info method.
4493         
4494         * assembly.c: Added method to remap system assembly versions to the
4495         current executing runtime version. Removed old mapping code.
4496         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
4497         
4498         * icall.c, reflection.c: Track api changes.
4499
4500 2005-02-06  Miguel de Icaza  <miguel@novell.com>
4501
4502         * loader.c (method_from_memberref): Improve error reporting,
4503         produce the class name instead of the typeref/typedef index. 
4504
4505 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
4506
4507         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
4508
4509 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
4510
4511         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
4512         stdcall and charset name mangling.  Reorganize the code and add
4513         some tracing stuff.
4514
4515 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
4516
4517         * monodiet.c: More iters!
4518
4519         * marshal.c: Iter usage.
4520
4521         * icall.c: Iter usage.
4522
4523         * object.c: Use iters.
4524
4525         * debug-helpers.c: More iters
4526
4527 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
4528
4529         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
4530         under win32.
4531
4532 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
4533
4534         * mono-debug-debugger.c: use iters
4535
4536         * class.c, class-internals.h: mono_class_setup_events is static
4537         now
4538
4539         * All callers: use iters
4540
4541 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
4542
4543         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
4544         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
4545
4546 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
4547
4548         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
4549
4550         * marshal.h: Add prototypes for ldfld/stfld_remote.
4551
4552         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
4553         this is called during startup.
4554         
4555 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
4556
4557         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
4558         MonoThreadsSync struct private in monitor.c. Changed the way
4559         MonoThreadsSync is allocated so it's faster and there is no
4560         need to keep track of it with a finalizer and it uses less memory.
4561         This also finally allows us to allocate mono objects as ptrfree when
4562         there are no reference fields.
4563
4564 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
4565
4566         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
4567         disappearing link to the GC interface and use them to simplify
4568         the gchandles code.
4569
4570 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
4571
4572         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
4573         stfld_remote which call mono_load/store_field_new. This allows methods
4574         calling ldfld/stfld wrappers to be AOTed.
4575
4576         * console-io.c: Include sys/filio.h under solaris.
4577         
4578         * console-io.c: Include curses.h if needed correctly.
4579
4580 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
4581         
4582         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
4583         method->klass as well.
4584
4585         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
4586
4587         * class.c (mono_class_init): Switch on lazy initialization of 
4588         methods.
4589
4590         * class.c (mono_class_get_finalizer): Handle the case when the 
4591         finalizer is inherited.
4592
4593 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4594
4595         * console-io.c: <curses.h> is needed by term.h on solaris.
4596
4597 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
4598
4599         * icall.c, class-internals.h, monodiet.c, class.c: Remove
4600         mono_class_setup_properties where possible. Remove this ftn from
4601         the header file, and make it static.
4602
4603 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
4604
4605         * loader.c: Add missing setup_... call.
4606
4607         * class.c: Add missing setup_... calls.
4608
4609         * class.c (mono_class_init): Switch on lazy initialization of 
4610         the generic vtable.
4611         
4612         * class.c (mono_class_init): Fix generics broken by the recent changes.
4613
4614         * monodiet.c (handle_type): Add missing setup_... calls.
4615
4616         * class.c: Back out garbage in previous patch.
4617         
4618         * class.c: Add missing setup_... calls.
4619
4620         * class.c (mono_class_get_method_from_name_flags): Avoid calling
4621         mono_class_setup_methods () if possible.
4622
4623         * class-internals.h (MonoClass): Add 'has_cctor' flag.
4624
4625         * class-internals.h (MonoCachedClassInfo): New structure.
4626
4627         * class.c: Initialize properties and events fields of MonoClass lazily.
4628
4629         * class.c: Add infrastructure for lazily initializing the methods and
4630         vtable fields of MonoClass. Not yet used.
4631
4632         * class.c (mono_class_get_finalizer): New helper function.
4633
4634         * class.c: Add infrastructure for loading some class related data from
4635         an AOT file.
4636
4637         * object.c: Add infrastructure for initializing the vtable from data
4638         in the AOT file.
4639
4640         * gc.c (run_finalize): Use mono_class_get_finalizer ().
4641
4642         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
4643         appropriate initialization function before accessing parts of the
4644         MonoClass structure.
4645
4646         * marshal.c: Fix warnings.
4647         
4648         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
4649
4650         * mono-debug-debugger.c (get_exception_message): Use 
4651         mono_class_get_method_from_name_flags ().
4652
4653 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
4654
4655         * reflection.c, appdomain.c: Replace a few manual searches that
4656         Zoltan missed. (Paolo approved this part of my initial patch).
4657
4658 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
4659
4660         * profiler.c: disable recording statistical events at report time.
4661
4662 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4663
4664         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
4665         to byteswap arrays of enum values, too (bug #72080).
4666
4667 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
4668
4669         * appdomain.c (set_domain_search_path): Allow this to be called if
4670         domain->setup is not yet set.
4671
4672         * loader.c (mono_method_get_index): New helper function.
4673
4674         * loader.c reflection.c: Use mono_method_get_index ().
4675
4676         * class.c (mono_class_get_method_from_name_flags): New helper method.
4677
4678         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
4679         this.
4680
4681         * class.c (mono_class_get_cctor): New helper method.
4682
4683         * string-icalls.c object.c class.c marshal.c reflection.c: Use
4684         mono_class_get_method () to look up methods.
4685
4686 2005-02-01  Miguel de Icaza  <miguel@novell.com>
4687
4688         * console-io.c: Fix the build, this should work on Windows.
4689
4690 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
4691
4692         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
4693         be set to null to keep things valid
4694
4695 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4696
4697         * icall.c: added Console 2.0 icalls.
4698         * Makefile.am: added console-io.[ch]
4699         * console-io.[ch]: internal calls for Console 2.0 API.
4700
4701 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4702
4703         * class.c: make sure we consider all the interfaces
4704         when calculating max_interface_id (bug found by
4705         Jeroen Frijters running ikvm).
4706
4707 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
4708
4709         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
4710         valuetype fields to null.
4711
4712         * object.c (set_value): Ditto. Fixes #71669.    
4713
4714 2005-01-31  Martin Baulig  <martin@ximian.com>
4715
4716         * metadata.c (mono_metadata_has_generic_params): New public
4717         function; checks whether something is a generic method.
4718
4719 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
4720
4721         * appdomain.c: fix infinite recursion when adding assemblies.
4722
4723 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
4724
4725         * object.c: Fix small typo to return all items for Environment.
4726         GetCommandLineArgs.
4727
4728 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4729
4730         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
4731         reflection.c: more domain and assembly-unload related fixes
4732         and memory leaks plugs.
4733
4734 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
4735
4736         * 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.
4737
4738 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
4739
4740         * loader.c (mono_method_signature): Make this method lazy
4741         (mono_get_method_from_token): Don't computate the signature here.
4742
4743         Doing this saves quite a bit of memory. I got 90 kb on starting up
4744         monodoc. It should also save some disk reads on startup.
4745
4746         * *: MonoMethod->signature might be NULL now. You *MUST* use
4747         mono_method_signature.
4748
4749 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
4750
4751         * object.c (mono_runtime_get_main_args): Return an array from the
4752         current domain here. Fixes #71938.
4753
4754 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
4755
4756         * monitor.c: formatting changes to comply with the
4757         mono coding style and remove #ifdefs from the code.
4758
4759 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4760
4761         * metadata.c, private.h: remove some unneeded data
4762         and use a more compact representation for table schemas.
4763
4764 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
4765
4766         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
4767         to get a better distribution in hash tables.
4768         * *.c: use mono_aligned_addr_hash() where appropriate.
4769         * assembly.c: make var static.
4770
4771 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
4772
4773         * domain-internals.h: Put MonoJitInfo on a diet.
4774
4775         * domain.c: Fix a warning.
4776
4777 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4778
4779         * gc.c: rework the gc handles code to reuse handles
4780         when freed.
4781
4782 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4783
4784         * domain.c: fixed long standing bug in mono_string_equal() which
4785         was brought to light with the ldstr changes.
4786
4787 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
4788
4789         * reflection.c: Remove warning by adding missing include for marshal.h
4790
4791 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4792
4793         * domain.c, object.c: change the ldstr_table to hold
4794         MonoString* as keys: makes the runtime isinterned lookup
4795         faster and simplifies memory management.
4796
4797 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
4798  
4799         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
4800         possible to add imperative security checks before calling the icall.
4801         * reflection.c: Return security attributes on the original MonoMethod
4802         (and not the wrapped one). This fix permissions on icalls.
4803
4804 2005-01-25  Dick Porter  <dick@ximian.com>
4805
4806         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
4807         the check for mktime() support actually test the mktime() return
4808         value.  "Fixes" bug 71682, though the output is still different to
4809         MS.
4810
4811 2005-01-25  Martin Baulig  <martin@ximian.com>
4812
4813         * class.c (mono_class_is_assignable_from): Make this work for
4814         generic instances.
4815
4816 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
4817
4818         * marshal.c (mono_string_utf8_to_builder)
4819         (mono_string_builder_to_utf16): We might not have ownership of the
4820         string. In thise case, we need to create a new buffer.
4821
4822         * object-internals.h (mono_stringbuilder_capacity): sb->str might
4823         be null, in which case, use the default capacity.
4824
4825 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4826
4827         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
4828         GC events to the profiler.
4829
4830 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4831
4832         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
4833         if you don't want the GC to run.
4834
4835 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
4836
4837         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
4838         start providing a GC API and keeping different implementations in
4839         their own file.
4840         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
4841
4842 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
4843
4844         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
4845         mmap rather than allocating a huge buffer.
4846         (mono_debug_close_mono_symbol_file): Free the buffer allocated
4847         above.
4848
4849 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
4850
4851         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
4852         and CheckExecutionRights.
4853         * reflection.c|h: Keep the index of the declarative security to be 
4854         used, instead of the pointer, when AOT compiler is used. Also add 
4855         class initialization when requesting demands.
4856         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
4857         CheckExecutionRights. Both properties are now FALSE by default, and
4858         unmodifiable, unless the --security option is used.
4859
4860 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4861
4862         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
4863         reflection.c: properly refcount images and assemblies, many leaks fixed.
4864
4865 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4866
4867         * threadpool.c: increase the timeout for threads in the thread pool to
4868         10s.  Fixes bug #67159.
4869
4870 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
4871
4872         * class-internals.h: Sun's compiler insists on explicit
4873         signed on bit fields to handle then correctly.
4874
4875 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
4876
4877         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
4878         Make the size of the array fit only the number of invalid path
4879         chars that we have.
4880
4881         * class.c (_mono_class_get): Improve the error reporting when a
4882         class referenced is not found, to assist debugging. 
4883
4884 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
4885
4886         * threads.c: fix off-by-one error.
4887         * domain.c: free data allocated in the domain.
4888
4889 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
4890
4891         * reflection.c (mono_method_body_get_object): Fill out exception info
4892         as well.
4893
4894         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
4895         structure.
4896         
4897 2005-01-19  Martin Baulig  <martin@ximian.com>
4898
4899         * loader.c (mono_get_method_constrained): Make this work again.
4900
4901 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
4902
4903         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
4904         guint16 to match the managed side.
4905
4906         * reflection.c (mono_reflection_body_get_object): Fill out local
4907         variables array.
4908
4909         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
4910         as well.
4911
4912         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
4913         'local_var_sig_token'.
4914
4915 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
4916
4917         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
4918         System.Drawing.
4919
4920         * reflection.c (mono_method_body_get_object): Handle abstract and
4921         runtime methods.
4922
4923 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
4924
4925         * marshal.c, loader.c, class-internals.h, reflection.c:
4926         store the emthod data for a wrapper in an array instead of a list.
4927
4928 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
4929
4930         * marshal.c: change the code to allocate memory more
4931         conservatively for method wrappers.
4932
4933 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
4934
4935         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
4936         fields from MonoClass to the marshal info structure where they belong.
4937
4938 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4939
4940         * class.c, object.c, class-internals.h, marshal.c: rearrange
4941         some fields and tweak some types to lower memory usage.
4942
4943 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
4944
4945         * threads.c (signal_thread_state_change): Handle the case when the
4946         target thread is the current thread.
4947
4948         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
4949
4950         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
4951         emit_ptr_to_object_conv. 
4952
4953         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
4954         marshalling. Fixes #71352.
4955
4956 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4957
4958         * metadata.h, blob.h: move table enum to blob.h so it can be included
4959         in any header.
4960         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
4961         cut the size of MonoImage/MonoDynamicImage.
4962
4963 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
4964
4965         * profiler.c (mono_profiler_install_simple): Fix default arguments.
4966
4967 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
4968
4969         * reflection.c, reflection.h, icall.c: add a function to check
4970         if an attribute type is defined for a metadata object.
4971
4972 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
4973
4974         * object-internals.h: Added some needed fields from StringBuilder class.
4975         * marshal.c: Set the maxCapacity when creating a StringBuilder.
4976
4977 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
4978
4979         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
4980         threads before shutting down the runtime.
4981
4982         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
4983
4984 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4985
4986         * object-internal.h, threads.c: implement stacksize and 
4987         parameterized thread start functionality (requires
4988         matching corlib). Marked broken code for later removal.
4989
4990 2005-01-12  Martin Baulig  <martin@ximian.com>
4991
4992         * class-internals.h (MonoGenericClass): Moved the `initialized'
4993         flag to MonoDynamicGenericClass, removed `init_pending'.
4994         (MonoGenericInst): Added `is_reference' flag.
4995
4996 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
4997
4998         * reflection.c (mono_image_create_pefile): Only set the pe_offset
4999         inside the MSDOS header. Fixes #71201.
5000
5001         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
5002         gc thread.
5003         (mono_domain_finalize): Ditto.
5004
5005 2005-01-12  Martin Baulig  <martin@ximian.com>
5006
5007         * class.c (mono_get_shared_generic_class): Use the cache for
5008         non-dynamic generic classes.
5009
5010         * class-internals.h (mono_class_create_generic_2): Removed
5011         function prototype, this function is now static inside class.c.
5012
5013         * class.c (mono_class_create_generic_2): Made this static, only
5014         call it from mono_class_init() and mono_class_setup_parent().
5015         (collect_implemented_interfaces_aux): Call mono_class_init() on
5016         the interfaces we collect.
5017         (mono_class_setup_vtable): Call mono_class_init (class->parent).
5018
5019 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5020
5021         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
5022         it a real thread handle.
5023
5024         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
5025         MonoJitExceptionInfo, since each catch clause needs its own variable.
5026         
5027 2005-01-11  Dick Porter  <dick@ximian.com>
5028
5029         * image.c (mono_pe_file_open): New variant on mono_image_open()
5030         that does not set up the CLI metadata; used for FileVersionInfo so
5031         it can get the data for windows binaries too.
5032         
5033         * process.c (process_read_string_block): Don't read off the end of
5034         the StringTable block.
5035
5036         These both fix bug 70766.
5037
5038 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
5039
5040         * gc.c: set some fields to NULL at GC cleanup time.
5041         * threads.c: if we quit the main thread, call exit ().
5042
5043 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5044
5045         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
5046
5047 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
5048
5049         * threads.h, threads.c, object.c: added accessor and settor for
5050         main_thread. Handle it specially when exiting from it: wait
5051         for other foreground threads to exit.
5052
5053 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5054
5055         * process.c, verify.c: remove some bloat.
5056
5057 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
5058
5059         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
5060         the calling convention to cdecl under win32.
5061
5062 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
5063
5064         * object.c (mono_object_get_size): New function to get the size of
5065         an object instance.
5066
5067         * profiler.c (simple_allocation): Use above.
5068
5069 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
5070
5071         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
5072         ves_icall_System_AppDomain_getRootDomain (as it's not required to
5073         get an appdomain by it's id and we can't assume the root's id is 0).
5074         * domain-internals.h: Change the function prototype to match.
5075         * icall.c: Change the icall table for AppDomain.
5076
5077 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
5078
5079         * locales.c (string_invariant_compare_char): Only compute
5080         GUnicodeTypes in the case where we need them.  Test for ordinality
5081         first and return if so.
5082
5083         From the commit:
5084
5085                 /*
5086                  * FIXME: here we must use the information from c1type and c2type
5087                  * to find out the proper collation, even on the InvariantCulture, the
5088                  * sorting is not done by computing the unicode values, but their
5089                  * actual sort order.
5090                  */
5091
5092 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5093
5094         * loader.c: for P/Invoke methods, allow the "Internal" shared
5095         library name to refer to the calling process symbol namespace.
5096
5097 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
5098
5099         * Makefile.am: Add the security manager to the build.
5100         * security-manager.c|h: New. Initialization of the security manager.
5101
5102 2005-01-07  Dick Porter  <dick@ximian.com>
5103
5104         * threads.c: 
5105         * monitor.c: Update thread state during Monitor and WaitHandle
5106         waits.  Fixes bug 71031.
5107
5108 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
5109
5110         * reflection.c (property_encode_signature): Correctly handle when the
5111         property has no methods.
5112
5113 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
5114
5115         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
5116         
5117         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
5118         fields from mb, not rmb. Fixes #71017.
5119
5120         * marshal.c (emit_ptr_to_str_conv): Add support for 
5121         ByValTStr -> string conversion. Fixes #71015.
5122
5123         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
5124
5125         * mempool.c (mono_mempool_contains_addr): New helper function.
5126
5127 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5128
5129         * metadata.c (mono_metadata_compute_size): Fix size calculation of
5130         HasSematics encoded fields.
5131         
5132         * metadata.c (mono_type_to_unmanaged): Improve error message for 
5133         invalid string marshalling.
5134
5135         * metadata.c: Fix warnings.
5136         
5137 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5138
5139         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
5140         profiler support.
5141
5142 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5143
5144         * domain.c object.c domain-internals.h: Revert part of r38077 since the
5145         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
5146         tests.
5147
5148 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
5149
5150         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
5151         so methods containing these can be AOTed.
5152
5153 2005-01-03  Martin Baulig  <martin@ximian.com>
5154
5155         * loader.c (find_method): Removed the hack for generic instances.
5156         (method_from_memberref): If our parent is a generic instance, pass
5157         its generic type definition to find_method() and then inflate the
5158         method.
5159         (mono_get_method_constrained): Pass the generic type definition to
5160         find_method() and inflate the method later.
5161
5162         * class-internals.h (MonoStats): Added `generic_class_count'.
5163
5164         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
5165         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
5166
5167         * reflection.c (mono_custom_attrs_from_params): Don't ignore
5168         generic type definitions.
5169
5170 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
5171
5172         * loader.c icall.c: Fix warnings.
5173
5174 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
5175
5176         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
5177         blittable types. Fixes #70864.
5178
5179 2004-12-29  Martin Baulig  <martin@ximian.com>
5180
5181         * icall.c
5182         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
5183
5184         * reflection.c (mono_method_get_object): Create a
5185         "System.Reflection.MonoGenericMethod" for inflated methods; don't
5186         call mono_get_inflated_method().
5187
5188         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
5189
5190 2004-12-27  Martin Baulig  <martin@ximian.com>
5191
5192         * class-internals.h (MonoMethod): Added `is_inflated' flag.
5193         (MonoMethodInflated): Added `inflated' field.
5194
5195         * class.c (mono_class_inflate_generic_method): Don't really
5196         inflate the method here; just set the `is_inflated' flag in the
5197         MonoMethod.
5198         (mono_class_get_inflated_method): Actually inflate the method here
5199         if it's not already inflated; we use the MonoMethodInflated's new
5200         `inflated' field as a cache.
5201
5202 2004-12-26  Martin Baulig  <martin@ximian.com>
5203
5204         * class.c
5205         (inflate_generic_class): Moved some code out of inflate_generic_type().
5206         (mono_class_inflate_generic_method): If we're already inflated,
5207         inflate the context and use the declaring method; ie. make sure
5208         the declaring method of an inflated method is always the generic
5209         method definition.
5210         (mono_class_create_from_typedef): Create
5211         `class->generic_container->context->gclass'.
5212
5213 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
5214
5215         * metadata-internals.h, marshal.c, reflection.c: More
5216         MonoGHashTable->GHashTable.
5217
5218         * domain-internals.h, class.c: Change MonoGHashTable's into
5219         GHashTables for some cases where no gc stuff is used
5220
5221         All users: update apis
5222
5223 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
5224
5225         * metadata.c (builtin_types): Make this `const'. Makes this get
5226         put into the shareable section.
5227         (mono_metadata_init): Casts to make gcc happy.
5228
5229 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
5230
5231         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
5232
5233 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
5234
5235         * icall.c: Added an internal call to retrieve the position and length
5236         of assembly-level declarative security attributes (RequestMinimum, 
5237         RequestOptional and RequestRefuse). This is used by the Assembly class
5238         to re-create the corresponding permission sets.
5239
5240 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5241
5242         * marshal.c: fix the stelemref wrapper to be type correct
5243         (and faster).
5244
5245 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
5246
5247         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
5248         to do key & 0x7fffffff. Hashtable already does this. It just
5249         results in longer code.
5250
5251 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
5252
5253         * appdomain.c: Bump corlib version.
5254         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
5255         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
5256         * reflection.c|h: Add functions to get declarative security infos
5257         (blob position and length) for assemblies, classes and methods.
5258
5259 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
5260
5261         * reflection.c: sort the constant table (bug #70693).
5262
5263 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
5264
5265         * object-internals.h, threads.c, domain.c: add accessors for
5266         the MonoThread and MonoDomain tls keys.
5267
5268 2004-12-18  Martin Baulig  <martin@ximian.com>
5269
5270         * class.c (inflate_generic_type): If we're inflating a generic
5271         instance, set `ngclass->context->container = context->container';
5272         ie. the container we inflated into.
5273
5274         * metadata.c (mono_metadata_parse_generic_param): Reflect above
5275         inflate_generic_type() changes.
5276
5277 2004-12-17  Martin Baulig  <martin@ximian.com>
5278
5279         * class-internals.h
5280         (MonoGenericClass): Replaced `MonoType *generic_type' with
5281         `MonoClass *generic_class'.  Removed `dynamic_info'; if
5282         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
5283         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
5284
5285 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
5286
5287         * exception.c (mono_exception_from_token): New helper function.
5288
5289 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
5290
5291         * assembly.c (mono_assembly_load_with_partial_name): Call 
5292         mono_assembly_loaded before invoking the preload hooks. Fixes
5293         #70564.
5294
5295         * object-internals.h (MonoThread): Change culture_info and 
5296         ui_culture_info into an array.
5297
5298         * threads.c: Cache culture info objects from more than one appdomain.
5299
5300         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
5301         current UI culture.
5302
5303 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
5304
5305         * threads.h threads.c appdomain.c: Clear the culture_info field of
5306         all threads during unloading if they point to an object in the dying
5307         appdomain.
5308
5309 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
5310
5311         * culture-info.h (TextInfoEntry): New struct
5312         * object-internals.h: sync with managed
5313         * locales.c: fill the `text_info_data' field
5314         * culture-info-tables.h: update
5315
5316 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5317
5318         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
5319         collector.
5320
5321 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
5322
5323         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
5324         (ves_icall_ModuleBuilder_getMethodToken): Ditto
5325
5326 2004-12-12  Martin Baulig  <martin@ximian.com>
5327
5328         * mono-debug-debugger.c (write_type): If we're an enum and the
5329         builtin types have already been initialized, call mono_class_init().
5330
5331 2004-12-11  Martin Baulig  <martin@ximian.com>
5332
5333         * metadata.c (mono_metadata_load_generic_params): Added
5334         `MonoGenericContainer *parent_container' argument; automatically
5335         compute `container->is_method'; pass the correct owner to
5336         get_constraints().      
5337
5338         * reflection.c (compare_genericparam): Sort the GenericParam table
5339         according to increasing owners. 
5340
5341 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5342
5343         * profiler.c: allow disabling the default profiler.
5344
5345 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
5346
5347         * decimal.c, icall.c: allow disabling System.Decimal support.
5348
5349 2004-12-09  Marek Safar <marek.safar@seznam.cz>
5350
5351         * reflection.c: Add support for null attribute arguments.
5352
5353 2004-12-09  Martin Baulig  <martin@ximian.com>
5354
5355         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
5356         names to get rid of compiler warnings.
5357
5358 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
5359
5360         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
5361         mono_marshal_load_type_info (). Fixes #69625.
5362         (mono_marshal_get_ptr_to_struct): Likewise.
5363
5364 2004-12-08  Martin Baulig  <martin@ximian.com>
5365
5366         * mono-debug.h: Bumped version number to 47.
5367
5368         * mono-debug-debugger.c
5369         (mono_debugger_event_handler, mono_debugger_event): Take two
5370         guint64 arguments insteed of a gpointer and a guint32.  
5371
5372 2004-12-08  Martin Baulig  <martin@ximian.com>
5373
5374         * debug-mono-symfile.h
5375         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
5376         `address' to `native_offset'.
5377
5378 2004-12-08  Martin Baulig  <martin@ximian.com>
5379
5380         * class.c (mono_class_create_from_typespec): Only inflate if we
5381         either have `context->gclass' or `context->gmethod'.
5382
5383 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
5384
5385         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
5386
5387         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
5388
5389         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
5390
5391         * reflection.c (mono_assembly_get_object): Remove the workaround put
5392         in for the release.
5393         
5394         * appdomain.c: Use the corlib_internal field from MonoAssembly.
5395
5396         * appdomain.c: Bump corlib version.
5397
5398         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
5399         be visible in other appdomains.
5400
5401 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
5402
5403         * threads.c: Interlocked inc and dec for longs were messed up,
5404         use a KISS based impl for this. Fixes 70234
5405
5406 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
5407
5408         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
5409
5410 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
5411
5412         * icall.c: fix to follow policy not to allow struct
5413         arguments in icalls.
5414
5415 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5416
5417         * process.c: make the patch that handles spaces in file paths work
5418         on mono/windows too.
5419
5420 2004-12-06  Martin Baulig  <martin@ximian.com>
5421
5422         * class.c (mono_class_create_generic): Call
5423         mono_class_setup_supertypes() if we're dynamic.
5424         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
5425
5426 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
5427
5428         * object-internals.h: Add new fields to MonoThread.
5429
5430         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5431
5432         * icall.c threads-types.h threads.c: Add new icalls.
5433
5434         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
5435
5436         * object-internals.h (MonoReflectionAssembly): Sync object layout with
5437         managed side.
5438
5439         * appdomain.c: Bump corlib version.
5440
5441         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
5442         internal assemblies. Fixes #69181.
5443
5444 2004-12-05  Martin Baulig  <martin@ximian.com>
5445
5446         * class.c (mono_class_inflate_generic_signature): Make this a
5447         no-op if `context' is NULL or we don't have any type parameters;
5448         also copy `sentinelpos'.        
5449
5450 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
5451
5452         * image.c: Add unbox_wrapper_cache.
5453
5454         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
5455
5456         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
5457         function generator.
5458         
5459         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
5460         Fixes #70173.
5461
5462         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
5463         
5464 2004-12-04  Martin Baulig  <martin@ximian.com>
5465
5466         * loader.c (mono_method_get_signature_full): New public function;
5467         like mono_method_get_signature(), but with an additional
5468         `MonoGenericContext *' argument.
5469
5470         * class.c (mono_class_inflate_generic_signature): Formerly known
5471         as inflate_generic_signature(); make this public.
5472
5473 2004-12-04  Martin Baulig  <martin@ximian.com>
5474
5475         * metadata.c
5476         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
5477         instead of a `MonoGenericContainer *'.  
5478         (mono_metadata_parse_array_full): Likewise.
5479         (mono_metadata_parse_signature_full): Likewise.
5480         (mono_metadata_parse_method_signature_full): Likewise.
5481         (mono_metadata_parse_generic_inst): Likewise.
5482         (mono_metadata_parse_generic_param): Likewise.
5483         (mono_metadata_parse_mh_full): Likewise.
5484         (mono_type_create_from_typespec_full): Likewise.
5485
5486 2004-12-03  Martin Baulig  <martin@ximian.com>
5487
5488         * class-internals.h (MonoGenericContainer): Replaced the
5489         `MonoGenericContext * pointer with a `MonoGenericContext'
5490         structure and made it the first element.
5491
5492 2004-12-03  Martin Baulig  <martin@ximian.com>
5493
5494         * class.c
5495         (inflate_generic_type): Set the `context->container' when creating
5496         a new MonoGenericContext.
5497         (mono_class_inflate_generic_method): Likewise.
5498         (mono_class_create_from_typespec): Just use `context->container'
5499         to get the container.
5500
5501         * loader.c (method_from_methodspec): Set `context->parent' from
5502         `context->container' - and if that's a method container, use its
5503         parent.  Also set the `context->container' when creating a new
5504         MonoGenericContext.
5505         (mono_get_method_from_token): Use just `context->container' to get
5506         the container.
5507
5508         * metadata.c (do_mono_metadata_parse_generic_class): Also set
5509         `gclass->context->container'.
5510
5511         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
5512         the `context->container' when creating a new MonoGenericContext.
5513
5514 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
5515
5516         * reflection.c (compare_genericparam): Sort params with identical
5517         owner by their number. Fixes gen-111 on sparc.
5518
5519 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
5520
5521         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
5522         around the domain changes.
5523
5524         * appdomain.c (mono_domain_unload): Handle the case when the thread
5525         calling Unload is itself being aborted during unloading. Fixes #70022.
5526
5527         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
5528
5529         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
5530         checkpoint_func as an icall so it gets a wrapper.
5531         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
5532         in the cross-appdomain wrappers too.
5533
5534         * threads.c (mono_thread_has_appdomain_ref): Make this public.
5535
5536         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
5537
5538         * reflection.c: Fix some memory leaks.
5539         
5540 2004-12-02  Martin Baulig  <martin@ximian.com>
5541
5542         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
5543
5544         * metadata.c (generic_class_cache): New static hashtable.
5545         (mono_metadata_lookup_generic_class): New public method.
5546
5547 2004-12-02  Martin Baulig  <martin@ximian.com>
5548
5549         * class.c (mono_class_create_from_typedef): Call
5550         mono_class_setup_parent() and mono_class_create_mono_type() before
5551         parsing the interfaces.
5552
5553 2004-12-02  Martin Baulig  <martin@ximian.com>
5554
5555         * metadata.c (generic_inst_cache): New static hashtable.
5556         (mono_metadata_lookup_generic_inst): New public function.
5557         (mono_metadata_inflate_generic_inst): New public function.
5558         (mono_metadata_parse_generic_inst): New public function.
5559         (do_mono_metadata_parse_generic_class): Use the new
5560         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
5561         since this'll also use the cache.
5562
5563         * reflection.c (mono_reflection_bind_generic_method_parameters):
5564         Use mono_metadata_lookup_generic_inst() to use the new cache.
5565
5566         * class.c (inflate_mono_type): Use
5567         mono_metadata_inflate_generic_inst() to inflate a generic
5568         instance; this'll also use the new cache.
5569
5570         * loader.c (method_from_methodspec): Use
5571         mono_metadata_parse_generic_inst() and
5572         mono_metadata_inflate_generic_inst() rather than parsing it
5573         manually, so we can use the new cache.
5574
5575 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
5576
5577         * threads.c (wait_for_tids): Do not incorrectly free threads when 
5578         the wait times out.
5579
5580 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5581
5582         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
5583         iter->args based on whether parameters are passed in registers (i.e.
5584         MONO_ARCH_REGPARMS is defined)
5585
5586 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
5587
5588         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
5589         the exception message. Fixes #70070.
5590         (method_from_methodspec): Fix warnings.
5591
5592 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5593
5594         * process.c: (complete_path) return the path quoted
5595
5596 2004-12-01  Martin Baulig  <martin@ximian.com>
5597
5598         * class-internals.h (MonoGenericInst): New structure.
5599         (MonoGenericClass): Replaced `type_argc', `type_argv' and
5600         `is_open' with `MonoGenericInst *inst'.
5601         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
5602         `is_open' with `MonoGenericInst *inst'.
5603
5604 2004-11-30  Martin Baulig  <martin@ximian.com>
5605
5606         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
5607
5608         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
5609         to `generic_class_cache'.
5610
5611         * metadata.c
5612         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
5613         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
5614         (mono_generic_inst_is_valuetype): Renamed to
5615         mono_generic_class_is_valuetype().
5616
5617         * class-internals.h
5618         (MonoGenericInst): Renamed to MonoGenericClass.
5619         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
5620         (MonoClass): Renamed `generic_inst' to `generic_class'.
5621         (MonoGenericContext): Renamed `ginst' to `gclass'.
5622
5623         * object-internals.h
5624         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
5625
5626         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
5627         mono_reflection_generic_class_initialize().
5628
5629         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
5630         now known as "System.Reflection.MonoGenericClass".
5631         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
5632
5633 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
5634
5635         * class-internals.h: Added a flag field to MonoClass to cache the
5636         declarative security attributes actions associated with the class.
5637         * domain-internals.h: Added booleans to MonoJitInfo to cache the
5638         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
5639         applicable to the JITted method.
5640         * reflection.c|h: Added functions to extract (as flags) which security
5641         actions are available (declaratively) for a method, class or assembly.
5642         * metadata.c|h: Added functions to search the declarative security
5643         table in the metadata.
5644         
5645 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
5646
5647         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
5648         EXPORTEDTYPES are already in the class name cache, so there is no
5649         need to add extra code here to look at them. Just removes a bit of
5650         cruft.
5651
5652         (ves_icall_System_Environment_get_TickCount): No need for #if
5653         WINDOWS. We already have the code in io-layer.
5654
5655 2004-11-28  Martin Baulig  <martin@ximian.com>
5656
5657         * loader.c
5658         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
5659         Fixes gen-112.cs.
5660
5661 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
5662
5663         * assembly.c (do_mono_assembly_open): Instead of having a
5664         conditional WITH_BUNDLE, incorporate support for bundles here, by
5665         having a global `bundles' variable holding a pointer to the actual
5666         bundles. 
5667
5668         (mono_register_bundled_assemblies): New API call used by the
5669         bundle code. 
5670
5671         See mkbundle.1 for details.
5672         
5673 2004-11-27  Martin Baulig  <martin@ximian.com>
5674
5675         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
5676         the vtable for generic methods.
5677
5678 2004-11-26  Martin Baulig  <martin@ximian.com>
5679
5680         * metadata.c
5681         (mono_metadata_generic_method_hash): New public function.
5682         (mono_metadata_generic_method_equal): Likewise.
5683
5684         * class-internals.h
5685         (MonoGenericContainer): Added `GHashTable *method_hash'.
5686
5687         * reflection.c (ReflectionMethodBuilder): Added
5688         `MonoGenericContainer *generic_container'.
5689         (reflection_methodbuilder_to_mono_method): Don't create a new
5690         MonoGenericContainer each time we're called.
5691         (mono_reflection_bind_generic_method_parameters): Use
5692         `container->method_hash' to cache the results so we don't create a
5693         different method if we're called several times with the same
5694         arguments.
5695
5696         * loader.c (method_from_methodspec): Use the new
5697         `container->method_hash' here, too.
5698
5699 2004-11-26  Martin Baulig  <martin@ximian.com>
5700
5701         * class.c (inflate_generic_signature): Correctly compute
5702         `res->has_type_parameters'.
5703         (mono_class_vtable): Use the `has_type_parameters' flag to
5704         determine whether we're a generic method.
5705
5706         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
5707
5708 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
5709
5710         * object.c (mono_runtime_run_main): Fix a small memory leak.
5711
5712 2004-11-25  Martin Baulig  <martin@ximian.com>
5713
5714         * class.c (set_generic_param_owner): Fixed the loop.
5715
5716 2004-11-25  Martin Baulig  <martin@ximian.com>
5717
5718         * object.c (mono_class_vtable): Don't create any JIT wrappers for
5719         generic methods.
5720
5721 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
5722
5723         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
5724         names. Fixes #69787.
5725
5726 2004-11-24  Martin Baulig  <martin@ximian.com>
5727
5728         * class.c (mono_class_create_generic_2): If we don't have a
5729         `ginst->parent', inflate `gklass->parent' to get our parent.
5730
5731 2004-11-24  Martin Baulig  <martin@ximian.com>
5732
5733         * reflection.c (compare_genericparam): Correctly sort the
5734         GenericParam table; fixes #69779.
5735
5736 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
5737
5738         * reflection.c: When writing a PE file, don't create a huge
5739         buffer in memory. Just write the arrays we have to the file.
5740         This reduces memory usage.
5741
5742         * metadata-internals.h: MonoDynamicStream pefile is no longer used
5743         globally.
5744
5745 2004-11-17  Martin Baulig  <martin@ximian.com>
5746
5747         * class.c (mono_class_init): Don't setup `class->parent' for
5748         dynamic instances; moved this to mono_class_generic_2().
5749         (mono_class_create_generic): Also set `klass->inited' for dynamic
5750         generic instances.
5751         (mono_class_create_generic_2): Don't do anything for dynamic
5752         generic instances.  Set `klass->parent' here and also call
5753         mono_class_setup_parent() here. 
5754
5755         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
5756         `MonoType *parent' argument; set `ginst->parent' before calling
5757         mono_class_create_generic_2(), so we set the correct parent.
5758
5759 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
5760
5761         * reflection.c: allow getting attributes from ModuleBuilder
5762         (used by ikvm).
5763
5764 2004-11-17  Martin Baulig  <martin@ximian.com>
5765
5766         * class.c (mono_class_create_from_typedef): If a type parameter is
5767         inherited from an outer class, set its owner to that class.
5768
5769 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
5770
5771         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
5772           for (int*) written size. This fixes bug #69592.
5773
5774 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
5775
5776         * icall.c: Added IsAuthenticodePresnet internal call.
5777         * image.c|h: New function that check a MonoImage for an Authenticode
5778         signature in the certificate PE data directory.
5779         * security.c|h: New internal call to ask the runtime if an 
5780         Authenticode signature seems referenced in the PE header.
5781
5782 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
5783
5784         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
5785
5786         * reflection.c (mono_image_create_pefile): Free the assembly streams
5787         after writing out the assembly file.
5788
5789         * object.c (mono_runtime_run_main): Fix small memory leak.
5790
5791         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
5792         property access modifiers. Fixes #69389.
5793
5794 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
5795
5796         * domain.c, object.c, object-internals.h, domain-internals.h,
5797         object.h, marshal.c: keep dynamic code info per domain.
5798
5799 2004-11-15  Martin Baulig  <martin@ximian.com>
5800
5801         * class.c (mono_type_get_name_recurse): Put type arguments in
5802         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
5803         see bug #68387.
5804
5805 2004-11-15  Martin Baulig  <martin@ximian.com>
5806
5807         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
5808         (mono_class_setup_vtable): When computing `the_cname' for a
5809         generic instance, don't include the namespace since we'd otherwise
5810         add it twice.
5811
5812 2004-11-15  Martin Baulig  <martin@ximian.com>
5813
5814         * class.c (mono_class_create_generic): Changed return type to void.
5815         (mono_class_create_generic_2): New public function; setup
5816         `class->method', `class->field' and `class->interfaces' here
5817         instead of in mono_class_init().
5818
5819         * class.h (mono_class_create_generic): Moved to class-internals.h.
5820
5821 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
5822
5823         * reflection.c (mono_image_create_pefile): take a file HANDLE.
5824         rather than writing to memory, write to this file. Right now,
5825         we are just writting into a buffer, and copying that. However
5826         we can avoid the buffer later.
5827
5828         (mono_dynamic_stream_reset): new function
5829
5830         * icall.c, object-internals.h: update for the above.
5831
5832 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
5833
5834         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
5835         have been using gc'd memory. First it is slower, unlikely
5836         the comment in the source code said, secondly, it increases
5837         our footprint to do it in the gc.
5838
5839         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
5840         the method so that it does not have to copy to managed code.
5841
5842 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
5843
5844         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
5845
5846 2004-11-12  Martin Baulig  <martin@localhost>
5847
5848         * reflection.c (mono_image_create_token): Allow generic method
5849         definitions here, since they may appear in an `.override'; see
5850         gen-98/gen-99 for an example.
5851
5852 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
5853
5854         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
5855         #69365.
5856
5857         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
5858         descriptive.
5859
5860 2004-11-11  Martin Baulig  <martin@ximian.com>
5861
5862         * class.c (mono_class_setup_vtable): In an explicit interface
5863         implementation, the method name now includes the arity.
5864
5865 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
5866
5867         * object.c (mono_array_full_copy): Fix warning.
5868
5869 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
5870
5871         * appdomain.c: Removed look_for_method_by_name(). Use the new method
5872         mono_class_get_method_from_name() instead.
5873         
5874         * class-internals.h: Added two new types of wrappers. 
5875         Added MonoRemotingTarget enum. Added new trampoline function type, which
5876         takes an additional MonoRemotingTarget value as parameter, so it is
5877         possible to request a trampoline for a specific target.
5878         
5879         * class.c: Added new mono_class_get_method_from_name() method.
5880         
5881         * class.h: In MonoRemoteClass, we can have now to vtables, one for
5882         general remoting sinks and one specific for cross domain calls.
5883         
5884         * debug-helpers.c: Added new wrapper names.
5885         
5886         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
5887         of a remote class.
5888         
5889         * image.c: Porperly delete value objects form the remoting invoke hashtable.
5890         
5891         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
5892         with several other methods (mono_marshal_get_xappdomain_dispatch,
5893         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
5894         and others) can generate a fast remoting wrapper for cross domain calls.
5895         More information can be found in docs/remoting.
5896         Other changes: Removed mono_find_method_by_name, and used
5897         mono_class_get_method_from_name instead.
5898         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
5899         is stored in the remoting invoke hashtable.
5900         
5901         * marshal.h: published the new method for getting the xdomain wrapper,
5902         and also added a method for getting the adequate wrapper for a given
5903         method and target.
5904         
5905         * object-internals.h, object.c: Added a couple of methods for capying and
5906         cloning arrays.
5907         Modified mono_install_remoting_trampoline, which takes the new remoting
5908         trampoline that has a remoting target as parameter.
5909         mono_class_proxy_vtable now also takes a remoting target as parameter, and
5910         will return the most suitable vtable for the target.
5911         Added mono_remote_class_vtable, which returns the vtable of a remote class
5912         (which can be the normal remoting vtable or the xdomain vtable).
5913         
5914         * threads.c: the xdomain invoke and dispatch wrappers must also be
5915         protected against interruptions.
5916
5917 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5918
5919         * icall.c: use memmove in BlockCopyInternal when the source and
5920         destination arrays are the same.
5921
5922 2004-11-09  Martin Baulig  <martin@ximian.com>
5923
5924         * class-internals.h (MonoGenericContainer): Removed `method' and
5925         `signature', replaced them with `is_method' and `is_signature'
5926         flags.  Added `context'.
5927
5928         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
5929         instead of a `MonoGenericContainer *'.
5930
5931         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
5932         for dynamic type parameters.
5933         (mono_metadata_load_generic_params): Setup `container->context'.
5934
5935         * reflection.c (mono_reflection_setup_generic_class): Setup
5936         `tb->generic_container->context'.
5937         (do_mono_reflection_bind_generic_parameters): Use
5938         mono_class_inflate_generic_type() to correctly inflate types,
5939         rather than using our own hack just for MONO_TYPE_VAR.
5940
5941 2004-11-09  Martin Baulig  <martin@ximian.com>
5942
5943         * class.c (mono_class_inflate_generic_method): Small fix; don't
5944         crash here.
5945
5946         * icall.c
5947         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
5948         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
5949         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
5950         (ves_icall_Type_BindGenericParameters): Likewise.
5951         (ves_icall_Type_get_IsGenericInstance): Likewise.
5952         (ves_icall_Type_GetGenericParameterPosition): Likewise.
5953         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
5954         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
5955         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
5956
5957 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
5958
5959         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
5960         assembly versions and public key tokens. Fixes #69113.
5961
5962 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
5963
5964         * metadata.c: fix bug introduced with the type cache changes
5965         on 2004-11-06.
5966
5967 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
5968
5969         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
5970         the MonoClass pointer instead of the token in exception clauses.
5971         * reflection.c: updates for the above and make the code not depend
5972         on the structure of MonoExceptionClause.
5973
5974 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
5975
5976         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
5977         Add support for dynamic assemblies. Fixes #69114.
5978
5979         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
5980
5981 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
5982
5983         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
5984         since most only those methods use it. the code member of
5985         MonoMethodPInvoke was dead, so that can be removed too. Also,
5986         remove inline_count (again, not used), and move slot so that it
5987         can share bits with some other flags. This saves 8 bytes in the
5988         structure and gives us about 50 kb back for mcs helloworld.cs
5989
5990         * *.[ch]: Do naming changes for the above.
5991
5992         * loader.c (mono_method_get_header): Lazily init the header
5993         on first access.
5994         (mono_get_method_from_token): don't init the header here
5995         (mono_free_method): the header may never be allocated
5996
5997         Overall, this saves 150 kb of unmanaged allocations
5998         for mcs helloworld.cs. That accounts for 10% of the unmanaged
5999         memory at runtime.
6000         
6001         * loader.c, loader.h (mono_method_get_header): new accessor.
6002
6003         * *.[ch]: use the above method. Prepares us to lazily load
6004         the header.
6005
6006         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
6007         three warnings, which are actual bugs (see 69206).
6008
6009         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
6010         unused. Saves a cool 4 bytes / method.
6011
6012 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
6013
6014         * metadata.c (builtin_types): Add types for System.Object here.
6015         (mono_metadata_parse_type_full): Cache MonoType*'s that are
6016         for a class or valuetype from klass->this_arg or klass->byval_arg.
6017
6018         On mcs for a hello world, this gets us down from 21836 MonoType's
6019         to 14560.
6020
6021         (mono_metadata_free_type): Account for the above change.
6022
6023 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
6024
6025         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
6026         exception instead of asserting if name is null.
6027         (ves_icall_System_AppDomain_GetData): Ditto.
6028
6029 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
6030
6031         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
6032         EnumBuilder.
6033
6034         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
6035         Return NULL when the domain does not have entry_assembly set.
6036
6037         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
6038         Add a 'resource_modules' argument.
6039         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
6040
6041         * reflection.c (mono_reflection_create_runtime_class): Move setting
6042         of wastypebuilder here, so mono_get_type_object () returns a MonoType
6043         for enums too.
6044
6045         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
6046         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
6047         Throw an ArgumentNullException if 'ptr' is null.
6048
6049         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
6050         assemblies here. Fixes #69020.
6051
6052 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
6053
6054         * reflection.c (build_compressed_metadata): Fix the previous patch for
6055         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
6056         the stack.
6057
6058 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
6059
6060         * assembly.c (mono_assembly_names_equal): Allow a match if one of
6061         the cultures is false. Fixes #69090.
6062
6063         * reflection.c (build_compressed_metadata): Fix invalid memory read 
6064         detected by valgrind.
6065         
6066         * reflection.c (mono_reflection_get_type): Avoid triggering a 
6067         TypeResolve multiple times for the same type. Fixes #65577.
6068
6069 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
6070
6071         * marshal.c: Avoid using ldftn to call managed functions. It is
6072         much slower than just a call.
6073
6074         * reflection.c (mono_module_get_object): free the basename we
6075         allocate here from glib.
6076         
6077         * reflection.c (ensure_runtime_vtable): make sure to free
6078         overrides.  Also, we were allocating an array of MonoMethod not an
6079         array of MonoMethod*.
6080
6081         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
6082
6083         * image.c (mono_image_close): free image->guid here.
6084
6085 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
6086
6087         * reflection.c: Fix some spec conformance issues with the PE file
6088         structures so mcs compiled apps run on the Net 2.0 beta.
6089
6090 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
6091
6092         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
6093         Implement this. Fixes #67264.
6094
6095         * debug-helpers.h debug-helpers.c marshal.c: Move 
6096         mono_find_method_by_name to debug-helpers.c.
6097
6098 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
6099
6100         * object.c (mono_release_type_locks): type_initialization_hash is
6101         a GHashTable.
6102
6103         * reflection.c object.c object-internals.h: Fix warnings.
6104
6105         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
6106         without accessors. Fixes #61561.
6107
6108         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
6109         application base from the root domain if not set. Fixes #65641.
6110         (mono_runtime_init): Fix warning.
6111
6112 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6113
6114         * appdomain.c: call mono_thread_pool_init.
6115         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
6116         of worker threads based on the number of CPUs and the environment
6117         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
6118         for non-windows (windows) systems.
6119
6120 2004-10-27  Chris Toshok  <toshok@ximian.com>
6121
6122         * mono-debug-debugger.c (write_class): don't call mono_class_init
6123         here, as even with the check for (!klass->init_pending), we get
6124         into a situation where we're hitting cycles in class
6125         initialization.  Fixes #68816.
6126
6127 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
6128
6129         * image.c: Avoid overwriting values in the loaded_images_hash when an
6130         assembly is loaded multiple times. Fixes #61152.
6131
6132         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
6133         so multiple satellite assemblies for the same name can be loaded.
6134         Fixes #68259.
6135
6136         * mono_domain_assembly_preload: Actually return the loaded assembly, 
6137         not NULL.
6138
6139         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
6140         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
6141
6142         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
6143         pending finalizers are not invoked after the appdomain has been 
6144         unloaded. Fixes #67862.
6145
6146 2004-10-22  Martin Baulig  <martin@ximian.com>
6147
6148         * mono-debug-debugger.c
6149         (mono_debugger_runtime_invoke): Don't box valuetypes.
6150
6151 2004-10-22  Chris Toshok  <toshok@ximian.com>
6152
6153         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
6154         don't hide private methods.
6155
6156 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
6157
6158         * icall.c: Allows the runtime to "share" (when known) the public key
6159         token of an assembly. This avoid the need to recalculate the token 
6160         (from the public key) in managed code.
6161
6162 2004-10-21  Chris Toshok  <toshok@ximian.com>
6163
6164         * debug-helpers.c (append_class_name): argh, revert last patch.
6165         
6166 2004-10-21  Chris Toshok  <toshok@ximian.com>
6167
6168         * debug-helpers.c (append_class_name): use '+' as the delimiter,
6169         not '/', so that it matches what the debugger uses to look up
6170         methods.
6171
6172 2004-10-21  Martin Baulig  <martin@ximian.com>
6173
6174         * mono-debug-debugger.c (mono_debugger_throw_exception): New
6175         public method; this is called each time an exception is thrown and
6176         allows the debugger to use exception catch points.
6177
6178 2004-10-21  Martin Baulig  <martin@ximian.com>
6179
6180         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
6181         the stack pointer and the exception object in some struct and pass
6182         that to the debugger.
6183
6184 2004-10-21  Chris Toshok  <toshok@ximian.com>
6185
6186         * mono-debug-debugger.c (do_write_class): add instance/static
6187         event support.  We don't expose "raise" or "other" yet.
6188         (event_is_static): new method.
6189
6190 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
6191
6192         * mono-debug-debugger.c
6193         (mono_debugger_handle_exception): Remove
6194         bogus return value for fussy compilers.
6195
6196 2004-10-20  Martin Baulig  <martin@ximian.com>
6197
6198         * mono-debug-debugger.c
6199         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
6200         (mono_debugger_handled_exception): Likewise.
6201
6202 2004-10-20  Martin Baulig  <martin@ximian.com>
6203
6204         * mono-debug-debugger.h (MonoDebuggerEvent): Added
6205         MONO_DEBUGGER_EVENT_EXCEPTION.
6206
6207         * mono-debug-debugger.c (mono_debugger_handle_exception): New
6208         public function to send the debugger a notification for an
6209         exception and inform it about a catch/finally clause.
6210
6211 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
6212
6213         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
6214         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
6215         fix 2.95 build. 
6216
6217         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
6218
6219 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
6220
6221         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
6222         marshalled as [In,Out]. Fixes #58325.
6223
6224 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
6225
6226         * reflection.c (mono_method_body_get_object): Implement some fields.
6227
6228 2004-10-12  Martin Baulig  <martin@ximian.com>
6229
6230         * reflection.c (mono_reflection_bind_generic_parameters): Small
6231         fix, correctly retrieve our parent from a generic instance.
6232
6233 2004-10-12  Martin Baulig  <martin@ximian.com>
6234
6235         * metadata.c (mono_metadata_generic_param_equal): We always have
6236         an owner.
6237
6238         * class.c
6239         (mono_class_from_generic_parameter): We need to have an owner.
6240         (my_mono_class_from_generic_parameter): Likewise.
6241
6242         * reflection.c (mono_reflection_setup_generic_class): Renamed to
6243         mono_reflection_create_generic_class() and added a new
6244         mono_reflection_setup_generic_class().  
6245         (mono_reflection_initialize_generic_param): If we're a nested
6246         generic type and inherited from the containing class, set our
6247         owner to the outer class.
6248
6249 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
6250
6251         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
6252
6253         * reflection.c (mono_method_body_get_object): New function to create
6254         a MethodBody object.
6255
6256         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
6257
6258 2004-10-11  Martin Baulig  <martin@ximian.com>
6259
6260         * metadata.c (_mono_metadata_type_equal): Renamed to
6261         do_mono_metadata_type_equal() and made static.
6262
6263 2004-10-11  Martin Baulig  <martin@ximian.com>
6264
6265         * appdomain.c: Bump corlib version number to 28.
6266
6267 2004-10-10  Martin Baulig  <martin@ximian.com>
6268
6269         * class-internals.h
6270         (MonoGenericInst): Added `MonoGenericContainer *container'.
6271         (MonoGenericMethod): Likewise.
6272         (MonoGenericContext): Likewise.
6273         (MonoGenericParam): Added `MonoGenericContainer *owner'.
6274
6275         * metadata.c
6276         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
6277         (do_mono_metadata_parse_generic_inst): Likewise.
6278         (mono_metadata_parse_type_full): New public method.  This is the actual
6279         mono_metadata_parse_type() implementation - with an additional
6280         `MonoGenericContainer *' argument.
6281         (mono_metadata_parse_array_full): Likewise.
6282         (mono_metadata_parse_signature_full): Likewise.
6283         (mono_metadata_parse_method_signature_full): Likewise.
6284         (mono_metadata_parse_mh_full): Likewise.
6285         (mono_type_create_from_typespec): Likewise.
6286         (mono_metadata_interfaces_from_typedef_full): New public method;
6287         this is similar to the other _full() methods, but we take a
6288         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
6289         (mono_metadata_parse_generic_param): Take an additional
6290         `MonoGenericContainer *' argument and lookup the MonoGenericParam
6291         from that container.
6292         (mono_metadata_generic_param_equal): New static method to compare
6293         two type parameters.
6294         (_mono_metadata_type_equal): New static method; takes an
6295         additional `gboolean signature_only' argument - if true, we don't
6296         compare the owners of generic parameters.
6297         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
6298         with a TRUE argument - do a signature-only comparision.
6299
6300         * loader.c: Use the new _full() methods and pass the
6301         MonoGenericContainer to them.
6302
6303         * object-internals.h (MonoReflectionTypeBuilder): Added
6304         `MonoGenericContainer *generic_container' field.
6305         (MonoReflectionMethodBuilder): Likewise.
6306
6307 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
6308
6309         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
6310         case initial images of dynamic assemblies.
6311
6312         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
6313
6314         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
6315
6316         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
6317         length of event->other array.
6318         (typebuilder_setup_events): Ditto.
6319
6320         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
6321         'assembly_by_name' and add an 'assemblies' list.
6322
6323         * assembly.h assembly.c: Add a new search hook for determining whenever
6324         an assembly is already loaded. Use this instead of searching in the
6325         loaded_assemblies list.
6326
6327         * domain.c appdomain.c: Implement the new search hook so loaded 
6328         assemblies are now scoped by appdomain. Fixes #67727.
6329
6330 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
6331
6332         * threads.c (mono_thread_attach): Initialize synch_lock field so
6333         mono_thread_detach works again.
6334
6335         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
6336         'lib' too. Fixes #63130.
6337
6338 2004-10-06  Jackson Harper  <jackson@ximian.com>
6339
6340         * culture-info-tables.h: regenerated.
6341
6342 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
6343
6344         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
6345         implemented by other interfaces in the result. Fixes #65764.
6346         
6347         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
6348         Handle unloadable modules without crashing.
6349
6350         * image.c (load_modules): Revert the previous patch since modules must
6351         have a fixed index inside the array.
6352         
6353         * image.c (load_modules): Don't include native modules in the modules
6354         array.
6355
6356 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
6357
6358         * reflection.h: Add param_defaults field.
6359
6360         * reflection.c: Add support for parameter defaults in dynamic methods.
6361         Fixes #64595.
6362
6363         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
6364         an empty string when a type has no namespace. Fixes #64230.
6365
6366 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
6367
6368         * tabledefs.h: Added "internal" security actions to support non-CAS
6369         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
6370         Note: they do not seems to be used anymore in 2.0 (new metadata format)
6371
6372 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
6373
6374         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
6375         constructor of abstract class. Fixes #61689.
6376
6377 2004-10-04  Martin Baulig  <martin@ximian.com>
6378
6379         * class-internals.h (MonoGenericContainer): New type.
6380         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
6381         `MonoGenericContainer *generic_container'.
6382         (MonoClass): Replaced `gen_params' and `num_gen_params' with
6383         `MonoGenericContainer *generic_container'.
6384
6385         * metadata.c (mono_metadata_load_generic_params): Return a
6386         `MonoGenericContainer *' instead of a `MonoGenericParam *';
6387         removed the `num' argument.
6388
6389 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
6390
6391         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
6392         for dynamic images.
6393
6394         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
6395         machine fields.
6396
6397         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
6398
6399         * reflection.c: Save pe_kind and machine values into the generated
6400         image file.
6401
6402         * appdomain.c: Bump corlib version number.
6403
6404         * object-internals.h: Reorganize layout of LocalBuilder.
6405
6406         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
6407         New helper function.
6408
6409         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
6410         created MonoType for dynamic types. Fixes #66180.
6411
6412 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
6413
6414         * threadpool.c: the ares hashtable needs a critical section around it.
6415         this prevents some nasty segfaults
6416
6417 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
6418
6419         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
6420         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
6421         bug 67324).
6422         
6423 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
6424
6425         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
6426         
6427 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
6428
6429         * image.c: Always canonicalize image file names, to avoid loading
6430         the same assembly twice when referenced using a relative path.
6431
6432 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
6433
6434         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
6435
6436         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
6437
6438         * marshal.c: Fix warnings.
6439
6440 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
6441
6442         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
6443         attempting to marshal the delegate_trampoline as the method_addr.
6444         This patch has a static hashtable of marshalled delegates so that 
6445         we can map delegate_trampoline addresses back to delegates.  This
6446         allows a delegate passed to managed code to be passed back into native
6447         code.  Fixes #67039
6448
6449 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
6450
6451         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
6452
6453         * reflection.c (method_encode_code): Align method headers properly.
6454         Fixes #66025.
6455
6456 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
6457
6458         * marshal.c: In the runtime invoke wrapper, reset the abort
6459         exception if it is cached. This avoids the automatic rethrowal of 
6460         the exception after the catch of the wrapper. Also check for pending
6461         interruptions before calling the managed method. This is done using
6462         the new method emit_thread_force_interrupt_checkpoint, since the
6463         normal checkpoint method is ignored when running the invoke wrapper.
6464         * object.c: If the abort exception is rethrown, set the abort_exc
6465         field of the thread, so it will be rethrown aftere every catch.
6466         * threadpool.c: Only run an interruption checkpoint if what has been
6467         requested is a stop of the thread (aborts will be ignored).
6468         * threads.c: By default, a thread will now never be interrumped while
6469         running the runtime invoke wrapper (this ensures that runtime_invoke
6470         will always return to the caller if an exception pointer is provided).
6471         There is a new special method mono_thread_force_interruption_checkpoint()
6472         to force an interruption checkpoint even if running a protected
6473         wrapper, which is used by the same runtime invoke wrapper to do a check
6474         at a safe point.
6475
6476 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
6477
6478         * object.c, object-internals.h: Implemented mono_release_type_locks,
6479         which releases the cctor locks held by a thread.
6480         * threads.c, threads.h: In thread_cleanup, release cctor locks held
6481         by a thread. Added mono_thread_exit() method to be used to safely stop
6482         a thread.
6483
6484 2004-09-28  Raja R Harinath  <rharinath@novell.com>
6485
6486         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
6487         Move null check before dereference.  Avoid indexing beyond the end
6488         of the 'modules' array.
6489
6490 2004-09-28  Raja R Harinath  <rharinath@novell.com>
6491
6492         * metadata-internals.h (MonoImage): Add module_count field.
6493         * image.c (load_modules): Set image->module_count.
6494         (mono_image_load_file_for_image): Use image->module_count.
6495         * reflection.c (mono_image_load_module): Append to image->modules array 
6496         of dynamic assembly.
6497         (mono_module_get_object): Fix loop to actually increment index.
6498         Use image->module_count.
6499         * assembly.c (mono_assembly_load_references): Use image->module_count.
6500         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6501         Likewise.
6502
6503 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
6504
6505         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
6506         Avoid assert on generic types.
6507
6508 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
6509
6510         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
6511
6512         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
6513
6514         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
6515         function to convert a MarshalSpec structure to its managed counterpart.
6516
6517         * reflection.c: Fix warnings.
6518         
6519         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
6520         field.
6521
6522         * icall.c (mono_create_icall_signature): Fix build.
6523
6524 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
6525
6526         * icall.c: Add MakePointType icall.
6527
6528         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
6529         warnings.
6530
6531 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6532
6533         * threadpool.c: reuse allocated slots in the queue.
6534
6535 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
6536
6537         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
6538
6539         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
6540
6541         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
6542         previous change.
6543
6544         * tabledefs.h: Add constants for pinvoke attributes BestFit and
6545         ThrowOnUnmappableChar.
6546
6547         * icall.c (ves_icall_Type_GetPacking): New icall.
6548
6549 2004-09-24  Martin Baulig  <martin@ximian.com>
6550
6551         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
6552
6553 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6554
6555         * appdomain.c:
6556         (mono_domain_set): allow setting a domain that is being unloaded.
6557         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
6558         being unloaded.
6559
6560 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
6561
6562         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
6563         the GetCustomAttributes icall.
6564
6565 2004-09-23  Martin Baulig  <martin@ximian.com>
6566
6567         * object-internals.h (MonoReflectionGenericParam): Replaced
6568         'has_ctor_constraint', `has_reference_type' and `has_value_type'
6569         with `guint32 attrs'.
6570
6571 2004-09-23  Martin Baulig  <martin@ximian.com>
6572
6573         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
6574
6575 2004-09-23  Martin Baulig  <martin@ximian.com>
6576
6577         * object-internals.h (GenericParameterAttributes): New enum.
6578
6579 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
6580
6581         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
6582         
6583         * class.c (init_events): Fill out event->other field.
6584
6585         * class.c: Fix warnings.
6586
6587         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
6588
6589 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
6590
6591         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
6592         walk which doesn't supply the IL offset.
6593
6594 2004-09-22  Martin Baulig  <martin@ximian.com>
6595
6596         * reflection.c (mono_reflection_setup_internal_class): If we're
6597         System.ValueType, System.Object or System.Enum, set
6598         `klass->instance_size' and create the vtable.
6599         (mono_reflection_create_internal_class): If we're an enum type,
6600         get the base class from our current corlib.
6601
6602 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
6603
6604         * reflection.h (MonoResolveTokenError): New type.
6605
6606         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
6607         icall.
6608
6609         * icall.c: Add an 'error' argument to the ResolveToken icalls.
6610
6611 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
6612
6613         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
6614         Support also calling constructors, but only for already allocated objects.
6615
6616 2004-09-17  Geoff Norton <gnorton@customerdna.com>
6617
6618         * reflection.c (type_get_qualified_name): If the klass is null
6619         return the typename to avoid a NullRefEx.
6620         (encode_cattr_value): Get the qualified name of the boxed type,
6621         not the underlying enumtype.  Fixes #62984.
6622
6623 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
6624
6625         * marshal.c: Fix problems with previous checkin.
6626
6627 2004-09-21    <vargaz@freemail.hu>
6628
6629         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
6630         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
6631
6632         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
6633
6634 2004-09-21  Geoff Norton <gnorton@customerdna.com>
6635
6636         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
6637         should only return a type for pointers, arrays, and passbyref types.
6638         Fixes bug #63841.
6639
6640 2004-09-21  Martin Baulig  <martin@ximian.com>
6641
6642         * domain.c (mono_debugger_check_runtime_version): New public
6643         function.
6644
6645         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
6646
6647 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
6648
6649         * reflection.c: Added missing sort to the declarative security 
6650         attributes table. MS implementation stops seeing the attributes if the
6651         token number regress in the table (as shown by ildasm and permview).
6652
6653 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
6654
6655         * object-internals.h (MonoReflectionModule): Add 'token' field.
6656         
6657         * reflection.c (mono_reflection_get_token): Add support for Module
6658         and Assembly.
6659         (mono_module_get_object): Set 'token' field.
6660         (mono_module_file_get_object): Set 'token' field.
6661
6662         * icall.c: Add new Assembly and Module icalls.
6663
6664         * appdomain.c: Bump corlib version.
6665
6666 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
6667
6668         * loader.h loader.c class.h class.c: Add helper functions for obtaining
6669         tokens of metadata objects.
6670
6671         * reflection.h reflection.c (mono_reflection_get_token): New function
6672         to obtain the token of a metadata object.
6673
6674         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
6675
6676 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
6677
6678         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
6679         
6680         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
6681
6682 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
6683
6684         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
6685         * object-internals.h: Added 3 MonoArray* members to MonoReflection
6686         AssemblyBuilder to access the permissions set in the class lib.
6687         * reflection.c: Added security attributes encoding step in 
6688         mono_image_build_metadata.
6689         * tabledefs.h: Added new security actions defined in 2.0:
6690         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
6691
6692 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
6693
6694         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
6695         macro parameter.
6696
6697 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
6698  
6699         * locales.c: nullify the ICU_collator member of CompareInfo when it is
6700           finalized. There where random SIGSEVs at program termination, when
6701           an object being finalized was trying to do a string comparison and
6702           the current culture was already finalized.
6703  
6704 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6705
6706         * threads.c: call thread_cleanup before finishing the thread if we get
6707         there.
6708
6709 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
6710
6711         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
6712         assemblies from the parent. Fixes #65665.
6713
6714 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
6715
6716         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
6717         modifiers.
6718
6719 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
6720
6721         * reflection.h: add prototype for mono_get_dbnull_object
6722         * reflection.c: add prototypes for get_default_param_value_blobs 
6723         and mono_get_object_from_blob for fussier compilers
6724
6725 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
6726  
6727         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
6728         false deadlock checks in class initialization.
6729  
6730 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
6731
6732         * image.c (mono_image_addref): Fix comment.
6733
6734         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
6735         possible.
6736
6737 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
6738
6739         * reflection.c (mono_param_get_objects): Modified to return
6740         ParameterInfo.DefaultValue object.
6741
6742         (get_default_param_value_blobs):
6743         (mono_get_object_from_blob):
6744         (mono_get_dbnull_object): New helper routines. 
6745
6746         * object.c (mono_get_constant_value_from_blob): New helper routine
6747         carved out from get_default_field_value ()
6748
6749         * object-internals.h (mono_get_constant_value_from_blob): Added
6750         function declaration.
6751
6752 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
6753
6754         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
6755         referenced assemblies. Fixes #62135.
6756
6757         * exception.h exception.c (mono_get_exception_file_not_found2): New
6758         helper function.
6759
6760 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
6761
6762         * class.h class.c: Add mono_type_get_underlying_type ().
6763
6764 2004-09-09  Geoff Norton <gnorton@customerndna.com>
6765
6766         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
6767         Fix GetTypes() to support dynamically created assemblies.
6768
6769 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
6770
6771         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
6772         
6773         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
6774         previous patch.
6775
6776         * reflection.h reflection.c loader.c: Allow dynamic construction of
6777         pinvoke methods. Fixes #65571.
6778         
6779         * reflection.c (mono_reflection_get_type): Revert previous change since
6780         it causes regressions.
6781
6782 2004-09-08  Martin Baulig  <martin@ximian.com>
6783
6784         * class.c (class_compute_field_layout): Don't call
6785         mono_class_layout_fields() for open generic instances.
6786
6787 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
6788         * threads.c appdomain.c: fix typo in GC macro
6789
6790 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6791
6792         * threads.c: don't call mono_thread_detach() in start_wrapper(),
6793         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
6794
6795 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
6796
6797         * image.c (mono_image_close): Applied patch from 
6798         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
6799         assembly is loaded multiple times from data.
6800         
6801         * image.c (mono_image_open): Fix warning.
6802
6803 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
6804
6805         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
6806         once. Fixes #58334.
6807         
6808         * reflection.c (mono_reflection_create_runtime_class): Initialize
6809         klass->nested_classes. Fixes #61224.
6810
6811 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6812
6813         * threads.c: sched_yield() on exit, to allow threads to quit.
6814
6815 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
6816
6817         * object.c (mono_unhandled_exception): Remove leftover debug code.
6818
6819 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
6820
6821         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
6822
6823 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
6824
6825         * marshal.c (emit_marshal_array): Really null terminate string arrays.
6826         
6827         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
6828
6829 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
6830
6831         * marshal.c (emit_marshal_array): Null terminate string arrays.
6832         
6833         * marshal.c (raise_auto_layout_exception): Fix warning.
6834
6835         * reflection.c (mono_param_get_objects): Initialize the default value
6836         with DBNull.Value, not null. Fixes #62123.
6837
6838 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
6839
6840         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
6841         throw an exception with a cute explanation.
6842
6843 2004-09-06  Dick Porter  <dick@ximian.com>
6844
6845         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
6846         Close the new process's thread handle, as we don't use it.  The
6847         handle stays around forever otherwise.
6848
6849 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
6850
6851         * object.c (arith_overflow): Fix warning.
6852
6853         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
6854         calling conventions in method refs. Fixes #65352.
6855
6856         * reflection.c: Fix warnings.
6857
6858 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
6859
6860         * icall.c: Add a new icall for Array.Clear
6861
6862 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
6863
6864         * object.c: When allocating an array, we have to throw
6865         an overflow exception if any of the lengths are < 0.
6866
6867 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
6868
6869         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
6870         properly. Also move implementation of string array marshalling to 
6871         managed code. Fixes #42316.
6872
6873 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6874
6875         * assembly.c: provide more information when loading an assembly fails.
6876
6877 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6878
6879         * filewatcher.c: don't expect the development fam package to be
6880         installed.
6881
6882 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
6883
6884         * marshal.c: Make a copy of the signature cookie since it will be
6885         freed by the caller.
6886         
6887         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
6888
6889         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
6890
6891         * metadata.c (mono_metadata_free_marshal_spec): New function to free
6892         marshal specs.
6893
6894         * marshal.c: More refactoring.
6895         
6896         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
6897         smaller functions.
6898
6899 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
6900
6901         * object.c: In mono_message_invoke, fill the output parameter array after
6902           calling the managed method (it was done before the call). This fixes
6903           bug #59299.
6904
6905 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
6906
6907         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
6908         as well.
6909
6910 2004-09-02  Martin Baulig  <martin@ximian.com>
6911
6912         * class.c (mono_class_instance_size): Don't allow generic type
6913         definitions or open generic instances.
6914         (mono_class_array_element_size): If we're a value type, call
6915         mono_class_instance_size() on the original class.
6916
6917         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
6918         handle generic instances.
6919
6920         * mono-debug-debugger.c (write_type): Handle generic instances
6921         like classes.
6922
6923 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
6924
6925         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
6926         the allocation request fails. Fixes #65089.
6927
6928         * object.c (mono_runtime_free_method): Do not call mono_free_method.
6929         
6930         * object.c (mono_runtime_free_method): New function to free a dynamic
6931         method.
6932
6933         * marshal.c (mono_delegate_free_ftnptr): New function to free the
6934         delegate trampoline.
6935
6936         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
6937         with hasthis as dynamic,
6938
6939         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
6940
6941         * domain.c (mono_jit_info_table_remove): New function to remove an
6942         entry from the jit info table.
6943
6944         * class-internals.h (MonoMethod): Add 'dynamic' field.
6945
6946         * loader.c: Fix warnings.
6947
6948 2004-09-01  Martin Baulig  <martin@ximian.com>
6949
6950         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
6951         instead of mono_debugger_lock() because the latter one is a no-op
6952         unless running in the debugger.
6953
6954 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
6955
6956         * class.c (class_compute_field_layout): Classes with auto-layout or
6957         reference fields are not blittable.
6958         
6959 2004-09-01  Dick Porter  <dick@ximian.com>
6960
6961         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
6962         mono_image_get_filename() to get the assembly location.
6963
6964         * icall.c:
6965         * metadata.h: Fix compile warnings
6966
6967 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
6968
6969         * class.c (class_compute_field_layout): System.Object is blittable.
6970
6971         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
6972         as in/out. Fixes #59909.
6973
6974 2004-09-01  Martin Baulig  <martin@ximian.com>
6975
6976         * metadata.h (MONO_TYPE_ISREFERENCE): Call
6977         mono_metadata_generic_inst_is_valuetype() if we're a generic
6978         instance to check whether our underlying type is a reference type.
6979
6980 2004-09-01  Martin Baulig  <martin@ximian.com>
6981
6982         * metadata.c (mono_type_size): If we're a generic instance, call
6983         mono_class_value_size() for value types.
6984
6985 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
6986
6987         * marshal.c: Implement more custom marshalling functionality. Fixes
6988         #64915.
6989
6990 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
6991
6992         * mono-debug.c, debug-mono-symfile.c: add some locking love.
6993
6994 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
6995
6996         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
6997
6998         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
6999
7000         * icall.c: Fix some warnings.
7001
7002         * threads.c (abort_appdomain_thread): Fix unref errors.
7003         (mono_thread_current): Fix THREAD_DEBUG define.
7004
7005 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
7006
7007         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
7008
7009         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
7010
7011 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
7012
7013         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
7014         string arrays.
7015
7016 2004-08-28  Martin Baulig  <martin@ximian.com>
7017
7018         * metadata.c
7019         (mono_metadata_generic_inst_is_valuetype): New public function.
7020
7021         * metadata.h (MONO_TYPE_ISSTRUCT): Call
7022         mono_metadata_generic_inst_is_valuetype() if we're a generic
7023         instance to check whether our underlying type is a valuetype.
7024
7025 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
7026
7027         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
7028         #63768.
7029
7030 2004-08-25  Martin Baulig  <martin@ximian.com>
7031
7032         * loader.c (mono_get_method_from_token): Abstract methods can also
7033         be generic and thus have type parameters.
7034
7035         * metadata-internals.h
7036         (MonoDynamicImage): Added `GPtrArray *gen_params'.
7037
7038         * reflection.c (mono_image_get_generic_param_info): Don't create a
7039         metadata row, just add an entry to the `gen_params' array.
7040         (build_compressed_metadata): Sort the `gen_params' array and then
7041         actually create the metadata.
7042
7043 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7044
7045         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
7046
7047 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
7048
7049         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
7050
7051 2004-08-24  Martin Baulig  <martin@ximian.com>
7052
7053         * class.cs (mono_class_is_subclass_of): Like an interface, a
7054         generic instance also derives from System.Object.
7055
7056 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
7057
7058         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
7059         custom modifiers to be in any order. Fixes #61990.
7060
7061 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
7062
7063         * object.c: Register mono_object_new_fast icall.
7064         
7065         * object.c (mono_class_get_allocation_ftn): Return to calling
7066         mono_object_new_fast, since it seems faster to compute the object 
7067         size in unmanaged code than passing it as a parameter.
7068
7069         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
7070
7071         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
7072         this function with Boehm as the oom handler, so we don't have to check
7073         the result of GC_malloc.
7074
7075         * object.c: Remove checks for oom.
7076
7077         * object.h object.c (mono_class_get_allocation_ftn): New function to
7078         return the icall which can be used to allocate an instance of a given
7079         class. 
7080
7081         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
7082
7083         * class-internals.h: Add 'enabled' field.
7084
7085 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
7086
7087         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
7088
7089 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
7090         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
7091         value 0x0010.
7092
7093 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
7094
7095         * appdomain.c: use the Tls function for appdomain too,
7096         at Zoltan's request. Actually return in mono_context_get
7097
7098         * appdomain.c, profiler.c, threads.c: use __thread
7099
7100 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
7101
7102         * appdomain.c threads.c: Call GC_CreateThread on windows.
7103
7104         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
7105         multiple libraries since this don't work on windows.
7106
7107 2004-08-18  Martin Baulig  <martin@ximian.com>
7108
7109         * class-internals.h
7110         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
7111         MonoMethodHeader.
7112
7113         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
7114         MonoMethodNormal since we also need it for abstract and interface
7115         methods.
7116
7117         * reflection.c
7118         (build_compressed_metadata): Sort the GenericParam table.
7119         (mono_image_create_token): Added `gboolean create_methodspec'
7120         argument; this is false when generating a MethodImpl token.
7121         (reflection_methodbuilder_to_mono_method): Abstract and interface
7122         methods may also have generic parameters.
7123
7124 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
7125
7126         * appdomain.c: thread local alloc
7127
7128 2004-08-17  Martin Baulig  <martin@ximian.com>
7129
7130         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
7131
7132         * icall.c
7133         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
7134         argument.
7135
7136         * class.c (mono_type_get_full_name): New public function.
7137         (mono_type_get_name): Don't include the type arguments.
7138
7139 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
7140
7141         * Makefile.am: Build static versions of libmetadata and libmonoruntime
7142         for inclusion into the mono executable.
7143
7144 2004-08-16  Martin Baulig  <martin@ximian.com>
7145
7146         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
7147         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
7148
7149 2004-08-14  Martin Baulig  <martin@ximian.com>
7150
7151         * class.c (dup_type): Also copy the `byref' field.
7152
7153 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
7154
7155         * reflection.c (create_dynamic_mono_image): Revert the last change 
7156         since it breaks bootstrap.
7157
7158 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
7159
7160         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
7161
7162         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
7163         not free them with g_free.
7164
7165 2004-08-11  Martin Baulig  <martin@ximian.com>
7166
7167         * reflection.c (mono_reflection_setup_internal_class): Also call
7168         mono_class_setup_mono_type() if we already have a `tb->type.type'.
7169
7170 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
7171
7172         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
7173         called during default (first) AppDomain creation. Keep track of
7174         Evidence when loading assemblies.
7175
7176 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7177
7178         * opcodes.c, opcodes.h: reduce runtime relocations.
7179
7180 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7181
7182         * culture-info.h, locales.c: fixes and chages to sue the new
7183         optimized format of the locale data.
7184         * culture-info-tables.h: regenerated.
7185
7186 2004-08-06  Geoff Norton <gnorton@customerdna.com>
7187         
7188         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
7189
7190 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
7191
7192         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
7193         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
7194         * domain-internals.h: icall declaration.
7195         * icall.c: icall registration.
7196         * object-internals.h: New fields in MonoAssembly for CAS.
7197
7198 2004-08-05  Duncan Mak  <duncan@ximian.com>
7199
7200         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7201         CEE_LDELEM_ANY.
7202
7203 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7204
7205         * reflection.c: fix to deal with object[] arrays in custom ctors
7206         (bug #62550).
7207
7208 2004-08-05  Martin Baulig  <martin@ximian.com>
7209
7210         * class.c (mono_class_array_element_size): Added support for
7211         generic instances and correctly handle "recursive" types.
7212
7213 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
7214
7215         * assembly.c: Fix warnings.
7216
7217 2004-08-04  Martin Baulig  <martin@ximian.com>
7218
7219         * class.c
7220         (mono_type_get_name_recurse): Added `gboolean include_arity'
7221         argument specifying whether or not we should include the generic
7222         arity in the type name.
7223         (_mono_type_get_name): New static function.
7224         (mono_class_setup_vtable): If we're a generic instance, don't
7225         include the generic arity in the names of explicit method
7226         implementations.        
7227
7228 2004-08-03  Martin Baulig  <martin@ximian.com>
7229
7230         * class.c (mono_type_get_name_recurse): Enclose the generic type
7231         arguments in `<', '>'.
7232
7233 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7234
7235         * gc.c: make GC warning messages use the trace API, they are just
7236         noise to most of the users.
7237
7238 2004-08-03  Martin Baulig  <martin@ximian.com>
7239
7240         * debug-mono-symfile.c (read_string): Correctly read the string.
7241
7242 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
7243
7244         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
7245         
7246         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
7247         icalls.
7248         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
7249
7250 2004-07-30  Martin Baulig  <martin@ximian.com>
7251
7252         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
7253         Reflect latest symbol writer changes.   
7254
7255 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7256
7257         * object.c: always create an object if null is passed
7258         to Invoke() where a valuetype is expected.
7259
7260 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
7261
7262         * marshal.c (mono_marshal_init): make managed
7263         signatures match native ones better for 64bits.
7264
7265 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7266
7267         * appdomain.c: hack to build correctly the private bin path on windows.
7268         Fixes bug #61991.
7269
7270 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
7271
7272         * assembly.c: Load mscorlib from the correct framework directory
7273           (mono/<version>/mscorlib.dll).
7274         * appdomain.h: Added prototypes for new functions.
7275         * internals.h: Added some prototypes.
7276         * domain.c: When initializing the runtime, get from the executable and
7277           the configuration files the runtime version that the app supports.
7278           Added support methods for reading app.exe.config. Added list of versions
7279           supported by the JIT. Added two new methods: mono_init_from_assembly,
7280           which initializes the runtime and determines the required version from
7281           the provided exe file, and mono_init_version, which initializes
7282           the runtime using the provided version.
7283         * icall.c: Get machine.config from version-specific directory.
7284         * reflection.c: When generating an image, embed the version number
7285           of the current runtime.
7286
7287 2004-07-28  Dick Porter  <dick@ximian.com>
7288
7289         * socket-io.c
7290         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
7291         returned sockaddr size before creating the remote address object.
7292         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
7293         61608.
7294
7295 2004-07-28  Dick Porter  <dick@ximian.com>
7296
7297         * locales.c (string_invariant_compare_char): Fix invariant char
7298         compares between upper and lower cases.  Fixes bug 61458.
7299
7300 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
7301         
7302         * marshal.c: actually cache stelem.ref wrappers.
7303         
7304 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7305
7306         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
7307         sections and remove the mono_cli_rva_map () function.
7308
7309 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7310
7311         * debug-mono-symfile.c: fix one more endianess issue, from a patch
7312         by Geoff Norton (<gnorton@customerdna.com>).
7313
7314 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7315
7316         * class.c: fix class loads for pointer types (typeof(int) !=
7317         typeof(int*)).
7318
7319 2004-07-27  Martin Baulig  <martin@ximian.com>
7320
7321         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
7322         reading the debugging information from an external ".mdb" file.
7323
7324 2004-07-24  Martin Baulig  <martin@ximian.com>
7325
7326         * reflection.c (mono_image_get_type_info): Only write a class
7327         layout entry if we actually have a size or a packing size.
7328
7329 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
7330
7331         * reflection.c (type_get_fully_qualified_name): 
7332         insert cast to get type checking of ?: with non-gcc compilers
7333
7334 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
7335
7336         * rand.c: use g_getenv for both lookups of
7337         MONO_EGD_SOCKET
7338
7339 2004-07-17  Martin Baulig  <martin@ximian.com>
7340
7341         * reflection.c (mono_reflection_bind_generic_method_parameters):
7342         Set `gmethod->reflection_info'.
7343
7344 2004-07-17  Martin Baulig  <martin@ximian.com>
7345
7346         * class.c (mono_class_create_from_typedef): Insert the newly
7347         created class into the hash table before computing the interfaces
7348         since we could be called recursively.
7349
7350 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
7351
7352         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
7353         function to implement stelem.ref in managed code
7354         * class-internals.h, debug-helpers.c: a new wrapper type
7355         for the above.
7356
7357 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7358
7359         * gc.c: allow GC handles to work even when no GC is compiled in.
7360         Fix part of bug #61134 (GetAddrOfPinnedObject).
7361
7362 2004-07-13  Peter Williams  <peter@newton.cx>
7363  
7364         * process.c (complete_path): Make sure we don't attempt to execute
7365         directories.
7366  
7367 2004-07-12  Geoff Norton <gnorton@customerdna.com>
7368
7369         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
7370           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
7371           and will add/subtract the hour if needed
7372
7373 2004-07-12  Martin Baulig  <martin@ximian.com>
7374
7375         * reflection.c (mono_field_get_object): If we have
7376         `field->generic_info', take the attributes from
7377         `field->generic_info->generic_type'.    
7378
7379 2004-07-12  Martin Baulig  <martin@ximian.com>
7380
7381         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
7382         This function must be called before initializing the runtime.
7383         (mono_debug_init_1): New function; call this after initializing
7384         the runtime, but before loading the assembly.  It tells the
7385         debugger to load corlib and the builtin types.
7386
7387         * mono-debug-debugger.c: Did some larger changes in the debugging
7388         code; support recursive class declarations, make sure we actually
7389         add all classes.
7390
7391 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7392
7393         * debug-helpers.c: undo my previous patch and fixed the real issue in
7394         ../mini/exceptions-x86.c
7395
7396 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7397
7398         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
7399         when no HOME env. variable was set and a NullRef was thrown in a .cctor
7400         called from other .cctors.
7401
7402 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
7403
7404         * loader.c: Removed the mono_loader_wine_init hack now that we are
7405         doing a managed version of Windows.Forms.
7406
7407 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
7408
7409         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
7410         threadpool.c, threads.c: remove static data from rootset.
7411
7412 2004-07-09  Dick Porter  <dick@ximian.com>
7413
7414         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
7415         Don't do any more processing if the matched length was 0.  It was
7416         increasing the size of the string before.  Fixes bug 61167.
7417
7418 2004-07-09  Dick Porter  <dick@ximian.com>
7419
7420         * socket-io.h:
7421         * socket-io.c
7422         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7423         Add support for SO_PEERCRED if its available.
7424
7425 2004-07-09  Peter Bartok <pbartok@novell.com>
7426         * loader.c: winelib.exe.so error message is now only displayed if
7427         MONO_DEBUG is set. To help us avoid questions when people are trying
7428         out the new Managed.Windows.Forms.
7429
7430 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
7431
7432         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
7433         for isinst and castclass wrappers.
7434
7435         * class-internals.h icall.c: Move registration and lookup of JIT icalls
7436         to libmetadata from the JIT, so they could be used by the marshalling
7437         code and the interpreter.
7438
7439         * marshal.c: Register marshalling related JIT icalls here instead of
7440         in mini.c. Use CEE_MONO_ICALL instead of the family of 
7441         CEE_MONO_PROC<x> opcodes to call marshalling functions.
7442
7443         * metadata.h: Remove unneeded marshalling conversions.
7444
7445         * opcodes.c: Update for new opcodes.
7446         
7447 2004-07-08  Martin Baulig  <martin@ximian.com>
7448
7449         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
7450         (mono_debug_get_domain_data): Make this function static.
7451
7452 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
7453
7454         * gc.c, object.h: add nice GC handle API for embedders.
7455
7456 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
7457
7458         * reflection.c: more changes for the new api
7459
7460         * object.c: When we reflect on a field w/ a constant value, it
7461         will not have a memory location, so we must access metadata. Also,
7462         allow easier reading of strings so that we can read them from
7463         the constant data.
7464
7465         * class.c (mono_class_layout_fields): no need for literal fields here.
7466
7467         * class-internals.h: api changes for const fields
7468
7469         * icall.c (ves_icall_get_enum_info): use new apis for const fields
7470
7471 2004-07-06  Martin Baulig  <martin@ximian.com>
7472
7473         * mono-debug.h: Increment version number to 44.
7474
7475         * mono-debug.c (mono_debug_add_wrapper): The second argument is
7476         now a gpointer, rewrote this whole method.
7477
7478         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
7479         function.  Add information about the wrapper in a new "misc table".
7480
7481         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
7482         for the new misc table.
7483
7484 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
7485
7486         * metadata-internals.h image.c: Add a cache for helper signatures.
7487
7488         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
7489
7490 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
7491
7492         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
7493         delegates from a delegate. Fixes #61033.
7494         
7495         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
7496         marshalling of stringbuilder arrays. Fixes #59900.
7497
7498 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
7499
7500         * icall.c: Add EnumBuilder:setup_enum_type icall.
7501
7502 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
7503
7504         * icall.c: Added a new icall for the property version of
7505         OffsetOfStringData.
7506
7507 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
7508
7509         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
7510         it has a constant size across platforms.
7511
7512         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
7513         stack trace.
7514
7515 2004-06-29  Martin Baulig  <martin@ximian.com>
7516
7517         * mono-debug.c (mono_debug_add_method): Protect the whole function
7518         in mono_debugger_lock(), not just parts of it.
7519
7520 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7521
7522         * reflection.c: make sure padding bytes in heaps are zeroed.
7523
7524 2004-06-24  David Waite  <mass@akuma.org>
7525
7526         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
7527         image.c, loader.c, locales.c, marshal.c, metadata.c,
7528         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
7529         string-icalls.c, threads.c: change to C90-style comments from C99 /
7530         C++ -style
7531
7532 2004-06-24  Dick Porter  <dick@ximian.com>
7533
7534         * threads.c
7535         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
7536         return createdNew.  Fixes bug 60412.
7537
7538         * threads-types.h: 
7539         * icall.c: Add createdNew parameter to CreateMutex icall
7540
7541 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
7542
7543         * reflection.c, object-internals.h: save default value in params.
7544
7545 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7546
7547         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
7548         no need to build a new path combining that with the application base.
7549         Fixes bug #60442.
7550
7551 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
7552
7553         * reflection.c: fixed minor standard compliance issues.
7554
7555 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
7556
7557         * reflection.c: fixed issue with encoding some custom attributes
7558         (arrays in properties and fields, bug #60411).
7559
7560 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7561
7562         * reflection.c: fix start address when copying the public key token.
7563
7564 2004-06-23  Martin Baulig  <martin@ximian.com>
7565
7566         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
7567         the `exc' object in a static object to put it into the GC's root set.
7568
7569 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
7570
7571         * reflection.c: make mono_reflection_setup_internal_class ()
7572         callable a second time to setup a new parent class.
7573
7574 2004-06-23  Dick Porter  <dick@ximian.com>
7575
7576         * threads.c: Check for WAIT_IO_COMPLETION return values.
7577
7578 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
7579
7580         * appdomain.c: Removed the g_free on the public key token. Now copy 
7581         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
7582         * assembly.c: Added public key token string value when loading 
7583         assemblies. Fix bug #60439.
7584         * icall.c: Added missing informations (like public key) in 
7585         GetReferencedAssemblies. Fix #60519.
7586         * image.h: Changed definition for public key token from const char*
7587         public_tok_value to guchar public_key_token [17];
7588         * reflection.c: Updated for changes to public key token.
7589
7590 2004-06-22  Lluis Sanchez Gual
7591
7592         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
7593         for the field in base classes.
7594
7595 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
7596
7597         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
7598         mark headers as not supported, they are installed only for use by the
7599         debugger.
7600
7601 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
7602
7603         * *.c, *.h: avoid namespace pollution in public headers.
7604
7605 2004-06-21  Martin Baulig  <martin@ximian.com>
7606
7607         * exception.c (mono_get_exception_security): It's in
7608         "System.Security", not in "System".
7609
7610         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
7611         the exception classes.
7612
7613 2004-06-21  Martin Baulig  <martin@ximian.com>
7614
7615         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
7616         Protect the exception object from being finalized.
7617
7618 2004-06-21  Martin Baulig  <martin@ximian.com>
7619
7620         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
7621         public function.
7622
7623 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
7624
7625         * reflection.c: Load the assembly in mono_reflection_type_from_name,
7626         if it was not loaded before. Fix parts of #60439.
7627
7628 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
7629
7630         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
7631         code that was broken since Ben's change: wrappers are now
7632         dependent on the method signature only again.
7633
7634 2004-06-21  Martin Baulig  <martin@ximian.com>
7635
7636         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
7637         added interface support.
7638
7639 2004-06-21  Martin Baulig  <martin@ximian.com>
7640
7641         * class.c (mono_vtable_get_static_field_data): New public method.
7642
7643 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
7644
7645         * filewatcher.c : Windows build fix to be compliant with API changes.
7646
7647 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7648
7649         * class.h, class.c: more accessors.
7650         * metadata.h, metadata.c: prepare for hiding MonoType and
7651         MonoMethodSignature: people should use the accessors from now on
7652         outside of the tree.
7653
7654 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7655
7656         * *.c, *.h: more API cleanups.
7657
7658 2004-06-18  Jackson Harper  <jackson@ximian.com>
7659
7660         * assembly.c: Trace loading assemblies.
7661         * loader.c: Trace loading native libraries.
7662         * mono-config.c: Trace loading config files.
7663         
7664 2004-06-18  Dick Porter  <dick@ximian.com>
7665
7666         * locales.c: Tell ICU the lengths of strings, it can cope with
7667         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
7668
7669 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
7670
7671         * image.c: swapped name/filename;
7672
7673 2004-06-18  Martin Baulig  <martin@ximian.com>
7674
7675         * mono-debug-debugger.c (write_class): Write the parent class at
7676         the end of the header.
7677
7678 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7679
7680         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
7681
7682 2004-06-17  Raja R Harinath  <rharinath@novell.com>
7683
7684         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
7685         (bundle_obj): New conditional define.
7686         (BUILT_SOURCES): Remove.
7687         ($(bundle_srcs)): Make parallel-make safe.
7688         (libmonoruntime_la_LIBADD): Make unconditional.
7689         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
7690         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
7691
7692 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
7693
7694         * culture-info-tables.h: It was inconsistent with the latest
7695           supp info files.
7696
7697 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
7698
7699         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
7700         be loaded.
7701
7702         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
7703         with gcc 2.95.
7704
7705 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7706
7707         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
7708         cleaned up public header threads.h.
7709
7710 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
7711
7712         * Makefile.am, *.c, *.h: more API cleanups.
7713
7714 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
7715
7716         * Makefile.am: removed monosn from compilation.
7717         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
7718         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
7719         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
7720         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
7721         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
7722         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
7723
7724 2004-06-15  Jackson Harper  <jackson@ximian.com>
7725
7726         * assembly.c: Make locales lower case when searching the GAC for
7727         assemblies. gacutil will always make locales lowercase when
7728         installing so this effectively makes them case insensitive.
7729         
7730 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
7731
7732         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
7733         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
7734           parameter which allows to choose whether the wait can be interrupted or 
7735           not. Also added the method mono_monitor_enter(), which locks the monitor
7736           using an infinite wait and without allowing interruption.
7737           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
7738           interrupted.
7739         * object.h: Added new fields in MonoThread. suspend_event holds the event
7740           used to susped/resume the thread. synch_lock is the lock object to use for
7741           modifying the thread state.
7742         * threads.c: Use the new synch_lock object for locking, instead of "this",
7743           which can generate deadlocks.
7744           Moved thread state change in Thread.Sleep and Thread.Join from managed
7745           to unmanaged code. This avoids a deadlock when the thread was suspended
7746           just after acquiring the thread lock.
7747           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
7748           Implemented Thread.Suspend using an event instead of ThreadSuspend,
7749           which is not fully implemented in the io-layer.
7750         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
7751
7752 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
7753
7754         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
7755         threads-types.h: more API cleanups.
7756
7757 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7758
7759         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
7760         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
7761         threadpool.c, threads.c: first pass at the exported API cleanup.
7762
7763 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
7764
7765         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
7766
7767 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7768
7769         * icall.c: added internalGetHome.
7770
7771 2004-06-14  Dick Porter  <dick@ximian.com>
7772
7773         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
7774         possible to return successfully when '.' or '..' were the only
7775         entries in a directory, but were skipped.  The MonoIOStat was not
7776         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
7777         Fixes bug 59574.
7778
7779 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7780
7781         * reflection.c: make binaries run on .Net 1.1 by default.
7782
7783 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
7784
7785         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
7786
7787 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
7788
7789         * marshal.c: keep track of struct size with explicit layout
7790         (bug #59979).
7791
7792 2004-06-12  Martin Baulig  <martin@ximian.com>
7793
7794         * mono-debug-debugger.c: Comment out a debugging g_message().
7795
7796 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
7797
7798         * reflection.c, reflection.h: do not free custom attrs that are cached.
7799         * icall.c: use braces to make code clearer.
7800
7801 2004-06-11  Martin Baulig  <martin@ximian.com>
7802
7803         * class.h (MonoInflatedField): New type.
7804         (MonoClassField): Replaced `MonoType *generic_type' with
7805         `MonoInflatedField *generic_info'.
7806
7807         * icall.c
7808         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
7809
7810 2004-06-11  Martin Baulig  <martin@ximian.com>
7811
7812         * reflection.c (mono_image_create_method_token): Correctly encode
7813         varargs methods.
7814
7815 2004-06-11  Martin Baulig  <martin@ximian.com>
7816
7817         * metadata.c (mono_metadata_parse_method_signature): When parsing
7818         a MethodDef which has VarArgs, also set sentinelpos if we don't
7819         have any parameters.
7820
7821 2004-06-11  Martin Baulig  <martin@ximian.com>
7822
7823         * verify.c (mono_method_verify): In CEE_CALL, use
7824         mono_method_get_signature() to get the method's signature, unless
7825         we're a PInvoke method.
7826
7827 2004-06-10  Jackson Harper  <jackson@ximian.com>
7828
7829         * assembly.c: Use <path>/lib/mono/gac for the extra paths
7830         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
7831         logical name as the supplied path is just a prefix to the gac not
7832         the direct path to it.
7833         
7834 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
7835
7836         * reflection.c: make the token for a created method match
7837         the token of the MethodBuilder it was created from
7838         (IKVM requires this behaviour now).
7839
7840 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
7841
7842         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
7843         reflection.c, socket-io.c: leak fixes.
7844
7845 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
7846
7847         * icall.c: handle sentinel pos in vararg methods in position different
7848         from 0.
7849
7850 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7851
7852         * culture-info-tables.h: freshly generated.
7853
7854 2004-06-09  Martin Baulig  <martin@ximian.com>
7855
7856         * loader.c (mono_get_method_constrained): Call `mono_class_init
7857         (constrained_class)'.   
7858
7859 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
7860
7861         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
7862         any methods. Fixes #59629.
7863
7864 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
7865
7866         * culture-info-tables.h: reflecting locale-builder updates.
7867
7868 2004-06-08  Dick Porter  <dick@ximian.com>
7869
7870         * object.h:
7871         * locales.c: Fixed compile warnings, including a real bug in
7872         CompareInfo_internal_compare.
7873         
7874 2004-06-08  Dick Porter  <dick@ximian.com>
7875
7876         * locales.c
7877         (ves_icall_System_Globalization_CompareInfo_internal_index):
7878         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
7879         Double-check the resuls of usearches, because ICU currently
7880         ignores most of the collator settings here.  Fixes bug 59720.
7881         
7882 2004-06-08  Dick Porter  <dick@ximian.com>
7883
7884         * locales.c
7885         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
7886         Fix memory leak and segfault-causing typo.  No idea how this one
7887         lasted so long without being noticed.
7888
7889 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
7890
7891         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
7892         any methods. Fixes #59629.
7893
7894 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7895
7896         * assembly.c:
7897         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
7898         own the critical section before). Removed dead code (that's done
7899         in the preload hook).
7900
7901         (mono_assembly_load_with_partial_name): call the preload hook.
7902
7903 2004-06-08  Martin Baulig  <martin@ximian.com>
7904
7905         * metadata.c (mono_metadata_signature_alloc): Default
7906         `sentinelpos' to -1.
7907
7908         * reflection.c (mono_image_get_array_token): Likewise.
7909
7910 2004-06-08  Martin Baulig  <martin@ximian.com>
7911
7912         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
7913
7914         * metadata.c (mono_metadata_parse_method_signature): When parsing
7915         a MethodDef which has VarArgs, set sentinelpos.
7916
7917         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
7918         `gint16' since we're using -1 for non-varargs methods.
7919
7920         * reflection.c
7921         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
7922         (method_encode_signature): Added varargs support.
7923         (method_builder_encode_signature): Likewise.
7924         (mono_image_get_varargs_method_token): New static method.
7925         (mono_image_create_method_token): New public method; this is
7926         called via an icall instead of mono_image_create_token() when
7927         calling a varargs method.       
7928
7929 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
7930
7931         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
7932
7933 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
7934
7935         * culture-info-tables.h : Reflecting the latest locale-builder that
7936           fixed empty array representation ({} to {0}).
7937
7938 2004-06-07  Jackson Harper  <jackson@ximian.com>
7939
7940         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
7941         looking up extra gac paths. This allows MONO_GAC_PATH to act
7942         exactly like a prefix.
7943         
7944 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
7945
7946         * reflection.c (mono_reflection_type_from_name): Make a copy of the
7947         type name before modifying it. Fixes #59405.
7948
7949 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
7950
7951         * culture-info.h: added fields for "all datetime patterns".
7952         * locales.c: (  ves_icall_System_Globalization_CultureInfo
7953           _construct_datetime_format ()): fill xxx_patterns fields.
7954         * object.h: added fields for "all datetime patterns" to
7955           MonoDateTimeFormatInfo.
7956         * culture-info-tables.h: reflecting locale-builder updates.
7957
7958 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
7959
7960         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
7961         the event has no add and remove methods. Fixes #59629.
7962
7963 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
7964
7965         * object.c: Fixed possible integer overflow when allocating large
7966         strings.
7967
7968 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
7969
7970         * culture-info-tables.h: reflecting locale-builder updates.
7971
7972 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
7973
7974         * culture-info-tables.h: reflecting locale-builder updates.
7975
7976 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
7977
7978         * culture-info-tables.h: reflecting locale-builder updates.
7979
7980 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
7981
7982         * threads.c: Made Thread.Sleep abortable.
7983
7984 2004-06-02  Martin Baulig  <martin@ximian.com>
7985
7986         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
7987
7988         * debug-mono-symfile.h: Bumped symbol file version number to 37.
7989
7990 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
7991
7992         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
7993
7994 2004-05-30  Jackson Harper  <jackson@ximian.com>
7995
7996         * reflection.c: Do not hardcode assembly versions or public key
7997         tokens anymore. All of this except the corlib section was dead
7998         code anyways.
7999         
8000 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
8001
8002         * object.c (mono_runtime_invoke_array): Automatically create boxed
8003         objects for byref valuetypes if needed. Fixes #59300.
8004         
8005         * object.c (mono_method_return_message_restore): Handle 
8006         MONO_TYPE_OBJECT as well.
8007
8008 2004-05-28  Jackson Harper  <jackson@ximian.com>
8009
8010         * reflection.c: The modified type encoding was causing build
8011         problems. Reverted for now.
8012         
8013 2004-05-28  Jackson Harper  <jackson@ximian.com>
8014
8015         * reflection.c/h: Take an assembly ref so that we dont create
8016         fully qualified names when encoding types in the same assembly as
8017         the custom attribute being emitted.
8018         * appdomain.c: Increment version number.
8019         
8020 2004-05-26  Duncan Mak  <duncan@ximian.com>
8021
8022         * icall.c
8023         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8024         Set the full version number (major, minor, build, revision).
8025
8026 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
8027
8028         * marshal.c (emit_struct_conv): increment src/dst after blit
8029         (mono_marshal_get_managed_wrapper,
8030         mono_marshal_get_native_wrapper): make sure we have marshalling
8031         info before marshalling params (info computation affects
8032         blittable)
8033
8034         * class.c (class_compute_field_layout): correctly deal with
8035         blittable
8036         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
8037         value types (as per what windows dows by default)
8038         (mono_class_setup_mono_type): System.ValueType is blittable
8039         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
8040         blittable
8041
8042         * marshal.c (mono_marshal_load_type_info): flag types  as
8043         non-blittable if the native layout doesn't match the managed
8044         layout
8045
8046 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8047
8048         * appdomain.c: don't add stuff in the private search path that is
8049         above the application base. If application base is not set, there's
8050         no private search path.
8051
8052 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
8053
8054         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
8055         byref struct arguments in native->managed marshalling.
8056
8057 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
8058
8059         * marshal.c (mono_marshal_get_runtime_invoke): correctly
8060         cache methods using signature (special case for methods
8061         that are value type or string class)
8062         
8063         * image.c (mono_image_close): clean up allocated GSList's
8064         in runtime_invoke_cache.
8065
8066 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8067
8068         * mono-config.c: set the correct path for mono_cfg_dir on windows when
8069         there's no MONO_CFG_DIR environment variable defined.
8070
8071 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8072
8073         * threads.c: windows version must be >= 0x0500 to include OpenThread.
8074
8075 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
8076
8077         * threadpool.c: Really wait for 500ms after the async call, even if the wait
8078           is interrumped.
8079         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
8080           before waiting for it, and call CloseHandle after the wait to unref it.
8081           This will make sure that handles are not disposed too early.
8082
8083 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8084
8085         * appdomain.c:
8086         * appdomain.h:
8087         * icall.c: removed
8088         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
8089         needed now.
8090
8091         * object.c: se the application_base only for the domain that runs
8092         Main. Fixes bug #59216,
8093
8094 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8095
8096         * appdomain.c:
8097         * object.c: only the domain in which Main is run have
8098         SetupInformation.ConfigurationFile set, so moved a few lines from
8099         appdomain.c to object.c.
8100
8101 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8102
8103         * appdomain.c: we tried to load [name].(dll|exe), but according
8104         to bug #57710, we must also try [culture]/[name].(dll|exe) and
8105         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
8106         There's a test case attached to bug #58922.
8107
8108 2004-05-27  Dick Porter  <dick@ximian.com>
8109
8110         * icall.c:
8111         * file-io.c: Implemented icalls for locking and unlocking regions
8112         in a file.
8113         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
8114         FALSE on error (fixes both compiler warning and real bug.)
8115
8116 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
8117
8118         * culture-info-tables.h: reflecting locale-builder updates.
8119
8120           (Added missing ChangeLog entry for 05/26)
8121
8122 2004-05-27  Jackson Harper  <jackson@ximian.com>
8123
8124         * locales.c: Fix some cut and paste errors.
8125         
8126 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8127
8128         * mono-config.c: set the correct path for config. directory on windows.
8129
8130 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
8131
8132         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
8133           on win32.
8134
8135 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8136
8137         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
8138         from pinvoke functions.
8139         
8140         * marshal.c (mono_ftnptr_to_delegate): Implement this.
8141
8142 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
8143
8144         * culture-info-tables.h: reflecting locale-builder updates.
8145
8146 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8147
8148         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
8149         #59086.
8150
8151 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
8152
8153         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
8154         * icall.c: Modified icalls for RNG.
8155         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
8156         Windows (CryptoAPI).
8157
8158 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8159
8160         * locales.c: Fix build.
8161
8162 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
8163
8164         * culture-info-tables.h: reflecting locale-builder updates.
8165
8166 2004-05-25  Jackson Harper  <jackson@ximian.com>
8167
8168         * locales.c: When creating the current culture use the $LANGs
8169         specific culture. So DateTimeFormat and NumberFormat entries are created.
8170         
8171 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8172
8173         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
8174         a char array as parameter.
8175
8176 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
8177
8178         * image.c: In mono_image_open(), always use an absolute path name to
8179           look for already loaded images.
8180
8181 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
8182
8183         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
8184         missing in the windows build (like older cygwin include files).
8185
8186 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
8187
8188         * icall.c: Fixed check for possible integer overflow in Buffer_
8189         BlockCopy icall. Replaced comments style // by /* */.
8190
8191 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
8192
8193         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
8194         
8195         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
8196         check after MONO_VTADDR. Fixes pinvoke2.exe.
8197
8198         * marshal.h marshal.c metadata.h: Add beginnings of support for
8199         ftnptr -> delegate marshalling.
8200
8201 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
8202
8203         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
8204         * threads.c: Fix warnings.
8205
8206 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
8207
8208         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
8209         * icall.c: Registered icalls for Suspend and Resume.
8210         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
8211           Thread.Abort.
8212         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
8213         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
8214         * process.c: Use WaitForSingleObjectEx.
8215         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
8216           checkpoints.
8217         * threads.c, threads.h: Make use of new Ex wait methods. Improved
8218           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
8219           for Suspend and Resume. Added new mono_thread_stop, used for stoping
8220           background threads. Added basic support for Abort in Windows.
8221           Start new threads using a managed delegate invoke wrapper. This wrapper
8222           has an interruption checkpoint that is needed since an interruption
8223           can be requested before the thread leaves the unmanaged code that starts 
8224           the thread.
8225         * marshal.c: Added interruption checkpoint after every native call, and
8226           also before managed calls for wrappers called from unmanaged code to
8227           go into managed code.
8228         * object.h: Added new field in MonoThread to keep track of interruption
8229           requests.
8230
8231 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
8232
8233         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
8234         calls.
8235
8236 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8237
8238         * appdomain.c:
8239         * assembly.c:
8240         * gc.c:
8241         * locales.c:
8242         * mono-config.c:
8243         * rand.c: getenv -> g_getenv (windows!)
8244
8245         * process.c: complete_path is also used on non-windows platforms.
8246
8247 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8248
8249         * icall.c: new signature for Process_Start.
8250
8251         * process.[ch]: new signature for Process_Start. If we're on windows
8252         and UseShellExecute is false, we have to search for the program by
8253         ourselves if we don't get a full path.
8254
8255 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
8256
8257         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
8258         marshalling and call CleanUpNativeData if needed. Fixes #58646.
8259
8260 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8261
8262         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
8263         Fixes bug #58373.
8264
8265 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8266
8267         * process.c: use double quotes to quote program name and arguments on
8268         windows. Fixes bug #58575.
8269
8270 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8271
8272         * file-io.c: don't return "." and ".." when using windows Find*File.
8273
8274 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
8275
8276         * marshal.c: Don't pass wrappers to message init because method 
8277         addressed used to lookup metadata. part of remoting[2|3] fix.
8278
8279 2004-05-15  Jackson Harper  <jackson@ximian.com>
8280
8281         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
8282         path is essentially the same as MONO_PATH except that it points to
8283         GACs instead of lib directories.
8284         * loader.h: The user gac is gone so we dont need function to
8285         enable/disable it.
8286         * mono-config.c: user gac option is now gone.
8287         
8288 2004-05-15  Jackson Harper  <jackson@ximian.com>
8289
8290         * culture-info.h: Make defines more consistent, add calendar data
8291         to the culture info table.
8292         * culture-info-tables.h: Add basic calendar data. Basically
8293         everyone gets default gregorian until all the data is
8294         updated.
8295         * locales.c: Use the new consistent defines. Set calendar data for
8296         culture info objects.
8297         * object.h: add a field for calendar data to CultureInfo
8298         
8299 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
8300
8301         * image.c: image->runtime_invoke_cache is keyed on signatures now.
8302         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
8303         a signature.
8304         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
8305         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
8306         an extra param that is the pointer of the method to invoke. The IL for
8307         the invoke method is no longer specific to the method, but to the
8308         signature of the method. Thus, we can share the same code for multiple
8309         methods. This reduces the number of methods that have to be compiled.
8310
8311 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
8312
8313         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
8314
8315         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8316
8317         * icall.c: Optimize Buffer.BlockCopy.
8318
8319 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8320
8321         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
8322         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
8323         quote). Changed them to "MMMM yyyy".
8324
8325 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
8326
8327         * rand.c
8328         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
8329
8330 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
8331
8332         * reflection.h: Updated after changes to managed structures.
8333
8334         * appdomain.c: Bump corlib version.
8335
8336 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8337
8338         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
8339         windows.
8340
8341 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8342
8343         * Makefile.am: link to ../os/libmonoos.la on windows.
8344
8345         * assembly.c:
8346                 -If MONO_DEBUG, warn about non-existing directories in
8347                 MONO_PATH.
8348                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
8349                 compile time variable.
8350                 -Removed init_default_path and call mono_set_rootdir from
8351                 libmonoos.a instead (windows only).
8352
8353         * assembly.h: declare mono_assembly_getrootdir().
8354
8355         * domain.c:
8356         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
8357
8358         * loader.c: s/getenv/g_getenv/
8359
8360 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
8361
8362         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
8363
8364         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
8365
8366         * metadata.h: Add new marshalling conversions.
8367
8368         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
8369         function.
8370
8371         * reflection.c (mono_reflection_get_type): Lookup the type in all
8372         modules of a multi-module assembly. Fixes #58291.
8373
8374 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
8375
8376         * threads.c: Before aborting a background, set the StopRequested
8377         state.  This avoids throwing the Abort exception.
8378         In mono_thread_manage, don't continue with the shutdown until all
8379         aborted threads have actually stopped.
8380
8381 2004-05-10  Jackson Harper  <jackson@ximian.com>
8382
8383         * locales.c: Remove the modifier from culture names.
8384         
8385 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8386
8387         * Makefile.am: monosn is not installed any more. It has been deprecated
8388         in favor of sn.
8389
8390 2004-05-07  Jackson Harper  <jackson@ximian.com>
8391
8392         * locales.c
8393         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
8394         Fix array construction, add bailout if the length is 0.
8395
8396 2004-05-07  Dick Porter  <dick@ximian.com>
8397
8398         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
8399         machine doesn't have a DNS entry.  Patch by Urs Muff
8400         (umuff@quark.com), fixes bug 57928.
8401
8402 2004-05-06  Jackson Harper  <jackson@ximian.com>
8403
8404         * reflection.c: Handle null PublicTokens properly. alloc mem for
8405         assembly names culture so we dont crash when freeing it.
8406         
8407 2004-05-06  Jackson Harper  <jackson@ximian.com>
8408
8409         * assembly.c: Check the usergac when loading with partial names.
8410         
8411 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
8412
8413         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
8414         does nothing for now (not required for Linux/Windows) but the class
8415         library can call it (and a newer or modified runtime could need it).
8416         * icall.c: Registred icall.
8417
8418 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8419
8420         * loader.c: prints a message on module loading error we set MONO_DEBUG
8421         environment variable.
8422
8423 2004-05-05  Jackson Harper  <jackson@ximian.com>
8424
8425         * appdomain.c: Handle PublicKeyToken=null properly.
8426         
8427 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
8428
8429         * environment.c|h: Added icall ves_icall_System_Environment_
8430         GetOSVersionString to get the current OS version as a string.
8431         * icall.c: Registred icall.
8432
8433 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
8434
8435         * object.c: in mono_object_get_virtual_method(), take into account that
8436         non-virtual methods don't have a slot in the vtable. Check needed when
8437         the object is a proxy.
8438
8439 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
8440
8441         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
8442         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
8443
8444         * object.c (mono_class_compute_gc_descriptor): Fix warning.
8445
8446         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
8447         passed when a valuetype is expected.
8448
8449         * object.c (mono_unhandled_exception): Only set the exit code if the
8450         exception happens in the main thread. Fixes thread5.exe.
8451
8452         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
8453         invalid names. Fixes #58047.
8454
8455 2004-05-03  Jackson Harper  <jackson@ximian.com>
8456
8457         * assembly.c: This line was committed accidently and is unneeded.
8458         
8459 2004-05-03  Jackson Harper  <jackson@ximian.com>
8460
8461         * icall.c: Add new icall for Assembly::LoadWithPartialName
8462         * assembly.c/.h: new function that probes the GAC to load partial
8463         assembly names by Paolo Molaro.
8464         
8465 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8466
8467         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
8468         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
8469         (type_get_fully_qualified_name): Added PublicKeyToken when building a
8470         full type name.
8471
8472 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8473
8474         * appdomain.c: fixed check for 'neutral' culture and removed warning.
8475         * reflection.c: fix bug when parsing a full type name and Version is not
8476         the last thing in the string.
8477
8478 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
8479
8480         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
8481         crashes when it is freed.
8482
8483 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8484
8485         * assembly.c: print the compat warning to stderr.
8486
8487 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
8488
8489         * assembly.c (mono_assembly_load_references): Add a compatibility
8490         hack to run old applications that might be still referencing the
8491         3300-based assemblies, only do this for System.xxx.
8492
8493 2004-05-01  Jackson Harper  <jackson@ximian.com>
8494
8495         * appdomain.c: If the culture is neutral we set it to "".
8496         
8497 2004-04-29  Jackson Harper  <jackson@ximian.com>
8498
8499         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
8500
8501 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
8502  
8503         * string-icalls.c: added low overhead function for copying chars
8504         * icall.c: added needed icall for the above function
8505  
8506 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8507
8508         * icall.c: fix return value of get_global_assembly_cache.  Implemented
8509         Environment.GetLogicalDrives.
8510
8511 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
8512
8513         * rand.c: try and talk to egd or prngd
8514         for random bytes if opening devices fail.
8515
8516 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
8517
8518         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
8519         alignment for the type using the native alignment of its members 
8520         instead of using klass->min_align.
8521
8522         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
8523
8524 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8525
8526         * file-io.c:
8527         * socket-io.c: added check for sys/aio.h.
8528
8529 2004-04-28  Dick Porter  <dick@ximian.com>
8530
8531         * threads.c: Don't abort a thread thats already aborting, when
8532         terminating everything.
8533
8534 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8535
8536         * icall.c: added 2 new async calls for Socket.
8537
8538         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
8539         IO on *nix systems.
8540
8541         * threadpool.c: removed unused variable.
8542
8543 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
8544
8545         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
8546
8547 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8548
8549         * locales.c: put back string_invariant_tolower () and
8550         string_invariant_toupper ().
8551
8552 2004-04-26 David Waite <mass@akuma.org>
8553
8554         * file-io.h:
8555         * socket-io.h:
8556         * threads.h:
8557         * unicode.h: remove comma from end of enumeration declarations
8558
8559 2004-04-26 David Waite <mass@akuma.org>
8560
8561         * debug-mono-symfile.h:
8562         * decimal.c:
8563         * mono_debug.h:
8564         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
8565
8566
8567 2004-04-26  Jackson Harper  <jackson@ximian.com>
8568
8569         * appdomain.c: Increment version number.
8570         
8571 2004-04-26  Jackson Harper  <jackson@ximian.com>
8572
8573         * appdomain.c: Set assembly references public token value when
8574         PublicKeyToken is specified, not the hash_value. Free public token
8575         values when free assembly name data. Previously the public key
8576         token was hex decoded, however we are using hex encoded public key
8577         tokens, so this is not neccasary.
8578         * assembly.c: Lookup assemblies in the gac if their public token
8579         value is set. Add function to allow enabling user gac
8580         lookups. Specify whether or not the assembly was loaded from the
8581         GAC. Compare full assembly names when checking the cache for
8582         assemblies (Temporarily disabled see comment in code). Remove
8583         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
8584         specifies trace-loader they get extra info to stdout on the
8585         loading of assemblies.
8586         * image.h: Add a field for an assembly references public token
8587         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
8588         whether an assembly has been loaded from the GAC.
8589         * image.c: Remove a corlib -> mscorlib name mapping.
8590         * loader.h: Add function to enable/disable the user gac.
8591         * mono-config.c: Check if the usergac is enabled in the config
8592         file.
8593         * icall.c: New icall to determine whether or not an assembly has
8594         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
8595         * tabldefs.h: Add constant for assemblyref flag that specifies a
8596         full public key is used instead of a public token.
8597         * reflection.c: Remove mscorlib -> corlib mappings. Set
8598         PublicTokenValue instead of hash value. This value is a hex
8599         string so it does not need to be expanded.
8600
8601 2004-04-26  Martin Baulig  <martin@ximian.com>
8602
8603         * mono-debug-debugger.c (mono_debugger_initialize): Set
8604         `mono_debugger_initialized' before calling mono_debug_lock().
8605
8606 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
8607
8608         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
8609           InternalToUpper/InternalToLower.
8610         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
8611           removed invariant culture shortcut.  This is now done in managed code.
8612         * locales.c: (string_invariant_toupper/tolower) removed.
8613
8614 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8615
8616         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
8617         Added Poll internal call.
8618
8619         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
8620         call for Poll. Select was too heavy for polling a single socket.
8621
8622         * threadpool.[ch]: added mono_threadpool_cleanup.
8623         * threads.c: use it. Don't use Thread_Abort on windows.
8624
8625 2004-04-23  Martin Baulig  <martin@ximian.com>
8626
8627         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
8628
8629 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
8630
8631         * icall.c: Registred new icalls for key pair protection and added an
8632         icall for Environment.GetFolderPath on Windows.
8633         * security.c|h: Added new icalls for key pair protection.
8634
8635 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8636
8637         * socket-io.c: don't display the non-supported family warning for known
8638         families. Now this is not displayed on windows when checking support
8639         for IPv4/IPv6.
8640
8641 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8642
8643         * class.c: don't display the layout warning for static fields.
8644
8645 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
8646
8647         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
8648         * locales.c, locales.h: Added new icalls for culture-specific
8649         Char.ToLower and Char.ToUpper.
8650
8651 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8652
8653         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
8654         by David Waite.
8655
8656 2004-04-20  Martin Baulig  <martin@ximian.com>
8657
8658         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
8659         of the type name before passing it to mono_reflection_type_from_name().
8660
8661 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
8662
8663         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
8664         encodings here. Fixes #56965.
8665
8666 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
8667
8668         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
8669         fix test on strstr result not that I can see anything that
8670         relies on the result.
8671
8672 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
8673
8674         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
8675         Fixes #57081.
8676
8677         * marshal.c (mono_marshal_get_string_encoding): New helper function.
8678
8679         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
8680         function to determine which marshalling to use for strings. Fixes
8681         #56965.
8682
8683         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
8684
8685         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
8686
8687 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
8688
8689         * icall.c: #include mono-config.h
8690
8691 2004-04-15  Jackson Harper  <jackson@ximian.com>
8692
8693         * culture-info-tables.h: Fix date formats for en-US culture.
8694         
8695 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
8696
8697         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
8698         ThreadPool.SetMinThreads.
8699         * threadpool.c: Implemented ThreadPool.GetMinThreads and
8700         ThreadPool.SetMinThreads.
8701
8702 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8703
8704         * mono-config.c: also load the .config file in the directory
8705         where the assembly was found.
8706
8707 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
8708
8709         * assembly.c: load per-assembly config files.
8710         * icall.c: decrapified code to get the config dir and moved to
8711         mono-config.c.
8712         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
8713         per-assembly config files. When doing a dll map lookup give precedence
8714         to the per-assembly data.
8715
8716 2004-04-14  Martin Baulig  <martin@ximian.com>
8717
8718         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
8719         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
8720         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
8721
8722         * mono-debugger-debugger.c: While the debugger is locked, remember
8723         whether the symbol tables have changes and send one single
8724         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
8725
8726 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
8727
8728         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
8729
8730         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
8731         function.
8732
8733         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
8734         account when marshalling string arrays. Fixes #56965.
8735
8736 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
8737
8738         * icall.c: Add new icalls mapping for security.
8739         * security.c|h: Add internal calls for WindowsIdentity,
8740         WindowsImpersonationContext and WindowsPrincipal.
8741
8742 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
8743
8744         * class.c: Added comment to ensure the System.MonoDummy class
8745         is removed when no longer necessary
8746
8747 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
8748
8749         * appdomain.c: Pass arguments to the bootstraping exceptions to
8750         minimize JITed methods at boot
8751
8752         * metadata.c (mono_exception_from_name_two_strings): Allow for the
8753         second string to be null.
8754
8755         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
8756         Change the protocol to minimize the JIT methods at startup.  Now
8757         it Returns the internal codepage, if the value of "int_code_page"
8758         is 1 at entry, and we can not compute a suitable code page
8759         number, returns the code page as a string.
8760
8761 2004-04-13  Jackson Harper  <jackson@ximian.com>
8762
8763         * culture-info-tables.h: Fix number of decimal digits for all
8764         english locales.
8765
8766 2004-04-13  Jackson Harper  <jackson@ximian.com>
8767
8768         * icall.c: Clairfy out of sync error message. It is not always
8769         your corlib that is out of sync.
8770
8771 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
8772
8773         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
8774         properties when only the set accessor is overriden. Fixes #55874.
8775
8776 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
8777
8778         * assembly.c (mono_assembly_load_references): Make this thread safe.
8779         Fixes #56327.
8780
8781 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
8782
8783         * monosn.c: Add missing initialization calls.
8784
8785 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
8786
8787         * locales.c:
8788         ves_icall_System_Globalization_CultureInfo_construct_number_format
8789         Fix g_assert so it compiles on fussier compilers re int/ptr
8790         mismatch
8791
8792 2004-04-08  Dick Porter  <dick@ximian.com>
8793
8794         * socket-io.h:
8795         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
8796         53992.  Also rearrange the code so that the internal calls return
8797         an error value and exceptions are thrown from managed code.
8798
8799         * icall.c: Add type info to the socket icalls.
8800
8801 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8802
8803         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
8804         owes me a beer.
8805
8806 2004-04-07  Martin Baulig  <martin@ximian.com>
8807
8808         * class.c (mono_class_from_generic_parameter): Don't default
8809         `klass->parent' to `mono_defaults.object_type'.
8810
8811 2004-04-07  Martin Baulig  <martin@ximian.com>
8812
8813         * reflection.c (mono_reflection_initialize_generic_parameter): Set
8814         `param->pklass->reflection_info'.       
8815
8816 2004-04-07  Jackson Harper  <jackson@ximian.com>
8817
8818         * culture-info-tables.h: Fix date separator symbol.
8819         
8820 2004-04-07  Martin Baulig  <martin@ximian.com>
8821
8822         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
8823         from System.Type to System.MonoType.
8824
8825 2004-04-07  Martin Baulig  <martin@ximian.com>
8826
8827         * reflection.h
8828         (MonoReflectionGenericParam): Added `has_reference_type' and
8829         `has_value_type' fields.
8830
8831         * reflection.c (mono_image_get_generic_param_info): Encode the
8832         correct flags if we have the `class' or `struct' constraint.
8833
8834 2004-04-07  Martin Baulig  <martin@ximian.com>
8835
8836         * reflection.h
8837         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
8838
8839 2004-04-07  Jackson Harper  <jackson@ximian.com>
8840
8841         * appdomain.c: Revert extra patches, just wanted to bump the
8842         version number.
8843         
8844 2004-04-07  Jackson Harper  <jackson@ximian.com>
8845
8846         * Makefile.am: Add culture-info private headers.
8847         * icall.c: Add new icalls for contructing locales.
8848         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
8849         * locales.h: Declare new culture info construction methods.
8850         * object.h: Add new fields used to avoid the CultureMap to
8851         MonoCultureInfo.
8852         * culture-info.h: Definition of structs used in the culture info
8853         tables.
8854         * culture-info-tables.h: Autogenerated tables that contain culture
8855         info data. This file was generated with the locale-builder tool.
8856         * appdomain.c: Incement corlib version number.
8857         
8858 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
8859
8860         * appdomain.c: (mono_runtime_init) move mono_thread_init
8861         to before mono_object_new calls so critical sections
8862         are initialized before use.
8863
8864 2004-04-07  Martin Baulig  <martin@ximian.com>
8865
8866         * icall.c
8867         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
8868         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
8869         (ves_icall_MonoGenericParam_initialize): Removed.
8870         (monogenericparam_icalls): Removed.
8871         (generictypeparambuilder_icalls): Added new table for
8872         System.Reflection.Emit.GenericTypeParameterBuilder.
8873
8874         * reflection.c
8875         (mono_reflection_define_generic_parameter): Removed.
8876         (mono_reflection_initialize_generic_parameter): This is now called
8877         from GenericTypeParameterBuilder's .ctor.
8878
8879 2004-04-06  Martin Baulig  <martin@ximian.com>
8880
8881         * class.c (mono_class_init): Don't inflate nested classes in a
8882         generic instance.
8883         (mono_type_get_name_recurse): Include the generic arguments for
8884         generic instances and generic type declarations.
8885         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
8886         (_mono_class_get_instantiation_name): Removed.
8887         (mono_class_create_generic): Always use `gklass->name' as our name.
8888
8889         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
8890
8891         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
8892         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
8893         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
8894         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
8895         closed generic methods here.
8896
8897         * reflection.c
8898         (mono_reflection_generic_inst_get_nested_types): Removed.
8899         (inflate_mono_method): Copy the generic parameters from the
8900         MonoMethodHeader into out MonoGenericMethod.
8901
8902 2004-04-06  Martin Baulig  <martin@ximian.com>
8903
8904         * row-indexes.h
8905         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
8906
8907         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
8908
8909         * reflection.c (build_compressed_metadata): If we have any entries
8910         in the GenericParam, MethodSpec or GenericParamConstraint tables,
8911         set the header version to 1.1.
8912
8913 2004-04-06  Martin Baulig  <martin@ximian.com>
8914
8915         * class.c (mono_class_init): If we're a generic instance,
8916         initialize our nested classes, too.
8917         (_mono_class_get_instantiation_name): Deal with the new `!%d'
8918         suffix. 
8919
8920 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8921
8922         * process.c: quote the argument passed to the shell on windows.
8923
8924 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
8925
8926         * threads.c (mono_alloc_special_static_data): Allow this to be
8927         called during startup.
8928
8929 2004-04-02  Martin Baulig  <martin@ximian.com>
8930
8931         * icall.c
8932         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
8933
8934 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
8935
8936         * icall.c: Fix build.
8937
8938 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
8939
8940         * Makefile.am: Added security.c|h.
8941         * icall.c: Added icall for get_UserName;
8942         * security.c: New file for security related icalls. Added function
8943         get_UserName for System.Environment (fix #56144).
8944         * security.h: New. Header file for security.c
8945
8946 2004-04-02  Dick Porter  <dick@ximian.com>
8947
8948         * icall.c: Deleted the icalls that were obsoleted some time ago
8949         by the ICU string code, and which were mixed into the icall
8950         rearranging.  Fixes bug 55969.
8951
8952         * string-icalls.h: 
8953         * string-icalls.c: Deleted the code that those icalls reference.
8954
8955 2004-04-01  Martin Baulig  <martin@ximian.com>
8956
8957         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
8958
8959         * class.c (mono_class_from_generic_parameter): Don't set 
8960         TYPE_ATTRIBUTE_INTERFACE.
8961         (my_mono_class_from_generic_parameter): Likewise.
8962
8963 2004-04-01  Martin Baulig  <martin@ximian.com>
8964
8965         * loader.c (find_method): Added an optional `MonoClass *ic'
8966         argument to search in a specific interface.
8967         (mono_get_method_constrained): New public function.
8968
8969 2004-04-01  Martin Baulig  <martin@ximian.com>
8970
8971         * reflection.c (mono_image_get_generic_field_token): Use the
8972         `handleref' cache here.
8973
8974 2004-04-01  Martin Baulig  <martin@ximian.com>
8975
8976         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
8977
8978         * reflection.c (create_generic_typespec): Use the `typespec' hash
8979         here, not the `typeref' one.    
8980
8981 2004-04-01  Martin Baulig  <martin@ximian.com>
8982
8983         * class.c (mono_class_inflate_generic_type): Moved the
8984         functionality into a new static inflate_generic_type() which
8985         returns NULL if it didn't do anything.  Only increment the
8986         `mono_stats.inflated_type_count' if we actually inflated
8987         something.
8988         (mono_class_get_full): Check the classes type to see whether we
8989         need to inflate it; also inflate MONO_TYPE_(M)VAR.
8990
8991 2004-04-01  Jackson Harper  <jackson@ximian.com>
8992
8993         * reflection.c: Set culture for assembly references.
8994         
8995 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
8996
8997         * reflection.[ch], icall.[ch], Fix support for pinning variables.
8998
8999 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9000
9001         * assembly.c:
9002         (do_mono_assembly_open): the critical section also covers
9003         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
9004
9005 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9006
9007         * threads.c:
9008         (mono_manage_threads): abort the background threads when finishing.
9009         Fixes bug #47232.
9010
9011 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9012
9013         * gc.c: only close the done_event handle if there was no timeout.
9014         C-ified comments.
9015
9016 2004-03-30  Martin Baulig  <martin@ximian.com>
9017
9018         * icall.c (icall_entries): It's called "System.Activator", not
9019         "System.Activation".    
9020
9021 2004-03-30  Martin Baulig  <martin@ximian.com>
9022
9023         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
9024         (mono_class_create_from_typespec): Likewise.
9025
9026 2004-03-30  Martin Baulig  <martin@ximian.com>
9027
9028         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
9029         `has_ctor_constraint' and `initialized'.
9030
9031 2004-03-30  Martin Baulig  <martin@ximian.com>
9032
9033         * reflection.c (encode_new_constraint): New static function to add
9034         the constructor constraint attribute to a type parameter.
9035         (encode_constraints): Call encode_new_constraint() if necessary.
9036
9037         * reflection.h
9038         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
9039
9040         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
9041         
9042 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
9043
9044         * reflection.c, icall.c: add support for pinning variables. 
9045
9046 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
9047
9048         * marshal.c (mono_marshal_get_managed_wrapper):
9049         init bool local with zero rather than null.
9050
9051 2004-03-29  Martin Baulig  <martin@ximian.com>
9052
9053         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
9054         the "official" behavior here.
9055         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
9056
9057 2004-03-29  Martin Baulig  <martin@ximian.com>
9058
9059         * icall.c: Reflect latest API changes.
9060
9061 2004-03-29  Martin Baulig  <martin@ximian.com>
9062
9063         * loader.c (mono_get_method_from_token): Also call
9064         mono_metadata_load_generic_params () for abstract and interface
9065         methods; replace the type arguments in the method signature with
9066         the ones which are loaded from the metadata.
9067
9068 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
9069
9070         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
9071         of the lock is not the current thread. MS.NET don't do it, in spite of
9072         what the documentation says. See bug #56157.
9073
9074 2004-03-28  Martin Baulig  <martin@ximian.com>
9075
9076         * class.c (mono_class_init): Don't call init_properties() and
9077         init_events() for generic instances; set `prop->parent' when
9078         inflating properties.
9079
9080         * reflection.c (mono_generic_inst_get_object): Call
9081         `mono_class_init (ginst->klass)'.
9082         (mono_type_get_object): Only create a MonoGenericInst if your
9083         generic type is a TypeBuilder.
9084         (do_mono_reflection_bind_generic_parameters): Only set
9085         `ginst->is_dynamic' if our generic type is a TypeBuilder.
9086
9087 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
9088
9089         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
9090         Fixes #56091.
9091
9092 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9093
9094         * icall.c: added Kill_internal icall.
9095         * process.[ch]: added Kill_internal icall.
9096
9097 2004-03-25  Martin Baulig  <martin@ximian.com>
9098
9099         * class.h (MonoStats): Added `generic_instance_count',
9100         `inflated_method_count', `inflated_type_count' and
9101         `generics_metadata_size'.       
9102
9103 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9104
9105         * reflection.c: no warnings now.
9106
9107 2004-03-25  Martin Baulig  <martin@ximian.com>
9108
9109         * class.c (mono_class_get_full): New public function; does a
9110         mono_class_get(), but also takes a `MonoGenericContext *'.
9111
9112         * loader.c (mono_field_from_memberref): Renamed to
9113         `field_from_memberref', made static and added `MonoGenericContext *'
9114         argument.
9115         (mono_field_from_token): Added `MonoGenericInst *' argument.
9116         (method_from_memberef): Likewise.
9117         (mono_get_method_from_token): Likewise.
9118         (mono_get_method_full): New public function; does a
9119         mono_get_method(), but also takes a `MonoGenericContext *'.
9120
9121         * verify.c (mono_method_verify): Get the method's generic context
9122         and pass it to mono_field_from_token(), mono_get_method_full() and
9123         mono_class_get_full().
9124
9125 2004-03-25  Martin Baulig  <martin@ximian.com>
9126
9127         * class.c (mono_class_inflate_generic_type): Take a
9128         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
9129         `MonoGenericMethod *'.
9130
9131 2004-03-25  Martin Baulig  <martin@ximian.com>
9132
9133         * loader.h (MonoMethodInflated): Store the MonoGenericContext
9134         instead of the MonoGenericMethod here.
9135
9136 2004-03-25  Martin Baulig  <martin@ximian.com>
9137
9138         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
9139         each time we create a new MonoGenericInst, we also create a new
9140         context which points back to us.
9141
9142         * class.c (inflate_method): Use `ginst->context' instead of
9143         creating a new context.
9144
9145         * loader.c (method_from_memberref): Use
9146         `klass->generic_inst->context' instead of creating a new context.
9147
9148 2004-03-25  Martin Baulig  <martin@ximian.com>
9149
9150         * class.h (MonoGenericContext): New struct.
9151         (MonoGenericMethod): Removed `generic_inst'.
9152
9153         * class.c (mono_class_inflate_generic_method): Take a
9154         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
9155
9156 2004-03-25  Martin Baulig  <martin@ximian.com>
9157
9158         * loader.h (MonoMethodInflated): New typedef.
9159
9160         * metadata.h (MonoMethodSignature): Removed `gen_method', make
9161         `generic_param_count' consume just 30 bits, added `is_inflated'
9162         and `has_type_parameters' flags (one bit each).
9163
9164         * class.c (mono_class_inflate_generic_method): Create a
9165         MonoMethodInflated instead of a MonoMethodNormal and set
9166         `is_inflated' in the method signature.
9167
9168         * class.h (MonoGenericMethod): Removed `generic_method'.
9169
9170 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
9171
9172         * image.c: Make sure the name of a MonoImage is always an absolute path.
9173           This fixes bug #54415.
9174
9175 2004-03-24  Martin Baulig  <martin@ximian.com>
9176
9177         * class.c (mono_class_setup_vtable): If we're a generic instance,
9178         use our generic type's vtable size.
9179
9180 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
9181
9182         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
9183         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
9184         problems.
9185
9186 2004-03-23  Martin Baulig  <martin@ximian.com>
9187
9188         * class.h (MonoDynamicGenericInst): Added `int count_events' and
9189         `MonoEvent *events'.
9190
9191         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
9192         (typebuilder_icalls): Added "get_event_info"; calls
9193         mono_reflection_event_builder_get_event_info(). 
9194
9195         * reflection.c (mono_reflection_generic_inst_initialize): Added
9196         `MonoArray *events'.
9197         (mono_reflection_event_builder_get_event_info): New function.
9198
9199 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
9200
9201         * object.h: add mono_type_initialization_init
9202
9203         * object.c (mono_runtime_class_init): 
9204         implement class constructor synchronization rules
9205         to cope with threading issues.  
9206         add mono_type_initialization_init
9207
9208         * appdomain.c (mono_runtime_init): call 
9209         mono_type_initialization_init
9210
9211         * class.h: removing initializing field from MonoVTable
9212
9213 2004-03-23  Martin Baulig  <martin@ximian.com>
9214
9215         * class.c (my_mono_class_from_generic_parameter): Use
9216         `param->name' if it's not NULL. 
9217
9218 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
9219
9220         * class.c: do not insert non-virtual methods in the vtable.
9221         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
9222         that means the method is non-virtual. This never would have
9223         happened before.
9224
9225 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
9226
9227         * profiler.c: Added lock for accessing coverage_hash.
9228
9229 2004-03-22  Martin Baulig  <martin@ximian.com>
9230
9231         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
9232         `method->method->signature->generic_param_count != 0' to make it
9233         work for interface methods.
9234
9235 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9236
9237         * process.c: quote the string passed to the shell using g_shell_quote.
9238
9239 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9240
9241         * threads.c:
9242         (mono_threads_manage): don't remove the finalizer thread and self
9243         from the threads hash table so that mono_thread_manage can be called
9244         more than once.
9245
9246 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9247
9248         * process.c: quote the arguments when UseShellExecute is true. Fixes
9249         bug #55790.
9250
9251 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9252
9253         * threads.c: set mono_thread_detach as a cleanup routine for every
9254         thread. This way it's always executed upon thread termination, either
9255         aborted or finished normally. No more xsp hangs!
9256
9257 2004-03-17  Martin Baulig  <martin@ximian.com>
9258
9259         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
9260         `int count_nested' and a `MonoType **nested'.
9261
9262         * reflection.c (mono_reflection_bind_generic_parameters): Moved
9263         most of the functionality into a new static
9264         do_mono_reflection_bind_generic_parameters() and don't take a
9265         `MonoType *nested_in' argument any more.  Don't compute nested
9266         types here.
9267         (mono_reflection_generic_inst_get_nested_types): New public method
9268         to get nested types.
9269
9270         * class.c (mono_class_create_generic): Set `klass->nested_in' if
9271         we're a nested class.
9272
9273         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
9274         mono_reflection_generic_inst_get_nested_types() to compute the
9275         nested types.
9276
9277 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9278
9279         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
9280         descriptive error message under windows.
9281         
9282 2004-03-17  Martin Baulig  <martin@ximian.com>
9283
9284         * class.c (dup_type): Added `const MonoType *original' argument;
9285         copy the attrs from the original type.
9286
9287 2004-03-17  Martin Baulig  <martin@ximian.com>
9288
9289         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
9290         `m->generic_inst_cache' here.
9291
9292 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9293
9294         * exception.h exception.c: Add stack_overflow_exception.
9295
9296 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9297
9298         * threadpool.c:
9299         (overlapped_callback): call SetEvent *after* invoking the callback.
9300         No need to call CloseHandle.
9301
9302 2004-03-16  Martin Baulig  <martin@ximian.com>
9303
9304         * reflection.c (mono_image_get_fieldref_token): Take a
9305         `MonoReflectionField *' instead of a `MonoClassField *' and a
9306         `MonoClass *'; store the `MonoReflectionField *' in the hash.
9307
9308 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9309
9310         * appdomain.c: don't add the culture to the filename we're looking for
9311         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
9312
9313 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9314
9315         * locales.c: don't ignore symbols when doing case insensitive compares.
9316         Thanks Dick! Fixes bug #54046.
9317
9318         * threads.c: surround 'threads' usage with enter/leave in
9319         mono_thread_manage.
9320
9321 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
9322
9323         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
9324         implicitly marshalled as [Out]. Fixes #55450.
9325
9326         (mono_marshal_get_runtime_invoke): Zero out the result if there is
9327         an exception.
9328
9329 2004-03-16  Martin Baulig  <martin@ximian.com>
9330
9331         * class.c (mono_class_from_generic_parameter): Use the actual
9332         parameter name. 
9333
9334 2004-03-16  Martin Baulig  <martin@ximian.com>
9335
9336         * reflection.c (type_get_signature_size): New static function.
9337         Compues the size of the type in a method signature.
9338         (method_get_signature_size): New static function; calls
9339         type_get_signature_size() to compute the actual size of the
9340         method's signature.
9341         (method_encode_signature): Use method_get_signature_size() to get
9342         the signature's size rather than using `nparams * 10'.
9343
9344 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9345
9346         * file-io.h: define here WapiOverlapped on windows. I don't want the
9347         regular OVERLAPPED one.
9348
9349         * file-io.c:
9350         * threadpool.c: somehow, BindIoCompletionCallback is not found.
9351         Disabling AIO on windows.
9352
9353 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9354
9355         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
9356         bug #55385.
9357
9358 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9359
9360         * appdomain.c: upgraded corlib version.
9361
9362         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
9363         and BeginWrite. Allow opening files for asynchrnous operations.
9364
9365         * file-io.h: new struct that maps FileStreamAsyncResult.
9366         * icall.c: added new icalls.
9367         * process.[ch]: support setting child process environment variables
9368         and use the SHELL or COMSPEC when UseShellExecute is true.
9369
9370         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
9371         callback for async. IO is here and also BindHandle.
9372
9373         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
9374         from here.
9375
9376 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
9377
9378         * reflection.c (create_custom_attr): Allow len == 0.
9379
9380         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
9381         computation on big-endian machines.
9382
9383 2004-03-13  Martin Baulig  <martin@ximian.com>
9384
9385         * class.h (MonoGenericInst): Added `int count_ifaces'.
9386
9387         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
9388         `ginst->count_ifaces' instead `klass->interface_count' since we
9389         may get called before the vtable is created.
9390
9391         * loader.c (mono_method_get_param_names): If we're a generic
9392         instance, return and don't initialize the class.
9393
9394         * reflection.c (mono_reflection_setup_generic_class): Don't call
9395         ensure_runtime_vtable().
9396         (mono_reflection_bind_generic_parameters): Set
9397         `ginst->count_ifaces'.
9398
9399 2004-03-11  Jackson Harper <jackson@ximian.com>
9400
9401         * icall.c:
9402         * unicode.c:
9403         * unicode.h: Remove unused System.Char icalls.
9404         
9405 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
9406
9407         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
9408         code when we P/Invoke the first library in Windows.Forms, instead
9409         of when we first open the assembly.
9410
9411         * assembly.c: Drop the lookup from here.
9412
9413 2004-03-10  Martin Baulig  <martin@ximian.com>
9414
9415         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
9416         class for properties, fields and events.  Finally fixes #54945.
9417
9418 2004-03-10  Martin Baulig  <martin@ximian.com>
9419
9420         * metadata.c (mono_metadata_class_equal): New static function;
9421         checks whether two generic instances or two generic parameters are
9422         equal.
9423         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
9424         compare classes.        
9425
9426 2004-03-10  Martin Baulig  <martin@ximian.com>
9427
9428         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
9429
9430         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
9431         argument and write it into the `reflection_info' field.
9432
9433         * icall.c
9434         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
9435         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
9436
9437 2004-03-09  Jackson Harper  <jackson@ximian.com>
9438
9439         * char-conversions.h: use 8 bits for numeric data its all we need
9440         * icall.c: numeric data is only 8 bits now.
9441
9442 2004-03-09  Martin Baulig  <martin@ximian.com>
9443
9444         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
9445
9446         * class.c (init_properties, init_events): Initialize the new
9447         `parent' field.
9448
9449         * reflection.c (typebuilder_setup_properties): Likewise.
9450         (typebuilder_setup_events): Likewise.
9451
9452         * reflection.h (MonoEventInfo): Replaced `parent with
9453         `declaring_type' and `reflected_type'.
9454
9455         * icall.c (ves_icall_get_property_info): Distinguish between
9456         declaring and reflected type.
9457         (ves_icall_get_event_info): Likewise.
9458
9459 2004-03-09  Martin Baulig  <martin@ximian.com>
9460
9461         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
9462         (ves_icall_Type_GetField): Correctly set field->klass.
9463
9464 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
9465
9466         * loader.h: Fix warning.
9467
9468 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
9469
9470         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
9471         library routine if present.  Notice that it will still continue
9472         executing even if its missing, for those working on the Gtk#
9473         edition of Windows.Forms.
9474
9475         * assembly.c (do_mono_assembly_open): If loading the
9476         System.Windows.Forms call mono_loader_wini_init.
9477
9478 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
9479
9480         * class.h: Added MonoRemoteClass struct.
9481         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
9482         function for MonoStrings.
9483         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
9484         Added internal call for getting the proxy type.
9485         * marshal.c: Get the type of transparent proxies from its remote_class.
9486         Added methods that generate the IL for type checks and casts:
9487         mono_marshal_get_isinst, mono_marshal_get_castclass, 
9488         mono_marshal_get_proxy_cancast.
9489         * marshal.h: Declaration of the previous new methods.
9490         * object.c: Added new moethods for creating and updating MonoRemoteClass
9491         instances: mono_remote_class, mono_upgrade_remote_class, 
9492         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
9493         * verify.c: FIx transparent_proxy_fields layout.
9494         * appdomain.c: Bump corlib version.
9495
9496 2004-03-04  Jackson Harper  <jackson@ximian.com>
9497
9498         * icall.c: Add icall to access char conversion tables.
9499         * char-conversions.h: Character conversion tables.
9500         * Makefile.am: Add char-conversions.h private header file.
9501         
9502 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
9503
9504         * appdomain.c (unload_thread_main): Increase unloading timeout to
9505         10 sec as a temporary workaround for Nant problems.
9506
9507 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
9508
9509         * gc.c: Add checks for GC_enable and GC_disable.
9510
9511         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
9512         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
9513         (bug #54988).
9514         
9515 2004-02-27  Martin Baulig  <martin@ximian.com>
9516
9517         * reflection.c (mono_reflection_bind_generic_parameters): Take a
9518         `MonoReflectionType *' instead of a `MonoType *'.
9519
9520 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
9521
9522         * gc.c (run_finalize): Avoid finalizing the object representing the
9523         finalizer thread.
9524         (finalizer_thread): Fix warning.
9525
9526 2004-02-25  Martin Baulig  <martin@ximian.com>
9527
9528         * class.c (_mono_class_get_instantiation_name): Added `int offset'
9529         argument for nested types.
9530         (mono_class_create_generic): Added support for nested generictypes.
9531
9532         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
9533         `GList *nested'.
9534
9535         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
9536
9537         * reflection.c (method_encode_signature): Increase the minimum
9538         value of `size' from 10 to 11.
9539         (mono_reflection_bind_generic_parameters): Take `int type_argc'
9540         and `MonoType **types' arguments instead of the `MonoArray
9541         *types'; added `MonoType *nested_in'.  Recursively instantiate
9542         nested classes. 
9543
9544 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
9545
9546         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
9547         stack_overflow_ex members which are used by exception handling.
9548
9549         * appdomain.c (mono_runtime_init): Initialize the new members.
9550
9551         * gc.c (mono_gc_enable): New helper function.
9552         * gc.c (mono_gc_disable): New helper function.
9553
9554 2004-02-23  Martin Baulig  <martin@ximian.com>
9555
9556         * icall.c: I must have been really stupid - make it actually work
9557         this time ;-)
9558
9559 2004-02-23  Martin Baulig  <martin@ximian.com>
9560
9561         * loader.c (method_from_memberref): Only inflate the method if
9562         it's in another klass.
9563
9564 2004-02-23  Martin Baulig  <martin@ximian.com>
9565
9566         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
9567         (mono_class_init): If we're a generic instance and an interface,
9568         compute `class->interface_id'; also create `class->interfaces'
9569         here and inflate them.
9570
9571         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
9572         `ginst->is_open'.
9573         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
9574
9575         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
9576
9577 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
9578
9579         * reflection.c (method_encode_code): Improved the error message
9580         generated by the exception.
9581
9582 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9583
9584         * icall.c: Martin did not do what he said in the ChangeLog for
9585         2004-02-18, but put back the changes for properties and events.
9586         Commenting those changes out again and adding comment to bug #54518.
9587         
9588         * process.c: removed warning.
9589
9590 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
9591
9592         * marshal.c (emit_struct_conv): Print an error message instead of
9593         asserting when a type does not have the StructLayout attribute.
9594
9595 2004-02-20  Martin Baulig  <martin@ximian.com>
9596
9597         * reflection.c (mono_type_get_object): Also use the cache for
9598         generic instances.
9599         (mono_reflection_bind_generic_parameters): Always compute
9600         `ginst->ifaces'.        
9601
9602 2004-02-20  Martin Baulig  <martin@ximian.com>
9603
9604         * class.h (MonoGenericMethod): Removed `klass'.
9605
9606         * class.c (mono_class_inflate_generic_method): Added `MonoClass
9607         *klass' argument.
9608
9609 2004-02-20  Martin Baulig  <martin@ximian.com>
9610
9611         * reflection.c (method_encode_methodspec): Actually use the
9612         uninflated signature for the memberref.
9613
9614 2004-02-20  Martin Baulig  <martin@ximian.com>
9615
9616         * class.h (MonoGenericMethod): Removed `declaring'.
9617
9618         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
9619         is NULL, compute it here.
9620
9621 2004-02-20  Martin Baulig  <martin@ximian.com>
9622
9623         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
9624
9625         * metadata.c (mono_metadata_generic_inst_hash): New method.
9626         (mono_metadata_generic_inst_equal): New method.
9627
9628         * reflection.c (mono_reflection_bind_generic_parameters): Use the
9629         `klass->image->generic_inst_cache' cache to avoid creating
9630         duplicate MonoGenericInst's.
9631
9632         * class.c (mono_class_inflate_generic_type): Use the cache.
9633
9634 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
9635
9636         * object.c: fixed gc descriptor calculation for embedded valuetypes.
9637
9638 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9639
9640         * icall.c: added Socket.WSAIoctl icall.
9641
9642         * socket-io.[ch]: implemented
9643         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
9644
9645 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
9646
9647         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
9648
9649 2004-02-18  Urs C Muff  <umuff@quark.com>
9650
9651         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
9652         this work on PPC and other big-endian architectures.
9653
9654         * debug-mono-symfile.h: Prepended the names of all the `guint32'
9655         fields with an underscore to make sure they're only accessed by
9656         the read32() macro.
9657
9658 2004-02-18  Martin Baulig  <martin@ximian.com>
9659
9660         * icall.c: Put the klass->refclass changes back for methods and
9661         fields, but not for properties and events.  We're currently not
9662         distinguishing between DeclaringType and ReflectedType for
9663         properties and events, that's what caused the regressions.
9664
9665 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9666
9667         * object.c:
9668         (mono_async_result_new): the handle can be NULL.
9669
9670         * threadpool.c: Use an event instead of a semaphore, don't initialize
9671         it until needed. This saves quite a few semaphores from being created
9672         when using the threadpool.
9673
9674 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
9675
9676         * object.c (mono_string_is_interned_lookup): Fix interning of long
9677         strings. Fixes #54473.
9678
9679         * domain.c (ldstr_equal): Optimize if the two strings are equal.
9680
9681         * icall.c: Revert the klass->refclass changes since they introduce
9682         regressions (bug #54518).
9683
9684 2004-02-18  Martin Baulig  <martin@ximian.com>
9685
9686         * class.c (mono_class_init): If we're a generic instance and don't
9687         come from a TypeBuilder, inflate our members here.
9688         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
9689         (mono_class_create_generic): New public method.
9690         (mono_class_initialize_generic): Removed.
9691         (get_instantiation_name): Renamed to
9692         _mono_class_get_instantiation_name() and made it public.
9693
9694 2004-02-18  Martin Baulig  <martin@ximian.com>
9695
9696         * class.c (mono_class_inflate_generic_type): Clear the new
9697         instance's `nginst->klass' when inflating a generic instance.
9698         (mono_class_is_subclass_of): Added (basic) support for generic
9699         instances.
9700
9701 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
9702
9703         * appdomain.h, domain.c: use a MonoCodeManager instead of a
9704         MonoMempool to hold compiled native code.
9705
9706 2004-02-17  Martin Baulig  <martin@ximian.com>
9707
9708         * class.h (MonoDynamicGenericInst): Added `count_properties' and
9709         `properties'.
9710
9711         * reflection.c (mono_reflection_generic_inst_initialize): Added
9712         `MonoArray *properties' argument.
9713
9714         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
9715
9716 2004-02-17  Martin Baulig  <martin@ximian.com>
9717
9718         * icall.c (ves_icall_Type_GetFields): Renamed to
9719         ves_icall_Type_GetFields_internal() and added a
9720         `MonoReflectionType *rtype' argument; pass it to
9721         mono_field_get_object() to set the field's "reflected" type.
9722         (ves_icall_Type_GetConstructors): Likewise.
9723         (ves_icall_Type_GetEvents): Likewise.
9724         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
9725         argument; pass it to mono_method_get_object() to set the method's
9726         "reflected" type.       
9727
9728 2004-02-17  Martin Baulig  <martin@ximian.com>
9729
9730         * class.h (MonoDynamicGenericInst): New type.
9731         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
9732
9733         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
9734         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
9735         (ves_icall_MonoGenericInst_GetFields): New interncall.
9736
9737         * class.c (mono_class_from_generic): Don't call
9738         mono_class_initialize_generic() if this is a dynamic instance;
9739         ie. it's being created from a TypeBuilder.
9740         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
9741         `class->byval_arg.type'.
9742
9743         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
9744         to `inflate_method' and made static.
9745         (mono_reflection_inflate_field): Removed.
9746         (mono_reflection_generic_inst_initialize): New public method.
9747
9748         * reflection.h (MonoReflectionGenericInst): Removed `methods',
9749         `ctors' and `fields'; added `initialized'.
9750
9751 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
9752
9753         * debug-helpers.c (mono_method_full_name): Fix output for empty
9754         namespaces.
9755
9756 2004-02-12  Martin Baulig  <martin@ximian.com>
9757
9758         * class.h (MonoClassField): Added `MonoType *generic_type'.
9759
9760         * reflection.c (mono_image_get_fieldref_token): Added support for
9761         instantiated generic types.
9762         (field_encode_inflated_field): Removed.
9763         (mono_image_get_inflated_field_token): Removed.
9764         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
9765
9766         * reflection.h (MonoReflectionInflatedField): Removed.
9767
9768 2004-02-12  Martin Baulig  <martin@ximian.com>
9769
9770         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
9771         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
9772
9773         * reflection.c (mono_image_get_methodspec_token): Take a
9774         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
9775         (mono_image_create_token): Check whether we have a
9776         `method->signature->gen_method' and call
9777         mono_image_get_methodspec_token() if appropriate.
9778         (inflated_method_get_object): Removed.
9779         (mono_reflection_bind_generic_method_parameters): Return a
9780         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
9781         (mono_reflection_inflate_method_or_ctor): Likewise.
9782
9783         * reflection.h (MonoReflectionInflatedMethod): Removed.
9784
9785 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
9786
9787         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
9788         for custom valuetype marshalling.
9789
9790         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
9791
9792 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9793
9794         * icall.c: fixed WSAGetLastError_internal name.
9795
9796 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
9797
9798         * threads.c (mono_thread_attach): Allow this to be called multiple
9799         times for a thread.
9800         
9801         * threads.c (build_wait_tids): Do not wait for ourselves.
9802
9803         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
9804         appdomain list is empty.
9805
9806         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
9807         memory returned by mono_string_builder_to_utf16, since it points into
9808         managed memory. Thanks to Bernie Solomon for noticing this.
9809
9810         * icall.c: Add AppDomainSetup icalls.
9811
9812         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
9813
9814         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
9815         types.
9816
9817         * reflection.c (reflection_methodbuilder_to_mono_method): Save
9818         custom attributes to the method_aux struct. Also fix array indexes etc.
9819
9820         * loader.c (mono_method_get_param_names): Make dynamic case work again.
9821         
9822 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
9823
9824         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
9825         (both static and runtime) and reduce startup time.
9826
9827 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
9828
9829         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
9830         AsAny marshalling conversion instead of crashing.
9831
9832         * marshal.c: Fix warnings.
9833
9834 2004-02-09  Martin Baulig  <martin@ximian.com>
9835
9836         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
9837
9838         * reflection.h (MonoReflectionInflatedMethod): Removed the
9839         `declaring' field, it's now in the unmanaged MonoGenericMethod.
9840
9841         * reflection.c (method_encode_methodspec): Removed the `method'
9842         argument; we get it from `gmethod->declaring'.
9843         (inflated_method_get_object): Removed the `declaring' argument.
9844
9845 2004-02-09  Martin Baulig  <martin@ximian.com>
9846
9847         * class.h (MonoGenericMethod): New type.
9848         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
9849         `generic_method'.
9850
9851         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
9852         a `MonoGenericMethod *gen_method' one.
9853
9854         * class.c (mono_class_inflate_generic_type): Take an additional
9855         `MonoGenericMethod * argument.  This is only non-NULL if we're
9856         inflating types for a generic method.   
9857         (mono_class_inflate_generic_signature): Renamed to
9858         inflate_generic_signature() and made static; take a
9859         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
9860         (inflate_generic_header): Take a `MonoGenericMethod *' argument
9861         instead of a `MonoGenericInst *' one.
9862         (mono_class_inflate_generic_method): Likewise.
9863
9864         * reflection.c (encode_generic_method_sig): Take a
9865         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
9866         (method_encode_methodspec): Likewise.
9867         (inflated_method_get_object): Likewise. 
9868
9869         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
9870         field with a `MonoGenericMethod *gmethod' one.  
9871
9872 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
9873
9874         * class.h (mono_class_has_parent): add parens to expansion
9875         so you can ! this.
9876
9877 2004-02-08  Martin Baulig  <martin@ximian.com>
9878
9879         * image.h (MonoImage): Removed `generics_cache'.
9880
9881         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
9882         instead of a `MonoType *' argument; removed the `inflate_methods'
9883         argument.  Don't inflate methods here.
9884
9885         * loader.c (find_method): If it's a generic instance, call
9886         mono_class_init() on the `sclass->generic_inst->generic_type'.
9887
9888         * metadata.c (mono_type_size): Make this work on uninitialized
9889         generic instances; call it on the `ginst->generic_type's class.
9890
9891         * reflection.c (mono_reflection_bind_generic_parameters): Call
9892         mono_class_from_generic() to create the `ginst->klass'.
9893
9894 2004-02-08  Martin Baulig  <martin@ximian.com>
9895
9896         * class.h (MonoClass): Changed type of `generic_inst' from
9897         `MonoType *' to `MonoGenericInst *'.
9898
9899 2004-02-08  Martin Baulig  <martin@ximian.com>
9900
9901         * icall.c (ves_icall_Type_BindGenericParameters): Just call
9902         mono_type_get_object(), this is now creating a `MonoGenericInst'
9903         for MONO_TYPE_GENERICINST.
9904         (ves_icall_MonoGenericInst_GetParentType): Likewise.
9905         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
9906
9907         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
9908         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
9909         (inflated_method_get_object): Added `MonoClass *refclass' argument.
9910         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
9911         and reflected type.
9912
9913         * reflection.h (MonoReflectionInflatedMethod): Removed
9914         `declaring_type' and `reflected_type'.
9915
9916 2004-02-08  Martin Baulig  <martin@ximian.com>
9917
9918         * class.h (MonoGenericInst): Added `MonoType *parent' and
9919         `MonoType **ifaces'.
9920
9921         * reflection.h (MonoReflectionGenericInst): Removed `klass',
9922         `parent' and `interfaces'.
9923
9924         * reflection.c (mono_reflection_bind_generic_parameters): Take a
9925         `MonoType *' argument and return a `MonoType *'.
9926
9927         * icall.c
9928         (ves_icall_MonoGenericInst_GetParentType): New interncall.
9929         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
9930
9931 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
9932
9933         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
9934         valuetype marshalling.
9935
9936 2004-02-06  Martin Baulig  <martin@ximian.com>
9937
9938         * class.c
9939         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
9940         (my_mono_class_from_generic_parameter): Likewise.
9941
9942 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
9943
9944         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
9945         contents of the symbol files lazily.
9946
9947         * object.h (MonoThread): Add 'name' and 'name_len' fields.
9948
9949         * threads.h threads.c icall.c: New icalls for getting and setting the
9950         threads name.
9951
9952 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
9953
9954         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
9955         Raise an exception when the domain is not found.
9956
9957 2004-02-03  Martin Baulig  <martin@ximian.com>
9958
9959         * reflection.c (mono_image_get_methodspec_token): Use the
9960         uninflated signature; fixes gen-33.
9961
9962 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
9963
9964         * gc.c threads.c: Make the finalizer thread a normal managed thread so
9965         the finalizer code can use thread functionality.
9966
9967         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
9968         the finalizer thread.
9969
9970         * threads.c: Make some functions more robust.
9971
9972         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
9973
9974         * metadata.h: Add new marshalling conventions.
9975
9976         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
9977         stringbuilder marshalling. Fixes #53700.
9978
9979         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
9980
9981         * reflection.c (mono_image_get_type_info): Save declarative security
9982         info.
9983
9984         * reflection.c (mono_image_get_field_info): Handle uninitialized 
9985         unmanaged fields as well.
9986
9987         * appdomain.c: Bump corlib version.
9988
9989 2004-02-01  Martin Baulig  <martin@ximian.com>
9990
9991         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
9992         method type arguments.  
9993
9994 2004-01-30  Duncan Mak  <duncan@ximian.com>
9995
9996         * marshal.h: Add prototype for
9997         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
9998         and
9999         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
10000         fix the build.
10001
10002 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
10003
10004         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
10005         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
10006
10007 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
10008
10009         * marshal.c (mono_marshal_get_native_wrapper): Add support for
10010         custom marshalling of valuetypes.
10011
10012         * marshal.c: Fix some warnings.
10013
10014 2004-01-29  Martin Baulig  <martin@ximian.com>
10015
10016         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
10017         for generic method parameters.
10018
10019         * reflection.c (method_encode_methodspec): Write the uninflated
10020         signature into the methodspec table.
10021         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
10022         is always the uninflated method.
10023         (reflection_methodbuilder_to_mono_method): Copy the generic
10024         parameters from the MethodBuilder into `header->gen_params'.
10025
10026 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
10027
10028         * class.c (mono_class_from_generic_parameter): Fix warning.
10029
10030 2004-01-27  Martin Baulig  <martin@ximian.com>
10031
10032         * class.c (mono_class_from_generic_parameter): Don't create
10033         `klass->methods' here.  
10034
10035 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
10036
10037         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
10038         extension since it does not work with libraries named lib<FOO>.dll.so.
10039
10040 2004-01-25  Martin Baulig  <martin@ximian.com>
10041
10042         * class.c (mono_class_inflate_generic_type): Added support for
10043         MONO_TYPE_GENERICINST.
10044
10045         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
10046         inflate methods on open constructed types.      
10047
10048 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10049
10050         * object.c: fire ProcessExit event in the root AppDomain after running
10051         Main. Fixes bug #53299.
10052
10053 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10054
10055         * socket-io.c: include the new socket-wrappers.h header.
10056         Use the wrappers instead of the unix socket functions to make the code
10057         more clear.
10058
10059 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
10060
10061         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
10062
10063         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10064         Fixes #22532.
10065
10066 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
10067
10068         * reflection.c (mono_image_create_pefile): Handle the case when the
10069         entry point is not a MethodBuilder.
10070
10071         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10072         field to ReflectionMethod since it is not allways a builder.
10073
10074         * reflection.c (type_get_fully_qualified_name): New helper function to
10075         return the fully qualified name of a type.
10076
10077         * reflection.c (encode_marshal_blob): Always emit the fully qualified
10078         type name for custom marshallers.
10079
10080         * reflection.c (mono_marshal_spec_from_builder): Ditto.
10081
10082         * class.c (mono_class_setup_vtable): If a parent class already 
10083         implements an interface, use the implementing methods from that class.
10084         Fixes #53148.
10085
10086 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10087
10088         * threadpool.c: just return instead of ExitThread to allow for thread
10089         clean up earlier.
10090
10091 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
10092
10093         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
10094         when closing resource modules.
10095
10096         * reflection.c (mono_image_create_pefile): Handle the case when the
10097         entry point is not a MethodBuilder.
10098
10099         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10100         field to ReflectionMethod since it is not allways a builder.
10101
10102 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
10103
10104         * marshal.c (mono_marshal_get_managed_wrapper): 
10105         mono_marshal_alloc takes native int so CONV_I
10106         the arg for 64bits.
10107
10108 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
10109
10110         * reflection.c (fixup_cattrs): New function to fixup the methoddef
10111         tokens in the cattr table. Fixes #53108.
10112
10113 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10114
10115         * loader.c: don't trim ".dll" before looking up in the config file.
10116         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
10117
10118 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
10119
10120         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
10121         Return the module which contains the resource as well.
10122         (ves_icall_System_Reflection_Module_Close): New icall.
10123
10124         * appdomain.c: Bump corlib version number.
10125
10126         * image.c (mono_image_addref): New public function.
10127
10128         * assembly.c: Call mono_image_addref.
10129
10130         * reflection.c (mono_module_get_object): Increase reference count of 
10131         the image.
10132
10133         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10134         Fixes #22532.
10135
10136         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
10137         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
10138         proper exceptions on DllImport problems.
10139
10140 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
10141
10142         * class.c, metadata.c: eliminate CSIZE macro.
10143
10144 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
10145
10146         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
10147         * object.h: Added async_callback field in MonoAsyncResult.
10148         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
10149         * verify.c: Added async_callback in MonoAsyncResult layout.
10150
10151 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
10152
10153         * reflection.c (mono_reflection_get_custom_attrs): Add support
10154         for Modules.
10155
10156 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10157
10158         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
10159         marshalling.
10160         (mono_marshal_method_from_wrapper): Add null pointer check.
10161
10162 2004-01-16  Martin Baulig  <martin@ximian.com>
10163
10164         * debug-mono-symfile.h: Set version number to 36 and reflect
10165         latest symbol writer changes.
10166
10167 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10168
10169         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
10170         multi-dimensional arrays.
10171         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
10172         (mono_class_from_mono_type): Use bounded_array_class_get.
10173         
10174         * class.c (mono_bounded_array_class_get): New function which takes
10175         a 'bounded' bool argument to distinguish vectors from one dimensional
10176         arrays.
10177
10178         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
10179         bounded_array_class_get if the array has bounds.
10180
10181         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
10182         Search modules loaded using AssemblyBuilder:AddModule as well.
10183
10184 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10185
10186         * appdomain.c: increased corlib version.
10187         * filewatcher.c: removed g_print.
10188         * icall.c:
10189         (get_property_info): only allocate what is actually requested.
10190         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
10191
10192 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10193
10194         * Makefile.am: added filewatcher.[ch]
10195         * filewatcher.[ch]: FileSystemWatcher runtime support.
10196         * icall.c: added new FSW icalls.
10197
10198 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10199
10200         * string-icalls.c: fix stringbuilder regression as suggested by
10201         Iain McCoy <iain@mccoy.id.au>.
10202
10203 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
10204
10205         * process.c (process_read_stringtable_block): Recognize '007f' as
10206         a language neutral stringtable block.
10207
10208 2004-01-12  Patrik Torstensson
10209
10210         * object.h (MonoStringBuilder) : Changed layout to support our
10211         new stringbuilder class.
10212         * marshal.c: Change marshalling to support the new layout of 
10213         string builder.
10214         * appdomain.c: increased version number because new layout of
10215         string builder.
10216
10217 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
10218
10219         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
10220         assembly name as an string instead of an AssemblyName, since it is
10221         easier to extract info from it.
10222
10223         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
10224         the culture subdirectories too. Fixes #52231.
10225
10226 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10227
10228         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
10229         It takes 2 new parameters with an optional name for the method to look
10230         for and case ignoring info.
10231
10232         * threadpool.c: removed unused variable.
10233
10234 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10235
10236         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
10237         It takes 2 new parameters with an optional name for the property to look
10238         for and case ignoring info.
10239         Fixes bug #52753.
10240
10241 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
10242
10243         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
10244         Fix #52451.
10245
10246 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10247
10248         * appdomain.c:
10249         * assembly.c: escape the uri before passing it to g_filename_from_uri.
10250         Fixes bug #52630.
10251
10252 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
10253
10254         * reflection.c: Add support for more than one unmanaged resource.
10255
10256         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
10257         in field->def_value, as done in all other cases.
10258
10259         * reflection.c (mono_reflection_get_custom_attrs): Add support for
10260         TypeBuilders.
10261
10262         * reflection.c (mono_reflection_create_runtime_class): Remove 
10263         errorneous assignment to klass->element_class, since it is already
10264         done in mono_reflection_setup_internal_class.
10265
10266 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10267
10268         * gc.c: added missing LeaveCriticalSection.
10269         * icall.c: indented a couple of lines.
10270         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
10271         if we call EndInvoke inside a callback. Fixes bug #52601.
10272
10273 2004-01-07  Martin Baulig  <martin@ximian.com>
10274
10275         * mono-debug-debugger.h
10276         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
10277
10278 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
10279
10280         * appdomain.c: Use messages in NotImplementedException.
10281
10282         * exception.c (mono_get_exception_not_implemented): Now this takes
10283         a message argument.
10284
10285         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
10286         exception instead of g_asserting an aborting when something is not
10287         implemented.
10288
10289         Add some inline docs.
10290
10291 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
10292
10293         * reflection.h: Update after changes to object layout.
10294
10295         * reflection.c: Implement saving of unmanaged aka win32 resources.
10296
10297         * appdomain.c: Bump version number.
10298
10299         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
10300         Handle missing domains gracefully.
10301
10302 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
10303
10304         * file-io.c : On Windows, there are much more invalid_path_chars.
10305
10306 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10307
10308         * class.h, object.c: prepare for GetType () speedup.
10309
10310 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
10311
10312         * profiler.c: workaround for --profile null reference exception on
10313           cygwin. Patch by Patrik Torstensson.
10314
10315 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
10316
10317         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
10318         make work for unaligned access.
10319
10320 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
10321
10322         * class.c: small cleanup (class->fields [i] -> field).
10323         * image.c: check address of metadata is valid.
10324
10325 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
10326
10327         * assembly.h assembly.c (mono_assembly_loaded): New public function to
10328         search the list of loaded assemblies.
10329
10330         * reflection.c (mono_reflection_type_from_name): Use 
10331         mono_assembly_loaded instead of mono_image_loaded.
10332
10333         * reflection.c: Fix warnings.
10334
10335 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
10336
10337         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
10338         is dynamic. This is needed since an assembly can contain both dynamic and
10339         non-dynamic images.
10340
10341         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
10342         assembly->dynamic.
10343
10344         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
10345
10346         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
10347         to store modules loaded using AddModule.
10348
10349         * reflection.c (mono_image_fill_file_table): Generalize this so it works
10350         on Modules.
10351
10352         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
10353
10354         * reflection.c (mono_image_fill_export_table_from_module): New function to
10355         fill out the EXPORTEDTYPES table from a module.
10356
10357         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
10358         into a separate function. Also handle loaded non-dynamic modules.
10359
10360         * reflection.c (mono_image_basic_init): Fix memory allocation.
10361
10362         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10363
10364         * assembly.c (mono_assembly_load_references): Make this public.
10365
10366 2003-12-19  Martin Baulig  <martin@ximian.com>
10367
10368         * class.c (mono_class_initialize_generic): Made this static, take
10369         a `MonoGenericInst *' instead of a `MonoClass *'.
10370         (mono_class_from_generic): Call mono_class_initialize_generic()
10371         unless we're already initialized or being called from
10372         do_mono_metadata_parse_generic_inst().
10373
10374         * class.h (MonoGenericInst): Added `initialized' and
10375         `init_pending' flags.
10376
10377         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
10378         `mono_class_init (gklass)' or mono_class_initialize_generic()
10379         here; set `generic_inst->init_pending' while parsing the
10380         `type_argv'.
10381
10382 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
10383
10384         * locales.c: include string.h for memxxx prototypes
10385
10386 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
10387
10388         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
10389         constructor when accessing literal fields.
10390
10391 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
10392
10393         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10394
10395         * reflection.c (assembly_add_resource_manifest): New function to fill
10396         the MANIFESTRESOURCE table.
10397
10398         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
10399
10400         * reflection.h: Update to changes in class layout.
10401
10402         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
10403         Reenable call to mono_runtime_is_shutting_down ().
10404
10405         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
10406         determine if the runtime is shutting down.
10407
10408 2003-12-16  Jackson Harper <jackson@ximian.com>
10409
10410         * icall.c: comment out call to mono_runtime_is_shutting_down to
10411         fix build.
10412         
10413 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
10414
10415         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
10416         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
10417
10418 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
10419
10420         * reflection.c: move definition of swap_with_size
10421         to before its first call
10422
10423 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
10424
10425         * appdomain.c (mono_runtime_is_shutting_down): New public function.
10426
10427         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
10428         icall.
10429
10430         * object.c: Fix warnings.
10431
10432         * icall.c (ves_icall_Type_Get...): Only consider inherited static
10433         members if FlattenHierarchy is set.
10434
10435         * reflection.c (mono_image_add_decl_security): New function to emit
10436         declarative security.
10437
10438         * reflection.h reflection.c: Add support for declarative security.
10439
10440         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
10441         
10442 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
10443
10444         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
10445         
10446         * appdomain.c verify.c: Moved corlib version checking into its own
10447         function in appdomain.c since it needs to create vtables etc.
10448
10449 2003-12-13  Patrik Torstensson <p@rxc.se>
10450
10451         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
10452         instead of unwrapped server.
10453
10454 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
10455
10456         * verify.c (check_corlib): Fix field index.
10457
10458 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
10459
10460         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
10461         GetGacPath icall.
10462
10463 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
10464
10465         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
10466         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
10467         cope with sizeof(size_t) != sizeof(guint32).
10468
10469 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10470
10471         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
10472         in case of failure.
10473
10474 2003-12-10  Mark Crichton <crichton@gimp.org>
10475
10476         * icall.c: removed the GetNonZeroBytes.  We now handle this case
10477         in managed code.
10478
10479         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
10480
10481 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
10482
10483         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
10484         marked as deleted.
10485
10486 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
10487
10488         * verify.c (check_corlib): Handle the case when the version field is 
10489         initialized by a static constructor.
10490
10491 2003-12-08  Patrik Torstensson  <p@rxc.se>
10492
10493     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
10494
10495 2003-12-08  Martin Baulig  <martin@ximian.com>
10496
10497         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
10498         a MonoReflectionGenericParameter, also take the parameter index
10499         and name as arguments.
10500         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
10501         (ves_icall_MonoGenericParam_initialize): New interncall.
10502         (ves_icall_Type_make_byref_type): New interncall.
10503
10504         * reflection.h (MonoReflectionGenericParam): Derive from
10505         MonoReflectionType, not just from MonoObject.  Added `refobj' and
10506         `index' fields.
10507
10508         * reflection.c (mono_reflection_define_generic_parameter): Create
10509         and return a new MonoReflectionGenericParam; don't initialize the
10510         constraints here.
10511         (mono_reflection_initialize_generic_parameter): New public method;
10512         initializes the constraints and creates the `param->pklass'.
10513
10514 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
10515
10516         * reflection.h reflection.c: Use the new fields 'num_types', 
10517         'num_fields' and 'num_methods' to track the number of types etc.
10518
10519         * verify.c (check_corlib): Check corlib version number.
10520
10521 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
10522
10523         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
10524         function works on all methods.
10525
10526 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
10527
10528         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
10529         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
10530         the custom_type_info flag of the transparent proxy.
10531         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
10532         objects that supports IRemotingTypeInfo.
10533         * object.h: Added custom_type_info field in transparent proxy.
10534
10535 2003-12-06  Martin Baulig  <martin@ximian.com>
10536
10537         * class.c (mono_class_create_from_generic): Removed.
10538         (mono_class_from_generic): Check `ginst->klass' before doing
10539         anything else.  This is important to fully support "recursive"
10540         generic types.
10541
10542         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
10543         empty `generic_inst->klass' before doing anything else.
10544
10545 2003-12-06  Dick Porter  <dick@ximian.com>
10546
10547         * verify.c: 
10548         * object.h:
10549         * icall.c:
10550         * locales.c: Use C structs to access class fields.  Don't do a
10551         conversion between MonoString and UChar because both are
10552         platform-endian UTF-16.  Compare now takes startindex and count
10553         parameters.  Add a char overload for IndexOf.  Speed up the
10554         invariant string IndexOf.
10555
10556 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
10557
10558         * Makefile.am (monosn_LDADD): Fix parallel build.
10559
10560 2003-12-04  Martin Baulig  <martin@ximian.com>
10561
10562         * icall.c
10563         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10564         (ves_icall_Type_make_array_type): New interncall.       
10565
10566 2003-12-04  Martin Baulig  <martin@ximian.com>
10567
10568         * locales.c: also change it in the !HAVE_ICU case.
10569
10570 2003-12-04  Dick Porter  <dick@ximian.com>
10571
10572         * icall.c:
10573         * locales.c: construct_compareinfo is now in CompareInfo, not
10574         CultureInfo.
10575
10576 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
10577
10578         * image.c (mono_image_load_file_for_image): Cache loaded images in the
10579         image->files array.
10580
10581         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
10582         table as well.
10583
10584         * assembly.c (mono_assembly_load_references): Only load references
10585         once.
10586
10587         * class.c (mono_class_from_name): Avoid linear search of the 
10588         EXPORTEDTYPE table.
10589
10590         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
10591
10592 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
10593
10594         * image.h (MonoImage): Add 'field_cache' field.
10595
10596         * loader.c (mono_field_from_token): Cache field lookups.
10597         
10598         * reflection.c (mono_module_get_object): Fix name property.
10599
10600         * icall.c (ves_icall_get_enum_info): Update after changes to 
10601         mono_metadata_get_constant_index ().
10602
10603         * icall.c: Get rid of get_type_info icall, use a separate icall for
10604         each type property to avoid needless memory allocations. Fixes #51514.
10605
10606         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
10607         to avoid needless binary searches.
10608
10609         * class.c (class_compute_field_layout): Move the initialization of
10610         field->def_value to mono_class_vtable ().
10611
10612         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
10613         non-corlib types.
10614
10615         * object.c (mono_object_allocate): Make it inline.
10616
10617         * object.c (mono_object_allocate_spec): Make it inline.
10618         
10619 2003-12-02  Dick Porter  <dick@ximian.com>
10620
10621         * locales.c (create_NumberFormat): NumberFormatInfo construction.
10622         Patch by Mohammad DAMT (mdamt@cdl2000.com).
10623
10624 2003-12-01  Dick Porter  <dick@ximian.com>
10625
10626         * threads.c: Fix signature and call in CreateMutex and
10627         CreateEvent.
10628
10629 2003-12-01  Dick Porter  <dick@ximian.com>
10630
10631         * icall.c: 
10632         * locales.c: Implement string compares and searching
10633
10634         * object.h: Add extra Thread field
10635
10636 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
10637
10638         * reflection.c (fixup_method): Add support for MonoCMethod.
10639
10640 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
10641
10642         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
10643
10644         * reflection.c (assembly_name_to_aname): Allow extra characters in
10645         assembly names. Fixes #51468.
10646
10647 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
10648
10649         * exception.c (mono_exception_from_name_domain): New helper function.
10650
10651         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
10652         exception object in the correct domain.
10653
10654         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
10655         formatting + make a copy a the input data.
10656
10657         * loader.c (mono_get_method_from_token): Methods which contain
10658         native code do not have entries in the ImplMap.
10659
10660         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
10661         Thanks to Gonzalo for spotting this.
10662         
10663         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
10664         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
10665
10666         * assembly.h (mono_assembly_load_from): Split the second part of 
10667         assembly loading into a new public function.
10668
10669         * exception.h (mono_get_exception_bad_image_format): New function.
10670
10671 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
10672
10673         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
10674         Enumerate all modules inside a dynamic assembly. Fixes #51293.
10675         
10676         * icall.c: Add new icall for creating dynamic methods.
10677
10678         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
10679
10680         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
10681
10682         * reflection.c (mono_reflection_create_dynamic_method): New icall to
10683         create a dynamic method.
10684
10685         * reflection.c (resolve_object): New helper function.
10686
10687         * reflection.c: Generalize ReflectionMethodBuilder and the functions
10688         which manipulate it so they can also work on dynamic methods.
10689
10690         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
10691         creating the MonoReflectionMethodAux structure if it is not needed.
10692         
10693         * reflection.h verify.c: Update after changes to object layout.
10694
10695         * reflection.c (method_builder_encode_signature): Fix compilation on
10696         gcc 2.95.x.
10697
10698 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
10699
10700         * appdomain.h: Added support for context static fields. Added static_data
10701           field to MonoAppContext and renamed thread_static_fields to a more
10702           generic special_static_fields in MonoAppDomain, since it can now contain
10703           context static fields.
10704         * domain.c: Updated hashtable name.
10705         * object.c: Replaced field_is_thread_static() for a more generic
10706           field_is_special_static() which also checks for context static attribute.
10707           In mono_class_vtable(), added support for static context fields.
10708         * threads.c: Changed methods that manage thread static fields to more
10709           generic methods so they can be reused both for thread and context static
10710           data.
10711         * threads.h: Declared some new methods.
10712
10713 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
10714
10715         * reflection.h: Update after changes to the managed types.
10716
10717         * reflection.c (encode_custom_modifiers): New helper function.
10718
10719         * reflection.c (method_encode_signature): Emit custom modifiers.
10720
10721         * reflection.c (field_encode_signature): Emit custom modifiers.
10722
10723 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
10724
10725         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
10726
10727         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
10728         implementation.
10729
10730         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
10731         icall.
10732
10733         * object.c (mono_field_get_value_object): New function.
10734
10735         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
10736         specific.
10737
10738 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
10739
10740         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
10741         return a preallocated out-of-memory exception instance.
10742
10743         * object.c (out_of_memory): Use the new function.
10744
10745         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
10746         flag is before the custom modifiers. Fixes #49802.
10747
10748 2003-11-16  Martin Baulig  <martin@ximian.com>
10749
10750         * class.c (mono_class_is_open_constructed_type): Implemented the
10751         MONO_TYPE_GENERICINST case.
10752
10753 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
10754
10755         * assembly.c (mono_assembly_fill_assembly_name): New function to
10756         fill out the MonoAssemblyName structure.
10757         (mono_assembly_open): Use the new function.
10758
10759         * icall.c (fill_reflection_assembly_name): New helper function.
10760
10761         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
10762         new function.
10763
10764         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
10765
10766 2003-11-15  Martin Baulig  <martin@ximian.com>
10767
10768         * class.c (mono_class_is_open_constructed_type): New public
10769         function; checks whether a type is an open constructed type,
10770         ie. whether it still contains type parameters.
10771         (mono_class_inflate_generic_type): If we're a type parameter and
10772         the inflated type is also a MONO_TYPE_(M)VAR, return the original
10773         type.
10774
10775         * class.h (MonoGenericInst): Added `guint32 is_open'.
10776
10777         * loader.c (method_from_methodspec): Check whether we're an open
10778         or closed constructed type and set `ginst->is_open'.
10779
10780         * reflection.c (mono_reflection_bind_generic_parameters): Check
10781         whether we're an open or closed constructed type and set
10782         `ginst->is_open'.
10783         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
10784         from open constructed types.
10785
10786 2003-11-15  Martin Baulig  <martin@ximian.com>
10787
10788         * reflection.c (mono_reflection_bind_generic_parameters): If we're
10789         a generic instance (instead of a generic type declaration) with
10790         unbound generic parameters, bind them to our actual types.
10791
10792 2003-11-14  Martin Baulig  <martin@ximian.com>
10793
10794         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
10795
10796         * reflection.c (mono_reflection_bind_generic_parameters): If we're
10797         an interface type, populate `res->interfaces' with instantiated
10798         versions of all the interfaces we inherit.
10799
10800 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
10801
10802         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
10803         when MONO_PATH is set but doesn't contain the install dir.
10804
10805 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10806
10807         * icall.c:
10808         (ves_icall_Type_GetInterfaces): don't return an interface twice when
10809         it's also implemented in base classes. Fixes bug #50927.
10810
10811 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
10812
10813         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
10814         if this method is called from a finalizer. Fixes #50913.
10815
10816 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
10817
10818         * threads.c: Implement VolatileRead/VolatileWrite
10819
10820         * icall.c: Add new icalls for VolatileRead/VolatileWrite
10821
10822 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
10823
10824         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
10825         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
10826         2.95.3.
10827
10828         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
10829         from Peter Ross (pro@missioncriticalit.com).
10830         
10831 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
10832
10833         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
10834
10835 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
10836
10837         * assembly.c (mono_assembly_load_references): Disable check because it
10838         triggers on older corlibs which lots of people have.
10839
10840 2003-11-12  Jackson Harper  <jackson@ximian.com>
10841
10842         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
10843         load corlib.dll if mscorlib.dll is not found.
10844         * assembly.h: Remove corlib name define.
10845         * class.c:
10846         * domain.c:
10847         * image.c: Change corlib name to mscorlib.
10848         
10849 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
10850
10851         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
10852
10853 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
10854
10855         * appdomain.h: Added loader_optimization here to sync with the C#
10856         code, and add disallow_binding_redirects field.
10857
10858 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
10859
10860         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
10861
10862         * reflection.c (mono_image_build_metadata): Fix crash on modules
10863         with no types.
10864
10865         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
10866
10867         * icall.c (ves_icall_get_method_info): Return callingConvention as
10868         well.
10869
10870         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
10871         namespaces from the EXPORTEDTYPE table as well.
10872
10873         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
10874         from all modules inside the assembly.
10875         
10876 2003-11-11  Martin Baulig  <martin@ximian.com>
10877
10878         * reflection.c (mono_reflection_bind_generic_parameters): Make
10879         this work for interfaces.
10880
10881 2003-11-11  Martin Baulig  <martin@ximian.com>
10882
10883         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
10884
10885 2003-11-11  Martin Baulig  <martin@ximian.com>
10886
10887         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
10888         "MonoInflatedMethod" and "MonoInflatedCtor".
10889
10890 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
10891
10892         * reflection.c (resolution_scope_from_image): Use the assembly table
10893         from the manifest module, since other modules don't have it.
10894
10895         * debug-helpers.c (mono_type_full_name): New helper function.
10896
10897         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
10898
10899         * image.c (mono_image_load_file_for_image): New public function which
10900         is a replacement for the load_file_for_image in class.c.
10901
10902         * assembly.c (mono_assembly_load_module): A wrapper for the function
10903         above which does assembly association and reference loading too.
10904
10905         * class.c (mono_class_from_name): Call mono_assembly_load_module.
10906
10907 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10908
10909         * appdomain.c: not all of the attributes for the full assembly name
10910         are required and the order doesn't matter. Fixes bug #50787.
10911
10912 2003-11-10  Dick Porter  <dick@ximian.com>
10913
10914         * locales.c: Use platform-endian UTF16
10915
10916 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
10917
10918         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
10919         
10920 2003-11-10  Martin Baulig  <martin@ximian.com>
10921
10922         * metadata.c
10923         (mono_metadata_load_generic_params): Make this actually work.
10924
10925         * reflection.c (mono_reflection_bind_generic_parameters): If our
10926         parent is a generic instance, pass all the `types' to it, no
10927         matter whether it has the same number of type parameters or not.
10928
10929 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
10930
10931         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
10932
10933         * assembly.c (mono_assembly_load_references): Move the image<->assembly
10934         assignment code to this function so it gets called recursively for all
10935         modules.
10936
10937         * image.c (load_modules): Remove the assembly assignment since it is
10938         now done by mono_assembly_load_references.
10939         
10940         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
10941         Add 'module' argument.
10942         (mono_module_get_types): New helper function.
10943         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
10944
10945 2003-11-08  Martin Baulig  <martin@ximian.com>
10946
10947         * class.c (mono_class_inflate_generic_method): Interface method
10948         don't have a header.
10949
10950         * reflection.c (mono_image_get_methodspec_token): Take an
10951         additional `MonoGenericInst *' argument instead of reading it from
10952         the header; this is necessary to support interfaces.
10953         (mono_image_create_token): Pass the `MonoGenericInst *' from the
10954         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
10955         (inflated_method_get_object): Take an additional `MonoGenericInst *'
10956         argument.
10957
10958         * reflection.h (MonoReflectionInflatedMethod): Added
10959         `MonoGenericInst *ginst'.
10960
10961 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
10962
10963         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
10964
10965 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
10966
10967         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
10968
10969 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
10970
10971         * reflection.c 
10972         (reflection_methodbuilder_from_method_builder):
10973         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
10974         initialize a ReflectionMethodBuilder structure.
10975         (mono_image_get_methodbuilder_token):
10976         (mono_image_get_ctorbuilder_token): New functions to emit memberref
10977         tokens which point to types in another module inside the same assembly.
10978
10979         * reflection.c: Use the new helper functions.
10980         
10981         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
10982
10983         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
10984         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
10985
10986         * reflection.c (resolution_scope_from_image): Emit a moduleref if
10987         neccesary.
10988
10989         * reflection.c (mono_image_build_metadata): Emit metadata only for the
10990         current module. Emit the manifest only for the main module.
10991
10992         * reflection.c (mono_image_create_token): Add assertion when a 
10993         memberref needs to be created.
10994
10995         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
10996
10997         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
10998         larger buffer for the custom attribute blob. Fixes #50637.
10999         
11000 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11001
11002         * threadpool.c: notify listener on async processing handles after
11003         invoking the async callback. Thanks to Zoltan.
11004
11005 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11006
11007         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
11008         avoid code duplication.
11009
11010         * reflection.h (MonoDynamicImage): New type which is currently unused,
11011         but will be used through the ref.emit code in place of 
11012         MonoDynamicAssembly.
11013
11014         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11015         object layout.
11016
11017         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
11018         a MonoDynamicImage instead of just a MonoImage.
11019         
11020         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
11021         icalls to ModuleBuilder but keep their semantics, so they will work
11022         with moduleb->assemblyb. This will change later.
11023         
11024 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11025
11026         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11027         object layout.
11028
11029         * reflection.c (mono_image_build_metadata): Avoid creation of a default
11030         main module, since it is now done by the managed code.
11031
11032 2003-11-03  Martin Baulig  <martin@ximian.com>
11033
11034         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
11035         `ginst->klass' here.
11036         (method_encode_methodspec): Don't use the `ginst->generic_method's
11037         klass if it's a generic instance, use `ginst->klass' in this case.
11038
11039 2003-11-03  Martin Baulig  <martin@ximian.com>
11040
11041         * reflection.c (mono_image_get_generic_method_param_info):
11042         Removed, use mono_image_get_generic_param_info() instead.
11043         (mono_image_get_type_info): Write the GenericParam table before
11044         the Method table.  This is neccessary because in the GenericParam
11045         table, type parameters of the class (ie. '!0' etc.) must come
11046         before the ones from its generic methods (ie. '!!0' etc).
11047
11048 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11049
11050         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
11051
11052 2003-11-02  Martin Baulig  <martin@ximian.com>
11053
11054         * reflection.c (create_generic_typespec): Take a
11055         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
11056         the generic parameters from it.
11057
11058 2003-11-02  Martin Baulig  <martin@ximian.com>
11059
11060         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
11061         instead of a `MonoClassField *' since we just need the type.
11062         (create_generic_typespec): New static function.  Creates a
11063         TypeSpec token for a generic type declaration.
11064         (mono_image_get_generic_field_token): New static function.
11065         (mono_image_create_token): If we're a FieldBuilder in a generic
11066         type declaration, call mono_image_get_generic_field_token() to get
11067         the token.
11068
11069 2003-11-02  Martin Baulig  <martin@ximian.com>
11070
11071         * reflection.h
11072         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
11073         `MonoReflectionGenericInst *declaring_type' and
11074         `MonoReflectionGenericInst *reflected_type' fields.
11075
11076         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
11077         `MonoReflectionGenericInst *declaring_type' and a
11078         `MonoReflectionGenericInst *reflected_type' argument instead of a
11079         single `MonoReflectionGenericInst *type' one.  Set
11080         `res->declaring_type' and `res->reflected_type' from them.
11081         (mono_reflection_inflate_field): Likewise.      
11082
11083 2003-11-02  Martin Baulig  <martin@ximian.com>
11084
11085         * class.c (mono_class_setup_vtable): Don't store generic methods
11086         in the vtable.  
11087
11088 2003-11-02  Martin Baulig  <martin@ximian.com>
11089
11090         * reflection.h (MonoReflectionGenericInst): Added
11091         `MonoReflectionType *declaring_type'.
11092
11093         * reflection.c (mono_reflection_bind_generic_parameters): Use
11094         `if (tb->parent)' instead of `klass->parent'.
11095
11096 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
11097
11098         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
11099         with an empty ASSEMBLY table.
11100
11101         * reflection.c (mono_image_build_metadata): Avoid using the same loop
11102         variable in the inner and outer loops.
11103
11104 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
11105
11106         * metadata.h (mono_metadata_make_token): Put parentheses around macro
11107         argument.
11108
11109         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
11110         
11111         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
11112         icalls. Instead, do everything in managed code. This is needed since
11113         it is hard to restore the original domain etc. in unmanaged code in the
11114         presence of undeniable exceptions.
11115
11116         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
11117         New icalls to push and pop appdomain refs.
11118
11119 2003-10-31  Martin Baulig  <martin@ximian.com>
11120
11121         * class.c (inflate_generic_type): Renamed to
11122         mono_class_inflate_generic_type() and made it public.
11123
11124         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
11125         New interncall.
11126
11127         * loader.c (mono_field_from_memberref): Also set the retklass for
11128         typespecs.
11129
11130         * fielder.c (mono_image_get_inflated_field_token): New static
11131         method; creates a metadata token for an inflated field.
11132         (mono_image_create_token, fixup_method): Added support for
11133         "MonoInflatedField".
11134         (fieldbuilder_to_mono_class_field): New static function.
11135         (mono_reflection_inflate_field): New public function.
11136
11137         * reflection.h
11138         (MonoReflectionGenericInst): Added `MonoArray *fields'.
11139         (MonoReflectionInflatedField): New typedef.     
11140
11141 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
11142
11143         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
11144         for Solaris and other platforms without s6_addr16
11145
11146 2003-10-30  Martin Baulig  <martin@ximian.com>
11147
11148         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
11149         argument instead of two.
11150         (mono_class_inflate_generic_signature): Likewise.
11151         (inflate_generic_header): Likewise.
11152         (mono_class_inflate_generic_method): Likewise.  In addition, if
11153         `ginst->klass' is set, it becomes the new `method->klass'.
11154
11155         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
11156         field.
11157
11158         * reflection.c (encode_generic_method_sig): Write a 0xa as the
11159         first byte. [FIXME]
11160         (method_encode_methodspec): If we have generic parameters, create
11161         a MethodSpec instead of a MethodRef.
11162         (fixup_method): Added support for "MonoInflatedMethod" and
11163         "MonoInflatedCtor".
11164         (mono_image_create_token): Added support for "MonoInflatedMethod"
11165         and "MonoInflatedCtor".
11166         (inflated_method_get_object): New static function; returns a
11167         managed "System.Reflection.MonoInflatedMethod" object.
11168         (mono_reflection_bind_generic_method_parameters): Return a
11169         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
11170         (mono_reflection_inflate_method_or_ctor): Likewise.
11171         (mono_image_get_generic_method_param_info): Initialize unused
11172         fields to zero.
11173         (mono_image_get_generic_param_info): Likewise.
11174
11175         * reflection.h (MonoReflectionInflatedMethod): New public
11176         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
11177         "S.R.MonoInflatedCtor" classes.
11178
11179         * loader.c (method_from_memberref): If we're a TypeSpec and it
11180         resolves to a generic instance, inflate the method.
11181
11182 2003-10-28  Dick Porter  <dick@ximian.com>
11183
11184         * object.c (mono_runtime_run_main): Convert command-line arguments
11185         into utf8, falling back to the user's locale encoding to do so.
11186
11187 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
11188
11189         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
11190         at this time.
11191
11192         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
11193
11194         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
11195         up icalls at method definition time. Partially fixes #33569.
11196
11197 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
11198
11199         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
11200         marshalling of arrays. Fixes #50116.
11201
11202         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
11203
11204         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
11205         points to a vtable in the dying appdomain.
11206
11207         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
11208         listeners into unmanaged code inside the lock.
11209
11210         * object.c (mono_class_vtable): Turn off typed allocation in non-root
11211         domains and add some comments.
11212
11213 2003-10-25  Martin Baulig  <martin@ximian.com>
11214
11215         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
11216
11217         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
11218
11219         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
11220         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
11221         currently parsing.  Create the generic class and store it in
11222         `generic_inst->klass' before parsing the type arguments.  This is
11223         required to support "recursive" definitions; see mcs/tests/gen-23.cs
11224         for an example.
11225         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
11226         to support recursive typespec entries.
11227
11228         * class.c (mono_class_setup_parent): If our parent is a generic
11229         instance, we may get called before it has its name set.
11230         (mono_class_from_generic): Splitted into
11231         mono_class_create_from_generic() and mono_class_initialize_generic().
11232
11233 2003-10-25  Martin Baulig  <martin@ximian.com>
11234
11235         * icall.c (ves_icall_Type_BindGenericParameters): Return a
11236         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
11237         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
11238         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
11239
11240         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
11241         (create_typespec): Likewise.
11242         (mono_reflection_bind_generic_parameters): Return a
11243         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
11244         (mono_reflection_inflate_method_or_ctor): New public function.
11245
11246         * reflection.h (MonoReflectionGenericInst): New typedef.        
11247
11248 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
11249
11250         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
11251         inside the domain lock. Fixes #49993.
11252         
11253         * object.c (mono_class_vtable): When typed allocation is used, 
11254         allocate vtables in the GC heap instead of in the mempool, since the
11255         vtables contain GC descriptors which are used by the collector even
11256         after the domain owning the mempool is unloaded.
11257
11258         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
11259
11260         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
11261         reflect what it does. Also invalidate mempools instead of freeing
11262         them if a define is set.
11263
11264         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
11265         of the appdomain.
11266         
11267         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
11268         hold the finalizable objects in this domain.
11269
11270         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
11271         appdomain.
11272
11273         * appdomain.c (mono_domain_set): New function to set the current
11274         appdomain, but only if it is not being unloaded.
11275
11276         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
11277         appdomain which is being unloaded.
11278         
11279         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
11280         unloading of the root appdomain.
11281
11282         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
11283         icall to execute a method in another appdomain. Intended as a 
11284         replacement for InternalSetDomain, which can confuse the code 
11285         generation in the JIT.
11286
11287         * appdomain.c (mono_domain_is_unloading): New function to determine
11288         whenever an appdomain is unloading.
11289
11290         * appdomain.c (mono_domain_unload): New function to correctly unload
11291         an appdomain.
11292
11293         * assembly.c (mono_assembly_load_references): Check that an assembly
11294         does not references itself.
11295
11296         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
11297         domain manually, it asks the finalizer thread to do it, then waits for
11298         the result. Also added a timeout.
11299
11300         * icall.c: Register the new icalls.
11301
11302         * threads.h threads.c: Export the mono_gc_stop_world and 
11303         mono_gc_start_world functions.
11304         
11305         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
11306         function to fill out the mempool with 0x2a.
11307
11308 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
11309
11310         * reflection.h (MonoReflectionMethodAux): New structure to store
11311         information which is rarely used, thus is not in the MonoMethod
11312         structure.
11313
11314         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
11315         store the aux info.
11316
11317         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
11318         and marshalling info into the aux structure.
11319
11320         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
11321         from the aux structure.
11322
11323         * loader.c (mono_method_get_param_names): Retrieve the param names from
11324         the aux structure.
11325         
11326 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
11327
11328         * exception.h exception.c: Add AppDomainUnloadedException && fix 
11329         warning.
11330
11331 2003-10-21  Dick Porter  <dick@ximian.com>
11332
11333         * socket-io.c
11334         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
11335         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
11336
11337 2003-10-21  Martin Baulig  <martin@ximian.com>
11338
11339         * reflection.c (mono_reflection_bind_generic_parameters):
11340         `klass->parent' is NULL for interfaces.
11341
11342 2003-10-21  Martin Baulig  <martin@ximian.com>
11343
11344         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11345
11346 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
11347
11348         * exception.c (mono_exception_from_name_msg): New helper function for
11349         creating exceptions and initializing their message field.
11350
11351         * exception.c: Simplify functions using the new helper.
11352
11353         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
11354         New function.
11355
11356         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
11357         mono_raise_exception, since otherwise gcc doesn't generate the function
11358         epilog for raise_exception, confusing the stack unwinding in the JIT.
11359         Fixes #45043.
11360
11361         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
11362         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
11363         Fixes #49499.
11364
11365 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11366
11367         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
11368         utf8.
11369
11370 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
11371
11372         * icall.c: Removed GetUninitializedObject method because
11373           AllocateUninitializedClassInstance does the same.
11374
11375 2003-10-18  Martin Baulig  <martin@ximian.com>
11376
11377         * class.c (inflate_generic_signature): Renamed to
11378         mono_class_inflate_generic_signature() and made it public.
11379         (my_mono_class_from_generic_parameter): New static function; if we
11380         don't already have the generic parameter's MonoClass, create a
11381         very simple one which is just used internally in the runtime and
11382         not passed back to managed code.
11383
11384         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
11385
11386         * metadata.h (MonoMethodSignature): Moved the
11387         `MonoGenericParam *gen_params' to the MonoMethodHeader.
11388         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
11389
11390         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
11391         ves_icall_MonoMethod_GetGenericArguments(); this is now an
11392         interncall on the MonoMethod class, not on MethodInfo.
11393         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
11394         calling mono_reflection_bind_generic_method_parameters() directly.
11395
11396         * loader.c (mono_method_get_signature): If this is a MethodSpec;
11397         return the already computed `method->signature'.
11398         (method_from_methodspec): New static function to load a method
11399         from a MethodSpec entry.
11400         (mono_get_method_from_token): Call the new method_from_methodspec()
11401         for MethodSpec tokens.  
11402         (mono_get_method_from_token): If we're a generic method, load the
11403         type parameters.
11404
11405         * reflection.c (mono_image_get_memberref_token): Allow
11406         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
11407         table.
11408         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
11409         (mono_image_create_token): First check whether it's a generic
11410         method (so we'd need to create a MethodSpec), then do the other
11411         two alternatives.
11412         (mono_reflection_bind_generic_method_parameters): Return a
11413         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
11414         called directly from the interncall.
11415
11416 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
11417
11418         * reflection.c (load_public_key): Move loading of the public key
11419         into managed code.
11420
11421         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
11422
11423         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
11424         fields.
11425
11426         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
11427         culture, hash_alg and public_key. Fixes #49555.
11428
11429 2003-10-17  Martin Baulig  <martin@ximian.com>
11430
11431         * class.h (MonoGenericInst): Moved this declaration here and added
11432         `MonoMethod *generic_method'.
11433
11434         * icall.c
11435         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
11436         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
11437
11438         * metadata.c (mono_metadata_type_equal): Two types of
11439         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
11440         index; ie. don't compare the address of the `MonoGenericParam'
11441         structure.
11442         (mono_metadata_load_generic_params): Removed the `MonoMethod
11443         *method' argument.
11444
11445         * metadata.h (MonoGenericInst): Moved declaration to class.h.
11446         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
11447
11448         * reflection.c (method_encode_signature): Encode the number of
11449         generic parameters.
11450         (encode_generic_method_sig): New static function.
11451         (method_encode_methodspec): New static function; creates an entry
11452         in the MethodSpec table for a generic method.
11453         (mono_image_get_methodspec_token): New static function.
11454         (mono_image_create_token): Call mono_image_get_methodspec_token()
11455         for generic methods.
11456         (mono_reflection_bind_generic_method_parameters): New public
11457         function.  Instantiates a generic method.
11458
11459 2003-10-16  Martin Baulig  <martin@ximian.com>
11460
11461         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
11462         *gen_params' here from MonoMethodHeader.
11463
11464         * metadata.c (mono_metadata_parse_method_signature): If we have
11465         generic parameters, initialize `method->gen_params' and then set
11466         the correct `type->data.generic_param' in all the parameters.
11467
11468 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
11469
11470         * threads.c (mono_threads_get_default_stacksize): New function to 
11471         return the default stacksize.
11472
11473         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
11474         termination of the finalizer thread, since the previous method had
11475         race conditions. Fixes #49628.
11476
11477         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
11478         as for the other managed threads.
11479
11480 2003-10-16  Martin Baulig  <martin@ximian.com>
11481
11482         * class.c (inflate_generic_signature): Copy `generic_param_count'
11483         and `gen_params'.
11484
11485         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
11486         New interncall.
11487
11488         * metadata.c (mono_metadata_parse_method_signature): Actually set
11489         the `method->generic_param_count' here.
11490         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
11491
11492 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
11493
11494         * object.h: Add a new field to TypedRef to simplify the implementation
11495         of the REFANY opcodes in the JIT.
11496
11497         * icall.c: Make use of the new field.
11498
11499         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
11500         dynamically.
11501
11502 2003-10-15  Martin Baulig  <martin@ximian.com>
11503
11504         * class.c (mono_class_from_gen_param): Renamed to
11505         mono_class_from_generic_parameter() and moved most of the
11506         functionality from mono_reflection_define_generic_parameter()
11507         here; ie. we create a "real" class here.
11508         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
11509         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
11510         previously been called.
11511
11512         * class.h (MonoGenericParam): Moved the declaration of this struct
11513         here from metadata.h and added `MonoMethod *method'.
11514
11515         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
11516         interncall.
11517
11518         * loader.c (mono_get_method_from_token): If we have any generic
11519         parameters, call mono_metadata_load_generic_params() to read them
11520         from the MONO_TABLE_GENERICPAR.
11521
11522         * metadata.c (mono_metadata_load_generic_params): Added
11523         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
11524
11525         * metadata.h (MonoMethodSignature): Replaced
11526         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
11527         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
11528
11529         * reflection.c (mono_reflection_define_generic_parameter): Moved
11530         most of the functionality into the new
11531         mono_class_from_generic_parameter(); set the `method' field if
11532         we're a method parameter.       
11533
11534 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
11535
11536         * marshal.c (emit_struct_conv): if native size is 0
11537         emit no code.
11538
11539 2003-10-14  Martin Baulig  <martin@ximian.com>
11540
11541         * icall.c: The generics API has changed in the spec since it was
11542         added to System.Type; these modifications make it match the spec
11543         again.
11544         (ves_icall_Type_GetGenericParameters): Renamed to
11545         `ves_icall_Type_GetGenericArguments'.
11546         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
11547         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
11548         `ves_icall_MonoType_get_HasGenericArguments'.
11549         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
11550         `ves_icall_MonoType_get_IsGenericParameter'.
11551         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
11552         this is no interncall anymore.
11553         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
11554         `ves_icall_TypeBuilder_get_IsGenericParameter'.
11555
11556 2003-10-14  Martin Baulig  <martin@ximian.com>
11557
11558         * reflection.c (mono_reflection_bind_generic_parameters): Also
11559         inflate generic methods if we're reading the class from IL.
11560
11561 2003-10-13  Martin Baulig  <martin@ximian.com>
11562
11563         * reflection.c (mono_reflection_define_generic_parameter): This
11564         method isn't called directly from the icall anymore; take a
11565         `MonoReflectionAssemblyBuilder *' so we can use this for type and
11566         method generic parameters.
11567         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
11568         (method_builder_encode_signature): Encode generic parameters.
11569         (mono_image_get_method_info): Write generic params to the
11570         MONO_TABLE_GENERICPARAM table.
11571
11572         * reflection.h (MonoReflectionMethodBuilder): Added
11573         `MonoArray *generic_params'.
11574
11575         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
11576
11577         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
11578         wrapper for mono_reflection_define_generic_parameter().
11579         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
11580
11581 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
11582
11583         * marshal.h: Add missing function to fix build.
11584
11585         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
11586         the SetLastError pinvoke attribute.
11587
11588         * marshal.c (mono_marshal_set_last_error): New helper function called
11589         by the generated code.
11590         
11591         * marshal.c (mono_mb_emit_branch): New helper function.
11592
11593         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
11594
11595         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
11596         classes as parameters and return values of delegates. Fixes #29256. 
11597
11598 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
11599
11600         * locales.c: use gint32 in non HAVE_ICU case
11601
11602 2003-10-11  Martin Baulig  <martin@ximian.com>
11603
11604         * mono-debug.c (mono_debug_add_method): Added a workaround for
11605         bug #48591.
11606
11607 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
11608
11609         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
11610         delegates passed to native code must use the STDCALL calling 
11611         convention. Fixes #35987.
11612
11613 2003-10-10  Martin Baulig  <martin@ximian.com>
11614
11615         * class.c (inflate_generic_type): If we're inflating for a generic
11616         type instance (and not for a generic method), return
11617         MONO_TYPE_MVAR unchanged.
11618
11619 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11620
11621         * string-icalls.c: Join ignores null strings in the source array.
11622         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
11623         * threads.c: GetAvailableTheads is slightly more accurate.
11624
11625 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
11626
11627         * threads.h threads.c : add mono_threads_set_default_stacksize
11628         and pass default to CreateThread calls.
11629
11630 2003-10-09  Dick Porter  <dick@ximian.com>
11631
11632         * icall.c:
11633         * locales.h:
11634         * locales.c: Internal calls for constructing CultureInfo and
11635         related objects from libicu (if its available.)
11636
11637 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
11638
11639         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
11640
11641 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11642
11643         * threadpool.c: added an argument to async_invoke_thread that is the
11644         item to process, pass the MonoAsyncResult to the thread start function
11645         when creating a new thread. This way we don't need to acquire any lock
11646         when we're creating a new thread. Readded a semaphore for faster
11647         response times (instead of that Sleep i added).
11648
11649 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
11650
11651         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
11652         get daylight change dates better on Windows, fix handling
11653         of platforms without tm_gmtoff.
11654
11655 2003-10-06  Martin Baulig  <martin@ximian.com>
11656
11657         * class.c (inflate_generic_method): Renamed to
11658         mono_class_inflate_generic_method() and made public.
11659         (mono_class_init): Don't inflate the generic methods here.
11660         (mono_class_from_generic): Added `gboolean inflate_methods'
11661         argument.  Inflate the methods here.
11662
11663         * loader.c (mono_method_get_param_names): Ignore instances of
11664         generic types for the moment.
11665
11666         * reflection.c (fixup_method): Added support for inflated methods.
11667         (mono_image_create_token): Use mono_image_get_methodref_token()
11668         for inflated methods.
11669         (mono_custom_attrs_from_param): Ignore instances of generic types
11670         for the moment.
11671         (mono_reflection_bind_generic_parameters): New public function.
11672         Moved all the functionality from
11673         ves_icall_Type_BindGenericParameters() here and added support for
11674         dynamic types.
11675         (mono_reflection_define_generic_parameter): Initialize
11676         `klass->methods' here.
11677
11678         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
11679         functionality into mono_reflection_define_generic_parameter().
11680         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
11681         TypeBuilder, return that TypeBuilder.
11682
11683 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11684
11685         * appdomain.c: removed mono_delegate_semaphore.
11686
11687         * threadpool.c:
11688         (mono_thread_pool_add): moved hash table creation inside and the thread 
11689         creation outside of the critical region.
11690         (mono_thread_pool_finish): removed obsolete code.
11691         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
11692         continue or exit the thread depending on the queue.
11693
11694 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
11695
11696         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
11697         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
11698         handle more bool marshalling options
11699
11700 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
11701
11702         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
11703         arrays of structs. Also add a more descriptive error message when
11704         a structure member is marshalled as LPArray.
11705
11706 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
11707
11708         * marshal.c (mono_marshal_get_native_wrapper): Add support for
11709         marshalling arrays of complex types. Fixes #29098. Also remove an
11710         usused and incomplete function.
11711
11712 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
11713
11714         * gc.c: report heap_size - free_bytes as total memory allocated
11715         (bug#49362).
11716
11717 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
11718
11719         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
11720         fix timezone handling problems on Windows.
11721         
11722         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
11723         asserts when the year is outside the range handled by ms the functions.
11724
11725         * class.c (setup_interface_offsets): If the class is an interface,
11726         fill out its interface_offsets slot.
11727
11728 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11729
11730         * threadpool.c: mark threadpool threads as background.
11731
11732 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
11733
11734         * decimal.c - define DECINLINE to nothing if not using GCC
11735
11736 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
11737
11738         * assembly.c: More refcount fixes.
11739
11740 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11741
11742         * string-icalls.c: if we're not trimming, return the same string.
11743         When not splitting, don't create a new string.
11744
11745 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11746
11747         * image.c:
11748         (mono_image_open): increment the ref_count inside the critical section.
11749
11750 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
11751
11752         * image.c (mono_image_open): Fix reference counting bug.
11753
11754 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
11755
11756         * marshal.c (mono_marshal_type_size) struct alignment changed for 
11757         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
11758         64bits. Avoid leak in mono_marshal_get_native_wrapper when
11759         mono_lookup_pinvoke_call throws.        
11760
11761 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
11762
11763         * reflection.c (mono_reflection_parse_type): Fix #49114.
11764
11765         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
11766         temporary workaround for cygwin header problem.
11767
11768         * object.c (mono_object_isinst): Synchronize this with the code
11769         generated by the JIT for casts.
11770
11771 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
11772
11773         * reflection.c (encode_type): Fix #38332.
11774
11775 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
11776
11777         * marshal.c (mono_marshal_method_from_wrapper): New function to return
11778         the original method from the wrapper method.
11779
11780 2003-09-25  Martin Baulig  <martin@ximian.com>
11781
11782         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
11783         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
11784         (ves_icall_Type_get_IsGenericInstance): New interncall.
11785
11786 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
11787
11788         * object.c: fix cast warning in big endian code.
11789
11790 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
11791
11792         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
11793         
11794 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11795
11796         * assembly.c: don't call check_env from mono_assembly_load. It's
11797         already done once in mono_assemblies_init and may cause headaches when
11798         multiple threads are loading assemblies.
11799
11800 2003-09-19  Martin Baulig  <martin@ximian.com>
11801
11802         * reflection.c (mono_reflection_define_generic_parameter): Don't
11803         allocate `klass->methods', set `klass->flags' to
11804         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
11805
11806 2003-09-18  Martin Baulig  <martin@ximian.com>
11807
11808         * class.c (mono_class_init): Don't create `class->methods' if it's
11809         already initialized.
11810
11811         * metadata.c (mono_metadata_load_generic_params): Make this
11812         actually work.
11813
11814         * reflection.c (mono_reflection_define_generic_parameter): Set
11815         parent class and interfaces from the constraints.
11816
11817         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
11818         to keep this struct in sync with the declaration in TypeBuilder.cs.
11819
11820 2003-09-17  Martin Baulig  <martin@ximian.com>
11821
11822         * metadata.h (MonoType): Replaced the data's `int type_param'
11823         field with `MonoGenericParam *generic_param'.
11824         (MonoGenericParam): Added `MonoClass *klass'.
11825
11826         * class.c (mono_class_from_gen_param): Removed the
11827         `MonoImage *image' and `int type_num' arguments.
11828
11829         * metadata.c (mono_metadata_parse_generic_param): New static
11830         method; creates a MonoGenericParam which just contains the index.
11831         (do_mono_metadata_parse_type): Call
11832         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
11833         MONO_TYPE_MVAR.
11834
11835         * reflection.c (mono_image_typedef_or_ref): Generic type
11836         parameters may be in the same assembly, but never use a typedef
11837         for them.
11838         (mono_reflection_define_generic_parameter): We're now creating a
11839         "real" class for the type parameter; it's now safe to call
11840         mono_class_from_mono_type() on the class'es type, it'll do the
11841         right thing.
11842
11843 2003-09-16  Martin Baulig  <martin@ximian.com>
11844
11845         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
11846         `symfile->range_entry_size' and `symfile->class_entry_size' here;
11847         the `symfile' data structure must be fully initialized before it
11848         gets added to the table.
11849
11850 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
11851
11852         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
11853
11854         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
11855         class init trampolines.
11856
11857 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
11858
11859         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
11860         to the built-in profiler to turn off time and allocation profiling
11861         respectively.
11862
11863 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
11864
11865         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
11866         g_direct_equal.
11867
11868         * debug-helpers.c (mono_method_full_name): Print the wrapper type
11869         in human readable form.
11870
11871 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
11872
11873         * reflection.c icall.c: Fixed warnings.
11874
11875         * image.c (load_class_names): Use a temporary hash table to hold the
11876         namespaces in order to avoid doing many string comparisons.
11877
11878         * image.h: Fix typo.
11879
11880         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
11881         Pass NULL instead of g_direct_equal to the GHashTable constructor 
11882         since the NULL case is short-circuited inside g_hash_table_lookup, 
11883         leading to better performance.  
11884
11885         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
11886         obtain the first custom attribute for a given index. Depends on the
11887         CustomAttribute table being sorted by the parent field.
11888
11889         * reflection.c (mono_custom_attrs_from_index): Use the new function 
11890         for better performance.
11891
11892 2003-09-07  Martin Baulig  <martin@ximian.com>
11893
11894         * class.c (mono_class_init): If we're a generic instance, inflate
11895         all our methods instead of loading them from the image.
11896         (mono_class_from_generic): Set `class->methods = gklass->methods'.
11897
11898 2003-09-07  Martin Baulig  <martin@ximian.com>
11899
11900         * mono-debug-debugger.c: Added support for constructors.
11901
11902 2003-09-06  Martin Baulig  <martin@ximian.com>
11903
11904         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
11905         New interncall.
11906
11907         * reflection.c (mono_reflection_setup_generic_class): Call
11908         ensure_runtime_vtable() to create the vtable.
11909
11910 2003-09-05  Martin Baulig  <martin@ximian.com>
11911
11912         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
11913         MONO_TYPE_MVAR.
11914
11915 2003-09-04  Martin Baulig  <martin@ximian.com>
11916
11917         * reflection.c (mono_reflection_define_generic_parameter): Generic
11918         parameters start with zero.
11919
11920 2003-09-04  Martin Baulig  <martin@ximian.com>
11921
11922         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11923
11924         * reflection.h (MonoReflectionGenericParam): New typedef.
11925         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
11926         the generic parameters from the managed TypeBuilder.
11927
11928         * reflection.c (mono_reflection_define_generic_parameter): New function.
11929         (mono_reflection_create_runtime_class): Encode generic parameters.
11930         (mono_reflection_setup_generic_class): New function; this is
11931         called after adding adding all generic params to the TypeBuilder.
11932         (encode_type): Added MONO_TYPE_VAR.
11933
11934 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
11935
11936         * class.h class.c (mono_class_needs_cctor_run): Moved this method
11937         here from the JIT.
11938
11939         * assembly.h assembly.c: Moved the AOT loading code into an assembly
11940         load hook.
11941
11942 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
11943
11944         * reflection.h reflection.c class.h class.c: Delete duplicate 
11945         definition of mono_type_get_name () from reflection.c and export the
11946         one in class.c.
11947
11948         * class.c: Class loading fixes from Bernie Solomon 
11949         (bernard@ugsolutions.com).
11950
11951         * reflection.c: Endianness fixes from Bernie Solomon 
11952         (bernard@ugsolutions.com).
11953         
11954 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
11955
11956         * assembly.h assembly.c: Define a file format version for AOT
11957         libraries.
11958         
11959         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
11960
11961         * appdomain.h (MonoJitInfo): New field to determine whenever the
11962         code is domain neutral.
11963         
11964 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
11965
11966         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
11967
11968 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
11969
11970         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
11971         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
11972         Avoid caching the result since strings must be domain specific. Fixes
11973         #48050.
11974
11975 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
11976
11977         * marshal.c (mono_marshal_init): Make this callable multiple times
11978         since it is hard to find a correct place to call it.
11979
11980         * object.c (mono_runtime_class_init): Execute static constructors in
11981         the correct appdomain.
11982
11983         * image.c (build_guid_table): Handle the case when multiple images have
11984         the same GUID.
11985
11986 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11987
11988         * icall.c: added a couple of icalls for System.Web.
11989
11990 2003-08-28  Martin Baulig  <martin@ximian.com>
11991
11992         * icall.c (ves_icall_Type_BindGenericParameters): Use
11993         `klass->generic_inst' instead of `&klass->byval_arg' in the
11994         mono_type_get_object() call.  The returned type must be
11995         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
11996
11997 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
11998
11999         * NOTES: New file.
12000
12001         * object.c (mono_class_proxy_vtable): Make it thread safe.
12002
12003         * pedump.c: Fix warning.
12004
12005         * object.c appdomain.h: Get rid of metadata_section. 
12006         It is no longer needed and it was causing deadlocks with domain->lock.
12007
12008         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
12009
12010 2003-08-26  Martin Baulig  <martin@ximian.com>
12011
12012         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
12013
12014 2003-08-26  Martin Baulig  <martin@ximian.com>
12015
12016         * pedump.c (main): Call mono_metadata_init(),
12017         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
12018         and mono_loader_init().
12019
12020 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
12021
12022         * loader.h: Add missing include to fix build.
12023
12024         * image.h: mono_image_load_references is no more.
12025
12026         * assembly.c: Reworked assembly loading to make it really thread safe.
12027         After these changes, the assembly returned by mono_assembly_open is
12028         fully initialized, i.e. all its references assemblies are loaded.
12029
12030         * assembly.c (mono_image_load_references): Renamed to 
12031         mono_assembly_load_references, and made private, since clients no
12032         longer need to call it.
12033
12034         * class.c: Removed calls to mono_assembly_load_references, since it was
12035         a source of deadlocks.
12036
12037         * loader.h loader.c class.h class.c: Protect data structures using a 
12038         new lock, the loader lock.
12039
12040         * class.c (mono_class_setup_vtable): Create temporary hash tables and
12041         GPtrArrays only when needed.
12042
12043         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
12044         into empty structures by mcs. Fixes pinvoke7.cs.
12045         
12046         * domain.c (mono_init): Call a new initialization function.
12047
12048         * appdomain.c (mono_runtime_init): Call the new initializer function
12049         of the marshal module.
12050
12051         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
12052         inserted into empty structures by mcs. Fixes pinvoke7.cs.
12053
12054         * marshal.h marshal.c: Added locks around the wrapper caches to make
12055         this module thread safe.
12056
12057         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
12058         this argument. Fixes pinvoke1.exe.
12059
12060 2003-08-25  Lluis Sanchez <lluis@ximian.com>
12061
12062         * object.h: Added call_type field to MonoMethodMessage and the corresponding
12063         enumeration of values. Removed fields to store remote call output values in
12064         MonoAsyncResult. Not needed any more.
12065         * object.c: Initialize call_type and async_result fields in mono_message_init.
12066         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
12067         dispatching the message.
12068         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
12069         async call to finish. To do it use a message with EndInvoke call type.
12070
12071 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12072
12073         * loader.h loader.c (mono_method_hash_marhal_info): New function which
12074         determines whenever a method has marshalling info.
12075
12076 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12077
12078         * assembly.c: fix the build on windows.
12079
12080 2003-08-22 Lluis Sanchez <lluis@ximian.com>
12081
12082         * object.cs: Fixed bug #47785.
12083
12084 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
12085
12086         * string-icalls.c (StringReplace): If their are no occurances of
12087         the old string found return a reference to the supplied
12088         string. This saves some memory and matches MS behavoir.
12089         
12090 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12091
12092         * socket-io.c: fixed compilation for systems that define AF_INET6
12093         and don't define SOL_IP/SOL_IPV6.
12094
12095 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
12096
12097         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
12098         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
12099
12100         * rawbuffer.c rawbuffer.h: Make this module thread safe.
12101
12102         * domain.c: Make this module thread safe.
12103
12104         * domain.c (mono_init): Call new initialization function.
12105
12106         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
12107         reference types too. Fixes #38812.
12108
12109         * image.c (mono_image_init): Fixed warnings.
12110
12111         * class.c (mono_class_from_typeref): Handle assembly load failure
12112         correctly.
12113
12114         * appdomain.c (add_assemblies_to_domain): Handle the case when
12115         the references of an assembly are not yet loaded.
12116
12117         * metadata.c image.c assembly.c: Moved initialization of global
12118         variables to a separate function called at startup since lazy 
12119         initialization of these variables is not thread safe.
12120         
12121         * image.c assembly.c: Made this module thread safe by adding locks in 
12122         the appropriate places.
12123
12124         * domain.c (mono_init): Call the new initialization functions of the
12125         three modules.
12126
12127 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
12128
12129         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
12130           make a direct call. It is proxy's work to make the call asynchronous.
12131           mono_delegate_end_invoke(): If the targe is a proxy, just collect
12132           the return values.
12133         * object.cs: mono_method_call_message_new(): read AsyncResult and
12134           state object from parameters list, if this info is requested.
12135         * object.h: Added fields to store remote call output values in
12136           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
12137
12138 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12139
12140         * object.h: add needed fields to MonoThread.
12141         * threads.c, threads.h: allow registering a function to cleanup data
12142         allocated per thread by the JIT.
12143
12144 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12145
12146         * loader.h: portability fix by Bernie Solomon
12147         * <bernard@ugsolutions.com>.
12148
12149 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
12150
12151         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
12152         return a MonoArray. This simplifies the code and also ensures that
12153         the cache allways contains an object reference as a value.
12154
12155         * icall.c (ves_icall_get_parameter_info): Simplified using the new
12156         function.
12157
12158 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12159
12160         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
12161         fixes a problem with byte ordering when getting the address family for
12162         a socket.
12163
12164 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
12165
12166         * .cvsignore: Added monosn.
12167
12168         * reflection.h reflection.c loader.c: Added support for parameter
12169         marshalling to dynamically created types. Fixes #47295.
12170
12171 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12172
12173         * rand.c: remove useless warnings.
12174
12175 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12176
12177         * class.c: implemented ldtoken for methods and fieldrefs.
12178
12179 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12180
12181         * threadpool.c: when mono_async_invoke was called, no one took care of
12182         monitoring the queue. So if the method invoked took some time and we
12183         got new async invoke requests after 500 ms (the thread created waited
12184         that long in WaitForSingleObject), the new async invoke was not called
12185         until the previous one finished.
12186
12187         This is fixed now. Thanks to Totte for helping with it.
12188
12189 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12190
12191         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
12192
12193 2003-08-11  Martin Baulig  <martin@ximian.com>
12194
12195         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
12196
12197 2003-08-06  Martin Baulig  <martin@ximian.com>
12198
12199         * mono-debug-debugger.c: Added support for static fields,
12200         properties and methods.
12201
12202 2003-08-06  Martin Baulig  <martin@ximian.com>
12203
12204         * mono-debug-debugger.c: Don't store the MonoString's vtable to
12205         make this work for applications with multiple application domains.
12206
12207 2003-08-04  Martin Baulig  <martin@ximian.com>
12208
12209         * mono-debug-debugger.c: Completely reworked the type support; the
12210         most important thing is that we're now just using one single
12211         `MonoType' instance per type.
12212
12213 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
12214
12215         * mono-endian.h, mono-endian.c, icall.c: Added icall
12216         ves_icall_System_Double_AssertEndianity to assert double word endianity
12217         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
12218
12219 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12220
12221         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
12222         support, icalls and fixes.
12223
12224 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
12225
12226         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
12227         classes that are a punctuation character in .NET is not the same a
12228         g_unichar_ispunct.
12229
12230 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12231
12232         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
12233
12234 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
12235
12236         * icall.c: Add new MemCopy internalcall.
12237         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12238         Simplified code; It is not necessary to handle all the cases here,
12239         as the C# code takes care of it.  Only handle the case of the name
12240         resource embedded into the assembly.
12241
12242         Changed signature to return the data pointer and the size of the
12243         data. 
12244
12245 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
12246
12247         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
12248         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
12249
12250 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
12251
12252         * socket-io.c: ignore EINTR error in select.
12253
12254 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12255
12256         * class.h, class.c: removed unused subclasses field in MonoClass.
12257
12258 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
12259
12260         * icall.c: improve fix of get_base_definition(). If the parent class
12261           doesn't have the mehod, look at the parent of the parent.
12262         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
12263           to check if a parameter is an in or out parameter
12264           (PARAM_ATTRIBUTE_IN is not set by default).
12265           mono_method_return_message_restore(): Use mono_class_value_size to
12266           get the size of a value type. mono_type_stack_size (parameterType)
12267           does not return the correct value if parameterType is byRef.
12268           mono_load_remote_field(), mono_load_remote_field_new(),
12269           mono_store_remote_field(), mono_store_remote_field_new():
12270           raise exception if the remote call returns an exception.
12271
12272 2003-07-28  Martin Baulig  <martin@ximian.com>
12273
12274         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
12275         method.  This is a wrapper around mono_runtime_invoke() which
12276         boxes the instance object if neccessary.
12277
12278 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12279
12280         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
12281         metadata.h, row-indexes.h, verify.c: first cut of generics support.
12282
12283 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12284
12285         * icall.c: disable mcs bug workaround.
12286
12287 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12288
12289         * object.c (mono_runtime_class_init): Take the metadata_section
12290         mutex before obtaining the domain mutex.
12291
12292         * appdomain.h: Added definition of metadata_section mutex here. 
12293
12294         * object.c: define metadata_mutex here.
12295
12296 2003-07-24  Ravi Pratap  <ravi@ximian.com>
12297
12298         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
12299         fixed.
12300
12301 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
12302
12303         * reflection.c: Fix bug #46669
12304
12305 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12306
12307         * exception.c:
12308         * exception.h:
12309         * icall.c:
12310         * object.h: fill in the type name for TypeLoadException.
12311
12312 2003-07-23  Ravi Pratap  <ravi@ximian.com>
12313
12314         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
12315         relationship between TypeBuilders while compiling corlib) and bug
12316         45993 (Array types returned from the runtime while compiling
12317         corlib were from the loaded corlib).
12318
12319 2003-07-22  Martin Baulig  <martin@ximian.com>
12320
12321         * mono-debug-debugger.c: Reworked the type support a bit more;
12322         distinguish between types and classes.
12323
12324 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
12325
12326         * icall.c: add IsArrayImpl icall.
12327
12328 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
12329
12330         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
12331         initializing real_size only once. Also fix bug #46602.
12332
12333 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
12334
12335         * object.c: Renamed mono_metadata_section to metadata_section.
12336
12337 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
12338
12339         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
12340           empty array if the type is an array. Fixed.
12341           ves_icall_MonoMethod_get_base_definition: if the base method
12342           is abstract, get the MethodInfo from the list of methods of
12343           the class.
12344         * reflection.c: ParameterInfo.PositionImpl should be zero-based
12345           and it was 1-based. Fixed in mono_param_get_objects.
12346
12347 2003-07-20  Martin Baulig  <martin@ximian.com>
12348
12349         * mono-debug.h: Set version number to 31.
12350         (mono_debug_init): Added `MonoDomain *' argument.
12351
12352         * mono-debug-debugger.c: Reworked the type support; explicitly
12353         tell the debugger about builtin types; pass the `klass' address to
12354         the debugger.
12355
12356 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
12357
12358         * image.c: Allow new metadata tables to be loaded without a
12359         warning. Also update the warning message to give the new constant value.
12360                 
12361 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12362
12363         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
12364         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
12365         array type representation changes.
12366
12367 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12368
12369         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
12370         on Environment.Exit () call.
12371
12372 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12373
12374         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
12375         requires a matching corlib.
12376
12377 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
12378
12379         * Changelog: My editor decided to add a CR to each line. Sorry about that.
12380           Committed again without the CRs.
12381         
12382 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
12383
12384         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
12385           getting it from the "this" socket instance. Did not work
12386           if the socket is a subclass of Socket.
12387           Also fixed bug #35371.
12388
12389 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12390
12391         * metadata.c: fixed size for TypedByRef.
12392         * loader.c: when searching for a method, consider the vararg amrker.
12393         * unicode.c, decimal.c: constify some arrays.
12394
12395 2003-07-15  Dick Porter  <dick@ximian.com>
12396
12397         * socket-io.c: Fixed compilation for gcc < 3.2.
12398
12399         Fixed compilation for machines that don't have AF_INET6 (thanks to
12400         Bernie Solomon <bernard@ugsolutions.com> for that part.)
12401
12402         Fixed compile warnings.
12403         
12404         Fixed formatting and line endings.
12405
12406 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
12407
12408         * socket-io.h:
12409         * socket-io.c: Added IPv6 support.
12410
12411 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
12412
12413         * class.c (mono_class_is_assignable_from): New function to implement
12414         the is_assignable_from logic. Used by mono_object_isinst, 
12415         Type::IsAssignableFrom () and the interpreter.
12416
12417         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
12418         Object, even interfaces.
12419         
12420         * object.c (mono_object_isinst): Implement in terms of 
12421         is_assignable_from.
12422
12423         * icall.c (ves_icall_type_is_assignable_from): New icall.
12424
12425 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
12426
12427         * domain.c (foreach_domain): fix compiler warning.
12428
12429 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
12430
12431         * image.c (load_metadata_ptrs): use g_strndup because strndup is
12432         not available on all plattforms
12433
12434 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
12435
12436         * image.h image.c: Store the metadata version string in MonoImage.
12437         * icall.c: New icall to retrieve the image version.
12438         * reflection.c (create_dynamic_image): Fill in the image version field
12439         * reflection.c (build_compressed_metadata): Use the image version
12440         from the image structure.
12441
12442 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12443
12444         * appdomain.c: modified comment.
12445         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
12446         That will be its last iteration when mono_gc_cleanup is called from
12447         mono_runtime_cleanup and before the domain is unloaded.
12448
12449         Fixes bug #45962.
12450
12451 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
12452
12453         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
12454         attributes.
12455
12456 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12457
12458         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
12459         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
12460         Bernie Solomon <bernard@ugsolutions.com>.
12461
12462 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12463
12464         * object.c, object.h: provide mono_object_new_fast() for faster
12465         allocation in some special cases.
12466
12467 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12468
12469         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
12470         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
12471
12472 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
12473
12474         * threadpool.c: fix leaks.
12475
12476 2003-07-01  Dick Porter  <dick@ximian.com>
12477
12478         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
12479         using MonoGHashTables.  Fixes threadpool bug posted to list.
12480
12481 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12482
12483         * image.h, image.c: added support to load an assembly from a byte array.
12484         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
12485         assembly bundle support.
12486
12487 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
12488
12489         * threadpool.c (mono_thread_pool_add): keep a reference to the
12490         AsyncResult to prevent GC
12491
12492 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12493
12494         * class.c: leak fix.
12495
12496 2003-06-25  Dick Porter  <dick@ximian.com>
12497
12498         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
12499         for the async object, the WaitHandle object will close the handle.
12500         Fixes bug 45321.
12501
12502 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12503
12504         * class.c: in mono_array_class_get (), lookup from the hash with the
12505         same type we insert: this works around a bug in
12506         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
12507         lluis. The real fix will have to wait for after the release.
12508
12509 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12510
12511         * icall.c: fix memory leak when getting type members.
12512
12513 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
12514
12515         * reflection.c: added more pubtoken special cases.
12516
12517 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12518
12519         * class.c: handle field offset correctly when class size
12520         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
12521
12522 2003-06-20  Martin Baulig  <martin@ximian.com>
12523
12524         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
12525         *image' field.
12526
12527 2003-06-20  Martin Baulig  <martin@ximian.com>
12528
12529         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
12530
12531 2003-06-20  Martin Baulig  <martin@ximian.com>
12532
12533         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
12534         just distinguish between variables in registers and variables at
12535         an offset relative to a register.
12536
12537 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12538
12539         * icall.c: #ifdef out latest changes until mcs is fixed.
12540
12541 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12542
12543         * icall.c: return members in metadata order.
12544
12545 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12546
12547         * icall.c: avoid infinite loop in GetTimeZoneData.
12548
12549 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
12550
12551         * icall.c: added Marshal.Prelink/All icalls.
12552
12553 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
12554
12555         * object.c, object.h: fix warnings and do some overflow checking
12556         when creating arrays.
12557
12558 2003-06-17  Dick Porter  <dick@ximian.com>
12559
12560         * file-io.h:
12561         * file-io.c: File attributes need to be tweaked slightly when
12562         passed from the managed to the w32 world.
12563
12564 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12565         * profiler.h profiler-private.h profiler.c: Rework last patch
12566         based on suggestion by Paolo.
12567         
12568 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12569
12570         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
12571         instruction level coverage data collection.
12572         * profiler.h profiler.c (: Added new callback function which can be
12573         used by the profiler to limit which functions should have coverage
12574         instrumentation.
12575         * profiler.c (mono_profiler_load): Call g_module_build_path to
12576         generate the file name of the profiler library.
12577
12578 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12579
12580         * profiler.c, profiler.h, profiler-private.h: added basic block 
12581         coverage profiling API.
12582
12583 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
12584
12585         * reflection.c (mono_reflection_create_runtime_class): Add support
12586         for events in dynamically generated code.
12587
12588         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
12589         not allocated.
12590
12591 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12592
12593         * icall.c: when getting timezone info, return reasonable values if we
12594         can't get the actual data.
12595
12596 2003-06-14  Dick Porter  <dick@ximian.com>
12597
12598         * threads.c (start_wrapper): Remove the reference to the thread
12599         object in the TLS data, so the thread object can be finalized.
12600         This won't be reached if the thread threw an uncaught exception,
12601         so those thread handles will stay referenced :-( (This is due to
12602         missing support for scanning thread-specific data in the Boehm GC
12603         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
12604
12605 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
12606
12607         * reflection.c: ensure streams and tables are first allocated with
12608         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
12609
12610 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12611
12612         * icall.c: fixed GetElementType for byrefs (bug# 44792).
12613
12614 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
12615
12616         * reflection.c (mono_reflection_create_runtime_class): Add support for
12617         properties to dynamically created classes.
12618         * reflection.c: Fix a few places where non-MonoObjects were inserted
12619         into the tokens hashtable.
12620
12621 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12622
12623         * object.c: some support to handle out of memory exceptions.
12624
12625 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
12626
12627         * marshal.c (mono_marshal_get_native_wrapper): support reference
12628         return types
12629
12630 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12631
12632         * object.h, object.c: more portability stuff from Bernie Solomon.
12633         Unexport mono_object_allocate(). Added mono_object_unbox ().
12634         Set exitcode when an unhandled exception is thrown.
12635
12636 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
12637
12638         * marshal.c (mono_marshal_get_native_wrapper): use custom
12639         marshaler for return types.
12640
12641 2003-06-10  Dick Porter  <dick@ximian.com>
12642
12643         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
12644         ip_mreq is available
12645
12646 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
12647
12648         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
12649         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
12650         by Bernie Solomon <bernard@ugsolutions.com>.
12651
12652 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
12653
12654         * gc.c (mono_gc_init): Avoid error message on shutdown when
12655         GC_DONT_GC=1 is used.
12656
12657         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
12658         New icall to return the GUID of a module.
12659
12660 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12661
12662         * class.c: ensure instance size always includes the parent's size
12663         even whem class size is set explicitly (fixes bug#44294).
12664
12665 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12666
12667         * profiler.h, profiler.c: made the simple profiler thread-safe,
12668         get more accurate timing info. Allow the loading of an
12669         externally-developed profiler module.
12670
12671 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
12672
12673         * marshal.c (mono_marshal_get_native_wrapper): improved
12674         class/byref arguments.
12675         (mono_marshal_get_native_wrapper): better string marshaling support.
12676
12677 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12678
12679         * class.c: ensure .pack and .size are handled correctly and
12680         simplified layout of static fields.
12681
12682 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12683
12684         * appdomain.c
12685         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
12686
12687         * loader.c (mono_lookup_pinvoke_call): look for modules in the
12688         current directory (fix bug 44008)
12689
12690 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
12691
12692         * marshal.c (mono_marshal_get_native_wrapper): started support for
12693         custom marshalers.
12694         (mono_delegate_to_ftnptr): consider marshalling specifications
12695
12696 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12697
12698         * reflection.c, reflection.h: emit custom marshal info.
12699
12700 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12701
12702         * object.c: free the GError.
12703         * icall.c: added CloseEvent_internal.
12704         * threads.[ch]:
12705         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
12706         call.
12707
12708 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
12709
12710         * loader.c (mono_method_get_signature): Add support for dynamic
12711         assemblies.
12712
12713 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12714
12715         * reflection.c: fixed bug #43905.
12716
12717 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12718
12719         * class.c, domain.c, icall.c, metadata.h, object.h: support for
12720         handling TypedReference and ArgIterator.
12721         * loader.c, loader.h: added function to get signature at call site.
12722
12723 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12724
12725         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
12726         data readonly. Buglets and warning fixes. Some MethodSpec support.
12727
12728 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12729
12730         * class.h, class.c, object.c: remove relative numbering support.
12731
12732 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
12733
12734         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
12735         free the string, until we get a chance to fix Gtk#
12736
12737 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12738
12739         * marshal.c: revert last patch.
12740
12741 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12742
12743         * icall.c: updates for new mono_class_vtable() not calling
12744         the type constructor anymore.
12745
12746 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12747
12748         * object.h, object.c: separate vtable creation from type
12749         initialization. Make running the .cctor thread safe.
12750
12751 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
12752
12753         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
12754
12755 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
12756
12757         * loader.c (mono_get_method): consider calling convention
12758
12759 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
12760
12761         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
12762         to return the invisible global type for a module.
12763
12764         * reflection.c (mono_image_build_metadata): Emit global fields too.
12765
12766 2003-05-20  Peter Williams  <peterw@ximian.com>
12767
12768         * loader.c (mono_lookup_internal_call): Add a few newlines.
12769
12770 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
12771
12772         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
12773         literal strings.
12774
12775         * appdomain.c (set_domain_search_path): Recalculate search path when
12776         AppDomainSetup.PrivateBinPath changes.
12777
12778         * object.c (mono_class_compute_gc_descriptor): It turns out some
12779         parts of the class libs (like System.Thread) holds pointers to
12780         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
12781         to treat native int a pointer type here.
12782         
12783 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
12784
12785         * appdomain.h, domain.c: add hashtable for jump target resolution.
12786
12787 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
12788
12789         * reflection.h reflection.c icall.c: Added new icalls 
12790         GetManifestResourceInfoInternal, GetModulesInternal and support
12791         infrastructure.
12792
12793 2003-05-16  Dick Porter  <dick@ximian.com>
12794
12795         * icall.c:
12796         * file-io.h:
12797         * file-io.c: Implement System.IO.MonoIO::GetTempPath
12798
12799 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
12800
12801         * object.c: mono_store_remote_field: little fix to previous patch.
12802
12803 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12804
12805         * class.c: add constructors to array classes.
12806         * icall.c: special case array construction for InternalInvoke (),
12807
12808 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
12809
12810         * class.h class.c reflection.c object.c: Added support for field
12811         defaults in dynamically generated classes.
12812
12813 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12814
12815         * reflection.c: properly encode charset for ddlimport.
12816
12817 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
12818
12819         * threads.c: allow compiling without GC.
12820
12821 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12822
12823         * appdomain.h, object.c, object.h, threads.c, threads.h: added
12824         handling of thread static data.
12825
12826 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12827
12828         * reflection.h, reflection.c: added mono_custom_attrs_free ().
12829
12830 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
12831
12832         * class.c (mono_array_class_get): always set the serializable flags
12833         (mono_array_class_get): always set the SEALED attribute for array types
12834
12835 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
12836
12837         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
12838         attributes (fix for bug 42021).
12839
12840 2003-05-12  Dick Porter  <dick@ximian.com>
12841
12842         * gc.c: Don't run finalizers when the finalizer thread is
12843         finishing up, because the default domain has already been
12844         destroyed.
12845
12846 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
12847
12848         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
12849         value is null, we should throw an exception.   This is slightly
12850         different than the other conventions used for the constructor.
12851
12852 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12853
12854         * socket-io.c: fixed windows build.
12855
12856 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12857
12858         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
12859
12860 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
12861
12862         * object.c (mono_string_new_wrapper): Compatibility fix for MS
12863         compilers.
12864
12865 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
12866
12867         * class.c (mono_class_layout_fields): Add experimental GC aware
12868         auto layout facility. Requires class library changes to work correctly.
12869
12870         (mono_class_setup_vtable): Avoid overriding explicit interface
12871         method implementations. Fixes iface3.exe test.
12872
12873         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
12874         object reference.
12875         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
12876         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
12877
12878         * metadata.h: Add new type classification macro which determines
12879         whenever the type holds an object reference.
12880
12881 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
12882
12883         * marshal.c (mono_marshal_get_native_wrapper): cleanups
12884
12885 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
12886
12887         * gc.c (finalizer_thread): Work around a GC bug.
12888
12889 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
12890
12891         * marshal.c (emit_struct_conv): allow unions
12892
12893         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
12894
12895 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
12896
12897         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
12898
12899 2003-05-06  Martin Baulig  <martin@ximian.com>
12900
12901         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
12902
12903 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12904
12905         * socket-io.c:
12906         (Select_internal): allow NULLs, don't create arrays if not needed.
12907         Coupled with Socket.cs changes.
12908
12909         * threadpool.c:
12910         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
12911         register a finalizer for it that will close the semaphore handle. This
12912         fixes the leak and make Lupus' test run with > 4080 loops.
12913
12914 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
12915
12916         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
12917         Jerome Laban (bug #42287)
12918
12919 2003-05-02  Martin Baulig  <martin@ximian.com>
12920
12921         * debug-mono-symfile.h
12922         (MonoSymbolFile): Moved declaration into mono-debug.h.
12923         (MonoDebugMethodJitInfo): Likewise.
12924         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
12925         argument.
12926         (_mono_debug_address_from_il_offset): Take a
12927         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
12928
12929         * mono-debug.h
12930         (MonoDebugDomainData): New struct.
12931         (mono_debug_get_domain_data): New function.
12932         (mono_debug_add_method): Take an additional `MonoDomain *'
12933         argument.
12934         (mono_debug_source_location_from_address): Likewise.
12935         (mono_debug_il_offset_from_address): Likewise.
12936         (mono_debug_address_from_il_offset): Likewise.
12937
12938 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
12939
12940         * reflection.c: one more check for null type in custom attrs.
12941
12942 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12943
12944         * reflection.c: avoid warning (comparison is always false due to limited
12945         range of data type).
12946
12947 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12948
12949         * icall.c: throw an exception in Type.GetField if the argument 'name'
12950         is NULL.
12951
12952 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
12953
12954         * reflection.c: fixed handling of enums in named arguments to custom
12955         attributes (bug #42123).
12956
12957 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12958
12959         * reflection.c: use the right array element type and handle
12960         a null for a Type argument, too.
12961
12962 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
12963
12964         * reflection.c: handle arrays as arguments to custom attributes.
12965
12966 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12967
12968         * reflection.c: handle a string value in a custom attr
12969         ctor that takes an object.
12970
12971 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
12972
12973         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
12974         (fix bug #42063)
12975
12976 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
12977
12978         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
12979
12980 2003-04-27  Martin Baulig  <martin@ximian.com>
12981
12982         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
12983         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
12984         MONO_DEBUGGER_EVENT_BREAKPOINT.
12985         (mono_breakpoint_trampoline_code): Removed.
12986         (mono_debugger_event_handler): The last argument is now a
12987         `guint32'.
12988         (mono_debugger_insert_breakpoint_full): Removed the
12989         `use_trampoline' argument.
12990         (mono_debugger_method_has_breakpoint): Likewise.
12991         (mono_debugger_trampoline_breakpoint_callback): Renamed to
12992         mono_debugger_breakpoint_callback(); take the method and
12993         breakpoint number as arguments.
12994
12995 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12996
12997         * metadata.c: fix off by one when loading parameters attributes.
12998
12999 2003-04-24  Martin Baulig  <martin@ximian.com>
13000
13001         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
13002
13003 2003-04-24  Martin Baulig  <martin@ximian.com>
13004
13005         * mono-debug-debugger.c: Moved all code which interacts with the
13006         Mono Debugger here.
13007
13008         * debug-mono-symfile.c: This code now just deals with the symbol
13009         file itself, the debugger code is now in mono-debug-debugger.c.
13010
13011 2003-04-23  Martin Baulig  <martin@ximian.com>
13012
13013         * mono-debug.c (mono_debug_source_location_from_il_offset):
13014         New method; like mono_debug_source_location_from_address(), but
13015         takes an IL offset instead of a machine address.
13016
13017 2003-04-23  Martin Baulig  <martin@ximian.com>
13018
13019         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
13020         `line' field; this is now computed by the debugger.
13021
13022 2003-04-23  Martin Baulig  <martin@ximian.com>
13023
13024         * mono-debug.[ch]: New files.  This is the new debugging interface.
13025
13026         * mono-debug-debugger.[ch]: New files.  Moved all code which
13027         interacts with the Mono Debugger here.
13028
13029 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13030
13031         * domain.c (mono_init): initialize mono_defaults.monitor_class
13032
13033 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
13034
13035         * reflection.c (method_encode_code): Add a spicy exception to help
13036         future compiler authors.
13037
13038 2003-04-21  Martin Baulig  <martin@ximian.com>
13039
13040         * icall.c
13041         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13042         Make this work with relative pathnames; g_filename_to_uri() needs
13043         an absolute filename.
13044
13045 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
13046
13047         * icall.c: Track name changes in Object and ValueType.
13048
13049 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
13050
13051         * metadata.c (mono_type_stack_size): size should be a multiple of
13052         sizeof (gpointer)
13053
13054 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13055
13056         * gc.c:
13057         (internal_domain_finalize): moved into mono_domain_finalize. No need
13058         to create another thread because the finalizers will be run in the
13059         finalizer thread.
13060         
13061         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
13062         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
13063         to be run (MS does this too).
13064
13065 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13066
13067         * object.c (mono_class_compute_gc_descriptor): Update comment.
13068
13069         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
13070
13071         * image.h: Add synchronized wrapper cache.
13072
13073         * image.c (do_mono_image_open): Initialize cache.
13074
13075         * reflection.c (create_dynamic_mono_image): Initialize cache.
13076
13077 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13078
13079         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
13080         ves_icall_System_Buffer_ByteLengthInternal.
13081
13082 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13083
13084         * reflection.c: setup klass->nested_in earlier. Allow
13085         a dash in the assembly name.
13086
13087 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
13088
13089         * metadata.c (mono_type_to_unmanaged): dont access
13090         type->data.klass for MONO_TYPE_OBJECT
13091         (mono_type_to_unmanaged): consider System.Delegate class
13092
13093 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
13094
13095         * class.c: just setup supertypes in the proper place instead of
13096         initializing the full element class for arrays.
13097
13098 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13099
13100         * class.c: ensure the element class of arrays is initialized.
13101         Setup the supertype info for array classes, too.
13102
13103 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
13104
13105         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
13106
13107 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13108
13109         * Makefile.am: re-added -m option when running cygpath. This way,
13110         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
13111         separator.
13112         * mono-config.c: same codepath for locating mono config file for WIN32
13113         and the rest.
13114         * assembly.c: if mono_assembly_setrootdir is called, don't override
13115         the value set.
13116
13117 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13118
13119         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
13120         MONO_ASSEMBLIES variable.
13121
13122 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13123
13124         * icall.c: added Assembly::GetNamespaces() icall.
13125
13126 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13127
13128         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
13129
13130 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
13131
13132         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
13133         * object.c: fixed bug in the construction of vtable for proxies
13134
13135 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13136
13137         * object.c (mono_array_new): Mark mono_array_new as an icall.
13138
13139 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13140
13141         * class.c: fixed test for public method when overriding interfaces.
13142         Closes bug #40970.
13143
13144 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13145
13146         * appdomain.h, domain.c: added mono_domain_foreach() to
13147         be able to access the currently loaded appdomains.
13148         * object.c: make string interning work across sppdomains.
13149         Mark some functions for use as icalls.
13150
13151 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13152
13153         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
13154
13155         * reflection.h reflection.c: Allocate long living data using 
13156         GC_MALLOC_ATOMIC so the collector does not need to scan it.
13157
13158         * reflection.c: Double the allocation size in streams instead of
13159         increasing it, to prevent unneccesary copying on large assemblies.
13160         
13161         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
13162         creation if the assembly does not have the Run flag set.
13163
13164 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13165
13166         * class.h: avoid the C++ keywords in header files (Jerome Laban
13167         spotted and fixed this).
13168
13169 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13170
13171         * object.c:
13172         (mono_unhandled_exception): fill in the arguments for the
13173         UnhandledException event. Only trigger that event for the default
13174         domain (as MS does).
13175
13176 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
13177
13178         * object.c: Improve typed allocation stuff based on suggestions from
13179         Paolo. Also turn it on if the GC library supports it.
13180
13181 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
13182
13183         * object.c object.h class.h: Added experimental typed allocation
13184         facility using the interfaces in gc_gcj.h.
13185
13186         * os/gc_wrapper.h: Added new include files.
13187         
13188 2003-04-03  Martin Baulig  <martin@ximian.com>
13189
13190         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
13191         which is not yet enabled by default.
13192
13193         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
13194         functions.
13195         (mono_gc_lock, mono_gc_unlock): New static functions.
13196
13197         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
13198         functions; stop/start the world for the garbage collector.  This
13199         is using the windows API; we need to complete the SuspendThread()/
13200         ResumeThread() implementation in the io-layer to make this work on Unix.
13201         (mono_gc_push_all_stacks): New public function; tells the garbage
13202         collector about the stack pointers from all managed threads.
13203
13204 2003-04-03  Martin Baulig  <martin@ximian.com>
13205
13206         * object.h (MonoThread): Added `gpointer stack_ptr'.
13207
13208         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
13209
13210 2003-04-03  Martin Baulig  <martin@ximian.com>
13211
13212         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
13213
13214 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
13215
13216         * reflection.c (typebuilder_setup_fields): Initialize field.first and
13217         field.last.
13218
13219 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
13220
13221         * loader.c (mono_lookup_internal_call): Report the corlib that is
13222         out of sync.
13223
13224 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
13225
13226         * icall.c (ves_icall_type_GetTypeCode): fixed check for
13227         System.DBNull (it's class not valuetype).
13228
13229 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13230
13231         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
13232         if the array method was already assigned a token (fixes bug#40646).
13233
13234 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
13235
13236         * reflection.c (mono_reflection_get_type): Attempt type resolve even
13237         if no assembly is given.
13238
13239 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
13240
13241         * metadata.h: Added the new tables.
13242
13243         * row-indexes.h: Added definitions for new tables.
13244
13245         * metadata.c: Add schemas for new tables, and add support for
13246         computing the sizes of them.
13247
13248         * class.c: Update for handling the new type cases.
13249
13250 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
13251
13252         * metadata.h (MONO_TYPE_IS_VOID): new macro
13253
13254 2003-03-31  Martin Baulig  <martin@ximian.com>
13255
13256         * threads.h (MonoThreadCallbacks): Added `thread_created'.
13257
13258         * threads.c (mono_thread_new_init): Call `thread_created' in the
13259         mono_thread_callbacks.
13260
13261 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
13262
13263         * loader.h: added marshalbyrefobject_class to mono_defaults
13264         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
13265         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
13266           generation of output parameters.
13267           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
13268         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
13269           contextbound and the target object belongs to the context of the caller.
13270         * object.h: added context and unwrapped_server variables in MonoRealProxy.
13271         * object.c: Implemented support for interfaces and abstract classes
13272           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
13273           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
13274
13275 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
13276
13277         * class.h class.c (mono_class_is_subclass_of): New function.
13278         
13279         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
13280         routines for most common case (calls from ArrayList::ToArray).
13281
13282         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
13283         routine so programs which call Environment::Exit() can be profiled.
13284
13285         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
13286         Added MONO_ARCH_SAVE_REGS.
13287
13288         * icall.c (ves_icall_type_is_subtype_of): Use new function.
13289
13290 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
13291
13292         * blob.h: Add a couple of new MonoType types definitions.
13293
13294         * tabledefs.h: Add a couple of new call convs.
13295
13296 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
13297
13298         * reflection.h (MonoReflectionDynamicAssembly): track changes in
13299         the layout of the class.
13300
13301         * reflection.c (alloc_table): double the size on overflow to avoid
13302         unnecessary copying.
13303
13304         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
13305         avoid filling out metadata tables and blobs. Also set mb->ilgen to
13306         null so it can be garbage collected.
13307         
13308 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
13309
13310         * reflection.c (mono_reflection_get_type): Return the resolved type
13311         only if it is in the assembly we searched.
13312
13313         * reflection.c (ensure_runtime_vtable): Initialize method slots.
13314
13315         * class.c (mono_class_setup_vtable): Set the slot of the overriding
13316         method.
13317
13318 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13319
13320         * appdomain.c:
13321         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
13322         the right one is 'file:///blah', but MS allows it.
13323         * assembly.c:
13324         (mono_assembly_open): allow 'file://blah'
13325
13326         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
13327
13328 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
13329
13330         * socket-io.c: fixes bug #40310.
13331
13332 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
13333
13334         * reflection.c (mono_reflection_parse_type): handle deeply nested
13335         types correctly.
13336
13337         * reflection.c (mono_image_create_token): Use unique token values
13338         since they will be put into a hash table.
13339
13340         * class.c (mono_class_setup_vtable): If a method occurs in more than
13341         one place in the vtable, and it gets overriden, then change the
13342         other occurances too.
13343
13344         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13345         object as return type.
13346
13347 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
13348
13349         * icall.c: Deleted "ToString" implementation for double and float
13350         because they are full implemented in managed code.
13351
13352 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13353
13354         * reflection.c, reflection.h: implemented and exported functions
13355         to retrieve info about custom attributes.
13356
13357 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13358
13359         * appdomain.c: moved Uri handling to assembly.c
13360         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
13361         work when using a file Uri in *nix and windows.
13362
13363         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
13364         GetReferencedAssemblies.
13365
13366 2003-03-18  Dick Porter  <dick@ximian.com>
13367
13368         * icall.c: Rename a couple of internal calls
13369
13370         * threads.c: Set the thread state to Stopped when a thread exits.
13371         Fixes bug 39377.
13372
13373 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
13374
13375         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13376         New icall.
13377
13378         * object.c (mono_class_vtable): fix warning.
13379
13380 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
13381
13382         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
13383
13384         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
13385         memory.
13386         (method_encode_clauses): Create exception info structures in the right
13387         order.
13388         (mono_reflection_setup_internal_class): Initialize supertypes field.
13389
13390         * class.c object.c: Handle interfaces which implement other interfaces 
13391         correctly.
13392
13393         * class.h class.c: Move the supertypes array initialization code into 
13394         a separate function so it can be used for dynamic types too. Also call
13395         it earlier, in mono_class_init(), since it can be used before the
13396         type is initialized.
13397
13398 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13399
13400         * Makefile.am:
13401         * assembly.c:
13402         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
13403
13404         * appdomain.c:
13405         * appdomain.h:
13406         * marshal.c:
13407         * object.c: remove warnings.
13408
13409 2003-03-13  Martin Baulig  <martin@ximian.com>
13410
13411         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
13412         (MonoDebugLexicalBlockEntry): New types.
13413
13414         * debug-mono-symfile.c
13415         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
13416
13417 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13418
13419         * process.c: ret can be any non-zero value accroding to MS doc.
13420
13421 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
13422
13423         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
13424         fixing a warning for a miss-used prototype, would have cause
13425         random memory corruption.
13426
13427 2003-03-07  Martin Baulig  <martin@ximian.com>
13428
13429         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
13430         getting really annoying ....
13431
13432 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
13433
13434         * reflection.c (fixup_method): added support for array methods.
13435
13436 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13437
13438         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
13439         (pointed out by Michael Adams).
13440
13441 2003-03-04  Dick Porter  <dick@ximian.com>
13442
13443         * icall.c: Temporarily reverted the Double and Single ToString()
13444         change, because it broke nunit.
13445
13446 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
13447
13448         * object.h, threads.h: make include files compatible with C++
13449         (patch by Jerome Laban <jlaban@wanadoo.fr>).
13450
13451 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
13452
13453         * icall.c: Erased ToString helper functions for Double and Single.
13454         Now, that implementations ar all in managed code (Double and Single
13455         Formatters).
13456
13457 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
13458
13459         * appdomain.c: Added method for initializing the default context of
13460         a domain. Added internal call for getting the default context.
13461         * appdomain.h: Added context variable in MonoDomain struct.
13462         * domain.c: mono_domain_set also sets the default context of the domain
13463         * icall.c: Mapped internal method InternalGetDefaultContext.
13464         * object.c: mono_object_get_virtual_method returns always a remoting
13465         wrapper if the object is a transparent proxy.
13466         mono_runtime_invoke_array: when creating an object by calling the
13467         constructor, if the created object is a proxy, then the constructor should
13468         be called using the a remoting wrapper.
13469
13470 2003-03-03  Dick Porter  <dick@ximian.com>
13471
13472         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
13473         variable so it compiles on solaris.  Problem spotted by
13474         Christopher Taylor <ct@cs.clemson.edu>
13475
13476 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13477
13478         * appdomain.c:
13479         (get_info_from_assembly_name): don't leak value.
13480
13481         * icall.c:
13482         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
13483         result.
13484
13485 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
13486
13487         * assembly.c: export mono_image_load_references ().
13488         * class.c: handle function pointers. mono_class_from_name() now
13489         supports nested type names directly.
13490
13491 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
13492
13493         * reflection.h reflection.c: Encode already created dynamic methods 
13494         and fields correctly as a DEF instead of a REF.
13495
13496         * reflection.c: Get rid of the force_ref argument to 
13497         mono_image_typedef_or_ref since it was wrong in the first place.
13498
13499         * string-icalls.c: add error checking to string constructors according
13500         to the MSDN docs.
13501
13502         * reflection.c: Emit types in the order their TypeBuilders were 
13503         created. Previously, a new table index was assigned to each type before
13504         the tables were emitted. This was wrong because the signature blob
13505         might already refer to a type by its original table index.
13506
13507 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
13508
13509         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
13510         change.
13511         
13512 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13513
13514         * Makefile.am: make assemblies dir have \ instead of / on windows.
13515
13516 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
13517
13518         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
13519         iterate over the NESTEDCLASS table using a linear search since the
13520         table is not guaranteed to be sorted by the secondary key.
13521
13522         * class.c (mono_class_create_from_typedef): fixed up call to
13523         mono_metadata_nesting_typedef.
13524         
13525 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
13526
13527         * marshal.c (mono_string_to_byvalstr): clear the memory as
13528         suggested by Jerome Laban <jlaban@wanadoo.fr>
13529
13530 2003-02-26  Dick Porter  <dick@ximian.com>
13531
13532         * process.c: Cope with padding in .rsrc blocks
13533
13534 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
13535
13536         * metadata.h: reverted the filter_len change, it breaks reflection
13537         
13538 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
13539
13540         * metadata.h: added a new field to store the filter_len
13541         
13542
13543 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13544
13545         * reflection.c: handle custom attributes for types and members
13546         created with Reflection.Emit (bug#38422).
13547
13548 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
13549
13550         * reflection.c: define RTSpecialName automatically for constructors for
13551         compatibility with MS.NET.
13552
13553         * reflection.c (mono_reflection_create_runtime_class): initialize
13554         nested_in field of dynamically created classes.
13555
13556 2003-02-22  Martin Baulig  <martin@ximian.com>
13557
13558         * debug-mono-symfile.h: Incremented version number.
13559
13560 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
13561
13562         * object.h icall.c process.c: fix warnings.
13563
13564 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
13565
13566         * appdomain.h appdomain.c:
13567         (mono_domain_try_type_resolve): split the 
13568         name_or_tb argument into a name and a tb argument.
13569         (mono_domain_has_type_resolve): new function to check whenever the
13570         application has registered a TypeResolve event handler.
13571         
13572         * icall.c reflection.h reflection.c: move the type resolve logic into
13573         mono_reflection_get_type () so it will be invoked when 
13574         Assembly::GetType () is called.
13575
13576         * reflection.c:
13577         (mono_reflection_get_type): renamed to get_type_internal.
13578         (mono_reflection_get_type): fixed type name generation so it works 
13579         for nested types too.
13580         (mono_reflection_get_type): call has_type_resolve () to avoid the 
13581         costly type name generation if there is no resolve event handler.
13582
13583 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13584
13585         * class.c, image.c: load exported types from file references.
13586
13587 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
13588
13589         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
13590           used to cache the managed methods used to create proxies and make 
13591           remote invocation of methods.
13592         * class.h: Added in MonoVTable a flag to indicate that a class needs 
13593           to be remotely created.
13594         * object.c: Modified the method mono_class_vtable(). It now initializes 
13595           the remote flag of the vtable. Modified mono_object_new_specific(), 
13596           so now it checks the remote flag.
13597         * icall.c: Added a couple of internal methods, one for enabling instance 
13598           creation interception for a type, and one for creating objects bypassing
13599           the remote check.
13600
13601 2003-02-18  Martin Baulig  <martin@ximian.com>
13602
13603         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
13604         New interncall to get a method's metadata token.
13605
13606         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
13607         New interncall for the debugger.
13608
13609 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
13610
13611         * class.c (mono_class_setup_vtable): allocate supertype array
13612
13613 2003-02-18  Martin Baulig  <martin@ximian.com>
13614
13615         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
13616
13617 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13618
13619         * reflection.c:
13620         (assembly_name_to_aname): jump over unknown properties (i've found
13621         something like: 'type, assembly, version=xxx, custom=null, public...',
13622         so now will ignore custom=null and still get the rest of the values).
13623
13624 2003-02-17  Dick Porter  <dick@ximian.com>
13625
13626         * threads.c: Have Thread.Start() wait for a semaphore to signal
13627         that the thread has set up all its local data.  This fixes bug
13628         34323, where Abort() raced the new thread's TLS data.
13629
13630         Also removes the handle_store() call from start_wrapper, because
13631         threads are now always created suspended and there is no longer a
13632         race between the parent and child threads to store the info.
13633
13634 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
13635
13636         * image.c: explain the #- heap issue in a message, hopefully
13637         avoiding FAQs on mono-list.
13638
13639 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13640
13641         * icall.c:
13642         (GetEntryAssembly): if the domain has not invoked
13643         AppDomain.ExecuteAssembly yet, return the assembly of the default
13644         AppDomain.
13645
13646 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
13647
13648         * class.c (mono_ldtoken): make it work in dynamic assemblies.
13649
13650 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13651
13652         * metadata.c, reflection.c: simple speedup to type hash
13653         and equals code.
13654
13655 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
13656
13657         * image.c, image.h, class.c, assembly.c: move module loading
13658         to MonoImage. When loading metadata, consider alignemnet from
13659         the start of metadata, not from the metadata address in memory.
13660
13661 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
13662
13663         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
13664         AssemblyBuilder objects. Factored out custom attribute creation into
13665         a separate function.
13666         (create_custom_attr): new function to create custom attributes.
13667
13668 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
13669
13670         * Makefile.am: Got tired of typing the full pathname to pedump.
13671         Until there is another option, am installing this.
13672
13673 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
13674
13675         * class.c (class_compute_field_layout): always set field->parent 
13676         (mono_ldtoken): use mono_defaults.fieldhandle_class;
13677
13678 2003-02-11  Dick Porter  <dick@ximian.com>
13679
13680         * threads-types.h:
13681         * monitor.c: Rewrote Monitor, making lock much faster and
13682         Pulse/Wait work as specified.  Also uses much fewer handles, and only
13683         creates them as needed.
13684
13685         * exception.c: Added SynchronizationLockException
13686
13687         * threads.c: Deleted old Monitor implementation.  The new one is
13688         in a new file.
13689
13690 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13691
13692         * class.c: handled TypedReference type code. Set the correct size for
13693         class data. Setup interface_offsets for interface classes, too.
13694
13695 2003-02-09  Martin Baulig  <martin@ximian.com>
13696
13697         * debug-mono-symfile.h: Reflect latest symbol writer changes.
13698
13699 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
13700
13701         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
13702         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
13703         * object.c: fixed mono_object_get_virtual_method () for interfaces.
13704         * verify.c: check for code that runs after the end of the method.
13705
13706 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
13707
13708         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
13709         "System.Math::Round2".
13710         * sysmath.h: Added Floor, Round and Round2 definitions.
13711         * sysmath.c: Modified certain functions that were not 100% compliant
13712         with MS.NET (math precision) and added the implementation of Floor,
13713         Round and Round2.
13714
13715 2003-02-07  Martin Baulig  <martin@ximian.com>
13716
13717         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
13718
13719 2003-02-07  Martin Baulig  <martin@ximian.com>
13720
13721         * debug-mono-symfile.c: Reflected latest symwriter changes.
13722         (mono_debug_create_mono_symbol_file): Removed.
13723         (mono_debug_open_mono_symbol_file): Take an argument which
13724         specifies whether to create a dynamic symbol file.
13725
13726 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
13727
13728         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
13729
13730 2003-02-05  Martin Baulig  <martin@ximian.com>
13731
13732         * reflection.c (mono_image_build_metadata): Make this public,
13733         protect it against being called multiple times, don't create
13734         resources and don't build the compressed metadata here.
13735         (mono_image_create_pefile): Do this here.
13736
13737         * icall.c
13738         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
13739
13740 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13741
13742         * socket-io.c: fixed bug #36322.
13743
13744 2003-02-06  Piers Haken <piersh@friskit.com>
13745
13746         * appdomain.[ch]:
13747         * class.h:
13748         * debug-mono-symfile.c:
13749         * icall.c:
13750         * loader.c:
13751         * mono-config.c:
13752         * monosn.c:
13753         * reflection.c:
13754         * socket-io.c: warning cleanups
13755
13756 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
13757
13758         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
13759         function. works like remoting invoke, but does a check for the Proxy first.
13760
13761 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
13762
13763         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
13764
13765 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
13766
13767         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
13768         array of pointers.
13769         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
13770         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
13771
13772         * object.c (mono_store_remote_field_new): used by the new jit
13773         instead of mono_store_remote_field
13774         (mono_load_remote_field_new): used by the new jit
13775         instead of mono_load_remote_field
13776
13777 2003-02-05  Patrik Torstensson
13778
13779         * appdomain.c: changed unload to take the domain id instead
13780         of domain
13781         
13782         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
13783
13784
13785 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13786
13787         * appdomain.c: don't look for assemblies in ApplicationBase if
13788         PrivateBinPathProbe is set.
13789
13790 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13791
13792         * object.c: make the first argument in main_args contain the absolute
13793         path to the assembly. Fixes bug #37511.
13794
13795 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13796
13797         * icall.c: get correct UTC offset for countries not using daylight
13798         time saving. Fixes bug #30030.
13799
13800 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13801
13802         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
13803         and 1 are the family).
13804
13805 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
13806
13807         * icall.c (ves_icall_InternalExecute): removed wrong assertion
13808
13809         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
13810
13811 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
13812
13813         * reflection.c: added support for SignatureHelper tokens, which is
13814         needed by the Calli opcode.
13815
13816         * reflection.h: track changes to SignatureHelper class.
13817
13818         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
13819
13820 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13821
13822         * appdomain.c: fixed loading assemblies from PrivateBinPath.
13823
13824 2003-02-03  Patrik Torstensson
13825         * appdomain.[c|h], domain.c : 
13826          - Added support for getting a domain via domain id
13827          - Support for setting and getting domain from System.AppDomain 
13828            (used in cross appdomain channel)
13829          - Added support for get/set for a MonoAppContext on a thread 
13830            (Context class in System.Runtime.Remoting.Contexts),
13831          - Removed hack in Get/SetData and ExecuteAssembly.
13832         
13833         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
13834         the managed world to get control when a proxy is created.
13835
13836         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
13837         
13838 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
13839
13840         * icall.c
13841         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13842         Populate the codebase field as well.
13843
13844 2003-02-02  Martin Baulig  <martin@ximian.com>
13845
13846         * debug-mono-symfile.c
13847         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
13848         (mono_debug_symfile_add_method): Allow interncalls.
13849
13850 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13851
13852         * icall.c: throw parse exception if strtod fails or the string is empty.
13853
13854 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
13855
13856         * marshal.c: handle object type separately from defined
13857         class types.
13858
13859 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
13860
13861         * marshal.c: handle NATIVE_LPSTR for strings when it's
13862         explicitly specified.
13863
13864 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
13865
13866         * reflection.c, reflection.h, icall.c: setup the reflection
13867         handle cache for ModuleBuilders and AssemblyBuilders.
13868
13869 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
13870
13871         * reflection.c (reflection_methodbuilder_to_mono_method): set
13872         pinvoke flag
13873
13874 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13875
13876         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
13877
13878 2003-01-29  Dick Porter  <dick@ximian.com>
13879
13880         * threads.c: No need for the fake_thread kludge now that Thread
13881         doesn't run a class constructor
13882         
13883 2003-01-29  Dick Porter  <dick@ximian.com>
13884
13885         * threads.c: Use g_direct_hash instead of the rather bogus
13886         g_int_hash
13887
13888 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
13889
13890         * marshal.c (mono_marshal_get_native_wrapper): add check for null
13891         (fix pinvoke12.exe)
13892         (mono_marshal_get_struct_to_ptr): generate valid IL code
13893         (mono_marshal_get_ptr_to_struct): generate valid IL code
13894         (*): correctly set sig->pinvoke, we need to memdup the signature
13895         to do that
13896
13897 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13898
13899         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
13900         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
13901
13902 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
13903
13904         * profiler.c: provide more callers information.
13905
13906 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
13907
13908         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
13909
13910         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
13911
13912         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
13913
13914 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13915
13916         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
13917         exception instead of going into an infinite loop on dates which it 
13918         can't yet handle.
13919
13920         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
13921         out-of-range exception if needed.
13922
13923         * class.c (mono_class_setup_vtable): allow a virtual method to provide
13924         an implementation for an interface method and to override an inherited
13925         method at the same time. 
13926         Imagine a scenario when a virtual method is used to override a
13927         virtual abstract method in a parent class, and this same method 
13928         provides an implementation for an method inherited from an interface. 
13929         In this case, the interface resolution code will set im->slot, which 
13930         means that the virtual method override pass will skip this method 
13931         which means a pointer to the abstract method inherited from the parent
13932         will remain in the vtable of this non-abstract class.
13933
13934         * class.c: (mono_class_setup_vtable): continue search for a real 
13935         method if only an abstract method is found.     
13936
13937 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
13938
13939         * reflection.c: add size to encoding for ByValStr and ByValArray
13940         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
13941
13942 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13943
13944         * class.c (mono_class_setup_vtable): pass the override info as an
13945         argument.
13946
13947         * class.c (mono_class_setup_vtable): set the slot of overriding methods
13948         correctly.
13949         
13950         * reflection.c (ensure_runtime_vtable); add support for method 
13951         overrides.
13952         
13953 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13954
13955         * reflection.c (resolution_scope_from_image): Hack to work to work with
13956         dynamic assemblies.
13957
13958         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
13959         added a 'force_ref' argument to force this function to allways return 
13960         a TypeRef. This is needed by mono_image_get_memberref_token ().
13961         
13962 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13963
13964         * reflection.c (mono_image_get_type_info): interfaces really don't have
13965         a parent.
13966
13967         * reflection.c (mono_image_basic_init): fill out missing fields of
13968         image structure.
13969
13970         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
13971         dynamic assemblies. This is required so dynamic assemblies show up in
13972         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
13973         Type::GetType() etc. This is consistent with MS behaviour.
13974
13975         * image.c image.h reflection.c: add newly created classes to the name 
13976         cache so mono_class_get () will find them.      
13977
13978 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
13979
13980         First part of changes to get IKVM.NET running under mono.
13981         
13982         * appdomain.h, appdomain.c: added new function 
13983         mono_domain_try_type_resolve() which will emit TypeResolve events. 
13984         This function will call AppDomain::DoTypeResolve to do the actual work.
13985
13986         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
13987         moved existing code dealing with dynamic tokens to a new function 
13988         called mono_reflection_lookup_dynamic_token (). This function will 
13989         raise TypeResolve events when appropriate. Since reflection.c is not 
13990         part of libmetadata, a new hook function called 
13991         mono_lookup_dynamic_token() is added to class.c which will call this.
13992
13993         * assembly.h assembly.c: make the invoke_load_hook function public,
13994         so it can be called for dynamic assemblies.
13995
13996         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
13997
13998         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
13999         type isn't found.
14000
14001         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
14002         MonoGHashTable, since it contains pointers to objects which the GC 
14003         needs to track.
14004
14005         * assembly.c (search_loaded): remove unused variable.
14006         
14007 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
14008
14009         * object.c: fixed issue exposed by gcc-generated IL programs
14010         that use RVA data for pointers.
14011
14012 2003-01-25  Martin Baulig  <martin@ximian.com>
14013
14014         * threads.c (start_wrapper): Moved the initialization of
14015         `start_func' above the mono_new_thread_init() call to which we
14016         pass it as argument.
14017
14018 2003-01-24  Martin Baulig  <martin@ximian.com>
14019
14020         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
14021         the MonoThread pointer.
14022
14023 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
14024
14025         * icall.c: Rename `PowImpl' to Pow.
14026
14027 2003-01-23  Dick Porter  <dick@ximian.com>
14028
14029         * threads.c (start_wrapper): Create a Thread object if needed, so
14030         the Main() thread can do the class initialisation in a subthread
14031         that has been set up to allow managed code execution.
14032
14033         Pass the thread ID instead of the MonoThread pointer to the thread
14034         start and attach callbacks.  This change is required, because the
14035         jit thread start callback must be called _before_ the Thread
14036         object can be created.
14037         
14038         (mono_thread_init): Removed much object creation code that is no
14039         longer needed.  No managed code is called from here now.
14040
14041         * object.c (mono_runtime_exec_managed_code): Create a subthread
14042         for Main, and call back to the runtime to use it.
14043         Set the exit code when Main exits.
14044
14045         * gc.c: Make sure domain finalisation happens in a subthread.
14046         Re-enable threaded GC, fixing bug 31333 (again).
14047
14048         * environment.c: System.Environment internall calls (so far just
14049         ExitCode is here, the others are still in icall.c)
14050
14051         * appdomain.c (mono_runtime_cleanup): All threads running managed
14052         code should have finished before mono_runtime_cleanup() is
14053         reached, so no need to clean up threads.
14054
14055 2003-01-22  Martin Baulig  <martin@ximian.com>
14056
14057         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
14058         `gpointer func' arguments.      
14059         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
14060         but added `MonoThread *thread' argument.
14061         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
14062
14063         * threads.c (mono_new_thread_init): Added `gpointer func' argument
14064         and pass it to the mono_thread_start_cb callback.
14065         (mono_install_thread_callbacks): New public function to install a
14066         set of callbacks which are set by the debugger.
14067         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
14068
14069 2003-01-22  Martin Baulig  <martin@ximian.com>
14070
14071         * Makefile.am: Install debug-mono-symfile.h.
14072
14073 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
14074
14075         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
14076
14077 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
14078
14079         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
14080         * class.c (mono_ptr_class_get): correctly set access levels of pointers
14081         (mono_array_class_get): correctly set access levels of arrays
14082
14083 2003-01-20      Patrik Torstensson
14084         * image.h (MonoAssemblyName): changed major, minor, build, revision
14085         from signed to unsigned.
14086
14087 2003-01-20  sean kasun <skasun@azstarnet.com>
14088
14089         * reflection.c (load_cattr_value): Now this handles
14090         MONO_TYPE_SZARRAY.  Fixes bug #35629
14091
14092 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
14093
14094         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
14095         integer value
14096
14097 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14098
14099         * decimal.c: fixed bug #26056.
14100
14101 2003-01-17  Martin Baulig  <martin@ximian.com>
14102
14103         * gc.c: Raise an ExecutionEngineException instead of using g_error().
14104
14105 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14106
14107         * exception.[ch]:
14108         (mono_get_exception_type_initialization): new function.
14109
14110         * object.c: throw a TypeInitializationException when an exception is
14111         thrown invoking the class constructor.
14112
14113 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14114
14115         * reflection.c: fixed attribute reading.
14116
14117 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14118
14119         * icall.c:
14120         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
14121         provided, look for the type in the calling assembly and then in
14122         mscorlib; if the assembly name is provided, only try that one.
14123
14124 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14125
14126         * object.c: register the vtable before there is a chance it's
14127         queried again recursively.
14128
14129 2003-01-13  Duncan Mak  <duncan@ximian.com>
14130
14131         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
14132         gc-internal.h. 
14133         
14134 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
14135
14136         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
14137
14138 2003-01-11  Martin Baulig  <martin@ximian.com>
14139
14140         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
14141         this to 20 for the release.
14142
14143 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
14144
14145         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
14146
14147         * loader.c (mono_method_get_marshal_info): bug fix
14148
14149         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
14150         structures with explicit layout
14151
14152 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14153
14154         * profiler.c: made the output more readable (and sorted). 
14155         Added caller information for the allocation profiler.
14156
14157 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
14158
14159         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
14160
14161 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14162
14163         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
14164         to get value types.
14165         
14166 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
14167
14168         * object.c, profiler.h, profiler.c, profiler-private.h:
14169         Added object allocation profiler.
14170
14171 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
14172
14173         * reflection.h, reflection.c: handle global methods.
14174         Compress blob entries.
14175
14176 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
14177
14178         * marshal.c: fix compilation.
14179
14180 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
14181
14182         * loader.c (mono_method_get_marshal_info): impl.
14183
14184         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
14185
14186 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14187
14188         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
14189         for reference types.
14190
14191 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
14192
14193         * loader.c: fixed off by one error in loaded parameter names.
14194
14195 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
14196
14197         * marshal.c (mono_marshal_get_icall_wrapper): like
14198         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
14199         instead of a MonoMethod.
14200
14201 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14202
14203         * decimal.c: fixed bug #36537.
14204
14205 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
14206
14207         * marshal.c: throw a missing method exception if a
14208         P/Invoke method is not found.
14209
14210 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14211
14212         * icall.c: allow a null this for constructors.
14213
14214 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14215
14216         * icall.c: raise the proper exceptions if the arguments to the
14217         internal Invoke are incorrect.
14218
14219 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
14220
14221         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
14222
14223 2003-01-03  Martin Baulig  <martin@ximian.com>
14224
14225         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14226
14227 2002-12-31  Martin Baulig  <martin@ximian.com>
14228
14229         * debug-mono-symfile.c: Completely rewrote the type section.
14230         Instead of using individual malloc()ed fields, we use one big
14231         continuous memory area and offsets into this area.
14232         See the comments in the source code for details.
14233
14234 2002-12-30  Martin Baulig  <martin@ximian.com>
14235
14236         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
14237
14238 2002-12-30  Martin Baulig  <martin@ximian.com>
14239
14240         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
14241         line number table in this data blob instead of using an external
14242         pointer.
14243
14244 2002-12-28  Martin Baulig  <martin@ximian.com>
14245
14246         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14247
14248 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
14249
14250         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
14251         as a boxed return type.
14252
14253 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
14254
14255         * appdomain.c
14256         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
14257         g_build_filename to properly get separators on the filename created.
14258
14259         * object.h: Small change, introduce MonoMarshalByRefObject to
14260         track the layout of that structure in the C# universe as we make
14261         changes there.
14262
14263 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
14264
14265         * object.c: removed assert to allow static fields on interfaces.
14266         * loader.c: a TypeSpec may be used for any type, not just arrays.
14267
14268 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14269
14270         * class.c, class.h: added mono_class_array_element_size ().
14271         Ignore static methods in interfaces.
14272
14273 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14274
14275         * threads.c: fixed the build under cygwin.
14276
14277 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
14278
14279         * reflection.c: handle nullref constants. Allocate keys for
14280         reflection handles with the GC.
14281
14282 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14283
14284         * threads.c, threads.h: added mono_thread_get_abort_signal()
14285         to get a suitable signal for thread abort.
14286
14287 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14288
14289         * metadata.c: fix handling of ExportedType table.
14290
14291 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14292
14293         * icall.c: added WriteWindowsDebugString internal call.
14294
14295 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14296
14297         * reflection.h: added fields to match C# implementation.
14298
14299 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14300
14301         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
14302
14303 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
14304
14305         * gc.h, gc-internal.h: Rename header for GC internal calls to
14306         gc-internal.h from gc.h as to not clash with Boehm GC having its
14307         header installed as <gc.h> in outside include paths.
14308         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
14309         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
14310
14311 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14312
14313         * icall.c: assign minor, build and revision in FillName.
14314
14315 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
14316
14317         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
14318         Added support for running code generated by Reflection.Emit.
14319
14320 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14321
14322         * appdomain.c: check for NULL argument in LoadFrom.
14323
14324 2002-12-10  Dick Porter  <dick@ximian.com>
14325
14326         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
14327
14328 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14329
14330         * appdomain.c: fix buglet when building exe file name.  Handle full
14331         assembly name (needed after latest changes to AssemblyName).
14332         * image.c:
14333         (mono_image_close): free some hashtables.
14334
14335 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
14336
14337         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
14338         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
14339         on some systems (redhat 7.3) 
14340
14341 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
14342
14343         * threads.c: delete the critical section of a sync block,
14344         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
14345
14346 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
14347
14348         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
14349
14350 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14351
14352         * appdomain.[ch]: handle the assembly preload event to try loading the
14353         assemblies using the paths we have in the current domain.
14354
14355         * assembly.[ch]: created an assembly preload hook that is called to try
14356         loading the assembly by other means that the ones provided here.
14357
14358         * domain.c: initialize the domain search path.
14359
14360         From now on, assemblies (TODO: except corlib and System) are loaded
14361         according to these rules when using mono_assembly_load ():
14362
14363                 1. It tries to load the assembly from the ApplicationBase
14364                 of the current domain appending .dll and .exe (TODO: have to
14365                 try loading from name/name.dll and name/name.exe).
14366
14367                 2. It tries the search path specified in PrivateBinPath for the
14368                 current domain (if any).
14369
14370                 3. Previous behavior.
14371
14372 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
14373
14374         * icall.c: implemented GetInterfaceMap() related icall.
14375         * domain.c, loader.h: load MethodInfo in mono_defaults.
14376
14377 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14378
14379         * gc.c: disable the finalizer thread for now, untill all the issues
14380         with it are resolved.
14381
14382 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14383
14384         * string-icalls.c: handle embedded nulls in string ctor when the
14385         length is specified.
14386
14387 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
14388
14389         * class.c: look for explicit interface implementation in parent
14390         classes, too.
14391
14392 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
14393
14394         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
14395
14396 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
14397
14398         * gc.c: protect handles with a critical section.
14399
14400 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14401
14402         * icall.c:
14403         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
14404         parameters. If no assembly specified, try getting the type from all
14405         the assemblies in the current domain, else, load the assembly and get
14406         the type from it.
14407
14408 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14409
14410         * marshal.c: applied patch from Aleksey Demakov that fixes
14411         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
14412
14413 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14414
14415         * icall.c: fixed get_location.
14416
14417 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
14418
14419         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
14420         declarations to make it work with older gcc. 
14421
14422         * loader.c (mono_get_method): set signature->pinvoke for native calls
14423
14424 2002-11-20  Dick Porter  <dick@ximian.com>
14425
14426         * threads.c (mono_thread_init): Set the main thread's handle
14427
14428 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
14429
14430         * gc.c: allow compilation without GC support. Changed to match the
14431         mono coding style.
14432
14433 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
14434
14435         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
14436
14437 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
14438
14439         * reflection.c: set a public key token on the core assemblies.
14440
14441 2002-11-18  Dick Porter  <dick@ximian.com>
14442
14443         * threads.c: Split out some thread initialisation so that other
14444         files can set the start callback function.
14445
14446         * gc.c: Run finalisers in a separate thread, to avoid stack
14447         overflow.  Fixes bug 31333.
14448
14449         * appdomain.c: Set up GC finalisation thread.
14450
14451         * reflection.c: 
14452         * object.c: 
14453         * domain.c: Use gc.h macros for GC_malloc
14454         
14455 2002-11-15  Dick Porter  <dick@ximian.com>
14456
14457         * threadpool.c: 
14458         * threads.c:
14459         * appdomain.c: Removed mono_runtime_init_with_attach(),
14460         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
14461         merging the extra parameter with the existing function.  Removed
14462         unneeded code in mono_thread_attach().
14463
14464 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
14465
14466         * image.c (mono_image_loaded_by_guid): a method to get loaded
14467         images by guid. 
14468         (load_metadata_ptrs): we store the guid as string.
14469
14470 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
14471
14472         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
14473
14474         * metadata.c (mono_guid_to_string): imported method form Zoltan
14475         Varga (slightly modified)
14476
14477         * assembly.c (mono_assembly_open): load precompiled code
14478
14479         * loader.h (MonoMethod): we store the method token for use in the
14480         aot compiler. 
14481
14482 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14483
14484         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
14485         the hook function called when an assembly is loaded.
14486         
14487         * domain.c: Modified file.
14488         (mono_domain_assembly_load): removed hash table insertion of assemblies.
14489
14490         Fixes bug #33196.
14491
14492 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
14493
14494         * reflection.c: Map PEFileKind to the value expected by the WinNT
14495         image loader. 
14496
14497 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14498
14499         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
14500         Read until the buffer is filled completely.
14501
14502 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14503
14504         * icall.c: implemented MonoType.InternalGetEvent ().
14505
14506 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14507
14508         * appdomain.c: implemented InitAppDomainSetup. Delayed
14509         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
14510         the entry_assembly.
14511
14512         * assembly.c: base_dir is now an absolute path ending with
14513         G_DIR_SEPARATOR.
14514
14515         * icall.c: modified get_location according to the above changes.
14516
14517         * object.c: init AppDomain.SetupInformation for the default domain after
14518         we have the entry assembly.
14519
14520         * domain.c: when unloading a domain, setup = NULL.
14521
14522 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
14523
14524         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
14525
14526 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
14527
14528         * object.h, object.c: introduced mono_object_get_virtual_method ()
14529         to lookup the method invoked on an object when a callvirt is done on
14530         a method.
14531         * icall.c: make MethodInfo::Invoke() always do a virtual call.
14532
14533 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14534
14535         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
14536         current domain when loaded an assembly and failed to load it.
14537
14538         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
14539
14540 2002-10-31  Dick Porter  <dick@ximian.com>
14541
14542         * icall.c: 
14543         * file-io.h: 
14544         * file-io.c: Return the error status in a parameter, as the
14545         GetLastError() value has long since been blown away if we try and
14546         look it up in a subsequent internal call invocation.  Delete the
14547         GetLastError() internal call, because it's useless.
14548
14549 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
14550
14551         * class.[ch]: added cast_class to fix bug 29517
14552
14553 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
14554
14555         * marshal.c: create valid IL code in the filter clause:
14556         the new JIT is less forgiving:-)
14557
14558 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14559
14560         * icall.c: removed get_property internal call.
14561
14562 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
14563
14564         * appdomain.h domain.c: Added an ID to appdomains.
14565         
14566         * threads.c threads.h icall.c: Implement icall
14567         Thread:GetDomainID(), and remove unused icall 
14568         CurrentThreadDomain_internal.
14569
14570 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14571
14572         * icall.c: Don't recurse through the base types in GetConstructor.
14573         Fixes bug #32063. 
14574
14575 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
14576
14577         * mempool.h, mempool.c: added mono_mempool_empty() and
14578         mono_mempool_stats().
14579
14580 2002-10-23  Dick Porter  <dick@ximian.com>
14581
14582         * file-io.c: 
14583         * file-io.h: 
14584         * icall.c: Added MonoIO.GetFileType internal call
14585
14586 2002-10-17  Dick Porter  <dick@ximian.com>
14587
14588         * appdomain.c (mono_runtime_cleanup): Don't signal the async
14589         delegate semaphore before waiting for all threads to finish,
14590         because new threads can also call async delegates.  Fixes bug
14591         32004.
14592
14593         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
14594         of 3 seconds, in case another async job is queued.  (This part is
14595         needed because the bug fix reintroduced the 3s exit lag.)  This
14596         makes the mono_runtime_shutdown flag superfluous.
14597
14598 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
14599
14600         * reflection.c: include ehader size in method section headers.
14601         Really check for suplicated modules entries.
14602
14603 2002-10-17  Martin Baulig  <martin@gnome.org>
14604
14605         * debug-mono-symfile.c: Added back support for locals.
14606
14607 2002-10-14  Martin Baulig  <martin@gnome.org>
14608
14609         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
14610         MONO_TYPE_VOID.
14611
14612 2002-10-14  Martin Baulig  <martin@gnome.org>
14613
14614         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
14615         mono_class_get() instead of looking in the class cache. 
14616
14617 2002-10-13  Martin Baulig  <martin@gnome.org>
14618
14619         * debug-mono-symfile.c: Set version number to 28, include the
14620         signature in method names.
14621
14622 2002-10-13  Martin Baulig  <martin@gnome.org>
14623
14624         * debug-mono-symfile.h: Set version number to 27.
14625
14626 2002-10-11  Martin Baulig  <martin@gnome.org>
14627
14628         * gc.c: Don't register/unregister NULL pointers as disappearing links.
14629
14630 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14631
14632         * metadata.c, metadata.h: added helper function to allocate signatures.
14633
14634 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14635
14636         * icall.c: added internal call to get the location of machine.config.
14637
14638 2002-10-08  Martin Baulig  <martin@gnome.org>
14639
14640         * debug-mono-symfile.c: Ignore classes with a pending init for the
14641         moment.
14642
14643 2002-10-03  Dick Porter  <dick@ximian.com>
14644
14645         * threads.c: Freebsd pthread_t is a pointer
14646
14647 2002-10-03  Dick Porter  <dick@ximian.com>
14648
14649         * socket-io.c: Implemented GetHostName_internal
14650
14651 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14652
14653         * mono-config.c:
14654         (mono_config_parse_file): don't leak the text.
14655
14656 2002-10-02  Martin Baulig  <martin@gnome.org>
14657
14658         * debug-mono-symfile.c: Added support for methods.
14659
14660 2002-10-01  Martin Baulig  <martin@gnome.org>
14661
14662         * debug-mono-symfile.c: Don't emit methods and line numbers for
14663         the dynamic symbol file, just write the type table.  We can easily
14664         have an external helper program which creates a symbol file for an
14665         IL file.        
14666
14667 2002-10-01  Dick Porter  <dick@ximian.com>
14668
14669         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
14670         Only add the handle to the cleanup array when we're about to
14671         launch the thread.  Bug 31425 deadlocked when the test was run on
14672         mono under w32.
14673
14674 2002-10-01  Martin Baulig  <martin@gnome.org>
14675
14676         * debug-mono-symfile.c: Added support for properties.
14677
14678 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14679
14680         * reflection.c: unaligned store fix from Mark Crichton
14681         <crichton@gimp.org>.
14682
14683 2002-09-27  Martin Baulig  <martin@gnome.org>
14684
14685         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
14686         New interncall.
14687
14688 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
14689
14690         * assembly.h, assembly.c: use a sane API to hook into the assembly
14691         loading process instead of a useless special-purpouse hack
14692         (ngen needs a hook, too, for example).
14693
14694 2002-09-27  Dick Porter  <dick@ximian.com>
14695
14696         * threads.c (mono_thread_init): Call GetCurrentProcess() so
14697         io-layer can set up some process handle info.  Not needed on w32,
14698         but doesn't hurt either.
14699
14700         * process.c: Pass the program name in the second parameter to
14701         CreateProcess, so the path is searched.  Include the working
14702         directory. Implemented process name, process enumeration, and some
14703         process detail internal calls.
14704         
14705         * icall.c: Added internal calls for process lookup, and some
14706         process details
14707
14708 2002-09-26  Martin Baulig  <martin@gnome.org>
14709
14710         * assembly.c (mono_install_open_assembly_hook): New global
14711         function to install a function to be invoked each time a new
14712         assembly is loaded.
14713         (mono_assembly_open): Run this callback function if set.
14714
14715         * debug-mono-symfile.c: Put back line numbers for the dynamic
14716         symbol file and also record the .il file as source file.  This
14717         allows us to install the temporary symbol file as `file.dbg' just
14718         like a compiler-generated one.
14719
14720 2002-09-26  Nick Zigarovich <nick@chemlab.org>
14721
14722         * Corrected typo in gc.c (BOHEM vs BOEHM).
14723
14724 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14725
14726         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
14727         GetProperties. Also avoid calling g_slist_length in GetProperties and
14728         GetMethods.
14729
14730 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14731
14732         * reflection.c: avoid unaligned stores (bug spotted by
14733         Mark Crichton  <crichton@gimp.org>).
14734
14735 2002-09-25  Martin Baulig  <martin@gnome.org>
14736
14737         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
14738         instead of guint64 for addresses and added prologue/epilogue info.
14739
14740 2002-09-25  Martin Baulig  <martin@gnome.org>
14741
14742         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
14743         store line number info.  For the dynamic symbol file, we only need
14744         to provide the JIT generated dynamic line number info for the dynamic
14745         symbol file.
14746
14747 2002-09-25  Martin Baulig  <martin@gnome.org>
14748
14749         * debug-mono-symfile.h: Incremented version number.
14750
14751 2002-09-24  Martin Baulig  <martin@gnome.org>
14752
14753         * class.c (mono_debugger_class_init_func): New global function
14754         pointer variable.
14755         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
14756         call it.
14757
14758         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
14759         function.  This is called via the mono_debugger_class_init_func
14760         hook to add all types to the dynamic type table.
14761         (ves_icall_MonoDebugger_GetType): New interncall to get a class
14762         from its metadata token.
14763
14764         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
14765         New interncall for the debugger.
14766
14767 2002-09-24  Nick Drochak <ndrochak@gol.com>
14768
14769         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
14770         before using it in case it is null.
14771         
14772 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14773
14774         * metadata.c: allow custom modifiers in local var signatures
14775         (bug spotted by Zoltan Varga).
14776
14777 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14778
14779         * class.c: deal with the <Module> class that may have a NULL vtable.
14780         Eliminate warnings.
14781
14782 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14783
14784         * image.c, image.h: more strong name helpers.
14785         * monosn.c: more work: convert pem keys to cryptoapi format.
14786
14787 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14788
14789         * string-icalls.c: speedup IndexOf.
14790
14791 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14792
14793         * icall.c: updates from Zoltan.2.Varga@nokia.com.
14794
14795 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14796
14797         * icall.c: cleanup: use mono_object_domain ().
14798
14799 2002-09-23  Martin Baulig  <martin@gnome.org>
14800
14801         * debug-mono-symfile.c: Improved type support.
14802
14803 2002-09-22  Martin Baulig  <martin@gnome.org>
14804
14805         * debug-mono-symfile.c: Added support for reference types and strings.
14806
14807 2002-09-22  Martin Baulig  <martin@gnome.org>
14808
14809         * debug-mono-symfile.c: Started to work on the type table.
14810
14811 2002-09-21  Martin Baulig  <martin@gnome.org>
14812
14813         * debug-mono-symfile.c: Largely reworked the symbol table format.
14814         The symbol table is now incrementally updated each time a new
14815         method is added.  We're now also using our own magic and version
14816         so that you don't need to recompile all your classes if the
14817         dynamic table changes.
14818         (mono_debug_update_mono_symbol_file): Removed.
14819         (mono_debug_symfile_add_method): New function to add a method.
14820
14821 2002-09-21  Martin Baulig  <martin@gnome.org>
14822
14823         * icall.c
14824         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
14825         New interncall.
14826
14827         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
14828         New interncall to get a method from its metadata token.
14829
14830 2002-09-21  Martin Baulig  <martin@gnome.org>
14831
14832         * debug-mono-symfile.c: Create type table.
14833
14834 2002-09-20  Martin Baulig  <martin@gnome.org>
14835
14836         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
14837
14838 2002-09-20  Martin Baulig  <martin@gnome.org>
14839
14840         * debug-mono-symfile.c: Provide information about params and locals.
14841
14842 2002-09-20  Martin Baulig  <martin@gnome.org>
14843
14844         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
14845         New interncall.
14846
14847         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
14848         interncall to get a method from its metadata token.
14849
14850 2002-09-20  Martin Baulig  <martin@gnome.org>
14851
14852         * debug-mono-symfile.c: Added a few checks for method->header
14853         being non-NULL.  This should never happen, but for the moment
14854         let's use a g_warning() rather than a g_assert().
14855
14856 2002-09-19  Mark Crichton  <crichton@gimp.org>
14857
14858         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
14859         even if support for it isn't present.  Added an #ifdef to fix this.
14860
14861         * socket-io.c: Added checks back for Solaris support.
14862
14863 2002-09-19  Martin Baulig  <martin@gnome.org>
14864
14865         * debug-mono-symfile.c (read_string, write_string): Reflect latest
14866         changes in the symbol file format.
14867
14868 2002-09-18  Martin Baulig  <martin@gnome.org>
14869
14870         * debug-mono-symfile.c: Set version number to 21.
14871
14872 2002-09-18  Dick Porter  <dick@ximian.com>
14873
14874         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
14875         on netbsd.  Fixes bug 30051.
14876
14877 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14878
14879         * reflection.c:
14880         (set_version_from_string): little fix.
14881
14882 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14883
14884         * monosn.c, Makefile.am: added strong name utility.
14885         * reflection.h, reflection.c: implemented delayed signing,
14886         locale, version and hash id assembly attributes.
14887
14888 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
14889
14890         * loader.c, metadata.c: load param attributes in signatures.
14891
14892 2002-09-16  Martin Baulig  <martin@gnome.org>
14893
14894         * debug-mono-symfile.c: Added string table with all method names.
14895
14896 2002-09-14  Martin Baulig  <martin@gnome.org>
14897
14898         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
14899         fast method lookup.
14900
14901 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14902
14903         * reflection.c: record the public key token of referenced assemblies.
14904
14905 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14906
14907         * image.c, image.h: added functions to get the strong name and the
14908         public key of an assembly.
14909         * pedump.c: use them.
14910
14911 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
14912
14913         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
14914
14915 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
14916
14917         * marshal.c (mono_marshal_get_managed_wrapper): Added
14918         MONO_TYPE_BOOLEAN 
14919
14920 2002-09-11  Martin Baulig  <martin@gnome.org>
14921
14922         * gc.c: Call GC_unregister_disappearing_link() on all links when
14923         finalizing them, this is necessary to aviod a crash in boehm's
14924         finalize handler.
14925
14926 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14927
14928         * gc.c: handle GetTarget for finalized objects spotted and fixed by
14929         nick@chemlab.org.
14930
14931 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
14932
14933         * icall.c: implemented MonoType::Module.
14934         * reflection.c, reflection.h: mono_module_get_object () from
14935         Tomi Pakarinen <tomi.pakarinen@welho.com>.
14936
14937 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14938
14939         * icall.c: ignore overridden methods in GetMethods ().
14940         Fix for FieldInfo::SetValue().
14941         * object.c: handle float/double in runtime invoke.
14942
14943 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14944
14945         * object.c: allow a constructor to be called again on an object.
14946
14947 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14948
14949         * class.h, class.c: move field layout code to it's own function and
14950         export it. Get an interface id earlier. Move fields in MonoClass
14951         so they are more cache friendly and align the bitfields.
14952         * loader.c: temporary handle get_param_names() for a runtime method.
14953         * reflection.c, reflection.h: more code to handle runtime creation of
14954         types.
14955
14956 2002-09-09  Martin Baulig  <martin@gnome.org>
14957
14958         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
14959         signature with the pinvoke field being set for the actual call.
14960
14961 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14962
14963         * icall.c: removed some unused icalls. Start of map of glib charsets
14964         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
14965
14966 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14967
14968         * debug-helpers.c: break infinite loop (found and fixed by
14969         Holger Arnold <harnold@gmx.de>).
14970
14971 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14972
14973         * icall.c: target may be null in create_delegate.
14974
14975 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14976
14977         * marshal.c: handle a boolean return type.
14978
14979 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14980
14981         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
14982
14983 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14984
14985         * gc.c: fix weakreferences.
14986
14987 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
14988
14989         * icall.c: added icall to get default codepage.
14990
14991 2002-09-03  Dick Porter  <dick@ximian.com>
14992
14993         * threads.h: 
14994         * threads.c: Use MonoThread instead of MonoObject where
14995         apropriate.
14996
14997         Store running thread objects in a hash table, so that we have all
14998         the info to hand when waiting for them to finish
14999         (means we don't need OpenThread() any more, so mingw builds should
15000         be fully functional again.)
15001
15002         * verify.c:
15003         * object.h: Added thread ID to MonoThread
15004
15005 2002-09-03  Martin Baulig  <martin@gnome.org>
15006
15007         * icall.c (System.Reflection.Assembly::get_location): New interncall.
15008
15009 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15010
15011         * icall.c: fixed leak in get_temp_path. Thanks lupus.
15012
15013 2002-09-03  Martin Baulig  <martin@gnome.org>
15014
15015         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
15016         argument to store the end address of the disassembled instruction.
15017
15018         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
15019         here from debug-symfile.h.
15020         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
15021         JIT into this struct.
15022         (MonoSymbolFile): Added `char *image_file' field.
15023         (MonoDebugGetMethodFunc): Removed.
15024         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
15025         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
15026         (mono_debug_find_method): New method.
15027
15028         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
15029         create a full symbol file.
15030         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
15031         and static symbol files.
15032         (mono_debug_find_method): The symbol file keeps an internal method hash,
15033         call this to get a MonoDebugMethodInfo from a MonoMethod.
15034
15035         * debug-symfile.[ch]: Removed.
15036
15037 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
15038
15039         * image.c (do_mono_image_open): Remove linker version check.
15040
15041 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
15042
15043         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
15044         wrappers for instance methods.
15045         
15046 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15047
15048         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
15049
15050 2002-08-28  Dick Porter  <dick@ximian.com>
15051
15052         * Makefile.am: Export HOST_CC for w32 builds
15053
15054 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15055
15056         * file-io.c process.c: MonoString are null terminated, no
15057         need for mono_string_to_utf16() anymore.
15058
15059 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15060
15061         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
15062
15063 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
15064
15065         * icall.c, reflection.h: speedup System.MonoType.
15066
15067 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15068
15069         * reflection.c: allow null as the value of a string argument in
15070         custom attributes constructors.
15071
15072 2002-08-27  Martin Baulig  <martin@gnome.org>
15073
15074         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
15075         `trampoline_address' field.
15076
15077 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
15078
15079         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
15080         check (fixes bug #29486) 
15081
15082 2002-08-27  Martin Baulig  <martin@gnome.org>
15083
15084         * debug-mono-symfile.c: Changed the file format in a way that allows us
15085         open it read-only and to use a specially malloced area for all the
15086         dynamic data.  We can now also generate a symbol file on-the-fly if we're
15087         debugging IL code and there is no MCS generated symbol file for it.
15088
15089 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15090
15091         * object.c: added a define for a good string and array
15092         creation speedup (not enabled by default because we need to deal with
15093         the synch stuff).
15094
15095 2002-08-26  Martin Baulig  <martin@gnome.org>
15096
15097         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
15098         function to create a dynamic symbol file.  This is used by the
15099         debugger to create a symbol file for IL code on-the-fly.
15100
15101 2002-08-26  Martin Baulig  <martin@gnome.org>
15102
15103         * loader.c (mono_lookup_pinvoke_call): Include the error message
15104         from g_module_error() in the error message.
15105
15106 2002-08-24  Martin Baulig  <martin@gnome.org>
15107
15108         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
15109         function to update the symbol file.  The symbol file is mmap()ed
15110         writable, but private.  This allows us to install the symbol file
15111         together with the assembly.
15112
15113 2002-08-24  Martin Baulig  <martin@gnome.org>
15114
15115         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
15116         but they can read the new symbol file format which mcs is now creating.
15117
15118         * debug-symfile.c (mono_debug_find_source_location): Moved to
15119         debug-mono-symfile.c; this is now operating on the new symbol file.
15120
15121 2002-08-23  Martin Baulig  <martin@gnome.org>
15122
15123         * debug-helpers.c (mono_method_desc_from_method): New function to get
15124         a MonoMethodDesc from a MonoMethod.
15125
15126 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15127
15128         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
15129         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
15130
15131 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15132
15133         * string-icalls.[ch]: make helper methods static.
15134
15135 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15136
15137         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
15138         types to it and to SetValueInternal.
15139
15140         * object.c: Moved handle_enum label to its proper place. This was the
15141         f... bug! ;-)
15142
15143         This time i compiled mcs and gtk-sharp and they both work.
15144
15145 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15146
15147         * icall.c: reverted partially my previous patch until 
15148         object.c:set_value handles enums correcly.
15149
15150 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15151
15152         * icall.c:
15153         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
15154         (ves_icall_System_Environment_get_MachineName): removed warning when
15155         compiling under cygwin.
15156
15157 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15158
15159         * object.c: fixed field_get_value() for reference types.
15160
15161 2002-08-22  Dick Porter  <dick@ximian.com>
15162
15163         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
15164         Don't free a buffer while it's still needed.  Patch from Jonathan
15165         Liger <Jonathan.liger@wanadoo.fr>
15166
15167 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
15168
15169         * icall.c (ves_icall_System_Environment_get_Platform): Add new
15170         internal call.
15171
15172 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
15173
15174         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
15175         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
15176
15177         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
15178         we call unmanaged code which throws exceptions.
15179
15180 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15181
15182         * appdomain.h: added per-domain entry_assembly.
15183         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
15184         arguments.
15185         * icall.c: Assembly::GetEntryAssembly icall.
15186         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
15187         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
15188
15189 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15190
15191         * appdomain.h, gc.c: added mono_domain_finalize ().
15192
15193 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15194
15195         * object.c:
15196         (mono_print_unhandled_exception): changed g_warning by g_printerr
15197         because g_log has a 1024 characters limit (yeah, i got a big stack
15198         trace). Don't print exception name, that should be in ToString 
15199         returned string.
15200
15201 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15202
15203         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
15204         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
15205
15206 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15207
15208         * object.c:
15209         (mono_print_unhandled_exception): after previous commit, i realized
15210         that MS calls ToString on the exception. I changed this function to
15211         do that. This way we get stack_trace for free.
15212
15213 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15214
15215         * object.c:
15216         (mono_print_unhandled_exception): invoke Message property instead of
15217         getting 'message' field from Exception. Don't allocate memory for
15218         'trace' and 'message' if not needed.
15219
15220 2002-08-18  Dick Porter  <dick@ximian.com>
15221
15222         * unicode.c: Fix asserts to match Encoder.cs checks
15223
15224 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15225
15226         * marshal.c: fix unaligned store issue and a few wrong
15227         opcode argument types.
15228
15229 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15230
15231         * icall.c: added GetUninitializedObjectInternal internal call.
15232
15233 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
15234
15235         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
15236         to the right domain.
15237
15238 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
15239
15240         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
15241
15242         * class.c (class_compute_field_layout): set blittable to false for Strings
15243
15244         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
15245
15246 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15247
15248         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
15249         first chunk of code to create types at runtime. Code to
15250         handle ReflectedType/DeclaringType. Make reflection handles
15251         domain specific.
15252
15253 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15254
15255         * class.c: set correct name in arrays.
15256
15257 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
15258
15259         * appdomain.c (mono_domain_transfer_object): make it work with
15260         valuetypes. bug fixes.
15261
15262 2002-08-12  Dick Porter  <dick@ximian.com>
15263
15264         * object.h: Rename some parameters to avoid c++ keywords (Patch
15265         from Joseph Wenninger <kde@jowenn.at>)
15266
15267 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
15268
15269         * icall.c: added icall to implement Assembly.GetFile*.
15270
15271 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15272
15273         * reflection.h, reflection.c: code to embed managed resources.
15274
15275 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15276
15277         * class.c: move all the type size stuff into
15278         class_compute_field_layout().
15279
15280 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15281
15282         * class.c: ensure enums have always the correct instance size.
15283         * unicode.c: remove wrong assert.
15284
15285 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15286
15287         * assembly.c: fix mem corruption issue.
15288         * image.h, image.c: added mono_image_get_resource () to access
15289         managed resources.
15290         * icall.c: implemented Assembly.EntryPoint property and some
15291         Managed Resources related internalcalls.
15292
15293
15294 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15295
15296         * image.c, image.h: impemented mono_image_get_entry_point ().
15297         * appdomain.c: use mono_image_get_entry_point.
15298
15299 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15300
15301         * reflection.c: support the object type argument when loading
15302         custom attributes.
15303
15304 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
15305
15306         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
15307         String as return type.
15308
15309 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
15310
15311         * reflection.c: fix encoding of named args for custom attrs to match
15312         the ms implementation. Read them back when instantiating custom
15313         attributes.
15314
15315 2002-08-02  Radek Doulik  <rodo@ximian.com>
15316
15317         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
15318         by Dietmar as quick fix
15319         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
15320         16 as stack size, used on more places as quick fix before Dietmar
15321         will fix it properly
15322
15323 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15324
15325         * object.h, object.c: added accessors for fields and properties.
15326
15327 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15328
15329         * class.c, class.h: made mono_class_get_field_from_name ()
15330         loop on parent types.
15331         Added mono_class_get_property_from_name ().
15332
15333 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15334
15335         * class.c, class.h: move the code to setup the type vtable in its own
15336         function so that it can be reused also for types created at runtime.
15337         Eliminate the "class" identifier from the header file.
15338         * reflection.c: setup the vtable for enums so that we can create
15339         objects for use in SetConstant ().
15340
15341 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
15342
15343         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
15344         instead of the delegate itself as this pointer (bug #28383)
15345
15346 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
15347
15348         * marshal.c (mono_marshal_get_managed_wrapper): added return type
15349         conversions.
15350
15351 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15352
15353         * loader.c: don't set the pinvoke bit on icalls.
15354
15355 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
15356
15357         * debug-helpers.c (mono_method_full_name): only print a number to
15358         indicate wrapper type (so that the output is more readable in traces).
15359
15360 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
15361
15362         * class.c (mono_class_init): include method override patch from Paolo
15363
15364 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
15365
15366         * icall.c: fixed GetTypeCode().
15367
15368 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
15369
15370         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
15371         use real delegate invoke function to make it work with multicast
15372         delegates (fix bug# 28291).
15373
15374 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15375
15376         * object.c: load constant strings.
15377
15378 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15379
15380         * reflection.c: no magic numbers.
15381         * tabledefs.h: security action enum.
15382
15383 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15384
15385         * assembly.c: fix possible memory corruption.
15386
15387 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15388
15389         * reflection.h, reflection.c: added support for linking resources.
15390         * verify.c: check we have an updated corlib.
15391
15392 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
15393
15394         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
15395         string arrays.
15396         (mono_marshal_string_array): null terminate unmanaged string arrays.
15397         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
15398
15399 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15400
15401         * icall.c: Type.GetType () can now return also types from the
15402         calling assembly.
15403
15404 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
15405
15406         * loader.h, loader.c: stack walking support.
15407         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
15408         GetCallingAssembly.
15409
15410 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
15411
15412         * marshal.c: added optimisations for blittable types 
15413
15414         * class.c (mono_array_class_get): do not set blittable attribute on arrays
15415         (mono_class_setup_mono_type): set blittable attribute for single
15416         and double.
15417
15418         * marshal.c (mono_string_utf8_to_builder): impl.
15419         (mono_string_builder_to_utf8): impl.
15420         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
15421
15422 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
15423
15424         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
15425         (mono_marshal_get_managed_wrapper): impl. byref types
15426
15427 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15428
15429         * icall.c:
15430         (search_method): don't display debug message. 
15431
15432 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
15433
15434         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
15435
15436 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
15437
15438         * appdomain.c: set the missing filename when throwing exception.
15439
15440 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
15441
15442         * metadata.c (mono_type_size): code cleanup
15443         (mono_type_stack_size): removed some test code
15444
15445 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
15446
15447         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
15448         mono_get_exception_file_not_found now.
15449
15450         * exception.c (mono_exception_from_name_two_strings): New version
15451         that will call a constructor with two string arguments. 
15452         (mono_get_exception_file_not_found): New helper routine, used to
15453         report file-not-found errors.
15454
15455 2002-07-20  Dick Porter  <dick@ximian.com>
15456
15457         * process.h:
15458         * process.c: Pass file handles to CreateProcess
15459         
15460         * icall.c:
15461         * file-io.h:
15462         * file-io.c: Implemented CreatePipe
15463
15464 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
15465
15466         * metadata.c (mono_get_param_info): set alignment for value types
15467
15468 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15469
15470         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
15471         Constify mono_domain_assembly_open().
15472         * loader.c: handle null namespace in icalls.
15473
15474 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
15475
15476         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
15477         (emit_str_to_ptr_conv): marshal object as structs
15478
15479         * metadata.c (mono_type_to_unmanaged): marshal object as structs
15480
15481         * marshal.c (mono_marshal_get_runtime_invoke): support value types
15482
15483 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
15484
15485         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
15486         (mono_marshal_get_native_wrapper): we an now return value types
15487
15488 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15489
15490         * verify.c: more checks implemented.
15491
15492 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
15493
15494         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
15495         (fix bug #27695)
15496         (mono_marshal_get_native_wrapper): allow byref arguments
15497         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
15498         impl. PtrToStringXXX methods
15499         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
15500         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
15501         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
15502         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
15503         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
15504
15505 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15506
15507         * reflection.c: fix buglet in parsing an assembly name.
15508
15509 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
15510
15511         * marshal.c (emit_ptr_to_str_conv): first impl.
15512
15513 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15514
15515         * object.c, class.h: cache the vtable in the class as suggested by
15516         vargaz@freemail.hu (Zoltan Varga).
15517
15518 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15519
15520         * class.h, loader.c: added mono_field_from_token().
15521         * verify.c: first cut of type checking code.
15522
15523 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
15524
15525         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
15526
15527 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
15528
15529         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
15530         (fix bug #27782)
15531         (mono_marshal_get_remoting_invoke): impl.
15532         (mono_delegate_begin_invoke): impl.
15533         (mono_mb_emit_save_args): impl.
15534         (mono_delegate_end_invoke): impl.
15535         (mono_marshal_get_delegate_begin_invoke):
15536         (mono_marshal_get_delegate_end_invoke):
15537         (mono_marshal_get_delegate_invoke): generate a special name for
15538         those methods (including the signature) and associate them whith
15539         the delegate class. 
15540
15541 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
15542
15543         * reflection.[ch]: 
15544         (mono_reflection_type_from_name): now it has a MonoImage parameter
15545         which is used as the default image to search the type in. If the image
15546         is NULL or getting the type from it fails, it defaults to corlib.
15547
15548         * icall.c: changed 1 call to mono_reflection_type_from_name to match
15549         new parameter.
15550
15551 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15552
15553         * reflection.c: update the parameter table index.
15554
15555 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
15556
15557         * domain.c: don't include the mark byte in the string hash.
15558
15559 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
15560
15561         * icall.cs: icall for Type.GetTypeCode ().
15562         * verify: a couple of fixes and disabled local initialization checks.
15563
15564 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
15565
15566         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
15567
15568         * debug-helpers.c (mono_method_full_name): print the type of the
15569         runtime wrapper
15570
15571         * metadata.c (mono_signature_hash): a hash function for signatures
15572         (mono_signature_hash): better hash algorithm
15573
15574         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
15575
15576         * debug-helpers.c (mono_method_full_name): this can now generate
15577         method names with signatures
15578
15579         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
15580         method dont have this pointers.
15581
15582 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15583
15584         * reflection.c: fixup typebuilder tokens.
15585         * image.c: fix buglet.
15586         * marshal.h: remove whitespace.
15587         * metadata.h, metadata.c: reinstate code that was removed.
15588         * verify.c: handle catch directives and fix another couple of bugs.
15589
15590 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
15591
15592         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
15593         (mono_marshal_get_native_wrapper): make it comp. with the old code
15594         (mono_marshal_get_native_wrapper): support boolean
15595         (mono_marshal_get_managed_wrapper): support more types
15596
15597 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
15598
15599         * class.c (class_compute_field_layout): compute class->blittable attribute.
15600
15601 2002-07-09  Dick Porter  <dick@ximian.com>
15602
15603         * threads.c: Make the thread cleaning up cope with threads that
15604         call ExitThread()
15605
15606 2002-07-08  Radek Doulik  <rodo@ximian.com>
15607
15608         * reflection.c (method_encode_code): use non-translated values to
15609         compute finally_start, this fixes exception handling on ppc, yay!
15610
15611         * decimal.h (struct signscale): fix endianess
15612
15613 2002-07-07  Radek Doulik  <rodo@ximian.com>
15614
15615         * reflection.c: swap box_val and not val
15616
15617 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
15618
15619         * reflection.c, reflection.h: handle full assembly info in type name.
15620         Handle Type arguments when loading custom attributes.
15621         * icall.c: updated to use new mono_reflection_type_from_name () method.
15622
15623 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15624
15625         * loader.c:
15626         (method_from_memberref): also print assembly name when method not found.
15627
15628 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15629
15630         * icall.c:
15631         (ves_icall_TypeGetProperties): fixed bug #27473. 
15632
15633 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15634
15635         * reflection.c: display image name and token when cannot find the
15636         .ctor for an attribute.
15637
15638 2002-07-05  Martin Baulig  <martin@gnome.org>
15639
15640         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
15641
15642 2002-07-04  Dick Porter  <dick@ximian.com>
15643
15644         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
15645         compile on mingw.  This will cause mingw builds to not wait for
15646         subthreads to terminate after the main thread does.  I've lodged a
15647         bug with the mingw developers for them to wrap OpenThread().
15648
15649 2002-07-03  Dick Porter  <dick@ximian.com>
15650
15651         * threads.c: Store thread IDs instead of handles, because
15652         GetCurrentThread() returns a pseudohandle and therefore stores
15653         useless values.  mono_thread_cleanup() continues checking the
15654         array of threads until it is empty, to cope with subthreads
15655         spawning new threads after the main thread has finished.
15656
15657         * profiler.h:
15658         * profiler.c:
15659         * profiler-private.h: Pass the thread ID to thread profiler
15660         functions, instead of a handle
15661
15662 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15663
15664         * verify.c: fixes to make it more usable.
15665         * pedump.c: added --verify code to verify IL code in an assembly.
15666
15667 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15668
15669         * reflection.c: turn errors into warnings to allow compiling corlib.
15670
15671 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15672
15673         * reflection.c: add special cases to compile corlib.
15674
15675 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15676
15677         * reflection.c: handle properties with only a set method.
15678
15679 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15680
15681         * opcodes.h: add enum with opcodes in opval order.
15682
15683 2002-07-01  Dick Porter  <dick@ximian.com>
15684         
15685         * object.h:
15686         * object.c (mono_runtime_run_main): Removed unneeded argument
15687
15688 2002-06-28  Martin Baulig  <martin@gnome.org>
15689
15690         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
15691
15692 2002-06-27  Dick Porter  <dick@ximian.com>
15693
15694         * threads.c: Store the handle in both the parent thread and in the
15695         subthread, to minimise the time between starting a new thread and
15696         storing its ID.
15697
15698 2002-06-26  Dick Porter  <dick@ximian.com>
15699
15700         * appdomain.c (mono_runtime_cleanup): Close the socket library
15701         after all the threads have finished, not before
15702
15703 2002-06-26  Martin Baulig  <martin@gnome.org>
15704
15705         * debug-symfile.c (mono_debug_find_source_location): Added
15706         `guint32 *line_number' argument.  If it's not NULL, store the line number
15707         there and return the file name without the line number.
15708
15709 2002-06-25  Dick Porter  <dick@ximian.com>
15710
15711         * icall.c:
15712         * process.h:
15713         * process.c: Process forking and other support functions
15714
15715 2002-06-25  Dick Porter  <dick@ximian.com>
15716
15717         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
15718         things dont happen when the image is closed.
15719         (mono_image_lookup_resource): Walk the resource section looking
15720         for a particular entry
15721
15722         * cil-coff.h: PE resource section decoding
15723
15724 2002-06-25  Dick Porter  <dick@ximian.com>
15725         
15726         * assembly.h:
15727         * assembly.c: 
15728         (mono_assembly_foreach): Accessor functions to walk the list of
15729         loaded assemblies
15730         (mono_assembly_set_main):
15731         (mono_assembly_get_main): Process methods need to know which
15732         assembly is the "main" one
15733
15734         * object.c (mono_runtime_run_main): Record the main assembly
15735
15736         * debug-helpers.c: Fix typo
15737
15738 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
15739
15740         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
15741         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
15742
15743 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15744
15745         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
15746
15747 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
15748
15749         * image.c (do_mono_image_open): Initialize reference count,
15750         otherwise we leak the MonoImage.
15751
15752 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15753
15754         * reflection.c: small tweak to handle self-hosting.
15755
15756 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15757
15758         * reflection.c: fix type name parse code.
15759
15760 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15761
15762         * reflection.c: break out of the loop.
15763         * image.c: special case corlib.
15764
15765 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15766
15767         * reflection.c: add all the custom attrs at the end to ensure the
15768         ctors have been properly initialized when the attributes are defined
15769         in the current assembly.
15770
15771 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15772
15773         * reflection.c: handle correctly multiple-nested types.
15774
15775 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15776
15777         * row-indexes.h: fix typos.
15778         * reflection.c: adjust for typos and fix method_def_or_ref
15779         encoding in MethodImpl table.
15780
15781 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15782
15783         * reflection.c: fix entry point patching (thanks Serge!).
15784
15785 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
15786
15787         * verify.c: add check for System.Exception
15788
15789 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
15790
15791         * image.c, class.c: minifix for code just c&p'ed.
15792         * reflection.c: warning fix.
15793         * object.h, loader.h, domain.c: load also StringBuilder.
15794
15795 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15796
15797         * marshal.h, marshal.c: some support code to handle complex marshaling.
15798
15799 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15800
15801         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
15802         Better signatures with vtable error dump.
15803
15804 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
15805
15806         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
15807
15808 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
15809
15810         * icall.c (ves_icall_Type_GetField): impl.
15811
15812 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15813
15814         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
15815         to retrieve a marshal description blob for a field or param.
15816
15817 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15818
15819         * reflection.h, reflection.c: change order of nested type emission
15820         to avoid table corruption. The NestedTypes table is sorted.
15821         * icall.c: change order of GetConstructor results to workaround mcs bug.
15822
15823 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15824
15825         * reflection.h, reflection.c: handle field and param marshal
15826         information.
15827
15828 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15829
15830         * icall.c, marshal.c marshal.h: more Marshal class implementation.
15831
15832 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15833
15834         * reflection.c: fix call convention.
15835
15836 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15837
15838         * reflection.h, reflection.c: mono_image_get_memberref_token()
15839         takes a type instead of a class, now. Added
15840         mono_image_get_array_token() to create tokens for the special
15841         multi-dim array methods.
15842
15843 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15844
15845         * assembly.c: handle modules (no assembly table). Split
15846         loading references in its own function.
15847         * class.c: handle moduleref resolution scope.
15848         * image.c, image.h: cache module name in image.
15849
15850 2002-06-07  Martin Baulig  <martin@gnome.org>
15851
15852         * reflection.c (mono_image_get_type_info): Only add a class layout entry
15853         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
15854
15855 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15856
15857         * icall.c: more signature fixes that used uint instead of int.
15858
15859 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15860
15861         * reflection.c: fixed signature of field refs.
15862
15863 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15864
15865         * class.c, reflection.c: handle typerefs of nested types
15866         (both on read and when writing files).
15867
15868 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15869
15870         * icall.c: fix method signatures that tried to workaround the previous
15871         typo, d'oh!
15872
15873 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15874
15875         * debug-helpers.c: fix typo.
15876
15877 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15878
15879         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
15880         rewrote the PE/COFF writing code (our programs are understood by the
15881         ms runtime, now).
15882
15883 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15884
15885         * gc.c, gc.h, icall.c: weakreference support.
15886
15887 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15888
15889         * Makefile.am, mono-config.c: use $(sysconfdir).
15890
15891 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15892
15893         * icall.c: changed default precision of Double.ToString() to 15.
15894         Fixed memory leak. Unified with Single.ToString.
15895
15896 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15897
15898         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
15899
15900 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15901
15902         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
15903         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
15904         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
15905         and myself.
15906
15907 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15908
15909         * debug-symfile.c, sysmath.c: yet more compilation fixes.
15910
15911 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15912
15913         * reflection.c, socket-io.c: more compilation fixes.
15914
15915 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15916
15917         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
15918         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
15919         unicode.c: warning and compiler compatibility fixes.
15920
15921 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15922
15923         * class.h, metadata.c: fixed warnings/compilation errors.
15924
15925 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
15926
15927         * Makefile.am, mono-config.c, mono-config.h: configuration file
15928         support routines.
15929         * loader.c, loader.h: make Dll mapping configurable at runtime in the
15930         config file. Export methods to insert and lookup mappings.
15931
15932 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15933
15934         * reflection.c: handle types and boxed objects in custom attr
15935         constructors.
15936
15937 2002-05-30  Martin Baulig  <martin@gnome.org>
15938
15939         * debug-symfile.c
15940         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
15941
15942 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
15943
15944         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
15945         to lookup the implmap row for a P/Invoke method.
15946         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
15947         P/Invoke method from the runtime on an as needed basis.
15948
15949 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
15950
15951         * metadata.c (mono_metadata_parse_signature): impl.
15952
15953 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15954
15955         * class.c: handle .pack directive.
15956
15957 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15958
15959         * object.c: initialize static fields with RVA data.
15960
15961 2002-05-25  Martin Baulig  <martin@gnome.org>
15962
15963         * debug-symfile.c
15964         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
15965
15966 2002-05-24  Martin Baulig  <martin@gnome.org>
15967
15968         * debug-symfile.c
15969         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
15970         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
15971         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
15972
15973 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15974
15975         * object.c: special case string ctros in invoke.
15976         * gc.c: silly whitespace changes.
15977
15978 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
15979
15980         * threadpool.[ch]: impl. a threadpool that can
15981         be used by mint and mono.
15982
15983 2002-05-22  Martin Baulig  <martin@gnome.org>
15984
15985         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
15986         The first argument is now a `MonoReflectionModuleBuilder *', the return
15987         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
15988         `methods' field to get the method builder.  The `token' argument is the
15989         unfixed token.
15990
15991         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
15992         invalid characters instead of g_assert_not_reached()ing.  This seems
15993         to be the behaviour of mscorlib.
15994
15995 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
15996
15997         * object.c (mono_runtime_invoke_array): applied patch from Rachel
15998         Hestilow to fix bug #25104
15999
16000 2002-05-21  Martin Baulig  <martin@gnome.org>
16001
16002         * debug-symfile.c (mono_debug_find_source_location): New function.
16003         Looks up an IL offset in the line number table and returns the source
16004         location as a string.
16005
16006 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16007
16008         * icall.c:
16009         (mono_double_ToStringImpl): changed %f by %g until we have something
16010         better.
16011
16012 2002-05-21  Nick Drochak  <ndrochak@gol.com>
16013
16014         * icall.c : Use different name for Math.Pow's icall.  Needed to check
16015         parameters first in C#.
16016
16017 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16018
16019         * icall.c, reflection.h: added icall to get info about an event.
16020
16021 2002-05-20  Radek Doulik  <rodo@ximian.com>
16022
16023         * object.c (mono_value_box): don't use memcpy for boxing on BIG
16024         endian
16025         (mono_value_box): don't use memcpy for small sizes on
16026         architectures with unaligned access
16027
16028 2002-05-20  Martin Baulig  <martin@gnome.org>
16029
16030         * reflection.c (mono_reflection_setup_internal_class): Don't crash
16031         if `tb->parent == NULL'.
16032         (mono_reflection_create_internal_class): New function.  This is
16033         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
16034         for enum types.
16035
16036         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
16037         New interncall.
16038
16039 2002-05-19  Martin Baulig  <martin@gnome.org>
16040
16041         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
16042         argument to get the length, don't default to the array length.
16043
16044 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
16045
16046         * assembly.c (mono_assembly_setrootdir): New function used to
16047         override the MONO_ASSEMBLIES directory.
16048
16049 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16050
16051         * icall.c: ValueType_GetHashCode() initialize local var.
16052
16053 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16054
16055         * reflection.c: sort custom attributes table.
16056
16057 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16058
16059         * reflection.c: support named args in custom attributes (write support).
16060
16061 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16062
16063         * reflection.c: fix finally position calculation.
16064
16065 2002-05-15  Radek Doulik  <rodo@ximian.com>
16066
16067         * reflection.c: fixed endianess at many places
16068
16069         * icall.c (ves_icall_InitializeArray): comment out debug msg
16070
16071 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
16072
16073         * object.c (mono_unhandled_exception): new function to handle
16074         unhandled exceptions.
16075         (mono_unhandled_exception): call the UnhandledException event.
16076         (mono_runtime_delegate_invoke): impl.
16077
16078 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
16079
16080         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
16081         returns the RVA, not the direct pointer to the data. Handle the case
16082         when the class size is fixed.
16083
16084 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16085
16086         * reflection.c: fix some endianess issues.
16087
16088 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
16089
16090         * object.c (mono_runtime_invoke): is now able to catch exceptions.
16091
16092         * threads.c (mono_thread_init): added a callback which is invoked
16093         at thread start.
16094
16095 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
16096         
16097         * icall.c: make GetHashCode return non-negative values.
16098
16099 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
16100
16101         * object.c, icall.c, gc.c: revert to address-based hashcode.
16102
16103 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
16104
16105         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
16106
16107 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16108
16109         * icall.c, class.c: special case <Module>.
16110
16111 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
16112
16113         * icall.c: fix bug in GetNow().
16114
16115 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
16116
16117         * object.c (mono_runtime_class_init): make sure that we call all
16118         static class constructors.
16119
16120 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16121
16122         * reflection.c: sort methodsemantics table.
16123
16124 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16125
16126         * reflection.h, reflection.c: honour init locals setting.
16127
16128 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
16129
16130         * icall.c: copied Double ToStringImpl for Single ToStringImpl
16131
16132 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16133
16134         * reflection.c: support ContructorBuilders in attribute blob creation.
16135
16136 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16137
16138         * reflection.c: some changes to build a binary that can be run
16139         directly in windows.
16140
16141 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16142
16143         * loader.c: print a big message when an icall can't be found.
16144
16145 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16146
16147         * string-icalls.c: fix bug 24248.
16148
16149 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16150
16151         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
16152         icall.c, reflection.h: separate assembly loading by pathname and by
16153         assembly name. Use the MONO_PATH env var to search for assemblies.
16154
16155 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16156
16157         * assembly.c, image.h: add some support for assemblies
16158         with multiple modules.
16159         * class.c, class.h: export mono_class_from_typeref().
16160         * loader.c: remove duplicated code and use mono_class_from_typeref(),
16161         instead.
16162
16163 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16164
16165         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
16166         documentation says (the ECMA one is correct).
16167
16168 2002-05-02  Dick Porter  <dick@ximian.com>
16169
16170         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
16171         Don't name the synchronisation mutex.
16172
16173 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
16174
16175         * rand.c
16176         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
16177         Make the prototypes match.
16178         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
16179         Same.
16180
16181         * icall.c
16182         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
16183         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
16184         all systems have tm.tm_zone, so use strftime() with %Z to print
16185         the timezone abreviation into a temp string.
16186
16187         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
16188         rather than mono_array_addr() on a MonoString on Big Endian
16189         machines.
16190
16191 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
16192
16193         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
16194         fix bug 24041
16195
16196 2002-04-30  Dick Porter  <dick@ximian.com>
16197
16198         * socket-io.c: Cope with SOCKET being an integer rather than a
16199         pointer now.
16200
16201         * threads.c: Added Thread_free_internal, to deal with thread
16202         handle cleanup.  Moved calls to handle_store() and handle_remove()
16203         to start_wrapper(), so each can only be called once.  Allocate
16204         synchronisation blocks with GC_malloc(), and use GC finalisation
16205         to close the handles.
16206
16207         * icall.c: added System.Threading.Thread::Thread_free_internal
16208
16209 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16210
16211         * icall.c: support Environment.Exit, CommandLineArgs().
16212
16213 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16214
16215         * object.c, object.h: added mono_runtime_run_main () and
16216         mono_runtime_get_main_args () for use in System.Environment.
16217
16218 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16219
16220         * gc.c: fix thinko, enable actual finalization since the jit is now
16221         fixed.
16222
16223 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16224
16225         * gc.c, object.c: take into account that an object may be offset wrt the address
16226         returned by GC_malloc().
16227
16228 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16229
16230         * image.c: handle files without entries in the assembly table (modules).
16231
16232 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
16233
16234         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
16235         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
16236         allowed to be null when it's System.Object class setup.
16237
16238 2002-04-27  Martin Baulig  <martin@gnome.org>
16239
16240         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
16241         if `tb->parent == NULL' rather than crashing.
16242
16243 2002-04-28  Nick Drochak  <ndrochak@gol.com>
16244
16245         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
16246         calling acos() where asin() should have been called.
16247
16248 2002-04-26  Martin Baulig  <martin@gnome.org>
16249
16250         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
16251         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
16252         there's a subdirectory called `System', but we don't want to read that
16253         subdirectory as an assembly.
16254
16255 2002-04-25  Martin Baulig  <martin@gnome.org>
16256
16257         * debug-symfile.c: Reflect latest MonoString changes.
16258
16259 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16260
16261         * rand.c, rand.h: instance method icalls need to have an explicit
16262         this pointer as first argument in the C implementation.
16263
16264 2002-04-25  Nick Drochak <ndrochak@gol.com>
16265
16266         * icall.c: Fix typo in map for GetNonZeroBytes
16267
16268 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16269
16270         * string-icalls.c : String does now passes unit tests without any 
16271         errors, the following changes has been made:
16272         
16273         Implemented replace methods.
16274         Renaming of methods to (try) follow the standard.
16275         Fixed compare ordinal
16276         Made all memory allocated directly to function instead of via icall function.
16277         Small performance fix in is_in_array function
16278                         
16279  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
16280
16281         c (mono_string_Internal_ctor_charp_int_int):
16282         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
16283         sindex < 0, throw ArgumentOutOfRangeException instead of
16284         ArgumentNullException.
16285
16286         Added new check for length == 0, however
16287         I need to make it return String.Empty from the C code.
16288         
16289         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
16290         that calculate the length for us here.
16291         
16292         (mono_string_Internal_ctor_sbytep_int_int): Replaced
16293         mono_string_new_utf16 with mono_string_new, since value is utf8.
16294
16295 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16296
16297         * object.c: register the object for finalization if needed.
16298         Allocate one more char in the string for the terminating 0 char.
16299
16300 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16301
16302         * class.c, class.h, image.c: check if a type implemenst a destructor.
16303         Use the proper key for array class lookups.
16304         * icall.c: register the icalls in the System.GC class.
16305         * gc.c, gc.h: GC-related functions and icalls.
16306
16307 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16308
16309         * icall.c:
16310         * socket-io.c:
16311         * unicode.c: free some strings gotten from mono_string_to_utf8 and
16312         changed a couple of free () by g_free ().
16313
16314         * decimal.c: one-liner in the comments for decimal2string ().
16315
16316 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16317
16318         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
16319
16320 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16321
16322         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
16323         * object.c (mono_runtime_invoke_array) : handle null in params
16324
16325 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16326
16327         * string-icalls.c: fixed bug in split (one off bug)
16328
16329 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16330
16331         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
16332         * icalls.c: added String::Equals as internal method
16333
16334 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16335
16336         * threads.c: fixed bug in the double interlocked functions
16337
16338 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
16339
16340         * threads.c: implemented all of the new interlocked icalls.
16341         * string-icalls.c: fix a bug in insert.
16342         * icalls.c: added the icalls for interlocked, removed old string functions.
16343         
16344 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16345
16346         * loader.c: fix off-by-one error when reading argument names.
16347
16348 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16349
16350         * profiler.c: win32 counter implementation (untested).
16351         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
16352         (the latter needs testing and more complete impl. from win32 folks).
16353
16354 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
16355
16356         * object.c: mono_array_new_full workaround mono_array_class_get
16357         problem.
16358
16359 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16360
16361         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
16362         * object.h (mono_string_chars): Changed casting type.
16363
16364 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16365
16366         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
16367                            method signatures to use gunichar2 instead of gint16.
16368
16369 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
16370
16371         * object.h, object.c: domain-specific versions of mono_object_new and
16372         mono_array_new.
16373
16374 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
16375
16376         * object.c: changed String layout
16377
16378         * string-icalls.c (mono_string_Internal_ctor_chara): added
16379         internal string constructors.
16380
16381 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
16382
16383         * threads.c: pass 'this' to the thread start routine.
16384
16385 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16386
16387         * string-icalls.c: fix IndexOf and LastIndexOf. Now
16388         InternalCompareStr don't call twice mono_string_cmp_char for the last
16389         character. Improved performance in mono_string_cmp_char.
16390
16391 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16392
16393         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
16394         code into its own library: libmonoruntime.
16395
16396 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
16397
16398         * object.h, object.c: changed array format so that szarrays do not
16399         require a bounds structure.
16400         * icall.c, appdomain.c: support for new szarray format.
16401
16402 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16403
16404         * metadata.c: compare also the retuns type when comparing signatures:
16405         we didn't do this as an optimization since really overloaded methods
16406         must differ also in the arguments, but this doesn't work with
16407         low-level IL code (or when using explicit conversion operators: see
16408         bug#23498 for an example).
16409
16410 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16411
16412         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
16413
16414 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16415
16416         * icall.c: make MonoType::GetElementType its own icall.
16417
16418 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16419
16420         * icall.c: remove MonoMethod_get_Name().
16421         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
16422         object.
16423
16424 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16425
16426         * string-icalls.c: optimized a few methods.
16427
16428 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16429
16430         * icall.c: added all new string internal calls
16431         * string-icalls.c: added, new string internal call implementation.
16432         * object.c: added mono_string_new_size for allocating a string a size
16433
16434 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
16435
16436         * object.c (mono_object_isinst): use the same code as in the
16437         optimized x86 version.
16438
16439 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16440
16441         * profiler.c: TSC-based timer code (faster and more accurate).
16442         Not hooked up in configure, yet (set USE_X86TSC to 1).
16443
16444 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
16445
16446         * profiler.c, profiler.h: track time spent compiling methods.
16447         * threads.c: track thread creation/destruction.
16448
16449 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
16450
16451         * profiler.c, profiler.h, profiler-private.h: profiling interface
16452         and sample implementation. Moved here so that it can be used also by
16453         the jit.
16454
16455 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
16456
16457         * reflection.c, reflection.h: keep types and other handles separate in
16458         the hash tables for referred tokens. Add guid for modules.
16459
16460 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16461
16462         * assembly.c: fix bugs found with valgrind.
16463         * metadata.h, metadata.c: added mono_metadata_guid_heap().
16464
16465 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
16466
16467         * threads: added icall support for getting current domain for
16468                    the thread.
16469  
16470 2002-04-13  Martin Baulig  <martin@gnome.org>
16471
16472         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
16473         (MonoDebugVarInfo): Added `index' field for register based addresses.
16474         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
16475         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
16476         `MonoDebugVarInfo *params' and `guint32 this_offset' with
16477         `MonoDebugVarInfo *this_var'.
16478
16479         * debug-symfile.c (relocate_variable): New static function to write
16480         a location description for a local variable or method parameter.
16481
16482 2002-04-12  Martin Baulig  <martin@gnome.org>
16483
16484         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
16485         stack offset and begin/end scope address of a local variable.
16486         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
16487         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
16488         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
16489
16490         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
16491         Added new relocation types for start/end scope of a local variable.
16492
16493 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16494
16495         * object.h: add mono_object_domain() macro.
16496         * reflection.c: handle typespecs.
16497         * icall.c: MonoMethod::get_Name() implementation.
16498
16499 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16500
16501         * icall.c: String::GetHashCode() icall implementation.
16502
16503 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16504
16505         * icall.c: String::IndexOfAny icall.
16506         * object.c, object.h: make array->max_length more useful.
16507         Intrduced mono_object_class() and mono_string_length() macros.
16508
16509 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16510
16511         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
16512         instead of g_unichar_isdigit.
16513
16514 2002-04-11  Nick Drochak  <ndrochak@gol.com>
16515
16516         * icall.c: Implement a simple Double.ToString().
16517
16518 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16519
16520         * appdomain.h: only io-layer.h is supposed to be included.
16521         * icall.c: explicitly import environ. Fix warning.
16522
16523 2002-04-10  Nick Drochak  <ndrochak@gol.com>
16524
16525         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
16526                 return true even if it's not Daylight Savings time.
16527                 Only return false for the case where the function isn't
16528                 implemented for a plaform (read Windows).
16529
16530 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16531
16532         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
16533         data with a mutex.
16534
16535 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
16536
16537         * mempool.c (mono_mempool_alloc): only use g_malloc when
16538         absolutely necessary.
16539
16540 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
16541
16542         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
16543
16544         * class.c (mono_class_vtable): use domain mempool to allocate vtable
16545         (mono_class_proxy_vtable): use domain mempool
16546
16547 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16548
16549         * appdomain.h, appdomain.c: split initialization that requires the
16550         execution engine support into mono_runtime_init().
16551
16552 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
16553
16554         * class.c (mono_class_init): don't include vtable inside MonoClass
16555         to save some memory, gather some statistics.
16556         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
16557
16558 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16559
16560         * icall.c: internalcall implementation for ValueType.Equals().
16561
16562 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
16563
16564         * object.c (mono_message_init): moved 
16565         (mono_runtime_exec_main): new arch. independent impl.
16566         (mono_runtime_invoke_array): new method - like
16567         mono_runtime_invoke, but you can pass an array of objects.
16568         (mono_remoting_invoke): new arch. independent impl.
16569         (mono_message_invoke): new arch. independent impl.
16570         (mono_runtime_class_init): new arch. independent impl.
16571         (mono_runtime_object_init): new arch. independent impl.
16572
16573 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16574
16575         * metadata.c, object.c, reflection.c: documented the exported
16576         functions.
16577
16578 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16579
16580         * icall.c: simpler code to pass the assembly builder data to corlib.
16581         Implement GetNestedTypes() internalcall.
16582
16583 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16584
16585         * class.c: warn if a type can't be loaded.
16586
16587 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
16588
16589         * image.h: typedef MonoImageOpenStatus
16590         * types.h: removed unused file
16591         
16592 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
16593
16594         * icall.c: Enum_ToObject accepts enum value arguments.
16595
16596 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16597
16598         * class.c: move initialization of properties, events and nested
16599         classes, so that they happen for interfaces, too.
16600
16601 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16602
16603         * icall.c: cleanup some ugly casts in Array_SetValue*.
16604
16605 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16606
16607         * icall.c: the values array fro enums is of the correct type, now.
16608         Implement (correctly) getFullName instead of assQualifiedName for
16609         MonoType.
16610         * reflection.h, reflection.c: added mono_type_get_name ().
16611
16612 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16613
16614         * assembly.c, image.h: for each MonoImage, record from wich assembly
16615         it was loaded.
16616         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
16617         Make Type.Assembly work.
16618
16619 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
16620
16621         * debug-symfile.h: use char* instead of gpointer to avoid
16622         unnecessary casts.
16623
16624         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
16625
16626         * icall.c (ves_icall_InternalExecute): impl. FielSetter
16627         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
16628
16629 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
16630
16631         * icall.c (mono_message_init): impl. (code cleanup)
16632         (ves_icall_InternalExecute): impl. FieldGetter
16633
16634         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
16635         defined we call all (non-static)methods through the vtable. 
16636
16637 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
16638
16639         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
16640         finalizer even though the memory is still referenced (and the chunk of
16641         memory is not freed).
16642
16643 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
16644
16645         * assembly.c: fix brokeness.
16646
16647 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
16648
16649         * class.c: kill some warnings. Check explicit interface method
16650         implementation also without considering the namespace.
16651         Load also literal strings in static class data.
16652
16653 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
16654
16655         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
16656         (default_assembly_name_resolver): Make the resolver take the
16657         "base" directory where the assembly was originally defined, so we
16658         can load DLLs that are in the same directory as the assembly that
16659         is being referenced.
16660
16661 2002-03-28  Dick Porter  <dick@ximian.com>
16662
16663         * file-io.h: 
16664         * file-io.c:
16665         * socket-io.c: 
16666         * unicode.h: 
16667         * unicode.c: Warning cleanups
16668
16669 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
16670
16671         * object.h, reflection.h: use the correct type instead of MonoObject.
16672
16673 2002-03-28  Martin Baulig  <martin@gnome.org>
16674
16675         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
16676         (mono_debug_update_symbol_file): Initialize classes if necessary.
16677
16678 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
16679
16680         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
16681         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
16682
16683 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
16684
16685         * assembly.h: fix function prototype.
16686         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
16687         * mono-endian.h: use const cast.
16688
16689 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
16690
16691         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
16692
16693 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
16694
16695         * loader.c: don't assert when a typeref can't be loaded, give
16696         a chance to the runtime to trow an exception instead.
16697         * loader.h: fix warning.
16698
16699 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
16700
16701         * class.c (mono_class_proxy_vtable): added proxy support
16702
16703 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
16704
16705         * icall.c: removed last of PAL calls, added System.Environment
16706         * file-io.h, file-io.c: MonoIO implementation
16707         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
16708
16709 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
16710
16711         * appdomain.c: do not use the byte marker in ldstr table lookup.
16712         * debug-helpers.c: allow two ':' to separate class and method name.
16713         * object.c: allocate arrays bounds with the GC, too.
16714         * verify: add a few more checks.
16715
16716 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
16717
16718         * reflection.c: output also literal strings. Allocate parameter data
16719         with GC_malloc() (thanks, Martin, for catching this!).
16720
16721 2002-03-26  Martin Baulig  <martin@gnome.org>
16722
16723         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
16724         include the `this' offset in the `param_offsets'.
16725
16726 2002-03-25  Martin Baulig  <martin@gnome.org>
16727
16728         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
16729         mono_debug_get_class() function to get the classes. Added new
16730         relocation types for arrays and strings.
16731         (mono_debug_get_class): New static function to search in all
16732         referenced assemblies for a metadata token.
16733
16734         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
16735
16736 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
16737
16738         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
16739         hold gc-allocated objects. Make the string heap a stream like the
16740         others. Removed duplicated code when writing stream info.
16741         Added asserts to catch possible buffer overflows. Set the sorted map
16742         for tables that need sorting. Added some documentation.
16743
16744 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
16745
16746         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
16747         for interned strings and vtables.
16748
16749 2002-03-24  Martin Baulig  <martin@gnome.org>
16750
16751         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
16752         it in the array since it was created with g_slist_prepend().
16753
16754 2002-03-24  Martin Baulig  <martin@gnome.org>
16755
16756         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
16757         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
16758         (mono_debug_method_from_token): Renamed to
16759         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
16760         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
16761
16762         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
16763         relocation types.
16764
16765         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
16766
16767 2002-03-24  Martin Baulig  <martin@gnome.org>
16768
16769         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
16770         (mono_debug_method_from_token): New func.
16771
16772         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
16773         New interncall, calls mono_debug_local_type_from_signature().
16774         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
16775         calls mono_debug_method_from_token().
16776
16777 2002-03-23  Martin Baulig  <martin@gnome.org>
16778
16779         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
16780         specifies the number of bytes to be converted, not the array size.
16781         Return the number of chars, not the number of bytes.
16782         (ves_icall_iconv_get_chars): The `byteCount' argument
16783         specifies the number of bytes to be converted, not the array size.
16784
16785 2002-03-23  Martin Baulig  <martin@gnome.org>
16786
16787         * reflection.h (MonoReflectionSigHelper): New type.
16788
16789         * reflection.c (mono_reflection_sighelper_get_signature_local),
16790         (mono_reflection_sighelper_get_signature_local): New functions.
16791
16792         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
16793         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
16794         interncalls.
16795
16796 2002-03-23  Martin Baulig  <martin@gnome.org>
16797
16798         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
16799         is_writeable is set.
16800         (mono_raw_buffer_update): New function to write the modified map
16801         back to disk.
16802
16803         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
16804
16805         * debug-symfile.c (mono_debug_update_symbol_file): Call
16806         mono_raw_buffer_update() when done writing.
16807
16808 2002-03-23  Martin Baulig  <martin@gnome.org>
16809
16810         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
16811
16812         * debug-symfile.c: Added support for arguments and local variables.
16813
16814 2002-03-23  Dick Porter  <dick@ximian.com>
16815
16816         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
16817         protected by ifdefs, hence breaking the w32 build.
16818
16819 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16820
16821         * object.c: implement is_interned() the right way.
16822
16823 2002-03-21  Martin Baulig  <martin@gnome.org>
16824
16825         * debug-symfile.[ch]: New files to handle debugging information
16826         files. There's also support to dynamically update these symbol
16827         files to include machine dependent information.
16828
16829 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
16830
16831         * threads.c (mono_thread_create): new function to create thread
16832         from C
16833
16834 2002-03-20  Martin Baulig  <martin@gnome.org>
16835
16836         * icall.c (ves_icall_InternalInvoke): Create a new object if the
16837         method is a constructor.
16838         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
16839         points to ves_icall_InternalInvoke().
16840
16841 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
16842
16843         * file-io.c: Flush shouldn't throw exceptions.
16844
16845 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
16846
16847         * file-io.c: FileStream flush support; FileSetLength now
16848         restores file pointer.
16849
16850 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
16851
16852         * class.c: set image for pointer classes.
16853
16854 2002/03/19  Nick Drochak <ndrochak@gol.com>
16855
16856         * sysmath.c: Forgot one.
16857
16858 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
16859
16860         * sysmath.c: Avoid redefining existing names.
16861
16862 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
16863
16864         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
16865         handled by runtime as icall rather than dllimport from libm.so
16866         * file-io.c, file-io.h: fixed handle argument type.
16867
16868 2002-03-18  Dick Porter  <dick@ximian.com>
16869
16870         * reflection.c (mono_image_get_type_info): rename interface to
16871         iface, because of "#define interface struct" on windows.
16872
16873 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
16874
16875         * class.c, class.h: rename and export mono_ptr_class_get().
16876         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
16877         * reflection.c, reflection.h, icall.c: better/saner type name
16878         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
16879         method signatures.
16880
16881 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
16882
16883         * class.c (mono_class_init): removed hardcoded GHC_SLOT
16884
16885         * icall.c (ves_icall_InternalInvoke): impl.
16886
16887 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16888
16889         * reflection.c: output the interface map table, too.
16890
16891 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
16892
16893         * class.c (class_compute_field_layout): separate computation of 
16894         static field layout
16895
16896 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
16897
16898         * icall.c: added System.Buffer support.
16899         * file-io.c: moved file icalls from PAL to FileStream.
16900
16901 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
16902
16903         * icall.c (ves_icall_System_Object_GetHashCode): impl.
16904
16905 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
16906
16907         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
16908
16909 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16910
16911         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
16912
16913 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
16914
16915         * debug-helpers.{c,h}: moved here from monograph some useful functions
16916         to locate a method by name/signature in a class or image. Included
16917         also a small and flexible IL disassembler.
16918
16919 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16920
16921         * reflection.c: fixup tokens in methods with small header size, too.
16922
16923 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
16924
16925         * object.c (mono_string_to_utf8): remove assert(!error), instead
16926         print a warning. 
16927
16928 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
16929
16930         * icall.c: update to the new mono_Array_class_get interface.
16931
16932 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
16933
16934         * appdomain.c, object.c: Boehm-GC enable.
16935         * icall.c: make get_data_chunk() support split data requests.
16936         Ensure a class is initialized in more cases. Return only the first
16937         property found in GetProperties() or the compiler gets confused. 
16938         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
16939         * reflection.h, reflection.c: add fixup mechanism for field and method
16940         tokens. Initialize assembly->typeref in a single place. Output
16941         properties after events. Support custom attributes for events, too.
16942         Typo fix for paramter custom attrs.
16943
16944 2002-03-07  Martin Baulig  <martin@gnome.org>
16945
16946         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
16947
16948 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
16949
16950         * class.c (mono_array_class_get): fix. for multi. dim. arrays
16951
16952 2002-03-06  Martin Baulig  <martin@gnome.org>
16953
16954         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
16955         non-zero lower bounds. See testcases #F10-#F13.
16956
16957 2002-03-05  Martin Baulig  <martin@gnome.org>
16958
16959         * exception.c (mono_get_exception_argument_out_of_range): New exception.
16960
16961         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
16962         ves_icall_System_Array_GetValue(), only calculate the absolute array position
16963         here.
16964         (ves_icall_System_Array_SetValue): Likewise.
16965         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
16966         as argument and does the actual work. This function is used when copying a
16967         multi-dimensional array.
16968         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
16969         now do all the widening conversions of value types.
16970         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
16971
16972 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16973
16974         * class.c: remove some magic numbers and use the smbolic names,
16975         instead. Added init_events() to load event info at class init time.
16976         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
16977         and mono_metadata_methods_from_event().
16978         * reflection.h, reflection.c: added support for writing out the evnets
16979         related information.
16980
16981 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
16982
16983         * reflection.h, icall.c: use a different method (GetInterfaces)
16984         to gather interface info and add isbyref, isprimitive and
16985         ispointer to the ves_icall_get_type_info() return value.
16986
16987 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
16988
16989         * class.h: stared adding support for events.
16990         * icall.c: split find_members implementation. Added debug icall to get
16991         the address of an object.
16992         * reflection.c: handle TypeBuilders in mono_type_get_object().
16993
16994 2002-03-01  Martin Baulig  <martin@gnome.org>
16995
16996         * icall.c (ves_icall_System_Array_GetLength): This must throw an
16997         ArgumentOutOfRangeException(), not an ArgumentException().
16998         (ves_icall_System_Array_GetLowerBound): Likewise.
16999         (ves_icall_System_Array_GetValue): Improved argument checking.
17000         (ves_icall_System_Array_SetValue): Improved argument checking.
17001
17002 2002-03-01  Martin Baulig  <martin@gnome.org>
17003
17004         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
17005         called with invalid arguments rather than just dying with g_assert().
17006         (ves_icall_System_Array_SetValue): Likewise.
17007         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
17008         raise a NotImplementedException instead.
17009         (ves_icall_System_Array_GetLength): Added argument checking.
17010         (ves_icall_System_Array_GetLowerBound): Added argument checking.
17011
17012 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
17013
17014         * object.h (mono_assert): new macros mono_assert and
17015         mono_assert_not_reached
17016
17017 2002-02-28  Martin Baulig  <martin@gnome.org>
17018
17019         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
17020         and "System::String::IsInterned" to "System::String::_IsInterned".
17021
17022 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
17023
17024         * icall.c: remove hacks for typebuilder. Added icall to create a
17025         modified type from a tybebuilder.
17026         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
17027         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
17028         to create a backing MonoClass for a TypeBuilder.
17029
17030 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17031
17032         * class.c, class.h: more refactoring of class init.
17033         Export mono_class_setup_mono_type() and mono_class_setup_parent().
17034
17035 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
17036
17037         * marshal.c, marshal.h: start of marshaling interface.
17038
17039 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17040
17041         * icall.c: fix order in assembly qualified name icall.
17042
17043 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17044
17045         * class.c: do not free str, since we store it in the hash table.
17046         * reflection.h: add label field to MonoILExceptionInfo.
17047         * reflection.c: handle references to more than one assembly. Handle
17048         case when there isn't a module created in the assembly.
17049
17050 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17051
17052         * class.c: Fix typo. Start refactoring of class init code.
17053
17054 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17055
17056         * appdomain.c: exit with 1 on error.
17057         * class.c: we already have the name in MonoClassField.
17058         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
17059         MonoStreamHeader instead of an offset of image->raw_metadata.
17060
17061 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
17062
17063         * appdomain.c (mono_init): Be even more descriptive about the error.
17064
17065 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
17066
17067         * appdomain.c: give the user an informative message when corlib can't
17068         be loaded.
17069
17070 2002-02-26  Martin Baulig  <martin@gnome.org>
17071
17072         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17073         New icall to get the time zone data.
17074
17075 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17076
17077         * reflection.c: set virtual and raw size of section correctly.
17078         * threads.c: transfer domain information to newly created threads.
17079
17080 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17081
17082         * class.c: when instancing a class in a domain, load the default
17083         vaules for static fields from the constant table. Fix System.Enum to
17084         not be an enum.
17085         * icall.c: implement Object::GetType() internalcall. Implemented
17086         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
17087         Fixed checking of binding flags in find_members().
17088         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
17089         * reflection.c: handle enumerations when writing to the constant
17090         table. Use a different object cache for types.
17091
17092
17093 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
17094
17095         * object.c (mono_object_isinst): fix for arrays
17096
17097         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
17098
17099 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17100
17101         * object.c: don't use mprotect ()  and fix intern pool hash table
17102         lookup for big endian systems.
17103
17104 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17105
17106         * icall.c: change type_is_subtype_of () signature.
17107
17108 2002-02-21  Mark Crichton  <crichton@gimp.org>
17109
17110         * rand.c, rand.h: Added random number generator for
17111         System.Security.Cryptography classes.
17112
17113         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
17114
17115         * icall.c: Added System.Security.Cryptography calls.
17116
17117 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17118
17119         * class.c, icall.c, metadata.c: better support for pointer types.
17120         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
17121         * reflection.c: Add support for getting custom attrs for properties
17122         and simplify some code.
17123
17124 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17125
17126         * icall.c: change getToken () and add custom attribute GetBlob()helper
17127         method.
17128         * reflection.h: add custom attrs array to the reflection builder structures.
17129         * reflection.c: encode and emit custom attributes for all the relevant
17130         reflection objects. Cache fieldref and methodref tokens. Change
17131         mono_image_create_token() interface to take a MonoDynamicAssembly.
17132         More complete custom attributes decoder. Load custom attributes for
17133         Assembly, Field, Method and Constructor objects, too. Make the
17134         returned array an Attribute[] one, not object[]. Added
17135         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
17136         custom attribute constructor.
17137
17138 2002-02-20  Dick Porter  <dick@ximian.com>
17139
17140         * icall.c:
17141         * rawbuffer.c:
17142         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
17143         problem code out for now).
17144
17145 2002-02-19  Radek Doulik  <rodo@ximian.com>
17146
17147         * object.c (mono_ldstr): use hash table to avoid multiple swapping
17148
17149 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
17150
17151         * icall.c: register the GetCustomAttributes method.
17152         * object.c, object.h: add mono_string_new_len ().
17153         * reflection.h, reflection.c: added mono_runtime_invoke(),
17154         mono_install_runtime_invoke(). Added
17155         mono_reflection_get_custom_attrs () to load custom attributes and
17156         create the attribute objects.
17157
17158 2002-02-19  Dick Porter  <dick@ximian.com>
17159         * threads-dummy-types.c:
17160         * threads-dummy-types.h:
17161         * threads-dummy.c:
17162         * threads-dummy.h:
17163         * threads-pthread-types.c:
17164         * threads-pthread-types.h:
17165         * threads-pthread.c:
17166         * threads-pthread.h:  Deleted obsolete files
17167
17168 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
17169
17170         * class.c (mono_class_vtable): runtime init the class when we
17171         allocate static class data.
17172
17173         * icall.c (ves_icall_System_Array_SetValue): check for null values.
17174
17175         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
17176         and String - but we will need generic marshalling support in the
17177         future. 
17178         (mono_init): set the domain name in a ms compatible way
17179
17180         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
17181         String[].
17182
17183 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
17184
17185         * object.c (mono_array_clone): use alloca() instead of g_malloc  
17186         for sizes
17187
17188         * appdomain.c (mono_domain_unload): impl.
17189
17190 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17191
17192         * appdomain.c, object.c: fix intern pool implementation.
17193         * class.c: fix alignment code.
17194
17195 2002-02-16  Radek Doulik  <rodo@ximian.com>
17196
17197         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
17198         and s2 > s1, just copy lower bytes to be compatible with little
17199         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
17200         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
17201
17202         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
17203         force big_endian to be 1 for big endian machines 
17204         (ves_icall_iconv_new_decoder): ditto
17205
17206 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
17207
17208         * socket-io.c (convert_sockopt_level_and_name): If the system
17209         doesn't define SOL_IP or SOL_TCP, get them by hand using
17210         getprotobyname() and caching the values (because this could be a
17211         slow operation).
17212         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
17213         Use the appropriate struct when the system does support it. Ie,
17214         not all systems have struct ip_mreqn so use struct ip_mreq when
17215         appropriate.
17216
17217 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
17218
17219         * reflection.c: handle finally clauses.
17220
17221 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
17222
17223         * socket-io.c: use g_snprintf() instead of snprintf.
17224
17225 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
17226
17227         * reflection.c (mono_param_get_objects): Cast second argument to
17228         mono_method_get_param_names to a const char** to silence the
17229         compiler warning.
17230
17231         * appdomain.c (mono_domain_assembly_open): Put parens around the
17232         truth statement in the for-loop.
17233
17234         * unicode.c (iconv_convert): Got rid of a compiler warning about
17235         int i being unused when the system has a new iconv.
17236         (iconv_get_length): Same.
17237
17238         * image.c (load_class_names): Cast the second argument to
17239         g_hash_table_insert() to char* to hush compiler warnings about the
17240         arg being a const.
17241         (mono_image_open): Same here.
17242
17243         * socket-io.c: Don't conditionally include sys/filio.h or
17244         sys/sockio.h here anymore since we now get them from
17245         io-layer/io-layer.h
17246         (inet_pton): If the system doesn't support inet_aton, implement
17247         using inet_addr and also #define INADDR_NONE if it isn't defined
17248         by the system.
17249
17250 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17251
17252         * metadata.c, metadata.h: added function to get packing and size info
17253         of a typedef.
17254         * reflection.h, reflection.c: handle field RVA data. Save info about
17255         the table layout if needed. Assign typedef indexes to all the types
17256         before dumping the info about them to avoid forward reference problems.
17257
17258 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
17259
17260         * socket-io.c (convert_sockopt_level_and_name): ifdef
17261         SO_ACCEPTCONN because it is not defined on my system (old debian)
17262
17263 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17264
17265         * opcode.c: use stddef.h to get NULL.
17266
17267 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
17268
17269         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
17270         for FIONBIO, FIONREAD and SIOCATMARK.
17271         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
17272         define INADDR_NONE and besides, inet_addr() is deprecated and
17273         should not be used. Use inet_pton() instead - it also has the
17274         added bonus that it can easily handle IPv6 addresses as well.
17275         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
17276
17277 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17278
17279         * decimal.c: remove _MSC_VER conditional.
17280
17281 2002-02-13  Dick Porter  <dick@ximian.com>
17282
17283         * socket-io.c: 
17284         * icall.c: Internal calls for Blocking, Select, Shutdown,
17285         GetSocketOption and SetSocketOption
17286
17287 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17288
17289         * assembly.cs: better resolver: use it instead of some kludgy
17290         code.
17291
17292 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
17293
17294         * reflection.c: the best way to speed-up the compiler is to avoid
17295         infinite loops.
17296
17297 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
17298
17299         * class.c (mono_class_vtable): changed the object layout
17300         (obj->vtable->class). 
17301         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
17302
17303 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17304
17305         * assembly.c: look for assemblies in the assembly dir, too.
17306
17307 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17308
17309         * class.c: fix thinko in mono_class_from_type().
17310
17311 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17312
17313         * exception.h, exception.c: added TypeLoadException.
17314         * object.h, object.c: added mono_array_clone ().
17315         * icall.c: handle throwOnError in AssemblyGetType().
17316         Added Array.Clone().
17317         * opcode.h, opcode.c: use a single value for the opcode val.
17318         Compile fix for non-gcc compilers.
17319
17320 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
17321
17322         * opcodes.c, opcodes.h: export interesting info about opcodes.
17323
17324 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
17325
17326         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
17327         icalls. 
17328
17329         * class.c (class_compute_field_layout): set element_class for enums
17330         (mono_class_create_from_typedef): set element_class for normal classes
17331
17332         * icall.c (ves_icall_System_Enum_get_value): impl.
17333
17334         * class.c (mono_class_create_from_typedef): do not set valuetype
17335         flag for System.ValueType and System.Enum
17336
17337 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
17338
17339         * unicode.c (iconv_convert): fix big endian problem.
17340
17341 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17342
17343         * class.c: add asserts if we are ever going to scribble over memory.
17344         * socket-io.c: not all systems have AF_IRDA defined.
17345
17346 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
17347
17348         * class.c (class_compute_field_layout): do not consider static
17349         fields to compute alignment
17350
17351 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
17352
17353         * appdomain.c (mono_appdomain_get): impl.
17354         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
17355
17356 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17357
17358         * icall.c: ignore "file://" prefix when loading an assembly.
17359
17360 2002-01-23  Dick Porter  <dick@ximian.com>
17361
17362         * socket-io.c:
17363         * icall.c:
17364         * Makefile.am: Added socket support
17365
17366 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
17367
17368         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
17369         code back.  This should return the assemblies that are loaded by
17370         the runtime on behalf of an application domain. 
17371
17372         The current implementation is still broken, it just returns every
17373         assembly loaded, but until we get real applications domain this
17374         will do.
17375
17376 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
17377
17378         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
17379         AppDomain object.
17380
17381 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
17382
17383         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
17384         the mono_class_from_name lookup.
17385         (ves_icall_get_parameter_info): ditto.
17386         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
17387         method.
17388         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
17389
17390 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
17391
17392         * class.c: load also nested classes on class init.
17393         System.ValueType instance methods gets passed boxed
17394         values, unless methods in derived classed that get a pointer to the
17395         data.
17396         * icall.c: use better name parsing code in GetType().
17397         * image.c, image.h: add mono_image_loaded ().
17398         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
17399         * reflection.c, reflection.h: added mono_reflection_parse_type().
17400
17401 2002-01-22  Veronica De Santis <veron78@interfree.it>
17402
17403         * icall.c : Added mapping of internal calls for Manual and Auto reset events
17404         * threads.c : Added the implementation of internal calls for events
17405         * threads.h : Added prototypes of internal calls for events
17406         
17407 2002-01-21  Radek Doulik  <rodo@ximian.com>
17408
17409         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
17410
17411 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
17412
17413         * class.c (mono_class_init): set min_align to 1 (instead of 0)
17414         (mono_class_value_size): use min_align
17415
17416 2002-01-20  Dick Porter  <dick@ximian.com>
17417
17418         * threads.h:
17419         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
17420         so it compiles on w32.
17421
17422 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
17423
17424         * metadata.c (mono_type_stack_size): impl.
17425
17426         * class.c (mono_class_get_field): impl. memberref token
17427
17428 2002-01-16 Veronica De Santis <veron78@@interfree.it>
17429
17430         * icall.h : Added the internal calls mapping for CreateMutex_internal
17431                     and ReleaseMutex_internal.
17432         * threads.h : Added the prototype of mutexes internal calls.
17433         * threads.c : Added the implementations of mutexes internal calls.
17434
17435 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17436
17437         * metaparse.h: removed unused file.
17438         * reflection.c, reflection.h: added stream_data_align () function 
17439         to align data in streams and keep stream aligned. Add support for
17440         exception support in method headers.
17441
17442 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
17443
17444         * unicode.c: make iconv_convert () return the number of bytess written
17445         in the output buffer.
17446
17447 2002-01-15  Dick Porter  <dick@ximian.com>
17448         * threads.c: Make the runtime's idea of infinite timeouts coincide
17449         with the class library's
17450
17451         Fix a particularly egregious bug in mono_thread_cleanup(). That
17452         code was so utterly bogus it must have been written on a Monday.
17453
17454 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17455
17456         * reflection.h: add subtypes field to TypeBuilder.
17457         * reflection.c: encode constants for literal fields.
17458         Handle subtypes. Fix user string token (and add a zero byte)
17459         at the end.
17460         
17461 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
17462
17463         * class.c (mono_class_init): bug fix: assign slot numbers for
17464         abstract methods.
17465
17466 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17467
17468         * reflection.c: don't try to output a code RVA for abstract methods.
17469         Small fixes for method header format. Output parameter info to the
17470         ParamDef table. Save method overriding info to MethodImpl table.
17471         Fix property support. Allow typedef.extends to be a type in the
17472         building assembly.
17473         * verify.c: fix off-by-one error.
17474
17475 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
17476
17477         * class.c: fix mono_class_from_mono_type () for szarray types.
17478         Remove unused cache check in mono_class_from_type_spec().
17479         * icall.c: *type_from_name () functions handle simple arrays and byref.
17480         * reflection.c: handle byref and szarray types. Handle methods without
17481         body (gets P/Invoke compilation working). Handle types and fields in
17482         get_token ().
17483         * reflection.h: add rank to MonoTypeInfo.
17484
17485 2002-01-10  Dick Porter  <dick@ximian.com>
17486
17487         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
17488         internal calls
17489
17490 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17491
17492         * icall.c: initialize class in type_from_handle ().
17493         Loop also in parent classes for get_method ().
17494         * reflection.c: properly encode class and valuetype types.
17495         Start on encoding TypeBuilder types. Handle fieldrefs.
17496         Use correct length when registering a user string.
17497         Handle ConstructorBuilder and MonoMethod in get_token ().
17498         Make mono_type_get_object () aware of cached types.
17499         * object.c: back out change to mono_string_new ().
17500
17501 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
17502         * object.c: mono_string_new should return a NULL when the string 
17503         passed in is NULL -- not try to deference it.
17504         
17505 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17506
17507         * icall.c: hack to make IsSubType work for TypeBuilders.
17508         * reflection.c: emit constructors before methods.
17509         Retrieve param names in mono_param_get_objects().
17510
17511 2002/01/05  Nick Drochak  <ndrochak@gol.com>
17512
17513         * Makefile.am: fix list of headers and sources so automake 1.5
17514         doesn't complain. Removed \# at end of list.
17515
17516 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17517
17518         * reflection.c: get token for a method ref. Set return type of
17519         constructor to void.
17520         * loader.c: debug message.
17521         * class.c: typo fix.
17522
17523 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
17524
17525         * icall.c: fix array init with rank > 1. FindMembers
17526         loops in parent class as well.
17527         * image.c: do not insert nested types in name cache.
17528         * reflection.c: warning fix.
17529         * reflection.h: add override method (for interface impl).
17530
17531 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
17532
17533         * metadata.c: fix customattr decoding.
17534
17535 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
17536
17537         * rawbuffer.cs: Added native Win32 implementation, avoids using
17538         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
17539
17540 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
17541
17542         * class.c: make the low-level routines handle the cache.
17543
17544 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
17545
17546         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
17547
17548 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
17549
17550         * class.c: fix mono_array_element_size() for objects.
17551         * class.h, class.c: add properties to MonoClass and load them
17552         at init time.
17553         * icall.c: check with isinst() when assigning a value to an array
17554         instead of requiring the classes to match exactly.
17555         Implemented icall for System.Type::GetType().
17556         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
17557         enums. Handle bindingflags when looking for methods and fields.
17558         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
17559         and mono_metadata_methods_from_property().
17560         * reflection.h, reflection.c: added structures for propreties,
17561         parameters and enums. Implemented mono_property_get_object() and
17562         mono_param_get_objects().
17563
17564 2001-12-18  Dick Porter  <dick@ximian.com>
17565
17566         * file-io.c: Use mono_string_to_utf16() instead of
17567         mono_string_chars()
17568
17569         * object.c: Added mono_string_to_utf16(), which copies the non
17570         NULL-terminated MonoString into a new double-null-terminated
17571         buffer.
17572
17573 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
17574
17575         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
17576
17577 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
17578
17579         * file-io.c: raise exceptions if handle is invalid.
17580
17581 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
17582
17583         * assembly.c: yet another check for mscorlib.
17584         * class.c, class.h: load nesting info for classes.
17585         * icall.c: many new functions to support the Reflection classes.
17586         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
17587         * reflection.h, reflection.c: mono_image_create_token(),
17588         mono_assembly_get_object(), mono_type_get_object(),
17589         mono_method_get_object(), mono_field_get_object(): methods to return
17590         objects that parallel the C representation of assemblies, types,
17591         methods, fields.
17592
17593 2001-12-11  Dick Porter  <dick@ximian.com>
17594
17595         * icall.c:
17596         * file-io.c: Internal calls for file IO.
17597
17598 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
17599
17600         * tabledefs.h: missing FileAttributes.
17601         * verify.h, verify.c: use is_valid_string () to simplify and check for
17602         valid strings more correctly. Fix warnings and speeling.
17603         Check more tables: Filed, File, ModuleRef, StandAloneSig.
17604         Check code: branches, maxstack, method calls.
17605
17606 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
17607
17608         * object.c (mono_object_allocate): removed static, so that the jit
17609         can allocate value types.
17610
17611         * icall.c (ves_icall_System_DateTime_GetNow): impl.
17612
17613 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17614
17615         * class.c: init enum types right away and register the
17616         token->MonoClass map in mono_class_create_from_typedef ().
17617         * verify.h, verify.c: first cut of the verifier.
17618         * pedump.c: add --verify switch to verify metadata tables.
17619         * tabledefs.h: add some missing enums.
17620
17621 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
17622
17623         * class.c (mono_install_runtime_class_init): impl.
17624         (mono_class_init): renamed mono_class_metadata_init to
17625         mono_class_init, also removed the metadata_inited flag
17626
17627         * object.c (mono_object_isinst): use faster algorithm
17628
17629 2001-11-30  Radek Doulik  <rodo@ximian.com>
17630
17631         * mono-endian.h: reverted last change
17632         added function prototypes
17633
17634         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
17635         add mono-endian.c back
17636
17637         * mono-endian.c: returned back, as Paolo pointed out, it's needed
17638         for unaligned access, I've mistaked it with endianess. I am
17639         sorry.
17640         (mono_read16): fix reverted endianess
17641         (mono_read64): ditto
17642         (mono_read32): ditto
17643
17644 2001-11-30  Dick Porter  <dick@ximian.com>
17645
17646         * exception.c: Implement mono_exception_from_name()
17647
17648 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
17649
17650         * metadata.h, metadata.c: remove params_size and locals_size and their
17651         calculation from the metadata code: they are only usefult to the
17652         interp.
17653
17654 2001-11-29  Radek Doulik  <rodo@ximian.com>
17655
17656         * object.c (mono_ldstr): swap bytes here, it's probably not the
17657         best place, but works for me now, I'll redo it once I know mono
17658         better, also note that I add PROT_WRITE and don't reset back, also
17659         note that it's only affects big endians, so x86 should be OK
17660
17661         * mono-endian.h (read16): use just glib macros for both endians
17662
17663         * mono-endian.c: removed as glib macros are used in in
17664         mono-endian.h so we don't need to care about endianess for read
17665         macros as glib does that for us already
17666
17667 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
17668
17669         * class.h, class.h: take minimum alignment into consideration so
17670         that the fields of a class remain aligned also when in an array.
17671
17672 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17673
17674         * loader.h, loader.c: add mono_method_get_param_names().
17675         * class.c: 0-init class fields.
17676
17677 2001-11-26  Dick Porter  <dick@ximian.com>
17678
17679         * icall.c:
17680         * threads-types.h:
17681         * threads.c: New file that handles System.Threading on all platforms
17682
17683         * object.c: 
17684         * object.h: Remove the synchronisation struct from MonoObject,
17685         replace it with a pointer that gets initialised on demand
17686
17687         * Makefile.am: Replace all the system-specific threading code with
17688         a single file that uses the new wrapper library
17689
17690 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
17691
17692         * class.c, class.h: add mono_install_trampoline() so that the runtime
17693         can register a function to create a trampoline: removes the ugly
17694         requirement that a runtime needed to export arch_create_jit_trampoline.
17695         * object.h, object.c: added mono_install_handler() so that the runtime
17696         can install an handler for exceptions generated in C code (with
17697         mono_raise_exception()). Added C struct for System.Delegate.
17698         * pedump.c: removed arch_create_jit_trampoline.
17699         * reflection.c: some cleanups to allow registering user strings and
17700         later getting a token for methodrefs and fieldrefs before the assembly
17701         is built.
17702         * row-indexes.h: updates and fixes from the new ECMA specs.
17703
17704 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
17705
17706         * class.h, class.c: add enum_basetype field to MonoClass.
17707         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
17708         to get index in the constant table reated to a field, param or
17709         property.
17710         * reflection.h, reflection.c: handle constructors. Set public-key and
17711         version number of the built assembly to 0.
17712         * row-indexes.h: update from new ECMA spec.
17713
17714 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
17715
17716         * class.h, class.c: add a max_interface_id to MonoClass.
17717         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
17718         since it's used to do that. Added mono_type_type_from_obj().
17719         Make GetType() return NULL instead of segfaulting if the type was not
17720         found. Handle simple arrays in assQualifiedName.
17721         * object.h: add a struct to represent an Exception.
17722         * reflection.c: output call convention in method signature.
17723         Add code to support P/Invoke methods and fixed offsets for fields.
17724
17725 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
17726
17727         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
17728         the value.
17729         * icall.c: use mono_array_addr instead of array->vector: fixes the
17730         reflection image writing.
17731         * reflection.c: init call convention byte to 0 in method signature.
17732         Encode the property signature. Don't output property-related methods
17733         twice. Really process the properties for a type (don't cast a field to
17734         a property, my mom always told me that).
17735         Fix 64 bit issues in pointer alignment in a different and more
17736         readable way.
17737
17738 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
17739
17740         * loader.h: Removed type class from MonoDefaults, added monotype
17741
17742         * loader.c: Loaded MonoType, removed loading of Type
17743
17744         * icall.c (my_mono_new_object): Now returns a System.MonoType,
17745         and fills in System.Type._impl with a RuntimeTypeHandle rather
17746         than the actual MonoClass *
17747
17748         (ves_icall_type_from_handle): change from type_class to
17749         monotype_class
17750
17751         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
17752         implemented
17753
17754         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
17755         implemented
17756
17757         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
17758
17759         (ves_icall_System_Reflection_Assembly_GetType): implemented
17760
17761         (ves_icall_System_MonoType_assQualifiedName): implemented
17762
17763         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
17764
17765 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
17766
17767         * assembly.c (mono_assembly_open): Implement a cache for the
17768         assemblies. 
17769
17770         (mono_assembly_close): only destroy the assembly when the last
17771         reference is gone.
17772         
17773 2001-11-09  Dick Porter  <dick@ximian.com>
17774
17775         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
17776
17777 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
17778
17779         * class.c (mono_class_metadata_init): bug fix: compute the right slot
17780
17781 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
17782
17783         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
17784         from Martin Weindel.
17785         * object.h: add mono_string_chars ().
17786
17787 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
17788
17789         * reflection.c (build_compressed_metadata): Eliminates warnings
17790         and uses 64-bit clean code.
17791
17792         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
17793         (mono_type_equal): Change signature to eliminate warnings.
17794
17795 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
17796
17797         * icall.c, loader.c: remove the internalcall array constructors.
17798         Changes to match the new MonoArray structure.
17799         * object.h, object.c: an array object doesn't allocate an extra
17800         vector. Add mono_array_new_full () to create jagged arrays easily.
17801
17802 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
17803
17804         * metadata.h, metadata.c: add mono_metadata_field_info () to
17805         retreive all the info about a field from vairous tables.
17806         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
17807         * class.h, class.c: augment MonoClassField with more info.
17808         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
17809         policy and load a field's RVA if needed.
17810
17811 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
17812
17813         * class.c (mono_class_metadata_init): create a trampoline for all
17814         virtual functions instead of actually compiling them.
17815
17816 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
17817
17818         * class.h, class.c: include name in MonoClassField.
17819         * class.c: fix fundamental type of System.Object and System.String.
17820         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
17821         tokens in ldtoken.
17822         * icall.c: remove internalcalls for the Reflection stuff that is now
17823         done in C# code.
17824         * loader.c: mono_field_from_memberref () implementation.
17825         * mono-endian.c: thinko (s/struct/union/g).
17826         * object.c, object.h: make the mono_string_* prototypes actually use
17827         MonoString instead of MonoObject.
17828         * reflection.c, reflection.h: updates for changes in the reflection
17829         code in corlib: we use C structures that map to the actual C# classes.
17830         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
17831         fat method header if needed and use the info from the ILGenerator for
17832         methods. Handle fields in types. Misc fixes.
17833
17834 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
17835
17836         * class.c (mono_class_metadata_init): bug fix: always allocate
17837         space for static class data
17838
17839 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
17840
17841         * class.c (mono_compute_relative_numbering): use relative
17842         numbering to support fast runtime type checks.
17843
17844 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
17845
17846         * class.c (mono_class_create_from_typeref): added debugging output
17847         to print class name when MonoDummy is returned instead of real class
17848
17849 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
17850
17851         * class.c (mono_class_metadata_init): interface offset table now
17852         contains pointers into the vtable - this is more efficient for the jit
17853
17854 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
17855
17856         * class.c (mono_class_metadata_init): use a temporary vtable (the
17857         old algorithm only worked for the interpreter, but not for the jit)
17858
17859 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
17860
17861         * loader.c (method_from_memberref): use mono_class_get to get the
17862         class of an array instead of using System.Array directly.
17863         (mono_get_method): also add MEMBERREF methods to the method cache
17864         which usefull for arrays.
17865
17866 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
17867
17868         * pedump.c (arch_compile_method): added to compute vtable entry
17869
17870         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
17871         number of interfaces.
17872         
17873         * class.h: merged MonoArrayClass into MonoClass
17874
17875         * class.c (mono_class_create_from_typedef): compute the vtable size and
17876         allocate space to include the vtable inside MonoClass
17877         (mono_class_metadata_init): initialize the vtable
17878
17879 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
17880
17881         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
17882         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
17883         * image.c: endian fixes by Laurent Rioux.
17884         * object.h, object.c: rename MonoStringObject to MonoString and
17885         MonoArrayObject to MonoArray. Change some function names to conform to
17886         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
17887         guint16* as first argument, so don't use char*.
17888         Provide macros to do the interesting things on arrays in a portable way.
17889         * threads-pthread.c: updates for the API changes and #include <sched.h>
17890         (required for sched_yield()).
17891         * icall.c: updates for the API changes above.
17892         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
17893         platforms that need them.
17894
17895 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
17896
17897         * class.c: set the correct type for all the fundamental
17898         type when loading the class.
17899
17900 2001-10-05  Dick Porter  <dick@ximian.com>
17901
17902         * threads-pthread.c (pthread_mutex_timedlock): Simple
17903         compatibility version for C libraries that lack this call.
17904
17905 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17906
17907         * class.c: MonoTypes stored in MonoClass are stored as
17908         fundamental MonoTypes when the class represents a
17909         fundamental type (System.Int32, ...).
17910         The TypeHandle return by ldtoken is a MonoType*.
17911         * icall.c: ves_icall_get_data_chunk () write out all the
17912         PE/COFF stuff. Implement ves_icall_define_method (),
17913         ves_icall_set_method_body (), ves_icall_type_from_handle ().
17914         * image.c: properly skip unknown streams.
17915         * loader.h, loader.c: add type_class to mono_defaults.
17916         * metadata.c, metadata.h: export compute_size () as
17917         mono_metadata_compute_size () with a better interface.
17918         Typo and C&P fixes.
17919         * pedump.c: don't try to print the entry point RVA if there is no entry point.
17920         * reflection.c, reflection.h: many cleanups, fixes, output method
17921         signatures and headers, typedef and typeref info, compress the metadata
17922         tables, output all the heap streams, cli header etc.
17923         * row-indexes.h: typo fixes.
17924
17925 2001-10-04  Dick Porter  <dick@ximian.com>
17926
17927         * object.h: Add a synchronisation mutex struct to MonoObject
17928
17929         * object.c (mono_new_object): Initialise the object
17930         synchronisation mutexes
17931
17932         * icall.c: System.Threading.Monitor internal calls
17933         
17934         * threads-pthread.h:
17935         * threads-pthread.c: System.Threading.Monitor internal calls
17936
17937         * threads-types.h: New file, includes the system-specific thread
17938         structures
17939         
17940         * threads-pthread-types.h:
17941         * threads-pthread-types.c: New files, handle pthread-specific
17942         synchronisation types
17943
17944         * threads-dummy-types.h: 
17945         * threads-dummy-types.c: New files of dummy support for
17946         thread-specific types
17947
17948         * metadata.c:
17949         * image.c:
17950         * pedump.c: include mono-endian.h not endian.h
17951         
17952         * Makefile.am: More threads files.
17953         Name mono-endian.h not endian.h
17954
17955 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
17956
17957         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
17958         stuff and implement a few more bits.
17959         * icall.c: a field needs to be dereferenced twice. Do not use the same
17960         name for two variables in the same scope.
17961         * image.c, image.h: cleanups.
17962
17963 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
17964
17965         * class.c (mono_class_metadata_init): bug fix: compute the right size
17966
17967 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
17968
17969         * icall.c: implemented some of the Reflection internalcalls.
17970         * image.c, image.h: start writing out the PE/COFF image.
17971         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
17972         that does the reverse than decode_blob_size ().
17973         * object.c: use mono_metadata_encode_value (). Move here
17974         temporary implementation of mono_string_to_utf8 ().
17975         * rawbuffer.c: make malloc_map static.
17976
17977 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17978
17979         * metadata.c: fix type comparison for arrays.
17980         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
17981         Added a couple of new classes to monodefaults.
17982         * icall.c: added a couple of Reflection-related internalcalls.
17983         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
17984         Added a byval_arg MonoType to MonoClass.
17985
17986 2001-09-28  Dick Porter  <dick@ximian.com>
17987
17988         * icall.c:
17989         * threads-pthread.h: 
17990         * threads-pthread.c: Implemented internal calls for
17991         LocalDataStoreSlot operations.  Applied mutexes around all shared
17992         data.  Reworked the thread creation and Start() operations to
17993         avoid a race condition.
17994         
17995         * threads-dummy.h:
17996         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
17997
17998 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
17999
18000         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
18001
18002 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
18003
18004         * class.c, loader.c: warn and return NULL instead of erroring out.
18005         * icall.c: added System.AppDomain::getCurDomain().
18006         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
18007
18008 2001-09-25  Dick Porter  <dick@ximian.com>
18009
18010         * threads-pthread.h:
18011         * threads-pthread.c: Implemented timed thread joining and added
18012         System.Threading.Thread::Join_internal internal call
18013
18014         * icall.c: Added System.Threading.Thread::Join_internal internal call
18015
18016         * threads-dummy.h:
18017         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
18018
18019 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
18020
18021         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
18022         mono_string_intern () to implement the semantics of the ldstr opcode
18023         and the interning of System.Strings.
18024         * icall.c: provide hooks to make String::IsIntern and String::Intern
18025         internalcalls.
18026
18027 2001-09-23  Dick Porter  <dick@ximian.com>
18028
18029         * threads-dummy.c: 
18030         * threads-dummy.h: New files of dummy threading routines
18031
18032         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
18033         support code based on system specifics
18034
18035         Rename PTHREAD_LIBS to THREAD_LIBS
18036         
18037 2001-09-23  Dick Porter  <dick@ximian.com>
18038
18039         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
18040         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
18041         internal calls.
18042         (mono_thread_init): Set up a Thread object instance to return when
18043         the main thread calls Thread.CurrentThread
18044         (mono_thread_cleanup): Wait for all subthreads to exit
18045
18046         * icall.c: New internal calls for System.Threading.Thread::Sleep
18047         (including Schedule) and CurrentThread
18048
18049         * threads.h: New file, to insulate thread-specific stuff from the
18050         rest of the code
18051
18052 2001-09-21  Dick Porter  <dick@ximian.com>
18053
18054         * threads-pthread.h: 
18055         * threads-pthread.c: New file, for handling pthreads-style
18056         threading support.  Start() now starts a new thread and executes
18057         the ThreadStart delegate instance.
18058
18059         * icall.c: Added the internalcall for
18060         System.Threading.Thread::Start_internal
18061
18062         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
18063
18064 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
18065
18066         * loader.c: work around the different signatures for delegates
18067         constructors csc generates in compiled code vs the ones compiled in mscorlib.
18068
18069 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18070
18071         * class.h, class.c: add mono_class_get_field_from_name ().
18072         * *: Fix C comments and other ANSI C issues.
18073
18074 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
18075
18076         * endian.h, assembly.c: fix some endianness issues.
18077
18078 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
18079
18080         * loader.h, load.c: add delegate_class to mono_defaults.
18081         Handle runtime provided methods in mono_get_method ().
18082
18083 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
18084
18085         * loader.c (mono_get_method): use pinvoke for internal call
18086
18087         * icall.c: use pinvoke for internal call
18088
18089         * loader.c (method_from_memberref): set the method name
18090
18091 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
18092
18093         * metadata.c: help the compiler generate better code for
18094         mono_class_from_mono_type ().
18095
18096 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
18097
18098         * class.c (mono_class_metadata_init): delayed computing of the
18099         class size to mono_class_metadata_init ()
18100
18101 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
18102
18103         * class.c, class.h: add an interfaces member to MonoClass.
18104         * image.c, image.h: add assembly_name field to MonoImage
18105         from the assembly table.
18106         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
18107
18108 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18109
18110         * class.c: Handle Array in mono_class_from_mono_type ().
18111         * metadata.c, pedump.c: some endian fixes.
18112
18113 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18114
18115         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
18116         * metadata.c: fix small problem introduced with the latest commit.
18117
18118 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
18119
18120         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
18121         We don't need a MonoMetadata pointer anymore to compare signatures in
18122         mono_metadata_signature_equal (), update callers.
18123         Reduced memory usage an number of allocations for MonoMethodHeader and
18124         MonoMethodSignature.
18125
18126 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
18127
18128         * metadata.c: added compare for szarray.
18129
18130 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
18131
18132         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
18133         and add a couple more types to it and mono_defaults. Give an hint on
18134         classes that need implementing in our corlib and are referenced
18135         in mscorlib.
18136
18137 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
18138
18139         * class.h, class.c: keep track if a class is also an Enum.
18140         * loader.c: Implement a couple more types for use in libffi
18141         marshalling. Gives better diagnostics when failing to dlopen
18142         a library. Set method->klass for P/Invoke methods, too.
18143
18144 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
18145
18146         * class.c, class.h: add a MonoType this_arg to MonoClass that
18147         represents a pointer to an object of the class' type that
18148         can be used by the interpreter and later the type cache.
18149         Add best guess alignment info for valuetype objects.
18150
18151 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
18152
18153         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
18154         into MonoType: one less level of indirection and allocation and
18155         simplifies quite a bit of code. Added cache for MonoTypes that are
18156         used frequently, so that we don't need to allocate them all the time.
18157
18158 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
18159
18160         * class.c (mono_class_create_from_typedef): System.Enum is also a
18161         value type, although it does not derive from System.ValueType
18162         (maybe a bug in the ms compiler?)
18163
18164         * metadata.c (mono_type_size): return the right size for value types
18165
18166         * loader.c (mono_get_method): only initialize method header if not abstract
18167
18168         * class.c (mono_class_from_mono_type): use mono_default values. 
18169
18170 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
18171
18172         * *: use MonoClass pointers instead of <type_tokens>
18173         
18174         * class.h: new flag: metadata_inited.
18175
18176         * class.c (mono_class_metadata_init): impl.
18177         (mono_class_instance_size): impl.
18178         (mono_class_data_size): impl.
18179
18180 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18181
18182         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
18183         MonoClass now has the name and name_space fields. 
18184         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
18185         mono_get_method () takes and optional MonoClass as argument.
18186         Removed mono_typedef_from_name() and added mono_class_token_from_name()
18187         instead that takes advantage of a map from class names to typedef
18188         tokens in MonoImage.
18189
18190 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
18191
18192         * metadata.c: zero is not a valid alignment boundary.
18193         Merge MONO_TYPE_VOID in default decoding code.
18194
18195 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
18196
18197         * image.h: merged MonoMetadata into MonoImage
18198
18199         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
18200         identify the type of elements.
18201
18202 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
18203
18204         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
18205         * cil-coff.h: split MonoMSDOSHeader and add size info.
18206         * image.c: add some consistency checks.
18207         * metadata.c: fix row size computation: one programmer
18208         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
18209         add explanation for the locator routine.
18210         Fix decoding of size in method header.
18211         
18212 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
18213
18214         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
18215         (g_concat_dir_and_file): Bring g_concat_dir_and_file
18216         function from gnome-libs.  This uses the right path separator
18217         based on the OS, and also works around a bug in some systems where
18218         a double slash is not allowed. 
18219         (default_assembly_name_resolver): Use g_concat_dir_and_file
18220         (mono_assembly_open): ditto.
18221
18222 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
18223
18224         * metadata.c (mono_metadata_signature_equal): impl.
18225
18226         * *: void is now a realy MonoType (instead of using NULL)
18227         
18228         * metadata.c (do_mono_metadata_parse_type): use
18229         mono_metadata_parse_type to parse void value.
18230
18231 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
18232
18233         * metadata.c, metadata.h: in the signature and method header store
18234         only the space required for holding the loca vars and incoming arguments.
18235
18236 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
18237
18238         * metadata.c (do_mono_metadata_parse_type): treat void like any
18239         other type (instead of assigning NULL);
18240
18241 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
18242
18243         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
18244
18245 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
18246
18247         * image.c (do_mono_image_open): added a cache for arrays.
18248
18249 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18250
18251         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
18252         decode a single column from a row in a metadata table and changes
18253         to take advantage of it in the typedef locator (gives a nice speed up).
18254         Store offset info for function params.
18255
18256 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
18257
18258         * image.h (MONO_IMAGE_IS_CORLIB): removed 
18259
18260 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
18261
18262         * assembly.c: how could mono_assembly_close () had ever worked?
18263         * metadata.c, metadata.h: provide offset info for local vars.
18264         Implement mono_type_size () to take care of alignment as well
18265         as size (it was mono_field_type_size in cli/class.c before).
18266
18267 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
18268
18269         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
18270
18271         * assembly.h (CORLIB_NAME): set to corlib.dll
18272
18273         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
18274
18275 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18276
18277         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
18278         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
18279         tokentype.h: massive namespace cleanup.
18280
18281 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18282
18283         * metadata.h, metadata.c: decode exception clauses when parsing method header.
18284
18285 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
18286
18287         * metadata.c (mono_metadata_free_type): added check for type !=
18288         NULL (void) before calling mono_metadata_free_type()
18289
18290 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
18291
18292         * metadata.h, row_indexes.h: added header with enumerations to use
18293         to index in the columns from tables in metadata and to decode coded
18294         tokens: we should start using this instead of embedding magic numbers
18295         all over the code.
18296
18297 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
18298
18299         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
18300         Move metadata_t info from cli_image_info_t to MonoImage, where
18301         it's easily accessible. Changed all the uses accordingly.
18302         Added the method and class caches to MonoImage.
18303         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
18304         and mono_metadata_decode_value () signature to be more consistent
18305         with the other parse functions (and simplify code). Taken advantage
18306         of zero-length array allocation with GCC. Removed reduntant (and
18307         wrong) MonoFieldType struct and use MonoParam instead. Changed
18308         mono_metadata_parse_field_type () to use common code for parsing.
18309         Added mono_metadata_typedef_from_field () and
18310         mono_metadata_typedef_from_method () to lookup a typedef index from a
18311         field or method token.
18312         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
18313
18314 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
18315
18316         * metadata.c (mono_metadata_parse_field_type): Implement. 
18317         (do_mono_metadata_parse_type): Split engine from
18318         mono_metadata_parse_type, so that we can create smaller structures
18319         for things that just have one pointer to the MonoType (look at
18320         the MonoFieldType)
18321
18322 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
18323
18324         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
18325         as Jan Gray found out, it is incorrect. 
18326
18327 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
18328
18329         * assembly.c: Implement asssembly loading.  This loads an image
18330         and loads all the referenced assemblies.  Come to think of it, we
18331         could always do lazy loading of the assemblies. 
18332
18333         * image.c (mono_image_open): Keep loaded images in a hashtable.
18334
18335         * image.h (MonoImage): Add reference count.
18336
18337 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
18338
18339         * assembly.c (mono_assembly_open): Keep track of the file name in
18340         case the assembly has no ASSEMBLY table.
18341
18342         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
18343         from get.c here.
18344
18345 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
18346
18347         * metadata.c, metadata.h: decode local vars in method header
18348         parse function. Change callers accordingly.
18349
18350 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
18351
18352         * metadata.h, cil-coff.h: protect against multiple inclusion.
18353         Added some new structures to hold information decoded from metadata:
18354         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
18355         and relevant decoding/free functions.
18356         * metadata.c: implement decoding functions. Add warning for out of bounds
18357         index in mono_metadata_locate(). Implement mono_get_method () to retreive
18358         all the info about a method signature and invocation. Remove check on
18359         uninitialized local var in parse_mh() and fix memory leak.
18360
18361 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
18362
18363         * metadata.h: More macros.
18364
18365         * tokentype.h: New file.
18366
18367 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
18368
18369         * assembly.c: added a consistency check and initialize
18370         some structures with g_new0().
18371         * metadata.c: fixed a couple more bugs in table size computation
18372         and add other checks for out-of bound access to metadata.
18373
18374 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
18375
18376         * metatada.c: fix bugs computing table sizes. Spew a
18377         warning when index in string heap is out of bounds.
18378
18379 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
18380
18381         * metadata.h: Add a couple of macros to manipulate tokens. 
18382
18383 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18384
18385         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
18386         cli_section_tables).
18387
18388 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
18389
18390         * metadata.c (mono_metadata_user_string): New function, provides
18391         access to the UserString heap. 
18392
18393 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
18394
18395         * metadata.c: Add inline documentation.
18396
18397 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
18398
18399         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
18400         files. 
18401
18402 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
18403
18404         * typeattr.h: New file, TypeAttribute flags. 
18405
18406 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
18407
18408         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
18409         mono_assembly_ensure_section): Section loading code.
18410         (load_section_tables): Load the sections.
18411
18412         * mono/metadata/metadata.c (mono_metadata_locate_token,
18413         mono_metadata_locate): Functions to locate the information
18414         definition given a token or a table and an index.
18415         (mono_metadata_compute_table_bases): New.
18416         (compute_size): New function to compute the sizes of the various
18417         tables.
18418
18419         * mono/metadata/metadata.h: Finish listing the different index
18420         types. 
18421
18422         * mono/metadata/pedump.c: Improve to dump new information.
18423
18424 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
18425
18426         * mono/metadata/metadata.c: Entered all the tables matching
18427         Beta2. 
18428
18429         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
18430
18431
18432