2005-09-26 Martin Baulig <martin@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1 2005-09-26  Martin Baulig  <martin@ximian.com>
2
3         * class.c
4         (mono_class_from_generic_parameter): Set `klass->generic_container'
5         (mono_class_from_generic_parameter): Likewise.
6         (mono_bounded_array_class_get): We inherit the generic container
7         from the element class.
8
9         * loader.c
10         (find_method, find_method_in_class): Take a `MonoGenericContext *'
11         argument rather than computing it here.
12         (method_from_memberref): Correctly set the generic context before
13         parsing the signature.  Fixes #75681.
14
15 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
16
17         * object.c (mono_class_has_special_static_fields): Fix warnings.
18
19 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
20
21         * assembly.c: Add parse_public_key function, to
22         par the public keys. Also added mono_assembly_name_parse_full,
23         to define it the parsed key should be freed or not.
24         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
25         to parse a long format assembly name.
26         * metadata-internals.h: Keep mono_assembly_name_parse_full as
27         private, since calling it to preserve the key requires
28         freeing it manually.
29         
30 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
31
32         * locales.c : removed HAVE_ICU part.
33
34 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
35
36         * object.c (mono_class_create_runtime_vtable): Avoid calling 
37         field_is_special_static if the klass has no special static fields.
38
39         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
40         (MonoCachedClassInfo): Likewise.
41
42         * object.c (mono_class_has_special_static_fields): New helper function.
43
44 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
45
46         * class.c (mono_class_create_from_typedef): Don't call 
47         interfaces_from_typedef_full for enums.
48         (mono_class_create_from_typedef): Compute the base types of enums directly
49         without calling mono_class_setup_fields ().
50         (mono_class_find_enum_basetype): New helper function.
51
52         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
53         one place inside the string heap.
54         
55 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
56
57         * class.c: locking fixes, code cleanups, some docs added.
58         Allocate some data structures in the image mempool.
59
60 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
61
62         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
63         the example code.
64         
65 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
66
67         * class-internals.h, class.c, reflection.c: reduce memory taken by
68         MonoClass.
69
70 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
71
72         * metadata.c, metadata.h, loader.h: documentation updates, code and
73         API cleanups.
74
75 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
76
77         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
78         the example code.
79
80         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
81         page faults caused by the runtime while reading metadata.
82
83 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
84
85         * socket-io.c: the field names were changed 3 months ago and no one
86         realized until bug #76077 got filed!
87
88 2005-09-20  Martin Baulig  <martin@ximian.com>
89
90         * icall.c (assembly_icalls): Removed some unused debugger icalls.
91
92 2005-09-20  Martin Baulig  <martin@ximian.com>
93
94         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
95         write the rank into the class entry.
96
97 2005-09-20  Martin Baulig  <martin@ximian.com>
98
99         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
100
101 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
102
103         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
104
105         * icall.c (custom_attrs_defined_internal): New icall.
106
107         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
108         function.
109         (mono_custom_attrs_construct_by_type): New helper function.
110
111 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
112
113         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
114         terminate the resulting string. Fixes #76123.
115
116 2005-09-16  Martin Baulig  <martin@ximian.com>
117
118         * mono-debug.c
119         (mono_debug_add_method): Ignore inflated methods for the moment.
120
121 2005-09-14  Martin Baulig  <martin@ximian.com>
122
123         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
124
125 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
126
127         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
128         return a success/failure indication.
129         (mono_metadata_interfaces_from_typedef_full): Ditto.
130         (get_constraints): Ditto.
131
132 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
133
134         * marshal.c (emit_marshal_array): Fix handling of null arrays.
135         
136         * marshal.c (emit_marshal_array): Add support for returning string
137         arrays from delegates. Fixes #76063.
138
139         * marshal.c: Use the emit_ldloc/stloc macros where possible.
140
141 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
142
143         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
144         icall.
145
146 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
147
148         * reflection.c icall.c: Fix after mono_get_exception_type_load
149         signature change.
150
151         * assembly.c (mono_assembly_get_assemblyref): New helper function.
152         (mono_assembly_load_reference): Use the new helper.
153
154         * class-internals.h (MonoLoaderError): New structure containing 
155         information about type loading errors.
156
157         * class-internals.h loader.c: Add APIs to store per-thread loader
158         error information.
159
160         * loader.c class.c: Set the loader error if needed.
161
162         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
163
164 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
165
166         * decimal.c: fixed to handle the broken ARM fp format.
167
168 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
169
170         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
171         broken.
172
173 2005-09-06  Martin Baulig  <martin@ximian.com>
174
175         * domain.c (supported_runtimes): Added v2.0.50727.
176
177 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
178
179         * culture-info.h: reduce the size of some structures.
180
181 2005-09-05  Martin Baulig  <martin@ximian.com>
182
183         Reflect latest API changes in the August CTP.
184
185         * icall.c
186         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
187         ("MonoType.HasGenericArguments"): Removed.
188         ("MonoMethod.BindGenericParameters"): Renamed to
189         "MakeGenericMethod".
190         ("MethodBuilder.BindGenericParameters"): Renamed to
191         "MakeGenericMethod".    
192
193 2005-09-05  Martin Baulig  <martin@ximian.com>
194
195         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
196
197 2005-09-05  Martin Baulig  <martin@ximian.com>
198
199         Applying a patch from Michal Moskal <malekith@nemerle.org>.
200
201         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
202         generic_container is non-NULL.
203
204 2005-09-05  Martin Baulig  <martin@ximian.com>
205
206         Applying a patch from Michal Moskal <malekith@nemerle.org>.
207
208         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
209
210 2005-08-29  Michal Moskal  <malekith@nemerle.org>
211
212         * reflection.c (encode_locals,
213         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
214         for large generic types.
215
216 2005-09-05  Martin Baulig  <martin@ximian.com>
217
218         Applying a patch from Michal Moskal <malekith@nemerle.org>.
219
220         * class.c (mono_dup_array_type): New public method.
221         (mono_metadata_signature_deep_dup): New public method.
222         (dup_type): Correctly duplicate array and function types.
223
224 2005-09-05  Martin Baulig  <martin@ximian.com>
225
226         Applying a patch from Michal Moskal <malekith@nemerle.org>.
227
228         * reflection.c (get_default_param_value_blobs): Handle generic types
229         and generic methods.
230
231 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
232
233         * class.c: Fixed error reporting (method/class were inversed) for 
234         inheritance demands.
235         * security-manager.c|h: Added the AppDomain when calling the managed
236         System.Security.SecurityManager.InheritanceDemand method.
237
238 2005-09-01  Raja R Harinath  <rharinath@novell.com>
239
240         * reflection.c (encode_marshal_blob): 'marshaltype' and
241         'marshaltyperef' are alternate sources for the custom marshaler
242         name.
243
244 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
245
246         * class.c: fix creation of array classes with rank == 1
247         (patch by Ankit Jain <jankit@novell.com>).
248
249 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
250
251         * object.c: fix check for creating the bound data for arrays vs
252         szarrays.
253
254 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
255
256         * object.c: configuration file name is now based on the executable name,
257         not the image name. Fixes bug #75931.
258
259 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
260
261         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
262         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
263
264 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
265
266         * rand.c: Use wincrypt.h instead of WinCrypt.h.
267
268 2005-08-24  Ankit Jain  <jankit@novell.com>
269             Raja R Harinath  <rharinath@novell.com>
270
271         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
272           called by it recursively.
273           (mono_class_init): Remove special case in pending_init handling, since it's
274           superseded by the fix to mono_class_from_typeref.
275
276 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
277
278         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
279         BROKEN_THREAD_START stuff.
280
281 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
282
283         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
284         trampoline.
285
286         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
287         
288         * object.c (mono_delegate_ctor): Replace the original function address with
289         a delegate trampoline.
290
291 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
292
293         * icall.c: add boolean argument to base64_to_byte_array and 
294         InternalFromBase64String to control whether a whitespace-only string
295         is allowed (or should casue a FormatException to be thrown). We need
296         this as the behavior has changed between MS.NET 1.x and 2.0, and we
297         to match the MS behaviour in both profiles.
298         * appdomain.c: Bump corlib version.
299
300 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
301
302         This patch implements a big portion of publisher policy
303         support, used to bind assembly versions and redirect
304         one assembly from version A to version B.
305
306         * assembly.c:
307         New GSList loaded_assembly_bindings, for storing the cached
308         assembly bindings.
309         (assembly_binding_maps_name): New static function for checking if a 
310         assembly binding information maps an assembly name.
311         (mono_assembly_binding_info_free): New function for freeing
312         assembly binding information resources.
313         (get_publisher_policy_info): New static function for retrieving 
314         assembly binding information from a MonoImage.
315         (compare_versions): New static function for comparing an assembly
316         binding information data and the version of an assembly name.
317         (check_policy_versions): New static function for checking if an
318         assembly binding info mapping an assembly name is valid for it.
319         (mono_assembly_load_publisher_policy): New static function for
320         loading the 'policy.major.minor.MyAssembly' image for an assembly
321         with an assembly name 'aname'.
322         (mono_assembly_bind_version): New static function for updating
323         assembly redirection.
324         (mono_assembly_apply_binding): New static function for applying
325         assembly binding.
326         (search_binding_loaded): New static function for searching 
327         loaded assembly binding infos in the cache domain.
328         (mono_assembly_load_full): Don't apply assembly binding for
329         reflection only assemblies.
330
331         * metadata-internals.h: Add MonoAssemblyBindingInfo,
332         which contains information about assembly binding. Also
333         declare signature for mono_config_parse_publisher_policy ()
334         function, used to retrieve pub policy info.
335         
336         * mono-config.c:
337         (publisher_policy_start): New static function used to parse publisher 
338         policy config files.
339         (publisher_policy_parser): New static MonoParseHandler containing 
340         the functions used when parsing config files.
341         (mono_config_parse_publisher_policy): New function for parsing
342         publisher policy files.
343         
344 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
345
346         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
347
348         * marshal.c (mono_delegate_free_ftnptr): Ditto.
349
350         * object.c (mono_get_addr_from_ftnptr): New helper function.
351
352         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
353
354         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
355
356 2005-08-19  Dick Porter  <dick@ximian.com>
357
358         * threads.c, threads.h, appdomain.c, appdomain.h,
359         profiler-private.h, monitor.c, object.c, object-internals.h,
360         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
361         store the thread ID, so it can hold a 64 bit value if needed.
362
363 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
364
365         * reflection.c (mono_reflection_create_dynamic_method): Store the
366         handle class into the method references as well so ldtoken works in
367         dynamic methods.
368
369         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
370         types.
371
372 2005-08-19  Ankit Jain <jankit@novell.com>
373
374         Fix #75847.
375         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
376           here rather than using the method signature of a arbitrary function
377           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
378           two arguments.
379           Hack done with Harinath.
380
381 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
382
383         * threadpool.c: disable printing stack traces when we get a exception
384         in a threadpool thread. I need to do more testing to figure out which
385         cases actually print this. Fixes bug #75828.
386
387 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
388
389         * icall.c: there might be ignored whitespace after the last '='. This
390         fixes length computation and bug #75840.
391
392 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
393
394         * assembly.c (mono_assembly_load_full): Consider .exe extension as
395         well. Fixes #75809.
396
397         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
398         #75784.
399         
400         * reflection.c (create_custom_attr_data): Ditto.
401
402 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
403
404         * locales.c, culture-info.h : removed RegionLCIDMap.
405         * culture-info-tables.h : regenerated.
406
407 2005-08-16  Martin Baulig  <martin@ximian.com>
408
409         * class.c (mono_type_get_name_recurse): Small fix.
410
411 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
412
413         * locales.c : indentation fixie.
414
415 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
416
417         * object-internals.h,
418           locales.h,
419           locales.c,
420           culture-info.h,
421           icall.c : added RegionInfo table support.
422         * culture-info-table.h : regenerated for region support.
423
424 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
425
426         * reflection.c (resolve_object): handle all kinds of MonoMethod
427         including generic ones
428
429 2005-08-12  Ankit Jain <jankit@novell.com>
430
431         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
432           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
433
434 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
435
436         * process.c: Don't close a thread handle when it's NULL. This is a
437         workaround for bug #75733.
438
439 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
440
441         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
442
443 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
444
445         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
446
447 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
448
449         * threadpool.c: if a work item in the thread pool has a callback that
450         catches a exception, don't propagate it after invoking the callback.
451         Fixes bug #75336.
452
453 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
454
455         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
456
457         * class-internals.h (MonoCachedClassInfo): Add some new fields.
458
459         * class.c (mono_class_init): Load field info lazily in the AOT case.    
460
461         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
462
463 2005-08-03  Ankit Jain  <jankit@novell.com>
464
465         Fix #75683.
466         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
467           PInvoke calling convention is 0.
468
469 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
470
471         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
472         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
473
474 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
475
476         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
477         to handle threads not started by the GC (patch by Michael Meeks
478         <michael.meeks@novell.com>).
479
480 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
481
482         * reflection.c: Make buffer used in emitting types larger for some
483         big generic types (patch by Michal Moskal).
484
485 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
486
487         * mono-debug.c: Fix some (not all) alignment problems.
488
489 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
490
491         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
492         Invoke mono_image_load_from_data_full passing the refonly
493         parameter.
494
495         * assembly.c
496         (mono_assembly_open_from_bundle): Add the refonly argument, 
497         in order to pass it to other methods it calls to.
498         (do_mono_assembly_open): Add the refonly argument, in order 
499         to pass it to other methods it calls to.
500         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
501         the refonly parameter to it.
502
503         * image.c: Add loaded_images_refonly_hash and
504         loaded_images_refonly_guid_hash to cache the reflection
505         only loaded images.
506         (mono_images_init): Initialize the hash tables used for
507         caching the reflection only images.
508         (load_modules): Invoke mono_image_open_full passing the refonly
509         parameter to load the modules the correct way.
510         (build_guid_table): Add the refonly argument, to re-build the 
511         correct hash table.
512         (do_mono_image_open): Added the refonly argument, in order to
513         define it for the loaded image.
514         (mono_image_loaded_full): New function, which receives an
515         additional parameter to look for the image in the refonly or
516         non-refonly section.
517         (mono_image_loaded): Updated, using mono_image_loaded_full.
518         (mono_image_loaded_by_guid_full): The same case that happens
519         with mono_image_loaded_full.
520         (mono_image_loaded_by_guid): Likewise.
521         (register_image): Use the ref_only variable inside MonoImage
522         to decide in which hash table store the current image.
523         (mono_image_open_from_data_full): Rename
524         mono_image_open_from_data to mono_image_open_from_data_full,
525         adding the refonly argument, to define the ref_only variable 
526         inside MonoImage.
527         (mono_image_open_from_data): Return 
528         mono_image_open_from_data_full.
529         (mono_image_open_full): Rename mono_image_open to
530         mono_image_open_full, receiving the new refonly argument,
531         to pass it to inner methods.
532         (mono_pe_file_open): Update this function, to open
533         a MonoImage as a non-refonly image.
534         (mono_image_close): Use the refonly variable inside
535         MonoImage to remove the image from the correct caches.
536
537         * image.h: Add the signatures of mono_image_open_full,
538         mono_image_open_from_data_full, mono_image_loaded_full,
539         mono_image_loaded_by_guid_full.
540
541         * metadata-internals.h: Add the ref_only field to 
542         MonoImage.
543         
544 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
545
546         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
547         Fix the last behavior, which used to load the assemblies and
548         extract MonoReflectionAssemblyName information, instead of
549         extract it from the metadata tables. Needed for Reflection
550         Only assemblies.
551         
552 2005-07-29  Martin Baulig  <martin@ximian.com>
553
554         * mono-debug-debugger.c
555         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
556         not initialized.
557
558         * mono-debug.c
559         (mono_debug_address_from_il_offset): Check whether we have
560         debugging support before attempting to take the lock.
561         (mono_debug_source_location_from_address): Likewise.
562         (mono_debug_source_location_from_il_offset): Likewise.
563         (mono_debug_il_offset_from_address): Likewise.
564         (mono_debug_address_from_il_offset): Likewise.
565
566 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
567
568         * class.c (mono_class_from_name_case): Add support for dynamic images.
569         Fixes #75650.
570
571         * object.c (mono_class_compute_gc_descriptor): Add a workaround
572         for #75479.
573
574 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
575         
576         * reflection.c (mono_method_get_object): Fix warning.
577
578 2005-07-28  Martin Baulig  <martin@ximian.com>
579
580         * mono-debug.c
581         (mono_debug_add_wrapper): Also write the wrapper type.
582
583 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
584
585         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
586         
587         * class.c (mono_class_init): Avoid reading nested classes if the AOT
588         data indicates the class has none.
589
590 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
591
592         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
593         loader lock with the debugger lock. Prevents deadlocks for beagle.
594
595         Beagle can now run on an smp box for a weekend without any
596         issues. Woohoo!
597
598 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
599
600         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
601         in a module. Fixes #75629.
602
603 2005-07-26  Martin Baulig  <martin@ximian.com>
604
605         * mono-debug.c (mono_debug_add_wrapper): New static method.
606         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
607         interncall or a wrapper.
608
609         * mono-debug.h (MonoDebugWrapperData): New public typedef.
610         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
611         (MONO_DEBUGGER_VERSION): Bump to 51.
612
613         * mono-debug-debugger.c
614         (mono_debugger_add_type): Removed this empty function.
615         (mono_debugger_add_method): Likewise.
616
617 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
618
619         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
620         before accessing method->slot.
621
622 2005-07-21  Jb Evain  <jbevain@gmail.com>
623
624         * reflection.c (method_encode_clauses/class): Handle filters clauses.
625         Fixes #75010.
626
627 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
628
629         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
630         #75587.
631
632 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
633
634         * image.h image.c: Add mono_image_get_guid () API function.
635
636 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
637
638         There were issues when multiple threads tried to load
639         assemblies. A deadlock was created between assemblies_mutex and
640         mono_domain_assemblies_lock. This fixes the issue by making the
641         assembly ref counting be lock free. See bug 75586.
642         
643         * image.c (mono_image_close): The add ref function here was using
644         Interlocked operations while the unref was using a mutex and a
645         --. I don't think this was ever a bug that would be exposed in a
646         non-pendantic way (ie, by an embedder doing a ref on one thread
647         and an unref on another), but for the sake of correctness, this is
648         now Interlocked.
649
650         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
651         (mono_assembly_load_reference): Call mono_assembly_addref rather
652         than touching the refcount ourselves.
653         (mono_assembly_close): Use InterlockedDecrement to unref the
654         assembly. Don't acquire the lock unless it is actually needed.
655
656 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
657
658         * class.c (mono_class_layout_fields): Fix calculation of has_references
659         for generic types.
660
661 2005-07-12  Martin Baulig  <martin@ximian.com>
662
663         Applying a patch from Michal Moskal <malekith@nemerle.org>.
664
665         * metadata.c
666         (mono_type_hash): Provide better hashing for generic instances.
667         (mono_generic_inst_hash): Improve hashing.
668         (mono_generic_class_hash): Likewise.
669
670         * reflection.c (mymono_metadata_type_hash): Improve hashing for
671         generic instances.
672
673 2005-07-12  Martin Baulig  <martin@ximian.com>
674
675         * reflection.c (mono_reflection_create_runtime_class): Remove the
676         hack for generic type definitions and non-`Run' assemblies.
677         (mono_reflection_bind_generic_parameters): Also use
678         `klass->wastypebuilder' to check for TypeBuilders.
679
680 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
681
682         * class.c (mono_class_layout_fields): Fix calculation of has_references
683         for generic types.
684
685         * class.c (inflate_generic_class): Fix a leak.
686         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
687         for generic types.
688
689 2005-07-11  Martin Baulig  <martin@ximian.com>
690
691         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
692         on error.
693
694 2005-07-11  Martin Baulig  <martin@ximian.com>
695
696         * loader.c (find_method): Also lookup in
697         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
698
699 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
700
701         * appdomain.c (mono_domain_unload): Don't free the error message
702         before passing it to mono_get_exception_...
703
704         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
705         
706 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
707
708         * threads.c: try to better guess an available RT signal (bug #75387).
709
710 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
711
712         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
713         and CACHE_OBJECT.
714
715 2005-07-07  Martin Baulig  <martin@ximian.com>
716
717         * class.c (mono_type_get_name_full): Return NULL for
718         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
719         fixes #75408.
720
721 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
722
723         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
724         exit the appdomain as well being aborted.
725
726         * threadpool.c: Create all threadpool threads inside the root appdomain, and
727         change back to the root domain after calling managed code. This enables
728         appdomains using threadpools to be unloaded.
729
730 2005-07-07  Martin Baulig  <martin@ximian.com>
731
732         * class-internals.h
733         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
734         into `MonoDynamicGenericClass' since we only need it for dynamic
735         types.
736
737         * reflection.c (mono_class_bind_generic_parameters): We don't need
738         to compute the `parent' here.
739
740 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
741
742         * culture-info-table.h : regenerated.
743
744 2005-07-06  Martin Baulig  <martin@ximian.com>
745
746         * icall.c
747         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
748
749         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
750
751 2005-07-06  Martin Baulig  <martin@ximian.com>
752
753         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
754         we're doing a signature-only comparision; fixes #74945.
755
756 2005-07-06  Martin Baulig  <martin@ximian.com>
757
758         * class-internals.h (MonoGenericClass): Moved some things out into
759         a new `MonoInflatedGenericClass' type.  
760         (MonoInflatedGenericClass): New type; the `klass' of a
761         `MonoGenericClass' is now computed lazyly in
762         mono_get_inflated_generic_class().      
763
764         * class.c (mono_get_inflated_generic_class): New public function.
765         (mono_class_inflate_generic_method): Removed the unused
766         `MonoClass *' argument.
767         (setup_generic_vtable): Don't call mono_get_inflated_method() on
768         all the methods.
769         (mono_class_create_generic): Make this static and merge it with
770         mono_class_create_generic_2(); we're now called automatically from
771         mono_get_inflated_generic_class().
772
773         * loader.c (mono_method_signature): Call
774         mono_get_inflated_method() here.
775
776 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
777
778         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
779         type of fields with RVA.
780
781         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
782         for this pseudo class.
783         (my_mono_class_from_generic_parameter): Likewise.
784         (mono_class_init): Allow interfaces to have cctors.
785
786 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
787
788         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
789         lazily for AOT methods.
790
791 2005-07-05  Martin Baulig  <martin@ximian.com>
792
793         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
794         returns FALSE for a successful match, not TRUE.
795
796 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
797
798         * loader.c (mono_method_get_index): Optimize this a bit.
799
800 2005-07-04  Martin Baulig  <martin@ximian.com>
801
802         * class.c
803         (class_compute_field_layout): Move the check for generic type
804         definitions into mono_class_layout_fields().  Fixes #74684.
805         (mono_class_from_generic_parameter): Correctly compute
806         `klass->parent'; fixes #75457.
807
808         * reflection.c (register_assembly, register_module): Make sure
809         `domain->rejobject_hash' is already created.
810
811 2005-07-02  Martin Baulig  <martin@ximian.com>
812
813         * class-internals.h
814         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
815         `MonoDynamicGenericClass'.      
816
817 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
818
819         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
820         returned by a field getter is null, since null is a valid value.
821
822 2005-07-01  Martin Baulig  <martin@ximian.com>
823
824         * reflection.c (mono_reflection_generic_class_initialize): Update
825         the `dgclass->fields [i].parent' to the correct class.
826         (mono_image_get_fieldref_token): Use the declaring type, not the
827         reflected type.
828
829 2005-07-01  Martin Baulig  <martin@ximian.com>
830
831         * loader.c (find_method): Also look in the interfaces; fixes #75429.
832
833 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
834
835         * threads.c (thread_cleanup): assert that thread != NULL
836         (wait_for_tids_or_state_change): We were using the wrong variable
837         when accessing wait->threads. `i' was always out of the bounds of
838         the array.
839
840 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
841
842         * loader.c: map user32 and kernel32 to libMonoSupportW
843
844 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
845
846         * appdomain.c (unload_thread_main): Mark this as WINAPI.
847
848 2005-06-28  Martin Baulig  <martin@ximian.com>
849
850         * loader.c (method_from_methodspec): Fix #75334.
851
852 2005-06-28  Martin Baulig  <martin@ximian.com>
853
854         Fix #74953 - Arrays now implement the generic IList<T> interface
855         on the 2.0 platform.
856
857         * class-internals.h (MonoDefaults): Added `generic_array_class'.
858
859         * reflection.c (mono_class_bind_generic_parameters): New public
860         function; similar to mono_reflection_bind_generic_parameters(),
861         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
862
863         * domain.c (mono_init_internal): Try to initialize.
864         `mono_defaults.generic_array_class' here; this'll only succeed if
865         we're using the 2.0 corlib.
866
867         * icall.c
868         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
869         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
870         (mono_lookup_internal_call): Added support for nested classes.
871
872         * loader.c
873         (mono_get_method_from_token): Set `result->signature->pinvoke' if
874         we're an interncall and have generic arguments.
875
876         * class.c
877         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
878         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
879         instance of System.Array.InternalArray<T> for arrays, so they
880         implement the generic IList<T> interface.
881
882 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
883
884         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
885         (chastamar@yahoo.com). Fixes #75374.    
886
887 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
888
889         * culture-info-table.h: regenerated.
890
891 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
892
893         * icall.c: handle spaces correctly for base64 strings.
894
895 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
896
897         * *.c: Kill some warnings.
898
899 2005-06-23  Duncan Mak  <duncan@novell.com>
900
901         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
902         that this builds on Solaris 10 (x86).
903
904 2005-06-23  Martin Baulig  <martin@ximian.com>
905
906         * class.c
907         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
908         generic type definitions.
909
910 2005-06-23  Martin Baulig  <martin@ximian.com>
911
912         Fix #75331.
913
914         * metadata.c (mono_class_get_overrides): Renamed to
915         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
916         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
917         pass it to mono_get_method_full().
918
919 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
920
921         * reflection.c (mono_reflection_create_runtime_class): take the
922         mono_domain_lock in this method. Prevents deadlocks
923
924 2005-06-22  Martin Baulig  <martin@ximian.com>
925
926         * loader.c (method_from_methodspec): Fix #75330.
927
928 2005-06-22  Martin Baulig  <martin@ximian.com>
929
930         * reflection.c (type_get_qualified_name): Use
931         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
932         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
933         argument; use it if we don't have an assembly name.
934
935 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
936
937         * object.c: In mono_message_init, set "copy out" flag for in
938         parameters with the [Out] flag.
939
940 2005-06-21  Martin Baulig  <martin@ximian.com>
941
942         * class.c
943         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
944         and MONO_TYPE_PTR.
945
946 2005-06-21  Martin Baulig  <martin@ximian.com>
947
948         * class.c (mono_class_init): Don't initialize `class->fields' for
949         generic instances since they're initialized again in
950         compute_field_layout(). 
951         (compute_field_layout): Set the field's `generic_info' here; fix
952         #75320. 
953
954 2005-06-21  Martin Baulig  <martin@ximian.com>
955
956         * class-internals.h
957         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
958
959         * metadata.c (mono_metadata_generic_method_equal): Also
960         distinguish the `generic_class'; fixes #75334.
961
962 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
963
964         * domain.c:
965         * appdomain.c:
966         * domain-internals.h:
967         * reflection.c: 'domain_assemblies' field is now protected by its own
968         lock. Don't call into managed code to run the AssemblyLoad event if we
969         now there are no registered delegates for it.
970
971 2005-06-20  Martin Baulig  <martin@ximian.com>
972
973         * class.c (mono_class_is_assignable_from): Use a custom version of
974         mono_class_has_parent() to make things work for generic instances;
975         fix #75300.
976
977 2005-06-20  Martin Baulig  <martin@ximian.com>
978
979         * loader.c (method_from_methodspec): Apply a patch from
980         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
981
982 2005-06-20  Martin Baulig  <martin@ximian.com>
983
984         * class.c (mono_class_init): Reverted Zoltan's last change; it
985         breaks generics.
986
987 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
988
989         * threads.c (wait_for_tids_or_state_change): Add missing locking.
990
991 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
992
993         * socket-io.c: fix the index in the socket array for writable/error
994         sockets. Fixes bug #75306.
995
996 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
997
998         * class.c (mono_class_init): Allow interfaces to have static ctors.
999
1000 2005-06-17  Martin Baulig  <martin@ximian.com>
1001
1002         * loader.c (method_from_methodspec): Use `context->container' when
1003         parsing the `gmethod->inst'.
1004
1005 2005-06-17  Martin Baulig  <martin@ximian.com>
1006
1007         * class.c (mono_type_get_name_recurse): Don't add the assembly
1008         name for type arguments.
1009
1010 2005-06-15  Martin Baulig  <martin@ximian.com>
1011
1012         * reflection.c (mono_image_get_inflated_method_token): Encode
1013         correct klass; fixes #75260.
1014
1015 2005-06-13 Michal Moskal <malekith@nemerle.org>
1016
1017         * icall.c: Make GetCorrespondingMethod/Constructor take
1018         MonoReflectionMethod method not MonoMethod. Removed
1019         MonoType.GetCorrespondingField, and make
1020         MonoGenericType.GetCorrespondingField take name not
1021         MonoClassField.
1022
1023 2005-06-13  Michal Moskal <malekith@nemerle.org>
1024
1025         * reflection.c (field_encode_signature, encode_locals):
1026          Make sizes of buffers for types larger (for big generic types).
1027          (create_generic_typespec,
1028          mono_reflection_sighelper_get_signature_local,
1029          mono_reflection_sighelper_get_signature_field):
1030          Add asserts for too small buffers.
1031
1032 2005-06-15  Martin Baulig  <martin@ximian.com>
1033
1034         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
1035         if our parent is not a dynamic type.
1036
1037 2005-06-15  Martin Baulig  <martin@ximian.com>
1038
1039         * class-internals.h (MonoTypeNameFormat): New enum.
1040
1041         * class.c
1042         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
1043         (mono_type_get_full_name): Removed.
1044         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
1045         argument instead of the boolean's.
1046
1047         * icall.c (ves_icall_System_MonoType_getFullName):
1048         Added `gboolean assembly_qualified'.    
1049
1050         * reflection.h
1051         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
1052
1053         * reflection.c (mono_reflection_parse_type): Parse the new type
1054         name format.
1055
1056 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1057
1058         * icall.c: no need to convert from utf16 to utf8 and then back again
1059         after the call to GetLogicalDrives.
1060
1061 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1062
1063         * icall.c: frombase64. Fix problems exposed by new tests.
1064
1065 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1066
1067         * icall.c: added internal calls for converting char [] and strings in
1068         base64 into byte [].
1069
1070 2005-06-10  Martin Baulig  <martin@ximian.com>
1071
1072         * class.c (mono_class_create_generic_2): Read the nested classes
1073         from the metadata rather than from `gklass->nested_classes' since
1074         `gklass' might not be initialized yet.
1075
1076 2005-06-09  Duncan Mak  <duncan@novell.com>
1077
1078         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
1079         all public headers. Fixes #74919.
1080
1081 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
1082
1083         * domain.c: The key for proxy_vtable_hash is now a pointer
1084         array. Added new GHashFunc and GCompareFunc functions for this.
1085
1086         * class.h: The list of interfaces in MonoRemoteClass is known in
1087         advance and can't grow (we create a new MonoRemoteClass if needed),
1088         so now the interface array can be allocated together with
1089         MonoRemoteClass.
1090         
1091         * object.c: Added a new method create_remote_class_key.
1092         Fixed mono_remote_class so it does not depend on
1093         mono_upgrade_remote_class.
1094         Removed extend_interface_array.
1095         Added new method clone_remote_class(), which makes a copy of a remote
1096         class and adds a new interface or class to it.
1097         mono_upgrade_remote_class() now creates a new remote class (or gets
1098         it from the cache) if an vtable upgrade is needed. In this way
1099         we make sure that other objects sharing the same remote class
1100         don't get the new vtable with unwanted interfaces.
1101         
1102         * object-internals.h:
1103         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
1104         
1105         * marshal.c: Track changes in mono_upgrade_remote_class().
1106
1107 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
1108         * icall.c: Add runtime methods for obtaining members of inflated
1109         class, which were created from supplied non-inflated members. It
1110         is used in internal Get{Method,Constructor,Field} methods in
1111         System.Type
1112
1113 2005-06-09  Martin Baulig  <martin@ximian.com>
1114
1115         * reflection.c
1116         (mono_reflection_bind_generic_method_parameters): Fix #75169.
1117
1118 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1119         * reflection.c (mono_image_basic_init): Define
1120         Version in MonoDynamicAssembly. 
1121         
1122 2005-06-08  Martin Baulig  <martin@ximian.com>
1123
1124         Fix #75136.
1125
1126         * loader.c
1127         (mono_method_signature_full): New public method; takes a
1128         `MonoGenericContext *'.
1129         (find_method): Use mono_method_signature_full() and pass the
1130         klass'es context to it.
1131
1132         * class.c (mono_class_is_inflated_method): Use
1133         mono_method_signature_full() and pass the context to it.
1134
1135 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
1136
1137         * object.c: add proper locking in mono_remote_class_vtable(),
1138         fixes possible memory corruption.
1139
1140 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
1141
1142         * marshal.c (mono_remoting_marshal_init): set
1143         initialized after initialization.
1144
1145 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1146
1147         * locales.c : hush.
1148
1149 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
1150
1151         * object.c (extend_interface_array): fix really silly
1152         memory corrupting / comparison bug.
1153
1154 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1155
1156         * reflection.c: Functions added to support the creation
1157         of CustomAttributeData, which includes Attribute data
1158         used by ReflectionOnly methods.
1159
1160         * reflection.h:  mono_reflection_get_custom_attrs_data and
1161          mono_custom_attrs_data_construct added (functions exposed).
1162
1163          * icall.c: Added mono_reflection_get_custom_attrs_data
1164          as icall.
1165         
1166 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
1167
1168         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
1169         lupus's request.
1170
1171 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
1172
1173         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
1174
1175         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
1176         dynamic DllImportAttribute.
1177
1178         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
1179         dynamic DllImportAttribute.
1180
1181         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
1182         Fixes #75162.
1183
1184 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1185
1186         * threads.c: avoid segfault when an unstarted thread is aborted.
1187
1188 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
1189
1190         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
1191         Returns the name and version of the runtime for reporting.
1192
1193 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1194
1195         * appdomain.c: bump corlib version.
1196         * object-internals.h: new field in MonoReflectionAssembly.
1197
1198 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1199
1200         * object-internals.h: Carlos forgot to add this field.
1201
1202 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1203
1204         * icall.c: Added create_version to create instances
1205         of Version of MonoReflectionAssemblyName. This change helps
1206         the AssemblyName tests to keep running fine.
1207         
1208 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
1209   
1210         * object.c (mono_method_return_message_restore): A somehow less
1211         intrusive fix for #75138.
1212
1213 2005-06-03  Raja R Harinath  <rharinath@novell.com>
1214
1215         * object.c (mono_method_return_message_restore): Fix computation
1216         of expected number of out args.
1217
1218 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
1219
1220         * reflection.c (mono_image_get_method_info): Fix the case when the
1221         charset is empty.
1222
1223 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
1224
1225         * object.c: Added missing null check in
1226           mono_method_return_message_restore.
1227
1228 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
1229
1230         * reflection.c (mono_image_get_method_info): Handle the case when
1231         dllentry is empty.
1232
1233 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
1234
1235         * object.c: When creating the vtable for a proxy, take into account
1236         all inherited interfaces, not only the ones registered in
1237         iclass->interfaces. This fixs bug #74996.
1238         Also, in mono_method_return_message_restore, verify that the array
1239         of out args has the expected lengh.
1240
1241 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1242
1243         * socket-io.c: update the timeout in Poll when the call is interrupte.
1244
1245 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1246
1247         * socket-io.c: support abort/suspend in Select_internal after last
1248         change.
1249
1250 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1251
1252         * threadpool.c: remove warning.
1253
1254 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1255
1256         * icall.c:
1257         * socket-io.[ch]: Select_internal uses poll() now when available, thus
1258         removing the 1024 limit from select(). Runtime part of the fix for
1259         bug #71203.
1260
1261 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1262
1263         * socket-io.c: when resolving the addresses for the same
1264         host returned by gethostname(), get the local IPs from the interface
1265         list. Loopback addresses are discarded if the are interfaces up with
1266         non-loopback ones. Fixes bug #63265.
1267
1268 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
1269
1270         * appdomain.c, verify.c, object-internals.h, reflection.c:
1271         bumped corlib number to 36, and added new extra_flags field
1272         to ReflectionMethodBuilder and friends.  Fixes #75060.
1273
1274 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
1275
1276         * gc.c: register a new weak link only if the object is non-null
1277         (fixes bug#75047).
1278
1279 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1280
1281         * culture-info.h : short time pattern too.
1282
1283 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1284
1285         * culture-info.h : expand long time pattern string length.
1286
1287 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
1288
1289         * culture-info-table.h : update (more French date format; #72788).
1290
1291 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
1292
1293         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
1294         the method is static. Fixes #75029.
1295
1296 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
1297
1298         * reflection.c: Update the table_idx field of method builders after
1299         saving the module, since it can change. This is a workaround for
1300         bug #74914. 
1301
1302 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
1303
1304         * culture-info-table.h : update (additional French date format).
1305
1306 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
1307
1308         * icall.c (ves_icall_type_Equals): Revert last change.
1309         
1310         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
1311
1312         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
1313
1314 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
1315
1316         * class-internals.h: Added executioncontext_class field to 
1317         MonoDefaults structure.
1318         * domain.c: Cache System.Threading.ExecutionContext class in 
1319         mono_defaults.
1320         * object.c: Capture the ExecutionContext for asynchroneous calls in
1321          mono_async_result_new.
1322         * object-internals.h: Added execution_context and original_context 
1323         fields to MonoAsyncResult. Added execution_context to MonoThread.
1324         * security-manager.c|.h: Added mono_get_context_capture_method to 
1325         return the capture method (if required by the security manager or by
1326         the framework version used).
1327         * threadpool.c: Apply capture (if present) ExecutionContext in 
1328         mono_async_invoke and revert to original context after it completes.
1329
1330 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
1331
1332         * culture-info-table.h : updated (real hacky solution for zh-CHT).
1333
1334 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
1335
1336         * culture-info-table.h : zh-CHT related workaround.
1337
1338 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
1339
1340         * marshal.c (emit_marshal_custom): Add some error checking and call the
1341         methods in the ICustomMarshaler interface. Fixes #74875.
1342         
1343         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
1344         native->managed wrappers.
1345
1346 2005-05-12  Martin Baulig  <martin@ximian.com>
1347
1348         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
1349         here and use the loader lock.
1350
1351         * mono-debug.c: Properly lock when the debugger is not attached.
1352         (mono_debug_init): Release the initial lock if we're not running
1353         in the debugger.
1354
1355 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
1356
1357         * marshal.c (emit_marshal_custom): Pass through NULL values without
1358         calling the custom marshalling routines.
1359
1360         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
1361         conversion in structures. Fixes #74882.
1362
1363 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
1364
1365         * culture-info-table.h : zh-* cultures were missing.
1366
1367 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
1368
1369         * threads.c: Added a new event background_change_event which is signaled
1370         when a thread changes its background mode.
1371         Moved here several checks previously done in managed code. The checks
1372         require the thread lock, and using the thread lock in managed code
1373         can result in deadlocks.
1374         Merged Start_internal and Thread_internal into a single method. Now 
1375         Thread_internal does all work of creating and starting a thread.
1376         Added icalls for setting and getting the state of the object. Moved from
1377         managed code to avoid locking there.
1378         Added wait_for_tids_or_state_change() which is called instad of
1379         wait_for_tids when waiting for non-backround threads to end. This method
1380         will return if one of the threads ends or the background_change_event
1381         is signaled.
1382         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
1383         the background mode. This method signals the background_change_event
1384         event.
1385         * icall.c:
1386         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
1387         removed Start_internal.
1388         
1389 2005-05-11  Martin Baulig  <martin@ximian.com>
1390
1391         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
1392         to order of some fields to get proper alignment on 64-bit machines.
1393
1394 2005-05-11  Martin Baulig  <martin@ximian.com>
1395
1396         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
1397         changes as they're broken and completely fuck up the debugger.
1398
1399         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
1400
1401 2005-05-10  Martin Baulig  <martin@ximian.com>
1402
1403         * reflection.c (mono_reflection_generic_class_initialize): Don't
1404         call mono_class_setup_parent() here.
1405
1406 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1407
1408         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
1409         send/receive timeout use an integer in milliseconds. We were using a
1410         struct timeval.
1411
1412 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1413
1414         * locales.c:
1415         (internal_get_cultures): reserve the first slot of the array for the
1416         InvariantCulture, which will be filled in managed code.
1417
1418 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
1419
1420         * reflection.c (mono_image_fill_module_table): Initialize the
1421         GENERATION field as well.
1422
1423 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1424
1425         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
1426         Monitor.Enter on the object.
1427
1428 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
1429
1430         * threads.c: Enable the wait for running threads when exiting.
1431         * icall.c: Suspend all threads before exiting.
1432
1433 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
1434
1435         * assembly.c (mono_assembly_load_reference): Fix warning.
1436
1437 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1438
1439         * threadpool.c: changed the default number of threads per cpu. From now
1440         on, the default will be 20 + (5 * number of cpus) instead of 50.
1441
1442 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
1443
1444         * loader.c (mono_method_get_signature_full): Add locking here.
1445
1446 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
1447
1448         * appdomain.c: Moved methods for parsing and freeing assembly
1449         names to assembly.c.
1450         * assembly.c, domain-internals.h: Created public methods for parsing
1451         assembly names. Fixed mono_assembly_load_with_partial_name:
1452         it now finds the best match, taking into account the version,
1453         token and culture specified in the partial name. Also return
1454         the latest version if no version information is specified.
1455
1456 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
1457
1458         * threadpool.c: replace check for SocketAsyncCall class.
1459
1460 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1461
1462         * threadpool-internals.h:
1463         * Makefile.am: added threadpool-internals.h
1464
1465         * threadpool.c: call mono_unhandled_exception on exceptions not handled
1466         that happen in threadpool threads (tested on MS).
1467         (mono_thread_pool_remove_socket): new function that dispatch any pending
1468         AIO call on a socket that is closing. By now only epoll really needs it,
1469         as select/poll wake up when the socket closes.
1470
1471
1472         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
1473
1474 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
1475
1476         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
1477
1478 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
1479
1480         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
1481
1482 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
1483
1484         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
1485         has an abort request, convert it into a suspend request.
1486
1487 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
1488
1489         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
1490         warning for the usage of `UnmanagedFunctionPointerAttribute' which
1491         is not supported yet.
1492
1493 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1494
1495         * image.c: register assemblies loaded from data (bundles) in the loaded
1496         assemblies hash. Fixes bug #74772.
1497
1498 2005-04-29  Martin Baulig  <martin@ximian.com>
1499
1500         * class.c (mono_type_get_name_recurse): Update to the new naming
1501         schema from the latest .NET 2.x beta2.
1502         (mono_class_setup_vtable_general): If we're a generic instance,
1503         copy the vtable from our generic type definition and inflate all
1504         the methods in it.
1505
1506         * loader.c (find_method): Update to the new naming schema from the
1507         latest .NET 2.x beta2.
1508
1509 2005-04-29  Raja R Harinath  <harinath@gmail.com>
1510
1511         * class.c (mono_class_init): Add a mono_loader_unlock to the
1512         #74734 fix.
1513
1514 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
1515
1516         * icall.c (ves_icall_System_Environment_Exit): Remove the 
1517         suspend_all_other_threads () call for the time being, since it can hang.
1518
1519         * threads.c (mono_thread_manage): Similarly, disable the waiting for
1520         the background threads to exit, since it can also hang.
1521
1522         * class.c (mono_class_init): Applied patch from Ankit Jain 
1523         (radical@gmail.com). Avoid pending init errors when a field refers
1524         to a nested class using a typeref. Fixes #74734.
1525
1526         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
1527         this for dynamic modules.
1528
1529 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1530
1531         * threads.c: don't wait for threads that are in the process of aborting
1532         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
1533         and waiting for background threads to finish. This makes xsp and
1534         mod-mono-server exit without random length delays and/or hangs.
1535
1536 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1537
1538         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
1539
1540 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
1541
1542         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
1543         dynamic types to prevent infinite loops. Fixes #74727.
1544
1545         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
1546         ..._is_assignable_to.
1547
1548 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
1549
1550         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
1551
1552 2005-04-25  Martin Baulig  <martin@ximian.com>
1553
1554         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
1555
1556         * domain.c
1557         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
1558
1559         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
1560
1561         * reflection.c (build_compressed_metadata): Set metadata header
1562         version to 2.0.
1563
1564 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
1565
1566         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
1567         number into an integral and a decimal part. Fixes #70473.
1568
1569         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
1570
1571 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
1572
1573         * culture-info-table.h : reflected the latest locale-builder output.
1574
1575 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1576
1577         * threadpool.c: check for SuspendRequested too when deciding if
1578         mono_thread_interruption_checkpoint should be called.
1579
1580 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1581
1582         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
1583         * threads.c: remove interruption_mutex and use Interlocked instead. When
1584         suspending all the threads, wait for all the suspended events at once.
1585         If we're shutting down and get an APC that is going to be queued,
1586         call mono_thread_execute_interruption immediately, as the thread might
1587         be sleeping on a pthread condition or mutex.
1588
1589         * icall.c: call mono_runtime_set_shutting_down before suspending the
1590         threads.
1591
1592         Fixes bug #74693. And now xsp is happier when exiting.
1593
1594 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
1595
1596         * loader.c (mono_stack_walk): Fix #74690.
1597
1598 2005-04-22  Martin Baulig  <martin@ximian.com>
1599
1600         * mono-debug.h (MonoDebugMethodJitInfo): Added
1601         `MonoDebugMethodJitInfo *jit'.
1602
1603         * mono-debug.c (mono_debug_read_method): Cache the
1604         MonoDebugMethodJitInfo in `address->jit'.
1605         (mono_debug_free_method_jit_info): New public method.
1606
1607 2005-04-22  Martin Baulig  <martin@ximian.com>
1608
1609         * class.c (mono_class_is_assignable_from): Disallow
1610         type parameter -> interface.
1611
1612 2005-04-21  Dick Porter  <dick@ximian.com>
1613
1614         * threads.c (mono_thread_create): Turn an assertion into an error.
1615
1616 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
1617
1618         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
1619         
1620         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
1621         Fix some gcc 4.0 warnings.
1622
1623 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
1624
1625         * file-io.c: fix alt dir separator char on unix systems
1626         and cleanup (fixes bug #71214).
1627
1628 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
1629
1630         * marshal.c: Use CALLVIRT instead of CALL when dispatching
1631         a call to a remote domain, since the method may be an
1632         interface method in the client domain. This fixes bug #74192.
1633
1634 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1635
1636         * threadpool.c: recv/send are now performed before going back to managed
1637         code to save one transition.
1638
1639 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1640
1641         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
1642
1643         * metadata/threadpool.c: removed hack to workaround the bug above.
1644
1645         Fixes bug #74618.
1646
1647 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
1648
1649         * reflection.c reflection.h: Fix handling of parameter defaults in
1650         dynamic methods. Also fixes handling of parameter attributes.
1651         Fixes #74609.
1652
1653         * mono-debug.c (mono_debug_close_image): Fix warning.
1654
1655 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1656
1657         * socket-io.h: replaced old unused field with new 'blocking'.
1658         * threadpool.c: restore socket blocking state on windows(tm).
1659
1660 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
1661
1662         * icall.c: don't return the codebase in the AssemblyName[] returned by
1663         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
1664         * object-internals.h: Removed FIXME (fields were presents) and fixed
1665         versioncompat declaration.
1666
1667 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1668
1669         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
1670         not closed, so don't cleanup when it happens.
1671
1672 2005-04-13  Chris Toshok  <toshok@ximian.com>
1673
1674         * mono-debug-debugger.h: change prototype for
1675         mono_debugger_lookup_type.
1676
1677         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
1678         this function, although it should probably be named
1679         mono_debugger_init_type.
1680
1681 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1682
1683         * threadpool.c: fix non-AIO case.
1684
1685 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
1686
1687         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
1688         the built-in profiler to measure just JIT compilation times.
1689
1690 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1691
1692         * threadpool.c: the epollfd might be closed by another thread at
1693         any time, so ignore EBADF at treat it as a "we're closing" sign.
1694
1695 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1696
1697         * threadpool.c: release the semaphores with a count equals to the number
1698         of working threads in both IO and regular pools. Fixed typo that messed
1699         up the count of IO pool threads. Don't initialize the pipe handles if
1700         we're using epoll.
1701
1702 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1703
1704         * threadpool.c: some systems don't like a NULL when deleting the socket
1705         from epoll.
1706
1707 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1708
1709         * threadpool.c: fix semaphore allocation.
1710
1711 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1712
1713         * threadpool.c: added epoll() based implementation for asynchronous IO
1714         that is used instead of the default poll() when available.
1715         It can be disabled by setting MONO_DISABLE_AIO.
1716
1717 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1718
1719         * threadpool.c: windows needs 'closesocket' and instead of returning
1720         0 when the stream is closed while in select, it returns -1. Fixes bug
1721         #74573.
1722
1723 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
1724
1725         * class.c (class_compute_field_layout): Fix the regression caused by
1726         the previous try.
1727
1728 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1729
1730         * threadpool.c: separate pool for socket async. IO.
1731         * threadpool.h: mono_max_worker_threads is not a global any more.
1732
1733 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
1734
1735         * class.c (class_compute_field_layout): Fix #74549.
1736
1737 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1738
1739         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
1740         use 2 connected sockets instead.
1741
1742 2005-04-08  Miguel de Icaza  <miguel@novell.com>
1743
1744         * mono-config.c: Add new entry point for mkbundle
1745         mono_config_parse_memory. 
1746
1747 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1748
1749         * threadpool.c: removed another unused function.
1750
1751 2005-04-08  Ankit Jain  <radical@corewars.org>
1752
1753         * reflection.c (get_default_param_value_blobs): Add 'types'
1754         parameter to get the types encoded in the constant table.
1755         (mono_param_get_objects): Use the type from the constant table,
1756         not the type of the parameter, when creating default values.
1757         Handle null default values correctly.
1758
1759 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1760
1761         * file-io.c:
1762         * file-io.h:
1763         * threadpool.c:
1764         * threadpool.h:
1765         * icall.c:
1766         * socket-io.c: removed dead code for async IO.
1767
1768 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1769
1770         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
1771
1772         * threadpool.c: intercept socket async. calls and pass them to a thread
1773         that is polling and dispatching the job items to the threadpool as
1774         socket become ready. Fixes bugs #71217, #71933.
1775
1776         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
1777         between char and short/ushort arrays.
1778
1779         * socket-io.c: remove dead code.
1780
1781 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
1782
1783         * locales.c,
1784           icall.c : removed InternalToUpper_Comp() and
1785           InternalToLower_Comp().
1786
1787 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
1788
1789         * char-conversions.h : The tables were incorrectly generated. Should
1790           be generated against invariant culture.
1791
1792 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
1793
1794         * object.c (mono_runtime_invoke_array): Fix return value when 
1795         passing pre-created valuetype objects to ctors.
1796
1797         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
1798         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
1799         Fixes #74338.
1800
1801 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
1802
1803         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
1804         only used with --security and hides the wrong corlib version error.
1805
1806 2005-03-30  Joshua Tauberer  <tauberer@for.net>
1807
1808         * class.c: Changed mono_class_name_from_token so that types
1809         outside of a namespace don't have an initial period.  Improved
1810         the g_warning message used in _mono_class_get when loading
1811         fails.
1812         * assembly.c: In mono_assembly_load_reference, when an assembly
1813         can't be found, "No such file or directory" is misleading and
1814         unhelpful because a few paths were checked for the presence of
1815         the assembly.  When that happens (ENOENT), display a nicer
1816         message indicating the directories that were searched.  In all
1817         cases, the warning is made easier to read for non-hackers.
1818
1819 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
1820
1821         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
1822         project/solution.
1823         * appdomain.h|domain.c: Removed inline from functions.
1824         * appdomain.c: Reduced warnings when compiling on windows.
1825         * icall.c: Fixed output_debug declaration to gunichar2*.
1826         * mono-config.c: Reduced warnings when compiling on windows.
1827         * rand.c: Added missing "windows.h". Added missing return value.
1828         * rawbuffer.c: Added missing winsock2.h for windows.
1829         * sysmath.h: Added mono-compiler.h header to allow/ease 
1830         compilation with non-GCC compilers.
1831         * threads.c: Fixed declarations to compile with VS.NET C compiler.
1832         Removed cast warnings.
1833
1834         Adapted from the work of J Lothian (for VC6).
1835
1836 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
1837
1838         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
1839         from default_path.
1840
1841 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
1842
1843         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
1844         the 2.0 profile.
1845
1846 2005-03-27  Raja R Harinath  <harinath@gmail.com>
1847
1848         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
1849         has to be in $(exec_prefix).  $(prefix) is for arch-independent
1850         stuff, and it would probably use $(prefix)/share rather than
1851         $(prefix)/lib.
1852
1853 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1854
1855         * console-io.c: added 2 includes that might be missing.
1856
1857 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
1858
1859         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
1860         profile.
1861
1862         * reflection.c (create_custom_attr): Allocate the params array using
1863         alloca so it gets GC tracking.
1864
1865 2005-03-23  Chris Toshok  <toshok@ximian.com>
1866
1867         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
1868         out some spew.
1869
1870 2005-03-24  Raja R Harinath  <rharinath@novell.com>
1871
1872         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
1873         changes to pick up any changes in prefix, etc.
1874
1875 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
1876
1877         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
1878         
1879         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
1880         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
1881
1882 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
1883
1884         * class-internals.h object-internals.h class.c reflection.c: Extend the
1885         mono_lookup_dynamic_token () function to return the class of the
1886         token as well. 
1887
1888         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
1889         well. Fixes #73848.
1890
1891 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
1892
1893         * security-manager.c: Skip inheritance checks for intra-corlib
1894         class inheritance and method overrides. This skips a lot of checks
1895         and (anyway) permissions cannot work until corlib is loaded.
1896
1897 2005-03-23  Martin Baulig  <martin@ximian.com>
1898
1899         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
1900         MONO_TYPE_GENERICINST.  
1901
1902 2005-03-23  Martin Baulig  <martin@ximian.com>
1903
1904         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
1905
1906 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
1907
1908         * class.c: added locking comments to some functions.
1909         Cache the interface offsets arrays (saves about 20 KB
1910         of runtime memory in a typical app).
1911         Reduce the time overhead in mono_class_setup_supertypes ().
1912
1913 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
1914
1915         * icall.c: speedup and fix leaks in GetMethodsByName and
1916         GetPropertiesByName.
1917
1918 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
1919
1920         * reflection.c: some locking fixes.
1921
1922 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
1923
1924         * metadata.c: added missing break in case statement.
1925
1926 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
1927
1928         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
1929         typedbyref return values. Fixes #73941.
1930
1931 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
1932
1933         * security-manager.c|h: Added demandunmanaged method and 
1934         suppressunmanagedcodesecurity class to MonoSecurityManager.
1935         Renamed aptc class to allowpartiallytrustedcallers.
1936
1937 2005-03-17  Martin Baulig  <martin@ximian.com>
1938
1939         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
1940
1941 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1942
1943         * file-io.c: disabled file async. IO using aio_*. It uses the
1944         threadpool now. Workaround for bug #73718.
1945
1946 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
1947
1948         * assembly.h, mono-config.c: added code to deal with bundled configs
1949         for bundled assemblies.
1950
1951 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
1952
1953         * *.c, private.h: cleanup, removing old private.h header file.
1954
1955 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
1956
1957         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
1958         and throw_on_unmappable_char attributes.
1959
1960 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
1961
1962         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
1963         _ProcessName_internal.
1964
1965 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
1966
1967         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
1968         #73631.
1969
1970         * icall.c threads.c threads-types.h: Remove slothash icalls as they
1971         are no longer used.
1972
1973 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
1974
1975         * object.c (compute_class_bitmap): Add support for generics. Fixes
1976         #73527.
1977
1978 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
1979
1980         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
1981
1982 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1983
1984         * filewatcher.c: commented out the code for windows watcher, as we don't
1985         use it (we use the managed implementation instead).
1986
1987 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
1988
1989         * object-internals.h (MonoThread): Remove 'unused1' field.
1990
1991         * appdomain.c: Bump corlib version.
1992
1993         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
1994
1995         * reflection.c (mono_reflection_create_runtime_class): Remove the
1996         AssemblyBuilder.Save optimization since it causes too many problems.
1997
1998 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
1999
2000         * exception.c|h: Added mono_get_exception_reflection_type_load to
2001         create a ReflectionTypeLoadException object.
2002         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
2003         to return NULL is a InheritanceDemand fails during reflection. Updated
2004         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
2005         ReflectionTypeLoadException if an InheritanceDemand fails during 
2006         reflection. Added icall mapping for GetLinkDemandSecurity.
2007         * security-manager.c|h: Added ves_icall_System_Security_
2008         SecurityManager_GetLinkDemandSecurity internal call to return the
2009         class and methods permissions set for a LinkDemand. Removed unused
2010         fields in MonoSecurityManager.
2011
2012 2005-03-10  Martin Baulig  <martin@ximian.com>
2013
2014         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
2015         it's a generic instance.
2016
2017 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
2018
2019         * reflection.c (mono_get_object_from_blob): Applied patch from
2020         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
2021
2022         * class.c (mono_class_is_assignable_from): Another try at fixing 
2023         #73469 without breaking anything.
2024
2025 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
2026
2027         * class.c: (mono_class_is_assignable_from): Revert the last changes
2028         since they don't work with generics.
2029         
2030         * class.c (mono_class_is_assignable_from): Fix build bustage.
2031
2032         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
2033         the managed IsAssignableFrom method. Fixes #73469.
2034
2035         * reflection.c (mono_reflection_call_is_assignable_from): New helper
2036         function.
2037
2038 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
2039
2040         * object.c (mono_load_remote_field_new): Fix returning uninitialized
2041         memory when the remoting callback does not sets the out arguments.
2042         Fixes #73007.
2043
2044         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
2045         by mistake.
2046
2047         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
2048
2049         * object-internals.h (MonoStackFrame): Sync with managed object layout.
2050
2051         * appdomain.c: Bump corlib version.
2052
2053 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
2054
2055         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
2056         function.
2057
2058         * threads.c (mono_thread_attach): Detect threads which are not started
2059         by the GC pthread wrappers.
2060
2061 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
2062
2063         * icall.c: Added new icall for RNG.
2064         * rand.c|h: Added new icall to open the RNG. This allows to share a 
2065         single handle on Linux to access /dev/urandom and fix #73183.
2066
2067 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
2068
2069         * object.c: setting the new vtable in a transparent proxy object must
2070         not change the GC descriptor.
2071
2072 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2073
2074         * object.c: fixed compilation without GCJ support.
2075         * reflection.c: for runtime-created types ensure klass->has_references
2076         is correct (bug #73215).
2077
2078 2005-03-02  Martin Baulig  <martin@ximian.com>
2079
2080         * class.c (mono_class_is_assignable_from): Make this work if
2081         `oklass' is a generic instance; fixes #72831.
2082
2083 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
2084
2085         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
2086         with hasthis set.
2087         
2088         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
2089
2090         * marshal.c: Reorganize native->managed marshalling code to also use
2091         the emit_marshal_... functions.
2092
2093 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
2094
2095         * object.c: typed allocs have issues with bitmap sizes > 30,
2096         so check for max_set >= 30.
2097
2098 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
2099
2100         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
2101         managed code. Fixes #73012.
2102
2103         * metadata.h (MonoMarshalSpec): Add elem_mult field.
2104
2105         * metadata.c reflection.c: Load/Emit elem_mult as well.
2106         
2107         * metadata.h (MonoMarshalSpec): Add comment.
2108
2109         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
2110
2111         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
2112         num_elem to -1 if not given.
2113
2114         * object-internals.h (MonoReflectionMarshal): Add has_size field.
2115
2116         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
2117         given values.
2118
2119 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
2120
2121         * null-gc.c (mono_gc_free_fixed): Was not compilable.
2122
2123 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
2124
2125         * reflection.c (encode_marshal_blob): Encode param_num field as well.
2126
2127         * object-internals.h (MonoReflectionMarshal): Add param_num field.
2128
2129 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
2130
2131         * object.c: generalized the reference bitmap creation
2132         and added hooks for the new GC.
2133         * class-internals.c: removed the gc_bitmap field from MonoClass.
2134
2135 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2136
2137         * domain.c: help the compiler to produce better code
2138         in mono_jit_info_table_find ().
2139
2140 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
2141
2142         * object.c: make all allocations look typed.
2143
2144 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2145
2146         * socket-io.c: load Mono.Posix if it's not loaded already
2147         (fixes bug#73033).
2148
2149 2005-02-24  Martin Baulig  <martin@ximian.com>
2150
2151         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
2152         * reflection.c (dup_type): Likewise.
2153
2154 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
2155
2156         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
2157         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
2158
2159 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2160
2161         * domain.c, threads.c, object-internals.h: make the critical thread
2162         local vars use the fast access mode (even when we're compiled in
2163         a lib). Provide accessors to be used by the jit during codegen.
2164
2165 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2166
2167         * appdomain.c: Changed hook functios behavior to include
2168         support for the reflection only assemblies. Some icalls were changed
2169         to support the mentioned assemblies too. Signatures of static methods
2170         try_assembly_resolve and real_load now have an additional parameter:
2171         refonly.
2172
2173         * assembly.c: General changes to mono_assembly_ methods to support
2174         reflection only api. Functions mono_assembly_open, mono_assembly_load,
2175         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
2176         suffix, to support an additional gbool parameter to specify whether
2177         the assembli is reflection only or not. Created some new hook functions 
2178         to add support for reflection only assemblies. Signatures of static 
2179         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
2180         have now an additional parameter: refonly.
2181
2182         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
2183         indicating whether the assembly is reflection only or not.
2184
2185         * exception.c: Add mono_get_exception_invalid_operation.
2186
2187         * icall.c: Throw an InvalidOperationException when trying to invoke
2188         a property/method/event, or trying to set/get the value of a field.
2189         Also add an icall to retrieve the ref_only flag to the
2190         MonoReflectionAssembly.
2191
2192 2005-02-23  Chris Toshok  <toshok@ximian.com>
2193
2194         Part of fix for #72827.
2195         * mono-debug.c (mono_debug_add_method): add lexical block data to
2196         the info we write.  Kind of a hack at the moment - we copy the
2197         lexical block info from the MonoDebugMethodInfo to the
2198         MonoDebugMethodJitInfo here, before writing it.
2199         (mono_debug_read_method): read the lexical block info.
2200
2201         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
2202
2203         * debug-mono-symfile.h: add lexical block support.
2204
2205         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
2206         support.
2207
2208 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
2209
2210         * loader.c (mono_lookup_pinvoke_call): Fix warning.
2211
2212         * object.c (mono_runtime_free_method): Call mono_free_method () and
2213         put the TODOs there.
2214
2215         * loader.c (mono_free_method): Free up most memory allocated for 
2216         dynamic methods.
2217
2218 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
2219
2220         * reflection.c: properly flag a Type argument to a
2221         named custom attr value (bug #72248).
2222
2223 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2224
2225         * reflection.c: reduce code duplication in named custom
2226         attribute encoding.
2227
2228 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
2229
2230         * reflection.c: properly encode custom attrs of type object
2231         (bug #72649).
2232
2233 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
2234
2235         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
2236
2237 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
2238
2239         * socket-io.c: load System.dll if it's not loaded already
2240         (bug #72850 and #70477).
2241
2242 2005-02-21  Martin Baulig  <martin@ximian.com>
2243
2244         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
2245         generic instances.
2246
2247 2005-02-21  Martin Baulig  <martin@ximian.com>
2248
2249         * reflection.c (mono_image_build_metadata): We also need to
2250         "fixup" the MethodImpl table after we computed the final method
2251         indices.  Call fixup_methodimpl() to do that.
2252         (fixup_methodimpl): New private method.
2253
2254 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
2255
2256         * assembly.c: special case mscorlib.dll (bug#72536),
2257         patch from Carlos Alberto Cortez.
2258
2259 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
2260
2261         * threads-types.h threads.c: Fix build bustage.
2262
2263         * threads.c: Use a union for long<->double conversions.
2264
2265         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
2266         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
2267
2268         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
2269         containing the checkpoint call with NOT_TAKEN.
2270         
2271         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
2272         checkpoint before pushing the arguments, so they won't have to be
2273         spilled to stack.
2274
2275 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2276
2277         * domain.c, assembly.c, domain-internals.h: make some data
2278         const and relocation-free.
2279
2280 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
2281
2282         * object.c, appdomain.c, class-internals.h: introduce the
2283         MonoClassRuntimeInfo structure to hold the info needed to
2284         use a class at runtime. Made mono_class_vtable() lock-free
2285         for all the appdomains.
2286
2287 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
2288
2289         * metadata-internals.h, image.c: introduce a per-image mempool to
2290         be used for memory that has the same lifetime as the image.
2291
2292 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
2293
2294         * domain.c: In mono_init_internal(), instead of selecting the first
2295         runtime version supported by an executable, get a list of all
2296         supported versions and select the one for which an mscorlib exists
2297         (since even if the runtime supports a given version, it doesn't mean
2298         that the framework for that version is installed).
2299         Modified get_runtimes_from_exe to support this behavior.
2300         In supported_runtimes, added information about additional system
2301         assembly versions.
2302         
2303         * assembly.c: Added support for more than one system assembly version
2304         per runtime version. Updated the assembly list.
2305         In mono_assembly_remap_version, removed the initial version check,
2306         since we don't know to which version we need to compare until we
2307         get the version set on which the assembly is based.
2308         Moved the code for loading corlib into the new method
2309         mono_assembly_load_corlib(), so it can be used by the initialization
2310         code.
2311         
2312         * domain-internals.h: Updated data structures and added declaration
2313         for mono_assembly_load_corlib.
2314
2315 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
2316
2317         * reflection.c (resolve_object): Fix the creation of the signature in 
2318         the SignatureHelper case.
2319
2320         * assembly.c (mono_assembly_remap_version): Fix binary search.
2321         
2322 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
2323  
2324         * class.c: Added inheritance check when a method is overloaded (from a
2325         virtual method or when implementing an interface) and when a class is
2326         inherited. Added functions to set a failure for a class and to 
2327         retreive the exception from a failure.
2328         * class-internals.h: Added fields to MonoClass to keep the exception
2329         information status for inheritance (or other exceptions) to be thrown
2330         later (i.e. not at load time).
2331         * object.c: Throw the inheritance SecurityException when a type is to 
2332         be created with either class or method inheritance violations.
2333         * reflection.c|h: Fix when getting declsec from a class. Removed 
2334         unrequired code for class. Improved sanity in parameter naming.
2335         * security-manager.c|h: Added functions to check for class and method
2336         inheritance.
2337
2338 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
2339
2340         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
2341         and has_finalize in dynamic types as well.
2342
2343 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
2344
2345         * culture-info-table.h : fixed currency format for en-GB (and so on).
2346
2347 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
2348
2349         * gc.c: ensure the GC handles never have 0 as a value.
2350
2351 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
2352
2353         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
2354         a pointer to a struct to unmanaged code. Fixes #72625.
2355
2356 2005-02-16  Martin Baulig  <martin@ximian.com>
2357
2358         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
2359
2360 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
2361
2362         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
2363
2364 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
2365
2366         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
2367
2368         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
2369         UnmanagedFunctionPointerAttribute, use it for determining calling convention
2370         etc. Fixes #71471.
2371
2372         * reflection.c (mono_custom_attrs_get_attr): New helper function.
2373
2374         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
2375
2376 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
2377
2378         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
2379         changes to make the current context a field in MonoThread.
2380
2381 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
2382
2383         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
2384         the last change.
2385         
2386         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
2387         extracted from mono_marshal_get_native_wrapper.
2388
2389         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
2390         to create wrappers around native functions.
2391
2392         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
2393         delegates for arbitrary function pointers. Fixes #71472.
2394
2395 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
2396
2397         * threads.c: cleaned up the code a little.
2398
2399 2005-02-15  Martin Baulig  <martin@ximian.com>
2400
2401         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
2402         the data table.
2403
2404         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
2405         allocate larger chunks if needed.
2406
2407 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
2408
2409         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
2410         in by mistake.
2411
2412 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
2413
2414         * domain.c: keep the domains in an array and ensure the domain ids
2415         are kept small, so they can be used as indexes to domain-specific data
2416         with a small memory overhead.
2417
2418 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
2419
2420         * icall.c: Handle byref types in Type icalls. Fixes #72544.
2421
2422 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
2423
2424         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
2425
2426 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
2427
2428         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
2429
2430         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
2431         values.
2432
2433         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
2434         
2435 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
2436
2437         * domain-internals.h: add the hashtable here.
2438
2439         * class-internals.h: Remove `info' from MonoMethod
2440
2441         * domain.c: Add a new hashtable, jit_trampoline_hash
2442
2443 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
2444
2445         * object.c: don't set the value of static fields
2446         (fixes bug#72494).
2447
2448 2005-02-11  Martin Baulig  <martin@ximian.com>
2449
2450         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
2451         (mono_debug_add_method): Silently ignore the method if it's too big.
2452         (mono_debug_add_type): Likewise.
2453
2454 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
2455
2456         * threads.c, appdomain.c: remove #ifdefs from the code.
2457
2458 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
2459
2460         * metadata-internals.h: Added flags to MonoAssembly to cache the most
2461         common security informations. This allows us to stay in unmanaged code
2462         when doing LinkDemand and it's special cases (except for the first 
2463         time for initialization). The flags a very much used with --security.
2464         * reflection.c|h: Added code to get declarative security attributes 
2465         for LinkDemand and InheritanceDemand. This required to refactor the
2466         existing code for Demand.
2467         * security-manager.c|h: Added new method fields for the special cases
2468         of LinkDemand.
2469
2470 2005-02-10  Martin Baulig  <martin@ximian.com>
2471
2472         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
2473         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
2474
2475 2005-02-10  Martin Baulig  <martin@ximian.com>
2476
2477         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
2478         debugging code; this is almost a complete rewrite.
2479
2480         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
2481
2482 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2483
2484         * domain.c, object.h: expose mono_string_equal () and 
2485         mono_string_hash ().
2486         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
2487         it's implemented in managed code.
2488
2489 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2490
2491         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
2492         lo leak objects between appdomains.
2493
2494 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2495
2496         * assembly.c: old compilers compilation fix from 
2497         robertj@gmx.net (Robert Jordan).
2498
2499 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
2500
2501         * class-internals.h: Little reminder for the future.
2502
2503         * debug-helpers.c: Fix up wrapper_type_names
2504
2505 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2506
2507         * image.c, metadata-internals.h: when loading an image from a file,
2508         mmap all of it and use the same codepaths as when using a
2509         in-memory image: the code is simpler and we use less memory
2510         (both writable and readonly).
2511
2512 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
2513
2514         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
2515         API to alloc runtime data structures that need to be tracked by the
2516         GC and contain pointers.
2517         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
2518         make the code more readable and eventually use a different GC.
2519
2520 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
2521
2522         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
2523         for out arguments.
2524         
2525 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
2526
2527         * object.c: In release_type_locks(), don't release the cctor lock
2528         if it has already been released. This fixes a crash in the
2529         thread5 test.
2530
2531 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2532
2533         * gc.c, marshal.c, icall.c: register a delegate for finalization
2534         only when the native function pointer has been allocated for it.
2535
2536 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
2537
2538         * object.c: cleaned up some code, allocate objects that are
2539         pointer free with the atomic malloc variant. Allocate memory
2540         for static data from the mempool if it's pointer-free.
2541         Allocate the bounds array at the end of the array data, when needed.
2542         * object-internals.h, object.h: move a private function in a private
2543         header.
2544         * class.c: handle missing case in tracking references in fields.
2545
2546 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
2547
2548         * class.c, class-internals.h: keep track if a type has
2549         reference fields in either the instance or static fields.
2550
2551 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
2552
2553         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
2554         and renamed to MonoRuntimeInfo. Added fields to store the expected
2555         framework assembly version. Changed mono_get_framework_version and
2556         mono_get_runtime_version for a single mono_get_runtime_info method.
2557         
2558         * assembly.c: Added method to remap system assembly versions to the
2559         current executing runtime version. Removed old mapping code.
2560         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
2561         
2562         * icall.c, reflection.c: Track api changes.
2563
2564 2005-02-06  Miguel de Icaza  <miguel@novell.com>
2565
2566         * loader.c (method_from_memberref): Improve error reporting,
2567         produce the class name instead of the typeref/typedef index. 
2568
2569 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
2570
2571         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
2572
2573 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
2574
2575         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
2576         stdcall and charset name mangling.  Reorganize the code and add
2577         some tracing stuff.
2578
2579 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
2580
2581         * monodiet.c: More iters!
2582
2583         * marshal.c: Iter usage.
2584
2585         * icall.c: Iter usage.
2586
2587         * object.c: Use iters.
2588
2589         * debug-helpers.c: More iters
2590
2591 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
2592
2593         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
2594         under win32.
2595
2596 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
2597
2598         * mono-debug-debugger.c: use iters
2599
2600         * class.c, class-internals.h: mono_class_setup_events is static
2601         now
2602
2603         * All callers: use iters
2604
2605 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
2606
2607         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
2608         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
2609
2610 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
2611
2612         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
2613
2614         * marshal.h: Add prototypes for ldfld/stfld_remote.
2615
2616         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
2617         this is called during startup.
2618         
2619 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
2620
2621         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
2622         MonoThreadsSync struct private in monitor.c. Changed the way
2623         MonoThreadsSync is allocated so it's faster and there is no
2624         need to keep track of it with a finalizer and it uses less memory.
2625         This also finally allows us to allocate mono objects as ptrfree when
2626         there are no reference fields.
2627
2628 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
2629
2630         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
2631         disappearing link to the GC interface and use them to simplify
2632         the gchandles code.
2633
2634 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
2635
2636         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
2637         stfld_remote which call mono_load/store_field_new. This allows methods
2638         calling ldfld/stfld wrappers to be AOTed.
2639
2640         * console-io.c: Include sys/filio.h under solaris.
2641         
2642         * console-io.c: Include curses.h if needed correctly.
2643
2644 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
2645         
2646         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
2647         method->klass as well.
2648
2649         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
2650
2651         * class.c (mono_class_init): Switch on lazy initialization of 
2652         methods.
2653
2654         * class.c (mono_class_get_finalizer): Handle the case when the 
2655         finalizer is inherited.
2656
2657 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2658
2659         * console-io.c: <curses.h> is needed by term.h on solaris.
2660
2661 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
2662
2663         * icall.c, class-internals.h, monodiet.c, class.c: Remove
2664         mono_class_setup_properties where possible. Remove this ftn from
2665         the header file, and make it static.
2666
2667 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
2668
2669         * loader.c: Add missing setup_... call.
2670
2671         * class.c: Add missing setup_... calls.
2672
2673         * class.c (mono_class_init): Switch on lazy initialization of 
2674         the generic vtable.
2675         
2676         * class.c (mono_class_init): Fix generics broken by the recent changes.
2677
2678         * monodiet.c (handle_type): Add missing setup_... calls.
2679
2680         * class.c: Back out garbage in previous patch.
2681         
2682         * class.c: Add missing setup_... calls.
2683
2684         * class.c (mono_class_get_method_from_name_flags): Avoid calling
2685         mono_class_setup_methods () if possible.
2686
2687         * class-internals.h (MonoClass): Add 'has_cctor' flag.
2688
2689         * class-internals.h (MonoCachedClassInfo): New structure.
2690
2691         * class.c: Initialize properties and events fields of MonoClass lazily.
2692
2693         * class.c: Add infrastructure for lazily initializing the methods and
2694         vtable fields of MonoClass. Not yet used.
2695
2696         * class.c (mono_class_get_finalizer): New helper function.
2697
2698         * class.c: Add infrastructure for loading some class related data from
2699         an AOT file.
2700
2701         * object.c: Add infrastructure for initializing the vtable from data
2702         in the AOT file.
2703
2704         * gc.c (run_finalize): Use mono_class_get_finalizer ().
2705
2706         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
2707         appropriate initialization function before accessing parts of the
2708         MonoClass structure.
2709
2710         * marshal.c: Fix warnings.
2711         
2712         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
2713
2714         * mono-debug-debugger.c (get_exception_message): Use 
2715         mono_class_get_method_from_name_flags ().
2716
2717 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
2718
2719         * reflection.c, appdomain.c: Replace a few manual searches that
2720         Zoltan missed. (Paolo approved this part of my initial patch).
2721
2722 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
2723
2724         * profiler.c: disable recording statistical events at report time.
2725
2726 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2727
2728         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
2729         to byteswap arrays of enum values, too (bug #72080).
2730
2731 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
2732
2733         * appdomain.c (set_domain_search_path): Allow this to be called if
2734         domain->setup is not yet set.
2735
2736         * loader.c (mono_method_get_index): New helper function.
2737
2738         * loader.c reflection.c: Use mono_method_get_index ().
2739
2740         * class.c (mono_class_get_method_from_name_flags): New helper method.
2741
2742         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
2743         this.
2744
2745         * class.c (mono_class_get_cctor): New helper method.
2746
2747         * string-icalls.c object.c class.c marshal.c reflection.c: Use
2748         mono_class_get_method () to look up methods.
2749
2750 2005-02-01  Miguel de Icaza  <miguel@novell.com>
2751
2752         * console-io.c: Fix the build, this should work on Windows.
2753
2754 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
2755
2756         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
2757         be set to null to keep things valid
2758
2759 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2760
2761         * icall.c: added Console 2.0 icalls.
2762         * Makefile.am: added console-io.[ch]
2763         * console-io.[ch]: internal calls for Console 2.0 API.
2764
2765 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2766
2767         * class.c: make sure we consider all the interfaces
2768         when calculating max_interface_id (bug found by
2769         Jeroen Frijters running ikvm).
2770
2771 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
2772
2773         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
2774         valuetype fields to null.
2775
2776         * object.c (set_value): Ditto. Fixes #71669.    
2777
2778 2005-01-31  Martin Baulig  <martin@ximian.com>
2779
2780         * metadata.c (mono_metadata_has_generic_params): New public
2781         function; checks whether something is a generic method.
2782
2783 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
2784
2785         * appdomain.c: fix infinite recursion when adding assemblies.
2786
2787 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
2788
2789         * object.c: Fix small typo to return all items for Environment.
2790         GetCommandLineArgs.
2791
2792 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2793
2794         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
2795         reflection.c: more domain and assembly-unload related fixes
2796         and memory leaks plugs.
2797
2798 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
2799
2800         * 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.
2801
2802 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
2803
2804         * loader.c (mono_method_signature): Make this method lazy
2805         (mono_get_method_from_token): Don't computate the signature here.
2806
2807         Doing this saves quite a bit of memory. I got 90 kb on starting up
2808         monodoc. It should also save some disk reads on startup.
2809
2810         * *: MonoMethod->signature might be NULL now. You *MUST* use
2811         mono_method_signature.
2812
2813 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
2814
2815         * object.c (mono_runtime_get_main_args): Return an array from the
2816         current domain here. Fixes #71938.
2817
2818 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
2819
2820         * monitor.c: formatting changes to comply with the
2821         mono coding style and remove #ifdefs from the code.
2822
2823 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2824
2825         * metadata.c, private.h: remove some unneeded data
2826         and use a more compact representation for table schemas.
2827
2828 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
2829
2830         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
2831         to get a better distribution in hash tables.
2832         * *.c: use mono_aligned_addr_hash() where appropriate.
2833         * assembly.c: make var static.
2834
2835 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
2836
2837         * domain-internals.h: Put MonoJitInfo on a diet.
2838
2839         * domain.c: Fix a warning.
2840
2841 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2842
2843         * gc.c: rework the gc handles code to reuse handles
2844         when freed.
2845
2846 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
2847
2848         * domain.c: fixed long standing bug in mono_string_equal() which
2849         was brought to light with the ldstr changes.
2850
2851 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
2852
2853         * reflection.c: Remove warning by adding missing include for marshal.h
2854
2855 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2856
2857         * domain.c, object.c: change the ldstr_table to hold
2858         MonoString* as keys: makes the runtime isinterned lookup
2859         faster and simplifies memory management.
2860
2861 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
2862  
2863         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
2864         possible to add imperative security checks before calling the icall.
2865         * reflection.c: Return security attributes on the original MonoMethod
2866         (and not the wrapped one). This fix permissions on icalls.
2867
2868 2005-01-25  Dick Porter  <dick@ximian.com>
2869
2870         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
2871         the check for mktime() support actually test the mktime() return
2872         value.  "Fixes" bug 71682, though the output is still different to
2873         MS.
2874
2875 2005-01-25  Martin Baulig  <martin@ximian.com>
2876
2877         * class.c (mono_class_is_assignable_from): Make this work for
2878         generic instances.
2879
2880 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
2881
2882         * marshal.c (mono_string_utf8_to_builder)
2883         (mono_string_builder_to_utf16): We might not have ownership of the
2884         string. In thise case, we need to create a new buffer.
2885
2886         * object-internals.h (mono_stringbuilder_capacity): sb->str might
2887         be null, in which case, use the default capacity.
2888
2889 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2890
2891         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
2892         GC events to the profiler.
2893
2894 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2895
2896         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
2897         if you don't want the GC to run.
2898
2899 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
2900
2901         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
2902         start providing a GC API and keeping different implementations in
2903         their own file.
2904         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
2905
2906 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
2907
2908         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
2909         mmap rather than allocating a huge buffer.
2910         (mono_debug_close_mono_symbol_file): Free the buffer allocated
2911         above.
2912
2913 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
2914
2915         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
2916         and CheckExecutionRights.
2917         * reflection.c|h: Keep the index of the declarative security to be 
2918         used, instead of the pointer, when AOT compiler is used. Also add 
2919         class initialization when requesting demands.
2920         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
2921         CheckExecutionRights. Both properties are now FALSE by default, and
2922         unmodifiable, unless the --security option is used.
2923
2924 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
2925
2926         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
2927         reflection.c: properly refcount images and assemblies, many leaks fixed.
2928
2929 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2930
2931         * threadpool.c: increase the timeout for threads in the thread pool to
2932         10s.  Fixes bug #67159.
2933
2934 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
2935
2936         * class-internals.h: Sun's compiler insists on explicit
2937         signed on bit fields to handle then correctly.
2938
2939 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
2940
2941         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
2942         Make the size of the array fit only the number of invalid path
2943         chars that we have.
2944
2945         * class.c (_mono_class_get): Improve the error reporting when a
2946         class referenced is not found, to assist debugging. 
2947
2948 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
2949
2950         * threads.c: fix off-by-one error.
2951         * domain.c: free data allocated in the domain.
2952
2953 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
2954
2955         * reflection.c (mono_method_body_get_object): Fill out exception info
2956         as well.
2957
2958         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
2959         structure.
2960         
2961 2005-01-19  Martin Baulig  <martin@ximian.com>
2962
2963         * loader.c (mono_get_method_constrained): Make this work again.
2964
2965 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
2966
2967         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
2968         guint16 to match the managed side.
2969
2970         * reflection.c (mono_reflection_body_get_object): Fill out local
2971         variables array.
2972
2973         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
2974         as well.
2975
2976         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
2977         'local_var_sig_token'.
2978
2979 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
2980
2981         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
2982         System.Drawing.
2983
2984         * reflection.c (mono_method_body_get_object): Handle abstract and
2985         runtime methods.
2986
2987 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
2988
2989         * marshal.c, loader.c, class-internals.h, reflection.c:
2990         store the emthod data for a wrapper in an array instead of a list.
2991
2992 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
2993
2994         * marshal.c: change the code to allocate memory more
2995         conservatively for method wrappers.
2996
2997 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
2998
2999         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
3000         fields from MonoClass to the marshal info structure where they belong.
3001
3002 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3003
3004         * class.c, object.c, class-internals.h, marshal.c: rearrange
3005         some fields and tweak some types to lower memory usage.
3006
3007 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
3008
3009         * threads.c (signal_thread_state_change): Handle the case when the
3010         target thread is the current thread.
3011
3012         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
3013
3014         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
3015         emit_ptr_to_object_conv. 
3016
3017         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
3018         marshalling. Fixes #71352.
3019
3020 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
3021
3022         * metadata.h, blob.h: move table enum to blob.h so it can be included
3023         in any header.
3024         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
3025         cut the size of MonoImage/MonoDynamicImage.
3026
3027 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
3028
3029         * profiler.c (mono_profiler_install_simple): Fix default arguments.
3030
3031 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
3032
3033         * reflection.c, reflection.h, icall.c: add a function to check
3034         if an attribute type is defined for a metadata object.
3035
3036 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
3037
3038         * object-internals.h: Added some needed fields from StringBuilder class.
3039         * marshal.c: Set the maxCapacity when creating a StringBuilder.
3040
3041 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
3042
3043         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
3044         threads before shutting down the runtime.
3045
3046         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
3047
3048 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3049
3050         * object-internal.h, threads.c: implement stacksize and 
3051         parameterized thread start functionality (requires
3052         matching corlib). Marked broken code for later removal.
3053
3054 2005-01-12  Martin Baulig  <martin@ximian.com>
3055
3056         * class-internals.h (MonoGenericClass): Moved the `initialized'
3057         flag to MonoDynamicGenericClass, removed `init_pending'.
3058         (MonoGenericInst): Added `is_reference' flag.
3059
3060 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
3061
3062         * reflection.c (mono_image_create_pefile): Only set the pe_offset
3063         inside the MSDOS header. Fixes #71201.
3064
3065         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
3066         gc thread.
3067         (mono_domain_finalize): Ditto.
3068
3069 2005-01-12  Martin Baulig  <martin@ximian.com>
3070
3071         * class.c (mono_get_shared_generic_class): Use the cache for
3072         non-dynamic generic classes.
3073
3074         * class-internals.h (mono_class_create_generic_2): Removed
3075         function prototype, this function is now static inside class.c.
3076
3077         * class.c (mono_class_create_generic_2): Made this static, only
3078         call it from mono_class_init() and mono_class_setup_parent().
3079         (collect_implemented_interfaces_aux): Call mono_class_init() on
3080         the interfaces we collect.
3081         (mono_class_setup_vtable): Call mono_class_init (class->parent).
3082
3083 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
3084
3085         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
3086         it a real thread handle.
3087
3088         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
3089         MonoJitExceptionInfo, since each catch clause needs its own variable.
3090         
3091 2005-01-11  Dick Porter  <dick@ximian.com>
3092
3093         * image.c (mono_pe_file_open): New variant on mono_image_open()
3094         that does not set up the CLI metadata; used for FileVersionInfo so
3095         it can get the data for windows binaries too.
3096         
3097         * process.c (process_read_string_block): Don't read off the end of
3098         the StringTable block.
3099
3100         These both fix bug 70766.
3101
3102 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
3103
3104         * gc.c: set some fields to NULL at GC cleanup time.
3105         * threads.c: if we quit the main thread, call exit ().
3106
3107 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
3108
3109         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
3110
3111 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
3112
3113         * threads.h, threads.c, object.c: added accessor and settor for
3114         main_thread. Handle it specially when exiting from it: wait
3115         for other foreground threads to exit.
3116
3117 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
3118
3119         * process.c, verify.c: remove some bloat.
3120
3121 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
3122
3123         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
3124         the calling convention to cdecl under win32.
3125
3126 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
3127
3128         * object.c (mono_object_get_size): New function to get the size of
3129         an object instance.
3130
3131         * profiler.c (simple_allocation): Use above.
3132
3133 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
3134
3135         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
3136         ves_icall_System_AppDomain_getRootDomain (as it's not required to
3137         get an appdomain by it's id and we can't assume the root's id is 0).
3138         * domain-internals.h: Change the function prototype to match.
3139         * icall.c: Change the icall table for AppDomain.
3140
3141 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
3142
3143         * locales.c (string_invariant_compare_char): Only compute
3144         GUnicodeTypes in the case where we need them.  Test for ordinality
3145         first and return if so.
3146
3147         From the commit:
3148
3149                 /*
3150                  * FIXME: here we must use the information from c1type and c2type
3151                  * to find out the proper collation, even on the InvariantCulture, the
3152                  * sorting is not done by computing the unicode values, but their
3153                  * actual sort order.
3154                  */
3155
3156 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
3157
3158         * loader.c: for P/Invoke methods, allow the "Internal" shared
3159         library name to refer to the calling process symbol namespace.
3160
3161 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
3162
3163         * Makefile.am: Add the security manager to the build.
3164         * security-manager.c|h: New. Initialization of the security manager.
3165
3166 2005-01-07  Dick Porter  <dick@ximian.com>
3167
3168         * threads.c: 
3169         * monitor.c: Update thread state during Monitor and WaitHandle
3170         waits.  Fixes bug 71031.
3171
3172 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
3173
3174         * reflection.c (property_encode_signature): Correctly handle when the
3175         property has no methods.
3176
3177 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
3178
3179         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
3180         
3181         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
3182         fields from mb, not rmb. Fixes #71017.
3183
3184         * marshal.c (emit_ptr_to_str_conv): Add support for 
3185         ByValTStr -> string conversion. Fixes #71015.
3186
3187         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
3188
3189         * mempool.c (mono_mempool_contains_addr): New helper function.
3190
3191 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
3192
3193         * metadata.c (mono_metadata_compute_size): Fix size calculation of
3194         HasSematics encoded fields.
3195         
3196         * metadata.c (mono_type_to_unmanaged): Improve error message for 
3197         invalid string marshalling.
3198
3199         * metadata.c: Fix warnings.
3200         
3201 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3202
3203         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
3204         profiler support.
3205
3206 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
3207
3208         * domain.c object.c domain-internals.h: Revert part of r38077 since the
3209         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
3210         tests.
3211
3212 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
3213
3214         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
3215         so methods containing these can be AOTed.
3216
3217 2005-01-03  Martin Baulig  <martin@ximian.com>
3218
3219         * loader.c (find_method): Removed the hack for generic instances.
3220         (method_from_memberref): If our parent is a generic instance, pass
3221         its generic type definition to find_method() and then inflate the
3222         method.
3223         (mono_get_method_constrained): Pass the generic type definition to
3224         find_method() and inflate the method later.
3225
3226         * class-internals.h (MonoStats): Added `generic_class_count'.
3227
3228         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
3229         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
3230
3231         * reflection.c (mono_custom_attrs_from_params): Don't ignore
3232         generic type definitions.
3233
3234 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
3235
3236         * loader.c icall.c: Fix warnings.
3237
3238 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
3239
3240         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
3241         blittable types. Fixes #70864.
3242
3243 2004-12-29  Martin Baulig  <martin@ximian.com>
3244
3245         * icall.c
3246         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
3247
3248         * reflection.c (mono_method_get_object): Create a
3249         "System.Reflection.MonoGenericMethod" for inflated methods; don't
3250         call mono_get_inflated_method().
3251
3252         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
3253
3254 2004-12-27  Martin Baulig  <martin@ximian.com>
3255
3256         * class-internals.h (MonoMethod): Added `is_inflated' flag.
3257         (MonoMethodInflated): Added `inflated' field.
3258
3259         * class.c (mono_class_inflate_generic_method): Don't really
3260         inflate the method here; just set the `is_inflated' flag in the
3261         MonoMethod.
3262         (mono_class_get_inflated_method): Actually inflate the method here
3263         if it's not already inflated; we use the MonoMethodInflated's new
3264         `inflated' field as a cache.
3265
3266 2004-12-26  Martin Baulig  <martin@ximian.com>
3267
3268         * class.c
3269         (inflate_generic_class): Moved some code out of inflate_generic_type().
3270         (mono_class_inflate_generic_method): If we're already inflated,
3271         inflate the context and use the declaring method; ie. make sure
3272         the declaring method of an inflated method is always the generic
3273         method definition.
3274         (mono_class_create_from_typedef): Create
3275         `class->generic_container->context->gclass'.
3276
3277 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
3278
3279         * metadata-internals.h, marshal.c, reflection.c: More
3280         MonoGHashTable->GHashTable.
3281
3282         * domain-internals.h, class.c: Change MonoGHashTable's into
3283         GHashTables for some cases where no gc stuff is used
3284
3285         All users: update apis
3286
3287 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
3288
3289         * metadata.c (builtin_types): Make this `const'. Makes this get
3290         put into the shareable section.
3291         (mono_metadata_init): Casts to make gcc happy.
3292
3293 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
3294
3295         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
3296
3297 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
3298
3299         * icall.c: Added an internal call to retrieve the position and length
3300         of assembly-level declarative security attributes (RequestMinimum, 
3301         RequestOptional and RequestRefuse). This is used by the Assembly class
3302         to re-create the corresponding permission sets.
3303
3304 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
3305
3306         * marshal.c: fix the stelemref wrapper to be type correct
3307         (and faster).
3308
3309 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
3310
3311         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
3312         to do key & 0x7fffffff. Hashtable already does this. It just
3313         results in longer code.
3314
3315 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
3316
3317         * appdomain.c: Bump corlib version.
3318         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
3319         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
3320         * reflection.c|h: Add functions to get declarative security infos
3321         (blob position and length) for assemblies, classes and methods.
3322
3323 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
3324
3325         * reflection.c: sort the constant table (bug #70693).
3326
3327 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
3328
3329         * object-internals.h, threads.c, domain.c: add accessors for
3330         the MonoThread and MonoDomain tls keys.
3331
3332 2004-12-18  Martin Baulig  <martin@ximian.com>
3333
3334         * class.c (inflate_generic_type): If we're inflating a generic
3335         instance, set `ngclass->context->container = context->container';
3336         ie. the container we inflated into.
3337
3338         * metadata.c (mono_metadata_parse_generic_param): Reflect above
3339         inflate_generic_type() changes.
3340
3341 2004-12-17  Martin Baulig  <martin@ximian.com>
3342
3343         * class-internals.h
3344         (MonoGenericClass): Replaced `MonoType *generic_type' with
3345         `MonoClass *generic_class'.  Removed `dynamic_info'; if
3346         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
3347         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
3348
3349 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
3350
3351         * exception.c (mono_exception_from_token): New helper function.
3352
3353 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
3354
3355         * assembly.c (mono_assembly_load_with_partial_name): Call 
3356         mono_assembly_loaded before invoking the preload hooks. Fixes
3357         #70564.
3358
3359         * object-internals.h (MonoThread): Change culture_info and 
3360         ui_culture_info into an array.
3361
3362         * threads.c: Cache culture info objects from more than one appdomain.
3363
3364         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
3365         current UI culture.
3366
3367 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
3368
3369         * threads.h threads.c appdomain.c: Clear the culture_info field of
3370         all threads during unloading if they point to an object in the dying
3371         appdomain.
3372
3373 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
3374
3375         * culture-info.h (TextInfoEntry): New struct
3376         * object-internals.h: sync with managed
3377         * locales.c: fill the `text_info_data' field
3378         * culture-info-tables.h: update
3379
3380 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
3381
3382         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
3383         collector.
3384
3385 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
3386
3387         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
3388         (ves_icall_ModuleBuilder_getMethodToken): Ditto
3389
3390 2004-12-12  Martin Baulig  <martin@ximian.com>
3391
3392         * mono-debug-debugger.c (write_type): If we're an enum and the
3393         builtin types have already been initialized, call mono_class_init().
3394
3395 2004-12-11  Martin Baulig  <martin@ximian.com>
3396
3397         * metadata.c (mono_metadata_load_generic_params): Added
3398         `MonoGenericContainer *parent_container' argument; automatically
3399         compute `container->is_method'; pass the correct owner to
3400         get_constraints().      
3401
3402         * reflection.c (compare_genericparam): Sort the GenericParam table
3403         according to increasing owners. 
3404
3405 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
3406
3407         * profiler.c: allow disabling the default profiler.
3408
3409 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
3410
3411         * decimal.c, icall.c: allow disabling System.Decimal support.
3412
3413 2004-12-09  Marek Safar <marek.safar@seznam.cz>
3414
3415         * reflection.c: Add support for null attribute arguments.
3416
3417 2004-12-09  Martin Baulig  <martin@ximian.com>
3418
3419         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
3420         names to get rid of compiler warnings.
3421
3422 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
3423
3424         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
3425         mono_marshal_load_type_info (). Fixes #69625.
3426         (mono_marshal_get_ptr_to_struct): Likewise.
3427
3428 2004-12-08  Martin Baulig  <martin@ximian.com>
3429
3430         * mono-debug.h: Bumped version number to 47.
3431
3432         * mono-debug-debugger.c
3433         (mono_debugger_event_handler, mono_debugger_event): Take two
3434         guint64 arguments insteed of a gpointer and a guint32.  
3435
3436 2004-12-08  Martin Baulig  <martin@ximian.com>
3437
3438         * debug-mono-symfile.h
3439         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
3440         `address' to `native_offset'.
3441
3442 2004-12-08  Martin Baulig  <martin@ximian.com>
3443
3444         * class.c (mono_class_create_from_typespec): Only inflate if we
3445         either have `context->gclass' or `context->gmethod'.
3446
3447 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
3448
3449         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
3450
3451         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
3452
3453         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
3454
3455         * reflection.c (mono_assembly_get_object): Remove the workaround put
3456         in for the release.
3457         
3458         * appdomain.c: Use the corlib_internal field from MonoAssembly.
3459
3460         * appdomain.c: Bump corlib version.
3461
3462         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
3463         be visible in other appdomains.
3464
3465 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
3466
3467         * threads.c: Interlocked inc and dec for longs were messed up,
3468         use a KISS based impl for this. Fixes 70234
3469
3470 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
3471
3472         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
3473
3474 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
3475
3476         * icall.c: fix to follow policy not to allow struct
3477         arguments in icalls.
3478
3479 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3480
3481         * process.c: make the patch that handles spaces in file paths work
3482         on mono/windows too.
3483
3484 2004-12-06  Martin Baulig  <martin@ximian.com>
3485
3486         * class.c (mono_class_create_generic): Call
3487         mono_class_setup_supertypes() if we're dynamic.
3488         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
3489
3490 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
3491
3492         * object-internals.h: Add new fields to MonoThread.
3493
3494         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3495
3496         * icall.c threads-types.h threads.c: Add new icalls.
3497
3498         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
3499
3500         * object-internals.h (MonoReflectionAssembly): Sync object layout with
3501         managed side.
3502
3503         * appdomain.c: Bump corlib version.
3504
3505         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
3506         internal assemblies. Fixes #69181.
3507
3508 2004-12-05  Martin Baulig  <martin@ximian.com>
3509
3510         * class.c (mono_class_inflate_generic_signature): Make this a
3511         no-op if `context' is NULL or we don't have any type parameters;
3512         also copy `sentinelpos'.        
3513
3514 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
3515
3516         * image.c: Add unbox_wrapper_cache.
3517
3518         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
3519
3520         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
3521         function generator.
3522         
3523         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
3524         Fixes #70173.
3525
3526         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
3527         
3528 2004-12-04  Martin Baulig  <martin@ximian.com>
3529
3530         * loader.c (mono_method_get_signature_full): New public function;
3531         like mono_method_get_signature(), but with an additional
3532         `MonoGenericContext *' argument.
3533
3534         * class.c (mono_class_inflate_generic_signature): Formerly known
3535         as inflate_generic_signature(); make this public.
3536
3537 2004-12-04  Martin Baulig  <martin@ximian.com>
3538
3539         * metadata.c
3540         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
3541         instead of a `MonoGenericContainer *'.  
3542         (mono_metadata_parse_array_full): Likewise.
3543         (mono_metadata_parse_signature_full): Likewise.
3544         (mono_metadata_parse_method_signature_full): Likewise.
3545         (mono_metadata_parse_generic_inst): Likewise.
3546         (mono_metadata_parse_generic_param): Likewise.
3547         (mono_metadata_parse_mh_full): Likewise.
3548         (mono_type_create_from_typespec_full): Likewise.
3549
3550 2004-12-03  Martin Baulig  <martin@ximian.com>
3551
3552         * class-internals.h (MonoGenericContainer): Replaced the
3553         `MonoGenericContext * pointer with a `MonoGenericContext'
3554         structure and made it the first element.
3555
3556 2004-12-03  Martin Baulig  <martin@ximian.com>
3557
3558         * class.c
3559         (inflate_generic_type): Set the `context->container' when creating
3560         a new MonoGenericContext.
3561         (mono_class_inflate_generic_method): Likewise.
3562         (mono_class_create_from_typespec): Just use `context->container'
3563         to get the container.
3564
3565         * loader.c (method_from_methodspec): Set `context->parent' from
3566         `context->container' - and if that's a method container, use its
3567         parent.  Also set the `context->container' when creating a new
3568         MonoGenericContext.
3569         (mono_get_method_from_token): Use just `context->container' to get
3570         the container.
3571
3572         * metadata.c (do_mono_metadata_parse_generic_class): Also set
3573         `gclass->context->container'.
3574
3575         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
3576         the `context->container' when creating a new MonoGenericContext.
3577
3578 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
3579
3580         * reflection.c (compare_genericparam): Sort params with identical
3581         owner by their number. Fixes gen-111 on sparc.
3582
3583 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
3584
3585         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
3586         around the domain changes.
3587
3588         * appdomain.c (mono_domain_unload): Handle the case when the thread
3589         calling Unload is itself being aborted during unloading. Fixes #70022.
3590
3591         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
3592
3593         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
3594         checkpoint_func as an icall so it gets a wrapper.
3595         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
3596         in the cross-appdomain wrappers too.
3597
3598         * threads.c (mono_thread_has_appdomain_ref): Make this public.
3599
3600         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
3601
3602         * reflection.c: Fix some memory leaks.
3603         
3604 2004-12-02  Martin Baulig  <martin@ximian.com>
3605
3606         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
3607
3608         * metadata.c (generic_class_cache): New static hashtable.
3609         (mono_metadata_lookup_generic_class): New public method.
3610
3611 2004-12-02  Martin Baulig  <martin@ximian.com>
3612
3613         * class.c (mono_class_create_from_typedef): Call
3614         mono_class_setup_parent() and mono_class_create_mono_type() before
3615         parsing the interfaces.
3616
3617 2004-12-02  Martin Baulig  <martin@ximian.com>
3618
3619         * metadata.c (generic_inst_cache): New static hashtable.
3620         (mono_metadata_lookup_generic_inst): New public function.
3621         (mono_metadata_inflate_generic_inst): New public function.
3622         (mono_metadata_parse_generic_inst): New public function.
3623         (do_mono_metadata_parse_generic_class): Use the new
3624         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
3625         since this'll also use the cache.
3626
3627         * reflection.c (mono_reflection_bind_generic_method_parameters):
3628         Use mono_metadata_lookup_generic_inst() to use the new cache.
3629
3630         * class.c (inflate_mono_type): Use
3631         mono_metadata_inflate_generic_inst() to inflate a generic
3632         instance; this'll also use the new cache.
3633
3634         * loader.c (method_from_methodspec): Use
3635         mono_metadata_parse_generic_inst() and
3636         mono_metadata_inflate_generic_inst() rather than parsing it
3637         manually, so we can use the new cache.
3638
3639 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
3640
3641         * threads.c (wait_for_tids): Do not incorrectly free threads when 
3642         the wait times out.
3643
3644 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3645
3646         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
3647         iter->args based on whether parameters are passed in registers (i.e.
3648         MONO_ARCH_REGPARMS is defined)
3649
3650 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
3651
3652         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
3653         the exception message. Fixes #70070.
3654         (method_from_methodspec): Fix warnings.
3655
3656 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3657
3658         * process.c: (complete_path) return the path quoted
3659
3660 2004-12-01  Martin Baulig  <martin@ximian.com>
3661
3662         * class-internals.h (MonoGenericInst): New structure.
3663         (MonoGenericClass): Replaced `type_argc', `type_argv' and
3664         `is_open' with `MonoGenericInst *inst'.
3665         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
3666         `is_open' with `MonoGenericInst *inst'.
3667
3668 2004-11-30  Martin Baulig  <martin@ximian.com>
3669
3670         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
3671
3672         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
3673         to `generic_class_cache'.
3674
3675         * metadata.c
3676         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
3677         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
3678         (mono_generic_inst_is_valuetype): Renamed to
3679         mono_generic_class_is_valuetype().
3680
3681         * class-internals.h
3682         (MonoGenericInst): Renamed to MonoGenericClass.
3683         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
3684         (MonoClass): Renamed `generic_inst' to `generic_class'.
3685         (MonoGenericContext): Renamed `ginst' to `gclass'.
3686
3687         * object-internals.h
3688         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
3689
3690         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
3691         mono_reflection_generic_class_initialize().
3692
3693         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
3694         now known as "System.Reflection.MonoGenericClass".
3695         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
3696
3697 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
3698
3699         * class-internals.h: Added a flag field to MonoClass to cache the
3700         declarative security attributes actions associated with the class.
3701         * domain-internals.h: Added booleans to MonoJitInfo to cache the
3702         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
3703         applicable to the JITted method.
3704         * reflection.c|h: Added functions to extract (as flags) which security
3705         actions are available (declaratively) for a method, class or assembly.
3706         * metadata.c|h: Added functions to search the declarative security
3707         table in the metadata.
3708         
3709 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
3710
3711         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
3712         EXPORTEDTYPES are already in the class name cache, so there is no
3713         need to add extra code here to look at them. Just removes a bit of
3714         cruft.
3715
3716         (ves_icall_System_Environment_get_TickCount): No need for #if
3717         WINDOWS. We already have the code in io-layer.
3718
3719 2004-11-28  Martin Baulig  <martin@ximian.com>
3720
3721         * loader.c
3722         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
3723         Fixes gen-112.cs.
3724
3725 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
3726
3727         * assembly.c (do_mono_assembly_open): Instead of having a
3728         conditional WITH_BUNDLE, incorporate support for bundles here, by
3729         having a global `bundles' variable holding a pointer to the actual
3730         bundles. 
3731
3732         (mono_register_bundled_assemblies): New API call used by the
3733         bundle code. 
3734
3735         See mkbundle.1 for details.
3736         
3737 2004-11-27  Martin Baulig  <martin@ximian.com>
3738
3739         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
3740         the vtable for generic methods.
3741
3742 2004-11-26  Martin Baulig  <martin@ximian.com>
3743
3744         * metadata.c
3745         (mono_metadata_generic_method_hash): New public function.
3746         (mono_metadata_generic_method_equal): Likewise.
3747
3748         * class-internals.h
3749         (MonoGenericContainer): Added `GHashTable *method_hash'.
3750
3751         * reflection.c (ReflectionMethodBuilder): Added
3752         `MonoGenericContainer *generic_container'.
3753         (reflection_methodbuilder_to_mono_method): Don't create a new
3754         MonoGenericContainer each time we're called.
3755         (mono_reflection_bind_generic_method_parameters): Use
3756         `container->method_hash' to cache the results so we don't create a
3757         different method if we're called several times with the same
3758         arguments.
3759
3760         * loader.c (method_from_methodspec): Use the new
3761         `container->method_hash' here, too.
3762
3763 2004-11-26  Martin Baulig  <martin@ximian.com>
3764
3765         * class.c (inflate_generic_signature): Correctly compute
3766         `res->has_type_parameters'.
3767         (mono_class_vtable): Use the `has_type_parameters' flag to
3768         determine whether we're a generic method.
3769
3770         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
3771
3772 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
3773
3774         * object.c (mono_runtime_run_main): Fix a small memory leak.
3775
3776 2004-11-25  Martin Baulig  <martin@ximian.com>
3777
3778         * class.c (set_generic_param_owner): Fixed the loop.
3779
3780 2004-11-25  Martin Baulig  <martin@ximian.com>
3781
3782         * object.c (mono_class_vtable): Don't create any JIT wrappers for
3783         generic methods.
3784
3785 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
3786
3787         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
3788         names. Fixes #69787.
3789
3790 2004-11-24  Martin Baulig  <martin@ximian.com>
3791
3792         * class.c (mono_class_create_generic_2): If we don't have a
3793         `ginst->parent', inflate `gklass->parent' to get our parent.
3794
3795 2004-11-24  Martin Baulig  <martin@ximian.com>
3796
3797         * reflection.c (compare_genericparam): Correctly sort the
3798         GenericParam table; fixes #69779.
3799
3800 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
3801
3802         * reflection.c: When writing a PE file, don't create a huge
3803         buffer in memory. Just write the arrays we have to the file.
3804         This reduces memory usage.
3805
3806         * metadata-internals.h: MonoDynamicStream pefile is no longer used
3807         globally.
3808
3809 2004-11-17  Martin Baulig  <martin@ximian.com>
3810
3811         * class.c (mono_class_init): Don't setup `class->parent' for
3812         dynamic instances; moved this to mono_class_generic_2().
3813         (mono_class_create_generic): Also set `klass->inited' for dynamic
3814         generic instances.
3815         (mono_class_create_generic_2): Don't do anything for dynamic
3816         generic instances.  Set `klass->parent' here and also call
3817         mono_class_setup_parent() here. 
3818
3819         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
3820         `MonoType *parent' argument; set `ginst->parent' before calling
3821         mono_class_create_generic_2(), so we set the correct parent.
3822
3823 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
3824
3825         * reflection.c: allow getting attributes from ModuleBuilder
3826         (used by ikvm).
3827
3828 2004-11-17  Martin Baulig  <martin@ximian.com>
3829
3830         * class.c (mono_class_create_from_typedef): If a type parameter is
3831         inherited from an outer class, set its owner to that class.
3832
3833 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
3834
3835         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
3836           for (int*) written size. This fixes bug #69592.
3837
3838 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
3839
3840         * icall.c: Added IsAuthenticodePresnet internal call.
3841         * image.c|h: New function that check a MonoImage for an Authenticode
3842         signature in the certificate PE data directory.
3843         * security.c|h: New internal call to ask the runtime if an 
3844         Authenticode signature seems referenced in the PE header.
3845
3846 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
3847
3848         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
3849
3850         * reflection.c (mono_image_create_pefile): Free the assembly streams
3851         after writing out the assembly file.
3852
3853         * object.c (mono_runtime_run_main): Fix small memory leak.
3854
3855         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
3856         property access modifiers. Fixes #69389.
3857
3858 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
3859
3860         * domain.c, object.c, object-internals.h, domain-internals.h,
3861         object.h, marshal.c: keep dynamic code info per domain.
3862
3863 2004-11-15  Martin Baulig  <martin@ximian.com>
3864
3865         * class.c (mono_type_get_name_recurse): Put type arguments in
3866         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
3867         see bug #68387.
3868
3869 2004-11-15  Martin Baulig  <martin@ximian.com>
3870
3871         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
3872         (mono_class_setup_vtable): When computing `the_cname' for a
3873         generic instance, don't include the namespace since we'd otherwise
3874         add it twice.
3875
3876 2004-11-15  Martin Baulig  <martin@ximian.com>
3877
3878         * class.c (mono_class_create_generic): Changed return type to void.
3879         (mono_class_create_generic_2): New public function; setup
3880         `class->method', `class->field' and `class->interfaces' here
3881         instead of in mono_class_init().
3882
3883         * class.h (mono_class_create_generic): Moved to class-internals.h.
3884
3885 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
3886
3887         * reflection.c (mono_image_create_pefile): take a file HANDLE.
3888         rather than writing to memory, write to this file. Right now,
3889         we are just writting into a buffer, and copying that. However
3890         we can avoid the buffer later.
3891
3892         (mono_dynamic_stream_reset): new function
3893
3894         * icall.c, object-internals.h: update for the above.
3895
3896 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
3897
3898         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
3899         have been using gc'd memory. First it is slower, unlikely
3900         the comment in the source code said, secondly, it increases
3901         our footprint to do it in the gc.
3902
3903         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
3904         the method so that it does not have to copy to managed code.
3905
3906 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
3907
3908         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
3909
3910 2004-11-12  Martin Baulig  <martin@localhost>
3911
3912         * reflection.c (mono_image_create_token): Allow generic method
3913         definitions here, since they may appear in an `.override'; see
3914         gen-98/gen-99 for an example.
3915
3916 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
3917
3918         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
3919         #69365.
3920
3921         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
3922         descriptive.
3923
3924 2004-11-11  Martin Baulig  <martin@ximian.com>
3925
3926         * class.c (mono_class_setup_vtable): In an explicit interface
3927         implementation, the method name now includes the arity.
3928
3929 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
3930
3931         * object.c (mono_array_full_copy): Fix warning.
3932
3933 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
3934
3935         * appdomain.c: Removed look_for_method_by_name(). Use the new method
3936         mono_class_get_method_from_name() instead.
3937         
3938         * class-internals.h: Added two new types of wrappers. 
3939         Added MonoRemotingTarget enum. Added new trampoline function type, which
3940         takes an additional MonoRemotingTarget value as parameter, so it is
3941         possible to request a trampoline for a specific target.
3942         
3943         * class.c: Added new mono_class_get_method_from_name() method.
3944         
3945         * class.h: In MonoRemoteClass, we can have now to vtables, one for
3946         general remoting sinks and one specific for cross domain calls.
3947         
3948         * debug-helpers.c: Added new wrapper names.
3949         
3950         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
3951         of a remote class.
3952         
3953         * image.c: Porperly delete value objects form the remoting invoke hashtable.
3954         
3955         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
3956         with several other methods (mono_marshal_get_xappdomain_dispatch,
3957         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
3958         and others) can generate a fast remoting wrapper for cross domain calls.
3959         More information can be found in docs/remoting.
3960         Other changes: Removed mono_find_method_by_name, and used
3961         mono_class_get_method_from_name instead.
3962         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
3963         is stored in the remoting invoke hashtable.
3964         
3965         * marshal.h: published the new method for getting the xdomain wrapper,
3966         and also added a method for getting the adequate wrapper for a given
3967         method and target.
3968         
3969         * object-internals.h, object.c: Added a couple of methods for capying and
3970         cloning arrays.
3971         Modified mono_install_remoting_trampoline, which takes the new remoting
3972         trampoline that has a remoting target as parameter.
3973         mono_class_proxy_vtable now also takes a remoting target as parameter, and
3974         will return the most suitable vtable for the target.
3975         Added mono_remote_class_vtable, which returns the vtable of a remote class
3976         (which can be the normal remoting vtable or the xdomain vtable).
3977         
3978         * threads.c: the xdomain invoke and dispatch wrappers must also be
3979         protected against interruptions.
3980
3981 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3982
3983         * icall.c: use memmove in BlockCopyInternal when the source and
3984         destination arrays are the same.
3985
3986 2004-11-09  Martin Baulig  <martin@ximian.com>
3987
3988         * class-internals.h (MonoGenericContainer): Removed `method' and
3989         `signature', replaced them with `is_method' and `is_signature'
3990         flags.  Added `context'.
3991
3992         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
3993         instead of a `MonoGenericContainer *'.
3994
3995         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
3996         for dynamic type parameters.
3997         (mono_metadata_load_generic_params): Setup `container->context'.
3998
3999         * reflection.c (mono_reflection_setup_generic_class): Setup
4000         `tb->generic_container->context'.
4001         (do_mono_reflection_bind_generic_parameters): Use
4002         mono_class_inflate_generic_type() to correctly inflate types,
4003         rather than using our own hack just for MONO_TYPE_VAR.
4004
4005 2004-11-09  Martin Baulig  <martin@ximian.com>
4006
4007         * class.c (mono_class_inflate_generic_method): Small fix; don't
4008         crash here.
4009
4010         * icall.c
4011         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
4012         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
4013         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
4014         (ves_icall_Type_BindGenericParameters): Likewise.
4015         (ves_icall_Type_get_IsGenericInstance): Likewise.
4016         (ves_icall_Type_GetGenericParameterPosition): Likewise.
4017         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
4018         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
4019         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
4020
4021 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
4022
4023         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
4024         assembly versions and public key tokens. Fixes #69113.
4025
4026 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
4027
4028         * metadata.c: fix bug introduced with the type cache changes
4029         on 2004-11-06.
4030
4031 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
4032
4033         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
4034         the MonoClass pointer instead of the token in exception clauses.
4035         * reflection.c: updates for the above and make the code not depend
4036         on the structure of MonoExceptionClause.
4037
4038 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
4039
4040         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
4041         Add support for dynamic assemblies. Fixes #69114.
4042
4043         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
4044
4045 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
4046
4047         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
4048         since most only those methods use it. the code member of
4049         MonoMethodPInvoke was dead, so that can be removed too. Also,
4050         remove inline_count (again, not used), and move slot so that it
4051         can share bits with some other flags. This saves 8 bytes in the
4052         structure and gives us about 50 kb back for mcs helloworld.cs
4053
4054         * *.[ch]: Do naming changes for the above.
4055
4056         * loader.c (mono_method_get_header): Lazily init the header
4057         on first access.
4058         (mono_get_method_from_token): don't init the header here
4059         (mono_free_method): the header may never be allocated
4060
4061         Overall, this saves 150 kb of unmanaged allocations
4062         for mcs helloworld.cs. That accounts for 10% of the unmanaged
4063         memory at runtime.
4064         
4065         * loader.c, loader.h (mono_method_get_header): new accessor.
4066
4067         * *.[ch]: use the above method. Prepares us to lazily load
4068         the header.
4069
4070         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
4071         three warnings, which are actual bugs (see 69206).
4072
4073         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
4074         unused. Saves a cool 4 bytes / method.
4075
4076 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
4077
4078         * metadata.c (builtin_types): Add types for System.Object here.
4079         (mono_metadata_parse_type_full): Cache MonoType*'s that are
4080         for a class or valuetype from klass->this_arg or klass->byval_arg.
4081
4082         On mcs for a hello world, this gets us down from 21836 MonoType's
4083         to 14560.
4084
4085         (mono_metadata_free_type): Account for the above change.
4086
4087 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
4088
4089         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
4090         exception instead of asserting if name is null.
4091         (ves_icall_System_AppDomain_GetData): Ditto.
4092
4093 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
4094
4095         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
4096         EnumBuilder.
4097
4098         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
4099         Return NULL when the domain does not have entry_assembly set.
4100
4101         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
4102         Add a 'resource_modules' argument.
4103         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
4104
4105         * reflection.c (mono_reflection_create_runtime_class): Move setting
4106         of wastypebuilder here, so mono_get_type_object () returns a MonoType
4107         for enums too.
4108
4109         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
4110         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
4111         Throw an ArgumentNullException if 'ptr' is null.
4112
4113         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
4114         assemblies here. Fixes #69020.
4115
4116 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
4117
4118         * reflection.c (build_compressed_metadata): Fix the previous patch for
4119         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
4120         the stack.
4121
4122 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
4123
4124         * assembly.c (mono_assembly_names_equal): Allow a match if one of
4125         the cultures is false. Fixes #69090.
4126
4127         * reflection.c (build_compressed_metadata): Fix invalid memory read 
4128         detected by valgrind.
4129         
4130         * reflection.c (mono_reflection_get_type): Avoid triggering a 
4131         TypeResolve multiple times for the same type. Fixes #65577.
4132
4133 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
4134
4135         * marshal.c: Avoid using ldftn to call managed functions. It is
4136         much slower than just a call.
4137
4138         * reflection.c (mono_module_get_object): free the basename we
4139         allocate here from glib.
4140         
4141         * reflection.c (ensure_runtime_vtable): make sure to free
4142         overrides.  Also, we were allocating an array of MonoMethod not an
4143         array of MonoMethod*.
4144
4145         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
4146
4147         * image.c (mono_image_close): free image->guid here.
4148
4149 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
4150
4151         * reflection.c: Fix some spec conformance issues with the PE file
4152         structures so mcs compiled apps run on the Net 2.0 beta.
4153
4154 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
4155
4156         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
4157         Implement this. Fixes #67264.
4158
4159         * debug-helpers.h debug-helpers.c marshal.c: Move 
4160         mono_find_method_by_name to debug-helpers.c.
4161
4162 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
4163
4164         * object.c (mono_release_type_locks): type_initialization_hash is
4165         a GHashTable.
4166
4167         * reflection.c object.c object-internals.h: Fix warnings.
4168
4169         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
4170         without accessors. Fixes #61561.
4171
4172         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
4173         application base from the root domain if not set. Fixes #65641.
4174         (mono_runtime_init): Fix warning.
4175
4176 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4177
4178         * appdomain.c: call mono_thread_pool_init.
4179         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
4180         of worker threads based on the number of CPUs and the environment
4181         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
4182         for non-windows (windows) systems.
4183
4184 2004-10-27  Chris Toshok  <toshok@ximian.com>
4185
4186         * mono-debug-debugger.c (write_class): don't call mono_class_init
4187         here, as even with the check for (!klass->init_pending), we get
4188         into a situation where we're hitting cycles in class
4189         initialization.  Fixes #68816.
4190
4191 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
4192
4193         * image.c: Avoid overwriting values in the loaded_images_hash when an
4194         assembly is loaded multiple times. Fixes #61152.
4195
4196         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
4197         so multiple satellite assemblies for the same name can be loaded.
4198         Fixes #68259.
4199
4200         * mono_domain_assembly_preload: Actually return the loaded assembly, 
4201         not NULL.
4202
4203         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
4204         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
4205
4206         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
4207         pending finalizers are not invoked after the appdomain has been 
4208         unloaded. Fixes #67862.
4209
4210 2004-10-22  Martin Baulig  <martin@ximian.com>
4211
4212         * mono-debug-debugger.c
4213         (mono_debugger_runtime_invoke): Don't box valuetypes.
4214
4215 2004-10-22  Chris Toshok  <toshok@ximian.com>
4216
4217         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
4218         don't hide private methods.
4219
4220 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
4221
4222         * icall.c: Allows the runtime to "share" (when known) the public key
4223         token of an assembly. This avoid the need to recalculate the token 
4224         (from the public key) in managed code.
4225
4226 2004-10-21  Chris Toshok  <toshok@ximian.com>
4227
4228         * debug-helpers.c (append_class_name): argh, revert last patch.
4229         
4230 2004-10-21  Chris Toshok  <toshok@ximian.com>
4231
4232         * debug-helpers.c (append_class_name): use '+' as the delimiter,
4233         not '/', so that it matches what the debugger uses to look up
4234         methods.
4235
4236 2004-10-21  Martin Baulig  <martin@ximian.com>
4237
4238         * mono-debug-debugger.c (mono_debugger_throw_exception): New
4239         public method; this is called each time an exception is thrown and
4240         allows the debugger to use exception catch points.
4241
4242 2004-10-21  Martin Baulig  <martin@ximian.com>
4243
4244         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
4245         the stack pointer and the exception object in some struct and pass
4246         that to the debugger.
4247
4248 2004-10-21  Chris Toshok  <toshok@ximian.com>
4249
4250         * mono-debug-debugger.c (do_write_class): add instance/static
4251         event support.  We don't expose "raise" or "other" yet.
4252         (event_is_static): new method.
4253
4254 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
4255
4256         * mono-debug-debugger.c
4257         (mono_debugger_handle_exception): Remove
4258         bogus return value for fussy compilers.
4259
4260 2004-10-20  Martin Baulig  <martin@ximian.com>
4261
4262         * mono-debug-debugger.c
4263         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
4264         (mono_debugger_handled_exception): Likewise.
4265
4266 2004-10-20  Martin Baulig  <martin@ximian.com>
4267
4268         * mono-debug-debugger.h (MonoDebuggerEvent): Added
4269         MONO_DEBUGGER_EVENT_EXCEPTION.
4270
4271         * mono-debug-debugger.c (mono_debugger_handle_exception): New
4272         public function to send the debugger a notification for an
4273         exception and inform it about a catch/finally clause.
4274
4275 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
4276
4277         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
4278         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
4279         fix 2.95 build. 
4280
4281         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
4282
4283 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
4284
4285         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
4286         marshalled as [In,Out]. Fixes #58325.
4287
4288 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
4289
4290         * reflection.c (mono_method_body_get_object): Implement some fields.
4291
4292 2004-10-12  Martin Baulig  <martin@ximian.com>
4293
4294         * reflection.c (mono_reflection_bind_generic_parameters): Small
4295         fix, correctly retrieve our parent from a generic instance.
4296
4297 2004-10-12  Martin Baulig  <martin@ximian.com>
4298
4299         * metadata.c (mono_metadata_generic_param_equal): We always have
4300         an owner.
4301
4302         * class.c
4303         (mono_class_from_generic_parameter): We need to have an owner.
4304         (my_mono_class_from_generic_parameter): Likewise.
4305
4306         * reflection.c (mono_reflection_setup_generic_class): Renamed to
4307         mono_reflection_create_generic_class() and added a new
4308         mono_reflection_setup_generic_class().  
4309         (mono_reflection_initialize_generic_param): If we're a nested
4310         generic type and inherited from the containing class, set our
4311         owner to the outer class.
4312
4313 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
4314
4315         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
4316
4317         * reflection.c (mono_method_body_get_object): New function to create
4318         a MethodBody object.
4319
4320         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
4321
4322 2004-10-11  Martin Baulig  <martin@ximian.com>
4323
4324         * metadata.c (_mono_metadata_type_equal): Renamed to
4325         do_mono_metadata_type_equal() and made static.
4326
4327 2004-10-11  Martin Baulig  <martin@ximian.com>
4328
4329         * appdomain.c: Bump corlib version number to 28.
4330
4331 2004-10-10  Martin Baulig  <martin@ximian.com>
4332
4333         * class-internals.h
4334         (MonoGenericInst): Added `MonoGenericContainer *container'.
4335         (MonoGenericMethod): Likewise.
4336         (MonoGenericContext): Likewise.
4337         (MonoGenericParam): Added `MonoGenericContainer *owner'.
4338
4339         * metadata.c
4340         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
4341         (do_mono_metadata_parse_generic_inst): Likewise.
4342         (mono_metadata_parse_type_full): New public method.  This is the actual
4343         mono_metadata_parse_type() implementation - with an additional
4344         `MonoGenericContainer *' argument.
4345         (mono_metadata_parse_array_full): Likewise.
4346         (mono_metadata_parse_signature_full): Likewise.
4347         (mono_metadata_parse_method_signature_full): Likewise.
4348         (mono_metadata_parse_mh_full): Likewise.
4349         (mono_type_create_from_typespec): Likewise.
4350         (mono_metadata_interfaces_from_typedef_full): New public method;
4351         this is similar to the other _full() methods, but we take a
4352         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
4353         (mono_metadata_parse_generic_param): Take an additional
4354         `MonoGenericContainer *' argument and lookup the MonoGenericParam
4355         from that container.
4356         (mono_metadata_generic_param_equal): New static method to compare
4357         two type parameters.
4358         (_mono_metadata_type_equal): New static method; takes an
4359         additional `gboolean signature_only' argument - if true, we don't
4360         compare the owners of generic parameters.
4361         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
4362         with a TRUE argument - do a signature-only comparision.
4363
4364         * loader.c: Use the new _full() methods and pass the
4365         MonoGenericContainer to them.
4366
4367         * object-internals.h (MonoReflectionTypeBuilder): Added
4368         `MonoGenericContainer *generic_container' field.
4369         (MonoReflectionMethodBuilder): Likewise.
4370
4371 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
4372
4373         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
4374         case initial images of dynamic assemblies.
4375
4376         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
4377
4378         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
4379
4380         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
4381         length of event->other array.
4382         (typebuilder_setup_events): Ditto.
4383
4384         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
4385         'assembly_by_name' and add an 'assemblies' list.
4386
4387         * assembly.h assembly.c: Add a new search hook for determining whenever
4388         an assembly is already loaded. Use this instead of searching in the
4389         loaded_assemblies list.
4390
4391         * domain.c appdomain.c: Implement the new search hook so loaded 
4392         assemblies are now scoped by appdomain. Fixes #67727.
4393
4394 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
4395
4396         * threads.c (mono_thread_attach): Initialize synch_lock field so
4397         mono_thread_detach works again.
4398
4399         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
4400         'lib' too. Fixes #63130.
4401
4402 2004-10-06  Jackson Harper  <jackson@ximian.com>
4403
4404         * culture-info-tables.h: regenerated.
4405
4406 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
4407
4408         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
4409         implemented by other interfaces in the result. Fixes #65764.
4410         
4411         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
4412         Handle unloadable modules without crashing.
4413
4414         * image.c (load_modules): Revert the previous patch since modules must
4415         have a fixed index inside the array.
4416         
4417         * image.c (load_modules): Don't include native modules in the modules
4418         array.
4419
4420 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
4421
4422         * reflection.h: Add param_defaults field.
4423
4424         * reflection.c: Add support for parameter defaults in dynamic methods.
4425         Fixes #64595.
4426
4427         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
4428         an empty string when a type has no namespace. Fixes #64230.
4429
4430 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
4431
4432         * tabledefs.h: Added "internal" security actions to support non-CAS
4433         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
4434         Note: they do not seems to be used anymore in 2.0 (new metadata format)
4435
4436 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
4437
4438         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
4439         constructor of abstract class. Fixes #61689.
4440
4441 2004-10-04  Martin Baulig  <martin@ximian.com>
4442
4443         * class-internals.h (MonoGenericContainer): New type.
4444         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
4445         `MonoGenericContainer *generic_container'.
4446         (MonoClass): Replaced `gen_params' and `num_gen_params' with
4447         `MonoGenericContainer *generic_container'.
4448
4449         * metadata.c (mono_metadata_load_generic_params): Return a
4450         `MonoGenericContainer *' instead of a `MonoGenericParam *';
4451         removed the `num' argument.
4452
4453 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
4454
4455         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
4456         for dynamic images.
4457
4458         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
4459         machine fields.
4460
4461         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
4462
4463         * reflection.c: Save pe_kind and machine values into the generated
4464         image file.
4465
4466         * appdomain.c: Bump corlib version number.
4467
4468         * object-internals.h: Reorganize layout of LocalBuilder.
4469
4470         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
4471         New helper function.
4472
4473         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
4474         created MonoType for dynamic types. Fixes #66180.
4475
4476 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
4477
4478         * threadpool.c: the ares hashtable needs a critical section around it.
4479         this prevents some nasty segfaults
4480
4481 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
4482
4483         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
4484         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
4485         bug 67324).
4486         
4487 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
4488
4489         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
4490         
4491 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
4492
4493         * image.c: Always canonicalize image file names, to avoid loading
4494         the same assembly twice when referenced using a relative path.
4495
4496 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
4497
4498         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
4499
4500         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
4501
4502         * marshal.c: Fix warnings.
4503
4504 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
4505
4506         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
4507         attempting to marshal the delegate_trampoline as the method_addr.
4508         This patch has a static hashtable of marshalled delegates so that 
4509         we can map delegate_trampoline addresses back to delegates.  This
4510         allows a delegate passed to managed code to be passed back into native
4511         code.  Fixes #67039
4512
4513 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
4514
4515         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
4516
4517         * reflection.c (method_encode_code): Align method headers properly.
4518         Fixes #66025.
4519
4520 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
4521
4522         * marshal.c: In the runtime invoke wrapper, reset the abort
4523         exception if it is cached. This avoids the automatic rethrowal of 
4524         the exception after the catch of the wrapper. Also check for pending
4525         interruptions before calling the managed method. This is done using
4526         the new method emit_thread_force_interrupt_checkpoint, since the
4527         normal checkpoint method is ignored when running the invoke wrapper.
4528         * object.c: If the abort exception is rethrown, set the abort_exc
4529         field of the thread, so it will be rethrown aftere every catch.
4530         * threadpool.c: Only run an interruption checkpoint if what has been
4531         requested is a stop of the thread (aborts will be ignored).
4532         * threads.c: By default, a thread will now never be interrumped while
4533         running the runtime invoke wrapper (this ensures that runtime_invoke
4534         will always return to the caller if an exception pointer is provided).
4535         There is a new special method mono_thread_force_interruption_checkpoint()
4536         to force an interruption checkpoint even if running a protected
4537         wrapper, which is used by the same runtime invoke wrapper to do a check
4538         at a safe point.
4539
4540 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
4541
4542         * object.c, object-internals.h: Implemented mono_release_type_locks,
4543         which releases the cctor locks held by a thread.
4544         * threads.c, threads.h: In thread_cleanup, release cctor locks held
4545         by a thread. Added mono_thread_exit() method to be used to safely stop
4546         a thread.
4547
4548 2004-09-28  Raja R Harinath  <rharinath@novell.com>
4549
4550         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
4551         Move null check before dereference.  Avoid indexing beyond the end
4552         of the 'modules' array.
4553
4554 2004-09-28  Raja R Harinath  <rharinath@novell.com>
4555
4556         * metadata-internals.h (MonoImage): Add module_count field.
4557         * image.c (load_modules): Set image->module_count.
4558         (mono_image_load_file_for_image): Use image->module_count.
4559         * reflection.c (mono_image_load_module): Append to image->modules array 
4560         of dynamic assembly.
4561         (mono_module_get_object): Fix loop to actually increment index.
4562         Use image->module_count.
4563         * assembly.c (mono_assembly_load_references): Use image->module_count.
4564         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4565         Likewise.
4566
4567 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
4568
4569         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
4570         Avoid assert on generic types.
4571
4572 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
4573
4574         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
4575
4576         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
4577
4578         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
4579         function to convert a MarshalSpec structure to its managed counterpart.
4580
4581         * reflection.c: Fix warnings.
4582         
4583         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
4584         field.
4585
4586         * icall.c (mono_create_icall_signature): Fix build.
4587
4588 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
4589
4590         * icall.c: Add MakePointType icall.
4591
4592         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
4593         warnings.
4594
4595 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4596
4597         * threadpool.c: reuse allocated slots in the queue.
4598
4599 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
4600
4601         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
4602
4603         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
4604
4605         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
4606         previous change.
4607
4608         * tabledefs.h: Add constants for pinvoke attributes BestFit and
4609         ThrowOnUnmappableChar.
4610
4611         * icall.c (ves_icall_Type_GetPacking): New icall.
4612
4613 2004-09-24  Martin Baulig  <martin@ximian.com>
4614
4615         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
4616
4617 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4618
4619         * appdomain.c:
4620         (mono_domain_set): allow setting a domain that is being unloaded.
4621         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
4622         being unloaded.
4623
4624 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
4625
4626         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
4627         the GetCustomAttributes icall.
4628
4629 2004-09-23  Martin Baulig  <martin@ximian.com>
4630
4631         * object-internals.h (MonoReflectionGenericParam): Replaced
4632         'has_ctor_constraint', `has_reference_type' and `has_value_type'
4633         with `guint32 attrs'.
4634
4635 2004-09-23  Martin Baulig  <martin@ximian.com>
4636
4637         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
4638
4639 2004-09-23  Martin Baulig  <martin@ximian.com>
4640
4641         * object-internals.h (GenericParameterAttributes): New enum.
4642
4643 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
4644
4645         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
4646         
4647         * class.c (init_events): Fill out event->other field.
4648
4649         * class.c: Fix warnings.
4650
4651         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
4652
4653 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
4654
4655         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
4656         walk which doesn't supply the IL offset.
4657
4658 2004-09-22  Martin Baulig  <martin@ximian.com>
4659
4660         * reflection.c (mono_reflection_setup_internal_class): If we're
4661         System.ValueType, System.Object or System.Enum, set
4662         `klass->instance_size' and create the vtable.
4663         (mono_reflection_create_internal_class): If we're an enum type,
4664         get the base class from our current corlib.
4665
4666 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
4667
4668         * reflection.h (MonoResolveTokenError): New type.
4669
4670         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
4671         icall.
4672
4673         * icall.c: Add an 'error' argument to the ResolveToken icalls.
4674
4675 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
4676
4677         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
4678         Support also calling constructors, but only for already allocated objects.
4679
4680 2004-09-17  Geoff Norton <gnorton@customerdna.com>
4681
4682         * reflection.c (type_get_qualified_name): If the klass is null
4683         return the typename to avoid a NullRefEx.
4684         (encode_cattr_value): Get the qualified name of the boxed type,
4685         not the underlying enumtype.  Fixes #62984.
4686
4687 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
4688
4689         * marshal.c: Fix problems with previous checkin.
4690
4691 2004-09-21    <vargaz@freemail.hu>
4692
4693         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
4694         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
4695
4696         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
4697
4698 2004-09-21  Geoff Norton <gnorton@customerdna.com>
4699
4700         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
4701         should only return a type for pointers, arrays, and passbyref types.
4702         Fixes bug #63841.
4703
4704 2004-09-21  Martin Baulig  <martin@ximian.com>
4705
4706         * domain.c (mono_debugger_check_runtime_version): New public
4707         function.
4708
4709         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
4710
4711 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
4712
4713         * reflection.c: Added missing sort to the declarative security 
4714         attributes table. MS implementation stops seeing the attributes if the
4715         token number regress in the table (as shown by ildasm and permview).
4716
4717 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
4718
4719         * object-internals.h (MonoReflectionModule): Add 'token' field.
4720         
4721         * reflection.c (mono_reflection_get_token): Add support for Module
4722         and Assembly.
4723         (mono_module_get_object): Set 'token' field.
4724         (mono_module_file_get_object): Set 'token' field.
4725
4726         * icall.c: Add new Assembly and Module icalls.
4727
4728         * appdomain.c: Bump corlib version.
4729
4730 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
4731
4732         * loader.h loader.c class.h class.c: Add helper functions for obtaining
4733         tokens of metadata objects.
4734
4735         * reflection.h reflection.c (mono_reflection_get_token): New function
4736         to obtain the token of a metadata object.
4737
4738         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
4739
4740 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
4741
4742         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
4743         
4744         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
4745
4746 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
4747
4748         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
4749         * object-internals.h: Added 3 MonoArray* members to MonoReflection
4750         AssemblyBuilder to access the permissions set in the class lib.
4751         * reflection.c: Added security attributes encoding step in 
4752         mono_image_build_metadata.
4753         * tabledefs.h: Added new security actions defined in 2.0:
4754         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
4755
4756 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
4757
4758         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
4759         macro parameter.
4760
4761 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
4762  
4763         * locales.c: nullify the ICU_collator member of CompareInfo when it is
4764           finalized. There where random SIGSEVs at program termination, when
4765           an object being finalized was trying to do a string comparison and
4766           the current culture was already finalized.
4767  
4768 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4769
4770         * threads.c: call thread_cleanup before finishing the thread if we get
4771         there.
4772
4773 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
4774
4775         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
4776         assemblies from the parent. Fixes #65665.
4777
4778 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
4779
4780         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
4781         modifiers.
4782
4783 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
4784
4785         * reflection.h: add prototype for mono_get_dbnull_object
4786         * reflection.c: add prototypes for get_default_param_value_blobs 
4787         and mono_get_object_from_blob for fussier compilers
4788
4789 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
4790  
4791         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
4792         false deadlock checks in class initialization.
4793  
4794 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
4795
4796         * image.c (mono_image_addref): Fix comment.
4797
4798         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
4799         possible.
4800
4801 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
4802
4803         * reflection.c (mono_param_get_objects): Modified to return
4804         ParameterInfo.DefaultValue object.
4805
4806         (get_default_param_value_blobs):
4807         (mono_get_object_from_blob):
4808         (mono_get_dbnull_object): New helper routines. 
4809
4810         * object.c (mono_get_constant_value_from_blob): New helper routine
4811         carved out from get_default_field_value ()
4812
4813         * object-internals.h (mono_get_constant_value_from_blob): Added
4814         function declaration.
4815
4816 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
4817
4818         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
4819         referenced assemblies. Fixes #62135.
4820
4821         * exception.h exception.c (mono_get_exception_file_not_found2): New
4822         helper function.
4823
4824 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
4825
4826         * class.h class.c: Add mono_type_get_underlying_type ().
4827
4828 2004-09-09  Geoff Norton <gnorton@customerndna.com>
4829
4830         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
4831         Fix GetTypes() to support dynamically created assemblies.
4832
4833 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
4834
4835         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
4836         
4837         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
4838         previous patch.
4839
4840         * reflection.h reflection.c loader.c: Allow dynamic construction of
4841         pinvoke methods. Fixes #65571.
4842         
4843         * reflection.c (mono_reflection_get_type): Revert previous change since
4844         it causes regressions.
4845
4846 2004-09-08  Martin Baulig  <martin@ximian.com>
4847
4848         * class.c (class_compute_field_layout): Don't call
4849         mono_class_layout_fields() for open generic instances.
4850
4851 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
4852         * threads.c appdomain.c: fix typo in GC macro
4853
4854 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4855
4856         * threads.c: don't call mono_thread_detach() in start_wrapper(),
4857         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
4858
4859 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
4860
4861         * image.c (mono_image_close): Applied patch from 
4862         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
4863         assembly is loaded multiple times from data.
4864         
4865         * image.c (mono_image_open): Fix warning.
4866
4867 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
4868
4869         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
4870         once. Fixes #58334.
4871         
4872         * reflection.c (mono_reflection_create_runtime_class): Initialize
4873         klass->nested_classes. Fixes #61224.
4874
4875 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
4876
4877         * threads.c: sched_yield() on exit, to allow threads to quit.
4878
4879 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
4880
4881         * object.c (mono_unhandled_exception): Remove leftover debug code.
4882
4883 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
4884
4885         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
4886
4887 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
4888
4889         * marshal.c (emit_marshal_array): Really null terminate string arrays.
4890         
4891         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
4892
4893 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
4894
4895         * marshal.c (emit_marshal_array): Null terminate string arrays.
4896         
4897         * marshal.c (raise_auto_layout_exception): Fix warning.
4898
4899         * reflection.c (mono_param_get_objects): Initialize the default value
4900         with DBNull.Value, not null. Fixes #62123.
4901
4902 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
4903
4904         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
4905         throw an exception with a cute explanation.
4906
4907 2004-09-06  Dick Porter  <dick@ximian.com>
4908
4909         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
4910         Close the new process's thread handle, as we don't use it.  The
4911         handle stays around forever otherwise.
4912
4913 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
4914
4915         * object.c (arith_overflow): Fix warning.
4916
4917         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
4918         calling conventions in method refs. Fixes #65352.
4919
4920         * reflection.c: Fix warnings.
4921
4922 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
4923
4924         * icall.c: Add a new icall for Array.Clear
4925
4926 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
4927
4928         * object.c: When allocating an array, we have to throw
4929         an overflow exception if any of the lengths are < 0.
4930
4931 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
4932
4933         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
4934         properly. Also move implementation of string array marshalling to 
4935         managed code. Fixes #42316.
4936
4937 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4938
4939         * assembly.c: provide more information when loading an assembly fails.
4940
4941 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4942
4943         * filewatcher.c: don't expect the development fam package to be
4944         installed.
4945
4946 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
4947
4948         * marshal.c: Make a copy of the signature cookie since it will be
4949         freed by the caller.
4950         
4951         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
4952
4953         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
4954
4955         * metadata.c (mono_metadata_free_marshal_spec): New function to free
4956         marshal specs.
4957
4958         * marshal.c: More refactoring.
4959         
4960         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
4961         smaller functions.
4962
4963 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
4964
4965         * object.c: In mono_message_invoke, fill the output parameter array after
4966           calling the managed method (it was done before the call). This fixes
4967           bug #59299.
4968
4969 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
4970
4971         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
4972         as well.
4973
4974 2004-09-02  Martin Baulig  <martin@ximian.com>
4975
4976         * class.c (mono_class_instance_size): Don't allow generic type
4977         definitions or open generic instances.
4978         (mono_class_array_element_size): If we're a value type, call
4979         mono_class_instance_size() on the original class.
4980
4981         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
4982         handle generic instances.
4983
4984         * mono-debug-debugger.c (write_type): Handle generic instances
4985         like classes.
4986
4987 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
4988
4989         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
4990         the allocation request fails. Fixes #65089.
4991
4992         * object.c (mono_runtime_free_method): Do not call mono_free_method.
4993         
4994         * object.c (mono_runtime_free_method): New function to free a dynamic
4995         method.
4996
4997         * marshal.c (mono_delegate_free_ftnptr): New function to free the
4998         delegate trampoline.
4999
5000         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
5001         with hasthis as dynamic,
5002
5003         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
5004
5005         * domain.c (mono_jit_info_table_remove): New function to remove an
5006         entry from the jit info table.
5007
5008         * class-internals.h (MonoMethod): Add 'dynamic' field.
5009
5010         * loader.c: Fix warnings.
5011
5012 2004-09-01  Martin Baulig  <martin@ximian.com>
5013
5014         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
5015         instead of mono_debugger_lock() because the latter one is a no-op
5016         unless running in the debugger.
5017
5018 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
5019
5020         * class.c (class_compute_field_layout): Classes with auto-layout or
5021         reference fields are not blittable.
5022         
5023 2004-09-01  Dick Porter  <dick@ximian.com>
5024
5025         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
5026         mono_image_get_filename() to get the assembly location.
5027
5028         * icall.c:
5029         * metadata.h: Fix compile warnings
5030
5031 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
5032
5033         * class.c (class_compute_field_layout): System.Object is blittable.
5034
5035         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
5036         as in/out. Fixes #59909.
5037
5038 2004-09-01  Martin Baulig  <martin@ximian.com>
5039
5040         * metadata.h (MONO_TYPE_ISREFERENCE): Call
5041         mono_metadata_generic_inst_is_valuetype() if we're a generic
5042         instance to check whether our underlying type is a reference type.
5043
5044 2004-09-01  Martin Baulig  <martin@ximian.com>
5045
5046         * metadata.c (mono_type_size): If we're a generic instance, call
5047         mono_class_value_size() for value types.
5048
5049 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
5050
5051         * marshal.c: Implement more custom marshalling functionality. Fixes
5052         #64915.
5053
5054 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5055
5056         * mono-debug.c, debug-mono-symfile.c: add some locking love.
5057
5058 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
5059
5060         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
5061
5062         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
5063
5064         * icall.c: Fix some warnings.
5065
5066         * threads.c (abort_appdomain_thread): Fix unref errors.
5067         (mono_thread_current): Fix THREAD_DEBUG define.
5068
5069 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
5070
5071         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
5072
5073         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
5074
5075 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
5076
5077         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
5078         string arrays.
5079
5080 2004-08-28  Martin Baulig  <martin@ximian.com>
5081
5082         * metadata.c
5083         (mono_metadata_generic_inst_is_valuetype): New public function.
5084
5085         * metadata.h (MONO_TYPE_ISSTRUCT): Call
5086         mono_metadata_generic_inst_is_valuetype() if we're a generic
5087         instance to check whether our underlying type is a valuetype.
5088
5089 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
5090
5091         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
5092         #63768.
5093
5094 2004-08-25  Martin Baulig  <martin@ximian.com>
5095
5096         * loader.c (mono_get_method_from_token): Abstract methods can also
5097         be generic and thus have type parameters.
5098
5099         * metadata-internals.h
5100         (MonoDynamicImage): Added `GPtrArray *gen_params'.
5101
5102         * reflection.c (mono_image_get_generic_param_info): Don't create a
5103         metadata row, just add an entry to the `gen_params' array.
5104         (build_compressed_metadata): Sort the `gen_params' array and then
5105         actually create the metadata.
5106
5107 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5108
5109         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
5110
5111 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
5112
5113         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
5114
5115 2004-08-24  Martin Baulig  <martin@ximian.com>
5116
5117         * class.cs (mono_class_is_subclass_of): Like an interface, a
5118         generic instance also derives from System.Object.
5119
5120 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
5121
5122         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
5123         custom modifiers to be in any order. Fixes #61990.
5124
5125 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
5126
5127         * object.c: Register mono_object_new_fast icall.
5128         
5129         * object.c (mono_class_get_allocation_ftn): Return to calling
5130         mono_object_new_fast, since it seems faster to compute the object 
5131         size in unmanaged code than passing it as a parameter.
5132
5133         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
5134
5135         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
5136         this function with Boehm as the oom handler, so we don't have to check
5137         the result of GC_malloc.
5138
5139         * object.c: Remove checks for oom.
5140
5141         * object.h object.c (mono_class_get_allocation_ftn): New function to
5142         return the icall which can be used to allocate an instance of a given
5143         class. 
5144
5145         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
5146
5147         * class-internals.h: Add 'enabled' field.
5148
5149 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
5150
5151         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
5152
5153 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
5154         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
5155         value 0x0010.
5156
5157 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
5158
5159         * appdomain.c: use the Tls function for appdomain too,
5160         at Zoltan's request. Actually return in mono_context_get
5161
5162         * appdomain.c, profiler.c, threads.c: use __thread
5163
5164 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
5165
5166         * appdomain.c threads.c: Call GC_CreateThread on windows.
5167
5168         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
5169         multiple libraries since this don't work on windows.
5170
5171 2004-08-18  Martin Baulig  <martin@ximian.com>
5172
5173         * class-internals.h
5174         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
5175         MonoMethodHeader.
5176
5177         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
5178         MonoMethodNormal since we also need it for abstract and interface
5179         methods.
5180
5181         * reflection.c
5182         (build_compressed_metadata): Sort the GenericParam table.
5183         (mono_image_create_token): Added `gboolean create_methodspec'
5184         argument; this is false when generating a MethodImpl token.
5185         (reflection_methodbuilder_to_mono_method): Abstract and interface
5186         methods may also have generic parameters.
5187
5188 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
5189
5190         * appdomain.c: thread local alloc
5191
5192 2004-08-17  Martin Baulig  <martin@ximian.com>
5193
5194         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
5195
5196         * icall.c
5197         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
5198         argument.
5199
5200         * class.c (mono_type_get_full_name): New public function.
5201         (mono_type_get_name): Don't include the type arguments.
5202
5203 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
5204
5205         * Makefile.am: Build static versions of libmetadata and libmonoruntime
5206         for inclusion into the mono executable.
5207
5208 2004-08-16  Martin Baulig  <martin@ximian.com>
5209
5210         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
5211         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
5212
5213 2004-08-14  Martin Baulig  <martin@ximian.com>
5214
5215         * class.c (dup_type): Also copy the `byref' field.
5216
5217 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
5218
5219         * reflection.c (create_dynamic_mono_image): Revert the last change 
5220         since it breaks bootstrap.
5221
5222 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
5223
5224         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
5225
5226         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
5227         not free them with g_free.
5228
5229 2004-08-11  Martin Baulig  <martin@ximian.com>
5230
5231         * reflection.c (mono_reflection_setup_internal_class): Also call
5232         mono_class_setup_mono_type() if we already have a `tb->type.type'.
5233
5234 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
5235
5236         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
5237         called during default (first) AppDomain creation. Keep track of
5238         Evidence when loading assemblies.
5239
5240 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
5241
5242         * opcodes.c, opcodes.h: reduce runtime relocations.
5243
5244 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
5245
5246         * culture-info.h, locales.c: fixes and chages to sue the new
5247         optimized format of the locale data.
5248         * culture-info-tables.h: regenerated.
5249
5250 2004-08-06  Geoff Norton <gnorton@customerdna.com>
5251         
5252         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
5253
5254 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
5255
5256         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
5257         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
5258         * domain-internals.h: icall declaration.
5259         * icall.c: icall registration.
5260         * object-internals.h: New fields in MonoAssembly for CAS.
5261
5262 2004-08-05  Duncan Mak  <duncan@ximian.com>
5263
5264         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
5265         CEE_LDELEM_ANY.
5266
5267 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
5268
5269         * reflection.c: fix to deal with object[] arrays in custom ctors
5270         (bug #62550).
5271
5272 2004-08-05  Martin Baulig  <martin@ximian.com>
5273
5274         * class.c (mono_class_array_element_size): Added support for
5275         generic instances and correctly handle "recursive" types.
5276
5277 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
5278
5279         * assembly.c: Fix warnings.
5280
5281 2004-08-04  Martin Baulig  <martin@ximian.com>
5282
5283         * class.c
5284         (mono_type_get_name_recurse): Added `gboolean include_arity'
5285         argument specifying whether or not we should include the generic
5286         arity in the type name.
5287         (_mono_type_get_name): New static function.
5288         (mono_class_setup_vtable): If we're a generic instance, don't
5289         include the generic arity in the names of explicit method
5290         implementations.        
5291
5292 2004-08-03  Martin Baulig  <martin@ximian.com>
5293
5294         * class.c (mono_type_get_name_recurse): Enclose the generic type
5295         arguments in `<', '>'.
5296
5297 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
5298
5299         * gc.c: make GC warning messages use the trace API, they are just
5300         noise to most of the users.
5301
5302 2004-08-03  Martin Baulig  <martin@ximian.com>
5303
5304         * debug-mono-symfile.c (read_string): Correctly read the string.
5305
5306 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
5307
5308         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
5309         
5310         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
5311         icalls.
5312         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
5313
5314 2004-07-30  Martin Baulig  <martin@ximian.com>
5315
5316         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
5317         Reflect latest symbol writer changes.   
5318
5319 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
5320
5321         * object.c: always create an object if null is passed
5322         to Invoke() where a valuetype is expected.
5323
5324 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
5325
5326         * marshal.c (mono_marshal_init): make managed
5327         signatures match native ones better for 64bits.
5328
5329 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5330
5331         * appdomain.c: hack to build correctly the private bin path on windows.
5332         Fixes bug #61991.
5333
5334 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
5335
5336         * assembly.c: Load mscorlib from the correct framework directory
5337           (mono/<version>/mscorlib.dll).
5338         * appdomain.h: Added prototypes for new functions.
5339         * internals.h: Added some prototypes.
5340         * domain.c: When initializing the runtime, get from the executable and
5341           the configuration files the runtime version that the app supports.
5342           Added support methods for reading app.exe.config. Added list of versions
5343           supported by the JIT. Added two new methods: mono_init_from_assembly,
5344           which initializes the runtime and determines the required version from
5345           the provided exe file, and mono_init_version, which initializes
5346           the runtime using the provided version.
5347         * icall.c: Get machine.config from version-specific directory.
5348         * reflection.c: When generating an image, embed the version number
5349           of the current runtime.
5350
5351 2004-07-28  Dick Porter  <dick@ximian.com>
5352
5353         * socket-io.c
5354         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
5355         returned sockaddr size before creating the remote address object.
5356         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
5357         61608.
5358
5359 2004-07-28  Dick Porter  <dick@ximian.com>
5360
5361         * locales.c (string_invariant_compare_char): Fix invariant char
5362         compares between upper and lower cases.  Fixes bug 61458.
5363
5364 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
5365         
5366         * marshal.c: actually cache stelem.ref wrappers.
5367         
5368 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
5369
5370         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
5371         sections and remove the mono_cli_rva_map () function.
5372
5373 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
5374
5375         * debug-mono-symfile.c: fix one more endianess issue, from a patch
5376         by Geoff Norton (<gnorton@customerdna.com>).
5377
5378 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
5379
5380         * class.c: fix class loads for pointer types (typeof(int) !=
5381         typeof(int*)).
5382
5383 2004-07-27  Martin Baulig  <martin@ximian.com>
5384
5385         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
5386         reading the debugging information from an external ".mdb" file.
5387
5388 2004-07-24  Martin Baulig  <martin@ximian.com>
5389
5390         * reflection.c (mono_image_get_type_info): Only write a class
5391         layout entry if we actually have a size or a packing size.
5392
5393 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
5394
5395         * reflection.c (type_get_fully_qualified_name): 
5396         insert cast to get type checking of ?: with non-gcc compilers
5397
5398 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
5399
5400         * rand.c: use g_getenv for both lookups of
5401         MONO_EGD_SOCKET
5402
5403 2004-07-17  Martin Baulig  <martin@ximian.com>
5404
5405         * reflection.c (mono_reflection_bind_generic_method_parameters):
5406         Set `gmethod->reflection_info'.
5407
5408 2004-07-17  Martin Baulig  <martin@ximian.com>
5409
5410         * class.c (mono_class_create_from_typedef): Insert the newly
5411         created class into the hash table before computing the interfaces
5412         since we could be called recursively.
5413
5414 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
5415
5416         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
5417         function to implement stelem.ref in managed code
5418         * class-internals.h, debug-helpers.c: a new wrapper type
5419         for the above.
5420
5421 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
5422
5423         * gc.c: allow GC handles to work even when no GC is compiled in.
5424         Fix part of bug #61134 (GetAddrOfPinnedObject).
5425
5426 2004-07-13  Peter Williams  <peter@newton.cx>
5427  
5428         * process.c (complete_path): Make sure we don't attempt to execute
5429         directories.
5430  
5431 2004-07-12  Geoff Norton <gnorton@customerdna.com>
5432
5433         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
5434           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
5435           and will add/subtract the hour if needed
5436
5437 2004-07-12  Martin Baulig  <martin@ximian.com>
5438
5439         * reflection.c (mono_field_get_object): If we have
5440         `field->generic_info', take the attributes from
5441         `field->generic_info->generic_type'.    
5442
5443 2004-07-12  Martin Baulig  <martin@ximian.com>
5444
5445         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
5446         This function must be called before initializing the runtime.
5447         (mono_debug_init_1): New function; call this after initializing
5448         the runtime, but before loading the assembly.  It tells the
5449         debugger to load corlib and the builtin types.
5450
5451         * mono-debug-debugger.c: Did some larger changes in the debugging
5452         code; support recursive class declarations, make sure we actually
5453         add all classes.
5454
5455 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5456
5457         * debug-helpers.c: undo my previous patch and fixed the real issue in
5458         ../mini/exceptions-x86.c
5459
5460 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5461
5462         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
5463         when no HOME env. variable was set and a NullRef was thrown in a .cctor
5464         called from other .cctors.
5465
5466 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
5467
5468         * loader.c: Removed the mono_loader_wine_init hack now that we are
5469         doing a managed version of Windows.Forms.
5470
5471 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
5472
5473         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
5474         threadpool.c, threads.c: remove static data from rootset.
5475
5476 2004-07-09  Dick Porter  <dick@ximian.com>
5477
5478         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
5479         Don't do any more processing if the matched length was 0.  It was
5480         increasing the size of the string before.  Fixes bug 61167.
5481
5482 2004-07-09  Dick Porter  <dick@ximian.com>
5483
5484         * socket-io.h:
5485         * socket-io.c
5486         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
5487         Add support for SO_PEERCRED if its available.
5488
5489 2004-07-09  Peter Bartok <pbartok@novell.com>
5490         * loader.c: winelib.exe.so error message is now only displayed if
5491         MONO_DEBUG is set. To help us avoid questions when people are trying
5492         out the new Managed.Windows.Forms.
5493
5494 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
5495
5496         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
5497         for isinst and castclass wrappers.
5498
5499         * class-internals.h icall.c: Move registration and lookup of JIT icalls
5500         to libmetadata from the JIT, so they could be used by the marshalling
5501         code and the interpreter.
5502
5503         * marshal.c: Register marshalling related JIT icalls here instead of
5504         in mini.c. Use CEE_MONO_ICALL instead of the family of 
5505         CEE_MONO_PROC<x> opcodes to call marshalling functions.
5506
5507         * metadata.h: Remove unneeded marshalling conversions.
5508
5509         * opcodes.c: Update for new opcodes.
5510         
5511 2004-07-08  Martin Baulig  <martin@ximian.com>
5512
5513         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
5514         (mono_debug_get_domain_data): Make this function static.
5515
5516 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
5517
5518         * gc.c, object.h: add nice GC handle API for embedders.
5519
5520 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
5521
5522         * reflection.c: more changes for the new api
5523
5524         * object.c: When we reflect on a field w/ a constant value, it
5525         will not have a memory location, so we must access metadata. Also,
5526         allow easier reading of strings so that we can read them from
5527         the constant data.
5528
5529         * class.c (mono_class_layout_fields): no need for literal fields here.
5530
5531         * class-internals.h: api changes for const fields
5532
5533         * icall.c (ves_icall_get_enum_info): use new apis for const fields
5534
5535 2004-07-06  Martin Baulig  <martin@ximian.com>
5536
5537         * mono-debug.h: Increment version number to 44.
5538
5539         * mono-debug.c (mono_debug_add_wrapper): The second argument is
5540         now a gpointer, rewrote this whole method.
5541
5542         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
5543         function.  Add information about the wrapper in a new "misc table".
5544
5545         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
5546         for the new misc table.
5547
5548 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
5549
5550         * metadata-internals.h image.c: Add a cache for helper signatures.
5551
5552         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
5553
5554 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
5555
5556         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
5557         delegates from a delegate. Fixes #61033.
5558         
5559         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
5560         marshalling of stringbuilder arrays. Fixes #59900.
5561
5562 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
5563
5564         * icall.c: Add EnumBuilder:setup_enum_type icall.
5565
5566 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
5567
5568         * icall.c: Added a new icall for the property version of
5569         OffsetOfStringData.
5570
5571 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
5572
5573         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
5574         it has a constant size across platforms.
5575
5576         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
5577         stack trace.
5578
5579 2004-06-29  Martin Baulig  <martin@ximian.com>
5580
5581         * mono-debug.c (mono_debug_add_method): Protect the whole function
5582         in mono_debugger_lock(), not just parts of it.
5583
5584 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
5585
5586         * reflection.c: make sure padding bytes in heaps are zeroed.
5587
5588 2004-06-24  David Waite  <mass@akuma.org>
5589
5590         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
5591         image.c, loader.c, locales.c, marshal.c, metadata.c,
5592         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
5593         string-icalls.c, threads.c: change to C90-style comments from C99 /
5594         C++ -style
5595
5596 2004-06-24  Dick Porter  <dick@ximian.com>
5597
5598         * threads.c
5599         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
5600         return createdNew.  Fixes bug 60412.
5601
5602         * threads-types.h: 
5603         * icall.c: Add createdNew parameter to CreateMutex icall
5604
5605 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5606
5607         * reflection.c, object-internals.h: save default value in params.
5608
5609 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5610
5611         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
5612         no need to build a new path combining that with the application base.
5613         Fixes bug #60442.
5614
5615 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
5616
5617         * reflection.c: fixed minor standard compliance issues.
5618
5619 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
5620
5621         * reflection.c: fixed issue with encoding some custom attributes
5622         (arrays in properties and fields, bug #60411).
5623
5624 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5625
5626         * reflection.c: fix start address when copying the public key token.
5627
5628 2004-06-23  Martin Baulig  <martin@ximian.com>
5629
5630         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
5631         the `exc' object in a static object to put it into the GC's root set.
5632
5633 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
5634
5635         * reflection.c: make mono_reflection_setup_internal_class ()
5636         callable a second time to setup a new parent class.
5637
5638 2004-06-23  Dick Porter  <dick@ximian.com>
5639
5640         * threads.c: Check for WAIT_IO_COMPLETION return values.
5641
5642 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
5643
5644         * appdomain.c: Removed the g_free on the public key token. Now copy 
5645         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
5646         * assembly.c: Added public key token string value when loading 
5647         assemblies. Fix bug #60439.
5648         * icall.c: Added missing informations (like public key) in 
5649         GetReferencedAssemblies. Fix #60519.
5650         * image.h: Changed definition for public key token from const char*
5651         public_tok_value to guchar public_key_token [17];
5652         * reflection.c: Updated for changes to public key token.
5653
5654 2004-06-22  Lluis Sanchez Gual
5655
5656         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
5657         for the field in base classes.
5658
5659 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
5660
5661         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
5662         mark headers as not supported, they are installed only for use by the
5663         debugger.
5664
5665 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
5666
5667         * *.c, *.h: avoid namespace pollution in public headers.
5668
5669 2004-06-21  Martin Baulig  <martin@ximian.com>
5670
5671         * exception.c (mono_get_exception_security): It's in
5672         "System.Security", not in "System".
5673
5674         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
5675         the exception classes.
5676
5677 2004-06-21  Martin Baulig  <martin@ximian.com>
5678
5679         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
5680         Protect the exception object from being finalized.
5681
5682 2004-06-21  Martin Baulig  <martin@ximian.com>
5683
5684         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
5685         public function.
5686
5687 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
5688
5689         * reflection.c: Load the assembly in mono_reflection_type_from_name,
5690         if it was not loaded before. Fix parts of #60439.
5691
5692 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
5693
5694         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
5695         code that was broken since Ben's change: wrappers are now
5696         dependent on the method signature only again.
5697
5698 2004-06-21  Martin Baulig  <martin@ximian.com>
5699
5700         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
5701         added interface support.
5702
5703 2004-06-21  Martin Baulig  <martin@ximian.com>
5704
5705         * class.c (mono_vtable_get_static_field_data): New public method.
5706
5707 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
5708
5709         * filewatcher.c : Windows build fix to be compliant with API changes.
5710
5711 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
5712
5713         * class.h, class.c: more accessors.
5714         * metadata.h, metadata.c: prepare for hiding MonoType and
5715         MonoMethodSignature: people should use the accessors from now on
5716         outside of the tree.
5717
5718 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
5719
5720         * *.c, *.h: more API cleanups.
5721
5722 2004-06-18  Jackson Harper  <jackson@ximian.com>
5723
5724         * assembly.c: Trace loading assemblies.
5725         * loader.c: Trace loading native libraries.
5726         * mono-config.c: Trace loading config files.
5727         
5728 2004-06-18  Dick Porter  <dick@ximian.com>
5729
5730         * locales.c: Tell ICU the lengths of strings, it can cope with
5731         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
5732
5733 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
5734
5735         * image.c: swapped name/filename;
5736
5737 2004-06-18  Martin Baulig  <martin@ximian.com>
5738
5739         * mono-debug-debugger.c (write_class): Write the parent class at
5740         the end of the header.
5741
5742 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
5743
5744         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
5745
5746 2004-06-17  Raja R Harinath  <rharinath@novell.com>
5747
5748         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
5749         (bundle_obj): New conditional define.
5750         (BUILT_SOURCES): Remove.
5751         ($(bundle_srcs)): Make parallel-make safe.
5752         (libmonoruntime_la_LIBADD): Make unconditional.
5753         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
5754         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
5755
5756 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
5757
5758         * culture-info-tables.h: It was inconsistent with the latest
5759           supp info files.
5760
5761 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
5762
5763         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
5764         be loaded.
5765
5766         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
5767         with gcc 2.95.
5768
5769 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
5770
5771         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
5772         cleaned up public header threads.h.
5773
5774 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5775
5776         * Makefile.am, *.c, *.h: more API cleanups.
5777
5778 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
5779
5780         * Makefile.am: removed monosn from compilation.
5781         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
5782         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
5783         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
5784         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
5785         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
5786         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
5787
5788 2004-06-15  Jackson Harper  <jackson@ximian.com>
5789
5790         * assembly.c: Make locales lower case when searching the GAC for
5791         assemblies. gacutil will always make locales lowercase when
5792         installing so this effectively makes them case insensitive.
5793         
5794 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
5795
5796         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
5797         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
5798           parameter which allows to choose whether the wait can be interrupted or 
5799           not. Also added the method mono_monitor_enter(), which locks the monitor
5800           using an infinite wait and without allowing interruption.
5801           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
5802           interrupted.
5803         * object.h: Added new fields in MonoThread. suspend_event holds the event
5804           used to susped/resume the thread. synch_lock is the lock object to use for
5805           modifying the thread state.
5806         * threads.c: Use the new synch_lock object for locking, instead of "this",
5807           which can generate deadlocks.
5808           Moved thread state change in Thread.Sleep and Thread.Join from managed
5809           to unmanaged code. This avoids a deadlock when the thread was suspended
5810           just after acquiring the thread lock.
5811           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
5812           Implemented Thread.Suspend using an event instead of ThreadSuspend,
5813           which is not fully implemented in the io-layer.
5814         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
5815
5816 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
5817
5818         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
5819         threads-types.h: more API cleanups.
5820
5821 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
5822
5823         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
5824         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
5825         threadpool.c, threads.c: first pass at the exported API cleanup.
5826
5827 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
5828
5829         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
5830
5831 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5832
5833         * icall.c: added internalGetHome.
5834
5835 2004-06-14  Dick Porter  <dick@ximian.com>
5836
5837         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
5838         possible to return successfully when '.' or '..' were the only
5839         entries in a directory, but were skipped.  The MonoIOStat was not
5840         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
5841         Fixes bug 59574.
5842
5843 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5844
5845         * reflection.c: make binaries run on .Net 1.1 by default.
5846
5847 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
5848
5849         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
5850
5851 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
5852
5853         * marshal.c: keep track of struct size with explicit layout
5854         (bug #59979).
5855
5856 2004-06-12  Martin Baulig  <martin@ximian.com>
5857
5858         * mono-debug-debugger.c: Comment out a debugging g_message().
5859
5860 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
5861
5862         * reflection.c, reflection.h: do not free custom attrs that are cached.
5863         * icall.c: use braces to make code clearer.
5864
5865 2004-06-11  Martin Baulig  <martin@ximian.com>
5866
5867         * class.h (MonoInflatedField): New type.
5868         (MonoClassField): Replaced `MonoType *generic_type' with
5869         `MonoInflatedField *generic_info'.
5870
5871         * icall.c
5872         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
5873
5874 2004-06-11  Martin Baulig  <martin@ximian.com>
5875
5876         * reflection.c (mono_image_create_method_token): Correctly encode
5877         varargs methods.
5878
5879 2004-06-11  Martin Baulig  <martin@ximian.com>
5880
5881         * metadata.c (mono_metadata_parse_method_signature): When parsing
5882         a MethodDef which has VarArgs, also set sentinelpos if we don't
5883         have any parameters.
5884
5885 2004-06-11  Martin Baulig  <martin@ximian.com>
5886
5887         * verify.c (mono_method_verify): In CEE_CALL, use
5888         mono_method_get_signature() to get the method's signature, unless
5889         we're a PInvoke method.
5890
5891 2004-06-10  Jackson Harper  <jackson@ximian.com>
5892
5893         * assembly.c: Use <path>/lib/mono/gac for the extra paths
5894         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
5895         logical name as the supplied path is just a prefix to the gac not
5896         the direct path to it.
5897         
5898 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
5899
5900         * reflection.c: make the token for a created method match
5901         the token of the MethodBuilder it was created from
5902         (IKVM requires this behaviour now).
5903
5904 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
5905
5906         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
5907         reflection.c, socket-io.c: leak fixes.
5908
5909 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
5910
5911         * icall.c: handle sentinel pos in vararg methods in position different
5912         from 0.
5913
5914 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5915
5916         * culture-info-tables.h: freshly generated.
5917
5918 2004-06-09  Martin Baulig  <martin@ximian.com>
5919
5920         * loader.c (mono_get_method_constrained): Call `mono_class_init
5921         (constrained_class)'.   
5922
5923 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
5924
5925         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
5926         any methods. Fixes #59629.
5927
5928 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
5929
5930         * culture-info-tables.h: reflecting locale-builder updates.
5931
5932 2004-06-08  Dick Porter  <dick@ximian.com>
5933
5934         * object.h:
5935         * locales.c: Fixed compile warnings, including a real bug in
5936         CompareInfo_internal_compare.
5937         
5938 2004-06-08  Dick Porter  <dick@ximian.com>
5939
5940         * locales.c
5941         (ves_icall_System_Globalization_CompareInfo_internal_index):
5942         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
5943         Double-check the resuls of usearches, because ICU currently
5944         ignores most of the collator settings here.  Fixes bug 59720.
5945         
5946 2004-06-08  Dick Porter  <dick@ximian.com>
5947
5948         * locales.c
5949         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
5950         Fix memory leak and segfault-causing typo.  No idea how this one
5951         lasted so long without being noticed.
5952
5953 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
5954
5955         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
5956         any methods. Fixes #59629.
5957
5958 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5959
5960         * assembly.c:
5961         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
5962         own the critical section before). Removed dead code (that's done
5963         in the preload hook).
5964
5965         (mono_assembly_load_with_partial_name): call the preload hook.
5966
5967 2004-06-08  Martin Baulig  <martin@ximian.com>
5968
5969         * metadata.c (mono_metadata_signature_alloc): Default
5970         `sentinelpos' to -1.
5971
5972         * reflection.c (mono_image_get_array_token): Likewise.
5973
5974 2004-06-08  Martin Baulig  <martin@ximian.com>
5975
5976         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
5977
5978         * metadata.c (mono_metadata_parse_method_signature): When parsing
5979         a MethodDef which has VarArgs, set sentinelpos.
5980
5981         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
5982         `gint16' since we're using -1 for non-varargs methods.
5983
5984         * reflection.c
5985         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
5986         (method_encode_signature): Added varargs support.
5987         (method_builder_encode_signature): Likewise.
5988         (mono_image_get_varargs_method_token): New static method.
5989         (mono_image_create_method_token): New public method; this is
5990         called via an icall instead of mono_image_create_token() when
5991         calling a varargs method.       
5992
5993 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
5994
5995         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
5996
5997 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
5998
5999         * culture-info-tables.h : Reflecting the latest locale-builder that
6000           fixed empty array representation ({} to {0}).
6001
6002 2004-06-07  Jackson Harper  <jackson@ximian.com>
6003
6004         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
6005         looking up extra gac paths. This allows MONO_GAC_PATH to act
6006         exactly like a prefix.
6007         
6008 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
6009
6010         * reflection.c (mono_reflection_type_from_name): Make a copy of the
6011         type name before modifying it. Fixes #59405.
6012
6013 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
6014
6015         * culture-info.h: added fields for "all datetime patterns".
6016         * locales.c: (  ves_icall_System_Globalization_CultureInfo
6017           _construct_datetime_format ()): fill xxx_patterns fields.
6018         * object.h: added fields for "all datetime patterns" to
6019           MonoDateTimeFormatInfo.
6020         * culture-info-tables.h: reflecting locale-builder updates.
6021
6022 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
6023
6024         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
6025         the event has no add and remove methods. Fixes #59629.
6026
6027 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
6028
6029         * object.c: Fixed possible integer overflow when allocating large
6030         strings.
6031
6032 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
6033
6034         * culture-info-tables.h: reflecting locale-builder updates.
6035
6036 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
6037
6038         * culture-info-tables.h: reflecting locale-builder updates.
6039
6040 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
6041
6042         * culture-info-tables.h: reflecting locale-builder updates.
6043
6044 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
6045
6046         * threads.c: Made Thread.Sleep abortable.
6047
6048 2004-06-02  Martin Baulig  <martin@ximian.com>
6049
6050         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
6051
6052         * debug-mono-symfile.h: Bumped symbol file version number to 37.
6053
6054 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
6055
6056         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
6057
6058 2004-05-30  Jackson Harper  <jackson@ximian.com>
6059
6060         * reflection.c: Do not hardcode assembly versions or public key
6061         tokens anymore. All of this except the corlib section was dead
6062         code anyways.
6063         
6064 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
6065
6066         * object.c (mono_runtime_invoke_array): Automatically create boxed
6067         objects for byref valuetypes if needed. Fixes #59300.
6068         
6069         * object.c (mono_method_return_message_restore): Handle 
6070         MONO_TYPE_OBJECT as well.
6071
6072 2004-05-28  Jackson Harper  <jackson@ximian.com>
6073
6074         * reflection.c: The modified type encoding was causing build
6075         problems. Reverted for now.
6076         
6077 2004-05-28  Jackson Harper  <jackson@ximian.com>
6078
6079         * reflection.c/h: Take an assembly ref so that we dont create
6080         fully qualified names when encoding types in the same assembly as
6081         the custom attribute being emitted.
6082         * appdomain.c: Increment version number.
6083         
6084 2004-05-26  Duncan Mak  <duncan@ximian.com>
6085
6086         * icall.c
6087         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6088         Set the full version number (major, minor, build, revision).
6089
6090 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
6091
6092         * marshal.c (emit_struct_conv): increment src/dst after blit
6093         (mono_marshal_get_managed_wrapper,
6094         mono_marshal_get_native_wrapper): make sure we have marshalling
6095         info before marshalling params (info computation affects
6096         blittable)
6097
6098         * class.c (class_compute_field_layout): correctly deal with
6099         blittable
6100         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
6101         value types (as per what windows dows by default)
6102         (mono_class_setup_mono_type): System.ValueType is blittable
6103         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
6104         blittable
6105
6106         * marshal.c (mono_marshal_load_type_info): flag types  as
6107         non-blittable if the native layout doesn't match the managed
6108         layout
6109
6110 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6111
6112         * appdomain.c: don't add stuff in the private search path that is
6113         above the application base. If application base is not set, there's
6114         no private search path.
6115
6116 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
6117
6118         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
6119         byref struct arguments in native->managed marshalling.
6120
6121 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
6122
6123         * marshal.c (mono_marshal_get_runtime_invoke): correctly
6124         cache methods using signature (special case for methods
6125         that are value type or string class)
6126         
6127         * image.c (mono_image_close): clean up allocated GSList's
6128         in runtime_invoke_cache.
6129
6130 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6131
6132         * mono-config.c: set the correct path for mono_cfg_dir on windows when
6133         there's no MONO_CFG_DIR environment variable defined.
6134
6135 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6136
6137         * threads.c: windows version must be >= 0x0500 to include OpenThread.
6138
6139 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
6140
6141         * threadpool.c: Really wait for 500ms after the async call, even if the wait
6142           is interrumped.
6143         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
6144           before waiting for it, and call CloseHandle after the wait to unref it.
6145           This will make sure that handles are not disposed too early.
6146
6147 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6148
6149         * appdomain.c:
6150         * appdomain.h:
6151         * icall.c: removed
6152         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
6153         needed now.
6154
6155         * object.c: se the application_base only for the domain that runs
6156         Main. Fixes bug #59216,
6157
6158 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6159
6160         * appdomain.c:
6161         * object.c: only the domain in which Main is run have
6162         SetupInformation.ConfigurationFile set, so moved a few lines from
6163         appdomain.c to object.c.
6164
6165 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6166
6167         * appdomain.c: we tried to load [name].(dll|exe), but according
6168         to bug #57710, we must also try [culture]/[name].(dll|exe) and
6169         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
6170         There's a test case attached to bug #58922.
6171
6172 2004-05-27  Dick Porter  <dick@ximian.com>
6173
6174         * icall.c:
6175         * file-io.c: Implemented icalls for locking and unlocking regions
6176         in a file.
6177         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
6178         FALSE on error (fixes both compiler warning and real bug.)
6179
6180 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
6181
6182         * culture-info-tables.h: reflecting locale-builder updates.
6183
6184           (Added missing ChangeLog entry for 05/26)
6185
6186 2004-05-27  Jackson Harper  <jackson@ximian.com>
6187
6188         * locales.c: Fix some cut and paste errors.
6189         
6190 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6191
6192         * mono-config.c: set the correct path for config. directory on windows.
6193
6194 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
6195
6196         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
6197           on win32.
6198
6199 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
6200
6201         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
6202         from pinvoke functions.
6203         
6204         * marshal.c (mono_ftnptr_to_delegate): Implement this.
6205
6206 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
6207
6208         * culture-info-tables.h: reflecting locale-builder updates.
6209
6210 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
6211
6212         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
6213         #59086.
6214
6215 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
6216
6217         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
6218         * icall.c: Modified icalls for RNG.
6219         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
6220         Windows (CryptoAPI).
6221
6222 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
6223
6224         * locales.c: Fix build.
6225
6226 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
6227
6228         * culture-info-tables.h: reflecting locale-builder updates.
6229
6230 2004-05-25  Jackson Harper  <jackson@ximian.com>
6231
6232         * locales.c: When creating the current culture use the $LANGs
6233         specific culture. So DateTimeFormat and NumberFormat entries are created.
6234         
6235 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
6236
6237         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
6238         a char array as parameter.
6239
6240 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
6241
6242         * image.c: In mono_image_open(), always use an absolute path name to
6243           look for already loaded images.
6244
6245 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
6246
6247         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
6248         missing in the windows build (like older cygwin include files).
6249
6250 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
6251
6252         * icall.c: Fixed check for possible integer overflow in Buffer_
6253         BlockCopy icall. Replaced comments style // by /* */.
6254
6255 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
6256
6257         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
6258         
6259         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
6260         check after MONO_VTADDR. Fixes pinvoke2.exe.
6261
6262         * marshal.h marshal.c metadata.h: Add beginnings of support for
6263         ftnptr -> delegate marshalling.
6264
6265 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
6266
6267         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
6268         * threads.c: Fix warnings.
6269
6270 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
6271
6272         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
6273         * icall.c: Registered icalls for Suspend and Resume.
6274         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
6275           Thread.Abort.
6276         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
6277         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
6278         * process.c: Use WaitForSingleObjectEx.
6279         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
6280           checkpoints.
6281         * threads.c, threads.h: Make use of new Ex wait methods. Improved
6282           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
6283           for Suspend and Resume. Added new mono_thread_stop, used for stoping
6284           background threads. Added basic support for Abort in Windows.
6285           Start new threads using a managed delegate invoke wrapper. This wrapper
6286           has an interruption checkpoint that is needed since an interruption
6287           can be requested before the thread leaves the unmanaged code that starts 
6288           the thread.
6289         * marshal.c: Added interruption checkpoint after every native call, and
6290           also before managed calls for wrappers called from unmanaged code to
6291           go into managed code.
6292         * object.h: Added new field in MonoThread to keep track of interruption
6293           requests.
6294
6295 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
6296
6297         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
6298         calls.
6299
6300 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6301
6302         * appdomain.c:
6303         * assembly.c:
6304         * gc.c:
6305         * locales.c:
6306         * mono-config.c:
6307         * rand.c: getenv -> g_getenv (windows!)
6308
6309         * process.c: complete_path is also used on non-windows platforms.
6310
6311 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6312
6313         * icall.c: new signature for Process_Start.
6314
6315         * process.[ch]: new signature for Process_Start. If we're on windows
6316         and UseShellExecute is false, we have to search for the program by
6317         ourselves if we don't get a full path.
6318
6319 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
6320
6321         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
6322         marshalling and call CleanUpNativeData if needed. Fixes #58646.
6323
6324 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6325
6326         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
6327         Fixes bug #58373.
6328
6329 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6330
6331         * process.c: use double quotes to quote program name and arguments on
6332         windows. Fixes bug #58575.
6333
6334 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6335
6336         * file-io.c: don't return "." and ".." when using windows Find*File.
6337
6338 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
6339
6340         * marshal.c: Don't pass wrappers to message init because method 
6341         addressed used to lookup metadata. part of remoting[2|3] fix.
6342
6343 2004-05-15  Jackson Harper  <jackson@ximian.com>
6344
6345         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
6346         path is essentially the same as MONO_PATH except that it points to
6347         GACs instead of lib directories.
6348         * loader.h: The user gac is gone so we dont need function to
6349         enable/disable it.
6350         * mono-config.c: user gac option is now gone.
6351         
6352 2004-05-15  Jackson Harper  <jackson@ximian.com>
6353
6354         * culture-info.h: Make defines more consistent, add calendar data
6355         to the culture info table.
6356         * culture-info-tables.h: Add basic calendar data. Basically
6357         everyone gets default gregorian until all the data is
6358         updated.
6359         * locales.c: Use the new consistent defines. Set calendar data for
6360         culture info objects.
6361         * object.h: add a field for calendar data to CultureInfo
6362         
6363 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
6364
6365         * image.c: image->runtime_invoke_cache is keyed on signatures now.
6366         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
6367         a signature.
6368         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
6369         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
6370         an extra param that is the pointer of the method to invoke. The IL for
6371         the invoke method is no longer specific to the method, but to the
6372         signature of the method. Thus, we can share the same code for multiple
6373         methods. This reduces the number of methods that have to be compiled.
6374
6375 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
6376
6377         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
6378
6379         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6380
6381         * icall.c: Optimize Buffer.BlockCopy.
6382
6383 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6384
6385         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
6386         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
6387         quote). Changed them to "MMMM yyyy".
6388
6389 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
6390
6391         * rand.c
6392         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
6393
6394 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
6395
6396         * reflection.h: Updated after changes to managed structures.
6397
6398         * appdomain.c: Bump corlib version.
6399
6400 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6401
6402         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
6403         windows.
6404
6405 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6406
6407         * Makefile.am: link to ../os/libmonoos.la on windows.
6408
6409         * assembly.c:
6410                 -If MONO_DEBUG, warn about non-existing directories in
6411                 MONO_PATH.
6412                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
6413                 compile time variable.
6414                 -Removed init_default_path and call mono_set_rootdir from
6415                 libmonoos.a instead (windows only).
6416
6417         * assembly.h: declare mono_assembly_getrootdir().
6418
6419         * domain.c:
6420         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
6421
6422         * loader.c: s/getenv/g_getenv/
6423
6424 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
6425
6426         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
6427
6428         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
6429
6430         * metadata.h: Add new marshalling conversions.
6431
6432         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
6433         function.
6434
6435         * reflection.c (mono_reflection_get_type): Lookup the type in all
6436         modules of a multi-module assembly. Fixes #58291.
6437
6438 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
6439
6440         * threads.c: Before aborting a background, set the StopRequested
6441         state.  This avoids throwing the Abort exception.
6442         In mono_thread_manage, don't continue with the shutdown until all
6443         aborted threads have actually stopped.
6444
6445 2004-05-10  Jackson Harper  <jackson@ximian.com>
6446
6447         * locales.c: Remove the modifier from culture names.
6448         
6449 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6450
6451         * Makefile.am: monosn is not installed any more. It has been deprecated
6452         in favor of sn.
6453
6454 2004-05-07  Jackson Harper  <jackson@ximian.com>
6455
6456         * locales.c
6457         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
6458         Fix array construction, add bailout if the length is 0.
6459
6460 2004-05-07  Dick Porter  <dick@ximian.com>
6461
6462         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
6463         machine doesn't have a DNS entry.  Patch by Urs Muff
6464         (umuff@quark.com), fixes bug 57928.
6465
6466 2004-05-06  Jackson Harper  <jackson@ximian.com>
6467
6468         * reflection.c: Handle null PublicTokens properly. alloc mem for
6469         assembly names culture so we dont crash when freeing it.
6470         
6471 2004-05-06  Jackson Harper  <jackson@ximian.com>
6472
6473         * assembly.c: Check the usergac when loading with partial names.
6474         
6475 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
6476
6477         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
6478         does nothing for now (not required for Linux/Windows) but the class
6479         library can call it (and a newer or modified runtime could need it).
6480         * icall.c: Registred icall.
6481
6482 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6483
6484         * loader.c: prints a message on module loading error we set MONO_DEBUG
6485         environment variable.
6486
6487 2004-05-05  Jackson Harper  <jackson@ximian.com>
6488
6489         * appdomain.c: Handle PublicKeyToken=null properly.
6490         
6491 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
6492
6493         * environment.c|h: Added icall ves_icall_System_Environment_
6494         GetOSVersionString to get the current OS version as a string.
6495         * icall.c: Registred icall.
6496
6497 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
6498
6499         * object.c: in mono_object_get_virtual_method(), take into account that
6500         non-virtual methods don't have a slot in the vtable. Check needed when
6501         the object is a proxy.
6502
6503 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
6504
6505         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
6506         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
6507
6508         * object.c (mono_class_compute_gc_descriptor): Fix warning.
6509
6510         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
6511         passed when a valuetype is expected.
6512
6513         * object.c (mono_unhandled_exception): Only set the exit code if the
6514         exception happens in the main thread. Fixes thread5.exe.
6515
6516         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
6517         invalid names. Fixes #58047.
6518
6519 2004-05-03  Jackson Harper  <jackson@ximian.com>
6520
6521         * assembly.c: This line was committed accidently and is unneeded.
6522         
6523 2004-05-03  Jackson Harper  <jackson@ximian.com>
6524
6525         * icall.c: Add new icall for Assembly::LoadWithPartialName
6526         * assembly.c/.h: new function that probes the GAC to load partial
6527         assembly names by Paolo Molaro.
6528         
6529 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6530
6531         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
6532         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
6533         (type_get_fully_qualified_name): Added PublicKeyToken when building a
6534         full type name.
6535
6536 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6537
6538         * appdomain.c: fixed check for 'neutral' culture and removed warning.
6539         * reflection.c: fix bug when parsing a full type name and Version is not
6540         the last thing in the string.
6541
6542 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
6543
6544         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
6545         crashes when it is freed.
6546
6547 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6548
6549         * assembly.c: print the compat warning to stderr.
6550
6551 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
6552
6553         * assembly.c (mono_assembly_load_references): Add a compatibility
6554         hack to run old applications that might be still referencing the
6555         3300-based assemblies, only do this for System.xxx.
6556
6557 2004-05-01  Jackson Harper  <jackson@ximian.com>
6558
6559         * appdomain.c: If the culture is neutral we set it to "".
6560         
6561 2004-04-29  Jackson Harper  <jackson@ximian.com>
6562
6563         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
6564
6565 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
6566  
6567         * string-icalls.c: added low overhead function for copying chars
6568         * icall.c: added needed icall for the above function
6569  
6570 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6571
6572         * icall.c: fix return value of get_global_assembly_cache.  Implemented
6573         Environment.GetLogicalDrives.
6574
6575 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
6576
6577         * rand.c: try and talk to egd or prngd
6578         for random bytes if opening devices fail.
6579
6580 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
6581
6582         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
6583         alignment for the type using the native alignment of its members 
6584         instead of using klass->min_align.
6585
6586         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
6587
6588 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6589
6590         * file-io.c:
6591         * socket-io.c: added check for sys/aio.h.
6592
6593 2004-04-28  Dick Porter  <dick@ximian.com>
6594
6595         * threads.c: Don't abort a thread thats already aborting, when
6596         terminating everything.
6597
6598 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6599
6600         * icall.c: added 2 new async calls for Socket.
6601
6602         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
6603         IO on *nix systems.
6604
6605         * threadpool.c: removed unused variable.
6606
6607 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
6608
6609         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
6610
6611 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6612
6613         * locales.c: put back string_invariant_tolower () and
6614         string_invariant_toupper ().
6615
6616 2004-04-26 David Waite <mass@akuma.org>
6617
6618         * file-io.h:
6619         * socket-io.h:
6620         * threads.h:
6621         * unicode.h: remove comma from end of enumeration declarations
6622
6623 2004-04-26 David Waite <mass@akuma.org>
6624
6625         * debug-mono-symfile.h:
6626         * decimal.c:
6627         * mono_debug.h:
6628         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
6629
6630
6631 2004-04-26  Jackson Harper  <jackson@ximian.com>
6632
6633         * appdomain.c: Increment version number.
6634         
6635 2004-04-26  Jackson Harper  <jackson@ximian.com>
6636
6637         * appdomain.c: Set assembly references public token value when
6638         PublicKeyToken is specified, not the hash_value. Free public token
6639         values when free assembly name data. Previously the public key
6640         token was hex decoded, however we are using hex encoded public key
6641         tokens, so this is not neccasary.
6642         * assembly.c: Lookup assemblies in the gac if their public token
6643         value is set. Add function to allow enabling user gac
6644         lookups. Specify whether or not the assembly was loaded from the
6645         GAC. Compare full assembly names when checking the cache for
6646         assemblies (Temporarily disabled see comment in code). Remove
6647         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
6648         specifies trace-loader they get extra info to stdout on the
6649         loading of assemblies.
6650         * image.h: Add a field for an assembly references public token
6651         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
6652         whether an assembly has been loaded from the GAC.
6653         * image.c: Remove a corlib -> mscorlib name mapping.
6654         * loader.h: Add function to enable/disable the user gac.
6655         * mono-config.c: Check if the usergac is enabled in the config
6656         file.
6657         * icall.c: New icall to determine whether or not an assembly has
6658         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
6659         * tabldefs.h: Add constant for assemblyref flag that specifies a
6660         full public key is used instead of a public token.
6661         * reflection.c: Remove mscorlib -> corlib mappings. Set
6662         PublicTokenValue instead of hash value. This value is a hex
6663         string so it does not need to be expanded.
6664
6665 2004-04-26  Martin Baulig  <martin@ximian.com>
6666
6667         * mono-debug-debugger.c (mono_debugger_initialize): Set
6668         `mono_debugger_initialized' before calling mono_debug_lock().
6669
6670 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
6671
6672         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
6673           InternalToUpper/InternalToLower.
6674         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
6675           removed invariant culture shortcut.  This is now done in managed code.
6676         * locales.c: (string_invariant_toupper/tolower) removed.
6677
6678 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6679
6680         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
6681         Added Poll internal call.
6682
6683         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
6684         call for Poll. Select was too heavy for polling a single socket.
6685
6686         * threadpool.[ch]: added mono_threadpool_cleanup.
6687         * threads.c: use it. Don't use Thread_Abort on windows.
6688
6689 2004-04-23  Martin Baulig  <martin@ximian.com>
6690
6691         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
6692
6693 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
6694
6695         * icall.c: Registred new icalls for key pair protection and added an
6696         icall for Environment.GetFolderPath on Windows.
6697         * security.c|h: Added new icalls for key pair protection.
6698
6699 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6700
6701         * socket-io.c: don't display the non-supported family warning for known
6702         families. Now this is not displayed on windows when checking support
6703         for IPv4/IPv6.
6704
6705 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6706
6707         * class.c: don't display the layout warning for static fields.
6708
6709 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
6710
6711         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
6712         * locales.c, locales.h: Added new icalls for culture-specific
6713         Char.ToLower and Char.ToUpper.
6714
6715 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6716
6717         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
6718         by David Waite.
6719
6720 2004-04-20  Martin Baulig  <martin@ximian.com>
6721
6722         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
6723         of the type name before passing it to mono_reflection_type_from_name().
6724
6725 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
6726
6727         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
6728         encodings here. Fixes #56965.
6729
6730 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
6731
6732         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
6733         fix test on strstr result not that I can see anything that
6734         relies on the result.
6735
6736 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
6737
6738         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
6739         Fixes #57081.
6740
6741         * marshal.c (mono_marshal_get_string_encoding): New helper function.
6742
6743         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
6744         function to determine which marshalling to use for strings. Fixes
6745         #56965.
6746
6747         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
6748
6749         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
6750
6751 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
6752
6753         * icall.c: #include mono-config.h
6754
6755 2004-04-15  Jackson Harper  <jackson@ximian.com>
6756
6757         * culture-info-tables.h: Fix date formats for en-US culture.
6758         
6759 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
6760
6761         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
6762         ThreadPool.SetMinThreads.
6763         * threadpool.c: Implemented ThreadPool.GetMinThreads and
6764         ThreadPool.SetMinThreads.
6765
6766 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
6767
6768         * mono-config.c: also load the .config file in the directory
6769         where the assembly was found.
6770
6771 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
6772
6773         * assembly.c: load per-assembly config files.
6774         * icall.c: decrapified code to get the config dir and moved to
6775         mono-config.c.
6776         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
6777         per-assembly config files. When doing a dll map lookup give precedence
6778         to the per-assembly data.
6779
6780 2004-04-14  Martin Baulig  <martin@ximian.com>
6781
6782         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
6783         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
6784         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
6785
6786         * mono-debugger-debugger.c: While the debugger is locked, remember
6787         whether the symbol tables have changes and send one single
6788         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
6789
6790 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
6791
6792         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
6793
6794         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
6795         function.
6796
6797         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
6798         account when marshalling string arrays. Fixes #56965.
6799
6800 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
6801
6802         * icall.c: Add new icalls mapping for security.
6803         * security.c|h: Add internal calls for WindowsIdentity,
6804         WindowsImpersonationContext and WindowsPrincipal.
6805
6806 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
6807
6808         * class.c: Added comment to ensure the System.MonoDummy class
6809         is removed when no longer necessary
6810
6811 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
6812
6813         * appdomain.c: Pass arguments to the bootstraping exceptions to
6814         minimize JITed methods at boot
6815
6816         * metadata.c (mono_exception_from_name_two_strings): Allow for the
6817         second string to be null.
6818
6819         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
6820         Change the protocol to minimize the JIT methods at startup.  Now
6821         it Returns the internal codepage, if the value of "int_code_page"
6822         is 1 at entry, and we can not compute a suitable code page
6823         number, returns the code page as a string.
6824
6825 2004-04-13  Jackson Harper  <jackson@ximian.com>
6826
6827         * culture-info-tables.h: Fix number of decimal digits for all
6828         english locales.
6829
6830 2004-04-13  Jackson Harper  <jackson@ximian.com>
6831
6832         * icall.c: Clairfy out of sync error message. It is not always
6833         your corlib that is out of sync.
6834
6835 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
6836
6837         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
6838         properties when only the set accessor is overriden. Fixes #55874.
6839
6840 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
6841
6842         * assembly.c (mono_assembly_load_references): Make this thread safe.
6843         Fixes #56327.
6844
6845 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
6846
6847         * monosn.c: Add missing initialization calls.
6848
6849 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
6850
6851         * locales.c:
6852         ves_icall_System_Globalization_CultureInfo_construct_number_format
6853         Fix g_assert so it compiles on fussier compilers re int/ptr
6854         mismatch
6855
6856 2004-04-08  Dick Porter  <dick@ximian.com>
6857
6858         * socket-io.h:
6859         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
6860         53992.  Also rearrange the code so that the internal calls return
6861         an error value and exceptions are thrown from managed code.
6862
6863         * icall.c: Add type info to the socket icalls.
6864
6865 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6866
6867         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
6868         owes me a beer.
6869
6870 2004-04-07  Martin Baulig  <martin@ximian.com>
6871
6872         * class.c (mono_class_from_generic_parameter): Don't default
6873         `klass->parent' to `mono_defaults.object_type'.
6874
6875 2004-04-07  Martin Baulig  <martin@ximian.com>
6876
6877         * reflection.c (mono_reflection_initialize_generic_parameter): Set
6878         `param->pklass->reflection_info'.       
6879
6880 2004-04-07  Jackson Harper  <jackson@ximian.com>
6881
6882         * culture-info-tables.h: Fix date separator symbol.
6883         
6884 2004-04-07  Martin Baulig  <martin@ximian.com>
6885
6886         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
6887         from System.Type to System.MonoType.
6888
6889 2004-04-07  Martin Baulig  <martin@ximian.com>
6890
6891         * reflection.h
6892         (MonoReflectionGenericParam): Added `has_reference_type' and
6893         `has_value_type' fields.
6894
6895         * reflection.c (mono_image_get_generic_param_info): Encode the
6896         correct flags if we have the `class' or `struct' constraint.
6897
6898 2004-04-07  Martin Baulig  <martin@ximian.com>
6899
6900         * reflection.h
6901         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
6902
6903 2004-04-07  Jackson Harper  <jackson@ximian.com>
6904
6905         * appdomain.c: Revert extra patches, just wanted to bump the
6906         version number.
6907         
6908 2004-04-07  Jackson Harper  <jackson@ximian.com>
6909
6910         * Makefile.am: Add culture-info private headers.
6911         * icall.c: Add new icalls for contructing locales.
6912         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
6913         * locales.h: Declare new culture info construction methods.
6914         * object.h: Add new fields used to avoid the CultureMap to
6915         MonoCultureInfo.
6916         * culture-info.h: Definition of structs used in the culture info
6917         tables.
6918         * culture-info-tables.h: Autogenerated tables that contain culture
6919         info data. This file was generated with the locale-builder tool.
6920         * appdomain.c: Incement corlib version number.
6921         
6922 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
6923
6924         * appdomain.c: (mono_runtime_init) move mono_thread_init
6925         to before mono_object_new calls so critical sections
6926         are initialized before use.
6927
6928 2004-04-07  Martin Baulig  <martin@ximian.com>
6929
6930         * icall.c
6931         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
6932         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
6933         (ves_icall_MonoGenericParam_initialize): Removed.
6934         (monogenericparam_icalls): Removed.
6935         (generictypeparambuilder_icalls): Added new table for
6936         System.Reflection.Emit.GenericTypeParameterBuilder.
6937
6938         * reflection.c
6939         (mono_reflection_define_generic_parameter): Removed.
6940         (mono_reflection_initialize_generic_parameter): This is now called
6941         from GenericTypeParameterBuilder's .ctor.
6942
6943 2004-04-06  Martin Baulig  <martin@ximian.com>
6944
6945         * class.c (mono_class_init): Don't inflate nested classes in a
6946         generic instance.
6947         (mono_type_get_name_recurse): Include the generic arguments for
6948         generic instances and generic type declarations.
6949         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
6950         (_mono_class_get_instantiation_name): Removed.
6951         (mono_class_create_generic): Always use `gklass->name' as our name.
6952
6953         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
6954
6955         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
6956         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
6957         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
6958         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
6959         closed generic methods here.
6960
6961         * reflection.c
6962         (mono_reflection_generic_inst_get_nested_types): Removed.
6963         (inflate_mono_method): Copy the generic parameters from the
6964         MonoMethodHeader into out MonoGenericMethod.
6965
6966 2004-04-06  Martin Baulig  <martin@ximian.com>
6967
6968         * row-indexes.h
6969         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
6970
6971         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
6972
6973         * reflection.c (build_compressed_metadata): If we have any entries
6974         in the GenericParam, MethodSpec or GenericParamConstraint tables,
6975         set the header version to 1.1.
6976
6977 2004-04-06  Martin Baulig  <martin@ximian.com>
6978
6979         * class.c (mono_class_init): If we're a generic instance,
6980         initialize our nested classes, too.
6981         (_mono_class_get_instantiation_name): Deal with the new `!%d'
6982         suffix. 
6983
6984 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6985
6986         * process.c: quote the argument passed to the shell on windows.
6987
6988 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
6989
6990         * threads.c (mono_alloc_special_static_data): Allow this to be
6991         called during startup.
6992
6993 2004-04-02  Martin Baulig  <martin@ximian.com>
6994
6995         * icall.c
6996         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
6997
6998 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
6999
7000         * icall.c: Fix build.
7001
7002 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
7003
7004         * Makefile.am: Added security.c|h.
7005         * icall.c: Added icall for get_UserName;
7006         * security.c: New file for security related icalls. Added function
7007         get_UserName for System.Environment (fix #56144).
7008         * security.h: New. Header file for security.c
7009
7010 2004-04-02  Dick Porter  <dick@ximian.com>
7011
7012         * icall.c: Deleted the icalls that were obsoleted some time ago
7013         by the ICU string code, and which were mixed into the icall
7014         rearranging.  Fixes bug 55969.
7015
7016         * string-icalls.h: 
7017         * string-icalls.c: Deleted the code that those icalls reference.
7018
7019 2004-04-01  Martin Baulig  <martin@ximian.com>
7020
7021         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
7022
7023         * class.c (mono_class_from_generic_parameter): Don't set 
7024         TYPE_ATTRIBUTE_INTERFACE.
7025         (my_mono_class_from_generic_parameter): Likewise.
7026
7027 2004-04-01  Martin Baulig  <martin@ximian.com>
7028
7029         * loader.c (find_method): Added an optional `MonoClass *ic'
7030         argument to search in a specific interface.
7031         (mono_get_method_constrained): New public function.
7032
7033 2004-04-01  Martin Baulig  <martin@ximian.com>
7034
7035         * reflection.c (mono_image_get_generic_field_token): Use the
7036         `handleref' cache here.
7037
7038 2004-04-01  Martin Baulig  <martin@ximian.com>
7039
7040         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
7041
7042         * reflection.c (create_generic_typespec): Use the `typespec' hash
7043         here, not the `typeref' one.    
7044
7045 2004-04-01  Martin Baulig  <martin@ximian.com>
7046
7047         * class.c (mono_class_inflate_generic_type): Moved the
7048         functionality into a new static inflate_generic_type() which
7049         returns NULL if it didn't do anything.  Only increment the
7050         `mono_stats.inflated_type_count' if we actually inflated
7051         something.
7052         (mono_class_get_full): Check the classes type to see whether we
7053         need to inflate it; also inflate MONO_TYPE_(M)VAR.
7054
7055 2004-04-01  Jackson Harper  <jackson@ximian.com>
7056
7057         * reflection.c: Set culture for assembly references.
7058         
7059 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
7060
7061         * reflection.[ch], icall.[ch], Fix support for pinning variables.
7062
7063 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7064
7065         * assembly.c:
7066         (do_mono_assembly_open): the critical section also covers
7067         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
7068
7069 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7070
7071         * threads.c:
7072         (mono_manage_threads): abort the background threads when finishing.
7073         Fixes bug #47232.
7074
7075 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7076
7077         * gc.c: only close the done_event handle if there was no timeout.
7078         C-ified comments.
7079
7080 2004-03-30  Martin Baulig  <martin@ximian.com>
7081
7082         * icall.c (icall_entries): It's called "System.Activator", not
7083         "System.Activation".    
7084
7085 2004-03-30  Martin Baulig  <martin@ximian.com>
7086
7087         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
7088         (mono_class_create_from_typespec): Likewise.
7089
7090 2004-03-30  Martin Baulig  <martin@ximian.com>
7091
7092         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
7093         `has_ctor_constraint' and `initialized'.
7094
7095 2004-03-30  Martin Baulig  <martin@ximian.com>
7096
7097         * reflection.c (encode_new_constraint): New static function to add
7098         the constructor constraint attribute to a type parameter.
7099         (encode_constraints): Call encode_new_constraint() if necessary.
7100
7101         * reflection.h
7102         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
7103
7104         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
7105         
7106 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
7107
7108         * reflection.c, icall.c: add support for pinning variables. 
7109
7110 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
7111
7112         * marshal.c (mono_marshal_get_managed_wrapper):
7113         init bool local with zero rather than null.
7114
7115 2004-03-29  Martin Baulig  <martin@ximian.com>
7116
7117         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
7118         the "official" behavior here.
7119         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
7120
7121 2004-03-29  Martin Baulig  <martin@ximian.com>
7122
7123         * icall.c: Reflect latest API changes.
7124
7125 2004-03-29  Martin Baulig  <martin@ximian.com>
7126
7127         * loader.c (mono_get_method_from_token): Also call
7128         mono_metadata_load_generic_params () for abstract and interface
7129         methods; replace the type arguments in the method signature with
7130         the ones which are loaded from the metadata.
7131
7132 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
7133
7134         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
7135         of the lock is not the current thread. MS.NET don't do it, in spite of
7136         what the documentation says. See bug #56157.
7137
7138 2004-03-28  Martin Baulig  <martin@ximian.com>
7139
7140         * class.c (mono_class_init): Don't call init_properties() and
7141         init_events() for generic instances; set `prop->parent' when
7142         inflating properties.
7143
7144         * reflection.c (mono_generic_inst_get_object): Call
7145         `mono_class_init (ginst->klass)'.
7146         (mono_type_get_object): Only create a MonoGenericInst if your
7147         generic type is a TypeBuilder.
7148         (do_mono_reflection_bind_generic_parameters): Only set
7149         `ginst->is_dynamic' if our generic type is a TypeBuilder.
7150
7151 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
7152
7153         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
7154         Fixes #56091.
7155
7156 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7157
7158         * icall.c: added Kill_internal icall.
7159         * process.[ch]: added Kill_internal icall.
7160
7161 2004-03-25  Martin Baulig  <martin@ximian.com>
7162
7163         * class.h (MonoStats): Added `generic_instance_count',
7164         `inflated_method_count', `inflated_type_count' and
7165         `generics_metadata_size'.       
7166
7167 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7168
7169         * reflection.c: no warnings now.
7170
7171 2004-03-25  Martin Baulig  <martin@ximian.com>
7172
7173         * class.c (mono_class_get_full): New public function; does a
7174         mono_class_get(), but also takes a `MonoGenericContext *'.
7175
7176         * loader.c (mono_field_from_memberref): Renamed to
7177         `field_from_memberref', made static and added `MonoGenericContext *'
7178         argument.
7179         (mono_field_from_token): Added `MonoGenericInst *' argument.
7180         (method_from_memberef): Likewise.
7181         (mono_get_method_from_token): Likewise.
7182         (mono_get_method_full): New public function; does a
7183         mono_get_method(), but also takes a `MonoGenericContext *'.
7184
7185         * verify.c (mono_method_verify): Get the method's generic context
7186         and pass it to mono_field_from_token(), mono_get_method_full() and
7187         mono_class_get_full().
7188
7189 2004-03-25  Martin Baulig  <martin@ximian.com>
7190
7191         * class.c (mono_class_inflate_generic_type): Take a
7192         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
7193         `MonoGenericMethod *'.
7194
7195 2004-03-25  Martin Baulig  <martin@ximian.com>
7196
7197         * loader.h (MonoMethodInflated): Store the MonoGenericContext
7198         instead of the MonoGenericMethod here.
7199
7200 2004-03-25  Martin Baulig  <martin@ximian.com>
7201
7202         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
7203         each time we create a new MonoGenericInst, we also create a new
7204         context which points back to us.
7205
7206         * class.c (inflate_method): Use `ginst->context' instead of
7207         creating a new context.
7208
7209         * loader.c (method_from_memberref): Use
7210         `klass->generic_inst->context' instead of creating a new context.
7211
7212 2004-03-25  Martin Baulig  <martin@ximian.com>
7213
7214         * class.h (MonoGenericContext): New struct.
7215         (MonoGenericMethod): Removed `generic_inst'.
7216
7217         * class.c (mono_class_inflate_generic_method): Take a
7218         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
7219
7220 2004-03-25  Martin Baulig  <martin@ximian.com>
7221
7222         * loader.h (MonoMethodInflated): New typedef.
7223
7224         * metadata.h (MonoMethodSignature): Removed `gen_method', make
7225         `generic_param_count' consume just 30 bits, added `is_inflated'
7226         and `has_type_parameters' flags (one bit each).
7227
7228         * class.c (mono_class_inflate_generic_method): Create a
7229         MonoMethodInflated instead of a MonoMethodNormal and set
7230         `is_inflated' in the method signature.
7231
7232         * class.h (MonoGenericMethod): Removed `generic_method'.
7233
7234 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
7235
7236         * image.c: Make sure the name of a MonoImage is always an absolute path.
7237           This fixes bug #54415.
7238
7239 2004-03-24  Martin Baulig  <martin@ximian.com>
7240
7241         * class.c (mono_class_setup_vtable): If we're a generic instance,
7242         use our generic type's vtable size.
7243
7244 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
7245
7246         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
7247         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
7248         problems.
7249
7250 2004-03-23  Martin Baulig  <martin@ximian.com>
7251
7252         * class.h (MonoDynamicGenericInst): Added `int count_events' and
7253         `MonoEvent *events'.
7254
7255         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
7256         (typebuilder_icalls): Added "get_event_info"; calls
7257         mono_reflection_event_builder_get_event_info(). 
7258
7259         * reflection.c (mono_reflection_generic_inst_initialize): Added
7260         `MonoArray *events'.
7261         (mono_reflection_event_builder_get_event_info): New function.
7262
7263 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
7264
7265         * object.h: add mono_type_initialization_init
7266
7267         * object.c (mono_runtime_class_init): 
7268         implement class constructor synchronization rules
7269         to cope with threading issues.  
7270         add mono_type_initialization_init
7271
7272         * appdomain.c (mono_runtime_init): call 
7273         mono_type_initialization_init
7274
7275         * class.h: removing initializing field from MonoVTable
7276
7277 2004-03-23  Martin Baulig  <martin@ximian.com>
7278
7279         * class.c (my_mono_class_from_generic_parameter): Use
7280         `param->name' if it's not NULL. 
7281
7282 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
7283
7284         * class.c: do not insert non-virtual methods in the vtable.
7285         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
7286         that means the method is non-virtual. This never would have
7287         happened before.
7288
7289 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
7290
7291         * profiler.c: Added lock for accessing coverage_hash.
7292
7293 2004-03-22  Martin Baulig  <martin@ximian.com>
7294
7295         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
7296         `method->method->signature->generic_param_count != 0' to make it
7297         work for interface methods.
7298
7299 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7300
7301         * process.c: quote the string passed to the shell using g_shell_quote.
7302
7303 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7304
7305         * threads.c:
7306         (mono_threads_manage): don't remove the finalizer thread and self
7307         from the threads hash table so that mono_thread_manage can be called
7308         more than once.
7309
7310 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7311
7312         * process.c: quote the arguments when UseShellExecute is true. Fixes
7313         bug #55790.
7314
7315 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7316
7317         * threads.c: set mono_thread_detach as a cleanup routine for every
7318         thread. This way it's always executed upon thread termination, either
7319         aborted or finished normally. No more xsp hangs!
7320
7321 2004-03-17  Martin Baulig  <martin@ximian.com>
7322
7323         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
7324         `int count_nested' and a `MonoType **nested'.
7325
7326         * reflection.c (mono_reflection_bind_generic_parameters): Moved
7327         most of the functionality into a new static
7328         do_mono_reflection_bind_generic_parameters() and don't take a
7329         `MonoType *nested_in' argument any more.  Don't compute nested
7330         types here.
7331         (mono_reflection_generic_inst_get_nested_types): New public method
7332         to get nested types.
7333
7334         * class.c (mono_class_create_generic): Set `klass->nested_in' if
7335         we're a nested class.
7336
7337         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
7338         mono_reflection_generic_inst_get_nested_types() to compute the
7339         nested types.
7340
7341 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
7342
7343         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
7344         descriptive error message under windows.
7345         
7346 2004-03-17  Martin Baulig  <martin@ximian.com>
7347
7348         * class.c (dup_type): Added `const MonoType *original' argument;
7349         copy the attrs from the original type.
7350
7351 2004-03-17  Martin Baulig  <martin@ximian.com>
7352
7353         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
7354         `m->generic_inst_cache' here.
7355
7356 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
7357
7358         * exception.h exception.c: Add stack_overflow_exception.
7359
7360 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7361
7362         * threadpool.c:
7363         (overlapped_callback): call SetEvent *after* invoking the callback.
7364         No need to call CloseHandle.
7365
7366 2004-03-16  Martin Baulig  <martin@ximian.com>
7367
7368         * reflection.c (mono_image_get_fieldref_token): Take a
7369         `MonoReflectionField *' instead of a `MonoClassField *' and a
7370         `MonoClass *'; store the `MonoReflectionField *' in the hash.
7371
7372 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7373
7374         * appdomain.c: don't add the culture to the filename we're looking for
7375         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
7376
7377 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7378
7379         * locales.c: don't ignore symbols when doing case insensitive compares.
7380         Thanks Dick! Fixes bug #54046.
7381
7382         * threads.c: surround 'threads' usage with enter/leave in
7383         mono_thread_manage.
7384
7385 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
7386
7387         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
7388         implicitly marshalled as [Out]. Fixes #55450.
7389
7390         (mono_marshal_get_runtime_invoke): Zero out the result if there is
7391         an exception.
7392
7393 2004-03-16  Martin Baulig  <martin@ximian.com>
7394
7395         * class.c (mono_class_from_generic_parameter): Use the actual
7396         parameter name. 
7397
7398 2004-03-16  Martin Baulig  <martin@ximian.com>
7399
7400         * reflection.c (type_get_signature_size): New static function.
7401         Compues the size of the type in a method signature.
7402         (method_get_signature_size): New static function; calls
7403         type_get_signature_size() to compute the actual size of the
7404         method's signature.
7405         (method_encode_signature): Use method_get_signature_size() to get
7406         the signature's size rather than using `nparams * 10'.
7407
7408 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7409
7410         * file-io.h: define here WapiOverlapped on windows. I don't want the
7411         regular OVERLAPPED one.
7412
7413         * file-io.c:
7414         * threadpool.c: somehow, BindIoCompletionCallback is not found.
7415         Disabling AIO on windows.
7416
7417 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7418
7419         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
7420         bug #55385.
7421
7422 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7423
7424         * appdomain.c: upgraded corlib version.
7425
7426         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
7427         and BeginWrite. Allow opening files for asynchrnous operations.
7428
7429         * file-io.h: new struct that maps FileStreamAsyncResult.
7430         * icall.c: added new icalls.
7431         * process.[ch]: support setting child process environment variables
7432         and use the SHELL or COMSPEC when UseShellExecute is true.
7433
7434         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
7435         callback for async. IO is here and also BindHandle.
7436
7437         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
7438         from here.
7439
7440 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
7441
7442         * reflection.c (create_custom_attr): Allow len == 0.
7443
7444         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
7445         computation on big-endian machines.
7446
7447 2004-03-13  Martin Baulig  <martin@ximian.com>
7448
7449         * class.h (MonoGenericInst): Added `int count_ifaces'.
7450
7451         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
7452         `ginst->count_ifaces' instead `klass->interface_count' since we
7453         may get called before the vtable is created.
7454
7455         * loader.c (mono_method_get_param_names): If we're a generic
7456         instance, return and don't initialize the class.
7457
7458         * reflection.c (mono_reflection_setup_generic_class): Don't call
7459         ensure_runtime_vtable().
7460         (mono_reflection_bind_generic_parameters): Set
7461         `ginst->count_ifaces'.
7462
7463 2004-03-11  Jackson Harper <jackson@ximian.com>
7464
7465         * icall.c:
7466         * unicode.c:
7467         * unicode.h: Remove unused System.Char icalls.
7468         
7469 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
7470
7471         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
7472         code when we P/Invoke the first library in Windows.Forms, instead
7473         of when we first open the assembly.
7474
7475         * assembly.c: Drop the lookup from here.
7476
7477 2004-03-10  Martin Baulig  <martin@ximian.com>
7478
7479         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
7480         class for properties, fields and events.  Finally fixes #54945.
7481
7482 2004-03-10  Martin Baulig  <martin@ximian.com>
7483
7484         * metadata.c (mono_metadata_class_equal): New static function;
7485         checks whether two generic instances or two generic parameters are
7486         equal.
7487         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
7488         compare classes.        
7489
7490 2004-03-10  Martin Baulig  <martin@ximian.com>
7491
7492         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
7493
7494         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
7495         argument and write it into the `reflection_info' field.
7496
7497         * icall.c
7498         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
7499         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
7500
7501 2004-03-09  Jackson Harper  <jackson@ximian.com>
7502
7503         * char-conversions.h: use 8 bits for numeric data its all we need
7504         * icall.c: numeric data is only 8 bits now.
7505
7506 2004-03-09  Martin Baulig  <martin@ximian.com>
7507
7508         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
7509
7510         * class.c (init_properties, init_events): Initialize the new
7511         `parent' field.
7512
7513         * reflection.c (typebuilder_setup_properties): Likewise.
7514         (typebuilder_setup_events): Likewise.
7515
7516         * reflection.h (MonoEventInfo): Replaced `parent with
7517         `declaring_type' and `reflected_type'.
7518
7519         * icall.c (ves_icall_get_property_info): Distinguish between
7520         declaring and reflected type.
7521         (ves_icall_get_event_info): Likewise.
7522
7523 2004-03-09  Martin Baulig  <martin@ximian.com>
7524
7525         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
7526         (ves_icall_Type_GetField): Correctly set field->klass.
7527
7528 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
7529
7530         * loader.h: Fix warning.
7531
7532 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
7533
7534         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
7535         library routine if present.  Notice that it will still continue
7536         executing even if its missing, for those working on the Gtk#
7537         edition of Windows.Forms.
7538
7539         * assembly.c (do_mono_assembly_open): If loading the
7540         System.Windows.Forms call mono_loader_wini_init.
7541
7542 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
7543
7544         * class.h: Added MonoRemoteClass struct.
7545         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
7546         function for MonoStrings.
7547         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
7548         Added internal call for getting the proxy type.
7549         * marshal.c: Get the type of transparent proxies from its remote_class.
7550         Added methods that generate the IL for type checks and casts:
7551         mono_marshal_get_isinst, mono_marshal_get_castclass, 
7552         mono_marshal_get_proxy_cancast.
7553         * marshal.h: Declaration of the previous new methods.
7554         * object.c: Added new moethods for creating and updating MonoRemoteClass
7555         instances: mono_remote_class, mono_upgrade_remote_class, 
7556         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
7557         * verify.c: FIx transparent_proxy_fields layout.
7558         * appdomain.c: Bump corlib version.
7559
7560 2004-03-04  Jackson Harper  <jackson@ximian.com>
7561
7562         * icall.c: Add icall to access char conversion tables.
7563         * char-conversions.h: Character conversion tables.
7564         * Makefile.am: Add char-conversions.h private header file.
7565         
7566 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
7567
7568         * appdomain.c (unload_thread_main): Increase unloading timeout to
7569         10 sec as a temporary workaround for Nant problems.
7570
7571 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
7572
7573         * gc.c: Add checks for GC_enable and GC_disable.
7574
7575         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
7576         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
7577         (bug #54988).
7578         
7579 2004-02-27  Martin Baulig  <martin@ximian.com>
7580
7581         * reflection.c (mono_reflection_bind_generic_parameters): Take a
7582         `MonoReflectionType *' instead of a `MonoType *'.
7583
7584 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
7585
7586         * gc.c (run_finalize): Avoid finalizing the object representing the
7587         finalizer thread.
7588         (finalizer_thread): Fix warning.
7589
7590 2004-02-25  Martin Baulig  <martin@ximian.com>
7591
7592         * class.c (_mono_class_get_instantiation_name): Added `int offset'
7593         argument for nested types.
7594         (mono_class_create_generic): Added support for nested generictypes.
7595
7596         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
7597         `GList *nested'.
7598
7599         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
7600
7601         * reflection.c (method_encode_signature): Increase the minimum
7602         value of `size' from 10 to 11.
7603         (mono_reflection_bind_generic_parameters): Take `int type_argc'
7604         and `MonoType **types' arguments instead of the `MonoArray
7605         *types'; added `MonoType *nested_in'.  Recursively instantiate
7606         nested classes. 
7607
7608 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
7609
7610         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
7611         stack_overflow_ex members which are used by exception handling.
7612
7613         * appdomain.c (mono_runtime_init): Initialize the new members.
7614
7615         * gc.c (mono_gc_enable): New helper function.
7616         * gc.c (mono_gc_disable): New helper function.
7617
7618 2004-02-23  Martin Baulig  <martin@ximian.com>
7619
7620         * icall.c: I must have been really stupid - make it actually work
7621         this time ;-)
7622
7623 2004-02-23  Martin Baulig  <martin@ximian.com>
7624
7625         * loader.c (method_from_memberref): Only inflate the method if
7626         it's in another klass.
7627
7628 2004-02-23  Martin Baulig  <martin@ximian.com>
7629
7630         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
7631         (mono_class_init): If we're a generic instance and an interface,
7632         compute `class->interface_id'; also create `class->interfaces'
7633         here and inflate them.
7634
7635         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
7636         `ginst->is_open'.
7637         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
7638
7639         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
7640
7641 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
7642
7643         * reflection.c (method_encode_code): Improved the error message
7644         generated by the exception.
7645
7646 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7647
7648         * icall.c: Martin did not do what he said in the ChangeLog for
7649         2004-02-18, but put back the changes for properties and events.
7650         Commenting those changes out again and adding comment to bug #54518.
7651         
7652         * process.c: removed warning.
7653
7654 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
7655
7656         * marshal.c (emit_struct_conv): Print an error message instead of
7657         asserting when a type does not have the StructLayout attribute.
7658
7659 2004-02-20  Martin Baulig  <martin@ximian.com>
7660
7661         * reflection.c (mono_type_get_object): Also use the cache for
7662         generic instances.
7663         (mono_reflection_bind_generic_parameters): Always compute
7664         `ginst->ifaces'.        
7665
7666 2004-02-20  Martin Baulig  <martin@ximian.com>
7667
7668         * class.h (MonoGenericMethod): Removed `klass'.
7669
7670         * class.c (mono_class_inflate_generic_method): Added `MonoClass
7671         *klass' argument.
7672
7673 2004-02-20  Martin Baulig  <martin@ximian.com>
7674
7675         * reflection.c (method_encode_methodspec): Actually use the
7676         uninflated signature for the memberref.
7677
7678 2004-02-20  Martin Baulig  <martin@ximian.com>
7679
7680         * class.h (MonoGenericMethod): Removed `declaring'.
7681
7682         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
7683         is NULL, compute it here.
7684
7685 2004-02-20  Martin Baulig  <martin@ximian.com>
7686
7687         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
7688
7689         * metadata.c (mono_metadata_generic_inst_hash): New method.
7690         (mono_metadata_generic_inst_equal): New method.
7691
7692         * reflection.c (mono_reflection_bind_generic_parameters): Use the
7693         `klass->image->generic_inst_cache' cache to avoid creating
7694         duplicate MonoGenericInst's.
7695
7696         * class.c (mono_class_inflate_generic_type): Use the cache.
7697
7698 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
7699
7700         * object.c: fixed gc descriptor calculation for embedded valuetypes.
7701
7702 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7703
7704         * icall.c: added Socket.WSAIoctl icall.
7705
7706         * socket-io.[ch]: implemented
7707         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
7708
7709 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
7710
7711         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
7712
7713 2004-02-18  Urs C Muff  <umuff@quark.com>
7714
7715         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
7716         this work on PPC and other big-endian architectures.
7717
7718         * debug-mono-symfile.h: Prepended the names of all the `guint32'
7719         fields with an underscore to make sure they're only accessed by
7720         the read32() macro.
7721
7722 2004-02-18  Martin Baulig  <martin@ximian.com>
7723
7724         * icall.c: Put the klass->refclass changes back for methods and
7725         fields, but not for properties and events.  We're currently not
7726         distinguishing between DeclaringType and ReflectedType for
7727         properties and events, that's what caused the regressions.
7728
7729 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7730
7731         * object.c:
7732         (mono_async_result_new): the handle can be NULL.
7733
7734         * threadpool.c: Use an event instead of a semaphore, don't initialize
7735         it until needed. This saves quite a few semaphores from being created
7736         when using the threadpool.
7737
7738 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
7739
7740         * object.c (mono_string_is_interned_lookup): Fix interning of long
7741         strings. Fixes #54473.
7742
7743         * domain.c (ldstr_equal): Optimize if the two strings are equal.
7744
7745         * icall.c: Revert the klass->refclass changes since they introduce
7746         regressions (bug #54518).
7747
7748 2004-02-18  Martin Baulig  <martin@ximian.com>
7749
7750         * class.c (mono_class_init): If we're a generic instance and don't
7751         come from a TypeBuilder, inflate our members here.
7752         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
7753         (mono_class_create_generic): New public method.
7754         (mono_class_initialize_generic): Removed.
7755         (get_instantiation_name): Renamed to
7756         _mono_class_get_instantiation_name() and made it public.
7757
7758 2004-02-18  Martin Baulig  <martin@ximian.com>
7759
7760         * class.c (mono_class_inflate_generic_type): Clear the new
7761         instance's `nginst->klass' when inflating a generic instance.
7762         (mono_class_is_subclass_of): Added (basic) support for generic
7763         instances.
7764
7765 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
7766
7767         * appdomain.h, domain.c: use a MonoCodeManager instead of a
7768         MonoMempool to hold compiled native code.
7769
7770 2004-02-17  Martin Baulig  <martin@ximian.com>
7771
7772         * class.h (MonoDynamicGenericInst): Added `count_properties' and
7773         `properties'.
7774
7775         * reflection.c (mono_reflection_generic_inst_initialize): Added
7776         `MonoArray *properties' argument.
7777
7778         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
7779
7780 2004-02-17  Martin Baulig  <martin@ximian.com>
7781
7782         * icall.c (ves_icall_Type_GetFields): Renamed to
7783         ves_icall_Type_GetFields_internal() and added a
7784         `MonoReflectionType *rtype' argument; pass it to
7785         mono_field_get_object() to set the field's "reflected" type.
7786         (ves_icall_Type_GetConstructors): Likewise.
7787         (ves_icall_Type_GetEvents): Likewise.
7788         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
7789         argument; pass it to mono_method_get_object() to set the method's
7790         "reflected" type.       
7791
7792 2004-02-17  Martin Baulig  <martin@ximian.com>
7793
7794         * class.h (MonoDynamicGenericInst): New type.
7795         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
7796
7797         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
7798         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
7799         (ves_icall_MonoGenericInst_GetFields): New interncall.
7800
7801         * class.c (mono_class_from_generic): Don't call
7802         mono_class_initialize_generic() if this is a dynamic instance;
7803         ie. it's being created from a TypeBuilder.
7804         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
7805         `class->byval_arg.type'.
7806
7807         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
7808         to `inflate_method' and made static.
7809         (mono_reflection_inflate_field): Removed.
7810         (mono_reflection_generic_inst_initialize): New public method.
7811
7812         * reflection.h (MonoReflectionGenericInst): Removed `methods',
7813         `ctors' and `fields'; added `initialized'.
7814
7815 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
7816
7817         * debug-helpers.c (mono_method_full_name): Fix output for empty
7818         namespaces.
7819
7820 2004-02-12  Martin Baulig  <martin@ximian.com>
7821
7822         * class.h (MonoClassField): Added `MonoType *generic_type'.
7823
7824         * reflection.c (mono_image_get_fieldref_token): Added support for
7825         instantiated generic types.
7826         (field_encode_inflated_field): Removed.
7827         (mono_image_get_inflated_field_token): Removed.
7828         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
7829
7830         * reflection.h (MonoReflectionInflatedField): Removed.
7831
7832 2004-02-12  Martin Baulig  <martin@ximian.com>
7833
7834         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
7835         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
7836
7837         * reflection.c (mono_image_get_methodspec_token): Take a
7838         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
7839         (mono_image_create_token): Check whether we have a
7840         `method->signature->gen_method' and call
7841         mono_image_get_methodspec_token() if appropriate.
7842         (inflated_method_get_object): Removed.
7843         (mono_reflection_bind_generic_method_parameters): Return a
7844         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
7845         (mono_reflection_inflate_method_or_ctor): Likewise.
7846
7847         * reflection.h (MonoReflectionInflatedMethod): Removed.
7848
7849 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
7850
7851         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
7852         for custom valuetype marshalling.
7853
7854         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
7855
7856 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7857
7858         * icall.c: fixed WSAGetLastError_internal name.
7859
7860 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
7861
7862         * threads.c (mono_thread_attach): Allow this to be called multiple
7863         times for a thread.
7864         
7865         * threads.c (build_wait_tids): Do not wait for ourselves.
7866
7867         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
7868         appdomain list is empty.
7869
7870         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
7871         memory returned by mono_string_builder_to_utf16, since it points into
7872         managed memory. Thanks to Bernie Solomon for noticing this.
7873
7874         * icall.c: Add AppDomainSetup icalls.
7875
7876         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
7877
7878         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
7879         types.
7880
7881         * reflection.c (reflection_methodbuilder_to_mono_method): Save
7882         custom attributes to the method_aux struct. Also fix array indexes etc.
7883
7884         * loader.c (mono_method_get_param_names): Make dynamic case work again.
7885         
7886 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
7887
7888         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
7889         (both static and runtime) and reduce startup time.
7890
7891 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
7892
7893         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
7894         AsAny marshalling conversion instead of crashing.
7895
7896         * marshal.c: Fix warnings.
7897
7898 2004-02-09  Martin Baulig  <martin@ximian.com>
7899
7900         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
7901
7902         * reflection.h (MonoReflectionInflatedMethod): Removed the
7903         `declaring' field, it's now in the unmanaged MonoGenericMethod.
7904
7905         * reflection.c (method_encode_methodspec): Removed the `method'
7906         argument; we get it from `gmethod->declaring'.
7907         (inflated_method_get_object): Removed the `declaring' argument.
7908
7909 2004-02-09  Martin Baulig  <martin@ximian.com>
7910
7911         * class.h (MonoGenericMethod): New type.
7912         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
7913         `generic_method'.
7914
7915         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
7916         a `MonoGenericMethod *gen_method' one.
7917
7918         * class.c (mono_class_inflate_generic_type): Take an additional
7919         `MonoGenericMethod * argument.  This is only non-NULL if we're
7920         inflating types for a generic method.   
7921         (mono_class_inflate_generic_signature): Renamed to
7922         inflate_generic_signature() and made static; take a
7923         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
7924         (inflate_generic_header): Take a `MonoGenericMethod *' argument
7925         instead of a `MonoGenericInst *' one.
7926         (mono_class_inflate_generic_method): Likewise.
7927
7928         * reflection.c (encode_generic_method_sig): Take a
7929         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
7930         (method_encode_methodspec): Likewise.
7931         (inflated_method_get_object): Likewise. 
7932
7933         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
7934         field with a `MonoGenericMethod *gmethod' one.  
7935
7936 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
7937
7938         * class.h (mono_class_has_parent): add parens to expansion
7939         so you can ! this.
7940
7941 2004-02-08  Martin Baulig  <martin@ximian.com>
7942
7943         * image.h (MonoImage): Removed `generics_cache'.
7944
7945         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
7946         instead of a `MonoType *' argument; removed the `inflate_methods'
7947         argument.  Don't inflate methods here.
7948
7949         * loader.c (find_method): If it's a generic instance, call
7950         mono_class_init() on the `sclass->generic_inst->generic_type'.
7951
7952         * metadata.c (mono_type_size): Make this work on uninitialized
7953         generic instances; call it on the `ginst->generic_type's class.
7954
7955         * reflection.c (mono_reflection_bind_generic_parameters): Call
7956         mono_class_from_generic() to create the `ginst->klass'.
7957
7958 2004-02-08  Martin Baulig  <martin@ximian.com>
7959
7960         * class.h (MonoClass): Changed type of `generic_inst' from
7961         `MonoType *' to `MonoGenericInst *'.
7962
7963 2004-02-08  Martin Baulig  <martin@ximian.com>
7964
7965         * icall.c (ves_icall_Type_BindGenericParameters): Just call
7966         mono_type_get_object(), this is now creating a `MonoGenericInst'
7967         for MONO_TYPE_GENERICINST.
7968         (ves_icall_MonoGenericInst_GetParentType): Likewise.
7969         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
7970
7971         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
7972         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
7973         (inflated_method_get_object): Added `MonoClass *refclass' argument.
7974         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
7975         and reflected type.
7976
7977         * reflection.h (MonoReflectionInflatedMethod): Removed
7978         `declaring_type' and `reflected_type'.
7979
7980 2004-02-08  Martin Baulig  <martin@ximian.com>
7981
7982         * class.h (MonoGenericInst): Added `MonoType *parent' and
7983         `MonoType **ifaces'.
7984
7985         * reflection.h (MonoReflectionGenericInst): Removed `klass',
7986         `parent' and `interfaces'.
7987
7988         * reflection.c (mono_reflection_bind_generic_parameters): Take a
7989         `MonoType *' argument and return a `MonoType *'.
7990
7991         * icall.c
7992         (ves_icall_MonoGenericInst_GetParentType): New interncall.
7993         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
7994
7995 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
7996
7997         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
7998         valuetype marshalling.
7999
8000 2004-02-06  Martin Baulig  <martin@ximian.com>
8001
8002         * class.c
8003         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
8004         (my_mono_class_from_generic_parameter): Likewise.
8005
8006 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
8007
8008         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
8009         contents of the symbol files lazily.
8010
8011         * object.h (MonoThread): Add 'name' and 'name_len' fields.
8012
8013         * threads.h threads.c icall.c: New icalls for getting and setting the
8014         threads name.
8015
8016 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
8017
8018         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
8019         Raise an exception when the domain is not found.
8020
8021 2004-02-03  Martin Baulig  <martin@ximian.com>
8022
8023         * reflection.c (mono_image_get_methodspec_token): Use the
8024         uninflated signature; fixes gen-33.
8025
8026 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
8027
8028         * gc.c threads.c: Make the finalizer thread a normal managed thread so
8029         the finalizer code can use thread functionality.
8030
8031         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
8032         the finalizer thread.
8033
8034         * threads.c: Make some functions more robust.
8035
8036         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
8037
8038         * metadata.h: Add new marshalling conventions.
8039
8040         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
8041         stringbuilder marshalling. Fixes #53700.
8042
8043         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
8044
8045         * reflection.c (mono_image_get_type_info): Save declarative security
8046         info.
8047
8048         * reflection.c (mono_image_get_field_info): Handle uninitialized 
8049         unmanaged fields as well.
8050
8051         * appdomain.c: Bump corlib version.
8052
8053 2004-02-01  Martin Baulig  <martin@ximian.com>
8054
8055         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
8056         method type arguments.  
8057
8058 2004-01-30  Duncan Mak  <duncan@ximian.com>
8059
8060         * marshal.h: Add prototype for
8061         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
8062         and
8063         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
8064         fix the build.
8065
8066 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
8067
8068         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
8069         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
8070
8071 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
8072
8073         * marshal.c (mono_marshal_get_native_wrapper): Add support for
8074         custom marshalling of valuetypes.
8075
8076         * marshal.c: Fix some warnings.
8077
8078 2004-01-29  Martin Baulig  <martin@ximian.com>
8079
8080         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
8081         for generic method parameters.
8082
8083         * reflection.c (method_encode_methodspec): Write the uninflated
8084         signature into the methodspec table.
8085         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
8086         is always the uninflated method.
8087         (reflection_methodbuilder_to_mono_method): Copy the generic
8088         parameters from the MethodBuilder into `header->gen_params'.
8089
8090 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
8091
8092         * class.c (mono_class_from_generic_parameter): Fix warning.
8093
8094 2004-01-27  Martin Baulig  <martin@ximian.com>
8095
8096         * class.c (mono_class_from_generic_parameter): Don't create
8097         `klass->methods' here.  
8098
8099 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
8100
8101         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
8102         extension since it does not work with libraries named lib<FOO>.dll.so.
8103
8104 2004-01-25  Martin Baulig  <martin@ximian.com>
8105
8106         * class.c (mono_class_inflate_generic_type): Added support for
8107         MONO_TYPE_GENERICINST.
8108
8109         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
8110         inflate methods on open constructed types.      
8111
8112 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8113
8114         * object.c: fire ProcessExit event in the root AppDomain after running
8115         Main. Fixes bug #53299.
8116
8117 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
8118
8119         * socket-io.c: include the new socket-wrappers.h header.
8120         Use the wrappers instead of the unix socket functions to make the code
8121         more clear.
8122
8123 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
8124
8125         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
8126
8127         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
8128         Fixes #22532.
8129
8130 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
8131
8132         * reflection.c (mono_image_create_pefile): Handle the case when the
8133         entry point is not a MethodBuilder.
8134
8135         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
8136         field to ReflectionMethod since it is not allways a builder.
8137
8138         * reflection.c (type_get_fully_qualified_name): New helper function to
8139         return the fully qualified name of a type.
8140
8141         * reflection.c (encode_marshal_blob): Always emit the fully qualified
8142         type name for custom marshallers.
8143
8144         * reflection.c (mono_marshal_spec_from_builder): Ditto.
8145
8146         * class.c (mono_class_setup_vtable): If a parent class already 
8147         implements an interface, use the implementing methods from that class.
8148         Fixes #53148.
8149
8150 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8151
8152         * threadpool.c: just return instead of ExitThread to allow for thread
8153         clean up earlier.
8154
8155 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
8156
8157         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
8158         when closing resource modules.
8159
8160         * reflection.c (mono_image_create_pefile): Handle the case when the
8161         entry point is not a MethodBuilder.
8162
8163         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
8164         field to ReflectionMethod since it is not allways a builder.
8165
8166 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
8167
8168         * marshal.c (mono_marshal_get_managed_wrapper): 
8169         mono_marshal_alloc takes native int so CONV_I
8170         the arg for 64bits.
8171
8172 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
8173
8174         * reflection.c (fixup_cattrs): New function to fixup the methoddef
8175         tokens in the cattr table. Fixes #53108.
8176
8177 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8178
8179         * loader.c: don't trim ".dll" before looking up in the config file.
8180         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
8181
8182 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
8183
8184         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
8185         Return the module which contains the resource as well.
8186         (ves_icall_System_Reflection_Module_Close): New icall.
8187
8188         * appdomain.c: Bump corlib version number.
8189
8190         * image.c (mono_image_addref): New public function.
8191
8192         * assembly.c: Call mono_image_addref.
8193
8194         * reflection.c (mono_module_get_object): Increase reference count of 
8195         the image.
8196
8197         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
8198         Fixes #22532.
8199
8200         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
8201         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
8202         proper exceptions on DllImport problems.
8203
8204 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
8205
8206         * class.c, metadata.c: eliminate CSIZE macro.
8207
8208 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
8209
8210         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
8211         * object.h: Added async_callback field in MonoAsyncResult.
8212         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
8213         * verify.c: Added async_callback in MonoAsyncResult layout.
8214
8215 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
8216
8217         * reflection.c (mono_reflection_get_custom_attrs): Add support
8218         for Modules.
8219
8220 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
8221
8222         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
8223         marshalling.
8224         (mono_marshal_method_from_wrapper): Add null pointer check.
8225
8226 2004-01-16  Martin Baulig  <martin@ximian.com>
8227
8228         * debug-mono-symfile.h: Set version number to 36 and reflect
8229         latest symbol writer changes.
8230
8231 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
8232
8233         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
8234         multi-dimensional arrays.
8235         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
8236         (mono_class_from_mono_type): Use bounded_array_class_get.
8237         
8238         * class.c (mono_bounded_array_class_get): New function which takes
8239         a 'bounded' bool argument to distinguish vectors from one dimensional
8240         arrays.
8241
8242         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
8243         bounded_array_class_get if the array has bounds.
8244
8245         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
8246         Search modules loaded using AssemblyBuilder:AddModule as well.
8247
8248 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8249
8250         * appdomain.c: increased corlib version.
8251         * filewatcher.c: removed g_print.
8252         * icall.c:
8253         (get_property_info): only allocate what is actually requested.
8254         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
8255
8256 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8257
8258         * Makefile.am: added filewatcher.[ch]
8259         * filewatcher.[ch]: FileSystemWatcher runtime support.
8260         * icall.c: added new FSW icalls.
8261
8262 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
8263
8264         * string-icalls.c: fix stringbuilder regression as suggested by
8265         Iain McCoy <iain@mccoy.id.au>.
8266
8267 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
8268
8269         * process.c (process_read_stringtable_block): Recognize '007f' as
8270         a language neutral stringtable block.
8271
8272 2004-01-12  Patrik Torstensson
8273
8274         * object.h (MonoStringBuilder) : Changed layout to support our
8275         new stringbuilder class.
8276         * marshal.c: Change marshalling to support the new layout of 
8277         string builder.
8278         * appdomain.c: increased version number because new layout of
8279         string builder.
8280
8281 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
8282
8283         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
8284         assembly name as an string instead of an AssemblyName, since it is
8285         easier to extract info from it.
8286
8287         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
8288         the culture subdirectories too. Fixes #52231.
8289
8290 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8291
8292         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
8293         It takes 2 new parameters with an optional name for the method to look
8294         for and case ignoring info.
8295
8296         * threadpool.c: removed unused variable.
8297
8298 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8299
8300         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
8301         It takes 2 new parameters with an optional name for the property to look
8302         for and case ignoring info.
8303         Fixes bug #52753.
8304
8305 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
8306
8307         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
8308         Fix #52451.
8309
8310 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8311
8312         * appdomain.c:
8313         * assembly.c: escape the uri before passing it to g_filename_from_uri.
8314         Fixes bug #52630.
8315
8316 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
8317
8318         * reflection.c: Add support for more than one unmanaged resource.
8319
8320         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
8321         in field->def_value, as done in all other cases.
8322
8323         * reflection.c (mono_reflection_get_custom_attrs): Add support for
8324         TypeBuilders.
8325
8326         * reflection.c (mono_reflection_create_runtime_class): Remove 
8327         errorneous assignment to klass->element_class, since it is already
8328         done in mono_reflection_setup_internal_class.
8329
8330 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8331
8332         * gc.c: added missing LeaveCriticalSection.
8333         * icall.c: indented a couple of lines.
8334         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
8335         if we call EndInvoke inside a callback. Fixes bug #52601.
8336
8337 2004-01-07  Martin Baulig  <martin@ximian.com>
8338
8339         * mono-debug-debugger.h
8340         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
8341
8342 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
8343
8344         * appdomain.c: Use messages in NotImplementedException.
8345
8346         * exception.c (mono_get_exception_not_implemented): Now this takes
8347         a message argument.
8348
8349         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
8350         exception instead of g_asserting an aborting when something is not
8351         implemented.
8352
8353         Add some inline docs.
8354
8355 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
8356
8357         * reflection.h: Update after changes to object layout.
8358
8359         * reflection.c: Implement saving of unmanaged aka win32 resources.
8360
8361         * appdomain.c: Bump version number.
8362
8363         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
8364         Handle missing domains gracefully.
8365
8366 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
8367
8368         * file-io.c : On Windows, there are much more invalid_path_chars.
8369
8370 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
8371
8372         * class.h, object.c: prepare for GetType () speedup.
8373
8374 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
8375
8376         * profiler.c: workaround for --profile null reference exception on
8377           cygwin. Patch by Patrik Torstensson.
8378
8379 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
8380
8381         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
8382         make work for unaligned access.
8383
8384 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
8385
8386         * class.c: small cleanup (class->fields [i] -> field).
8387         * image.c: check address of metadata is valid.
8388
8389 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
8390
8391         * assembly.h assembly.c (mono_assembly_loaded): New public function to
8392         search the list of loaded assemblies.
8393
8394         * reflection.c (mono_reflection_type_from_name): Use 
8395         mono_assembly_loaded instead of mono_image_loaded.
8396
8397         * reflection.c: Fix warnings.
8398
8399 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
8400
8401         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
8402         is dynamic. This is needed since an assembly can contain both dynamic and
8403         non-dynamic images.
8404
8405         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
8406         assembly->dynamic.
8407
8408         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
8409
8410         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
8411         to store modules loaded using AddModule.
8412
8413         * reflection.c (mono_image_fill_file_table): Generalize this so it works
8414         on Modules.
8415
8416         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
8417
8418         * reflection.c (mono_image_fill_export_table_from_module): New function to
8419         fill out the EXPORTEDTYPES table from a module.
8420
8421         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
8422         into a separate function. Also handle loaded non-dynamic modules.
8423
8424         * reflection.c (mono_image_basic_init): Fix memory allocation.
8425
8426         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8427
8428         * assembly.c (mono_assembly_load_references): Make this public.
8429
8430 2003-12-19  Martin Baulig  <martin@ximian.com>
8431
8432         * class.c (mono_class_initialize_generic): Made this static, take
8433         a `MonoGenericInst *' instead of a `MonoClass *'.
8434         (mono_class_from_generic): Call mono_class_initialize_generic()
8435         unless we're already initialized or being called from
8436         do_mono_metadata_parse_generic_inst().
8437
8438         * class.h (MonoGenericInst): Added `initialized' and
8439         `init_pending' flags.
8440
8441         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
8442         `mono_class_init (gklass)' or mono_class_initialize_generic()
8443         here; set `generic_inst->init_pending' while parsing the
8444         `type_argv'.
8445
8446 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
8447
8448         * locales.c: include string.h for memxxx prototypes
8449
8450 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
8451
8452         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
8453         constructor when accessing literal fields.
8454
8455 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
8456
8457         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8458
8459         * reflection.c (assembly_add_resource_manifest): New function to fill
8460         the MANIFESTRESOURCE table.
8461
8462         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
8463
8464         * reflection.h: Update to changes in class layout.
8465
8466         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
8467         Reenable call to mono_runtime_is_shutting_down ().
8468
8469         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
8470         determine if the runtime is shutting down.
8471
8472 2003-12-16  Jackson Harper <jackson@ximian.com>
8473
8474         * icall.c: comment out call to mono_runtime_is_shutting_down to
8475         fix build.
8476         
8477 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
8478
8479         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
8480         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
8481
8482 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
8483
8484         * reflection.c: move definition of swap_with_size
8485         to before its first call
8486
8487 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
8488
8489         * appdomain.c (mono_runtime_is_shutting_down): New public function.
8490
8491         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
8492         icall.
8493
8494         * object.c: Fix warnings.
8495
8496         * icall.c (ves_icall_Type_Get...): Only consider inherited static
8497         members if FlattenHierarchy is set.
8498
8499         * reflection.c (mono_image_add_decl_security): New function to emit
8500         declarative security.
8501
8502         * reflection.h reflection.c: Add support for declarative security.
8503
8504         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
8505         
8506 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
8507
8508         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
8509         
8510         * appdomain.c verify.c: Moved corlib version checking into its own
8511         function in appdomain.c since it needs to create vtables etc.
8512
8513 2003-12-13  Patrik Torstensson <p@rxc.se>
8514
8515         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
8516         instead of unwrapped server.
8517
8518 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
8519
8520         * verify.c (check_corlib): Fix field index.
8521
8522 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
8523
8524         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
8525         GetGacPath icall.
8526
8527 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
8528
8529         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
8530         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
8531         cope with sizeof(size_t) != sizeof(guint32).
8532
8533 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8534
8535         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
8536         in case of failure.
8537
8538 2003-12-10  Mark Crichton <crichton@gimp.org>
8539
8540         * icall.c: removed the GetNonZeroBytes.  We now handle this case
8541         in managed code.
8542
8543         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
8544
8545 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
8546
8547         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
8548         marked as deleted.
8549
8550 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
8551
8552         * verify.c (check_corlib): Handle the case when the version field is 
8553         initialized by a static constructor.
8554
8555 2003-12-08  Patrik Torstensson  <p@rxc.se>
8556
8557     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
8558
8559 2003-12-08  Martin Baulig  <martin@ximian.com>
8560
8561         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
8562         a MonoReflectionGenericParameter, also take the parameter index
8563         and name as arguments.
8564         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
8565         (ves_icall_MonoGenericParam_initialize): New interncall.
8566         (ves_icall_Type_make_byref_type): New interncall.
8567
8568         * reflection.h (MonoReflectionGenericParam): Derive from
8569         MonoReflectionType, not just from MonoObject.  Added `refobj' and
8570         `index' fields.
8571
8572         * reflection.c (mono_reflection_define_generic_parameter): Create
8573         and return a new MonoReflectionGenericParam; don't initialize the
8574         constraints here.
8575         (mono_reflection_initialize_generic_parameter): New public method;
8576         initializes the constraints and creates the `param->pklass'.
8577
8578 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
8579
8580         * reflection.h reflection.c: Use the new fields 'num_types', 
8581         'num_fields' and 'num_methods' to track the number of types etc.
8582
8583         * verify.c (check_corlib): Check corlib version number.
8584
8585 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
8586
8587         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
8588         function works on all methods.
8589
8590 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
8591
8592         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
8593         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
8594         the custom_type_info flag of the transparent proxy.
8595         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
8596         objects that supports IRemotingTypeInfo.
8597         * object.h: Added custom_type_info field in transparent proxy.
8598
8599 2003-12-06  Martin Baulig  <martin@ximian.com>
8600
8601         * class.c (mono_class_create_from_generic): Removed.
8602         (mono_class_from_generic): Check `ginst->klass' before doing
8603         anything else.  This is important to fully support "recursive"
8604         generic types.
8605
8606         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
8607         empty `generic_inst->klass' before doing anything else.
8608
8609 2003-12-06  Dick Porter  <dick@ximian.com>
8610
8611         * verify.c: 
8612         * object.h:
8613         * icall.c:
8614         * locales.c: Use C structs to access class fields.  Don't do a
8615         conversion between MonoString and UChar because both are
8616         platform-endian UTF-16.  Compare now takes startindex and count
8617         parameters.  Add a char overload for IndexOf.  Speed up the
8618         invariant string IndexOf.
8619
8620 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
8621
8622         * Makefile.am (monosn_LDADD): Fix parallel build.
8623
8624 2003-12-04  Martin Baulig  <martin@ximian.com>
8625
8626         * icall.c
8627         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
8628         (ves_icall_Type_make_array_type): New interncall.       
8629
8630 2003-12-04  Martin Baulig  <martin@ximian.com>
8631
8632         * locales.c: also change it in the !HAVE_ICU case.
8633
8634 2003-12-04  Dick Porter  <dick@ximian.com>
8635
8636         * icall.c:
8637         * locales.c: construct_compareinfo is now in CompareInfo, not
8638         CultureInfo.
8639
8640 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
8641
8642         * image.c (mono_image_load_file_for_image): Cache loaded images in the
8643         image->files array.
8644
8645         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
8646         table as well.
8647
8648         * assembly.c (mono_assembly_load_references): Only load references
8649         once.
8650
8651         * class.c (mono_class_from_name): Avoid linear search of the 
8652         EXPORTEDTYPE table.
8653
8654         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
8655
8656 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
8657
8658         * image.h (MonoImage): Add 'field_cache' field.
8659
8660         * loader.c (mono_field_from_token): Cache field lookups.
8661         
8662         * reflection.c (mono_module_get_object): Fix name property.
8663
8664         * icall.c (ves_icall_get_enum_info): Update after changes to 
8665         mono_metadata_get_constant_index ().
8666
8667         * icall.c: Get rid of get_type_info icall, use a separate icall for
8668         each type property to avoid needless memory allocations. Fixes #51514.
8669
8670         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
8671         to avoid needless binary searches.
8672
8673         * class.c (class_compute_field_layout): Move the initialization of
8674         field->def_value to mono_class_vtable ().
8675
8676         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
8677         non-corlib types.
8678
8679         * object.c (mono_object_allocate): Make it inline.
8680
8681         * object.c (mono_object_allocate_spec): Make it inline.
8682         
8683 2003-12-02  Dick Porter  <dick@ximian.com>
8684
8685         * locales.c (create_NumberFormat): NumberFormatInfo construction.
8686         Patch by Mohammad DAMT (mdamt@cdl2000.com).
8687
8688 2003-12-01  Dick Porter  <dick@ximian.com>
8689
8690         * threads.c: Fix signature and call in CreateMutex and
8691         CreateEvent.
8692
8693 2003-12-01  Dick Porter  <dick@ximian.com>
8694
8695         * icall.c: 
8696         * locales.c: Implement string compares and searching
8697
8698         * object.h: Add extra Thread field
8699
8700 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
8701
8702         * reflection.c (fixup_method): Add support for MonoCMethod.
8703
8704 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
8705
8706         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
8707
8708         * reflection.c (assembly_name_to_aname): Allow extra characters in
8709         assembly names. Fixes #51468.
8710
8711 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
8712
8713         * exception.c (mono_exception_from_name_domain): New helper function.
8714
8715         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
8716         exception object in the correct domain.
8717
8718         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
8719         formatting + make a copy a the input data.
8720
8721         * loader.c (mono_get_method_from_token): Methods which contain
8722         native code do not have entries in the ImplMap.
8723
8724         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
8725         Thanks to Gonzalo for spotting this.
8726         
8727         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
8728         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
8729
8730         * assembly.h (mono_assembly_load_from): Split the second part of 
8731         assembly loading into a new public function.
8732
8733         * exception.h (mono_get_exception_bad_image_format): New function.
8734
8735 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
8736
8737         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
8738         Enumerate all modules inside a dynamic assembly. Fixes #51293.
8739         
8740         * icall.c: Add new icall for creating dynamic methods.
8741
8742         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
8743
8744         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
8745
8746         * reflection.c (mono_reflection_create_dynamic_method): New icall to
8747         create a dynamic method.
8748
8749         * reflection.c (resolve_object): New helper function.
8750
8751         * reflection.c: Generalize ReflectionMethodBuilder and the functions
8752         which manipulate it so they can also work on dynamic methods.
8753
8754         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
8755         creating the MonoReflectionMethodAux structure if it is not needed.
8756         
8757         * reflection.h verify.c: Update after changes to object layout.
8758
8759         * reflection.c (method_builder_encode_signature): Fix compilation on
8760         gcc 2.95.x.
8761
8762 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
8763
8764         * appdomain.h: Added support for context static fields. Added static_data
8765           field to MonoAppContext and renamed thread_static_fields to a more
8766           generic special_static_fields in MonoAppDomain, since it can now contain
8767           context static fields.
8768         * domain.c: Updated hashtable name.
8769         * object.c: Replaced field_is_thread_static() for a more generic
8770           field_is_special_static() which also checks for context static attribute.
8771           In mono_class_vtable(), added support for static context fields.
8772         * threads.c: Changed methods that manage thread static fields to more
8773           generic methods so they can be reused both for thread and context static
8774           data.
8775         * threads.h: Declared some new methods.
8776
8777 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
8778
8779         * reflection.h: Update after changes to the managed types.
8780
8781         * reflection.c (encode_custom_modifiers): New helper function.
8782
8783         * reflection.c (method_encode_signature): Emit custom modifiers.
8784
8785         * reflection.c (field_encode_signature): Emit custom modifiers.
8786
8787 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
8788
8789         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
8790
8791         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
8792         implementation.
8793
8794         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
8795         icall.
8796
8797         * object.c (mono_field_get_value_object): New function.
8798
8799         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
8800         specific.
8801
8802 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
8803
8804         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
8805         return a preallocated out-of-memory exception instance.
8806
8807         * object.c (out_of_memory): Use the new function.
8808
8809         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
8810         flag is before the custom modifiers. Fixes #49802.
8811
8812 2003-11-16  Martin Baulig  <martin@ximian.com>
8813
8814         * class.c (mono_class_is_open_constructed_type): Implemented the
8815         MONO_TYPE_GENERICINST case.
8816
8817 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
8818
8819         * assembly.c (mono_assembly_fill_assembly_name): New function to
8820         fill out the MonoAssemblyName structure.
8821         (mono_assembly_open): Use the new function.
8822
8823         * icall.c (fill_reflection_assembly_name): New helper function.
8824
8825         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
8826         new function.
8827
8828         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
8829
8830 2003-11-15  Martin Baulig  <martin@ximian.com>
8831
8832         * class.c (mono_class_is_open_constructed_type): New public
8833         function; checks whether a type is an open constructed type,
8834         ie. whether it still contains type parameters.
8835         (mono_class_inflate_generic_type): If we're a type parameter and
8836         the inflated type is also a MONO_TYPE_(M)VAR, return the original
8837         type.
8838
8839         * class.h (MonoGenericInst): Added `guint32 is_open'.
8840
8841         * loader.c (method_from_methodspec): Check whether we're an open
8842         or closed constructed type and set `ginst->is_open'.
8843
8844         * reflection.c (mono_reflection_bind_generic_parameters): Check
8845         whether we're an open or closed constructed type and set
8846         `ginst->is_open'.
8847         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
8848         from open constructed types.
8849
8850 2003-11-15  Martin Baulig  <martin@ximian.com>
8851
8852         * reflection.c (mono_reflection_bind_generic_parameters): If we're
8853         a generic instance (instead of a generic type declaration) with
8854         unbound generic parameters, bind them to our actual types.
8855
8856 2003-11-14  Martin Baulig  <martin@ximian.com>
8857
8858         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
8859
8860         * reflection.c (mono_reflection_bind_generic_parameters): If we're
8861         an interface type, populate `res->interfaces' with instantiated
8862         versions of all the interfaces we inherit.
8863
8864 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
8865
8866         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
8867         when MONO_PATH is set but doesn't contain the install dir.
8868
8869 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8870
8871         * icall.c:
8872         (ves_icall_Type_GetInterfaces): don't return an interface twice when
8873         it's also implemented in base classes. Fixes bug #50927.
8874
8875 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
8876
8877         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
8878         if this method is called from a finalizer. Fixes #50913.
8879
8880 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
8881
8882         * threads.c: Implement VolatileRead/VolatileWrite
8883
8884         * icall.c: Add new icalls for VolatileRead/VolatileWrite
8885
8886 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
8887
8888         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
8889         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
8890         2.95.3.
8891
8892         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
8893         from Peter Ross (pro@missioncriticalit.com).
8894         
8895 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
8896
8897         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
8898
8899 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
8900
8901         * assembly.c (mono_assembly_load_references): Disable check because it
8902         triggers on older corlibs which lots of people have.
8903
8904 2003-11-12  Jackson Harper  <jackson@ximian.com>
8905
8906         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
8907         load corlib.dll if mscorlib.dll is not found.
8908         * assembly.h: Remove corlib name define.
8909         * class.c:
8910         * domain.c:
8911         * image.c: Change corlib name to mscorlib.
8912         
8913 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
8914
8915         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
8916
8917 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
8918
8919         * appdomain.h: Added loader_optimization here to sync with the C#
8920         code, and add disallow_binding_redirects field.
8921
8922 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
8923
8924         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
8925
8926         * reflection.c (mono_image_build_metadata): Fix crash on modules
8927         with no types.
8928
8929         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
8930
8931         * icall.c (ves_icall_get_method_info): Return callingConvention as
8932         well.
8933
8934         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
8935         namespaces from the EXPORTEDTYPE table as well.
8936
8937         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
8938         from all modules inside the assembly.
8939         
8940 2003-11-11  Martin Baulig  <martin@ximian.com>
8941
8942         * reflection.c (mono_reflection_bind_generic_parameters): Make
8943         this work for interfaces.
8944
8945 2003-11-11  Martin Baulig  <martin@ximian.com>
8946
8947         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
8948
8949 2003-11-11  Martin Baulig  <martin@ximian.com>
8950
8951         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
8952         "MonoInflatedMethod" and "MonoInflatedCtor".
8953
8954 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
8955
8956         * reflection.c (resolution_scope_from_image): Use the assembly table
8957         from the manifest module, since other modules don't have it.
8958
8959         * debug-helpers.c (mono_type_full_name): New helper function.
8960
8961         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
8962
8963         * image.c (mono_image_load_file_for_image): New public function which
8964         is a replacement for the load_file_for_image in class.c.
8965
8966         * assembly.c (mono_assembly_load_module): A wrapper for the function
8967         above which does assembly association and reference loading too.
8968
8969         * class.c (mono_class_from_name): Call mono_assembly_load_module.
8970
8971 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8972
8973         * appdomain.c: not all of the attributes for the full assembly name
8974         are required and the order doesn't matter. Fixes bug #50787.
8975
8976 2003-11-10  Dick Porter  <dick@ximian.com>
8977
8978         * locales.c: Use platform-endian UTF16
8979
8980 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
8981
8982         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
8983         
8984 2003-11-10  Martin Baulig  <martin@ximian.com>
8985
8986         * metadata.c
8987         (mono_metadata_load_generic_params): Make this actually work.
8988
8989         * reflection.c (mono_reflection_bind_generic_parameters): If our
8990         parent is a generic instance, pass all the `types' to it, no
8991         matter whether it has the same number of type parameters or not.
8992
8993 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
8994
8995         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
8996
8997         * assembly.c (mono_assembly_load_references): Move the image<->assembly
8998         assignment code to this function so it gets called recursively for all
8999         modules.
9000
9001         * image.c (load_modules): Remove the assembly assignment since it is
9002         now done by mono_assembly_load_references.
9003         
9004         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
9005         Add 'module' argument.
9006         (mono_module_get_types): New helper function.
9007         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
9008
9009 2003-11-08  Martin Baulig  <martin@ximian.com>
9010
9011         * class.c (mono_class_inflate_generic_method): Interface method
9012         don't have a header.
9013
9014         * reflection.c (mono_image_get_methodspec_token): Take an
9015         additional `MonoGenericInst *' argument instead of reading it from
9016         the header; this is necessary to support interfaces.
9017         (mono_image_create_token): Pass the `MonoGenericInst *' from the
9018         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
9019         (inflated_method_get_object): Take an additional `MonoGenericInst *'
9020         argument.
9021
9022         * reflection.h (MonoReflectionInflatedMethod): Added
9023         `MonoGenericInst *ginst'.
9024
9025 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
9026
9027         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
9028
9029 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
9030
9031         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
9032
9033 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
9034
9035         * reflection.c 
9036         (reflection_methodbuilder_from_method_builder):
9037         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
9038         initialize a ReflectionMethodBuilder structure.
9039         (mono_image_get_methodbuilder_token):
9040         (mono_image_get_ctorbuilder_token): New functions to emit memberref
9041         tokens which point to types in another module inside the same assembly.
9042
9043         * reflection.c: Use the new helper functions.
9044         
9045         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
9046
9047         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
9048         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
9049
9050         * reflection.c (resolution_scope_from_image): Emit a moduleref if
9051         neccesary.
9052
9053         * reflection.c (mono_image_build_metadata): Emit metadata only for the
9054         current module. Emit the manifest only for the main module.
9055
9056         * reflection.c (mono_image_create_token): Add assertion when a 
9057         memberref needs to be created.
9058
9059         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
9060
9061         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
9062         larger buffer for the custom attribute blob. Fixes #50637.
9063         
9064 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9065
9066         * threadpool.c: notify listener on async processing handles after
9067         invoking the async callback. Thanks to Zoltan.
9068
9069 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
9070
9071         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
9072         avoid code duplication.
9073
9074         * reflection.h (MonoDynamicImage): New type which is currently unused,
9075         but will be used through the ref.emit code in place of 
9076         MonoDynamicAssembly.
9077
9078         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
9079         object layout.
9080
9081         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
9082         a MonoDynamicImage instead of just a MonoImage.
9083         
9084         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
9085         icalls to ModuleBuilder but keep their semantics, so they will work
9086         with moduleb->assemblyb. This will change later.
9087         
9088 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
9089
9090         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
9091         object layout.
9092
9093         * reflection.c (mono_image_build_metadata): Avoid creation of a default
9094         main module, since it is now done by the managed code.
9095
9096 2003-11-03  Martin Baulig  <martin@ximian.com>
9097
9098         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
9099         `ginst->klass' here.
9100         (method_encode_methodspec): Don't use the `ginst->generic_method's
9101         klass if it's a generic instance, use `ginst->klass' in this case.
9102
9103 2003-11-03  Martin Baulig  <martin@ximian.com>
9104
9105         * reflection.c (mono_image_get_generic_method_param_info):
9106         Removed, use mono_image_get_generic_param_info() instead.
9107         (mono_image_get_type_info): Write the GenericParam table before
9108         the Method table.  This is neccessary because in the GenericParam
9109         table, type parameters of the class (ie. '!0' etc.) must come
9110         before the ones from its generic methods (ie. '!!0' etc).
9111
9112 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
9113
9114         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
9115
9116 2003-11-02  Martin Baulig  <martin@ximian.com>
9117
9118         * reflection.c (create_generic_typespec): Take a
9119         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
9120         the generic parameters from it.
9121
9122 2003-11-02  Martin Baulig  <martin@ximian.com>
9123
9124         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
9125         instead of a `MonoClassField *' since we just need the type.
9126         (create_generic_typespec): New static function.  Creates a
9127         TypeSpec token for a generic type declaration.
9128         (mono_image_get_generic_field_token): New static function.
9129         (mono_image_create_token): If we're a FieldBuilder in a generic
9130         type declaration, call mono_image_get_generic_field_token() to get
9131         the token.
9132
9133 2003-11-02  Martin Baulig  <martin@ximian.com>
9134
9135         * reflection.h
9136         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
9137         `MonoReflectionGenericInst *declaring_type' and
9138         `MonoReflectionGenericInst *reflected_type' fields.
9139
9140         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
9141         `MonoReflectionGenericInst *declaring_type' and a
9142         `MonoReflectionGenericInst *reflected_type' argument instead of a
9143         single `MonoReflectionGenericInst *type' one.  Set
9144         `res->declaring_type' and `res->reflected_type' from them.
9145         (mono_reflection_inflate_field): Likewise.      
9146
9147 2003-11-02  Martin Baulig  <martin@ximian.com>
9148
9149         * class.c (mono_class_setup_vtable): Don't store generic methods
9150         in the vtable.  
9151
9152 2003-11-02  Martin Baulig  <martin@ximian.com>
9153
9154         * reflection.h (MonoReflectionGenericInst): Added
9155         `MonoReflectionType *declaring_type'.
9156
9157         * reflection.c (mono_reflection_bind_generic_parameters): Use
9158         `if (tb->parent)' instead of `klass->parent'.
9159
9160 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
9161
9162         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
9163         with an empty ASSEMBLY table.
9164
9165         * reflection.c (mono_image_build_metadata): Avoid using the same loop
9166         variable in the inner and outer loops.
9167
9168 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
9169
9170         * metadata.h (mono_metadata_make_token): Put parentheses around macro
9171         argument.
9172
9173         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
9174         
9175         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
9176         icalls. Instead, do everything in managed code. This is needed since
9177         it is hard to restore the original domain etc. in unmanaged code in the
9178         presence of undeniable exceptions.
9179
9180         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
9181         New icalls to push and pop appdomain refs.
9182
9183 2003-10-31  Martin Baulig  <martin@ximian.com>
9184
9185         * class.c (inflate_generic_type): Renamed to
9186         mono_class_inflate_generic_type() and made it public.
9187
9188         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
9189         New interncall.
9190
9191         * loader.c (mono_field_from_memberref): Also set the retklass for
9192         typespecs.
9193
9194         * fielder.c (mono_image_get_inflated_field_token): New static
9195         method; creates a metadata token for an inflated field.
9196         (mono_image_create_token, fixup_method): Added support for
9197         "MonoInflatedField".
9198         (fieldbuilder_to_mono_class_field): New static function.
9199         (mono_reflection_inflate_field): New public function.
9200
9201         * reflection.h
9202         (MonoReflectionGenericInst): Added `MonoArray *fields'.
9203         (MonoReflectionInflatedField): New typedef.     
9204
9205 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
9206
9207         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
9208         for Solaris and other platforms without s6_addr16
9209
9210 2003-10-30  Martin Baulig  <martin@ximian.com>
9211
9212         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
9213         argument instead of two.
9214         (mono_class_inflate_generic_signature): Likewise.
9215         (inflate_generic_header): Likewise.
9216         (mono_class_inflate_generic_method): Likewise.  In addition, if
9217         `ginst->klass' is set, it becomes the new `method->klass'.
9218
9219         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
9220         field.
9221
9222         * reflection.c (encode_generic_method_sig): Write a 0xa as the
9223         first byte. [FIXME]
9224         (method_encode_methodspec): If we have generic parameters, create
9225         a MethodSpec instead of a MethodRef.
9226         (fixup_method): Added support for "MonoInflatedMethod" and
9227         "MonoInflatedCtor".
9228         (mono_image_create_token): Added support for "MonoInflatedMethod"
9229         and "MonoInflatedCtor".
9230         (inflated_method_get_object): New static function; returns a
9231         managed "System.Reflection.MonoInflatedMethod" object.
9232         (mono_reflection_bind_generic_method_parameters): Return a
9233         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
9234         (mono_reflection_inflate_method_or_ctor): Likewise.
9235         (mono_image_get_generic_method_param_info): Initialize unused
9236         fields to zero.
9237         (mono_image_get_generic_param_info): Likewise.
9238
9239         * reflection.h (MonoReflectionInflatedMethod): New public
9240         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
9241         "S.R.MonoInflatedCtor" classes.
9242
9243         * loader.c (method_from_memberref): If we're a TypeSpec and it
9244         resolves to a generic instance, inflate the method.
9245
9246 2003-10-28  Dick Porter  <dick@ximian.com>
9247
9248         * object.c (mono_runtime_run_main): Convert command-line arguments
9249         into utf8, falling back to the user's locale encoding to do so.
9250
9251 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
9252
9253         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
9254         at this time.
9255
9256         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
9257
9258         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
9259         up icalls at method definition time. Partially fixes #33569.
9260
9261 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
9262
9263         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
9264         marshalling of arrays. Fixes #50116.
9265
9266         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
9267
9268         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
9269         points to a vtable in the dying appdomain.
9270
9271         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
9272         listeners into unmanaged code inside the lock.
9273
9274         * object.c (mono_class_vtable): Turn off typed allocation in non-root
9275         domains and add some comments.
9276
9277 2003-10-25  Martin Baulig  <martin@ximian.com>
9278
9279         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
9280
9281         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
9282
9283         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
9284         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
9285         currently parsing.  Create the generic class and store it in
9286         `generic_inst->klass' before parsing the type arguments.  This is
9287         required to support "recursive" definitions; see mcs/tests/gen-23.cs
9288         for an example.
9289         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
9290         to support recursive typespec entries.
9291
9292         * class.c (mono_class_setup_parent): If our parent is a generic
9293         instance, we may get called before it has its name set.
9294         (mono_class_from_generic): Splitted into
9295         mono_class_create_from_generic() and mono_class_initialize_generic().
9296
9297 2003-10-25  Martin Baulig  <martin@ximian.com>
9298
9299         * icall.c (ves_icall_Type_BindGenericParameters): Return a
9300         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
9301         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
9302         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
9303
9304         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
9305         (create_typespec): Likewise.
9306         (mono_reflection_bind_generic_parameters): Return a
9307         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
9308         (mono_reflection_inflate_method_or_ctor): New public function.
9309
9310         * reflection.h (MonoReflectionGenericInst): New typedef.        
9311
9312 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
9313
9314         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
9315         inside the domain lock. Fixes #49993.
9316         
9317         * object.c (mono_class_vtable): When typed allocation is used, 
9318         allocate vtables in the GC heap instead of in the mempool, since the
9319         vtables contain GC descriptors which are used by the collector even
9320         after the domain owning the mempool is unloaded.
9321
9322         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
9323
9324         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
9325         reflect what it does. Also invalidate mempools instead of freeing
9326         them if a define is set.
9327
9328         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
9329         of the appdomain.
9330         
9331         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
9332         hold the finalizable objects in this domain.
9333
9334         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
9335         appdomain.
9336
9337         * appdomain.c (mono_domain_set): New function to set the current
9338         appdomain, but only if it is not being unloaded.
9339
9340         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
9341         appdomain which is being unloaded.
9342         
9343         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
9344         unloading of the root appdomain.
9345
9346         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
9347         icall to execute a method in another appdomain. Intended as a 
9348         replacement for InternalSetDomain, which can confuse the code 
9349         generation in the JIT.
9350
9351         * appdomain.c (mono_domain_is_unloading): New function to determine
9352         whenever an appdomain is unloading.
9353
9354         * appdomain.c (mono_domain_unload): New function to correctly unload
9355         an appdomain.
9356
9357         * assembly.c (mono_assembly_load_references): Check that an assembly
9358         does not references itself.
9359
9360         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
9361         domain manually, it asks the finalizer thread to do it, then waits for
9362         the result. Also added a timeout.
9363
9364         * icall.c: Register the new icalls.
9365
9366         * threads.h threads.c: Export the mono_gc_stop_world and 
9367         mono_gc_start_world functions.
9368         
9369         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
9370         function to fill out the mempool with 0x2a.
9371
9372 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
9373
9374         * reflection.h (MonoReflectionMethodAux): New structure to store
9375         information which is rarely used, thus is not in the MonoMethod
9376         structure.
9377
9378         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
9379         store the aux info.
9380
9381         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
9382         and marshalling info into the aux structure.
9383
9384         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
9385         from the aux structure.
9386
9387         * loader.c (mono_method_get_param_names): Retrieve the param names from
9388         the aux structure.
9389         
9390 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
9391
9392         * exception.h exception.c: Add AppDomainUnloadedException && fix 
9393         warning.
9394
9395 2003-10-21  Dick Porter  <dick@ximian.com>
9396
9397         * socket-io.c
9398         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
9399         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
9400
9401 2003-10-21  Martin Baulig  <martin@ximian.com>
9402
9403         * reflection.c (mono_reflection_bind_generic_parameters):
9404         `klass->parent' is NULL for interfaces.
9405
9406 2003-10-21  Martin Baulig  <martin@ximian.com>
9407
9408         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9409
9410 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
9411
9412         * exception.c (mono_exception_from_name_msg): New helper function for
9413         creating exceptions and initializing their message field.
9414
9415         * exception.c: Simplify functions using the new helper.
9416
9417         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
9418         New function.
9419
9420         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
9421         mono_raise_exception, since otherwise gcc doesn't generate the function
9422         epilog for raise_exception, confusing the stack unwinding in the JIT.
9423         Fixes #45043.
9424
9425         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
9426         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
9427         Fixes #49499.
9428
9429 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9430
9431         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
9432         utf8.
9433
9434 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
9435
9436         * icall.c: Removed GetUninitializedObject method because
9437           AllocateUninitializedClassInstance does the same.
9438
9439 2003-10-18  Martin Baulig  <martin@ximian.com>
9440
9441         * class.c (inflate_generic_signature): Renamed to
9442         mono_class_inflate_generic_signature() and made it public.
9443         (my_mono_class_from_generic_parameter): New static function; if we
9444         don't already have the generic parameter's MonoClass, create a
9445         very simple one which is just used internally in the runtime and
9446         not passed back to managed code.
9447
9448         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
9449
9450         * metadata.h (MonoMethodSignature): Moved the
9451         `MonoGenericParam *gen_params' to the MonoMethodHeader.
9452         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
9453
9454         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
9455         ves_icall_MonoMethod_GetGenericArguments(); this is now an
9456         interncall on the MonoMethod class, not on MethodInfo.
9457         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
9458         calling mono_reflection_bind_generic_method_parameters() directly.
9459
9460         * loader.c (mono_method_get_signature): If this is a MethodSpec;
9461         return the already computed `method->signature'.
9462         (method_from_methodspec): New static function to load a method
9463         from a MethodSpec entry.
9464         (mono_get_method_from_token): Call the new method_from_methodspec()
9465         for MethodSpec tokens.  
9466         (mono_get_method_from_token): If we're a generic method, load the
9467         type parameters.
9468
9469         * reflection.c (mono_image_get_memberref_token): Allow
9470         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
9471         table.
9472         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
9473         (mono_image_create_token): First check whether it's a generic
9474         method (so we'd need to create a MethodSpec), then do the other
9475         two alternatives.
9476         (mono_reflection_bind_generic_method_parameters): Return a
9477         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
9478         called directly from the interncall.
9479
9480 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
9481
9482         * reflection.c (load_public_key): Move loading of the public key
9483         into managed code.
9484
9485         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
9486
9487         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
9488         fields.
9489
9490         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
9491         culture, hash_alg and public_key. Fixes #49555.
9492
9493 2003-10-17  Martin Baulig  <martin@ximian.com>
9494
9495         * class.h (MonoGenericInst): Moved this declaration here and added
9496         `MonoMethod *generic_method'.
9497
9498         * icall.c
9499         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
9500         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
9501
9502         * metadata.c (mono_metadata_type_equal): Two types of
9503         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
9504         index; ie. don't compare the address of the `MonoGenericParam'
9505         structure.
9506         (mono_metadata_load_generic_params): Removed the `MonoMethod
9507         *method' argument.
9508
9509         * metadata.h (MonoGenericInst): Moved declaration to class.h.
9510         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
9511
9512         * reflection.c (method_encode_signature): Encode the number of
9513         generic parameters.
9514         (encode_generic_method_sig): New static function.
9515         (method_encode_methodspec): New static function; creates an entry
9516         in the MethodSpec table for a generic method.
9517         (mono_image_get_methodspec_token): New static function.
9518         (mono_image_create_token): Call mono_image_get_methodspec_token()
9519         for generic methods.
9520         (mono_reflection_bind_generic_method_parameters): New public
9521         function.  Instantiates a generic method.
9522
9523 2003-10-16  Martin Baulig  <martin@ximian.com>
9524
9525         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
9526         *gen_params' here from MonoMethodHeader.
9527
9528         * metadata.c (mono_metadata_parse_method_signature): If we have
9529         generic parameters, initialize `method->gen_params' and then set
9530         the correct `type->data.generic_param' in all the parameters.
9531
9532 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
9533
9534         * threads.c (mono_threads_get_default_stacksize): New function to 
9535         return the default stacksize.
9536
9537         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
9538         termination of the finalizer thread, since the previous method had
9539         race conditions. Fixes #49628.
9540
9541         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
9542         as for the other managed threads.
9543
9544 2003-10-16  Martin Baulig  <martin@ximian.com>
9545
9546         * class.c (inflate_generic_signature): Copy `generic_param_count'
9547         and `gen_params'.
9548
9549         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
9550         New interncall.
9551
9552         * metadata.c (mono_metadata_parse_method_signature): Actually set
9553         the `method->generic_param_count' here.
9554         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
9555
9556 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
9557
9558         * object.h: Add a new field to TypedRef to simplify the implementation
9559         of the REFANY opcodes in the JIT.
9560
9561         * icall.c: Make use of the new field.
9562
9563         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
9564         dynamically.
9565
9566 2003-10-15  Martin Baulig  <martin@ximian.com>
9567
9568         * class.c (mono_class_from_gen_param): Renamed to
9569         mono_class_from_generic_parameter() and moved most of the
9570         functionality from mono_reflection_define_generic_parameter()
9571         here; ie. we create a "real" class here.
9572         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
9573         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
9574         previously been called.
9575
9576         * class.h (MonoGenericParam): Moved the declaration of this struct
9577         here from metadata.h and added `MonoMethod *method'.
9578
9579         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
9580         interncall.
9581
9582         * loader.c (mono_get_method_from_token): If we have any generic
9583         parameters, call mono_metadata_load_generic_params() to read them
9584         from the MONO_TABLE_GENERICPAR.
9585
9586         * metadata.c (mono_metadata_load_generic_params): Added
9587         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
9588
9589         * metadata.h (MonoMethodSignature): Replaced
9590         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
9591         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
9592
9593         * reflection.c (mono_reflection_define_generic_parameter): Moved
9594         most of the functionality into the new
9595         mono_class_from_generic_parameter(); set the `method' field if
9596         we're a method parameter.       
9597
9598 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
9599
9600         * marshal.c (emit_struct_conv): if native size is 0
9601         emit no code.
9602
9603 2003-10-14  Martin Baulig  <martin@ximian.com>
9604
9605         * icall.c: The generics API has changed in the spec since it was
9606         added to System.Type; these modifications make it match the spec
9607         again.
9608         (ves_icall_Type_GetGenericParameters): Renamed to
9609         `ves_icall_Type_GetGenericArguments'.
9610         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
9611         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
9612         `ves_icall_MonoType_get_HasGenericArguments'.
9613         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
9614         `ves_icall_MonoType_get_IsGenericParameter'.
9615         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
9616         this is no interncall anymore.
9617         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
9618         `ves_icall_TypeBuilder_get_IsGenericParameter'.
9619
9620 2003-10-14  Martin Baulig  <martin@ximian.com>
9621
9622         * reflection.c (mono_reflection_bind_generic_parameters): Also
9623         inflate generic methods if we're reading the class from IL.
9624
9625 2003-10-13  Martin Baulig  <martin@ximian.com>
9626
9627         * reflection.c (mono_reflection_define_generic_parameter): This
9628         method isn't called directly from the icall anymore; take a
9629         `MonoReflectionAssemblyBuilder *' so we can use this for type and
9630         method generic parameters.
9631         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
9632         (method_builder_encode_signature): Encode generic parameters.
9633         (mono_image_get_method_info): Write generic params to the
9634         MONO_TABLE_GENERICPARAM table.
9635
9636         * reflection.h (MonoReflectionMethodBuilder): Added
9637         `MonoArray *generic_params'.
9638
9639         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
9640
9641         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
9642         wrapper for mono_reflection_define_generic_parameter().
9643         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
9644
9645 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
9646
9647         * marshal.h: Add missing function to fix build.
9648
9649         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
9650         the SetLastError pinvoke attribute.
9651
9652         * marshal.c (mono_marshal_set_last_error): New helper function called
9653         by the generated code.
9654         
9655         * marshal.c (mono_mb_emit_branch): New helper function.
9656
9657         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
9658
9659         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
9660         classes as parameters and return values of delegates. Fixes #29256. 
9661
9662 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
9663
9664         * locales.c: use gint32 in non HAVE_ICU case
9665
9666 2003-10-11  Martin Baulig  <martin@ximian.com>
9667
9668         * mono-debug.c (mono_debug_add_method): Added a workaround for
9669         bug #48591.
9670
9671 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
9672
9673         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
9674         delegates passed to native code must use the STDCALL calling 
9675         convention. Fixes #35987.
9676
9677 2003-10-10  Martin Baulig  <martin@ximian.com>
9678
9679         * class.c (inflate_generic_type): If we're inflating for a generic
9680         type instance (and not for a generic method), return
9681         MONO_TYPE_MVAR unchanged.
9682
9683 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9684
9685         * string-icalls.c: Join ignores null strings in the source array.
9686         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
9687         * threads.c: GetAvailableTheads is slightly more accurate.
9688
9689 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
9690
9691         * threads.h threads.c : add mono_threads_set_default_stacksize
9692         and pass default to CreateThread calls.
9693
9694 2003-10-09  Dick Porter  <dick@ximian.com>
9695
9696         * icall.c:
9697         * locales.h:
9698         * locales.c: Internal calls for constructing CultureInfo and
9699         related objects from libicu (if its available.)
9700
9701 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
9702
9703         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
9704
9705 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9706
9707         * threadpool.c: added an argument to async_invoke_thread that is the
9708         item to process, pass the MonoAsyncResult to the thread start function
9709         when creating a new thread. This way we don't need to acquire any lock
9710         when we're creating a new thread. Readded a semaphore for faster
9711         response times (instead of that Sleep i added).
9712
9713 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
9714
9715         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
9716         get daylight change dates better on Windows, fix handling
9717         of platforms without tm_gmtoff.
9718
9719 2003-10-06  Martin Baulig  <martin@ximian.com>
9720
9721         * class.c (inflate_generic_method): Renamed to
9722         mono_class_inflate_generic_method() and made public.
9723         (mono_class_init): Don't inflate the generic methods here.
9724         (mono_class_from_generic): Added `gboolean inflate_methods'
9725         argument.  Inflate the methods here.
9726
9727         * loader.c (mono_method_get_param_names): Ignore instances of
9728         generic types for the moment.
9729
9730         * reflection.c (fixup_method): Added support for inflated methods.
9731         (mono_image_create_token): Use mono_image_get_methodref_token()
9732         for inflated methods.
9733         (mono_custom_attrs_from_param): Ignore instances of generic types
9734         for the moment.
9735         (mono_reflection_bind_generic_parameters): New public function.
9736         Moved all the functionality from
9737         ves_icall_Type_BindGenericParameters() here and added support for
9738         dynamic types.
9739         (mono_reflection_define_generic_parameter): Initialize
9740         `klass->methods' here.
9741
9742         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
9743         functionality into mono_reflection_define_generic_parameter().
9744         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
9745         TypeBuilder, return that TypeBuilder.
9746
9747 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9748
9749         * appdomain.c: removed mono_delegate_semaphore.
9750
9751         * threadpool.c:
9752         (mono_thread_pool_add): moved hash table creation inside and the thread 
9753         creation outside of the critical region.
9754         (mono_thread_pool_finish): removed obsolete code.
9755         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
9756         continue or exit the thread depending on the queue.
9757
9758 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
9759
9760         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
9761         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
9762         handle more bool marshalling options
9763
9764 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
9765
9766         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
9767         arrays of structs. Also add a more descriptive error message when
9768         a structure member is marshalled as LPArray.
9769
9770 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
9771
9772         * marshal.c (mono_marshal_get_native_wrapper): Add support for
9773         marshalling arrays of complex types. Fixes #29098. Also remove an
9774         usused and incomplete function.
9775
9776 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
9777
9778         * gc.c: report heap_size - free_bytes as total memory allocated
9779         (bug#49362).
9780
9781 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
9782
9783         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
9784         fix timezone handling problems on Windows.
9785         
9786         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
9787         asserts when the year is outside the range handled by ms the functions.
9788
9789         * class.c (setup_interface_offsets): If the class is an interface,
9790         fill out its interface_offsets slot.
9791
9792 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9793
9794         * threadpool.c: mark threadpool threads as background.
9795
9796 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
9797
9798         * decimal.c - define DECINLINE to nothing if not using GCC
9799
9800 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
9801
9802         * assembly.c: More refcount fixes.
9803
9804 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9805
9806         * string-icalls.c: if we're not trimming, return the same string.
9807         When not splitting, don't create a new string.
9808
9809 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9810
9811         * image.c:
9812         (mono_image_open): increment the ref_count inside the critical section.
9813
9814 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
9815
9816         * image.c (mono_image_open): Fix reference counting bug.
9817
9818 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
9819
9820         * marshal.c (mono_marshal_type_size) struct alignment changed for 
9821         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
9822         64bits. Avoid leak in mono_marshal_get_native_wrapper when
9823         mono_lookup_pinvoke_call throws.        
9824
9825 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
9826
9827         * reflection.c (mono_reflection_parse_type): Fix #49114.
9828
9829         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
9830         temporary workaround for cygwin header problem.
9831
9832         * object.c (mono_object_isinst): Synchronize this with the code
9833         generated by the JIT for casts.
9834
9835 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
9836
9837         * reflection.c (encode_type): Fix #38332.
9838
9839 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
9840
9841         * marshal.c (mono_marshal_method_from_wrapper): New function to return
9842         the original method from the wrapper method.
9843
9844 2003-09-25  Martin Baulig  <martin@ximian.com>
9845
9846         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
9847         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
9848         (ves_icall_Type_get_IsGenericInstance): New interncall.
9849
9850 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
9851
9852         * object.c: fix cast warning in big endian code.
9853
9854 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
9855
9856         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
9857         
9858 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9859
9860         * assembly.c: don't call check_env from mono_assembly_load. It's
9861         already done once in mono_assemblies_init and may cause headaches when
9862         multiple threads are loading assemblies.
9863
9864 2003-09-19  Martin Baulig  <martin@ximian.com>
9865
9866         * reflection.c (mono_reflection_define_generic_parameter): Don't
9867         allocate `klass->methods', set `klass->flags' to
9868         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
9869
9870 2003-09-18  Martin Baulig  <martin@ximian.com>
9871
9872         * class.c (mono_class_init): Don't create `class->methods' if it's
9873         already initialized.
9874
9875         * metadata.c (mono_metadata_load_generic_params): Make this
9876         actually work.
9877
9878         * reflection.c (mono_reflection_define_generic_parameter): Set
9879         parent class and interfaces from the constraints.
9880
9881         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
9882         to keep this struct in sync with the declaration in TypeBuilder.cs.
9883
9884 2003-09-17  Martin Baulig  <martin@ximian.com>
9885
9886         * metadata.h (MonoType): Replaced the data's `int type_param'
9887         field with `MonoGenericParam *generic_param'.
9888         (MonoGenericParam): Added `MonoClass *klass'.
9889
9890         * class.c (mono_class_from_gen_param): Removed the
9891         `MonoImage *image' and `int type_num' arguments.
9892
9893         * metadata.c (mono_metadata_parse_generic_param): New static
9894         method; creates a MonoGenericParam which just contains the index.
9895         (do_mono_metadata_parse_type): Call
9896         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
9897         MONO_TYPE_MVAR.
9898
9899         * reflection.c (mono_image_typedef_or_ref): Generic type
9900         parameters may be in the same assembly, but never use a typedef
9901         for them.
9902         (mono_reflection_define_generic_parameter): We're now creating a
9903         "real" class for the type parameter; it's now safe to call
9904         mono_class_from_mono_type() on the class'es type, it'll do the
9905         right thing.
9906
9907 2003-09-16  Martin Baulig  <martin@ximian.com>
9908
9909         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
9910         `symfile->range_entry_size' and `symfile->class_entry_size' here;
9911         the `symfile' data structure must be fully initialized before it
9912         gets added to the table.
9913
9914 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
9915
9916         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
9917
9918         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
9919         class init trampolines.
9920
9921 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
9922
9923         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
9924         to the built-in profiler to turn off time and allocation profiling
9925         respectively.
9926
9927 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
9930         g_direct_equal.
9931
9932         * debug-helpers.c (mono_method_full_name): Print the wrapper type
9933         in human readable form.
9934
9935 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
9936
9937         * reflection.c icall.c: Fixed warnings.
9938
9939         * image.c (load_class_names): Use a temporary hash table to hold the
9940         namespaces in order to avoid doing many string comparisons.
9941
9942         * image.h: Fix typo.
9943
9944         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
9945         Pass NULL instead of g_direct_equal to the GHashTable constructor 
9946         since the NULL case is short-circuited inside g_hash_table_lookup, 
9947         leading to better performance.  
9948
9949         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
9950         obtain the first custom attribute for a given index. Depends on the
9951         CustomAttribute table being sorted by the parent field.
9952
9953         * reflection.c (mono_custom_attrs_from_index): Use the new function 
9954         for better performance.
9955
9956 2003-09-07  Martin Baulig  <martin@ximian.com>
9957
9958         * class.c (mono_class_init): If we're a generic instance, inflate
9959         all our methods instead of loading them from the image.
9960         (mono_class_from_generic): Set `class->methods = gklass->methods'.
9961
9962 2003-09-07  Martin Baulig  <martin@ximian.com>
9963
9964         * mono-debug-debugger.c: Added support for constructors.
9965
9966 2003-09-06  Martin Baulig  <martin@ximian.com>
9967
9968         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
9969         New interncall.
9970
9971         * reflection.c (mono_reflection_setup_generic_class): Call
9972         ensure_runtime_vtable() to create the vtable.
9973
9974 2003-09-05  Martin Baulig  <martin@ximian.com>
9975
9976         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
9977         MONO_TYPE_MVAR.
9978
9979 2003-09-04  Martin Baulig  <martin@ximian.com>
9980
9981         * reflection.c (mono_reflection_define_generic_parameter): Generic
9982         parameters start with zero.
9983
9984 2003-09-04  Martin Baulig  <martin@ximian.com>
9985
9986         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9987
9988         * reflection.h (MonoReflectionGenericParam): New typedef.
9989         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
9990         the generic parameters from the managed TypeBuilder.
9991
9992         * reflection.c (mono_reflection_define_generic_parameter): New function.
9993         (mono_reflection_create_runtime_class): Encode generic parameters.
9994         (mono_reflection_setup_generic_class): New function; this is
9995         called after adding adding all generic params to the TypeBuilder.
9996         (encode_type): Added MONO_TYPE_VAR.
9997
9998 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
9999
10000         * class.h class.c (mono_class_needs_cctor_run): Moved this method
10001         here from the JIT.
10002
10003         * assembly.h assembly.c: Moved the AOT loading code into an assembly
10004         load hook.
10005
10006 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
10007
10008         * reflection.h reflection.c class.h class.c: Delete duplicate 
10009         definition of mono_type_get_name () from reflection.c and export the
10010         one in class.c.
10011
10012         * class.c: Class loading fixes from Bernie Solomon 
10013         (bernard@ugsolutions.com).
10014
10015         * reflection.c: Endianness fixes from Bernie Solomon 
10016         (bernard@ugsolutions.com).
10017         
10018 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
10019
10020         * assembly.h assembly.c: Define a file format version for AOT
10021         libraries.
10022         
10023         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
10024
10025         * appdomain.h (MonoJitInfo): New field to determine whenever the
10026         code is domain neutral.
10027         
10028 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
10029
10030         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
10031
10032 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
10033
10034         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
10035         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
10036         Avoid caching the result since strings must be domain specific. Fixes
10037         #48050.
10038
10039 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
10040
10041         * marshal.c (mono_marshal_init): Make this callable multiple times
10042         since it is hard to find a correct place to call it.
10043
10044         * object.c (mono_runtime_class_init): Execute static constructors in
10045         the correct appdomain.
10046
10047         * image.c (build_guid_table): Handle the case when multiple images have
10048         the same GUID.
10049
10050 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10051
10052         * icall.c: added a couple of icalls for System.Web.
10053
10054 2003-08-28  Martin Baulig  <martin@ximian.com>
10055
10056         * icall.c (ves_icall_Type_BindGenericParameters): Use
10057         `klass->generic_inst' instead of `&klass->byval_arg' in the
10058         mono_type_get_object() call.  The returned type must be
10059         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
10060
10061 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
10062
10063         * NOTES: New file.
10064
10065         * object.c (mono_class_proxy_vtable): Make it thread safe.
10066
10067         * pedump.c: Fix warning.
10068
10069         * object.c appdomain.h: Get rid of metadata_section. 
10070         It is no longer needed and it was causing deadlocks with domain->lock.
10071
10072         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
10073
10074 2003-08-26  Martin Baulig  <martin@ximian.com>
10075
10076         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
10077
10078 2003-08-26  Martin Baulig  <martin@ximian.com>
10079
10080         * pedump.c (main): Call mono_metadata_init(),
10081         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
10082         and mono_loader_init().
10083
10084 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
10085
10086         * loader.h: Add missing include to fix build.
10087
10088         * image.h: mono_image_load_references is no more.
10089
10090         * assembly.c: Reworked assembly loading to make it really thread safe.
10091         After these changes, the assembly returned by mono_assembly_open is
10092         fully initialized, i.e. all its references assemblies are loaded.
10093
10094         * assembly.c (mono_image_load_references): Renamed to 
10095         mono_assembly_load_references, and made private, since clients no
10096         longer need to call it.
10097
10098         * class.c: Removed calls to mono_assembly_load_references, since it was
10099         a source of deadlocks.
10100
10101         * loader.h loader.c class.h class.c: Protect data structures using a 
10102         new lock, the loader lock.
10103
10104         * class.c (mono_class_setup_vtable): Create temporary hash tables and
10105         GPtrArrays only when needed.
10106
10107         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
10108         into empty structures by mcs. Fixes pinvoke7.cs.
10109         
10110         * domain.c (mono_init): Call a new initialization function.
10111
10112         * appdomain.c (mono_runtime_init): Call the new initializer function
10113         of the marshal module.
10114
10115         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
10116         inserted into empty structures by mcs. Fixes pinvoke7.cs.
10117
10118         * marshal.h marshal.c: Added locks around the wrapper caches to make
10119         this module thread safe.
10120
10121         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
10122         this argument. Fixes pinvoke1.exe.
10123
10124 2003-08-25  Lluis Sanchez <lluis@ximian.com>
10125
10126         * object.h: Added call_type field to MonoMethodMessage and the corresponding
10127         enumeration of values. Removed fields to store remote call output values in
10128         MonoAsyncResult. Not needed any more.
10129         * object.c: Initialize call_type and async_result fields in mono_message_init.
10130         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
10131         dispatching the message.
10132         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
10133         async call to finish. To do it use a message with EndInvoke call type.
10134
10135 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
10136
10137         * loader.h loader.c (mono_method_hash_marhal_info): New function which
10138         determines whenever a method has marshalling info.
10139
10140 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10141
10142         * assembly.c: fix the build on windows.
10143
10144 2003-08-22 Lluis Sanchez <lluis@ximian.com>
10145
10146         * object.cs: Fixed bug #47785.
10147
10148 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
10149
10150         * string-icalls.c (StringReplace): If their are no occurances of
10151         the old string found return a reference to the supplied
10152         string. This saves some memory and matches MS behavoir.
10153         
10154 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10155
10156         * socket-io.c: fixed compilation for systems that define AF_INET6
10157         and don't define SOL_IP/SOL_IPV6.
10158
10159 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
10160
10161         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
10162         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
10163
10164         * rawbuffer.c rawbuffer.h: Make this module thread safe.
10165
10166         * domain.c: Make this module thread safe.
10167
10168         * domain.c (mono_init): Call new initialization function.
10169
10170         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
10171         reference types too. Fixes #38812.
10172
10173         * image.c (mono_image_init): Fixed warnings.
10174
10175         * class.c (mono_class_from_typeref): Handle assembly load failure
10176         correctly.
10177
10178         * appdomain.c (add_assemblies_to_domain): Handle the case when
10179         the references of an assembly are not yet loaded.
10180
10181         * metadata.c image.c assembly.c: Moved initialization of global
10182         variables to a separate function called at startup since lazy 
10183         initialization of these variables is not thread safe.
10184         
10185         * image.c assembly.c: Made this module thread safe by adding locks in 
10186         the appropriate places.
10187
10188         * domain.c (mono_init): Call the new initialization functions of the
10189         three modules.
10190
10191 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
10192
10193         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
10194           make a direct call. It is proxy's work to make the call asynchronous.
10195           mono_delegate_end_invoke(): If the targe is a proxy, just collect
10196           the return values.
10197         * object.cs: mono_method_call_message_new(): read AsyncResult and
10198           state object from parameters list, if this info is requested.
10199         * object.h: Added fields to store remote call output values in
10200           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
10201
10202 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10203
10204         * object.h: add needed fields to MonoThread.
10205         * threads.c, threads.h: allow registering a function to cleanup data
10206         allocated per thread by the JIT.
10207
10208 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10209
10210         * loader.h: portability fix by Bernie Solomon
10211         * <bernard@ugsolutions.com>.
10212
10213 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
10214
10215         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
10216         return a MonoArray. This simplifies the code and also ensures that
10217         the cache allways contains an object reference as a value.
10218
10219         * icall.c (ves_icall_get_parameter_info): Simplified using the new
10220         function.
10221
10222 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10223
10224         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
10225         fixes a problem with byte ordering when getting the address family for
10226         a socket.
10227
10228 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
10229
10230         * .cvsignore: Added monosn.
10231
10232         * reflection.h reflection.c loader.c: Added support for parameter
10233         marshalling to dynamically created types. Fixes #47295.
10234
10235 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
10236
10237         * rand.c: remove useless warnings.
10238
10239 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10240
10241         * class.c: implemented ldtoken for methods and fieldrefs.
10242
10243 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10244
10245         * threadpool.c: when mono_async_invoke was called, no one took care of
10246         monitoring the queue. So if the method invoked took some time and we
10247         got new async invoke requests after 500 ms (the thread created waited
10248         that long in WaitForSingleObject), the new async invoke was not called
10249         until the previous one finished.
10250
10251         This is fixed now. Thanks to Totte for helping with it.
10252
10253 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10254
10255         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
10256
10257 2003-08-11  Martin Baulig  <martin@ximian.com>
10258
10259         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
10260
10261 2003-08-06  Martin Baulig  <martin@ximian.com>
10262
10263         * mono-debug-debugger.c: Added support for static fields,
10264         properties and methods.
10265
10266 2003-08-06  Martin Baulig  <martin@ximian.com>
10267
10268         * mono-debug-debugger.c: Don't store the MonoString's vtable to
10269         make this work for applications with multiple application domains.
10270
10271 2003-08-04  Martin Baulig  <martin@ximian.com>
10272
10273         * mono-debug-debugger.c: Completely reworked the type support; the
10274         most important thing is that we're now just using one single
10275         `MonoType' instance per type.
10276
10277 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
10278
10279         * mono-endian.h, mono-endian.c, icall.c: Added icall
10280         ves_icall_System_Double_AssertEndianity to assert double word endianity
10281         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
10282
10283 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10284
10285         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
10286         support, icalls and fixes.
10287
10288 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
10289
10290         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
10291         classes that are a punctuation character in .NET is not the same a
10292         g_unichar_ispunct.
10293
10294 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10295
10296         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
10297
10298 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
10299
10300         * icall.c: Add new MemCopy internalcall.
10301         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
10302         Simplified code; It is not necessary to handle all the cases here,
10303         as the C# code takes care of it.  Only handle the case of the name
10304         resource embedded into the assembly.
10305
10306         Changed signature to return the data pointer and the size of the
10307         data. 
10308
10309 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
10310
10311         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
10312         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
10313
10314 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
10315
10316         * socket-io.c: ignore EINTR error in select.
10317
10318 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
10319
10320         * class.h, class.c: removed unused subclasses field in MonoClass.
10321
10322 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
10323
10324         * icall.c: improve fix of get_base_definition(). If the parent class
10325           doesn't have the mehod, look at the parent of the parent.
10326         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
10327           to check if a parameter is an in or out parameter
10328           (PARAM_ATTRIBUTE_IN is not set by default).
10329           mono_method_return_message_restore(): Use mono_class_value_size to
10330           get the size of a value type. mono_type_stack_size (parameterType)
10331           does not return the correct value if parameterType is byRef.
10332           mono_load_remote_field(), mono_load_remote_field_new(),
10333           mono_store_remote_field(), mono_store_remote_field_new():
10334           raise exception if the remote call returns an exception.
10335
10336 2003-07-28  Martin Baulig  <martin@ximian.com>
10337
10338         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
10339         method.  This is a wrapper around mono_runtime_invoke() which
10340         boxes the instance object if neccessary.
10341
10342 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10343
10344         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
10345         metadata.h, row-indexes.h, verify.c: first cut of generics support.
10346
10347 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10348
10349         * icall.c: disable mcs bug workaround.
10350
10351 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
10352
10353         * object.c (mono_runtime_class_init): Take the metadata_section
10354         mutex before obtaining the domain mutex.
10355
10356         * appdomain.h: Added definition of metadata_section mutex here. 
10357
10358         * object.c: define metadata_mutex here.
10359
10360 2003-07-24  Ravi Pratap  <ravi@ximian.com>
10361
10362         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
10363         fixed.
10364
10365 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
10366
10367         * reflection.c: Fix bug #46669
10368
10369 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10370
10371         * exception.c:
10372         * exception.h:
10373         * icall.c:
10374         * object.h: fill in the type name for TypeLoadException.
10375
10376 2003-07-23  Ravi Pratap  <ravi@ximian.com>
10377
10378         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
10379         relationship between TypeBuilders while compiling corlib) and bug
10380         45993 (Array types returned from the runtime while compiling
10381         corlib were from the loaded corlib).
10382
10383 2003-07-22  Martin Baulig  <martin@ximian.com>
10384
10385         * mono-debug-debugger.c: Reworked the type support a bit more;
10386         distinguish between types and classes.
10387
10388 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
10389
10390         * icall.c: add IsArrayImpl icall.
10391
10392 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
10393
10394         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
10395         initializing real_size only once. Also fix bug #46602.
10396
10397 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
10398
10399         * object.c: Renamed mono_metadata_section to metadata_section.
10400
10401 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
10402
10403         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
10404           empty array if the type is an array. Fixed.
10405           ves_icall_MonoMethod_get_base_definition: if the base method
10406           is abstract, get the MethodInfo from the list of methods of
10407           the class.
10408         * reflection.c: ParameterInfo.PositionImpl should be zero-based
10409           and it was 1-based. Fixed in mono_param_get_objects.
10410
10411 2003-07-20  Martin Baulig  <martin@ximian.com>
10412
10413         * mono-debug.h: Set version number to 31.
10414         (mono_debug_init): Added `MonoDomain *' argument.
10415
10416         * mono-debug-debugger.c: Reworked the type support; explicitly
10417         tell the debugger about builtin types; pass the `klass' address to
10418         the debugger.
10419
10420 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
10421
10422         * image.c: Allow new metadata tables to be loaded without a
10423         warning. Also update the warning message to give the new constant value.
10424                 
10425 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
10426
10427         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
10428         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
10429         array type representation changes.
10430
10431 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10432
10433         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
10434         on Environment.Exit () call.
10435
10436 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10437
10438         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
10439         requires a matching corlib.
10440
10441 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
10442
10443         * Changelog: My editor decided to add a CR to each line. Sorry about that.
10444           Committed again without the CRs.
10445         
10446 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
10447
10448         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
10449           getting it from the "this" socket instance. Did not work
10450           if the socket is a subclass of Socket.
10451           Also fixed bug #35371.
10452
10453 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10454
10455         * metadata.c: fixed size for TypedByRef.
10456         * loader.c: when searching for a method, consider the vararg amrker.
10457         * unicode.c, decimal.c: constify some arrays.
10458
10459 2003-07-15  Dick Porter  <dick@ximian.com>
10460
10461         * socket-io.c: Fixed compilation for gcc < 3.2.
10462
10463         Fixed compilation for machines that don't have AF_INET6 (thanks to
10464         Bernie Solomon <bernard@ugsolutions.com> for that part.)
10465
10466         Fixed compile warnings.
10467         
10468         Fixed formatting and line endings.
10469
10470 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
10471
10472         * socket-io.h:
10473         * socket-io.c: Added IPv6 support.
10474
10475 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
10476
10477         * class.c (mono_class_is_assignable_from): New function to implement
10478         the is_assignable_from logic. Used by mono_object_isinst, 
10479         Type::IsAssignableFrom () and the interpreter.
10480
10481         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
10482         Object, even interfaces.
10483         
10484         * object.c (mono_object_isinst): Implement in terms of 
10485         is_assignable_from.
10486
10487         * icall.c (ves_icall_type_is_assignable_from): New icall.
10488
10489 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
10490
10491         * domain.c (foreach_domain): fix compiler warning.
10492
10493 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
10494
10495         * image.c (load_metadata_ptrs): use g_strndup because strndup is
10496         not available on all plattforms
10497
10498 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
10499
10500         * image.h image.c: Store the metadata version string in MonoImage.
10501         * icall.c: New icall to retrieve the image version.
10502         * reflection.c (create_dynamic_image): Fill in the image version field
10503         * reflection.c (build_compressed_metadata): Use the image version
10504         from the image structure.
10505
10506 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10507
10508         * appdomain.c: modified comment.
10509         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
10510         That will be its last iteration when mono_gc_cleanup is called from
10511         mono_runtime_cleanup and before the domain is unloaded.
10512
10513         Fixes bug #45962.
10514
10515 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
10516
10517         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
10518         attributes.
10519
10520 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10521
10522         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
10523         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
10524         Bernie Solomon <bernard@ugsolutions.com>.
10525
10526 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10527
10528         * object.c, object.h: provide mono_object_new_fast() for faster
10529         allocation in some special cases.
10530
10531 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
10532
10533         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
10534         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
10535
10536 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
10537
10538         * threadpool.c: fix leaks.
10539
10540 2003-07-01  Dick Porter  <dick@ximian.com>
10541
10542         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
10543         using MonoGHashTables.  Fixes threadpool bug posted to list.
10544
10545 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
10546
10547         * image.h, image.c: added support to load an assembly from a byte array.
10548         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
10549         assembly bundle support.
10550
10551 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
10552
10553         * threadpool.c (mono_thread_pool_add): keep a reference to the
10554         AsyncResult to prevent GC
10555
10556 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
10557
10558         * class.c: leak fix.
10559
10560 2003-06-25  Dick Porter  <dick@ximian.com>
10561
10562         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
10563         for the async object, the WaitHandle object will close the handle.
10564         Fixes bug 45321.
10565
10566 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10567
10568         * class.c: in mono_array_class_get (), lookup from the hash with the
10569         same type we insert: this works around a bug in
10570         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
10571         lluis. The real fix will have to wait for after the release.
10572
10573 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10574
10575         * icall.c: fix memory leak when getting type members.
10576
10577 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
10578
10579         * reflection.c: added more pubtoken special cases.
10580
10581 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
10582
10583         * class.c: handle field offset correctly when class size
10584         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
10585
10586 2003-06-20  Martin Baulig  <martin@ximian.com>
10587
10588         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
10589         *image' field.
10590
10591 2003-06-20  Martin Baulig  <martin@ximian.com>
10592
10593         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
10594
10595 2003-06-20  Martin Baulig  <martin@ximian.com>
10596
10597         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
10598         just distinguish between variables in registers and variables at
10599         an offset relative to a register.
10600
10601 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10602
10603         * icall.c: #ifdef out latest changes until mcs is fixed.
10604
10605 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10606
10607         * icall.c: return members in metadata order.
10608
10609 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10610
10611         * icall.c: avoid infinite loop in GetTimeZoneData.
10612
10613 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
10614
10615         * icall.c: added Marshal.Prelink/All icalls.
10616
10617 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
10618
10619         * object.c, object.h: fix warnings and do some overflow checking
10620         when creating arrays.
10621
10622 2003-06-17  Dick Porter  <dick@ximian.com>
10623
10624         * file-io.h:
10625         * file-io.c: File attributes need to be tweaked slightly when
10626         passed from the managed to the w32 world.
10627
10628 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
10629         * profiler.h profiler-private.h profiler.c: Rework last patch
10630         based on suggestion by Paolo.
10631         
10632 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
10633
10634         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
10635         instruction level coverage data collection.
10636         * profiler.h profiler.c (: Added new callback function which can be
10637         used by the profiler to limit which functions should have coverage
10638         instrumentation.
10639         * profiler.c (mono_profiler_load): Call g_module_build_path to
10640         generate the file name of the profiler library.
10641
10642 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10643
10644         * profiler.c, profiler.h, profiler-private.h: added basic block 
10645         coverage profiling API.
10646
10647 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
10648
10649         * reflection.c (mono_reflection_create_runtime_class): Add support
10650         for events in dynamically generated code.
10651
10652         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
10653         not allocated.
10654
10655 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10656
10657         * icall.c: when getting timezone info, return reasonable values if we
10658         can't get the actual data.
10659
10660 2003-06-14  Dick Porter  <dick@ximian.com>
10661
10662         * threads.c (start_wrapper): Remove the reference to the thread
10663         object in the TLS data, so the thread object can be finalized.
10664         This won't be reached if the thread threw an uncaught exception,
10665         so those thread handles will stay referenced :-( (This is due to
10666         missing support for scanning thread-specific data in the Boehm GC
10667         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
10668
10669 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
10670
10671         * reflection.c: ensure streams and tables are first allocated with
10672         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
10673
10674 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10675
10676         * icall.c: fixed GetElementType for byrefs (bug# 44792).
10677
10678 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
10679
10680         * reflection.c (mono_reflection_create_runtime_class): Add support for
10681         properties to dynamically created classes.
10682         * reflection.c: Fix a few places where non-MonoObjects were inserted
10683         into the tokens hashtable.
10684
10685 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10686
10687         * object.c: some support to handle out of memory exceptions.
10688
10689 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
10690
10691         * marshal.c (mono_marshal_get_native_wrapper): support reference
10692         return types
10693
10694 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10695
10696         * object.h, object.c: more portability stuff from Bernie Solomon.
10697         Unexport mono_object_allocate(). Added mono_object_unbox ().
10698         Set exitcode when an unhandled exception is thrown.
10699
10700 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
10701
10702         * marshal.c (mono_marshal_get_native_wrapper): use custom
10703         marshaler for return types.
10704
10705 2003-06-10  Dick Porter  <dick@ximian.com>
10706
10707         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
10708         ip_mreq is available
10709
10710 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
10711
10712         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
10713         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
10714         by Bernie Solomon <bernard@ugsolutions.com>.
10715
10716 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
10717
10718         * gc.c (mono_gc_init): Avoid error message on shutdown when
10719         GC_DONT_GC=1 is used.
10720
10721         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
10722         New icall to return the GUID of a module.
10723
10724 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10725
10726         * class.c: ensure instance size always includes the parent's size
10727         even whem class size is set explicitly (fixes bug#44294).
10728
10729 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10730
10731         * profiler.h, profiler.c: made the simple profiler thread-safe,
10732         get more accurate timing info. Allow the loading of an
10733         externally-developed profiler module.
10734
10735 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
10736
10737         * marshal.c (mono_marshal_get_native_wrapper): improved
10738         class/byref arguments.
10739         (mono_marshal_get_native_wrapper): better string marshaling support.
10740
10741 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
10742
10743         * class.c: ensure .pack and .size are handled correctly and
10744         simplified layout of static fields.
10745
10746 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
10747
10748         * appdomain.c
10749         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
10750
10751         * loader.c (mono_lookup_pinvoke_call): look for modules in the
10752         current directory (fix bug 44008)
10753
10754 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
10755
10756         * marshal.c (mono_marshal_get_native_wrapper): started support for
10757         custom marshalers.
10758         (mono_delegate_to_ftnptr): consider marshalling specifications
10759
10760 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
10761
10762         * reflection.c, reflection.h: emit custom marshal info.
10763
10764 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10765
10766         * object.c: free the GError.
10767         * icall.c: added CloseEvent_internal.
10768         * threads.[ch]:
10769         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
10770         call.
10771
10772 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
10773
10774         * loader.c (mono_method_get_signature): Add support for dynamic
10775         assemblies.
10776
10777 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
10778
10779         * reflection.c: fixed bug #43905.
10780
10781 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10782
10783         * class.c, domain.c, icall.c, metadata.h, object.h: support for
10784         handling TypedReference and ArgIterator.
10785         * loader.c, loader.h: added function to get signature at call site.
10786
10787 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10788
10789         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
10790         data readonly. Buglets and warning fixes. Some MethodSpec support.
10791
10792 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10793
10794         * class.h, class.c, object.c: remove relative numbering support.
10795
10796 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
10797
10798         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
10799         free the string, until we get a chance to fix Gtk#
10800
10801 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10802
10803         * marshal.c: revert last patch.
10804
10805 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
10806
10807         * icall.c: updates for new mono_class_vtable() not calling
10808         the type constructor anymore.
10809
10810 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
10811
10812         * object.h, object.c: separate vtable creation from type
10813         initialization. Make running the .cctor thread safe.
10814
10815 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
10816
10817         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
10818
10819 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
10820
10821         * loader.c (mono_get_method): consider calling convention
10822
10823 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
10824
10825         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
10826         to return the invisible global type for a module.
10827
10828         * reflection.c (mono_image_build_metadata): Emit global fields too.
10829
10830 2003-05-20  Peter Williams  <peterw@ximian.com>
10831
10832         * loader.c (mono_lookup_internal_call): Add a few newlines.
10833
10834 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
10835
10836         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
10837         literal strings.
10838
10839         * appdomain.c (set_domain_search_path): Recalculate search path when
10840         AppDomainSetup.PrivateBinPath changes.
10841
10842         * object.c (mono_class_compute_gc_descriptor): It turns out some
10843         parts of the class libs (like System.Thread) holds pointers to
10844         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
10845         to treat native int a pointer type here.
10846         
10847 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
10848
10849         * appdomain.h, domain.c: add hashtable for jump target resolution.
10850
10851 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
10852
10853         * reflection.h reflection.c icall.c: Added new icalls 
10854         GetManifestResourceInfoInternal, GetModulesInternal and support
10855         infrastructure.
10856
10857 2003-05-16  Dick Porter  <dick@ximian.com>
10858
10859         * icall.c:
10860         * file-io.h:
10861         * file-io.c: Implement System.IO.MonoIO::GetTempPath
10862
10863 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
10864
10865         * object.c: mono_store_remote_field: little fix to previous patch.
10866
10867 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10868
10869         * class.c: add constructors to array classes.
10870         * icall.c: special case array construction for InternalInvoke (),
10871
10872 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
10873
10874         * class.h class.c reflection.c object.c: Added support for field
10875         defaults in dynamically generated classes.
10876
10877 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
10878
10879         * reflection.c: properly encode charset for ddlimport.
10880
10881 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
10882
10883         * threads.c: allow compiling without GC.
10884
10885 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10886
10887         * appdomain.h, object.c, object.h, threads.c, threads.h: added
10888         handling of thread static data.
10889
10890 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10891
10892         * reflection.h, reflection.c: added mono_custom_attrs_free ().
10893
10894 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
10895
10896         * class.c (mono_array_class_get): always set the serializable flags
10897         (mono_array_class_get): always set the SEALED attribute for array types
10898
10899 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
10900
10901         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
10902         attributes (fix for bug 42021).
10903
10904 2003-05-12  Dick Porter  <dick@ximian.com>
10905
10906         * gc.c: Don't run finalizers when the finalizer thread is
10907         finishing up, because the default domain has already been
10908         destroyed.
10909
10910 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
10911
10912         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
10913         value is null, we should throw an exception.   This is slightly
10914         different than the other conventions used for the constructor.
10915
10916 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10917
10918         * socket-io.c: fixed windows build.
10919
10920 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10921
10922         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
10923
10924 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
10925
10926         * object.c (mono_string_new_wrapper): Compatibility fix for MS
10927         compilers.
10928
10929 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
10930
10931         * class.c (mono_class_layout_fields): Add experimental GC aware
10932         auto layout facility. Requires class library changes to work correctly.
10933
10934         (mono_class_setup_vtable): Avoid overriding explicit interface
10935         method implementations. Fixes iface3.exe test.
10936
10937         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
10938         object reference.
10939         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
10940         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
10941
10942         * metadata.h: Add new type classification macro which determines
10943         whenever the type holds an object reference.
10944
10945 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
10946
10947         * marshal.c (mono_marshal_get_native_wrapper): cleanups
10948
10949 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
10950
10951         * gc.c (finalizer_thread): Work around a GC bug.
10952
10953 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
10954
10955         * marshal.c (emit_struct_conv): allow unions
10956
10957         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
10958
10959 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
10960
10961         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
10962
10963 2003-05-06  Martin Baulig  <martin@ximian.com>
10964
10965         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
10966
10967 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10968
10969         * socket-io.c:
10970         (Select_internal): allow NULLs, don't create arrays if not needed.
10971         Coupled with Socket.cs changes.
10972
10973         * threadpool.c:
10974         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
10975         register a finalizer for it that will close the semaphore handle. This
10976         fixes the leak and make Lupus' test run with > 4080 loops.
10977
10978 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
10979
10980         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
10981         Jerome Laban (bug #42287)
10982
10983 2003-05-02  Martin Baulig  <martin@ximian.com>
10984
10985         * debug-mono-symfile.h
10986         (MonoSymbolFile): Moved declaration into mono-debug.h.
10987         (MonoDebugMethodJitInfo): Likewise.
10988         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
10989         argument.
10990         (_mono_debug_address_from_il_offset): Take a
10991         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
10992
10993         * mono-debug.h
10994         (MonoDebugDomainData): New struct.
10995         (mono_debug_get_domain_data): New function.
10996         (mono_debug_add_method): Take an additional `MonoDomain *'
10997         argument.
10998         (mono_debug_source_location_from_address): Likewise.
10999         (mono_debug_il_offset_from_address): Likewise.
11000         (mono_debug_address_from_il_offset): Likewise.
11001
11002 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
11003
11004         * reflection.c: one more check for null type in custom attrs.
11005
11006 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11007
11008         * reflection.c: avoid warning (comparison is always false due to limited
11009         range of data type).
11010
11011 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11012
11013         * icall.c: throw an exception in Type.GetField if the argument 'name'
11014         is NULL.
11015
11016 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
11017
11018         * reflection.c: fixed handling of enums in named arguments to custom
11019         attributes (bug #42123).
11020
11021 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
11022
11023         * reflection.c: use the right array element type and handle
11024         a null for a Type argument, too.
11025
11026 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
11027
11028         * reflection.c: handle arrays as arguments to custom attributes.
11029
11030 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
11031
11032         * reflection.c: handle a string value in a custom attr
11033         ctor that takes an object.
11034
11035 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
11036
11037         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
11038         (fix bug #42063)
11039
11040 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
11041
11042         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
11043
11044 2003-04-27  Martin Baulig  <martin@ximian.com>
11045
11046         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
11047         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
11048         MONO_DEBUGGER_EVENT_BREAKPOINT.
11049         (mono_breakpoint_trampoline_code): Removed.
11050         (mono_debugger_event_handler): The last argument is now a
11051         `guint32'.
11052         (mono_debugger_insert_breakpoint_full): Removed the
11053         `use_trampoline' argument.
11054         (mono_debugger_method_has_breakpoint): Likewise.
11055         (mono_debugger_trampoline_breakpoint_callback): Renamed to
11056         mono_debugger_breakpoint_callback(); take the method and
11057         breakpoint number as arguments.
11058
11059 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
11060
11061         * metadata.c: fix off by one when loading parameters attributes.
11062
11063 2003-04-24  Martin Baulig  <martin@ximian.com>
11064
11065         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
11066
11067 2003-04-24  Martin Baulig  <martin@ximian.com>
11068
11069         * mono-debug-debugger.c: Moved all code which interacts with the
11070         Mono Debugger here.
11071
11072         * debug-mono-symfile.c: This code now just deals with the symbol
11073         file itself, the debugger code is now in mono-debug-debugger.c.
11074
11075 2003-04-23  Martin Baulig  <martin@ximian.com>
11076
11077         * mono-debug.c (mono_debug_source_location_from_il_offset):
11078         New method; like mono_debug_source_location_from_address(), but
11079         takes an IL offset instead of a machine address.
11080
11081 2003-04-23  Martin Baulig  <martin@ximian.com>
11082
11083         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
11084         `line' field; this is now computed by the debugger.
11085
11086 2003-04-23  Martin Baulig  <martin@ximian.com>
11087
11088         * mono-debug.[ch]: New files.  This is the new debugging interface.
11089
11090         * mono-debug-debugger.[ch]: New files.  Moved all code which
11091         interacts with the Mono Debugger here.
11092
11093 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
11094
11095         * domain.c (mono_init): initialize mono_defaults.monitor_class
11096
11097 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
11098
11099         * reflection.c (method_encode_code): Add a spicy exception to help
11100         future compiler authors.
11101
11102 2003-04-21  Martin Baulig  <martin@ximian.com>
11103
11104         * icall.c
11105         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11106         Make this work with relative pathnames; g_filename_to_uri() needs
11107         an absolute filename.
11108
11109 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
11110
11111         * icall.c: Track name changes in Object and ValueType.
11112
11113 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
11114
11115         * metadata.c (mono_type_stack_size): size should be a multiple of
11116         sizeof (gpointer)
11117
11118 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11119
11120         * gc.c:
11121         (internal_domain_finalize): moved into mono_domain_finalize. No need
11122         to create another thread because the finalizers will be run in the
11123         finalizer thread.
11124         
11125         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
11126         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
11127         to be run (MS does this too).
11128
11129 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
11130
11131         * object.c (mono_class_compute_gc_descriptor): Update comment.
11132
11133         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
11134
11135         * image.h: Add synchronized wrapper cache.
11136
11137         * image.c (do_mono_image_open): Initialize cache.
11138
11139         * reflection.c (create_dynamic_mono_image): Initialize cache.
11140
11141 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11142
11143         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
11144         ves_icall_System_Buffer_ByteLengthInternal.
11145
11146 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
11147
11148         * reflection.c: setup klass->nested_in earlier. Allow
11149         a dash in the assembly name.
11150
11151 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
11152
11153         * metadata.c (mono_type_to_unmanaged): dont access
11154         type->data.klass for MONO_TYPE_OBJECT
11155         (mono_type_to_unmanaged): consider System.Delegate class
11156
11157 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
11158
11159         * class.c: just setup supertypes in the proper place instead of
11160         initializing the full element class for arrays.
11161
11162 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
11163
11164         * class.c: ensure the element class of arrays is initialized.
11165         Setup the supertype info for array classes, too.
11166
11167 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
11168
11169         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
11170
11171 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11172
11173         * Makefile.am: re-added -m option when running cygpath. This way,
11174         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
11175         separator.
11176         * mono-config.c: same codepath for locating mono config file for WIN32
11177         and the rest.
11178         * assembly.c: if mono_assembly_setrootdir is called, don't override
11179         the value set.
11180
11181 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11182
11183         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
11184         MONO_ASSEMBLIES variable.
11185
11186 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
11187
11188         * icall.c: added Assembly::GetNamespaces() icall.
11189
11190 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11191
11192         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
11193
11194 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
11195
11196         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
11197         * object.c: fixed bug in the construction of vtable for proxies
11198
11199 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
11200
11201         * object.c (mono_array_new): Mark mono_array_new as an icall.
11202
11203 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11204
11205         * class.c: fixed test for public method when overriding interfaces.
11206         Closes bug #40970.
11207
11208 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11209
11210         * appdomain.h, domain.c: added mono_domain_foreach() to
11211         be able to access the currently loaded appdomains.
11212         * object.c: make string interning work across sppdomains.
11213         Mark some functions for use as icalls.
11214
11215 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
11216
11217         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
11218
11219         * reflection.h reflection.c: Allocate long living data using 
11220         GC_MALLOC_ATOMIC so the collector does not need to scan it.
11221
11222         * reflection.c: Double the allocation size in streams instead of
11223         increasing it, to prevent unneccesary copying on large assemblies.
11224         
11225         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
11226         creation if the assembly does not have the Run flag set.
11227
11228 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11229
11230         * class.h: avoid the C++ keywords in header files (Jerome Laban
11231         spotted and fixed this).
11232
11233 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11234
11235         * object.c:
11236         (mono_unhandled_exception): fill in the arguments for the
11237         UnhandledException event. Only trigger that event for the default
11238         domain (as MS does).
11239
11240 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
11241
11242         * object.c: Improve typed allocation stuff based on suggestions from
11243         Paolo. Also turn it on if the GC library supports it.
11244
11245 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
11246
11247         * object.c object.h class.h: Added experimental typed allocation
11248         facility using the interfaces in gc_gcj.h.
11249
11250         * os/gc_wrapper.h: Added new include files.
11251         
11252 2003-04-03  Martin Baulig  <martin@ximian.com>
11253
11254         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
11255         which is not yet enabled by default.
11256
11257         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
11258         functions.
11259         (mono_gc_lock, mono_gc_unlock): New static functions.
11260
11261         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
11262         functions; stop/start the world for the garbage collector.  This
11263         is using the windows API; we need to complete the SuspendThread()/
11264         ResumeThread() implementation in the io-layer to make this work on Unix.
11265         (mono_gc_push_all_stacks): New public function; tells the garbage
11266         collector about the stack pointers from all managed threads.
11267
11268 2003-04-03  Martin Baulig  <martin@ximian.com>
11269
11270         * object.h (MonoThread): Added `gpointer stack_ptr'.
11271
11272         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
11273
11274 2003-04-03  Martin Baulig  <martin@ximian.com>
11275
11276         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
11277
11278 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
11279
11280         * reflection.c (typebuilder_setup_fields): Initialize field.first and
11281         field.last.
11282
11283 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
11284
11285         * loader.c (mono_lookup_internal_call): Report the corlib that is
11286         out of sync.
11287
11288 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
11289
11290         * icall.c (ves_icall_type_GetTypeCode): fixed check for
11291         System.DBNull (it's class not valuetype).
11292
11293 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
11294
11295         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
11296         if the array method was already assigned a token (fixes bug#40646).
11297
11298 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
11299
11300         * reflection.c (mono_reflection_get_type): Attempt type resolve even
11301         if no assembly is given.
11302
11303 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
11304
11305         * metadata.h: Added the new tables.
11306
11307         * row-indexes.h: Added definitions for new tables.
11308
11309         * metadata.c: Add schemas for new tables, and add support for
11310         computing the sizes of them.
11311
11312         * class.c: Update for handling the new type cases.
11313
11314 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
11315
11316         * metadata.h (MONO_TYPE_IS_VOID): new macro
11317
11318 2003-03-31  Martin Baulig  <martin@ximian.com>
11319
11320         * threads.h (MonoThreadCallbacks): Added `thread_created'.
11321
11322         * threads.c (mono_thread_new_init): Call `thread_created' in the
11323         mono_thread_callbacks.
11324
11325 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
11326
11327         * loader.h: added marshalbyrefobject_class to mono_defaults
11328         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
11329         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
11330           generation of output parameters.
11331           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
11332         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
11333           contextbound and the target object belongs to the context of the caller.
11334         * object.h: added context and unwrapped_server variables in MonoRealProxy.
11335         * object.c: Implemented support for interfaces and abstract classes
11336           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
11337           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
11338
11339 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
11340
11341         * class.h class.c (mono_class_is_subclass_of): New function.
11342         
11343         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
11344         routines for most common case (calls from ArrayList::ToArray).
11345
11346         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
11347         routine so programs which call Environment::Exit() can be profiled.
11348
11349         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
11350         Added MONO_ARCH_SAVE_REGS.
11351
11352         * icall.c (ves_icall_type_is_subtype_of): Use new function.
11353
11354 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
11355
11356         * blob.h: Add a couple of new MonoType types definitions.
11357
11358         * tabledefs.h: Add a couple of new call convs.
11359
11360 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
11361
11362         * reflection.h (MonoReflectionDynamicAssembly): track changes in
11363         the layout of the class.
11364
11365         * reflection.c (alloc_table): double the size on overflow to avoid
11366         unnecessary copying.
11367
11368         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
11369         avoid filling out metadata tables and blobs. Also set mb->ilgen to
11370         null so it can be garbage collected.
11371         
11372 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
11373
11374         * reflection.c (mono_reflection_get_type): Return the resolved type
11375         only if it is in the assembly we searched.
11376
11377         * reflection.c (ensure_runtime_vtable): Initialize method slots.
11378
11379         * class.c (mono_class_setup_vtable): Set the slot of the overriding
11380         method.
11381
11382 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11383
11384         * appdomain.c:
11385         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
11386         the right one is 'file:///blah', but MS allows it.
11387         * assembly.c:
11388         (mono_assembly_open): allow 'file://blah'
11389
11390         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
11391
11392 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
11393
11394         * socket-io.c: fixes bug #40310.
11395
11396 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
11397
11398         * reflection.c (mono_reflection_parse_type): handle deeply nested
11399         types correctly.
11400
11401         * reflection.c (mono_image_create_token): Use unique token values
11402         since they will be put into a hash table.
11403
11404         * class.c (mono_class_setup_vtable): If a method occurs in more than
11405         one place in the vtable, and it gets overriden, then change the
11406         other occurances too.
11407
11408         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
11409         object as return type.
11410
11411 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
11412
11413         * icall.c: Deleted "ToString" implementation for double and float
11414         because they are full implemented in managed code.
11415
11416 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11417
11418         * reflection.c, reflection.h: implemented and exported functions
11419         to retrieve info about custom attributes.
11420
11421 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11422
11423         * appdomain.c: moved Uri handling to assembly.c
11424         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
11425         work when using a file Uri in *nix and windows.
11426
11427         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
11428         GetReferencedAssemblies.
11429
11430 2003-03-18  Dick Porter  <dick@ximian.com>
11431
11432         * icall.c: Rename a couple of internal calls
11433
11434         * threads.c: Set the thread state to Stopped when a thread exits.
11435         Fixes bug 39377.
11436
11437 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
11438
11439         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
11440         New icall.
11441
11442         * object.c (mono_class_vtable): fix warning.
11443
11444 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
11445
11446         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
11447
11448         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
11449         memory.
11450         (method_encode_clauses): Create exception info structures in the right
11451         order.
11452         (mono_reflection_setup_internal_class): Initialize supertypes field.
11453
11454         * class.c object.c: Handle interfaces which implement other interfaces 
11455         correctly.
11456
11457         * class.h class.c: Move the supertypes array initialization code into 
11458         a separate function so it can be used for dynamic types too. Also call
11459         it earlier, in mono_class_init(), since it can be used before the
11460         type is initialized.
11461
11462 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11463
11464         * Makefile.am:
11465         * assembly.c:
11466         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
11467
11468         * appdomain.c:
11469         * appdomain.h:
11470         * marshal.c:
11471         * object.c: remove warnings.
11472
11473 2003-03-13  Martin Baulig  <martin@ximian.com>
11474
11475         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
11476         (MonoDebugLexicalBlockEntry): New types.
11477
11478         * debug-mono-symfile.c
11479         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
11480
11481 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11482
11483         * process.c: ret can be any non-zero value accroding to MS doc.
11484
11485 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
11486
11487         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
11488         fixing a warning for a miss-used prototype, would have cause
11489         random memory corruption.
11490
11491 2003-03-07  Martin Baulig  <martin@ximian.com>
11492
11493         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
11494         getting really annoying ....
11495
11496 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
11497
11498         * reflection.c (fixup_method): added support for array methods.
11499
11500 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
11501
11502         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
11503         (pointed out by Michael Adams).
11504
11505 2003-03-04  Dick Porter  <dick@ximian.com>
11506
11507         * icall.c: Temporarily reverted the Double and Single ToString()
11508         change, because it broke nunit.
11509
11510 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
11511
11512         * object.h, threads.h: make include files compatible with C++
11513         (patch by Jerome Laban <jlaban@wanadoo.fr>).
11514
11515 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
11516
11517         * icall.c: Erased ToString helper functions for Double and Single.
11518         Now, that implementations ar all in managed code (Double and Single
11519         Formatters).
11520
11521 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
11522
11523         * appdomain.c: Added method for initializing the default context of
11524         a domain. Added internal call for getting the default context.
11525         * appdomain.h: Added context variable in MonoDomain struct.
11526         * domain.c: mono_domain_set also sets the default context of the domain
11527         * icall.c: Mapped internal method InternalGetDefaultContext.
11528         * object.c: mono_object_get_virtual_method returns always a remoting
11529         wrapper if the object is a transparent proxy.
11530         mono_runtime_invoke_array: when creating an object by calling the
11531         constructor, if the created object is a proxy, then the constructor should
11532         be called using the a remoting wrapper.
11533
11534 2003-03-03  Dick Porter  <dick@ximian.com>
11535
11536         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
11537         variable so it compiles on solaris.  Problem spotted by
11538         Christopher Taylor <ct@cs.clemson.edu>
11539
11540 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11541
11542         * appdomain.c:
11543         (get_info_from_assembly_name): don't leak value.
11544
11545         * icall.c:
11546         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
11547         result.
11548
11549 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
11550
11551         * assembly.c: export mono_image_load_references ().
11552         * class.c: handle function pointers. mono_class_from_name() now
11553         supports nested type names directly.
11554
11555 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
11556
11557         * reflection.h reflection.c: Encode already created dynamic methods 
11558         and fields correctly as a DEF instead of a REF.
11559
11560         * reflection.c: Get rid of the force_ref argument to 
11561         mono_image_typedef_or_ref since it was wrong in the first place.
11562
11563         * string-icalls.c: add error checking to string constructors according
11564         to the MSDN docs.
11565
11566         * reflection.c: Emit types in the order their TypeBuilders were 
11567         created. Previously, a new table index was assigned to each type before
11568         the tables were emitted. This was wrong because the signature blob
11569         might already refer to a type by its original table index.
11570
11571 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
11572
11573         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
11574         change.
11575         
11576 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11577
11578         * Makefile.am: make assemblies dir have \ instead of / on windows.
11579
11580 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
11581
11582         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
11583         iterate over the NESTEDCLASS table using a linear search since the
11584         table is not guaranteed to be sorted by the secondary key.
11585
11586         * class.c (mono_class_create_from_typedef): fixed up call to
11587         mono_metadata_nesting_typedef.
11588         
11589 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
11590
11591         * marshal.c (mono_string_to_byvalstr): clear the memory as
11592         suggested by Jerome Laban <jlaban@wanadoo.fr>
11593
11594 2003-02-26  Dick Porter  <dick@ximian.com>
11595
11596         * process.c: Cope with padding in .rsrc blocks
11597
11598 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
11599
11600         * metadata.h: reverted the filter_len change, it breaks reflection
11601         
11602 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
11603
11604         * metadata.h: added a new field to store the filter_len
11605         
11606
11607 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11608
11609         * reflection.c: handle custom attributes for types and members
11610         created with Reflection.Emit (bug#38422).
11611
11612 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
11613
11614         * reflection.c: define RTSpecialName automatically for constructors for
11615         compatibility with MS.NET.
11616
11617         * reflection.c (mono_reflection_create_runtime_class): initialize
11618         nested_in field of dynamically created classes.
11619
11620 2003-02-22  Martin Baulig  <martin@ximian.com>
11621
11622         * debug-mono-symfile.h: Incremented version number.
11623
11624 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
11625
11626         * object.h icall.c process.c: fix warnings.
11627
11628 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
11629
11630         * appdomain.h appdomain.c:
11631         (mono_domain_try_type_resolve): split the 
11632         name_or_tb argument into a name and a tb argument.
11633         (mono_domain_has_type_resolve): new function to check whenever the
11634         application has registered a TypeResolve event handler.
11635         
11636         * icall.c reflection.h reflection.c: move the type resolve logic into
11637         mono_reflection_get_type () so it will be invoked when 
11638         Assembly::GetType () is called.
11639
11640         * reflection.c:
11641         (mono_reflection_get_type): renamed to get_type_internal.
11642         (mono_reflection_get_type): fixed type name generation so it works 
11643         for nested types too.
11644         (mono_reflection_get_type): call has_type_resolve () to avoid the 
11645         costly type name generation if there is no resolve event handler.
11646
11647 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11648
11649         * class.c, image.c: load exported types from file references.
11650
11651 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
11652
11653         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
11654           used to cache the managed methods used to create proxies and make 
11655           remote invocation of methods.
11656         * class.h: Added in MonoVTable a flag to indicate that a class needs 
11657           to be remotely created.
11658         * object.c: Modified the method mono_class_vtable(). It now initializes 
11659           the remote flag of the vtable. Modified mono_object_new_specific(), 
11660           so now it checks the remote flag.
11661         * icall.c: Added a couple of internal methods, one for enabling instance 
11662           creation interception for a type, and one for creating objects bypassing
11663           the remote check.
11664
11665 2003-02-18  Martin Baulig  <martin@ximian.com>
11666
11667         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
11668         New interncall to get a method's metadata token.
11669
11670         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
11671         New interncall for the debugger.
11672
11673 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
11674
11675         * class.c (mono_class_setup_vtable): allocate supertype array
11676
11677 2003-02-18  Martin Baulig  <martin@ximian.com>
11678
11679         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
11680
11681 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11682
11683         * reflection.c:
11684         (assembly_name_to_aname): jump over unknown properties (i've found
11685         something like: 'type, assembly, version=xxx, custom=null, public...',
11686         so now will ignore custom=null and still get the rest of the values).
11687
11688 2003-02-17  Dick Porter  <dick@ximian.com>
11689
11690         * threads.c: Have Thread.Start() wait for a semaphore to signal
11691         that the thread has set up all its local data.  This fixes bug
11692         34323, where Abort() raced the new thread's TLS data.
11693
11694         Also removes the handle_store() call from start_wrapper, because
11695         threads are now always created suspended and there is no longer a
11696         race between the parent and child threads to store the info.
11697
11698 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
11699
11700         * image.c: explain the #- heap issue in a message, hopefully
11701         avoiding FAQs on mono-list.
11702
11703 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11704
11705         * icall.c:
11706         (GetEntryAssembly): if the domain has not invoked
11707         AppDomain.ExecuteAssembly yet, return the assembly of the default
11708         AppDomain.
11709
11710 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
11711
11712         * class.c (mono_ldtoken): make it work in dynamic assemblies.
11713
11714 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
11715
11716         * metadata.c, reflection.c: simple speedup to type hash
11717         and equals code.
11718
11719 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
11720
11721         * image.c, image.h, class.c, assembly.c: move module loading
11722         to MonoImage. When loading metadata, consider alignemnet from
11723         the start of metadata, not from the metadata address in memory.
11724
11725 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
11726
11727         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
11728         AssemblyBuilder objects. Factored out custom attribute creation into
11729         a separate function.
11730         (create_custom_attr): new function to create custom attributes.
11731
11732 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
11733
11734         * Makefile.am: Got tired of typing the full pathname to pedump.
11735         Until there is another option, am installing this.
11736
11737 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
11738
11739         * class.c (class_compute_field_layout): always set field->parent 
11740         (mono_ldtoken): use mono_defaults.fieldhandle_class;
11741
11742 2003-02-11  Dick Porter  <dick@ximian.com>
11743
11744         * threads-types.h:
11745         * monitor.c: Rewrote Monitor, making lock much faster and
11746         Pulse/Wait work as specified.  Also uses much fewer handles, and only
11747         creates them as needed.
11748
11749         * exception.c: Added SynchronizationLockException
11750
11751         * threads.c: Deleted old Monitor implementation.  The new one is
11752         in a new file.
11753
11754 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11755
11756         * class.c: handled TypedReference type code. Set the correct size for
11757         class data. Setup interface_offsets for interface classes, too.
11758
11759 2003-02-09  Martin Baulig  <martin@ximian.com>
11760
11761         * debug-mono-symfile.h: Reflect latest symbol writer changes.
11762
11763 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
11764
11765         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
11766         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
11767         * object.c: fixed mono_object_get_virtual_method () for interfaces.
11768         * verify.c: check for code that runs after the end of the method.
11769
11770 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
11771
11772         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
11773         "System.Math::Round2".
11774         * sysmath.h: Added Floor, Round and Round2 definitions.
11775         * sysmath.c: Modified certain functions that were not 100% compliant
11776         with MS.NET (math precision) and added the implementation of Floor,
11777         Round and Round2.
11778
11779 2003-02-07  Martin Baulig  <martin@ximian.com>
11780
11781         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
11782
11783 2003-02-07  Martin Baulig  <martin@ximian.com>
11784
11785         * debug-mono-symfile.c: Reflected latest symwriter changes.
11786         (mono_debug_create_mono_symbol_file): Removed.
11787         (mono_debug_open_mono_symbol_file): Take an argument which
11788         specifies whether to create a dynamic symbol file.
11789
11790 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
11791
11792         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
11793
11794 2003-02-05  Martin Baulig  <martin@ximian.com>
11795
11796         * reflection.c (mono_image_build_metadata): Make this public,
11797         protect it against being called multiple times, don't create
11798         resources and don't build the compressed metadata here.
11799         (mono_image_create_pefile): Do this here.
11800
11801         * icall.c
11802         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
11803
11804 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11805
11806         * socket-io.c: fixed bug #36322.
11807
11808 2003-02-06  Piers Haken <piersh@friskit.com>
11809
11810         * appdomain.[ch]:
11811         * class.h:
11812         * debug-mono-symfile.c:
11813         * icall.c:
11814         * loader.c:
11815         * mono-config.c:
11816         * monosn.c:
11817         * reflection.c:
11818         * socket-io.c: warning cleanups
11819
11820 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
11821
11822         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
11823         function. works like remoting invoke, but does a check for the Proxy first.
11824
11825 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
11826
11827         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
11828
11829 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
11830
11831         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
11832         array of pointers.
11833         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
11834         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
11835
11836         * object.c (mono_store_remote_field_new): used by the new jit
11837         instead of mono_store_remote_field
11838         (mono_load_remote_field_new): used by the new jit
11839         instead of mono_load_remote_field
11840
11841 2003-02-05  Patrik Torstensson
11842
11843         * appdomain.c: changed unload to take the domain id instead
11844         of domain
11845         
11846         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
11847
11848
11849 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11850
11851         * appdomain.c: don't look for assemblies in ApplicationBase if
11852         PrivateBinPathProbe is set.
11853
11854 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11855
11856         * object.c: make the first argument in main_args contain the absolute
11857         path to the assembly. Fixes bug #37511.
11858
11859 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11860
11861         * icall.c: get correct UTC offset for countries not using daylight
11862         time saving. Fixes bug #30030.
11863
11864 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11865
11866         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
11867         and 1 are the family).
11868
11869 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
11870
11871         * icall.c (ves_icall_InternalExecute): removed wrong assertion
11872
11873         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
11874
11875 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
11876
11877         * reflection.c: added support for SignatureHelper tokens, which is
11878         needed by the Calli opcode.
11879
11880         * reflection.h: track changes to SignatureHelper class.
11881
11882         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
11883
11884 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11885
11886         * appdomain.c: fixed loading assemblies from PrivateBinPath.
11887
11888 2003-02-03  Patrik Torstensson
11889         * appdomain.[c|h], domain.c : 
11890          - Added support for getting a domain via domain id
11891          - Support for setting and getting domain from System.AppDomain 
11892            (used in cross appdomain channel)
11893          - Added support for get/set for a MonoAppContext on a thread 
11894            (Context class in System.Runtime.Remoting.Contexts),
11895          - Removed hack in Get/SetData and ExecuteAssembly.
11896         
11897         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
11898         the managed world to get control when a proxy is created.
11899
11900         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
11901         
11902 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
11903
11904         * icall.c
11905         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11906         Populate the codebase field as well.
11907
11908 2003-02-02  Martin Baulig  <martin@ximian.com>
11909
11910         * debug-mono-symfile.c
11911         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
11912         (mono_debug_symfile_add_method): Allow interncalls.
11913
11914 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11915
11916         * icall.c: throw parse exception if strtod fails or the string is empty.
11917
11918 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
11919
11920         * marshal.c: handle object type separately from defined
11921         class types.
11922
11923 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
11924
11925         * marshal.c: handle NATIVE_LPSTR for strings when it's
11926         explicitly specified.
11927
11928 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
11929
11930         * reflection.c, reflection.h, icall.c: setup the reflection
11931         handle cache for ModuleBuilders and AssemblyBuilders.
11932
11933 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
11934
11935         * reflection.c (reflection_methodbuilder_to_mono_method): set
11936         pinvoke flag
11937
11938 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11939
11940         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
11941
11942 2003-01-29  Dick Porter  <dick@ximian.com>
11943
11944         * threads.c: No need for the fake_thread kludge now that Thread
11945         doesn't run a class constructor
11946         
11947 2003-01-29  Dick Porter  <dick@ximian.com>
11948
11949         * threads.c: Use g_direct_hash instead of the rather bogus
11950         g_int_hash
11951
11952 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
11953
11954         * marshal.c (mono_marshal_get_native_wrapper): add check for null
11955         (fix pinvoke12.exe)
11956         (mono_marshal_get_struct_to_ptr): generate valid IL code
11957         (mono_marshal_get_ptr_to_struct): generate valid IL code
11958         (*): correctly set sig->pinvoke, we need to memdup the signature
11959         to do that
11960
11961 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11962
11963         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
11964         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
11965
11966 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
11967
11968         * profiler.c: provide more callers information.
11969
11970 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
11971
11972         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
11973
11974         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
11975
11976         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
11977
11978 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
11979
11980         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
11981         exception instead of going into an infinite loop on dates which it 
11982         can't yet handle.
11983
11984         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
11985         out-of-range exception if needed.
11986
11987         * class.c (mono_class_setup_vtable): allow a virtual method to provide
11988         an implementation for an interface method and to override an inherited
11989         method at the same time. 
11990         Imagine a scenario when a virtual method is used to override a
11991         virtual abstract method in a parent class, and this same method 
11992         provides an implementation for an method inherited from an interface. 
11993         In this case, the interface resolution code will set im->slot, which 
11994         means that the virtual method override pass will skip this method 
11995         which means a pointer to the abstract method inherited from the parent
11996         will remain in the vtable of this non-abstract class.
11997
11998         * class.c: (mono_class_setup_vtable): continue search for a real 
11999         method if only an abstract method is found.     
12000
12001 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
12002
12003         * reflection.c: add size to encoding for ByValStr and ByValArray
12004         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
12005
12006 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12007
12008         * class.c (mono_class_setup_vtable): pass the override info as an
12009         argument.
12010
12011         * class.c (mono_class_setup_vtable): set the slot of overriding methods
12012         correctly.
12013         
12014         * reflection.c (ensure_runtime_vtable); add support for method 
12015         overrides.
12016         
12017 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12018
12019         * reflection.c (resolution_scope_from_image): Hack to work to work with
12020         dynamic assemblies.
12021
12022         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
12023         added a 'force_ref' argument to force this function to allways return 
12024         a TypeRef. This is needed by mono_image_get_memberref_token ().
12025         
12026 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12027
12028         * reflection.c (mono_image_get_type_info): interfaces really don't have
12029         a parent.
12030
12031         * reflection.c (mono_image_basic_init): fill out missing fields of
12032         image structure.
12033
12034         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
12035         dynamic assemblies. This is required so dynamic assemblies show up in
12036         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
12037         Type::GetType() etc. This is consistent with MS behaviour.
12038
12039         * image.c image.h reflection.c: add newly created classes to the name 
12040         cache so mono_class_get () will find them.      
12041
12042 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12043
12044         First part of changes to get IKVM.NET running under mono.
12045         
12046         * appdomain.h, appdomain.c: added new function 
12047         mono_domain_try_type_resolve() which will emit TypeResolve events. 
12048         This function will call AppDomain::DoTypeResolve to do the actual work.
12049
12050         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
12051         moved existing code dealing with dynamic tokens to a new function 
12052         called mono_reflection_lookup_dynamic_token (). This function will 
12053         raise TypeResolve events when appropriate. Since reflection.c is not 
12054         part of libmetadata, a new hook function called 
12055         mono_lookup_dynamic_token() is added to class.c which will call this.
12056
12057         * assembly.h assembly.c: make the invoke_load_hook function public,
12058         so it can be called for dynamic assemblies.
12059
12060         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
12061
12062         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
12063         type isn't found.
12064
12065         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
12066         MonoGHashTable, since it contains pointers to objects which the GC 
12067         needs to track.
12068
12069         * assembly.c (search_loaded): remove unused variable.
12070         
12071 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
12072
12073         * object.c: fixed issue exposed by gcc-generated IL programs
12074         that use RVA data for pointers.
12075
12076 2003-01-25  Martin Baulig  <martin@ximian.com>
12077
12078         * threads.c (start_wrapper): Moved the initialization of
12079         `start_func' above the mono_new_thread_init() call to which we
12080         pass it as argument.
12081
12082 2003-01-24  Martin Baulig  <martin@ximian.com>
12083
12084         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
12085         the MonoThread pointer.
12086
12087 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
12088
12089         * icall.c: Rename `PowImpl' to Pow.
12090
12091 2003-01-23  Dick Porter  <dick@ximian.com>
12092
12093         * threads.c (start_wrapper): Create a Thread object if needed, so
12094         the Main() thread can do the class initialisation in a subthread
12095         that has been set up to allow managed code execution.
12096
12097         Pass the thread ID instead of the MonoThread pointer to the thread
12098         start and attach callbacks.  This change is required, because the
12099         jit thread start callback must be called _before_ the Thread
12100         object can be created.
12101         
12102         (mono_thread_init): Removed much object creation code that is no
12103         longer needed.  No managed code is called from here now.
12104
12105         * object.c (mono_runtime_exec_managed_code): Create a subthread
12106         for Main, and call back to the runtime to use it.
12107         Set the exit code when Main exits.
12108
12109         * gc.c: Make sure domain finalisation happens in a subthread.
12110         Re-enable threaded GC, fixing bug 31333 (again).
12111
12112         * environment.c: System.Environment internall calls (so far just
12113         ExitCode is here, the others are still in icall.c)
12114
12115         * appdomain.c (mono_runtime_cleanup): All threads running managed
12116         code should have finished before mono_runtime_cleanup() is
12117         reached, so no need to clean up threads.
12118
12119 2003-01-22  Martin Baulig  <martin@ximian.com>
12120
12121         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
12122         `gpointer func' arguments.      
12123         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
12124         but added `MonoThread *thread' argument.
12125         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
12126
12127         * threads.c (mono_new_thread_init): Added `gpointer func' argument
12128         and pass it to the mono_thread_start_cb callback.
12129         (mono_install_thread_callbacks): New public function to install a
12130         set of callbacks which are set by the debugger.
12131         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
12132
12133 2003-01-22  Martin Baulig  <martin@ximian.com>
12134
12135         * Makefile.am: Install debug-mono-symfile.h.
12136
12137 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
12138
12139         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
12140
12141 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
12142
12143         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
12144         * class.c (mono_ptr_class_get): correctly set access levels of pointers
12145         (mono_array_class_get): correctly set access levels of arrays
12146
12147 2003-01-20      Patrik Torstensson
12148         * image.h (MonoAssemblyName): changed major, minor, build, revision
12149         from signed to unsigned.
12150
12151 2003-01-20  sean kasun <skasun@azstarnet.com>
12152
12153         * reflection.c (load_cattr_value): Now this handles
12154         MONO_TYPE_SZARRAY.  Fixes bug #35629
12155
12156 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
12157
12158         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
12159         integer value
12160
12161 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12162
12163         * decimal.c: fixed bug #26056.
12164
12165 2003-01-17  Martin Baulig  <martin@ximian.com>
12166
12167         * gc.c: Raise an ExecutionEngineException instead of using g_error().
12168
12169 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12170
12171         * exception.[ch]:
12172         (mono_get_exception_type_initialization): new function.
12173
12174         * object.c: throw a TypeInitializationException when an exception is
12175         thrown invoking the class constructor.
12176
12177 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12178
12179         * reflection.c: fixed attribute reading.
12180
12181 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12182
12183         * icall.c:
12184         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
12185         provided, look for the type in the calling assembly and then in
12186         mscorlib; if the assembly name is provided, only try that one.
12187
12188 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12189
12190         * object.c: register the vtable before there is a chance it's
12191         queried again recursively.
12192
12193 2003-01-13  Duncan Mak  <duncan@ximian.com>
12194
12195         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
12196         gc-internal.h. 
12197         
12198 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
12199
12200         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
12201
12202 2003-01-11  Martin Baulig  <martin@ximian.com>
12203
12204         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
12205         this to 20 for the release.
12206
12207 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
12208
12209         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
12210
12211         * loader.c (mono_method_get_marshal_info): bug fix
12212
12213         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
12214         structures with explicit layout
12215
12216 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12217
12218         * profiler.c: made the output more readable (and sorted). 
12219         Added caller information for the allocation profiler.
12220
12221 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
12222
12223         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
12224
12225 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12226
12227         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
12228         to get value types.
12229         
12230 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
12231
12232         * object.c, profiler.h, profiler.c, profiler-private.h:
12233         Added object allocation profiler.
12234
12235 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
12236
12237         * reflection.h, reflection.c: handle global methods.
12238         Compress blob entries.
12239
12240 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
12241
12242         * marshal.c: fix compilation.
12243
12244 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
12245
12246         * loader.c (mono_method_get_marshal_info): impl.
12247
12248         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
12249
12250 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12251
12252         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
12253         for reference types.
12254
12255 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
12256
12257         * loader.c: fixed off by one error in loaded parameter names.
12258
12259 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
12260
12261         * marshal.c (mono_marshal_get_icall_wrapper): like
12262         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
12263         instead of a MonoMethod.
12264
12265 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12266
12267         * decimal.c: fixed bug #36537.
12268
12269 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
12270
12271         * marshal.c: throw a missing method exception if a
12272         P/Invoke method is not found.
12273
12274 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12275
12276         * icall.c: allow a null this for constructors.
12277
12278 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12279
12280         * icall.c: raise the proper exceptions if the arguments to the
12281         internal Invoke are incorrect.
12282
12283 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
12284
12285         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
12286
12287 2003-01-03  Martin Baulig  <martin@ximian.com>
12288
12289         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
12290
12291 2002-12-31  Martin Baulig  <martin@ximian.com>
12292
12293         * debug-mono-symfile.c: Completely rewrote the type section.
12294         Instead of using individual malloc()ed fields, we use one big
12295         continuous memory area and offsets into this area.
12296         See the comments in the source code for details.
12297
12298 2002-12-30  Martin Baulig  <martin@ximian.com>
12299
12300         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
12301
12302 2002-12-30  Martin Baulig  <martin@ximian.com>
12303
12304         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
12305         line number table in this data blob instead of using an external
12306         pointer.
12307
12308 2002-12-28  Martin Baulig  <martin@ximian.com>
12309
12310         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
12311
12312 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
12313
12314         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
12315         as a boxed return type.
12316
12317 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
12318
12319         * appdomain.c
12320         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
12321         g_build_filename to properly get separators on the filename created.
12322
12323         * object.h: Small change, introduce MonoMarshalByRefObject to
12324         track the layout of that structure in the C# universe as we make
12325         changes there.
12326
12327 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
12328
12329         * object.c: removed assert to allow static fields on interfaces.
12330         * loader.c: a TypeSpec may be used for any type, not just arrays.
12331
12332 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
12333
12334         * class.c, class.h: added mono_class_array_element_size ().
12335         Ignore static methods in interfaces.
12336
12337 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12338
12339         * threads.c: fixed the build under cygwin.
12340
12341 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
12342
12343         * reflection.c: handle nullref constants. Allocate keys for
12344         reflection handles with the GC.
12345
12346 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12347
12348         * threads.c, threads.h: added mono_thread_get_abort_signal()
12349         to get a suitable signal for thread abort.
12350
12351 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12352
12353         * metadata.c: fix handling of ExportedType table.
12354
12355 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12356
12357         * icall.c: added WriteWindowsDebugString internal call.
12358
12359 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12360
12361         * reflection.h: added fields to match C# implementation.
12362
12363 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12364
12365         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
12366
12367 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
12368
12369         * gc.h, gc-internal.h: Rename header for GC internal calls to
12370         gc-internal.h from gc.h as to not clash with Boehm GC having its
12371         header installed as <gc.h> in outside include paths.
12372         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
12373         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
12374
12375 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12376
12377         * icall.c: assign minor, build and revision in FillName.
12378
12379 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
12380
12381         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
12382         Added support for running code generated by Reflection.Emit.
12383
12384 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12385
12386         * appdomain.c: check for NULL argument in LoadFrom.
12387
12388 2002-12-10  Dick Porter  <dick@ximian.com>
12389
12390         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
12391
12392 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12393
12394         * appdomain.c: fix buglet when building exe file name.  Handle full
12395         assembly name (needed after latest changes to AssemblyName).
12396         * image.c:
12397         (mono_image_close): free some hashtables.
12398
12399 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
12400
12401         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
12402         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
12403         on some systems (redhat 7.3) 
12404
12405 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
12406
12407         * threads.c: delete the critical section of a sync block,
12408         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
12409
12410 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
12411
12412         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
12413
12414 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12415
12416         * appdomain.[ch]: handle the assembly preload event to try loading the
12417         assemblies using the paths we have in the current domain.
12418
12419         * assembly.[ch]: created an assembly preload hook that is called to try
12420         loading the assembly by other means that the ones provided here.
12421
12422         * domain.c: initialize the domain search path.
12423
12424         From now on, assemblies (TODO: except corlib and System) are loaded
12425         according to these rules when using mono_assembly_load ():
12426
12427                 1. It tries to load the assembly from the ApplicationBase
12428                 of the current domain appending .dll and .exe (TODO: have to
12429                 try loading from name/name.dll and name/name.exe).
12430
12431                 2. It tries the search path specified in PrivateBinPath for the
12432                 current domain (if any).
12433
12434                 3. Previous behavior.
12435
12436 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
12437
12438         * icall.c: implemented GetInterfaceMap() related icall.
12439         * domain.c, loader.h: load MethodInfo in mono_defaults.
12440
12441 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
12442
12443         * gc.c: disable the finalizer thread for now, untill all the issues
12444         with it are resolved.
12445
12446 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12447
12448         * string-icalls.c: handle embedded nulls in string ctor when the
12449         length is specified.
12450
12451 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
12452
12453         * class.c: look for explicit interface implementation in parent
12454         classes, too.
12455
12456 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
12457
12458         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
12459
12460 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
12461
12462         * gc.c: protect handles with a critical section.
12463
12464 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12465
12466         * icall.c:
12467         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
12468         parameters. If no assembly specified, try getting the type from all
12469         the assemblies in the current domain, else, load the assembly and get
12470         the type from it.
12471
12472 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12473
12474         * marshal.c: applied patch from Aleksey Demakov that fixes
12475         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
12476
12477 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12478
12479         * icall.c: fixed get_location.
12480
12481 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
12482
12483         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
12484         declarations to make it work with older gcc. 
12485
12486         * loader.c (mono_get_method): set signature->pinvoke for native calls
12487
12488 2002-11-20  Dick Porter  <dick@ximian.com>
12489
12490         * threads.c (mono_thread_init): Set the main thread's handle
12491
12492 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
12493
12494         * gc.c: allow compilation without GC support. Changed to match the
12495         mono coding style.
12496
12497 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
12498
12499         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
12500
12501 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
12502
12503         * reflection.c: set a public key token on the core assemblies.
12504
12505 2002-11-18  Dick Porter  <dick@ximian.com>
12506
12507         * threads.c: Split out some thread initialisation so that other
12508         files can set the start callback function.
12509
12510         * gc.c: Run finalisers in a separate thread, to avoid stack
12511         overflow.  Fixes bug 31333.
12512
12513         * appdomain.c: Set up GC finalisation thread.
12514
12515         * reflection.c: 
12516         * object.c: 
12517         * domain.c: Use gc.h macros for GC_malloc
12518         
12519 2002-11-15  Dick Porter  <dick@ximian.com>
12520
12521         * threadpool.c: 
12522         * threads.c:
12523         * appdomain.c: Removed mono_runtime_init_with_attach(),
12524         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
12525         merging the extra parameter with the existing function.  Removed
12526         unneeded code in mono_thread_attach().
12527
12528 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
12529
12530         * image.c (mono_image_loaded_by_guid): a method to get loaded
12531         images by guid. 
12532         (load_metadata_ptrs): we store the guid as string.
12533
12534 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
12535
12536         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
12537
12538         * metadata.c (mono_guid_to_string): imported method form Zoltan
12539         Varga (slightly modified)
12540
12541         * assembly.c (mono_assembly_open): load precompiled code
12542
12543         * loader.h (MonoMethod): we store the method token for use in the
12544         aot compiler. 
12545
12546 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12547
12548         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
12549         the hook function called when an assembly is loaded.
12550         
12551         * domain.c: Modified file.
12552         (mono_domain_assembly_load): removed hash table insertion of assemblies.
12553
12554         Fixes bug #33196.
12555
12556 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
12557
12558         * reflection.c: Map PEFileKind to the value expected by the WinNT
12559         image loader. 
12560
12561 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12562
12563         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
12564         Read until the buffer is filled completely.
12565
12566 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12567
12568         * icall.c: implemented MonoType.InternalGetEvent ().
12569
12570 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12571
12572         * appdomain.c: implemented InitAppDomainSetup. Delayed
12573         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
12574         the entry_assembly.
12575
12576         * assembly.c: base_dir is now an absolute path ending with
12577         G_DIR_SEPARATOR.
12578
12579         * icall.c: modified get_location according to the above changes.
12580
12581         * object.c: init AppDomain.SetupInformation for the default domain after
12582         we have the entry assembly.
12583
12584         * domain.c: when unloading a domain, setup = NULL.
12585
12586 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
12587
12588         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
12589
12590 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
12591
12592         * object.h, object.c: introduced mono_object_get_virtual_method ()
12593         to lookup the method invoked on an object when a callvirt is done on
12594         a method.
12595         * icall.c: make MethodInfo::Invoke() always do a virtual call.
12596
12597 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12598
12599         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
12600         current domain when loaded an assembly and failed to load it.
12601
12602         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
12603
12604 2002-10-31  Dick Porter  <dick@ximian.com>
12605
12606         * icall.c: 
12607         * file-io.h: 
12608         * file-io.c: Return the error status in a parameter, as the
12609         GetLastError() value has long since been blown away if we try and
12610         look it up in a subsequent internal call invocation.  Delete the
12611         GetLastError() internal call, because it's useless.
12612
12613 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
12614
12615         * class.[ch]: added cast_class to fix bug 29517
12616
12617 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
12618
12619         * marshal.c: create valid IL code in the filter clause:
12620         the new JIT is less forgiving:-)
12621
12622 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12623
12624         * icall.c: removed get_property internal call.
12625
12626 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
12627
12628         * appdomain.h domain.c: Added an ID to appdomains.
12629         
12630         * threads.c threads.h icall.c: Implement icall
12631         Thread:GetDomainID(), and remove unused icall 
12632         CurrentThreadDomain_internal.
12633
12634 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12635
12636         * icall.c: Don't recurse through the base types in GetConstructor.
12637         Fixes bug #32063. 
12638
12639 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
12640
12641         * mempool.h, mempool.c: added mono_mempool_empty() and
12642         mono_mempool_stats().
12643
12644 2002-10-23  Dick Porter  <dick@ximian.com>
12645
12646         * file-io.c: 
12647         * file-io.h: 
12648         * icall.c: Added MonoIO.GetFileType internal call
12649
12650 2002-10-17  Dick Porter  <dick@ximian.com>
12651
12652         * appdomain.c (mono_runtime_cleanup): Don't signal the async
12653         delegate semaphore before waiting for all threads to finish,
12654         because new threads can also call async delegates.  Fixes bug
12655         32004.
12656
12657         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
12658         of 3 seconds, in case another async job is queued.  (This part is
12659         needed because the bug fix reintroduced the 3s exit lag.)  This
12660         makes the mono_runtime_shutdown flag superfluous.
12661
12662 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
12663
12664         * reflection.c: include ehader size in method section headers.
12665         Really check for suplicated modules entries.
12666
12667 2002-10-17  Martin Baulig  <martin@gnome.org>
12668
12669         * debug-mono-symfile.c: Added back support for locals.
12670
12671 2002-10-14  Martin Baulig  <martin@gnome.org>
12672
12673         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
12674         MONO_TYPE_VOID.
12675
12676 2002-10-14  Martin Baulig  <martin@gnome.org>
12677
12678         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
12679         mono_class_get() instead of looking in the class cache. 
12680
12681 2002-10-13  Martin Baulig  <martin@gnome.org>
12682
12683         * debug-mono-symfile.c: Set version number to 28, include the
12684         signature in method names.
12685
12686 2002-10-13  Martin Baulig  <martin@gnome.org>
12687
12688         * debug-mono-symfile.h: Set version number to 27.
12689
12690 2002-10-11  Martin Baulig  <martin@gnome.org>
12691
12692         * gc.c: Don't register/unregister NULL pointers as disappearing links.
12693
12694 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12695
12696         * metadata.c, metadata.h: added helper function to allocate signatures.
12697
12698 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12699
12700         * icall.c: added internal call to get the location of machine.config.
12701
12702 2002-10-08  Martin Baulig  <martin@gnome.org>
12703
12704         * debug-mono-symfile.c: Ignore classes with a pending init for the
12705         moment.
12706
12707 2002-10-03  Dick Porter  <dick@ximian.com>
12708
12709         * threads.c: Freebsd pthread_t is a pointer
12710
12711 2002-10-03  Dick Porter  <dick@ximian.com>
12712
12713         * socket-io.c: Implemented GetHostName_internal
12714
12715 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12716
12717         * mono-config.c:
12718         (mono_config_parse_file): don't leak the text.
12719
12720 2002-10-02  Martin Baulig  <martin@gnome.org>
12721
12722         * debug-mono-symfile.c: Added support for methods.
12723
12724 2002-10-01  Martin Baulig  <martin@gnome.org>
12725
12726         * debug-mono-symfile.c: Don't emit methods and line numbers for
12727         the dynamic symbol file, just write the type table.  We can easily
12728         have an external helper program which creates a symbol file for an
12729         IL file.        
12730
12731 2002-10-01  Dick Porter  <dick@ximian.com>
12732
12733         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
12734         Only add the handle to the cleanup array when we're about to
12735         launch the thread.  Bug 31425 deadlocked when the test was run on
12736         mono under w32.
12737
12738 2002-10-01  Martin Baulig  <martin@gnome.org>
12739
12740         * debug-mono-symfile.c: Added support for properties.
12741
12742 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12743
12744         * reflection.c: unaligned store fix from Mark Crichton
12745         <crichton@gimp.org>.
12746
12747 2002-09-27  Martin Baulig  <martin@gnome.org>
12748
12749         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
12750         New interncall.
12751
12752 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
12753
12754         * assembly.h, assembly.c: use a sane API to hook into the assembly
12755         loading process instead of a useless special-purpouse hack
12756         (ngen needs a hook, too, for example).
12757
12758 2002-09-27  Dick Porter  <dick@ximian.com>
12759
12760         * threads.c (mono_thread_init): Call GetCurrentProcess() so
12761         io-layer can set up some process handle info.  Not needed on w32,
12762         but doesn't hurt either.
12763
12764         * process.c: Pass the program name in the second parameter to
12765         CreateProcess, so the path is searched.  Include the working
12766         directory. Implemented process name, process enumeration, and some
12767         process detail internal calls.
12768         
12769         * icall.c: Added internal calls for process lookup, and some
12770         process details
12771
12772 2002-09-26  Martin Baulig  <martin@gnome.org>
12773
12774         * assembly.c (mono_install_open_assembly_hook): New global
12775         function to install a function to be invoked each time a new
12776         assembly is loaded.
12777         (mono_assembly_open): Run this callback function if set.
12778
12779         * debug-mono-symfile.c: Put back line numbers for the dynamic
12780         symbol file and also record the .il file as source file.  This
12781         allows us to install the temporary symbol file as `file.dbg' just
12782         like a compiler-generated one.
12783
12784 2002-09-26  Nick Zigarovich <nick@chemlab.org>
12785
12786         * Corrected typo in gc.c (BOHEM vs BOEHM).
12787
12788 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12789
12790         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
12791         GetProperties. Also avoid calling g_slist_length in GetProperties and
12792         GetMethods.
12793
12794 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
12795
12796         * reflection.c: avoid unaligned stores (bug spotted by
12797         Mark Crichton  <crichton@gimp.org>).
12798
12799 2002-09-25  Martin Baulig  <martin@gnome.org>
12800
12801         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
12802         instead of guint64 for addresses and added prologue/epilogue info.
12803
12804 2002-09-25  Martin Baulig  <martin@gnome.org>
12805
12806         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
12807         store line number info.  For the dynamic symbol file, we only need
12808         to provide the JIT generated dynamic line number info for the dynamic
12809         symbol file.
12810
12811 2002-09-25  Martin Baulig  <martin@gnome.org>
12812
12813         * debug-mono-symfile.h: Incremented version number.
12814
12815 2002-09-24  Martin Baulig  <martin@gnome.org>
12816
12817         * class.c (mono_debugger_class_init_func): New global function
12818         pointer variable.
12819         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
12820         call it.
12821
12822         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
12823         function.  This is called via the mono_debugger_class_init_func
12824         hook to add all types to the dynamic type table.
12825         (ves_icall_MonoDebugger_GetType): New interncall to get a class
12826         from its metadata token.
12827
12828         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
12829         New interncall for the debugger.
12830
12831 2002-09-24  Nick Drochak <ndrochak@gol.com>
12832
12833         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
12834         before using it in case it is null.
12835         
12836 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12837
12838         * metadata.c: allow custom modifiers in local var signatures
12839         (bug spotted by Zoltan Varga).
12840
12841 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12842
12843         * class.c: deal with the <Module> class that may have a NULL vtable.
12844         Eliminate warnings.
12845
12846 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
12847
12848         * image.c, image.h: more strong name helpers.
12849         * monosn.c: more work: convert pem keys to cryptoapi format.
12850
12851 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
12852
12853         * string-icalls.c: speedup IndexOf.
12854
12855 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12856
12857         * icall.c: updates from Zoltan.2.Varga@nokia.com.
12858
12859 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
12860
12861         * icall.c: cleanup: use mono_object_domain ().
12862
12863 2002-09-23  Martin Baulig  <martin@gnome.org>
12864
12865         * debug-mono-symfile.c: Improved type support.
12866
12867 2002-09-22  Martin Baulig  <martin@gnome.org>
12868
12869         * debug-mono-symfile.c: Added support for reference types and strings.
12870
12871 2002-09-22  Martin Baulig  <martin@gnome.org>
12872
12873         * debug-mono-symfile.c: Started to work on the type table.
12874
12875 2002-09-21  Martin Baulig  <martin@gnome.org>
12876
12877         * debug-mono-symfile.c: Largely reworked the symbol table format.
12878         The symbol table is now incrementally updated each time a new
12879         method is added.  We're now also using our own magic and version
12880         so that you don't need to recompile all your classes if the
12881         dynamic table changes.
12882         (mono_debug_update_mono_symbol_file): Removed.
12883         (mono_debug_symfile_add_method): New function to add a method.
12884
12885 2002-09-21  Martin Baulig  <martin@gnome.org>
12886
12887         * icall.c
12888         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
12889         New interncall.
12890
12891         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
12892         New interncall to get a method from its metadata token.
12893
12894 2002-09-21  Martin Baulig  <martin@gnome.org>
12895
12896         * debug-mono-symfile.c: Create type table.
12897
12898 2002-09-20  Martin Baulig  <martin@gnome.org>
12899
12900         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
12901
12902 2002-09-20  Martin Baulig  <martin@gnome.org>
12903
12904         * debug-mono-symfile.c: Provide information about params and locals.
12905
12906 2002-09-20  Martin Baulig  <martin@gnome.org>
12907
12908         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
12909         New interncall.
12910
12911         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
12912         interncall to get a method from its metadata token.
12913
12914 2002-09-20  Martin Baulig  <martin@gnome.org>
12915
12916         * debug-mono-symfile.c: Added a few checks for method->header
12917         being non-NULL.  This should never happen, but for the moment
12918         let's use a g_warning() rather than a g_assert().
12919
12920 2002-09-19  Mark Crichton  <crichton@gimp.org>
12921
12922         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
12923         even if support for it isn't present.  Added an #ifdef to fix this.
12924
12925         * socket-io.c: Added checks back for Solaris support.
12926
12927 2002-09-19  Martin Baulig  <martin@gnome.org>
12928
12929         * debug-mono-symfile.c (read_string, write_string): Reflect latest
12930         changes in the symbol file format.
12931
12932 2002-09-18  Martin Baulig  <martin@gnome.org>
12933
12934         * debug-mono-symfile.c: Set version number to 21.
12935
12936 2002-09-18  Dick Porter  <dick@ximian.com>
12937
12938         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
12939         on netbsd.  Fixes bug 30051.
12940
12941 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12942
12943         * reflection.c:
12944         (set_version_from_string): little fix.
12945
12946 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12947
12948         * monosn.c, Makefile.am: added strong name utility.
12949         * reflection.h, reflection.c: implemented delayed signing,
12950         locale, version and hash id assembly attributes.
12951
12952 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
12953
12954         * loader.c, metadata.c: load param attributes in signatures.
12955
12956 2002-09-16  Martin Baulig  <martin@gnome.org>
12957
12958         * debug-mono-symfile.c: Added string table with all method names.
12959
12960 2002-09-14  Martin Baulig  <martin@gnome.org>
12961
12962         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
12963         fast method lookup.
12964
12965 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
12966
12967         * reflection.c: record the public key token of referenced assemblies.
12968
12969 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
12970
12971         * image.c, image.h: added functions to get the strong name and the
12972         public key of an assembly.
12973         * pedump.c: use them.
12974
12975 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
12976
12977         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
12978
12979 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
12980
12981         * marshal.c (mono_marshal_get_managed_wrapper): Added
12982         MONO_TYPE_BOOLEAN 
12983
12984 2002-09-11  Martin Baulig  <martin@gnome.org>
12985
12986         * gc.c: Call GC_unregister_disappearing_link() on all links when
12987         finalizing them, this is necessary to aviod a crash in boehm's
12988         finalize handler.
12989
12990 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
12991
12992         * gc.c: handle GetTarget for finalized objects spotted and fixed by
12993         nick@chemlab.org.
12994
12995 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
12996
12997         * icall.c: implemented MonoType::Module.
12998         * reflection.c, reflection.h: mono_module_get_object () from
12999         Tomi Pakarinen <tomi.pakarinen@welho.com>.
13000
13001 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
13002
13003         * icall.c: ignore overridden methods in GetMethods ().
13004         Fix for FieldInfo::SetValue().
13005         * object.c: handle float/double in runtime invoke.
13006
13007 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13008
13009         * object.c: allow a constructor to be called again on an object.
13010
13011 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13012
13013         * class.h, class.c: move field layout code to it's own function and
13014         export it. Get an interface id earlier. Move fields in MonoClass
13015         so they are more cache friendly and align the bitfields.
13016         * loader.c: temporary handle get_param_names() for a runtime method.
13017         * reflection.c, reflection.h: more code to handle runtime creation of
13018         types.
13019
13020 2002-09-09  Martin Baulig  <martin@gnome.org>
13021
13022         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
13023         signature with the pinvoke field being set for the actual call.
13024
13025 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13026
13027         * icall.c: removed some unused icalls. Start of map of glib charsets
13028         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
13029
13030 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
13031
13032         * debug-helpers.c: break infinite loop (found and fixed by
13033         Holger Arnold <harnold@gmx.de>).
13034
13035 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13036
13037         * icall.c: target may be null in create_delegate.
13038
13039 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13040
13041         * marshal.c: handle a boolean return type.
13042
13043 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13044
13045         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
13046
13047 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
13048
13049         * gc.c: fix weakreferences.
13050
13051 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
13052
13053         * icall.c: added icall to get default codepage.
13054
13055 2002-09-03  Dick Porter  <dick@ximian.com>
13056
13057         * threads.h: 
13058         * threads.c: Use MonoThread instead of MonoObject where
13059         apropriate.
13060
13061         Store running thread objects in a hash table, so that we have all
13062         the info to hand when waiting for them to finish
13063         (means we don't need OpenThread() any more, so mingw builds should
13064         be fully functional again.)
13065
13066         * verify.c:
13067         * object.h: Added thread ID to MonoThread
13068
13069 2002-09-03  Martin Baulig  <martin@gnome.org>
13070
13071         * icall.c (System.Reflection.Assembly::get_location): New interncall.
13072
13073 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13074
13075         * icall.c: fixed leak in get_temp_path. Thanks lupus.
13076
13077 2002-09-03  Martin Baulig  <martin@gnome.org>
13078
13079         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
13080         argument to store the end address of the disassembled instruction.
13081
13082         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
13083         here from debug-symfile.h.
13084         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
13085         JIT into this struct.
13086         (MonoSymbolFile): Added `char *image_file' field.
13087         (MonoDebugGetMethodFunc): Removed.
13088         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
13089         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
13090         (mono_debug_find_method): New method.
13091
13092         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
13093         create a full symbol file.
13094         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
13095         and static symbol files.
13096         (mono_debug_find_method): The symbol file keeps an internal method hash,
13097         call this to get a MonoDebugMethodInfo from a MonoMethod.
13098
13099         * debug-symfile.[ch]: Removed.
13100
13101 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
13102
13103         * image.c (do_mono_image_open): Remove linker version check.
13104
13105 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
13106
13107         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
13108         wrappers for instance methods.
13109         
13110 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13111
13112         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
13113
13114 2002-08-28  Dick Porter  <dick@ximian.com>
13115
13116         * Makefile.am: Export HOST_CC for w32 builds
13117
13118 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
13119
13120         * file-io.c process.c: MonoString are null terminated, no
13121         need for mono_string_to_utf16() anymore.
13122
13123 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13124
13125         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
13126
13127 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
13128
13129         * icall.c, reflection.h: speedup System.MonoType.
13130
13131 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
13132
13133         * reflection.c: allow null as the value of a string argument in
13134         custom attributes constructors.
13135
13136 2002-08-27  Martin Baulig  <martin@gnome.org>
13137
13138         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
13139         `trampoline_address' field.
13140
13141 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
13142
13143         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
13144         check (fixes bug #29486) 
13145
13146 2002-08-27  Martin Baulig  <martin@gnome.org>
13147
13148         * debug-mono-symfile.c: Changed the file format in a way that allows us
13149         open it read-only and to use a specially malloced area for all the
13150         dynamic data.  We can now also generate a symbol file on-the-fly if we're
13151         debugging IL code and there is no MCS generated symbol file for it.
13152
13153 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
13154
13155         * object.c: added a define for a good string and array
13156         creation speedup (not enabled by default because we need to deal with
13157         the synch stuff).
13158
13159 2002-08-26  Martin Baulig  <martin@gnome.org>
13160
13161         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
13162         function to create a dynamic symbol file.  This is used by the
13163         debugger to create a symbol file for IL code on-the-fly.
13164
13165 2002-08-26  Martin Baulig  <martin@gnome.org>
13166
13167         * loader.c (mono_lookup_pinvoke_call): Include the error message
13168         from g_module_error() in the error message.
13169
13170 2002-08-24  Martin Baulig  <martin@gnome.org>
13171
13172         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
13173         function to update the symbol file.  The symbol file is mmap()ed
13174         writable, but private.  This allows us to install the symbol file
13175         together with the assembly.
13176
13177 2002-08-24  Martin Baulig  <martin@gnome.org>
13178
13179         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
13180         but they can read the new symbol file format which mcs is now creating.
13181
13182         * debug-symfile.c (mono_debug_find_source_location): Moved to
13183         debug-mono-symfile.c; this is now operating on the new symbol file.
13184
13185 2002-08-23  Martin Baulig  <martin@gnome.org>
13186
13187         * debug-helpers.c (mono_method_desc_from_method): New function to get
13188         a MonoMethodDesc from a MonoMethod.
13189
13190 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
13191
13192         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
13193         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
13194
13195 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
13196
13197         * string-icalls.[ch]: make helper methods static.
13198
13199 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13200
13201         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
13202         types to it and to SetValueInternal.
13203
13204         * object.c: Moved handle_enum label to its proper place. This was the
13205         f... bug! ;-)
13206
13207         This time i compiled mcs and gtk-sharp and they both work.
13208
13209 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13210
13211         * icall.c: reverted partially my previous patch until 
13212         object.c:set_value handles enums correcly.
13213
13214 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13215
13216         * icall.c:
13217         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
13218         (ves_icall_System_Environment_get_MachineName): removed warning when
13219         compiling under cygwin.
13220
13221 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
13222
13223         * object.c: fixed field_get_value() for reference types.
13224
13225 2002-08-22  Dick Porter  <dick@ximian.com>
13226
13227         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
13228         Don't free a buffer while it's still needed.  Patch from Jonathan
13229         Liger <Jonathan.liger@wanadoo.fr>
13230
13231 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
13232
13233         * icall.c (ves_icall_System_Environment_get_Platform): Add new
13234         internal call.
13235
13236 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
13237
13238         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
13239         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
13240
13241         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
13242         we call unmanaged code which throws exceptions.
13243
13244 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13245
13246         * appdomain.h: added per-domain entry_assembly.
13247         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
13248         arguments.
13249         * icall.c: Assembly::GetEntryAssembly icall.
13250         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
13251         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
13252
13253 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13254
13255         * appdomain.h, gc.c: added mono_domain_finalize ().
13256
13257 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13258
13259         * object.c:
13260         (mono_print_unhandled_exception): changed g_warning by g_printerr
13261         because g_log has a 1024 characters limit (yeah, i got a big stack
13262         trace). Don't print exception name, that should be in ToString 
13263         returned string.
13264
13265 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13266
13267         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
13268         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
13269
13270 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13271
13272         * object.c:
13273         (mono_print_unhandled_exception): after previous commit, i realized
13274         that MS calls ToString on the exception. I changed this function to
13275         do that. This way we get stack_trace for free.
13276
13277 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13278
13279         * object.c:
13280         (mono_print_unhandled_exception): invoke Message property instead of
13281         getting 'message' field from Exception. Don't allocate memory for
13282         'trace' and 'message' if not needed.
13283
13284 2002-08-18  Dick Porter  <dick@ximian.com>
13285
13286         * unicode.c: Fix asserts to match Encoder.cs checks
13287
13288 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13289
13290         * marshal.c: fix unaligned store issue and a few wrong
13291         opcode argument types.
13292
13293 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13294
13295         * icall.c: added GetUninitializedObjectInternal internal call.
13296
13297 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
13298
13299         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
13300         to the right domain.
13301
13302 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
13303
13304         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
13305
13306         * class.c (class_compute_field_layout): set blittable to false for Strings
13307
13308         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
13309
13310 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13311
13312         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
13313         first chunk of code to create types at runtime. Code to
13314         handle ReflectedType/DeclaringType. Make reflection handles
13315         domain specific.
13316
13317 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
13318
13319         * class.c: set correct name in arrays.
13320
13321 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
13322
13323         * appdomain.c (mono_domain_transfer_object): make it work with
13324         valuetypes. bug fixes.
13325
13326 2002-08-12  Dick Porter  <dick@ximian.com>
13327
13328         * object.h: Rename some parameters to avoid c++ keywords (Patch
13329         from Joseph Wenninger <kde@jowenn.at>)
13330
13331 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
13332
13333         * icall.c: added icall to implement Assembly.GetFile*.
13334
13335 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13336
13337         * reflection.h, reflection.c: code to embed managed resources.
13338
13339 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
13340
13341         * class.c: move all the type size stuff into
13342         class_compute_field_layout().
13343
13344 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13345
13346         * class.c: ensure enums have always the correct instance size.
13347         * unicode.c: remove wrong assert.
13348
13349 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
13350
13351         * assembly.c: fix mem corruption issue.
13352         * image.h, image.c: added mono_image_get_resource () to access
13353         managed resources.
13354         * icall.c: implemented Assembly.EntryPoint property and some
13355         Managed Resources related internalcalls.
13356
13357
13358 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13359
13360         * image.c, image.h: impemented mono_image_get_entry_point ().
13361         * appdomain.c: use mono_image_get_entry_point.
13362
13363 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13364
13365         * reflection.c: support the object type argument when loading
13366         custom attributes.
13367
13368 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
13369
13370         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
13371         String as return type.
13372
13373 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
13374
13375         * reflection.c: fix encoding of named args for custom attrs to match
13376         the ms implementation. Read them back when instantiating custom
13377         attributes.
13378
13379 2002-08-02  Radek Doulik  <rodo@ximian.com>
13380
13381         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
13382         by Dietmar as quick fix
13383         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
13384         16 as stack size, used on more places as quick fix before Dietmar
13385         will fix it properly
13386
13387 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13388
13389         * object.h, object.c: added accessors for fields and properties.
13390
13391 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13392
13393         * class.c, class.h: made mono_class_get_field_from_name ()
13394         loop on parent types.
13395         Added mono_class_get_property_from_name ().
13396
13397 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13398
13399         * class.c, class.h: move the code to setup the type vtable in its own
13400         function so that it can be reused also for types created at runtime.
13401         Eliminate the "class" identifier from the header file.
13402         * reflection.c: setup the vtable for enums so that we can create
13403         objects for use in SetConstant ().
13404
13405 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
13406
13407         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
13408         instead of the delegate itself as this pointer (bug #28383)
13409
13410 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
13411
13412         * marshal.c (mono_marshal_get_managed_wrapper): added return type
13413         conversions.
13414
13415 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13416
13417         * loader.c: don't set the pinvoke bit on icalls.
13418
13419 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
13420
13421         * debug-helpers.c (mono_method_full_name): only print a number to
13422         indicate wrapper type (so that the output is more readable in traces).
13423
13424 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
13425
13426         * class.c (mono_class_init): include method override patch from Paolo
13427
13428 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
13429
13430         * icall.c: fixed GetTypeCode().
13431
13432 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
13433
13434         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
13435         use real delegate invoke function to make it work with multicast
13436         delegates (fix bug# 28291).
13437
13438 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13439
13440         * object.c: load constant strings.
13441
13442 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
13443
13444         * reflection.c: no magic numbers.
13445         * tabledefs.h: security action enum.
13446
13447 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
13448
13449         * assembly.c: fix possible memory corruption.
13450
13451 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13452
13453         * reflection.h, reflection.c: added support for linking resources.
13454         * verify.c: check we have an updated corlib.
13455
13456 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
13457
13458         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
13459         string arrays.
13460         (mono_marshal_string_array): null terminate unmanaged string arrays.
13461         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
13462
13463 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13464
13465         * icall.c: Type.GetType () can now return also types from the
13466         calling assembly.
13467
13468 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
13469
13470         * loader.h, loader.c: stack walking support.
13471         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
13472         GetCallingAssembly.
13473
13474 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
13475
13476         * marshal.c: added optimisations for blittable types 
13477
13478         * class.c (mono_array_class_get): do not set blittable attribute on arrays
13479         (mono_class_setup_mono_type): set blittable attribute for single
13480         and double.
13481
13482         * marshal.c (mono_string_utf8_to_builder): impl.
13483         (mono_string_builder_to_utf8): impl.
13484         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
13485
13486 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
13487
13488         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
13489         (mono_marshal_get_managed_wrapper): impl. byref types
13490
13491 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13492
13493         * icall.c:
13494         (search_method): don't display debug message. 
13495
13496 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
13497
13498         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
13499
13500 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
13501
13502         * appdomain.c: set the missing filename when throwing exception.
13503
13504 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
13505
13506         * metadata.c (mono_type_size): code cleanup
13507         (mono_type_stack_size): removed some test code
13508
13509 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
13510
13511         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
13512         mono_get_exception_file_not_found now.
13513
13514         * exception.c (mono_exception_from_name_two_strings): New version
13515         that will call a constructor with two string arguments. 
13516         (mono_get_exception_file_not_found): New helper routine, used to
13517         report file-not-found errors.
13518
13519 2002-07-20  Dick Porter  <dick@ximian.com>
13520
13521         * process.h:
13522         * process.c: Pass file handles to CreateProcess
13523         
13524         * icall.c:
13525         * file-io.h:
13526         * file-io.c: Implemented CreatePipe
13527
13528 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
13529
13530         * metadata.c (mono_get_param_info): set alignment for value types
13531
13532 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13533
13534         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
13535         Constify mono_domain_assembly_open().
13536         * loader.c: handle null namespace in icalls.
13537
13538 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
13539
13540         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
13541         (emit_str_to_ptr_conv): marshal object as structs
13542
13543         * metadata.c (mono_type_to_unmanaged): marshal object as structs
13544
13545         * marshal.c (mono_marshal_get_runtime_invoke): support value types
13546
13547 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
13548
13549         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
13550         (mono_marshal_get_native_wrapper): we an now return value types
13551
13552 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13553
13554         * verify.c: more checks implemented.
13555
13556 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
13557
13558         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
13559         (fix bug #27695)
13560         (mono_marshal_get_native_wrapper): allow byref arguments
13561         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
13562         impl. PtrToStringXXX methods
13563         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
13564         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
13565         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
13566         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
13567         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
13568
13569 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13570
13571         * reflection.c: fix buglet in parsing an assembly name.
13572
13573 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
13574
13575         * marshal.c (emit_ptr_to_str_conv): first impl.
13576
13577 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
13578
13579         * object.c, class.h: cache the vtable in the class as suggested by
13580         vargaz@freemail.hu (Zoltan Varga).
13581
13582 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13583
13584         * class.h, loader.c: added mono_field_from_token().
13585         * verify.c: first cut of type checking code.
13586
13587 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
13588
13589         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
13590
13591 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
13592
13593         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
13594         (fix bug #27782)
13595         (mono_marshal_get_remoting_invoke): impl.
13596         (mono_delegate_begin_invoke): impl.
13597         (mono_mb_emit_save_args): impl.
13598         (mono_delegate_end_invoke): impl.
13599         (mono_marshal_get_delegate_begin_invoke):
13600         (mono_marshal_get_delegate_end_invoke):
13601         (mono_marshal_get_delegate_invoke): generate a special name for
13602         those methods (including the signature) and associate them whith
13603         the delegate class. 
13604
13605 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
13606
13607         * reflection.[ch]: 
13608         (mono_reflection_type_from_name): now it has a MonoImage parameter
13609         which is used as the default image to search the type in. If the image
13610         is NULL or getting the type from it fails, it defaults to corlib.
13611
13612         * icall.c: changed 1 call to mono_reflection_type_from_name to match
13613         new parameter.
13614
13615 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13616
13617         * reflection.c: update the parameter table index.
13618
13619 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13620
13621         * domain.c: don't include the mark byte in the string hash.
13622
13623 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13624
13625         * icall.cs: icall for Type.GetTypeCode ().
13626         * verify: a couple of fixes and disabled local initialization checks.
13627
13628 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
13629
13630         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
13631
13632         * debug-helpers.c (mono_method_full_name): print the type of the
13633         runtime wrapper
13634
13635         * metadata.c (mono_signature_hash): a hash function for signatures
13636         (mono_signature_hash): better hash algorithm
13637
13638         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
13639
13640         * debug-helpers.c (mono_method_full_name): this can now generate
13641         method names with signatures
13642
13643         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
13644         method dont have this pointers.
13645
13646 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
13647
13648         * reflection.c: fixup typebuilder tokens.
13649         * image.c: fix buglet.
13650         * marshal.h: remove whitespace.
13651         * metadata.h, metadata.c: reinstate code that was removed.
13652         * verify.c: handle catch directives and fix another couple of bugs.
13653
13654 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
13655
13656         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
13657         (mono_marshal_get_native_wrapper): make it comp. with the old code
13658         (mono_marshal_get_native_wrapper): support boolean
13659         (mono_marshal_get_managed_wrapper): support more types
13660
13661 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
13662
13663         * class.c (class_compute_field_layout): compute class->blittable attribute.
13664
13665 2002-07-09  Dick Porter  <dick@ximian.com>
13666
13667         * threads.c: Make the thread cleaning up cope with threads that
13668         call ExitThread()
13669
13670 2002-07-08  Radek Doulik  <rodo@ximian.com>
13671
13672         * reflection.c (method_encode_code): use non-translated values to
13673         compute finally_start, this fixes exception handling on ppc, yay!
13674
13675         * decimal.h (struct signscale): fix endianess
13676
13677 2002-07-07  Radek Doulik  <rodo@ximian.com>
13678
13679         * reflection.c: swap box_val and not val
13680
13681 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
13682
13683         * reflection.c, reflection.h: handle full assembly info in type name.
13684         Handle Type arguments when loading custom attributes.
13685         * icall.c: updated to use new mono_reflection_type_from_name () method.
13686
13687 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13688
13689         * loader.c:
13690         (method_from_memberref): also print assembly name when method not found.
13691
13692 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13693
13694         * icall.c:
13695         (ves_icall_TypeGetProperties): fixed bug #27473. 
13696
13697 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13698
13699         * reflection.c: display image name and token when cannot find the
13700         .ctor for an attribute.
13701
13702 2002-07-05  Martin Baulig  <martin@gnome.org>
13703
13704         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
13705
13706 2002-07-04  Dick Porter  <dick@ximian.com>
13707
13708         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
13709         compile on mingw.  This will cause mingw builds to not wait for
13710         subthreads to terminate after the main thread does.  I've lodged a
13711         bug with the mingw developers for them to wrap OpenThread().
13712
13713 2002-07-03  Dick Porter  <dick@ximian.com>
13714
13715         * threads.c: Store thread IDs instead of handles, because
13716         GetCurrentThread() returns a pseudohandle and therefore stores
13717         useless values.  mono_thread_cleanup() continues checking the
13718         array of threads until it is empty, to cope with subthreads
13719         spawning new threads after the main thread has finished.
13720
13721         * profiler.h:
13722         * profiler.c:
13723         * profiler-private.h: Pass the thread ID to thread profiler
13724         functions, instead of a handle
13725
13726 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
13727
13728         * verify.c: fixes to make it more usable.
13729         * pedump.c: added --verify code to verify IL code in an assembly.
13730
13731 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13732
13733         * reflection.c: turn errors into warnings to allow compiling corlib.
13734
13735 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
13736
13737         * reflection.c: add special cases to compile corlib.
13738
13739 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13740
13741         * reflection.c: handle properties with only a set method.
13742
13743 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
13744
13745         * opcodes.h: add enum with opcodes in opval order.
13746
13747 2002-07-01  Dick Porter  <dick@ximian.com>
13748         
13749         * object.h:
13750         * object.c (mono_runtime_run_main): Removed unneeded argument
13751
13752 2002-06-28  Martin Baulig  <martin@gnome.org>
13753
13754         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
13755
13756 2002-06-27  Dick Porter  <dick@ximian.com>
13757
13758         * threads.c: Store the handle in both the parent thread and in the
13759         subthread, to minimise the time between starting a new thread and
13760         storing its ID.
13761
13762 2002-06-26  Dick Porter  <dick@ximian.com>
13763
13764         * appdomain.c (mono_runtime_cleanup): Close the socket library
13765         after all the threads have finished, not before
13766
13767 2002-06-26  Martin Baulig  <martin@gnome.org>
13768
13769         * debug-symfile.c (mono_debug_find_source_location): Added
13770         `guint32 *line_number' argument.  If it's not NULL, store the line number
13771         there and return the file name without the line number.
13772
13773 2002-06-25  Dick Porter  <dick@ximian.com>
13774
13775         * icall.c:
13776         * process.h:
13777         * process.c: Process forking and other support functions
13778
13779 2002-06-25  Dick Porter  <dick@ximian.com>
13780
13781         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
13782         things dont happen when the image is closed.
13783         (mono_image_lookup_resource): Walk the resource section looking
13784         for a particular entry
13785
13786         * cil-coff.h: PE resource section decoding
13787
13788 2002-06-25  Dick Porter  <dick@ximian.com>
13789         
13790         * assembly.h:
13791         * assembly.c: 
13792         (mono_assembly_foreach): Accessor functions to walk the list of
13793         loaded assemblies
13794         (mono_assembly_set_main):
13795         (mono_assembly_get_main): Process methods need to know which
13796         assembly is the "main" one
13797
13798         * object.c (mono_runtime_run_main): Record the main assembly
13799
13800         * debug-helpers.c: Fix typo
13801
13802 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
13803
13804         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
13805         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
13806
13807 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13808
13809         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
13810
13811 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
13812
13813         * image.c (do_mono_image_open): Initialize reference count,
13814         otherwise we leak the MonoImage.
13815
13816 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13817
13818         * reflection.c: small tweak to handle self-hosting.
13819
13820 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13821
13822         * reflection.c: fix type name parse code.
13823
13824 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13825
13826         * reflection.c: break out of the loop.
13827         * image.c: special case corlib.
13828
13829 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13830
13831         * reflection.c: add all the custom attrs at the end to ensure the
13832         ctors have been properly initialized when the attributes are defined
13833         in the current assembly.
13834
13835 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13836
13837         * reflection.c: handle correctly multiple-nested types.
13838
13839 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
13840
13841         * row-indexes.h: fix typos.
13842         * reflection.c: adjust for typos and fix method_def_or_ref
13843         encoding in MethodImpl table.
13844
13845 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
13846
13847         * reflection.c: fix entry point patching (thanks Serge!).
13848
13849 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
13850
13851         * verify.c: add check for System.Exception
13852
13853 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13854
13855         * image.c, class.c: minifix for code just c&p'ed.
13856         * reflection.c: warning fix.
13857         * object.h, loader.h, domain.c: load also StringBuilder.
13858
13859 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13860
13861         * marshal.h, marshal.c: some support code to handle complex marshaling.
13862
13863 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13864
13865         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
13866         Better signatures with vtable error dump.
13867
13868 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
13869
13870         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
13871
13872 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
13873
13874         * icall.c (ves_icall_Type_GetField): impl.
13875
13876 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13877
13878         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
13879         to retrieve a marshal description blob for a field or param.
13880
13881 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13882
13883         * reflection.h, reflection.c: change order of nested type emission
13884         to avoid table corruption. The NestedTypes table is sorted.
13885         * icall.c: change order of GetConstructor results to workaround mcs bug.
13886
13887 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
13888
13889         * reflection.h, reflection.c: handle field and param marshal
13890         information.
13891
13892 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13893
13894         * icall.c, marshal.c marshal.h: more Marshal class implementation.
13895
13896 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13897
13898         * reflection.c: fix call convention.
13899
13900 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13901
13902         * reflection.h, reflection.c: mono_image_get_memberref_token()
13903         takes a type instead of a class, now. Added
13904         mono_image_get_array_token() to create tokens for the special
13905         multi-dim array methods.
13906
13907 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
13908
13909         * assembly.c: handle modules (no assembly table). Split
13910         loading references in its own function.
13911         * class.c: handle moduleref resolution scope.
13912         * image.c, image.h: cache module name in image.
13913
13914 2002-06-07  Martin Baulig  <martin@gnome.org>
13915
13916         * reflection.c (mono_image_get_type_info): Only add a class layout entry
13917         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
13918
13919 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13920
13921         * icall.c: more signature fixes that used uint instead of int.
13922
13923 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13924
13925         * reflection.c: fixed signature of field refs.
13926
13927 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
13928
13929         * class.c, reflection.c: handle typerefs of nested types
13930         (both on read and when writing files).
13931
13932 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
13933
13934         * icall.c: fix method signatures that tried to workaround the previous
13935         typo, d'oh!
13936
13937 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
13938
13939         * debug-helpers.c: fix typo.
13940
13941 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
13942
13943         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
13944         rewrote the PE/COFF writing code (our programs are understood by the
13945         ms runtime, now).
13946
13947 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13948
13949         * gc.c, gc.h, icall.c: weakreference support.
13950
13951 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13952
13953         * Makefile.am, mono-config.c: use $(sysconfdir).
13954
13955 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13956
13957         * icall.c: changed default precision of Double.ToString() to 15.
13958         Fixed memory leak. Unified with Single.ToString.
13959
13960 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
13961
13962         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
13963
13964 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13965
13966         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
13967         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
13968         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
13969         and myself.
13970
13971 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13972
13973         * debug-symfile.c, sysmath.c: yet more compilation fixes.
13974
13975 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13976
13977         * reflection.c, socket-io.c: more compilation fixes.
13978
13979 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13980
13981         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
13982         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
13983         unicode.c: warning and compiler compatibility fixes.
13984
13985 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13986
13987         * class.h, metadata.c: fixed warnings/compilation errors.
13988
13989 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13990
13991         * Makefile.am, mono-config.c, mono-config.h: configuration file
13992         support routines.
13993         * loader.c, loader.h: make Dll mapping configurable at runtime in the
13994         config file. Export methods to insert and lookup mappings.
13995
13996 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13997
13998         * reflection.c: handle types and boxed objects in custom attr
13999         constructors.
14000
14001 2002-05-30  Martin Baulig  <martin@gnome.org>
14002
14003         * debug-symfile.c
14004         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
14005
14006 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
14007
14008         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
14009         to lookup the implmap row for a P/Invoke method.
14010         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
14011         P/Invoke method from the runtime on an as needed basis.
14012
14013 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
14014
14015         * metadata.c (mono_metadata_parse_signature): impl.
14016
14017 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14018
14019         * class.c: handle .pack directive.
14020
14021 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14022
14023         * object.c: initialize static fields with RVA data.
14024
14025 2002-05-25  Martin Baulig  <martin@gnome.org>
14026
14027         * debug-symfile.c
14028         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
14029
14030 2002-05-24  Martin Baulig  <martin@gnome.org>
14031
14032         * debug-symfile.c
14033         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
14034         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
14035         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
14036
14037 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14038
14039         * object.c: special case string ctros in invoke.
14040         * gc.c: silly whitespace changes.
14041
14042 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
14043
14044         * threadpool.[ch]: impl. a threadpool that can
14045         be used by mint and mono.
14046
14047 2002-05-22  Martin Baulig  <martin@gnome.org>
14048
14049         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
14050         The first argument is now a `MonoReflectionModuleBuilder *', the return
14051         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
14052         `methods' field to get the method builder.  The `token' argument is the
14053         unfixed token.
14054
14055         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
14056         invalid characters instead of g_assert_not_reached()ing.  This seems
14057         to be the behaviour of mscorlib.
14058
14059 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
14060
14061         * object.c (mono_runtime_invoke_array): applied patch from Rachel
14062         Hestilow to fix bug #25104
14063
14064 2002-05-21  Martin Baulig  <martin@gnome.org>
14065
14066         * debug-symfile.c (mono_debug_find_source_location): New function.
14067         Looks up an IL offset in the line number table and returns the source
14068         location as a string.
14069
14070 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14071
14072         * icall.c:
14073         (mono_double_ToStringImpl): changed %f by %g until we have something
14074         better.
14075
14076 2002-05-21  Nick Drochak  <ndrochak@gol.com>
14077
14078         * icall.c : Use different name for Math.Pow's icall.  Needed to check
14079         parameters first in C#.
14080
14081 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14082
14083         * icall.c, reflection.h: added icall to get info about an event.
14084
14085 2002-05-20  Radek Doulik  <rodo@ximian.com>
14086
14087         * object.c (mono_value_box): don't use memcpy for boxing on BIG
14088         endian
14089         (mono_value_box): don't use memcpy for small sizes on
14090         architectures with unaligned access
14091
14092 2002-05-20  Martin Baulig  <martin@gnome.org>
14093
14094         * reflection.c (mono_reflection_setup_internal_class): Don't crash
14095         if `tb->parent == NULL'.
14096         (mono_reflection_create_internal_class): New function.  This is
14097         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
14098         for enum types.
14099
14100         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
14101         New interncall.
14102
14103 2002-05-19  Martin Baulig  <martin@gnome.org>
14104
14105         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
14106         argument to get the length, don't default to the array length.
14107
14108 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
14109
14110         * assembly.c (mono_assembly_setrootdir): New function used to
14111         override the MONO_ASSEMBLIES directory.
14112
14113 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14114
14115         * icall.c: ValueType_GetHashCode() initialize local var.
14116
14117 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14118
14119         * reflection.c: sort custom attributes table.
14120
14121 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14122
14123         * reflection.c: support named args in custom attributes (write support).
14124
14125 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
14126
14127         * reflection.c: fix finally position calculation.
14128
14129 2002-05-15  Radek Doulik  <rodo@ximian.com>
14130
14131         * reflection.c: fixed endianess at many places
14132
14133         * icall.c (ves_icall_InitializeArray): comment out debug msg
14134
14135 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
14136
14137         * object.c (mono_unhandled_exception): new function to handle
14138         unhandled exceptions.
14139         (mono_unhandled_exception): call the UnhandledException event.
14140         (mono_runtime_delegate_invoke): impl.
14141
14142 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
14143
14144         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
14145         returns the RVA, not the direct pointer to the data. Handle the case
14146         when the class size is fixed.
14147
14148 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14149
14150         * reflection.c: fix some endianess issues.
14151
14152 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
14153
14154         * object.c (mono_runtime_invoke): is now able to catch exceptions.
14155
14156         * threads.c (mono_thread_init): added a callback which is invoked
14157         at thread start.
14158
14159 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
14160         
14161         * icall.c: make GetHashCode return non-negative values.
14162
14163 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
14164
14165         * object.c, icall.c, gc.c: revert to address-based hashcode.
14166
14167 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
14168
14169         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
14170
14171 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14172
14173         * icall.c, class.c: special case <Module>.
14174
14175 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
14176
14177         * icall.c: fix bug in GetNow().
14178
14179 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
14180
14181         * object.c (mono_runtime_class_init): make sure that we call all
14182         static class constructors.
14183
14184 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14185
14186         * reflection.c: sort methodsemantics table.
14187
14188 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14189
14190         * reflection.h, reflection.c: honour init locals setting.
14191
14192 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
14193
14194         * icall.c: copied Double ToStringImpl for Single ToStringImpl
14195
14196 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14197
14198         * reflection.c: support ContructorBuilders in attribute blob creation.
14199
14200 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14201
14202         * reflection.c: some changes to build a binary that can be run
14203         directly in windows.
14204
14205 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
14206
14207         * loader.c: print a big message when an icall can't be found.
14208
14209 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14210
14211         * string-icalls.c: fix bug 24248.
14212
14213 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
14214
14215         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
14216         icall.c, reflection.h: separate assembly loading by pathname and by
14217         assembly name. Use the MONO_PATH env var to search for assemblies.
14218
14219 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14220
14221         * assembly.c, image.h: add some support for assemblies
14222         with multiple modules.
14223         * class.c, class.h: export mono_class_from_typeref().
14224         * loader.c: remove duplicated code and use mono_class_from_typeref(),
14225         instead.
14226
14227 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14228
14229         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
14230         documentation says (the ECMA one is correct).
14231
14232 2002-05-02  Dick Porter  <dick@ximian.com>
14233
14234         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
14235         Don't name the synchronisation mutex.
14236
14237 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
14238
14239         * rand.c
14240         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
14241         Make the prototypes match.
14242         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
14243         Same.
14244
14245         * icall.c
14246         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
14247         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
14248         all systems have tm.tm_zone, so use strftime() with %Z to print
14249         the timezone abreviation into a temp string.
14250
14251         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
14252         rather than mono_array_addr() on a MonoString on Big Endian
14253         machines.
14254
14255 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
14256
14257         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
14258         fix bug 24041
14259
14260 2002-04-30  Dick Porter  <dick@ximian.com>
14261
14262         * socket-io.c: Cope with SOCKET being an integer rather than a
14263         pointer now.
14264
14265         * threads.c: Added Thread_free_internal, to deal with thread
14266         handle cleanup.  Moved calls to handle_store() and handle_remove()
14267         to start_wrapper(), so each can only be called once.  Allocate
14268         synchronisation blocks with GC_malloc(), and use GC finalisation
14269         to close the handles.
14270
14271         * icall.c: added System.Threading.Thread::Thread_free_internal
14272
14273 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14274
14275         * icall.c: support Environment.Exit, CommandLineArgs().
14276
14277 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14278
14279         * object.c, object.h: added mono_runtime_run_main () and
14280         mono_runtime_get_main_args () for use in System.Environment.
14281
14282 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14283
14284         * gc.c: fix thinko, enable actual finalization since the jit is now
14285         fixed.
14286
14287 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14288
14289         * gc.c, object.c: take into account that an object may be offset wrt the address
14290         returned by GC_malloc().
14291
14292 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
14293
14294         * image.c: handle files without entries in the assembly table (modules).
14295
14296 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
14297
14298         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
14299         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
14300         allowed to be null when it's System.Object class setup.
14301
14302 2002-04-27  Martin Baulig  <martin@gnome.org>
14303
14304         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
14305         if `tb->parent == NULL' rather than crashing.
14306
14307 2002-04-28  Nick Drochak  <ndrochak@gol.com>
14308
14309         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
14310         calling acos() where asin() should have been called.
14311
14312 2002-04-26  Martin Baulig  <martin@gnome.org>
14313
14314         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
14315         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
14316         there's a subdirectory called `System', but we don't want to read that
14317         subdirectory as an assembly.
14318
14319 2002-04-25  Martin Baulig  <martin@gnome.org>
14320
14321         * debug-symfile.c: Reflect latest MonoString changes.
14322
14323 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14324
14325         * rand.c, rand.h: instance method icalls need to have an explicit
14326         this pointer as first argument in the C implementation.
14327
14328 2002-04-25  Nick Drochak <ndrochak@gol.com>
14329
14330         * icall.c: Fix typo in map for GetNonZeroBytes
14331
14332 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
14333
14334         * string-icalls.c : String does now passes unit tests without any 
14335         errors, the following changes has been made:
14336         
14337         Implemented replace methods.
14338         Renaming of methods to (try) follow the standard.
14339         Fixed compare ordinal
14340         Made all memory allocated directly to function instead of via icall function.
14341         Small performance fix in is_in_array function
14342                         
14343  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
14344
14345         c (mono_string_Internal_ctor_charp_int_int):
14346         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
14347         sindex < 0, throw ArgumentOutOfRangeException instead of
14348         ArgumentNullException.
14349
14350         Added new check for length == 0, however
14351         I need to make it return String.Empty from the C code.
14352         
14353         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
14354         that calculate the length for us here.
14355         
14356         (mono_string_Internal_ctor_sbytep_int_int): Replaced
14357         mono_string_new_utf16 with mono_string_new, since value is utf8.
14358
14359 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14360
14361         * object.c: register the object for finalization if needed.
14362         Allocate one more char in the string for the terminating 0 char.
14363
14364 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14365
14366         * class.c, class.h, image.c: check if a type implemenst a destructor.
14367         Use the proper key for array class lookups.
14368         * icall.c: register the icalls in the System.GC class.
14369         * gc.c, gc.h: GC-related functions and icalls.
14370
14371 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14372
14373         * icall.c:
14374         * socket-io.c:
14375         * unicode.c: free some strings gotten from mono_string_to_utf8 and
14376         changed a couple of free () by g_free ().
14377
14378         * decimal.c: one-liner in the comments for decimal2string ().
14379
14380 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
14381
14382         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
14383
14384 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
14385
14386         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
14387         * object.c (mono_runtime_invoke_array) : handle null in params
14388
14389 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
14390
14391         * string-icalls.c: fixed bug in split (one off bug)
14392
14393 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
14394
14395         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
14396         * icalls.c: added String::Equals as internal method
14397
14398 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
14399
14400         * threads.c: fixed bug in the double interlocked functions
14401
14402 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
14403
14404         * threads.c: implemented all of the new interlocked icalls.
14405         * string-icalls.c: fix a bug in insert.
14406         * icalls.c: added the icalls for interlocked, removed old string functions.
14407         
14408 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14409
14410         * loader.c: fix off-by-one error when reading argument names.
14411
14412 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14413
14414         * profiler.c: win32 counter implementation (untested).
14415         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
14416         (the latter needs testing and more complete impl. from win32 folks).
14417
14418 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
14419
14420         * object.c: mono_array_new_full workaround mono_array_class_get
14421         problem.
14422
14423 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
14424
14425         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
14426         * object.h (mono_string_chars): Changed casting type.
14427
14428 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
14429
14430         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
14431                            method signatures to use gunichar2 instead of gint16.
14432
14433 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
14434
14435         * object.h, object.c: domain-specific versions of mono_object_new and
14436         mono_array_new.
14437
14438 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
14439
14440         * object.c: changed String layout
14441
14442         * string-icalls.c (mono_string_Internal_ctor_chara): added
14443         internal string constructors.
14444
14445 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
14446
14447         * threads.c: pass 'this' to the thread start routine.
14448
14449 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14450
14451         * string-icalls.c: fix IndexOf and LastIndexOf. Now
14452         InternalCompareStr don't call twice mono_string_cmp_char for the last
14453         character. Improved performance in mono_string_cmp_char.
14454
14455 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14456
14457         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
14458         code into its own library: libmonoruntime.
14459
14460 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
14461
14462         * object.h, object.c: changed array format so that szarrays do not
14463         require a bounds structure.
14464         * icall.c, appdomain.c: support for new szarray format.
14465
14466 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
14467
14468         * metadata.c: compare also the retuns type when comparing signatures:
14469         we didn't do this as an optimization since really overloaded methods
14470         must differ also in the arguments, but this doesn't work with
14471         low-level IL code (or when using explicit conversion operators: see
14472         bug#23498 for an example).
14473
14474 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14475
14476         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
14477
14478 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14479
14480         * icall.c: make MonoType::GetElementType its own icall.
14481
14482 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14483
14484         * icall.c: remove MonoMethod_get_Name().
14485         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
14486         object.
14487
14488 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
14489
14490         * string-icalls.c: optimized a few methods.
14491
14492 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
14493
14494         * icall.c: added all new string internal calls
14495         * string-icalls.c: added, new string internal call implementation.
14496         * object.c: added mono_string_new_size for allocating a string a size
14497
14498 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
14499
14500         * object.c (mono_object_isinst): use the same code as in the
14501         optimized x86 version.
14502
14503 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14504
14505         * profiler.c: TSC-based timer code (faster and more accurate).
14506         Not hooked up in configure, yet (set USE_X86TSC to 1).
14507
14508 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
14509
14510         * profiler.c, profiler.h: track time spent compiling methods.
14511         * threads.c: track thread creation/destruction.
14512
14513 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
14514
14515         * profiler.c, profiler.h, profiler-private.h: profiling interface
14516         and sample implementation. Moved here so that it can be used also by
14517         the jit.
14518
14519 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
14520
14521         * reflection.c, reflection.h: keep types and other handles separate in
14522         the hash tables for referred tokens. Add guid for modules.
14523
14524 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14525
14526         * assembly.c: fix bugs found with valgrind.
14527         * metadata.h, metadata.c: added mono_metadata_guid_heap().
14528
14529 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
14530
14531         * threads: added icall support for getting current domain for
14532                    the thread.
14533  
14534 2002-04-13  Martin Baulig  <martin@gnome.org>
14535
14536         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
14537         (MonoDebugVarInfo): Added `index' field for register based addresses.
14538         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
14539         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
14540         `MonoDebugVarInfo *params' and `guint32 this_offset' with
14541         `MonoDebugVarInfo *this_var'.
14542
14543         * debug-symfile.c (relocate_variable): New static function to write
14544         a location description for a local variable or method parameter.
14545
14546 2002-04-12  Martin Baulig  <martin@gnome.org>
14547
14548         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
14549         stack offset and begin/end scope address of a local variable.
14550         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
14551         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
14552         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
14553
14554         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
14555         Added new relocation types for start/end scope of a local variable.
14556
14557 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14558
14559         * object.h: add mono_object_domain() macro.
14560         * reflection.c: handle typespecs.
14561         * icall.c: MonoMethod::get_Name() implementation.
14562
14563 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14564
14565         * icall.c: String::GetHashCode() icall implementation.
14566
14567 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14568
14569         * icall.c: String::IndexOfAny icall.
14570         * object.c, object.h: make array->max_length more useful.
14571         Intrduced mono_object_class() and mono_string_length() macros.
14572
14573 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14574
14575         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
14576         instead of g_unichar_isdigit.
14577
14578 2002-04-11  Nick Drochak  <ndrochak@gol.com>
14579
14580         * icall.c: Implement a simple Double.ToString().
14581
14582 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14583
14584         * appdomain.h: only io-layer.h is supposed to be included.
14585         * icall.c: explicitly import environ. Fix warning.
14586
14587 2002-04-10  Nick Drochak  <ndrochak@gol.com>
14588
14589         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
14590                 return true even if it's not Daylight Savings time.
14591                 Only return false for the case where the function isn't
14592                 implemented for a plaform (read Windows).
14593
14594 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14595
14596         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
14597         data with a mutex.
14598
14599 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
14600
14601         * mempool.c (mono_mempool_alloc): only use g_malloc when
14602         absolutely necessary.
14603
14604 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
14605
14606         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
14607
14608         * class.c (mono_class_vtable): use domain mempool to allocate vtable
14609         (mono_class_proxy_vtable): use domain mempool
14610
14611 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14612
14613         * appdomain.h, appdomain.c: split initialization that requires the
14614         execution engine support into mono_runtime_init().
14615
14616 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
14617
14618         * class.c (mono_class_init): don't include vtable inside MonoClass
14619         to save some memory, gather some statistics.
14620         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
14621
14622 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14623
14624         * icall.c: internalcall implementation for ValueType.Equals().
14625
14626 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
14627
14628         * object.c (mono_message_init): moved 
14629         (mono_runtime_exec_main): new arch. independent impl.
14630         (mono_runtime_invoke_array): new method - like
14631         mono_runtime_invoke, but you can pass an array of objects.
14632         (mono_remoting_invoke): new arch. independent impl.
14633         (mono_message_invoke): new arch. independent impl.
14634         (mono_runtime_class_init): new arch. independent impl.
14635         (mono_runtime_object_init): new arch. independent impl.
14636
14637 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14638
14639         * metadata.c, object.c, reflection.c: documented the exported
14640         functions.
14641
14642 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
14643
14644         * icall.c: simpler code to pass the assembly builder data to corlib.
14645         Implement GetNestedTypes() internalcall.
14646
14647 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14648
14649         * class.c: warn if a type can't be loaded.
14650
14651 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
14652
14653         * image.h: typedef MonoImageOpenStatus
14654         * types.h: removed unused file
14655         
14656 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
14657
14658         * icall.c: Enum_ToObject accepts enum value arguments.
14659
14660 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14661
14662         * class.c: move initialization of properties, events and nested
14663         classes, so that they happen for interfaces, too.
14664
14665 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14666
14667         * icall.c: cleanup some ugly casts in Array_SetValue*.
14668
14669 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14670
14671         * icall.c: the values array fro enums is of the correct type, now.
14672         Implement (correctly) getFullName instead of assQualifiedName for
14673         MonoType.
14674         * reflection.h, reflection.c: added mono_type_get_name ().
14675
14676 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14677
14678         * assembly.c, image.h: for each MonoImage, record from wich assembly
14679         it was loaded.
14680         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
14681         Make Type.Assembly work.
14682
14683 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
14684
14685         * debug-symfile.h: use char* instead of gpointer to avoid
14686         unnecessary casts.
14687
14688         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
14689
14690         * icall.c (ves_icall_InternalExecute): impl. FielSetter
14691         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
14692
14693 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
14694
14695         * icall.c (mono_message_init): impl. (code cleanup)
14696         (ves_icall_InternalExecute): impl. FieldGetter
14697
14698         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
14699         defined we call all (non-static)methods through the vtable. 
14700
14701 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
14702
14703         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
14704         finalizer even though the memory is still referenced (and the chunk of
14705         memory is not freed).
14706
14707 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
14708
14709         * assembly.c: fix brokeness.
14710
14711 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
14712
14713         * class.c: kill some warnings. Check explicit interface method
14714         implementation also without considering the namespace.
14715         Load also literal strings in static class data.
14716
14717 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
14718
14719         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
14720         (default_assembly_name_resolver): Make the resolver take the
14721         "base" directory where the assembly was originally defined, so we
14722         can load DLLs that are in the same directory as the assembly that
14723         is being referenced.
14724
14725 2002-03-28  Dick Porter  <dick@ximian.com>
14726
14727         * file-io.h: 
14728         * file-io.c:
14729         * socket-io.c: 
14730         * unicode.h: 
14731         * unicode.c: Warning cleanups
14732
14733 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
14734
14735         * object.h, reflection.h: use the correct type instead of MonoObject.
14736
14737 2002-03-28  Martin Baulig  <martin@gnome.org>
14738
14739         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
14740         (mono_debug_update_symbol_file): Initialize classes if necessary.
14741
14742 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
14743
14744         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
14745         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
14746
14747 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
14748
14749         * assembly.h: fix function prototype.
14750         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
14751         * mono-endian.h: use const cast.
14752
14753 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
14754
14755         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
14756
14757 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
14758
14759         * loader.c: don't assert when a typeref can't be loaded, give
14760         a chance to the runtime to trow an exception instead.
14761         * loader.h: fix warning.
14762
14763 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
14764
14765         * class.c (mono_class_proxy_vtable): added proxy support
14766
14767 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
14768
14769         * icall.c: removed last of PAL calls, added System.Environment
14770         * file-io.h, file-io.c: MonoIO implementation
14771         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
14772
14773 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
14774
14775         * appdomain.c: do not use the byte marker in ldstr table lookup.
14776         * debug-helpers.c: allow two ':' to separate class and method name.
14777         * object.c: allocate arrays bounds with the GC, too.
14778         * verify: add a few more checks.
14779
14780 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
14781
14782         * reflection.c: output also literal strings. Allocate parameter data
14783         with GC_malloc() (thanks, Martin, for catching this!).
14784
14785 2002-03-26  Martin Baulig  <martin@gnome.org>
14786
14787         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
14788         include the `this' offset in the `param_offsets'.
14789
14790 2002-03-25  Martin Baulig  <martin@gnome.org>
14791
14792         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
14793         mono_debug_get_class() function to get the classes. Added new
14794         relocation types for arrays and strings.
14795         (mono_debug_get_class): New static function to search in all
14796         referenced assemblies for a metadata token.
14797
14798         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
14799
14800 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14801
14802         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
14803         hold gc-allocated objects. Make the string heap a stream like the
14804         others. Removed duplicated code when writing stream info.
14805         Added asserts to catch possible buffer overflows. Set the sorted map
14806         for tables that need sorting. Added some documentation.
14807
14808 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
14809
14810         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
14811         for interned strings and vtables.
14812
14813 2002-03-24  Martin Baulig  <martin@gnome.org>
14814
14815         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
14816         it in the array since it was created with g_slist_prepend().
14817
14818 2002-03-24  Martin Baulig  <martin@gnome.org>
14819
14820         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
14821         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
14822         (mono_debug_method_from_token): Renamed to
14823         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
14824         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
14825
14826         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
14827         relocation types.
14828
14829         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
14830
14831 2002-03-24  Martin Baulig  <martin@gnome.org>
14832
14833         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
14834         (mono_debug_method_from_token): New func.
14835
14836         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
14837         New interncall, calls mono_debug_local_type_from_signature().
14838         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
14839         calls mono_debug_method_from_token().
14840
14841 2002-03-23  Martin Baulig  <martin@gnome.org>
14842
14843         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
14844         specifies the number of bytes to be converted, not the array size.
14845         Return the number of chars, not the number of bytes.
14846         (ves_icall_iconv_get_chars): The `byteCount' argument
14847         specifies the number of bytes to be converted, not the array size.
14848
14849 2002-03-23  Martin Baulig  <martin@gnome.org>
14850
14851         * reflection.h (MonoReflectionSigHelper): New type.
14852
14853         * reflection.c (mono_reflection_sighelper_get_signature_local),
14854         (mono_reflection_sighelper_get_signature_local): New functions.
14855
14856         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
14857         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
14858         interncalls.
14859
14860 2002-03-23  Martin Baulig  <martin@gnome.org>
14861
14862         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
14863         is_writeable is set.
14864         (mono_raw_buffer_update): New function to write the modified map
14865         back to disk.
14866
14867         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
14868
14869         * debug-symfile.c (mono_debug_update_symbol_file): Call
14870         mono_raw_buffer_update() when done writing.
14871
14872 2002-03-23  Martin Baulig  <martin@gnome.org>
14873
14874         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
14875
14876         * debug-symfile.c: Added support for arguments and local variables.
14877
14878 2002-03-23  Dick Porter  <dick@ximian.com>
14879
14880         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
14881         protected by ifdefs, hence breaking the w32 build.
14882
14883 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14884
14885         * object.c: implement is_interned() the right way.
14886
14887 2002-03-21  Martin Baulig  <martin@gnome.org>
14888
14889         * debug-symfile.[ch]: New files to handle debugging information
14890         files. There's also support to dynamically update these symbol
14891         files to include machine dependent information.
14892
14893 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
14894
14895         * threads.c (mono_thread_create): new function to create thread
14896         from C
14897
14898 2002-03-20  Martin Baulig  <martin@gnome.org>
14899
14900         * icall.c (ves_icall_InternalInvoke): Create a new object if the
14901         method is a constructor.
14902         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
14903         points to ves_icall_InternalInvoke().
14904
14905 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
14906
14907         * file-io.c: Flush shouldn't throw exceptions.
14908
14909 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
14910
14911         * file-io.c: FileStream flush support; FileSetLength now
14912         restores file pointer.
14913
14914 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
14915
14916         * class.c: set image for pointer classes.
14917
14918 2002/03/19  Nick Drochak <ndrochak@gol.com>
14919
14920         * sysmath.c: Forgot one.
14921
14922 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
14923
14924         * sysmath.c: Avoid redefining existing names.
14925
14926 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
14927
14928         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
14929         handled by runtime as icall rather than dllimport from libm.so
14930         * file-io.c, file-io.h: fixed handle argument type.
14931
14932 2002-03-18  Dick Porter  <dick@ximian.com>
14933
14934         * reflection.c (mono_image_get_type_info): rename interface to
14935         iface, because of "#define interface struct" on windows.
14936
14937 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
14938
14939         * class.c, class.h: rename and export mono_ptr_class_get().
14940         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
14941         * reflection.c, reflection.h, icall.c: better/saner type name
14942         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
14943         method signatures.
14944
14945 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
14946
14947         * class.c (mono_class_init): removed hardcoded GHC_SLOT
14948
14949         * icall.c (ves_icall_InternalInvoke): impl.
14950
14951 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14952
14953         * reflection.c: output the interface map table, too.
14954
14955 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
14956
14957         * class.c (class_compute_field_layout): separate computation of 
14958         static field layout
14959
14960 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
14961
14962         * icall.c: added System.Buffer support.
14963         * file-io.c: moved file icalls from PAL to FileStream.
14964
14965 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
14966
14967         * icall.c (ves_icall_System_Object_GetHashCode): impl.
14968
14969 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
14970
14971         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
14972
14973 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14974
14975         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
14976
14977 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
14978
14979         * debug-helpers.{c,h}: moved here from monograph some useful functions
14980         to locate a method by name/signature in a class or image. Included
14981         also a small and flexible IL disassembler.
14982
14983 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
14984
14985         * reflection.c: fixup tokens in methods with small header size, too.
14986
14987 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
14988
14989         * object.c (mono_string_to_utf8): remove assert(!error), instead
14990         print a warning. 
14991
14992 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
14993
14994         * icall.c: update to the new mono_Array_class_get interface.
14995
14996 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
14997
14998         * appdomain.c, object.c: Boehm-GC enable.
14999         * icall.c: make get_data_chunk() support split data requests.
15000         Ensure a class is initialized in more cases. Return only the first
15001         property found in GetProperties() or the compiler gets confused. 
15002         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
15003         * reflection.h, reflection.c: add fixup mechanism for field and method
15004         tokens. Initialize assembly->typeref in a single place. Output
15005         properties after events. Support custom attributes for events, too.
15006         Typo fix for paramter custom attrs.
15007
15008 2002-03-07  Martin Baulig  <martin@gnome.org>
15009
15010         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
15011
15012 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
15013
15014         * class.c (mono_array_class_get): fix. for multi. dim. arrays
15015
15016 2002-03-06  Martin Baulig  <martin@gnome.org>
15017
15018         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
15019         non-zero lower bounds. See testcases #F10-#F13.
15020
15021 2002-03-05  Martin Baulig  <martin@gnome.org>
15022
15023         * exception.c (mono_get_exception_argument_out_of_range): New exception.
15024
15025         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
15026         ves_icall_System_Array_GetValue(), only calculate the absolute array position
15027         here.
15028         (ves_icall_System_Array_SetValue): Likewise.
15029         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
15030         as argument and does the actual work. This function is used when copying a
15031         multi-dimensional array.
15032         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
15033         now do all the widening conversions of value types.
15034         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
15035
15036 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15037
15038         * class.c: remove some magic numbers and use the smbolic names,
15039         instead. Added init_events() to load event info at class init time.
15040         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
15041         and mono_metadata_methods_from_event().
15042         * reflection.h, reflection.c: added support for writing out the evnets
15043         related information.
15044
15045 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
15046
15047         * reflection.h, icall.c: use a different method (GetInterfaces)
15048         to gather interface info and add isbyref, isprimitive and
15049         ispointer to the ves_icall_get_type_info() return value.
15050
15051 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
15052
15053         * class.h: stared adding support for events.
15054         * icall.c: split find_members implementation. Added debug icall to get
15055         the address of an object.
15056         * reflection.c: handle TypeBuilders in mono_type_get_object().
15057
15058 2002-03-01  Martin Baulig  <martin@gnome.org>
15059
15060         * icall.c (ves_icall_System_Array_GetLength): This must throw an
15061         ArgumentOutOfRangeException(), not an ArgumentException().
15062         (ves_icall_System_Array_GetLowerBound): Likewise.
15063         (ves_icall_System_Array_GetValue): Improved argument checking.
15064         (ves_icall_System_Array_SetValue): Improved argument checking.
15065
15066 2002-03-01  Martin Baulig  <martin@gnome.org>
15067
15068         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
15069         called with invalid arguments rather than just dying with g_assert().
15070         (ves_icall_System_Array_SetValue): Likewise.
15071         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
15072         raise a NotImplementedException instead.
15073         (ves_icall_System_Array_GetLength): Added argument checking.
15074         (ves_icall_System_Array_GetLowerBound): Added argument checking.
15075
15076 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
15077
15078         * object.h (mono_assert): new macros mono_assert and
15079         mono_assert_not_reached
15080
15081 2002-02-28  Martin Baulig  <martin@gnome.org>
15082
15083         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
15084         and "System::String::IsInterned" to "System::String::_IsInterned".
15085
15086 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
15087
15088         * icall.c: remove hacks for typebuilder. Added icall to create a
15089         modified type from a tybebuilder.
15090         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
15091         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
15092         to create a backing MonoClass for a TypeBuilder.
15093
15094 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15095
15096         * class.c, class.h: more refactoring of class init.
15097         Export mono_class_setup_mono_type() and mono_class_setup_parent().
15098
15099 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
15100
15101         * marshal.c, marshal.h: start of marshaling interface.
15102
15103 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
15104
15105         * icall.c: fix order in assembly qualified name icall.
15106
15107 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
15108
15109         * class.c: do not free str, since we store it in the hash table.
15110         * reflection.h: add label field to MonoILExceptionInfo.
15111         * reflection.c: handle references to more than one assembly. Handle
15112         case when there isn't a module created in the assembly.
15113
15114 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
15115
15116         * class.c: Fix typo. Start refactoring of class init code.
15117
15118 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
15119
15120         * appdomain.c: exit with 1 on error.
15121         * class.c: we already have the name in MonoClassField.
15122         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
15123         MonoStreamHeader instead of an offset of image->raw_metadata.
15124
15125 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
15126
15127         * appdomain.c (mono_init): Be even more descriptive about the error.
15128
15129 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
15130
15131         * appdomain.c: give the user an informative message when corlib can't
15132         be loaded.
15133
15134 2002-02-26  Martin Baulig  <martin@gnome.org>
15135
15136         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
15137         New icall to get the time zone data.
15138
15139 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15140
15141         * reflection.c: set virtual and raw size of section correctly.
15142         * threads.c: transfer domain information to newly created threads.
15143
15144 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
15145
15146         * class.c: when instancing a class in a domain, load the default
15147         vaules for static fields from the constant table. Fix System.Enum to
15148         not be an enum.
15149         * icall.c: implement Object::GetType() internalcall. Implemented
15150         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
15151         Fixed checking of binding flags in find_members().
15152         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
15153         * reflection.c: handle enumerations when writing to the constant
15154         table. Use a different object cache for types.
15155
15156
15157 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
15158
15159         * object.c (mono_object_isinst): fix for arrays
15160
15161         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
15162
15163 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
15164
15165         * object.c: don't use mprotect ()  and fix intern pool hash table
15166         lookup for big endian systems.
15167
15168 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15169
15170         * icall.c: change type_is_subtype_of () signature.
15171
15172 2002-02-21  Mark Crichton  <crichton@gimp.org>
15173
15174         * rand.c, rand.h: Added random number generator for
15175         System.Security.Cryptography classes.
15176
15177         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
15178
15179         * icall.c: Added System.Security.Cryptography calls.
15180
15181 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15182
15183         * class.c, icall.c, metadata.c: better support for pointer types.
15184         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
15185         * reflection.c: Add support for getting custom attrs for properties
15186         and simplify some code.
15187
15188 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15189
15190         * icall.c: change getToken () and add custom attribute GetBlob()helper
15191         method.
15192         * reflection.h: add custom attrs array to the reflection builder structures.
15193         * reflection.c: encode and emit custom attributes for all the relevant
15194         reflection objects. Cache fieldref and methodref tokens. Change
15195         mono_image_create_token() interface to take a MonoDynamicAssembly.
15196         More complete custom attributes decoder. Load custom attributes for
15197         Assembly, Field, Method and Constructor objects, too. Make the
15198         returned array an Attribute[] one, not object[]. Added
15199         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
15200         custom attribute constructor.
15201
15202 2002-02-20  Dick Porter  <dick@ximian.com>
15203
15204         * icall.c:
15205         * rawbuffer.c:
15206         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
15207         problem code out for now).
15208
15209 2002-02-19  Radek Doulik  <rodo@ximian.com>
15210
15211         * object.c (mono_ldstr): use hash table to avoid multiple swapping
15212
15213 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
15214
15215         * icall.c: register the GetCustomAttributes method.
15216         * object.c, object.h: add mono_string_new_len ().
15217         * reflection.h, reflection.c: added mono_runtime_invoke(),
15218         mono_install_runtime_invoke(). Added
15219         mono_reflection_get_custom_attrs () to load custom attributes and
15220         create the attribute objects.
15221
15222 2002-02-19  Dick Porter  <dick@ximian.com>
15223         * threads-dummy-types.c:
15224         * threads-dummy-types.h:
15225         * threads-dummy.c:
15226         * threads-dummy.h:
15227         * threads-pthread-types.c:
15228         * threads-pthread-types.h:
15229         * threads-pthread.c:
15230         * threads-pthread.h:  Deleted obsolete files
15231
15232 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
15233
15234         * class.c (mono_class_vtable): runtime init the class when we
15235         allocate static class data.
15236
15237         * icall.c (ves_icall_System_Array_SetValue): check for null values.
15238
15239         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
15240         and String - but we will need generic marshalling support in the
15241         future. 
15242         (mono_init): set the domain name in a ms compatible way
15243
15244         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
15245         String[].
15246
15247 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
15248
15249         * object.c (mono_array_clone): use alloca() instead of g_malloc  
15250         for sizes
15251
15252         * appdomain.c (mono_domain_unload): impl.
15253
15254 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15255
15256         * appdomain.c, object.c: fix intern pool implementation.
15257         * class.c: fix alignment code.
15258
15259 2002-02-16  Radek Doulik  <rodo@ximian.com>
15260
15261         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
15262         and s2 > s1, just copy lower bytes to be compatible with little
15263         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
15264         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
15265
15266         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
15267         force big_endian to be 1 for big endian machines 
15268         (ves_icall_iconv_new_decoder): ditto
15269
15270 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
15271
15272         * socket-io.c (convert_sockopt_level_and_name): If the system
15273         doesn't define SOL_IP or SOL_TCP, get them by hand using
15274         getprotobyname() and caching the values (because this could be a
15275         slow operation).
15276         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
15277         Use the appropriate struct when the system does support it. Ie,
15278         not all systems have struct ip_mreqn so use struct ip_mreq when
15279         appropriate.
15280
15281 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
15282
15283         * reflection.c: handle finally clauses.
15284
15285 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
15286
15287         * socket-io.c: use g_snprintf() instead of snprintf.
15288
15289 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
15290
15291         * reflection.c (mono_param_get_objects): Cast second argument to
15292         mono_method_get_param_names to a const char** to silence the
15293         compiler warning.
15294
15295         * appdomain.c (mono_domain_assembly_open): Put parens around the
15296         truth statement in the for-loop.
15297
15298         * unicode.c (iconv_convert): Got rid of a compiler warning about
15299         int i being unused when the system has a new iconv.
15300         (iconv_get_length): Same.
15301
15302         * image.c (load_class_names): Cast the second argument to
15303         g_hash_table_insert() to char* to hush compiler warnings about the
15304         arg being a const.
15305         (mono_image_open): Same here.
15306
15307         * socket-io.c: Don't conditionally include sys/filio.h or
15308         sys/sockio.h here anymore since we now get them from
15309         io-layer/io-layer.h
15310         (inet_pton): If the system doesn't support inet_aton, implement
15311         using inet_addr and also #define INADDR_NONE if it isn't defined
15312         by the system.
15313
15314 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15315
15316         * metadata.c, metadata.h: added function to get packing and size info
15317         of a typedef.
15318         * reflection.h, reflection.c: handle field RVA data. Save info about
15319         the table layout if needed. Assign typedef indexes to all the types
15320         before dumping the info about them to avoid forward reference problems.
15321
15322 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
15323
15324         * socket-io.c (convert_sockopt_level_and_name): ifdef
15325         SO_ACCEPTCONN because it is not defined on my system (old debian)
15326
15327 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15328
15329         * opcode.c: use stddef.h to get NULL.
15330
15331 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
15332
15333         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
15334         for FIONBIO, FIONREAD and SIOCATMARK.
15335         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
15336         define INADDR_NONE and besides, inet_addr() is deprecated and
15337         should not be used. Use inet_pton() instead - it also has the
15338         added bonus that it can easily handle IPv6 addresses as well.
15339         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
15340
15341 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
15342
15343         * decimal.c: remove _MSC_VER conditional.
15344
15345 2002-02-13  Dick Porter  <dick@ximian.com>
15346
15347         * socket-io.c: 
15348         * icall.c: Internal calls for Blocking, Select, Shutdown,
15349         GetSocketOption and SetSocketOption
15350
15351 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15352
15353         * assembly.cs: better resolver: use it instead of some kludgy
15354         code.
15355
15356 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
15357
15358         * reflection.c: the best way to speed-up the compiler is to avoid
15359         infinite loops.
15360
15361 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
15362
15363         * class.c (mono_class_vtable): changed the object layout
15364         (obj->vtable->class). 
15365         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
15366
15367 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15368
15369         * assembly.c: look for assemblies in the assembly dir, too.
15370
15371 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15372
15373         * class.c: fix thinko in mono_class_from_type().
15374
15375 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15376
15377         * exception.h, exception.c: added TypeLoadException.
15378         * object.h, object.c: added mono_array_clone ().
15379         * icall.c: handle throwOnError in AssemblyGetType().
15380         Added Array.Clone().
15381         * opcode.h, opcode.c: use a single value for the opcode val.
15382         Compile fix for non-gcc compilers.
15383
15384 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
15385
15386         * opcodes.c, opcodes.h: export interesting info about opcodes.
15387
15388 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
15389
15390         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
15391         icalls. 
15392
15393         * class.c (class_compute_field_layout): set element_class for enums
15394         (mono_class_create_from_typedef): set element_class for normal classes
15395
15396         * icall.c (ves_icall_System_Enum_get_value): impl.
15397
15398         * class.c (mono_class_create_from_typedef): do not set valuetype
15399         flag for System.ValueType and System.Enum
15400
15401 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
15402
15403         * unicode.c (iconv_convert): fix big endian problem.
15404
15405 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15406
15407         * class.c: add asserts if we are ever going to scribble over memory.
15408         * socket-io.c: not all systems have AF_IRDA defined.
15409
15410 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
15411
15412         * class.c (class_compute_field_layout): do not consider static
15413         fields to compute alignment
15414
15415 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
15416
15417         * appdomain.c (mono_appdomain_get): impl.
15418         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
15419
15420 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
15421
15422         * icall.c: ignore "file://" prefix when loading an assembly.
15423
15424 2002-01-23  Dick Porter  <dick@ximian.com>
15425
15426         * socket-io.c:
15427         * icall.c:
15428         * Makefile.am: Added socket support
15429
15430 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
15431
15432         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
15433         code back.  This should return the assemblies that are loaded by
15434         the runtime on behalf of an application domain. 
15435
15436         The current implementation is still broken, it just returns every
15437         assembly loaded, but until we get real applications domain this
15438         will do.
15439
15440 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
15441
15442         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
15443         AppDomain object.
15444
15445 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
15446
15447         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
15448         the mono_class_from_name lookup.
15449         (ves_icall_get_parameter_info): ditto.
15450         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
15451         method.
15452         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
15453
15454 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15455
15456         * class.c: load also nested classes on class init.
15457         System.ValueType instance methods gets passed boxed
15458         values, unless methods in derived classed that get a pointer to the
15459         data.
15460         * icall.c: use better name parsing code in GetType().
15461         * image.c, image.h: add mono_image_loaded ().
15462         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
15463         * reflection.c, reflection.h: added mono_reflection_parse_type().
15464
15465 2002-01-22  Veronica De Santis <veron78@interfree.it>
15466
15467         * icall.c : Added mapping of internal calls for Manual and Auto reset events
15468         * threads.c : Added the implementation of internal calls for events
15469         * threads.h : Added prototypes of internal calls for events
15470         
15471 2002-01-21  Radek Doulik  <rodo@ximian.com>
15472
15473         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
15474
15475 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
15476
15477         * class.c (mono_class_init): set min_align to 1 (instead of 0)
15478         (mono_class_value_size): use min_align
15479
15480 2002-01-20  Dick Porter  <dick@ximian.com>
15481
15482         * threads.h:
15483         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
15484         so it compiles on w32.
15485
15486 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
15487
15488         * metadata.c (mono_type_stack_size): impl.
15489
15490         * class.c (mono_class_get_field): impl. memberref token
15491
15492 2002-01-16 Veronica De Santis <veron78@@interfree.it>
15493
15494         * icall.h : Added the internal calls mapping for CreateMutex_internal
15495                     and ReleaseMutex_internal.
15496         * threads.h : Added the prototype of mutexes internal calls.
15497         * threads.c : Added the implementations of mutexes internal calls.
15498
15499 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
15500
15501         * metaparse.h: removed unused file.
15502         * reflection.c, reflection.h: added stream_data_align () function 
15503         to align data in streams and keep stream aligned. Add support for
15504         exception support in method headers.
15505
15506 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
15507
15508         * unicode.c: make iconv_convert () return the number of bytess written
15509         in the output buffer.
15510
15511 2002-01-15  Dick Porter  <dick@ximian.com>
15512         * threads.c: Make the runtime's idea of infinite timeouts coincide
15513         with the class library's
15514
15515         Fix a particularly egregious bug in mono_thread_cleanup(). That
15516         code was so utterly bogus it must have been written on a Monday.
15517
15518 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
15519
15520         * reflection.h: add subtypes field to TypeBuilder.
15521         * reflection.c: encode constants for literal fields.
15522         Handle subtypes. Fix user string token (and add a zero byte)
15523         at the end.
15524         
15525 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
15526
15527         * class.c (mono_class_init): bug fix: assign slot numbers for
15528         abstract methods.
15529
15530 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15531
15532         * reflection.c: don't try to output a code RVA for abstract methods.
15533         Small fixes for method header format. Output parameter info to the
15534         ParamDef table. Save method overriding info to MethodImpl table.
15535         Fix property support. Allow typedef.extends to be a type in the
15536         building assembly.
15537         * verify.c: fix off-by-one error.
15538
15539 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
15540
15541         * class.c: fix mono_class_from_mono_type () for szarray types.
15542         Remove unused cache check in mono_class_from_type_spec().
15543         * icall.c: *type_from_name () functions handle simple arrays and byref.
15544         * reflection.c: handle byref and szarray types. Handle methods without
15545         body (gets P/Invoke compilation working). Handle types and fields in
15546         get_token ().
15547         * reflection.h: add rank to MonoTypeInfo.
15548
15549 2002-01-10  Dick Porter  <dick@ximian.com>
15550
15551         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
15552         internal calls
15553
15554 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
15555
15556         * icall.c: initialize class in type_from_handle ().
15557         Loop also in parent classes for get_method ().
15558         * reflection.c: properly encode class and valuetype types.
15559         Start on encoding TypeBuilder types. Handle fieldrefs.
15560         Use correct length when registering a user string.
15561         Handle ConstructorBuilder and MonoMethod in get_token ().
15562         Make mono_type_get_object () aware of cached types.
15563         * object.c: back out change to mono_string_new ().
15564
15565 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
15566         * object.c: mono_string_new should return a NULL when the string 
15567         passed in is NULL -- not try to deference it.
15568         
15569 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
15570
15571         * icall.c: hack to make IsSubType work for TypeBuilders.
15572         * reflection.c: emit constructors before methods.
15573         Retrieve param names in mono_param_get_objects().
15574
15575 2002/01/05  Nick Drochak  <ndrochak@gol.com>
15576
15577         * Makefile.am: fix list of headers and sources so automake 1.5
15578         doesn't complain. Removed \# at end of list.
15579
15580 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
15581
15582         * reflection.c: get token for a method ref. Set return type of
15583         constructor to void.
15584         * loader.c: debug message.
15585         * class.c: typo fix.
15586
15587 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
15588
15589         * icall.c: fix array init with rank > 1. FindMembers
15590         loops in parent class as well.
15591         * image.c: do not insert nested types in name cache.
15592         * reflection.c: warning fix.
15593         * reflection.h: add override method (for interface impl).
15594
15595 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
15596
15597         * metadata.c: fix customattr decoding.
15598
15599 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
15600
15601         * rawbuffer.cs: Added native Win32 implementation, avoids using
15602         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
15603
15604 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
15605
15606         * class.c: make the low-level routines handle the cache.
15607
15608 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
15609
15610         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
15611
15612 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
15613
15614         * class.c: fix mono_array_element_size() for objects.
15615         * class.h, class.c: add properties to MonoClass and load them
15616         at init time.
15617         * icall.c: check with isinst() when assigning a value to an array
15618         instead of requiring the classes to match exactly.
15619         Implemented icall for System.Type::GetType().
15620         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
15621         enums. Handle bindingflags when looking for methods and fields.
15622         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
15623         and mono_metadata_methods_from_property().
15624         * reflection.h, reflection.c: added structures for propreties,
15625         parameters and enums. Implemented mono_property_get_object() and
15626         mono_param_get_objects().
15627
15628 2001-12-18  Dick Porter  <dick@ximian.com>
15629
15630         * file-io.c: Use mono_string_to_utf16() instead of
15631         mono_string_chars()
15632
15633         * object.c: Added mono_string_to_utf16(), which copies the non
15634         NULL-terminated MonoString into a new double-null-terminated
15635         buffer.
15636
15637 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
15638
15639         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
15640
15641 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
15642
15643         * file-io.c: raise exceptions if handle is invalid.
15644
15645 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
15646
15647         * assembly.c: yet another check for mscorlib.
15648         * class.c, class.h: load nesting info for classes.
15649         * icall.c: many new functions to support the Reflection classes.
15650         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
15651         * reflection.h, reflection.c: mono_image_create_token(),
15652         mono_assembly_get_object(), mono_type_get_object(),
15653         mono_method_get_object(), mono_field_get_object(): methods to return
15654         objects that parallel the C representation of assemblies, types,
15655         methods, fields.
15656
15657 2001-12-11  Dick Porter  <dick@ximian.com>
15658
15659         * icall.c:
15660         * file-io.c: Internal calls for file IO.
15661
15662 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
15663
15664         * tabledefs.h: missing FileAttributes.
15665         * verify.h, verify.c: use is_valid_string () to simplify and check for
15666         valid strings more correctly. Fix warnings and speeling.
15667         Check more tables: Filed, File, ModuleRef, StandAloneSig.
15668         Check code: branches, maxstack, method calls.
15669
15670 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
15671
15672         * object.c (mono_object_allocate): removed static, so that the jit
15673         can allocate value types.
15674
15675         * icall.c (ves_icall_System_DateTime_GetNow): impl.
15676
15677 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15678
15679         * class.c: init enum types right away and register the
15680         token->MonoClass map in mono_class_create_from_typedef ().
15681         * verify.h, verify.c: first cut of the verifier.
15682         * pedump.c: add --verify switch to verify metadata tables.
15683         * tabledefs.h: add some missing enums.
15684
15685 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
15686
15687         * class.c (mono_install_runtime_class_init): impl.
15688         (mono_class_init): renamed mono_class_metadata_init to
15689         mono_class_init, also removed the metadata_inited flag
15690
15691         * object.c (mono_object_isinst): use faster algorithm
15692
15693 2001-11-30  Radek Doulik  <rodo@ximian.com>
15694
15695         * mono-endian.h: reverted last change
15696         added function prototypes
15697
15698         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
15699         add mono-endian.c back
15700
15701         * mono-endian.c: returned back, as Paolo pointed out, it's needed
15702         for unaligned access, I've mistaked it with endianess. I am
15703         sorry.
15704         (mono_read16): fix reverted endianess
15705         (mono_read64): ditto
15706         (mono_read32): ditto
15707
15708 2001-11-30  Dick Porter  <dick@ximian.com>
15709
15710         * exception.c: Implement mono_exception_from_name()
15711
15712 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
15713
15714         * metadata.h, metadata.c: remove params_size and locals_size and their
15715         calculation from the metadata code: they are only usefult to the
15716         interp.
15717
15718 2001-11-29  Radek Doulik  <rodo@ximian.com>
15719
15720         * object.c (mono_ldstr): swap bytes here, it's probably not the
15721         best place, but works for me now, I'll redo it once I know mono
15722         better, also note that I add PROT_WRITE and don't reset back, also
15723         note that it's only affects big endians, so x86 should be OK
15724
15725         * mono-endian.h (read16): use just glib macros for both endians
15726
15727         * mono-endian.c: removed as glib macros are used in in
15728         mono-endian.h so we don't need to care about endianess for read
15729         macros as glib does that for us already
15730
15731 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
15732
15733         * class.h, class.h: take minimum alignment into consideration so
15734         that the fields of a class remain aligned also when in an array.
15735
15736 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15737
15738         * loader.h, loader.c: add mono_method_get_param_names().
15739         * class.c: 0-init class fields.
15740
15741 2001-11-26  Dick Porter  <dick@ximian.com>
15742
15743         * icall.c:
15744         * threads-types.h:
15745         * threads.c: New file that handles System.Threading on all platforms
15746
15747         * object.c: 
15748         * object.h: Remove the synchronisation struct from MonoObject,
15749         replace it with a pointer that gets initialised on demand
15750
15751         * Makefile.am: Replace all the system-specific threading code with
15752         a single file that uses the new wrapper library
15753
15754 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
15755
15756         * class.c, class.h: add mono_install_trampoline() so that the runtime
15757         can register a function to create a trampoline: removes the ugly
15758         requirement that a runtime needed to export arch_create_jit_trampoline.
15759         * object.h, object.c: added mono_install_handler() so that the runtime
15760         can install an handler for exceptions generated in C code (with
15761         mono_raise_exception()). Added C struct for System.Delegate.
15762         * pedump.c: removed arch_create_jit_trampoline.
15763         * reflection.c: some cleanups to allow registering user strings and
15764         later getting a token for methodrefs and fieldrefs before the assembly
15765         is built.
15766         * row-indexes.h: updates and fixes from the new ECMA specs.
15767
15768 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
15769
15770         * class.h, class.c: add enum_basetype field to MonoClass.
15771         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
15772         to get index in the constant table reated to a field, param or
15773         property.
15774         * reflection.h, reflection.c: handle constructors. Set public-key and
15775         version number of the built assembly to 0.
15776         * row-indexes.h: update from new ECMA spec.
15777
15778 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
15779
15780         * class.h, class.c: add a max_interface_id to MonoClass.
15781         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
15782         since it's used to do that. Added mono_type_type_from_obj().
15783         Make GetType() return NULL instead of segfaulting if the type was not
15784         found. Handle simple arrays in assQualifiedName.
15785         * object.h: add a struct to represent an Exception.
15786         * reflection.c: output call convention in method signature.
15787         Add code to support P/Invoke methods and fixed offsets for fields.
15788
15789 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
15790
15791         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
15792         the value.
15793         * icall.c: use mono_array_addr instead of array->vector: fixes the
15794         reflection image writing.
15795         * reflection.c: init call convention byte to 0 in method signature.
15796         Encode the property signature. Don't output property-related methods
15797         twice. Really process the properties for a type (don't cast a field to
15798         a property, my mom always told me that).
15799         Fix 64 bit issues in pointer alignment in a different and more
15800         readable way.
15801
15802 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
15803
15804         * loader.h: Removed type class from MonoDefaults, added monotype
15805
15806         * loader.c: Loaded MonoType, removed loading of Type
15807
15808         * icall.c (my_mono_new_object): Now returns a System.MonoType,
15809         and fills in System.Type._impl with a RuntimeTypeHandle rather
15810         than the actual MonoClass *
15811
15812         (ves_icall_type_from_handle): change from type_class to
15813         monotype_class
15814
15815         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
15816         implemented
15817
15818         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
15819         implemented
15820
15821         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
15822
15823         (ves_icall_System_Reflection_Assembly_GetType): implemented
15824
15825         (ves_icall_System_MonoType_assQualifiedName): implemented
15826
15827         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
15828
15829 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
15830
15831         * assembly.c (mono_assembly_open): Implement a cache for the
15832         assemblies. 
15833
15834         (mono_assembly_close): only destroy the assembly when the last
15835         reference is gone.
15836         
15837 2001-11-09  Dick Porter  <dick@ximian.com>
15838
15839         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
15840
15841 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
15842
15843         * class.c (mono_class_metadata_init): bug fix: compute the right slot
15844
15845 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
15846
15847         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
15848         from Martin Weindel.
15849         * object.h: add mono_string_chars ().
15850
15851 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
15852
15853         * reflection.c (build_compressed_metadata): Eliminates warnings
15854         and uses 64-bit clean code.
15855
15856         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
15857         (mono_type_equal): Change signature to eliminate warnings.
15858
15859 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15860
15861         * icall.c, loader.c: remove the internalcall array constructors.
15862         Changes to match the new MonoArray structure.
15863         * object.h, object.c: an array object doesn't allocate an extra
15864         vector. Add mono_array_new_full () to create jagged arrays easily.
15865
15866 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
15867
15868         * metadata.h, metadata.c: add mono_metadata_field_info () to
15869         retreive all the info about a field from vairous tables.
15870         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
15871         * class.h, class.c: augment MonoClassField with more info.
15872         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
15873         policy and load a field's RVA if needed.
15874
15875 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
15876
15877         * class.c (mono_class_metadata_init): create a trampoline for all
15878         virtual functions instead of actually compiling them.
15879
15880 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
15881
15882         * class.h, class.c: include name in MonoClassField.
15883         * class.c: fix fundamental type of System.Object and System.String.
15884         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
15885         tokens in ldtoken.
15886         * icall.c: remove internalcalls for the Reflection stuff that is now
15887         done in C# code.
15888         * loader.c: mono_field_from_memberref () implementation.
15889         * mono-endian.c: thinko (s/struct/union/g).
15890         * object.c, object.h: make the mono_string_* prototypes actually use
15891         MonoString instead of MonoObject.
15892         * reflection.c, reflection.h: updates for changes in the reflection
15893         code in corlib: we use C structures that map to the actual C# classes.
15894         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
15895         fat method header if needed and use the info from the ILGenerator for
15896         methods. Handle fields in types. Misc fixes.
15897
15898 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
15899
15900         * class.c (mono_class_metadata_init): bug fix: always allocate
15901         space for static class data
15902
15903 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
15904
15905         * class.c (mono_compute_relative_numbering): use relative
15906         numbering to support fast runtime type checks.
15907
15908 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
15909
15910         * class.c (mono_class_create_from_typeref): added debugging output
15911         to print class name when MonoDummy is returned instead of real class
15912
15913 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
15914
15915         * class.c (mono_class_metadata_init): interface offset table now
15916         contains pointers into the vtable - this is more efficient for the jit
15917
15918 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
15919
15920         * class.c (mono_class_metadata_init): use a temporary vtable (the
15921         old algorithm only worked for the interpreter, but not for the jit)
15922
15923 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
15924
15925         * loader.c (method_from_memberref): use mono_class_get to get the
15926         class of an array instead of using System.Array directly.
15927         (mono_get_method): also add MEMBERREF methods to the method cache
15928         which usefull for arrays.
15929
15930 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
15931
15932         * pedump.c (arch_compile_method): added to compute vtable entry
15933
15934         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
15935         number of interfaces.
15936         
15937         * class.h: merged MonoArrayClass into MonoClass
15938
15939         * class.c (mono_class_create_from_typedef): compute the vtable size and
15940         allocate space to include the vtable inside MonoClass
15941         (mono_class_metadata_init): initialize the vtable
15942
15943 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
15944
15945         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
15946         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
15947         * image.c: endian fixes by Laurent Rioux.
15948         * object.h, object.c: rename MonoStringObject to MonoString and
15949         MonoArrayObject to MonoArray. Change some function names to conform to
15950         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
15951         guint16* as first argument, so don't use char*.
15952         Provide macros to do the interesting things on arrays in a portable way.
15953         * threads-pthread.c: updates for the API changes and #include <sched.h>
15954         (required for sched_yield()).
15955         * icall.c: updates for the API changes above.
15956         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
15957         platforms that need them.
15958
15959 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
15960
15961         * class.c: set the correct type for all the fundamental
15962         type when loading the class.
15963
15964 2001-10-05  Dick Porter  <dick@ximian.com>
15965
15966         * threads-pthread.c (pthread_mutex_timedlock): Simple
15967         compatibility version for C libraries that lack this call.
15968
15969 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
15970
15971         * class.c: MonoTypes stored in MonoClass are stored as
15972         fundamental MonoTypes when the class represents a
15973         fundamental type (System.Int32, ...).
15974         The TypeHandle return by ldtoken is a MonoType*.
15975         * icall.c: ves_icall_get_data_chunk () write out all the
15976         PE/COFF stuff. Implement ves_icall_define_method (),
15977         ves_icall_set_method_body (), ves_icall_type_from_handle ().
15978         * image.c: properly skip unknown streams.
15979         * loader.h, loader.c: add type_class to mono_defaults.
15980         * metadata.c, metadata.h: export compute_size () as
15981         mono_metadata_compute_size () with a better interface.
15982         Typo and C&P fixes.
15983         * pedump.c: don't try to print the entry point RVA if there is no entry point.
15984         * reflection.c, reflection.h: many cleanups, fixes, output method
15985         signatures and headers, typedef and typeref info, compress the metadata
15986         tables, output all the heap streams, cli header etc.
15987         * row-indexes.h: typo fixes.
15988
15989 2001-10-04  Dick Porter  <dick@ximian.com>
15990
15991         * object.h: Add a synchronisation mutex struct to MonoObject
15992
15993         * object.c (mono_new_object): Initialise the object
15994         synchronisation mutexes
15995
15996         * icall.c: System.Threading.Monitor internal calls
15997         
15998         * threads-pthread.h:
15999         * threads-pthread.c: System.Threading.Monitor internal calls
16000
16001         * threads-types.h: New file, includes the system-specific thread
16002         structures
16003         
16004         * threads-pthread-types.h:
16005         * threads-pthread-types.c: New files, handle pthread-specific
16006         synchronisation types
16007
16008         * threads-dummy-types.h: 
16009         * threads-dummy-types.c: New files of dummy support for
16010         thread-specific types
16011
16012         * metadata.c:
16013         * image.c:
16014         * pedump.c: include mono-endian.h not endian.h
16015         
16016         * Makefile.am: More threads files.
16017         Name mono-endian.h not endian.h
16018
16019 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
16020
16021         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
16022         stuff and implement a few more bits.
16023         * icall.c: a field needs to be dereferenced twice. Do not use the same
16024         name for two variables in the same scope.
16025         * image.c, image.h: cleanups.
16026
16027 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
16028
16029         * class.c (mono_class_metadata_init): bug fix: compute the right size
16030
16031 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
16032
16033         * icall.c: implemented some of the Reflection internalcalls.
16034         * image.c, image.h: start writing out the PE/COFF image.
16035         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
16036         that does the reverse than decode_blob_size ().
16037         * object.c: use mono_metadata_encode_value (). Move here
16038         temporary implementation of mono_string_to_utf8 ().
16039         * rawbuffer.c: make malloc_map static.
16040
16041 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16042
16043         * metadata.c: fix type comparison for arrays.
16044         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
16045         Added a couple of new classes to monodefaults.
16046         * icall.c: added a couple of Reflection-related internalcalls.
16047         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
16048         Added a byval_arg MonoType to MonoClass.
16049
16050 2001-09-28  Dick Porter  <dick@ximian.com>
16051
16052         * icall.c:
16053         * threads-pthread.h: 
16054         * threads-pthread.c: Implemented internal calls for
16055         LocalDataStoreSlot operations.  Applied mutexes around all shared
16056         data.  Reworked the thread creation and Start() operations to
16057         avoid a race condition.
16058         
16059         * threads-dummy.h:
16060         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
16061
16062 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
16063
16064         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
16065
16066 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
16067
16068         * class.c, loader.c: warn and return NULL instead of erroring out.
16069         * icall.c: added System.AppDomain::getCurDomain().
16070         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
16071
16072 2001-09-25  Dick Porter  <dick@ximian.com>
16073
16074         * threads-pthread.h:
16075         * threads-pthread.c: Implemented timed thread joining and added
16076         System.Threading.Thread::Join_internal internal call
16077
16078         * icall.c: Added System.Threading.Thread::Join_internal internal call
16079
16080         * threads-dummy.h:
16081         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
16082
16083 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
16084
16085         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
16086         mono_string_intern () to implement the semantics of the ldstr opcode
16087         and the interning of System.Strings.
16088         * icall.c: provide hooks to make String::IsIntern and String::Intern
16089         internalcalls.
16090
16091 2001-09-23  Dick Porter  <dick@ximian.com>
16092
16093         * threads-dummy.c: 
16094         * threads-dummy.h: New files of dummy threading routines
16095
16096         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
16097         support code based on system specifics
16098
16099         Rename PTHREAD_LIBS to THREAD_LIBS
16100         
16101 2001-09-23  Dick Porter  <dick@ximian.com>
16102
16103         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
16104         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
16105         internal calls.
16106         (mono_thread_init): Set up a Thread object instance to return when
16107         the main thread calls Thread.CurrentThread
16108         (mono_thread_cleanup): Wait for all subthreads to exit
16109
16110         * icall.c: New internal calls for System.Threading.Thread::Sleep
16111         (including Schedule) and CurrentThread
16112
16113         * threads.h: New file, to insulate thread-specific stuff from the
16114         rest of the code
16115
16116 2001-09-21  Dick Porter  <dick@ximian.com>
16117
16118         * threads-pthread.h: 
16119         * threads-pthread.c: New file, for handling pthreads-style
16120         threading support.  Start() now starts a new thread and executes
16121         the ThreadStart delegate instance.
16122
16123         * icall.c: Added the internalcall for
16124         System.Threading.Thread::Start_internal
16125
16126         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
16127
16128 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
16129
16130         * loader.c: work around the different signatures for delegates
16131         constructors csc generates in compiled code vs the ones compiled in mscorlib.
16132
16133 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
16134
16135         * class.h, class.c: add mono_class_get_field_from_name ().
16136         * *: Fix C comments and other ANSI C issues.
16137
16138 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
16139
16140         * endian.h, assembly.c: fix some endianness issues.
16141
16142 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
16143
16144         * loader.h, load.c: add delegate_class to mono_defaults.
16145         Handle runtime provided methods in mono_get_method ().
16146
16147 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
16148
16149         * loader.c (mono_get_method): use pinvoke for internal call
16150
16151         * icall.c: use pinvoke for internal call
16152
16153         * loader.c (method_from_memberref): set the method name
16154
16155 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
16156
16157         * metadata.c: help the compiler generate better code for
16158         mono_class_from_mono_type ().
16159
16160 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
16161
16162         * class.c (mono_class_metadata_init): delayed computing of the
16163         class size to mono_class_metadata_init ()
16164
16165 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
16166
16167         * class.c, class.h: add an interfaces member to MonoClass.
16168         * image.c, image.h: add assembly_name field to MonoImage
16169         from the assembly table.
16170         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
16171
16172 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
16173
16174         * class.c: Handle Array in mono_class_from_mono_type ().
16175         * metadata.c, pedump.c: some endian fixes.
16176
16177 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
16178
16179         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
16180         * metadata.c: fix small problem introduced with the latest commit.
16181
16182 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
16183
16184         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
16185         We don't need a MonoMetadata pointer anymore to compare signatures in
16186         mono_metadata_signature_equal (), update callers.
16187         Reduced memory usage an number of allocations for MonoMethodHeader and
16188         MonoMethodSignature.
16189
16190 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
16191
16192         * metadata.c: added compare for szarray.
16193
16194 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
16195
16196         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
16197         and add a couple more types to it and mono_defaults. Give an hint on
16198         classes that need implementing in our corlib and are referenced
16199         in mscorlib.
16200
16201 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
16202
16203         * class.h, class.c: keep track if a class is also an Enum.
16204         * loader.c: Implement a couple more types for use in libffi
16205         marshalling. Gives better diagnostics when failing to dlopen
16206         a library. Set method->klass for P/Invoke methods, too.
16207
16208 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
16209
16210         * class.c, class.h: add a MonoType this_arg to MonoClass that
16211         represents a pointer to an object of the class' type that
16212         can be used by the interpreter and later the type cache.
16213         Add best guess alignment info for valuetype objects.
16214
16215 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
16216
16217         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
16218         into MonoType: one less level of indirection and allocation and
16219         simplifies quite a bit of code. Added cache for MonoTypes that are
16220         used frequently, so that we don't need to allocate them all the time.
16221
16222 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
16223
16224         * class.c (mono_class_create_from_typedef): System.Enum is also a
16225         value type, although it does not derive from System.ValueType
16226         (maybe a bug in the ms compiler?)
16227
16228         * metadata.c (mono_type_size): return the right size for value types
16229
16230         * loader.c (mono_get_method): only initialize method header if not abstract
16231
16232         * class.c (mono_class_from_mono_type): use mono_default values. 
16233
16234 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
16235
16236         * *: use MonoClass pointers instead of <type_tokens>
16237         
16238         * class.h: new flag: metadata_inited.
16239
16240         * class.c (mono_class_metadata_init): impl.
16241         (mono_class_instance_size): impl.
16242         (mono_class_data_size): impl.
16243
16244 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16245
16246         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
16247         MonoClass now has the name and name_space fields. 
16248         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
16249         mono_get_method () takes and optional MonoClass as argument.
16250         Removed mono_typedef_from_name() and added mono_class_token_from_name()
16251         instead that takes advantage of a map from class names to typedef
16252         tokens in MonoImage.
16253
16254 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
16255
16256         * metadata.c: zero is not a valid alignment boundary.
16257         Merge MONO_TYPE_VOID in default decoding code.
16258
16259 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
16260
16261         * image.h: merged MonoMetadata into MonoImage
16262
16263         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
16264         identify the type of elements.
16265
16266 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
16267
16268         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
16269         * cil-coff.h: split MonoMSDOSHeader and add size info.
16270         * image.c: add some consistency checks.
16271         * metadata.c: fix row size computation: one programmer
16272         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
16273         add explanation for the locator routine.
16274         Fix decoding of size in method header.
16275         
16276 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
16277
16278         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
16279         (g_concat_dir_and_file): Bring g_concat_dir_and_file
16280         function from gnome-libs.  This uses the right path separator
16281         based on the OS, and also works around a bug in some systems where
16282         a double slash is not allowed. 
16283         (default_assembly_name_resolver): Use g_concat_dir_and_file
16284         (mono_assembly_open): ditto.
16285
16286 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
16287
16288         * metadata.c (mono_metadata_signature_equal): impl.
16289
16290         * *: void is now a realy MonoType (instead of using NULL)
16291         
16292         * metadata.c (do_mono_metadata_parse_type): use
16293         mono_metadata_parse_type to parse void value.
16294
16295 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
16296
16297         * metadata.c, metadata.h: in the signature and method header store
16298         only the space required for holding the loca vars and incoming arguments.
16299
16300 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
16301
16302         * metadata.c (do_mono_metadata_parse_type): treat void like any
16303         other type (instead of assigning NULL);
16304
16305 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
16306
16307         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
16308
16309 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
16310
16311         * image.c (do_mono_image_open): added a cache for arrays.
16312
16313 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
16314
16315         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
16316         decode a single column from a row in a metadata table and changes
16317         to take advantage of it in the typedef locator (gives a nice speed up).
16318         Store offset info for function params.
16319
16320 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
16321
16322         * image.h (MONO_IMAGE_IS_CORLIB): removed 
16323
16324 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
16325
16326         * assembly.c: how could mono_assembly_close () had ever worked?
16327         * metadata.c, metadata.h: provide offset info for local vars.
16328         Implement mono_type_size () to take care of alignment as well
16329         as size (it was mono_field_type_size in cli/class.c before).
16330
16331 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
16332
16333         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
16334
16335         * assembly.h (CORLIB_NAME): set to corlib.dll
16336
16337         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
16338
16339 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
16340
16341         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
16342         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
16343         tokentype.h: massive namespace cleanup.
16344
16345 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
16346
16347         * metadata.h, metadata.c: decode exception clauses when parsing method header.
16348
16349 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
16350
16351         * metadata.c (mono_metadata_free_type): added check for type !=
16352         NULL (void) before calling mono_metadata_free_type()
16353
16354 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
16355
16356         * metadata.h, row_indexes.h: added header with enumerations to use
16357         to index in the columns from tables in metadata and to decode coded
16358         tokens: we should start using this instead of embedding magic numbers
16359         all over the code.
16360
16361 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
16362
16363         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
16364         Move metadata_t info from cli_image_info_t to MonoImage, where
16365         it's easily accessible. Changed all the uses accordingly.
16366         Added the method and class caches to MonoImage.
16367         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
16368         and mono_metadata_decode_value () signature to be more consistent
16369         with the other parse functions (and simplify code). Taken advantage
16370         of zero-length array allocation with GCC. Removed reduntant (and
16371         wrong) MonoFieldType struct and use MonoParam instead. Changed
16372         mono_metadata_parse_field_type () to use common code for parsing.
16373         Added mono_metadata_typedef_from_field () and
16374         mono_metadata_typedef_from_method () to lookup a typedef index from a
16375         field or method token.
16376         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
16377
16378 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
16379
16380         * metadata.c (mono_metadata_parse_field_type): Implement. 
16381         (do_mono_metadata_parse_type): Split engine from
16382         mono_metadata_parse_type, so that we can create smaller structures
16383         for things that just have one pointer to the MonoType (look at
16384         the MonoFieldType)
16385
16386 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
16387
16388         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
16389         as Jan Gray found out, it is incorrect. 
16390
16391 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
16392
16393         * assembly.c: Implement asssembly loading.  This loads an image
16394         and loads all the referenced assemblies.  Come to think of it, we
16395         could always do lazy loading of the assemblies. 
16396
16397         * image.c (mono_image_open): Keep loaded images in a hashtable.
16398
16399         * image.h (MonoImage): Add reference count.
16400
16401 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
16402
16403         * assembly.c (mono_assembly_open): Keep track of the file name in
16404         case the assembly has no ASSEMBLY table.
16405
16406         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
16407         from get.c here.
16408
16409 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
16410
16411         * metadata.c, metadata.h: decode local vars in method header
16412         parse function. Change callers accordingly.
16413
16414 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
16415
16416         * metadata.h, cil-coff.h: protect against multiple inclusion.
16417         Added some new structures to hold information decoded from metadata:
16418         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
16419         and relevant decoding/free functions.
16420         * metadata.c: implement decoding functions. Add warning for out of bounds
16421         index in mono_metadata_locate(). Implement mono_get_method () to retreive
16422         all the info about a method signature and invocation. Remove check on
16423         uninitialized local var in parse_mh() and fix memory leak.
16424
16425 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
16426
16427         * metadata.h: More macros.
16428
16429         * tokentype.h: New file.
16430
16431 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
16432
16433         * assembly.c: added a consistency check and initialize
16434         some structures with g_new0().
16435         * metadata.c: fixed a couple more bugs in table size computation
16436         and add other checks for out-of bound access to metadata.
16437
16438 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
16439
16440         * metatada.c: fix bugs computing table sizes. Spew a
16441         warning when index in string heap is out of bounds.
16442
16443 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
16444
16445         * metadata.h: Add a couple of macros to manipulate tokens. 
16446
16447 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
16448
16449         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
16450         cli_section_tables).
16451
16452 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
16453
16454         * metadata.c (mono_metadata_user_string): New function, provides
16455         access to the UserString heap. 
16456
16457 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
16458
16459         * metadata.c: Add inline documentation.
16460
16461 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
16462
16463         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
16464         files. 
16465
16466 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
16467
16468         * typeattr.h: New file, TypeAttribute flags. 
16469
16470 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
16471
16472         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
16473         mono_assembly_ensure_section): Section loading code.
16474         (load_section_tables): Load the sections.
16475
16476         * mono/metadata/metadata.c (mono_metadata_locate_token,
16477         mono_metadata_locate): Functions to locate the information
16478         definition given a token or a table and an index.
16479         (mono_metadata_compute_table_bases): New.
16480         (compute_size): New function to compute the sizes of the various
16481         tables.
16482
16483         * mono/metadata/metadata.h: Finish listing the different index
16484         types. 
16485
16486         * mono/metadata/pedump.c: Improve to dump new information.
16487
16488 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
16489
16490         * mono/metadata/metadata.c: Entered all the tables matching
16491         Beta2. 
16492
16493         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
16494
16495