2005-09-13 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
2
3         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
4         return a success/failure indication.
5         (mono_metadata_interfaces_from_typedef_full): Ditto.
6         (get_constraints): Ditto.
7
8 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9
10         * marshal.c (emit_marshal_array): Fix handling of null arrays.
11         
12         * marshal.c (emit_marshal_array): Add support for returning string
13         arrays from delegates. Fixes #76063.
14
15         * marshal.c: Use the emit_ldloc/stloc macros where possible.
16
17 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
18
19         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
20         icall.
21
22 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
23
24         * reflection.c icall.c: Fix after mono_get_exception_type_load
25         signature change.
26
27         * assembly.c (mono_assembly_get_assemblyref): New helper function.
28         (mono_assembly_load_reference): Use the new helper.
29
30         * class-internals.h (MonoLoaderError): New structure containing 
31         information about type loading errors.
32
33         * class-internals.h loader.c: Add APIs to store per-thread loader
34         error information.
35
36         * loader.c class.c: Set the loader error if needed.
37
38         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
39
40 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
41
42         * decimal.c: fixed to handle the broken ARM fp format.
43
44 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
45
46         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
47         broken.
48
49 2005-09-06  Martin Baulig  <martin@ximian.com>
50
51         * domain.c (supported_runtimes): Added v2.0.50727.
52
53 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
54
55         * culture-info.h: reduce the size of some structures.
56
57 2005-09-05  Martin Baulig  <martin@ximian.com>
58
59         Reflect latest API changes in the August CTP.
60
61         * icall.c
62         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
63         ("MonoType.HasGenericArguments"): Removed.
64         ("MonoMethod.BindGenericParameters"): Renamed to
65         "MakeGenericMethod".
66         ("MethodBuilder.BindGenericParameters"): Renamed to
67         "MakeGenericMethod".    
68
69 2005-09-05  Martin Baulig  <martin@ximian.com>
70
71         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
72
73 2005-09-05  Martin Baulig  <martin@ximian.com>
74
75         Applying a patch from Michal Moskal <malekith@nemerle.org>.
76
77         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
78         generic_container is non-NULL.
79
80 2005-09-05  Martin Baulig  <martin@ximian.com>
81
82         Applying a patch from Michal Moskal <malekith@nemerle.org>.
83
84         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
85
86 2005-08-29  Michal Moskal  <malekith@nemerle.org>
87
88         * reflection.c (encode_locals,
89         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
90         for large generic types.
91
92 2005-09-05  Martin Baulig  <martin@ximian.com>
93
94         Applying a patch from Michal Moskal <malekith@nemerle.org>.
95
96         * class.c (mono_dup_array_type): New public method.
97         (mono_metadata_signature_deep_dup): New public method.
98         (dup_type): Correctly duplicate array and function types.
99
100 2005-09-05  Martin Baulig  <martin@ximian.com>
101
102         Applying a patch from Michal Moskal <malekith@nemerle.org>.
103
104         * reflection.c (get_default_param_value_blobs): Handle generic types
105         and generic methods.
106
107 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
108
109         * class.c: Fixed error reporting (method/class were inversed) for 
110         inheritance demands.
111         * security-manager.c|h: Added the AppDomain when calling the managed
112         System.Security.SecurityManager.InheritanceDemand method.
113
114 2005-09-01  Raja R Harinath  <rharinath@novell.com>
115
116         * reflection.c (encode_marshal_blob): 'marshaltype' and
117         'marshaltyperef' are alternate sources for the custom marshaler
118         name.
119
120 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
121
122         * class.c: fix creation of array classes with rank == 1
123         (patch by Ankit Jain <jankit@novell.com>).
124
125 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
126
127         * object.c: fix check for creating the bound data for arrays vs
128         szarrays.
129
130 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
131
132         * object.c: configuration file name is now based on the executable name,
133         not the image name. Fixes bug #75931.
134
135 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
136
137         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
138         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
139
140 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
141
142         * rand.c: Use wincrypt.h instead of WinCrypt.h.
143
144 2005-08-24  Ankit Jain  <jankit@novell.com>
145             Raja R Harinath  <rharinath@novell.com>
146
147         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
148           called by it recursively.
149           (mono_class_init): Remove special case in pending_init handling, since it's
150           superseded by the fix to mono_class_from_typeref.
151
152 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
153
154         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
155         BROKEN_THREAD_START stuff.
156
157 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
158
159         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
160         trampoline.
161
162         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
163         
164         * object.c (mono_delegate_ctor): Replace the original function address with
165         a delegate trampoline.
166
167 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
168
169         * icall.c: add boolean argument to base64_to_byte_array and 
170         InternalFromBase64String to control whether a whitespace-only string
171         is allowed (or should casue a FormatException to be thrown). We need
172         this as the behavior has changed between MS.NET 1.x and 2.0, and we
173         to match the MS behaviour in both profiles.
174         * appdomain.c: Bump corlib version.
175
176 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
177
178         This patch implements a big portion of publisher policy
179         support, used to bind assembly versions and redirect
180         one assembly from version A to version B.
181
182         * assembly.c:
183         New GSList loaded_assembly_bindings, for storing the cached
184         assembly bindings.
185         (assembly_binding_maps_name): New static function for checking if a 
186         assembly binding information maps an assembly name.
187         (mono_assembly_binding_info_free): New function for freeing
188         assembly binding information resources.
189         (get_publisher_policy_info): New static function for retrieving 
190         assembly binding information from a MonoImage.
191         (compare_versions): New static function for comparing an assembly
192         binding information data and the version of an assembly name.
193         (check_policy_versions): New static function for checking if an
194         assembly binding info mapping an assembly name is valid for it.
195         (mono_assembly_load_publisher_policy): New static function for
196         loading the 'policy.major.minor.MyAssembly' image for an assembly
197         with an assembly name 'aname'.
198         (mono_assembly_bind_version): New static function for updating
199         assembly redirection.
200         (mono_assembly_apply_binding): New static function for applying
201         assembly binding.
202         (search_binding_loaded): New static function for searching 
203         loaded assembly binding infos in the cache domain.
204         (mono_assembly_load_full): Don't apply assembly binding for
205         reflection only assemblies.
206
207         * metadata-internals.h: Add MonoAssemblyBindingInfo,
208         which contains information about assembly binding. Also
209         declare signature for mono_config_parse_publisher_policy ()
210         function, used to retrieve pub policy info.
211         
212         * mono-config.c:
213         (publisher_policy_start): New static function used to parse publisher 
214         policy config files.
215         (publisher_policy_parser): New static MonoParseHandler containing 
216         the functions used when parsing config files.
217         (mono_config_parse_publisher_policy): New function for parsing
218         publisher policy files.
219         
220 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
221
222         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
223
224         * marshal.c (mono_delegate_free_ftnptr): Ditto.
225
226         * object.c (mono_get_addr_from_ftnptr): New helper function.
227
228         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
229
230         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
231
232 2005-08-19  Dick Porter  <dick@ximian.com>
233
234         * threads.c, threads.h, appdomain.c, appdomain.h,
235         profiler-private.h, monitor.c, object.c, object-internals.h,
236         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
237         store the thread ID, so it can hold a 64 bit value if needed.
238
239 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
240
241         * reflection.c (mono_reflection_create_dynamic_method): Store the
242         handle class into the method references as well so ldtoken works in
243         dynamic methods.
244
245         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
246         types.
247
248 2005-08-19  Ankit Jain <jankit@novell.com>
249
250         Fix #75847.
251         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
252           here rather than using the method signature of a arbitrary function
253           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
254           two arguments.
255           Hack done with Harinath.
256
257 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
258
259         * threadpool.c: disable printing stack traces when we get a exception
260         in a threadpool thread. I need to do more testing to figure out which
261         cases actually print this. Fixes bug #75828.
262
263 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
264
265         * icall.c: there might be ignored whitespace after the last '='. This
266         fixes length computation and bug #75840.
267
268 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
269
270         * assembly.c (mono_assembly_load_full): Consider .exe extension as
271         well. Fixes #75809.
272
273         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
274         #75784.
275         
276         * reflection.c (create_custom_attr_data): Ditto.
277
278 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
279
280         * locales.c, culture-info.h : removed RegionLCIDMap.
281         * culture-info-tables.h : regenerated.
282
283 2005-08-16  Martin Baulig  <martin@ximian.com>
284
285         * class.c (mono_type_get_name_recurse): Small fix.
286
287 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
288
289         * locales.c : indentation fixie.
290
291 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
292
293         * object-internals.h,
294           locales.h,
295           locales.c,
296           culture-info.h,
297           icall.c : added RegionInfo table support.
298         * culture-info-table.h : regenerated for region support.
299
300 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
301
302         * reflection.c (resolve_object): handle all kinds of MonoMethod
303         including generic ones
304
305 2005-08-12  Ankit Jain <jankit@novell.com>
306
307         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
308           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
309
310 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
311
312         * process.c: Don't close a thread handle when it's NULL. This is a
313         workaround for bug #75733.
314
315 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
316
317         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
318
319 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
320
321         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
322
323 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
324
325         * threadpool.c: if a work item in the thread pool has a callback that
326         catches a exception, don't propagate it after invoking the callback.
327         Fixes bug #75336.
328
329 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
330
331         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
332
333         * class-internals.h (MonoCachedClassInfo): Add some new fields.
334
335         * class.c (mono_class_init): Load field info lazily in the AOT case.    
336
337         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
338
339 2005-08-03  Ankit Jain  <jankit@novell.com>
340
341         Fix #75683.
342         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
343           PInvoke calling convention is 0.
344
345 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
346
347         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
348         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
349
350 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
351
352         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
353         to handle threads not started by the GC (patch by Michael Meeks
354         <michael.meeks@novell.com>).
355
356 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
357
358         * reflection.c: Make buffer used in emitting types larger for some
359         big generic types (patch by Michal Moskal).
360
361 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
362
363         * mono-debug.c: Fix some (not all) alignment problems.
364
365 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
366
367         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
368         Invoke mono_image_load_from_data_full passing the refonly
369         parameter.
370
371         * assembly.c
372         (mono_assembly_open_from_bundle): Add the refonly argument, 
373         in order to pass it to other methods it calls to.
374         (do_mono_assembly_open): Add the refonly argument, in order 
375         to pass it to other methods it calls to.
376         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
377         the refonly parameter to it.
378
379         * image.c: Add loaded_images_refonly_hash and
380         loaded_images_refonly_guid_hash to cache the reflection
381         only loaded images.
382         (mono_images_init): Initialize the hash tables used for
383         caching the reflection only images.
384         (load_modules): Invoke mono_image_open_full passing the refonly
385         parameter to load the modules the correct way.
386         (build_guid_table): Add the refonly argument, to re-build the 
387         correct hash table.
388         (do_mono_image_open): Added the refonly argument, in order to
389         define it for the loaded image.
390         (mono_image_loaded_full): New function, which receives an
391         additional parameter to look for the image in the refonly or
392         non-refonly section.
393         (mono_image_loaded): Updated, using mono_image_loaded_full.
394         (mono_image_loaded_by_guid_full): The same case that happens
395         with mono_image_loaded_full.
396         (mono_image_loaded_by_guid): Likewise.
397         (register_image): Use the ref_only variable inside MonoImage
398         to decide in which hash table store the current image.
399         (mono_image_open_from_data_full): Rename
400         mono_image_open_from_data to mono_image_open_from_data_full,
401         adding the refonly argument, to define the ref_only variable 
402         inside MonoImage.
403         (mono_image_open_from_data): Return 
404         mono_image_open_from_data_full.
405         (mono_image_open_full): Rename mono_image_open to
406         mono_image_open_full, receiving the new refonly argument,
407         to pass it to inner methods.
408         (mono_pe_file_open): Update this function, to open
409         a MonoImage as a non-refonly image.
410         (mono_image_close): Use the refonly variable inside
411         MonoImage to remove the image from the correct caches.
412
413         * image.h: Add the signatures of mono_image_open_full,
414         mono_image_open_from_data_full, mono_image_loaded_full,
415         mono_image_loaded_by_guid_full.
416
417         * metadata-internals.h: Add the ref_only field to 
418         MonoImage.
419         
420 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
421
422         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
423         Fix the last behavior, which used to load the assemblies and
424         extract MonoReflectionAssemblyName information, instead of
425         extract it from the metadata tables. Needed for Reflection
426         Only assemblies.
427         
428 2005-07-29  Martin Baulig  <martin@ximian.com>
429
430         * mono-debug-debugger.c
431         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
432         not initialized.
433
434         * mono-debug.c
435         (mono_debug_address_from_il_offset): Check whether we have
436         debugging support before attempting to take the lock.
437         (mono_debug_source_location_from_address): Likewise.
438         (mono_debug_source_location_from_il_offset): Likewise.
439         (mono_debug_il_offset_from_address): Likewise.
440         (mono_debug_address_from_il_offset): Likewise.
441
442 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
443
444         * class.c (mono_class_from_name_case): Add support for dynamic images.
445         Fixes #75650.
446
447         * object.c (mono_class_compute_gc_descriptor): Add a workaround
448         for #75479.
449
450 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
451         
452         * reflection.c (mono_method_get_object): Fix warning.
453
454 2005-07-28  Martin Baulig  <martin@ximian.com>
455
456         * mono-debug.c
457         (mono_debug_add_wrapper): Also write the wrapper type.
458
459 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
460
461         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
462         
463         * class.c (mono_class_init): Avoid reading nested classes if the AOT
464         data indicates the class has none.
465
466 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
467
468         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
469         loader lock with the debugger lock. Prevents deadlocks for beagle.
470
471         Beagle can now run on an smp box for a weekend without any
472         issues. Woohoo!
473
474 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
475
476         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
477         in a module. Fixes #75629.
478
479 2005-07-26  Martin Baulig  <martin@ximian.com>
480
481         * mono-debug.c (mono_debug_add_wrapper): New static method.
482         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
483         interncall or a wrapper.
484
485         * mono-debug.h (MonoDebugWrapperData): New public typedef.
486         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
487         (MONO_DEBUGGER_VERSION): Bump to 51.
488
489         * mono-debug-debugger.c
490         (mono_debugger_add_type): Removed this empty function.
491         (mono_debugger_add_method): Likewise.
492
493 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
494
495         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
496         before accessing method->slot.
497
498 2005-07-21  Jb Evain  <jbevain@gmail.com>
499
500         * reflection.c (method_encode_clauses/class): Handle filters clauses.
501         Fixes #75010.
502
503 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
504
505         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
506         #75587.
507
508 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
509
510         * image.h image.c: Add mono_image_get_guid () API function.
511
512 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
513
514         There were issues when multiple threads tried to load
515         assemblies. A deadlock was created between assemblies_mutex and
516         mono_domain_assemblies_lock. This fixes the issue by making the
517         assembly ref counting be lock free. See bug 75586.
518         
519         * image.c (mono_image_close): The add ref function here was using
520         Interlocked operations while the unref was using a mutex and a
521         --. I don't think this was ever a bug that would be exposed in a
522         non-pendantic way (ie, by an embedder doing a ref on one thread
523         and an unref on another), but for the sake of correctness, this is
524         now Interlocked.
525
526         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
527         (mono_assembly_load_reference): Call mono_assembly_addref rather
528         than touching the refcount ourselves.
529         (mono_assembly_close): Use InterlockedDecrement to unref the
530         assembly. Don't acquire the lock unless it is actually needed.
531
532 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
533
534         * class.c (mono_class_layout_fields): Fix calculation of has_references
535         for generic types.
536
537 2005-07-12  Martin Baulig  <martin@ximian.com>
538
539         Applying a patch from Michal Moskal <malekith@nemerle.org>.
540
541         * metadata.c
542         (mono_type_hash): Provide better hashing for generic instances.
543         (mono_generic_inst_hash): Improve hashing.
544         (mono_generic_class_hash): Likewise.
545
546         * reflection.c (mymono_metadata_type_hash): Improve hashing for
547         generic instances.
548
549 2005-07-12  Martin Baulig  <martin@ximian.com>
550
551         * reflection.c (mono_reflection_create_runtime_class): Remove the
552         hack for generic type definitions and non-`Run' assemblies.
553         (mono_reflection_bind_generic_parameters): Also use
554         `klass->wastypebuilder' to check for TypeBuilders.
555
556 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
557
558         * class.c (mono_class_layout_fields): Fix calculation of has_references
559         for generic types.
560
561         * class.c (inflate_generic_class): Fix a leak.
562         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
563         for generic types.
564
565 2005-07-11  Martin Baulig  <martin@ximian.com>
566
567         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
568         on error.
569
570 2005-07-11  Martin Baulig  <martin@ximian.com>
571
572         * loader.c (find_method): Also lookup in
573         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
574
575 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
576
577         * appdomain.c (mono_domain_unload): Don't free the error message
578         before passing it to mono_get_exception_...
579
580         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
581         
582 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
583
584         * threads.c: try to better guess an available RT signal (bug #75387).
585
586 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
587
588         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
589         and CACHE_OBJECT.
590
591 2005-07-07  Martin Baulig  <martin@ximian.com>
592
593         * class.c (mono_type_get_name_full): Return NULL for
594         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
595         fixes #75408.
596
597 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
598
599         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
600         exit the appdomain as well being aborted.
601
602         * threadpool.c: Create all threadpool threads inside the root appdomain, and
603         change back to the root domain after calling managed code. This enables
604         appdomains using threadpools to be unloaded.
605
606 2005-07-07  Martin Baulig  <martin@ximian.com>
607
608         * class-internals.h
609         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
610         into `MonoDynamicGenericClass' since we only need it for dynamic
611         types.
612
613         * reflection.c (mono_class_bind_generic_parameters): We don't need
614         to compute the `parent' here.
615
616 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
617
618         * culture-info-table.h : regenerated.
619
620 2005-07-06  Martin Baulig  <martin@ximian.com>
621
622         * icall.c
623         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
624
625         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
626
627 2005-07-06  Martin Baulig  <martin@ximian.com>
628
629         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
630         we're doing a signature-only comparision; fixes #74945.
631
632 2005-07-06  Martin Baulig  <martin@ximian.com>
633
634         * class-internals.h (MonoGenericClass): Moved some things out into
635         a new `MonoInflatedGenericClass' type.  
636         (MonoInflatedGenericClass): New type; the `klass' of a
637         `MonoGenericClass' is now computed lazyly in
638         mono_get_inflated_generic_class().      
639
640         * class.c (mono_get_inflated_generic_class): New public function.
641         (mono_class_inflate_generic_method): Removed the unused
642         `MonoClass *' argument.
643         (setup_generic_vtable): Don't call mono_get_inflated_method() on
644         all the methods.
645         (mono_class_create_generic): Make this static and merge it with
646         mono_class_create_generic_2(); we're now called automatically from
647         mono_get_inflated_generic_class().
648
649         * loader.c (mono_method_signature): Call
650         mono_get_inflated_method() here.
651
652 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
653
654         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
655         type of fields with RVA.
656
657         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
658         for this pseudo class.
659         (my_mono_class_from_generic_parameter): Likewise.
660         (mono_class_init): Allow interfaces to have cctors.
661
662 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
663
664         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
665         lazily for AOT methods.
666
667 2005-07-05  Martin Baulig  <martin@ximian.com>
668
669         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
670         returns FALSE for a successful match, not TRUE.
671
672 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
673
674         * loader.c (mono_method_get_index): Optimize this a bit.
675
676 2005-07-04  Martin Baulig  <martin@ximian.com>
677
678         * class.c
679         (class_compute_field_layout): Move the check for generic type
680         definitions into mono_class_layout_fields().  Fixes #74684.
681         (mono_class_from_generic_parameter): Correctly compute
682         `klass->parent'; fixes #75457.
683
684         * reflection.c (register_assembly, register_module): Make sure
685         `domain->rejobject_hash' is already created.
686
687 2005-07-02  Martin Baulig  <martin@ximian.com>
688
689         * class-internals.h
690         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
691         `MonoDynamicGenericClass'.      
692
693 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
694
695         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
696         returned by a field getter is null, since null is a valid value.
697
698 2005-07-01  Martin Baulig  <martin@ximian.com>
699
700         * reflection.c (mono_reflection_generic_class_initialize): Update
701         the `dgclass->fields [i].parent' to the correct class.
702         (mono_image_get_fieldref_token): Use the declaring type, not the
703         reflected type.
704
705 2005-07-01  Martin Baulig  <martin@ximian.com>
706
707         * loader.c (find_method): Also look in the interfaces; fixes #75429.
708
709 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
710
711         * threads.c (thread_cleanup): assert that thread != NULL
712         (wait_for_tids_or_state_change): We were using the wrong variable
713         when accessing wait->threads. `i' was always out of the bounds of
714         the array.
715
716 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
717
718         * loader.c: map user32 and kernel32 to libMonoSupportW
719
720 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
721
722         * appdomain.c (unload_thread_main): Mark this as WINAPI.
723
724 2005-06-28  Martin Baulig  <martin@ximian.com>
725
726         * loader.c (method_from_methodspec): Fix #75334.
727
728 2005-06-28  Martin Baulig  <martin@ximian.com>
729
730         Fix #74953 - Arrays now implement the generic IList<T> interface
731         on the 2.0 platform.
732
733         * class-internals.h (MonoDefaults): Added `generic_array_class'.
734
735         * reflection.c (mono_class_bind_generic_parameters): New public
736         function; similar to mono_reflection_bind_generic_parameters(),
737         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
738
739         * domain.c (mono_init_internal): Try to initialize.
740         `mono_defaults.generic_array_class' here; this'll only succeed if
741         we're using the 2.0 corlib.
742
743         * icall.c
744         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
745         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
746         (mono_lookup_internal_call): Added support for nested classes.
747
748         * loader.c
749         (mono_get_method_from_token): Set `result->signature->pinvoke' if
750         we're an interncall and have generic arguments.
751
752         * class.c
753         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
754         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
755         instance of System.Array.InternalArray<T> for arrays, so they
756         implement the generic IList<T> interface.
757
758 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
759
760         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
761         (chastamar@yahoo.com). Fixes #75374.    
762
763 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
764
765         * culture-info-table.h: regenerated.
766
767 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
768
769         * icall.c: handle spaces correctly for base64 strings.
770
771 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
772
773         * *.c: Kill some warnings.
774
775 2005-06-23  Duncan Mak  <duncan@novell.com>
776
777         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
778         that this builds on Solaris 10 (x86).
779
780 2005-06-23  Martin Baulig  <martin@ximian.com>
781
782         * class.c
783         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
784         generic type definitions.
785
786 2005-06-23  Martin Baulig  <martin@ximian.com>
787
788         Fix #75331.
789
790         * metadata.c (mono_class_get_overrides): Renamed to
791         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
792         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
793         pass it to mono_get_method_full().
794
795 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
796
797         * reflection.c (mono_reflection_create_runtime_class): take the
798         mono_domain_lock in this method. Prevents deadlocks
799
800 2005-06-22  Martin Baulig  <martin@ximian.com>
801
802         * loader.c (method_from_methodspec): Fix #75330.
803
804 2005-06-22  Martin Baulig  <martin@ximian.com>
805
806         * reflection.c (type_get_qualified_name): Use
807         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
808         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
809         argument; use it if we don't have an assembly name.
810
811 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
812
813         * object.c: In mono_message_init, set "copy out" flag for in
814         parameters with the [Out] flag.
815
816 2005-06-21  Martin Baulig  <martin@ximian.com>
817
818         * class.c
819         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
820         and MONO_TYPE_PTR.
821
822 2005-06-21  Martin Baulig  <martin@ximian.com>
823
824         * class.c (mono_class_init): Don't initialize `class->fields' for
825         generic instances since they're initialized again in
826         compute_field_layout(). 
827         (compute_field_layout): Set the field's `generic_info' here; fix
828         #75320. 
829
830 2005-06-21  Martin Baulig  <martin@ximian.com>
831
832         * class-internals.h
833         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
834
835         * metadata.c (mono_metadata_generic_method_equal): Also
836         distinguish the `generic_class'; fixes #75334.
837
838 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
839
840         * domain.c:
841         * appdomain.c:
842         * domain-internals.h:
843         * reflection.c: 'domain_assemblies' field is now protected by its own
844         lock. Don't call into managed code to run the AssemblyLoad event if we
845         now there are no registered delegates for it.
846
847 2005-06-20  Martin Baulig  <martin@ximian.com>
848
849         * class.c (mono_class_is_assignable_from): Use a custom version of
850         mono_class_has_parent() to make things work for generic instances;
851         fix #75300.
852
853 2005-06-20  Martin Baulig  <martin@ximian.com>
854
855         * loader.c (method_from_methodspec): Apply a patch from
856         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
857
858 2005-06-20  Martin Baulig  <martin@ximian.com>
859
860         * class.c (mono_class_init): Reverted Zoltan's last change; it
861         breaks generics.
862
863 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
864
865         * threads.c (wait_for_tids_or_state_change): Add missing locking.
866
867 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
868
869         * socket-io.c: fix the index in the socket array for writable/error
870         sockets. Fixes bug #75306.
871
872 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
873
874         * class.c (mono_class_init): Allow interfaces to have static ctors.
875
876 2005-06-17  Martin Baulig  <martin@ximian.com>
877
878         * loader.c (method_from_methodspec): Use `context->container' when
879         parsing the `gmethod->inst'.
880
881 2005-06-17  Martin Baulig  <martin@ximian.com>
882
883         * class.c (mono_type_get_name_recurse): Don't add the assembly
884         name for type arguments.
885
886 2005-06-15  Martin Baulig  <martin@ximian.com>
887
888         * reflection.c (mono_image_get_inflated_method_token): Encode
889         correct klass; fixes #75260.
890
891 2005-06-13 Michal Moskal <malekith@nemerle.org>
892
893         * icall.c: Make GetCorrespondingMethod/Constructor take
894         MonoReflectionMethod method not MonoMethod. Removed
895         MonoType.GetCorrespondingField, and make
896         MonoGenericType.GetCorrespondingField take name not
897         MonoClassField.
898
899 2005-06-13  Michal Moskal <malekith@nemerle.org>
900
901         * reflection.c (field_encode_signature, encode_locals):
902          Make sizes of buffers for types larger (for big generic types).
903          (create_generic_typespec,
904          mono_reflection_sighelper_get_signature_local,
905          mono_reflection_sighelper_get_signature_field):
906          Add asserts for too small buffers.
907
908 2005-06-15  Martin Baulig  <martin@ximian.com>
909
910         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
911         if our parent is not a dynamic type.
912
913 2005-06-15  Martin Baulig  <martin@ximian.com>
914
915         * class-internals.h (MonoTypeNameFormat): New enum.
916
917         * class.c
918         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
919         (mono_type_get_full_name): Removed.
920         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
921         argument instead of the boolean's.
922
923         * icall.c (ves_icall_System_MonoType_getFullName):
924         Added `gboolean assembly_qualified'.    
925
926         * reflection.h
927         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
928
929         * reflection.c (mono_reflection_parse_type): Parse the new type
930         name format.
931
932 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
933
934         * icall.c: no need to convert from utf16 to utf8 and then back again
935         after the call to GetLogicalDrives.
936
937 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
938
939         * icall.c: frombase64. Fix problems exposed by new tests.
940
941 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
942
943         * icall.c: added internal calls for converting char [] and strings in
944         base64 into byte [].
945
946 2005-06-10  Martin Baulig  <martin@ximian.com>
947
948         * class.c (mono_class_create_generic_2): Read the nested classes
949         from the metadata rather than from `gklass->nested_classes' since
950         `gklass' might not be initialized yet.
951
952 2005-06-09  Duncan Mak  <duncan@novell.com>
953
954         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
955         all public headers. Fixes #74919.
956
957 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
958
959         * domain.c: The key for proxy_vtable_hash is now a pointer
960         array. Added new GHashFunc and GCompareFunc functions for this.
961
962         * class.h: The list of interfaces in MonoRemoteClass is known in
963         advance and can't grow (we create a new MonoRemoteClass if needed),
964         so now the interface array can be allocated together with
965         MonoRemoteClass.
966         
967         * object.c: Added a new method create_remote_class_key.
968         Fixed mono_remote_class so it does not depend on
969         mono_upgrade_remote_class.
970         Removed extend_interface_array.
971         Added new method clone_remote_class(), which makes a copy of a remote
972         class and adds a new interface or class to it.
973         mono_upgrade_remote_class() now creates a new remote class (or gets
974         it from the cache) if an vtable upgrade is needed. In this way
975         we make sure that other objects sharing the same remote class
976         don't get the new vtable with unwanted interfaces.
977         
978         * object-internals.h:
979         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
980         
981         * marshal.c: Track changes in mono_upgrade_remote_class().
982
983 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
984         * icall.c: Add runtime methods for obtaining members of inflated
985         class, which were created from supplied non-inflated members. It
986         is used in internal Get{Method,Constructor,Field} methods in
987         System.Type
988
989 2005-06-09  Martin Baulig  <martin@ximian.com>
990
991         * reflection.c
992         (mono_reflection_bind_generic_method_parameters): Fix #75169.
993
994 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
995         * reflection.c (mono_image_basic_init): Define
996         Version in MonoDynamicAssembly. 
997         
998 2005-06-08  Martin Baulig  <martin@ximian.com>
999
1000         Fix #75136.
1001
1002         * loader.c
1003         (mono_method_signature_full): New public method; takes a
1004         `MonoGenericContext *'.
1005         (find_method): Use mono_method_signature_full() and pass the
1006         klass'es context to it.
1007
1008         * class.c (mono_class_is_inflated_method): Use
1009         mono_method_signature_full() and pass the context to it.
1010
1011 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
1012
1013         * object.c: add proper locking in mono_remote_class_vtable(),
1014         fixes possible memory corruption.
1015
1016 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
1017
1018         * marshal.c (mono_remoting_marshal_init): set
1019         initialized after initialization.
1020
1021 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1022
1023         * locales.c : hush.
1024
1025 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
1026
1027         * object.c (extend_interface_array): fix really silly
1028         memory corrupting / comparison bug.
1029
1030 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1031
1032         * reflection.c: Functions added to support the creation
1033         of CustomAttributeData, which includes Attribute data
1034         used by ReflectionOnly methods.
1035
1036         * reflection.h:  mono_reflection_get_custom_attrs_data and
1037          mono_custom_attrs_data_construct added (functions exposed).
1038
1039          * icall.c: Added mono_reflection_get_custom_attrs_data
1040          as icall.
1041         
1042 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
1043
1044         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
1045         lupus's request.
1046
1047 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
1048
1049         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
1050
1051         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
1052         dynamic DllImportAttribute.
1053
1054         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
1055         dynamic DllImportAttribute.
1056
1057         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
1058         Fixes #75162.
1059
1060 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1061
1062         * threads.c: avoid segfault when an unstarted thread is aborted.
1063
1064 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
1065
1066         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
1067         Returns the name and version of the runtime for reporting.
1068
1069 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1070
1071         * appdomain.c: bump corlib version.
1072         * object-internals.h: new field in MonoReflectionAssembly.
1073
1074 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1075
1076         * object-internals.h: Carlos forgot to add this field.
1077
1078 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1079
1080         * icall.c: Added create_version to create instances
1081         of Version of MonoReflectionAssemblyName. This change helps
1082         the AssemblyName tests to keep running fine.
1083         
1084 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
1085   
1086         * object.c (mono_method_return_message_restore): A somehow less
1087         intrusive fix for #75138.
1088
1089 2005-06-03  Raja R Harinath  <rharinath@novell.com>
1090
1091         * object.c (mono_method_return_message_restore): Fix computation
1092         of expected number of out args.
1093
1094 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
1095
1096         * reflection.c (mono_image_get_method_info): Fix the case when the
1097         charset is empty.
1098
1099 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
1100
1101         * object.c: Added missing null check in
1102           mono_method_return_message_restore.
1103
1104 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
1105
1106         * reflection.c (mono_image_get_method_info): Handle the case when
1107         dllentry is empty.
1108
1109 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
1110
1111         * object.c: When creating the vtable for a proxy, take into account
1112         all inherited interfaces, not only the ones registered in
1113         iclass->interfaces. This fixs bug #74996.
1114         Also, in mono_method_return_message_restore, verify that the array
1115         of out args has the expected lengh.
1116
1117 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1118
1119         * socket-io.c: update the timeout in Poll when the call is interrupte.
1120
1121 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1122
1123         * socket-io.c: support abort/suspend in Select_internal after last
1124         change.
1125
1126 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1127
1128         * threadpool.c: remove warning.
1129
1130 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1131
1132         * icall.c:
1133         * socket-io.[ch]: Select_internal uses poll() now when available, thus
1134         removing the 1024 limit from select(). Runtime part of the fix for
1135         bug #71203.
1136
1137 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1138
1139         * socket-io.c: when resolving the addresses for the same
1140         host returned by gethostname(), get the local IPs from the interface
1141         list. Loopback addresses are discarded if the are interfaces up with
1142         non-loopback ones. Fixes bug #63265.
1143
1144 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
1145
1146         * appdomain.c, verify.c, object-internals.h, reflection.c:
1147         bumped corlib number to 36, and added new extra_flags field
1148         to ReflectionMethodBuilder and friends.  Fixes #75060.
1149
1150 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
1151
1152         * gc.c: register a new weak link only if the object is non-null
1153         (fixes bug#75047).
1154
1155 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1156
1157         * culture-info.h : short time pattern too.
1158
1159 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1160
1161         * culture-info.h : expand long time pattern string length.
1162
1163 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
1164
1165         * culture-info-table.h : update (more French date format; #72788).
1166
1167 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
1168
1169         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
1170         the method is static. Fixes #75029.
1171
1172 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
1173
1174         * reflection.c: Update the table_idx field of method builders after
1175         saving the module, since it can change. This is a workaround for
1176         bug #74914. 
1177
1178 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
1179
1180         * culture-info-table.h : update (additional French date format).
1181
1182 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
1183
1184         * icall.c (ves_icall_type_Equals): Revert last change.
1185         
1186         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
1187
1188         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
1189
1190 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
1191
1192         * class-internals.h: Added executioncontext_class field to 
1193         MonoDefaults structure.
1194         * domain.c: Cache System.Threading.ExecutionContext class in 
1195         mono_defaults.
1196         * object.c: Capture the ExecutionContext for asynchroneous calls in
1197          mono_async_result_new.
1198         * object-internals.h: Added execution_context and original_context 
1199         fields to MonoAsyncResult. Added execution_context to MonoThread.
1200         * security-manager.c|.h: Added mono_get_context_capture_method to 
1201         return the capture method (if required by the security manager or by
1202         the framework version used).
1203         * threadpool.c: Apply capture (if present) ExecutionContext in 
1204         mono_async_invoke and revert to original context after it completes.
1205
1206 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
1207
1208         * culture-info-table.h : updated (real hacky solution for zh-CHT).
1209
1210 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
1211
1212         * culture-info-table.h : zh-CHT related workaround.
1213
1214 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
1215
1216         * marshal.c (emit_marshal_custom): Add some error checking and call the
1217         methods in the ICustomMarshaler interface. Fixes #74875.
1218         
1219         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
1220         native->managed wrappers.
1221
1222 2005-05-12  Martin Baulig  <martin@ximian.com>
1223
1224         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
1225         here and use the loader lock.
1226
1227         * mono-debug.c: Properly lock when the debugger is not attached.
1228         (mono_debug_init): Release the initial lock if we're not running
1229         in the debugger.
1230
1231 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
1232
1233         * marshal.c (emit_marshal_custom): Pass through NULL values without
1234         calling the custom marshalling routines.
1235
1236         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
1237         conversion in structures. Fixes #74882.
1238
1239 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
1240
1241         * culture-info-table.h : zh-* cultures were missing.
1242
1243 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
1244
1245         * threads.c: Added a new event background_change_event which is signaled
1246         when a thread changes its background mode.
1247         Moved here several checks previously done in managed code. The checks
1248         require the thread lock, and using the thread lock in managed code
1249         can result in deadlocks.
1250         Merged Start_internal and Thread_internal into a single method. Now 
1251         Thread_internal does all work of creating and starting a thread.
1252         Added icalls for setting and getting the state of the object. Moved from
1253         managed code to avoid locking there.
1254         Added wait_for_tids_or_state_change() which is called instad of
1255         wait_for_tids when waiting for non-backround threads to end. This method
1256         will return if one of the threads ends or the background_change_event
1257         is signaled.
1258         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
1259         the background mode. This method signals the background_change_event
1260         event.
1261         * icall.c:
1262         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
1263         removed Start_internal.
1264         
1265 2005-05-11  Martin Baulig  <martin@ximian.com>
1266
1267         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
1268         to order of some fields to get proper alignment on 64-bit machines.
1269
1270 2005-05-11  Martin Baulig  <martin@ximian.com>
1271
1272         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
1273         changes as they're broken and completely fuck up the debugger.
1274
1275         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
1276
1277 2005-05-10  Martin Baulig  <martin@ximian.com>
1278
1279         * reflection.c (mono_reflection_generic_class_initialize): Don't
1280         call mono_class_setup_parent() here.
1281
1282 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1283
1284         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
1285         send/receive timeout use an integer in milliseconds. We were using a
1286         struct timeval.
1287
1288 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1289
1290         * locales.c:
1291         (internal_get_cultures): reserve the first slot of the array for the
1292         InvariantCulture, which will be filled in managed code.
1293
1294 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
1295
1296         * reflection.c (mono_image_fill_module_table): Initialize the
1297         GENERATION field as well.
1298
1299 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1300
1301         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
1302         Monitor.Enter on the object.
1303
1304 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
1305
1306         * threads.c: Enable the wait for running threads when exiting.
1307         * icall.c: Suspend all threads before exiting.
1308
1309 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
1310
1311         * assembly.c (mono_assembly_load_reference): Fix warning.
1312
1313 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1314
1315         * threadpool.c: changed the default number of threads per cpu. From now
1316         on, the default will be 20 + (5 * number of cpus) instead of 50.
1317
1318 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
1319
1320         * loader.c (mono_method_get_signature_full): Add locking here.
1321
1322 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
1323
1324         * appdomain.c: Moved methods for parsing and freeing assembly
1325         names to assembly.c.
1326         * assembly.c, domain-internals.h: Created public methods for parsing
1327         assembly names. Fixed mono_assembly_load_with_partial_name:
1328         it now finds the best match, taking into account the version,
1329         token and culture specified in the partial name. Also return
1330         the latest version if no version information is specified.
1331
1332 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
1333
1334         * threadpool.c: replace check for SocketAsyncCall class.
1335
1336 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1337
1338         * threadpool-internals.h:
1339         * Makefile.am: added threadpool-internals.h
1340
1341         * threadpool.c: call mono_unhandled_exception on exceptions not handled
1342         that happen in threadpool threads (tested on MS).
1343         (mono_thread_pool_remove_socket): new function that dispatch any pending
1344         AIO call on a socket that is closing. By now only epoll really needs it,
1345         as select/poll wake up when the socket closes.
1346
1347
1348         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
1349
1350 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
1351
1352         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
1353
1354 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
1355
1356         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
1357
1358 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
1359
1360         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
1361         has an abort request, convert it into a suspend request.
1362
1363 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
1364
1365         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
1366         warning for the usage of `UnmanagedFunctionPointerAttribute' which
1367         is not supported yet.
1368
1369 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1370
1371         * image.c: register assemblies loaded from data (bundles) in the loaded
1372         assemblies hash. Fixes bug #74772.
1373
1374 2005-04-29  Martin Baulig  <martin@ximian.com>
1375
1376         * class.c (mono_type_get_name_recurse): Update to the new naming
1377         schema from the latest .NET 2.x beta2.
1378         (mono_class_setup_vtable_general): If we're a generic instance,
1379         copy the vtable from our generic type definition and inflate all
1380         the methods in it.
1381
1382         * loader.c (find_method): Update to the new naming schema from the
1383         latest .NET 2.x beta2.
1384
1385 2005-04-29  Raja R Harinath  <harinath@gmail.com>
1386
1387         * class.c (mono_class_init): Add a mono_loader_unlock to the
1388         #74734 fix.
1389
1390 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
1391
1392         * icall.c (ves_icall_System_Environment_Exit): Remove the 
1393         suspend_all_other_threads () call for the time being, since it can hang.
1394
1395         * threads.c (mono_thread_manage): Similarly, disable the waiting for
1396         the background threads to exit, since it can also hang.
1397
1398         * class.c (mono_class_init): Applied patch from Ankit Jain 
1399         (radical@gmail.com). Avoid pending init errors when a field refers
1400         to a nested class using a typeref. Fixes #74734.
1401
1402         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
1403         this for dynamic modules.
1404
1405 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1406
1407         * threads.c: don't wait for threads that are in the process of aborting
1408         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
1409         and waiting for background threads to finish. This makes xsp and
1410         mod-mono-server exit without random length delays and/or hangs.
1411
1412 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1413
1414         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
1415
1416 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
1417
1418         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
1419         dynamic types to prevent infinite loops. Fixes #74727.
1420
1421         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
1422         ..._is_assignable_to.
1423
1424 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
1425
1426         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
1427
1428 2005-04-25  Martin Baulig  <martin@ximian.com>
1429
1430         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
1431
1432         * domain.c
1433         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
1434
1435         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
1436
1437         * reflection.c (build_compressed_metadata): Set metadata header
1438         version to 2.0.
1439
1440 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
1441
1442         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
1443         number into an integral and a decimal part. Fixes #70473.
1444
1445         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
1446
1447 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
1448
1449         * culture-info-table.h : reflected the latest locale-builder output.
1450
1451 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1452
1453         * threadpool.c: check for SuspendRequested too when deciding if
1454         mono_thread_interruption_checkpoint should be called.
1455
1456 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1457
1458         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
1459         * threads.c: remove interruption_mutex and use Interlocked instead. When
1460         suspending all the threads, wait for all the suspended events at once.
1461         If we're shutting down and get an APC that is going to be queued,
1462         call mono_thread_execute_interruption immediately, as the thread might
1463         be sleeping on a pthread condition or mutex.
1464
1465         * icall.c: call mono_runtime_set_shutting_down before suspending the
1466         threads.
1467
1468         Fixes bug #74693. And now xsp is happier when exiting.
1469
1470 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
1471
1472         * loader.c (mono_stack_walk): Fix #74690.
1473
1474 2005-04-22  Martin Baulig  <martin@ximian.com>
1475
1476         * mono-debug.h (MonoDebugMethodJitInfo): Added
1477         `MonoDebugMethodJitInfo *jit'.
1478
1479         * mono-debug.c (mono_debug_read_method): Cache the
1480         MonoDebugMethodJitInfo in `address->jit'.
1481         (mono_debug_free_method_jit_info): New public method.
1482
1483 2005-04-22  Martin Baulig  <martin@ximian.com>
1484
1485         * class.c (mono_class_is_assignable_from): Disallow
1486         type parameter -> interface.
1487
1488 2005-04-21  Dick Porter  <dick@ximian.com>
1489
1490         * threads.c (mono_thread_create): Turn an assertion into an error.
1491
1492 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
1493
1494         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
1495         
1496         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
1497         Fix some gcc 4.0 warnings.
1498
1499 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
1500
1501         * file-io.c: fix alt dir separator char on unix systems
1502         and cleanup (fixes bug #71214).
1503
1504 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
1505
1506         * marshal.c: Use CALLVIRT instead of CALL when dispatching
1507         a call to a remote domain, since the method may be an
1508         interface method in the client domain. This fixes bug #74192.
1509
1510 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1511
1512         * threadpool.c: recv/send are now performed before going back to managed
1513         code to save one transition.
1514
1515 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1516
1517         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
1518
1519         * metadata/threadpool.c: removed hack to workaround the bug above.
1520
1521         Fixes bug #74618.
1522
1523 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
1524
1525         * reflection.c reflection.h: Fix handling of parameter defaults in
1526         dynamic methods. Also fixes handling of parameter attributes.
1527         Fixes #74609.
1528
1529         * mono-debug.c (mono_debug_close_image): Fix warning.
1530
1531 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1532
1533         * socket-io.h: replaced old unused field with new 'blocking'.
1534         * threadpool.c: restore socket blocking state on windows(tm).
1535
1536 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
1537
1538         * icall.c: don't return the codebase in the AssemblyName[] returned by
1539         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
1540         * object-internals.h: Removed FIXME (fields were presents) and fixed
1541         versioncompat declaration.
1542
1543 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1544
1545         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
1546         not closed, so don't cleanup when it happens.
1547
1548 2005-04-13  Chris Toshok  <toshok@ximian.com>
1549
1550         * mono-debug-debugger.h: change prototype for
1551         mono_debugger_lookup_type.
1552
1553         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
1554         this function, although it should probably be named
1555         mono_debugger_init_type.
1556
1557 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1558
1559         * threadpool.c: fix non-AIO case.
1560
1561 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
1562
1563         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
1564         the built-in profiler to measure just JIT compilation times.
1565
1566 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1567
1568         * threadpool.c: the epollfd might be closed by another thread at
1569         any time, so ignore EBADF at treat it as a "we're closing" sign.
1570
1571 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1572
1573         * threadpool.c: release the semaphores with a count equals to the number
1574         of working threads in both IO and regular pools. Fixed typo that messed
1575         up the count of IO pool threads. Don't initialize the pipe handles if
1576         we're using epoll.
1577
1578 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1579
1580         * threadpool.c: some systems don't like a NULL when deleting the socket
1581         from epoll.
1582
1583 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1584
1585         * threadpool.c: fix semaphore allocation.
1586
1587 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1588
1589         * threadpool.c: added epoll() based implementation for asynchronous IO
1590         that is used instead of the default poll() when available.
1591         It can be disabled by setting MONO_DISABLE_AIO.
1592
1593 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1594
1595         * threadpool.c: windows needs 'closesocket' and instead of returning
1596         0 when the stream is closed while in select, it returns -1. Fixes bug
1597         #74573.
1598
1599 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
1600
1601         * class.c (class_compute_field_layout): Fix the regression caused by
1602         the previous try.
1603
1604 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1605
1606         * threadpool.c: separate pool for socket async. IO.
1607         * threadpool.h: mono_max_worker_threads is not a global any more.
1608
1609 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
1610
1611         * class.c (class_compute_field_layout): Fix #74549.
1612
1613 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1614
1615         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
1616         use 2 connected sockets instead.
1617
1618 2005-04-08  Miguel de Icaza  <miguel@novell.com>
1619
1620         * mono-config.c: Add new entry point for mkbundle
1621         mono_config_parse_memory. 
1622
1623 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1624
1625         * threadpool.c: removed another unused function.
1626
1627 2005-04-08  Ankit Jain  <radical@corewars.org>
1628
1629         * reflection.c (get_default_param_value_blobs): Add 'types'
1630         parameter to get the types encoded in the constant table.
1631         (mono_param_get_objects): Use the type from the constant table,
1632         not the type of the parameter, when creating default values.
1633         Handle null default values correctly.
1634
1635 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1636
1637         * file-io.c:
1638         * file-io.h:
1639         * threadpool.c:
1640         * threadpool.h:
1641         * icall.c:
1642         * socket-io.c: removed dead code for async IO.
1643
1644 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1645
1646         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
1647
1648         * threadpool.c: intercept socket async. calls and pass them to a thread
1649         that is polling and dispatching the job items to the threadpool as
1650         socket become ready. Fixes bugs #71217, #71933.
1651
1652         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
1653         between char and short/ushort arrays.
1654
1655         * socket-io.c: remove dead code.
1656
1657 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
1658
1659         * locales.c,
1660           icall.c : removed InternalToUpper_Comp() and
1661           InternalToLower_Comp().
1662
1663 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
1664
1665         * char-conversions.h : The tables were incorrectly generated. Should
1666           be generated against invariant culture.
1667
1668 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
1669
1670         * object.c (mono_runtime_invoke_array): Fix return value when 
1671         passing pre-created valuetype objects to ctors.
1672
1673         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
1674         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
1675         Fixes #74338.
1676
1677 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
1678
1679         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
1680         only used with --security and hides the wrong corlib version error.
1681
1682 2005-03-30  Joshua Tauberer  <tauberer@for.net>
1683
1684         * class.c: Changed mono_class_name_from_token so that types
1685         outside of a namespace don't have an initial period.  Improved
1686         the g_warning message used in _mono_class_get when loading
1687         fails.
1688         * assembly.c: In mono_assembly_load_reference, when an assembly
1689         can't be found, "No such file or directory" is misleading and
1690         unhelpful because a few paths were checked for the presence of
1691         the assembly.  When that happens (ENOENT), display a nicer
1692         message indicating the directories that were searched.  In all
1693         cases, the warning is made easier to read for non-hackers.
1694
1695 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
1696
1697         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
1698         project/solution.
1699         * appdomain.h|domain.c: Removed inline from functions.
1700         * appdomain.c: Reduced warnings when compiling on windows.
1701         * icall.c: Fixed output_debug declaration to gunichar2*.
1702         * mono-config.c: Reduced warnings when compiling on windows.
1703         * rand.c: Added missing "windows.h". Added missing return value.
1704         * rawbuffer.c: Added missing winsock2.h for windows.
1705         * sysmath.h: Added mono-compiler.h header to allow/ease 
1706         compilation with non-GCC compilers.
1707         * threads.c: Fixed declarations to compile with VS.NET C compiler.
1708         Removed cast warnings.
1709
1710         Adapted from the work of J Lothian (for VC6).
1711
1712 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
1713
1714         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
1715         from default_path.
1716
1717 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
1718
1719         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
1720         the 2.0 profile.
1721
1722 2005-03-27  Raja R Harinath  <harinath@gmail.com>
1723
1724         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
1725         has to be in $(exec_prefix).  $(prefix) is for arch-independent
1726         stuff, and it would probably use $(prefix)/share rather than
1727         $(prefix)/lib.
1728
1729 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1730
1731         * console-io.c: added 2 includes that might be missing.
1732
1733 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
1734
1735         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
1736         profile.
1737
1738         * reflection.c (create_custom_attr): Allocate the params array using
1739         alloca so it gets GC tracking.
1740
1741 2005-03-23  Chris Toshok  <toshok@ximian.com>
1742
1743         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
1744         out some spew.
1745
1746 2005-03-24  Raja R Harinath  <rharinath@novell.com>
1747
1748         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
1749         changes to pick up any changes in prefix, etc.
1750
1751 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
1752
1753         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
1754         
1755         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
1756         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
1757
1758 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
1759
1760         * class-internals.h object-internals.h class.c reflection.c: Extend the
1761         mono_lookup_dynamic_token () function to return the class of the
1762         token as well. 
1763
1764         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
1765         well. Fixes #73848.
1766
1767 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
1768
1769         * security-manager.c: Skip inheritance checks for intra-corlib
1770         class inheritance and method overrides. This skips a lot of checks
1771         and (anyway) permissions cannot work until corlib is loaded.
1772
1773 2005-03-23  Martin Baulig  <martin@ximian.com>
1774
1775         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
1776         MONO_TYPE_GENERICINST.  
1777
1778 2005-03-23  Martin Baulig  <martin@ximian.com>
1779
1780         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
1781
1782 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
1783
1784         * class.c: added locking comments to some functions.
1785         Cache the interface offsets arrays (saves about 20 KB
1786         of runtime memory in a typical app).
1787         Reduce the time overhead in mono_class_setup_supertypes ().
1788
1789 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
1790
1791         * icall.c: speedup and fix leaks in GetMethodsByName and
1792         GetPropertiesByName.
1793
1794 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
1795
1796         * reflection.c: some locking fixes.
1797
1798 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
1799
1800         * metadata.c: added missing break in case statement.
1801
1802 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
1803
1804         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
1805         typedbyref return values. Fixes #73941.
1806
1807 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
1808
1809         * security-manager.c|h: Added demandunmanaged method and 
1810         suppressunmanagedcodesecurity class to MonoSecurityManager.
1811         Renamed aptc class to allowpartiallytrustedcallers.
1812
1813 2005-03-17  Martin Baulig  <martin@ximian.com>
1814
1815         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
1816
1817 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1818
1819         * file-io.c: disabled file async. IO using aio_*. It uses the
1820         threadpool now. Workaround for bug #73718.
1821
1822 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
1823
1824         * assembly.h, mono-config.c: added code to deal with bundled configs
1825         for bundled assemblies.
1826
1827 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
1828
1829         * *.c, private.h: cleanup, removing old private.h header file.
1830
1831 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
1832
1833         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
1834         and throw_on_unmappable_char attributes.
1835
1836 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
1837
1838         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
1839         _ProcessName_internal.
1840
1841 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
1842
1843         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
1844         #73631.
1845
1846         * icall.c threads.c threads-types.h: Remove slothash icalls as they
1847         are no longer used.
1848
1849 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
1850
1851         * object.c (compute_class_bitmap): Add support for generics. Fixes
1852         #73527.
1853
1854 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
1855
1856         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
1857
1858 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1859
1860         * filewatcher.c: commented out the code for windows watcher, as we don't
1861         use it (we use the managed implementation instead).
1862
1863 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
1864
1865         * object-internals.h (MonoThread): Remove 'unused1' field.
1866
1867         * appdomain.c: Bump corlib version.
1868
1869         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
1870
1871         * reflection.c (mono_reflection_create_runtime_class): Remove the
1872         AssemblyBuilder.Save optimization since it causes too many problems.
1873
1874 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
1875
1876         * exception.c|h: Added mono_get_exception_reflection_type_load to
1877         create a ReflectionTypeLoadException object.
1878         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
1879         to return NULL is a InheritanceDemand fails during reflection. Updated
1880         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
1881         ReflectionTypeLoadException if an InheritanceDemand fails during 
1882         reflection. Added icall mapping for GetLinkDemandSecurity.
1883         * security-manager.c|h: Added ves_icall_System_Security_
1884         SecurityManager_GetLinkDemandSecurity internal call to return the
1885         class and methods permissions set for a LinkDemand. Removed unused
1886         fields in MonoSecurityManager.
1887
1888 2005-03-10  Martin Baulig  <martin@ximian.com>
1889
1890         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
1891         it's a generic instance.
1892
1893 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
1894
1895         * reflection.c (mono_get_object_from_blob): Applied patch from
1896         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
1897
1898         * class.c (mono_class_is_assignable_from): Another try at fixing 
1899         #73469 without breaking anything.
1900
1901 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
1902
1903         * class.c: (mono_class_is_assignable_from): Revert the last changes
1904         since they don't work with generics.
1905         
1906         * class.c (mono_class_is_assignable_from): Fix build bustage.
1907
1908         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
1909         the managed IsAssignableFrom method. Fixes #73469.
1910
1911         * reflection.c (mono_reflection_call_is_assignable_from): New helper
1912         function.
1913
1914 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
1915
1916         * object.c (mono_load_remote_field_new): Fix returning uninitialized
1917         memory when the remoting callback does not sets the out arguments.
1918         Fixes #73007.
1919
1920         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
1921         by mistake.
1922
1923         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
1924
1925         * object-internals.h (MonoStackFrame): Sync with managed object layout.
1926
1927         * appdomain.c: Bump corlib version.
1928
1929 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
1930
1931         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
1932         function.
1933
1934         * threads.c (mono_thread_attach): Detect threads which are not started
1935         by the GC pthread wrappers.
1936
1937 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
1938
1939         * icall.c: Added new icall for RNG.
1940         * rand.c|h: Added new icall to open the RNG. This allows to share a 
1941         single handle on Linux to access /dev/urandom and fix #73183.
1942
1943 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
1944
1945         * object.c: setting the new vtable in a transparent proxy object must
1946         not change the GC descriptor.
1947
1948 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
1949
1950         * object.c: fixed compilation without GCJ support.
1951         * reflection.c: for runtime-created types ensure klass->has_references
1952         is correct (bug #73215).
1953
1954 2005-03-02  Martin Baulig  <martin@ximian.com>
1955
1956         * class.c (mono_class_is_assignable_from): Make this work if
1957         `oklass' is a generic instance; fixes #72831.
1958
1959 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
1960
1961         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
1962         with hasthis set.
1963         
1964         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
1965
1966         * marshal.c: Reorganize native->managed marshalling code to also use
1967         the emit_marshal_... functions.
1968
1969 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
1970
1971         * object.c: typed allocs have issues with bitmap sizes > 30,
1972         so check for max_set >= 30.
1973
1974 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
1975
1976         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
1977         managed code. Fixes #73012.
1978
1979         * metadata.h (MonoMarshalSpec): Add elem_mult field.
1980
1981         * metadata.c reflection.c: Load/Emit elem_mult as well.
1982         
1983         * metadata.h (MonoMarshalSpec): Add comment.
1984
1985         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
1986
1987         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
1988         num_elem to -1 if not given.
1989
1990         * object-internals.h (MonoReflectionMarshal): Add has_size field.
1991
1992         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
1993         given values.
1994
1995 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
1996
1997         * null-gc.c (mono_gc_free_fixed): Was not compilable.
1998
1999 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
2000
2001         * reflection.c (encode_marshal_blob): Encode param_num field as well.
2002
2003         * object-internals.h (MonoReflectionMarshal): Add param_num field.
2004
2005 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
2006
2007         * object.c: generalized the reference bitmap creation
2008         and added hooks for the new GC.
2009         * class-internals.c: removed the gc_bitmap field from MonoClass.
2010
2011 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2012
2013         * domain.c: help the compiler to produce better code
2014         in mono_jit_info_table_find ().
2015
2016 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
2017
2018         * object.c: make all allocations look typed.
2019
2020 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2021
2022         * socket-io.c: load Mono.Posix if it's not loaded already
2023         (fixes bug#73033).
2024
2025 2005-02-24  Martin Baulig  <martin@ximian.com>
2026
2027         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
2028         * reflection.c (dup_type): Likewise.
2029
2030 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
2031
2032         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
2033         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
2034
2035 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2036
2037         * domain.c, threads.c, object-internals.h: make the critical thread
2038         local vars use the fast access mode (even when we're compiled in
2039         a lib). Provide accessors to be used by the jit during codegen.
2040
2041 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2042
2043         * appdomain.c: Changed hook functios behavior to include
2044         support for the reflection only assemblies. Some icalls were changed
2045         to support the mentioned assemblies too. Signatures of static methods
2046         try_assembly_resolve and real_load now have an additional parameter:
2047         refonly.
2048
2049         * assembly.c: General changes to mono_assembly_ methods to support
2050         reflection only api. Functions mono_assembly_open, mono_assembly_load,
2051         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
2052         suffix, to support an additional gbool parameter to specify whether
2053         the assembli is reflection only or not. Created some new hook functions 
2054         to add support for reflection only assemblies. Signatures of static 
2055         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
2056         have now an additional parameter: refonly.
2057
2058         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
2059         indicating whether the assembly is reflection only or not.
2060
2061         * exception.c: Add mono_get_exception_invalid_operation.
2062
2063         * icall.c: Throw an InvalidOperationException when trying to invoke
2064         a property/method/event, or trying to set/get the value of a field.
2065         Also add an icall to retrieve the ref_only flag to the
2066         MonoReflectionAssembly.
2067
2068 2005-02-23  Chris Toshok  <toshok@ximian.com>
2069
2070         Part of fix for #72827.
2071         * mono-debug.c (mono_debug_add_method): add lexical block data to
2072         the info we write.  Kind of a hack at the moment - we copy the
2073         lexical block info from the MonoDebugMethodInfo to the
2074         MonoDebugMethodJitInfo here, before writing it.
2075         (mono_debug_read_method): read the lexical block info.
2076
2077         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
2078
2079         * debug-mono-symfile.h: add lexical block support.
2080
2081         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
2082         support.
2083
2084 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
2085
2086         * loader.c (mono_lookup_pinvoke_call): Fix warning.
2087
2088         * object.c (mono_runtime_free_method): Call mono_free_method () and
2089         put the TODOs there.
2090
2091         * loader.c (mono_free_method): Free up most memory allocated for 
2092         dynamic methods.
2093
2094 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
2095
2096         * reflection.c: properly flag a Type argument to a
2097         named custom attr value (bug #72248).
2098
2099 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2100
2101         * reflection.c: reduce code duplication in named custom
2102         attribute encoding.
2103
2104 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
2105
2106         * reflection.c: properly encode custom attrs of type object
2107         (bug #72649).
2108
2109 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
2110
2111         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
2112
2113 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
2114
2115         * socket-io.c: load System.dll if it's not loaded already
2116         (bug #72850 and #70477).
2117
2118 2005-02-21  Martin Baulig  <martin@ximian.com>
2119
2120         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
2121         generic instances.
2122
2123 2005-02-21  Martin Baulig  <martin@ximian.com>
2124
2125         * reflection.c (mono_image_build_metadata): We also need to
2126         "fixup" the MethodImpl table after we computed the final method
2127         indices.  Call fixup_methodimpl() to do that.
2128         (fixup_methodimpl): New private method.
2129
2130 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
2131
2132         * assembly.c: special case mscorlib.dll (bug#72536),
2133         patch from Carlos Alberto Cortez.
2134
2135 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
2136
2137         * threads-types.h threads.c: Fix build bustage.
2138
2139         * threads.c: Use a union for long<->double conversions.
2140
2141         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
2142         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
2143
2144         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
2145         containing the checkpoint call with NOT_TAKEN.
2146         
2147         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
2148         checkpoint before pushing the arguments, so they won't have to be
2149         spilled to stack.
2150
2151 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2152
2153         * domain.c, assembly.c, domain-internals.h: make some data
2154         const and relocation-free.
2155
2156 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
2157
2158         * object.c, appdomain.c, class-internals.h: introduce the
2159         MonoClassRuntimeInfo structure to hold the info needed to
2160         use a class at runtime. Made mono_class_vtable() lock-free
2161         for all the appdomains.
2162
2163 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
2164
2165         * metadata-internals.h, image.c: introduce a per-image mempool to
2166         be used for memory that has the same lifetime as the image.
2167
2168 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
2169
2170         * domain.c: In mono_init_internal(), instead of selecting the first
2171         runtime version supported by an executable, get a list of all
2172         supported versions and select the one for which an mscorlib exists
2173         (since even if the runtime supports a given version, it doesn't mean
2174         that the framework for that version is installed).
2175         Modified get_runtimes_from_exe to support this behavior.
2176         In supported_runtimes, added information about additional system
2177         assembly versions.
2178         
2179         * assembly.c: Added support for more than one system assembly version
2180         per runtime version. Updated the assembly list.
2181         In mono_assembly_remap_version, removed the initial version check,
2182         since we don't know to which version we need to compare until we
2183         get the version set on which the assembly is based.
2184         Moved the code for loading corlib into the new method
2185         mono_assembly_load_corlib(), so it can be used by the initialization
2186         code.
2187         
2188         * domain-internals.h: Updated data structures and added declaration
2189         for mono_assembly_load_corlib.
2190
2191 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
2192
2193         * reflection.c (resolve_object): Fix the creation of the signature in 
2194         the SignatureHelper case.
2195
2196         * assembly.c (mono_assembly_remap_version): Fix binary search.
2197         
2198 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
2199  
2200         * class.c: Added inheritance check when a method is overloaded (from a
2201         virtual method or when implementing an interface) and when a class is
2202         inherited. Added functions to set a failure for a class and to 
2203         retreive the exception from a failure.
2204         * class-internals.h: Added fields to MonoClass to keep the exception
2205         information status for inheritance (or other exceptions) to be thrown
2206         later (i.e. not at load time).
2207         * object.c: Throw the inheritance SecurityException when a type is to 
2208         be created with either class or method inheritance violations.
2209         * reflection.c|h: Fix when getting declsec from a class. Removed 
2210         unrequired code for class. Improved sanity in parameter naming.
2211         * security-manager.c|h: Added functions to check for class and method
2212         inheritance.
2213
2214 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
2215
2216         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
2217         and has_finalize in dynamic types as well.
2218
2219 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
2220
2221         * culture-info-table.h : fixed currency format for en-GB (and so on).
2222
2223 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
2224
2225         * gc.c: ensure the GC handles never have 0 as a value.
2226
2227 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
2228
2229         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
2230         a pointer to a struct to unmanaged code. Fixes #72625.
2231
2232 2005-02-16  Martin Baulig  <martin@ximian.com>
2233
2234         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
2235
2236 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
2237
2238         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
2239
2240 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
2241
2242         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
2243
2244         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
2245         UnmanagedFunctionPointerAttribute, use it for determining calling convention
2246         etc. Fixes #71471.
2247
2248         * reflection.c (mono_custom_attrs_get_attr): New helper function.
2249
2250         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
2251
2252 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
2253
2254         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
2255         changes to make the current context a field in MonoThread.
2256
2257 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
2258
2259         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
2260         the last change.
2261         
2262         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
2263         extracted from mono_marshal_get_native_wrapper.
2264
2265         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
2266         to create wrappers around native functions.
2267
2268         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
2269         delegates for arbitrary function pointers. Fixes #71472.
2270
2271 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
2272
2273         * threads.c: cleaned up the code a little.
2274
2275 2005-02-15  Martin Baulig  <martin@ximian.com>
2276
2277         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
2278         the data table.
2279
2280         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
2281         allocate larger chunks if needed.
2282
2283 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
2284
2285         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
2286         in by mistake.
2287
2288 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
2289
2290         * domain.c: keep the domains in an array and ensure the domain ids
2291         are kept small, so they can be used as indexes to domain-specific data
2292         with a small memory overhead.
2293
2294 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
2295
2296         * icall.c: Handle byref types in Type icalls. Fixes #72544.
2297
2298 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
2299
2300         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
2301
2302 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
2303
2304         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
2305
2306         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
2307         values.
2308
2309         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
2310         
2311 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
2312
2313         * domain-internals.h: add the hashtable here.
2314
2315         * class-internals.h: Remove `info' from MonoMethod
2316
2317         * domain.c: Add a new hashtable, jit_trampoline_hash
2318
2319 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
2320
2321         * object.c: don't set the value of static fields
2322         (fixes bug#72494).
2323
2324 2005-02-11  Martin Baulig  <martin@ximian.com>
2325
2326         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
2327         (mono_debug_add_method): Silently ignore the method if it's too big.
2328         (mono_debug_add_type): Likewise.
2329
2330 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
2331
2332         * threads.c, appdomain.c: remove #ifdefs from the code.
2333
2334 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
2335
2336         * metadata-internals.h: Added flags to MonoAssembly to cache the most
2337         common security informations. This allows us to stay in unmanaged code
2338         when doing LinkDemand and it's special cases (except for the first 
2339         time for initialization). The flags a very much used with --security.
2340         * reflection.c|h: Added code to get declarative security attributes 
2341         for LinkDemand and InheritanceDemand. This required to refactor the
2342         existing code for Demand.
2343         * security-manager.c|h: Added new method fields for the special cases
2344         of LinkDemand.
2345
2346 2005-02-10  Martin Baulig  <martin@ximian.com>
2347
2348         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
2349         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
2350
2351 2005-02-10  Martin Baulig  <martin@ximian.com>
2352
2353         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
2354         debugging code; this is almost a complete rewrite.
2355
2356         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
2357
2358 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2359
2360         * domain.c, object.h: expose mono_string_equal () and 
2361         mono_string_hash ().
2362         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
2363         it's implemented in managed code.
2364
2365 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2366
2367         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
2368         lo leak objects between appdomains.
2369
2370 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2371
2372         * assembly.c: old compilers compilation fix from 
2373         robertj@gmx.net (Robert Jordan).
2374
2375 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
2376
2377         * class-internals.h: Little reminder for the future.
2378
2379         * debug-helpers.c: Fix up wrapper_type_names
2380
2381 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2382
2383         * image.c, metadata-internals.h: when loading an image from a file,
2384         mmap all of it and use the same codepaths as when using a
2385         in-memory image: the code is simpler and we use less memory
2386         (both writable and readonly).
2387
2388 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
2389
2390         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
2391         API to alloc runtime data structures that need to be tracked by the
2392         GC and contain pointers.
2393         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
2394         make the code more readable and eventually use a different GC.
2395
2396 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
2397
2398         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
2399         for out arguments.
2400         
2401 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
2402
2403         * object.c: In release_type_locks(), don't release the cctor lock
2404         if it has already been released. This fixes a crash in the
2405         thread5 test.
2406
2407 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2408
2409         * gc.c, marshal.c, icall.c: register a delegate for finalization
2410         only when the native function pointer has been allocated for it.
2411
2412 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
2413
2414         * object.c: cleaned up some code, allocate objects that are
2415         pointer free with the atomic malloc variant. Allocate memory
2416         for static data from the mempool if it's pointer-free.
2417         Allocate the bounds array at the end of the array data, when needed.
2418         * object-internals.h, object.h: move a private function in a private
2419         header.
2420         * class.c: handle missing case in tracking references in fields.
2421
2422 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
2423
2424         * class.c, class-internals.h: keep track if a type has
2425         reference fields in either the instance or static fields.
2426
2427 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
2428
2429         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
2430         and renamed to MonoRuntimeInfo. Added fields to store the expected
2431         framework assembly version. Changed mono_get_framework_version and
2432         mono_get_runtime_version for a single mono_get_runtime_info method.
2433         
2434         * assembly.c: Added method to remap system assembly versions to the
2435         current executing runtime version. Removed old mapping code.
2436         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
2437         
2438         * icall.c, reflection.c: Track api changes.
2439
2440 2005-02-06  Miguel de Icaza  <miguel@novell.com>
2441
2442         * loader.c (method_from_memberref): Improve error reporting,
2443         produce the class name instead of the typeref/typedef index. 
2444
2445 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
2446
2447         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
2448
2449 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
2450
2451         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
2452         stdcall and charset name mangling.  Reorganize the code and add
2453         some tracing stuff.
2454
2455 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
2456
2457         * monodiet.c: More iters!
2458
2459         * marshal.c: Iter usage.
2460
2461         * icall.c: Iter usage.
2462
2463         * object.c: Use iters.
2464
2465         * debug-helpers.c: More iters
2466
2467 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
2468
2469         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
2470         under win32.
2471
2472 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
2473
2474         * mono-debug-debugger.c: use iters
2475
2476         * class.c, class-internals.h: mono_class_setup_events is static
2477         now
2478
2479         * All callers: use iters
2480
2481 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
2482
2483         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
2484         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
2485
2486 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
2487
2488         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
2489
2490         * marshal.h: Add prototypes for ldfld/stfld_remote.
2491
2492         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
2493         this is called during startup.
2494         
2495 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
2496
2497         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
2498         MonoThreadsSync struct private in monitor.c. Changed the way
2499         MonoThreadsSync is allocated so it's faster and there is no
2500         need to keep track of it with a finalizer and it uses less memory.
2501         This also finally allows us to allocate mono objects as ptrfree when
2502         there are no reference fields.
2503
2504 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
2505
2506         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
2507         disappearing link to the GC interface and use them to simplify
2508         the gchandles code.
2509
2510 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
2511
2512         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
2513         stfld_remote which call mono_load/store_field_new. This allows methods
2514         calling ldfld/stfld wrappers to be AOTed.
2515
2516         * console-io.c: Include sys/filio.h under solaris.
2517         
2518         * console-io.c: Include curses.h if needed correctly.
2519
2520 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
2521         
2522         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
2523         method->klass as well.
2524
2525         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
2526
2527         * class.c (mono_class_init): Switch on lazy initialization of 
2528         methods.
2529
2530         * class.c (mono_class_get_finalizer): Handle the case when the 
2531         finalizer is inherited.
2532
2533 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2534
2535         * console-io.c: <curses.h> is needed by term.h on solaris.
2536
2537 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
2538
2539         * icall.c, class-internals.h, monodiet.c, class.c: Remove
2540         mono_class_setup_properties where possible. Remove this ftn from
2541         the header file, and make it static.
2542
2543 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
2544
2545         * loader.c: Add missing setup_... call.
2546
2547         * class.c: Add missing setup_... calls.
2548
2549         * class.c (mono_class_init): Switch on lazy initialization of 
2550         the generic vtable.
2551         
2552         * class.c (mono_class_init): Fix generics broken by the recent changes.
2553
2554         * monodiet.c (handle_type): Add missing setup_... calls.
2555
2556         * class.c: Back out garbage in previous patch.
2557         
2558         * class.c: Add missing setup_... calls.
2559
2560         * class.c (mono_class_get_method_from_name_flags): Avoid calling
2561         mono_class_setup_methods () if possible.
2562
2563         * class-internals.h (MonoClass): Add 'has_cctor' flag.
2564
2565         * class-internals.h (MonoCachedClassInfo): New structure.
2566
2567         * class.c: Initialize properties and events fields of MonoClass lazily.
2568
2569         * class.c: Add infrastructure for lazily initializing the methods and
2570         vtable fields of MonoClass. Not yet used.
2571
2572         * class.c (mono_class_get_finalizer): New helper function.
2573
2574         * class.c: Add infrastructure for loading some class related data from
2575         an AOT file.
2576
2577         * object.c: Add infrastructure for initializing the vtable from data
2578         in the AOT file.
2579
2580         * gc.c (run_finalize): Use mono_class_get_finalizer ().
2581
2582         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
2583         appropriate initialization function before accessing parts of the
2584         MonoClass structure.
2585
2586         * marshal.c: Fix warnings.
2587         
2588         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
2589
2590         * mono-debug-debugger.c (get_exception_message): Use 
2591         mono_class_get_method_from_name_flags ().
2592
2593 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
2594
2595         * reflection.c, appdomain.c: Replace a few manual searches that
2596         Zoltan missed. (Paolo approved this part of my initial patch).
2597
2598 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
2599
2600         * profiler.c: disable recording statistical events at report time.
2601
2602 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2603
2604         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
2605         to byteswap arrays of enum values, too (bug #72080).
2606
2607 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
2608
2609         * appdomain.c (set_domain_search_path): Allow this to be called if
2610         domain->setup is not yet set.
2611
2612         * loader.c (mono_method_get_index): New helper function.
2613
2614         * loader.c reflection.c: Use mono_method_get_index ().
2615
2616         * class.c (mono_class_get_method_from_name_flags): New helper method.
2617
2618         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
2619         this.
2620
2621         * class.c (mono_class_get_cctor): New helper method.
2622
2623         * string-icalls.c object.c class.c marshal.c reflection.c: Use
2624         mono_class_get_method () to look up methods.
2625
2626 2005-02-01  Miguel de Icaza  <miguel@novell.com>
2627
2628         * console-io.c: Fix the build, this should work on Windows.
2629
2630 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
2631
2632         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
2633         be set to null to keep things valid
2634
2635 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2636
2637         * icall.c: added Console 2.0 icalls.
2638         * Makefile.am: added console-io.[ch]
2639         * console-io.[ch]: internal calls for Console 2.0 API.
2640
2641 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2642
2643         * class.c: make sure we consider all the interfaces
2644         when calculating max_interface_id (bug found by
2645         Jeroen Frijters running ikvm).
2646
2647 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
2648
2649         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
2650         valuetype fields to null.
2651
2652         * object.c (set_value): Ditto. Fixes #71669.    
2653
2654 2005-01-31  Martin Baulig  <martin@ximian.com>
2655
2656         * metadata.c (mono_metadata_has_generic_params): New public
2657         function; checks whether something is a generic method.
2658
2659 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
2660
2661         * appdomain.c: fix infinite recursion when adding assemblies.
2662
2663 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
2664
2665         * object.c: Fix small typo to return all items for Environment.
2666         GetCommandLineArgs.
2667
2668 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2669
2670         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
2671         reflection.c: more domain and assembly-unload related fixes
2672         and memory leaks plugs.
2673
2674 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
2675
2676         * 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.
2677
2678 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
2679
2680         * loader.c (mono_method_signature): Make this method lazy
2681         (mono_get_method_from_token): Don't computate the signature here.
2682
2683         Doing this saves quite a bit of memory. I got 90 kb on starting up
2684         monodoc. It should also save some disk reads on startup.
2685
2686         * *: MonoMethod->signature might be NULL now. You *MUST* use
2687         mono_method_signature.
2688
2689 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
2690
2691         * object.c (mono_runtime_get_main_args): Return an array from the
2692         current domain here. Fixes #71938.
2693
2694 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
2695
2696         * monitor.c: formatting changes to comply with the
2697         mono coding style and remove #ifdefs from the code.
2698
2699 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2700
2701         * metadata.c, private.h: remove some unneeded data
2702         and use a more compact representation for table schemas.
2703
2704 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
2705
2706         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
2707         to get a better distribution in hash tables.
2708         * *.c: use mono_aligned_addr_hash() where appropriate.
2709         * assembly.c: make var static.
2710
2711 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
2712
2713         * domain-internals.h: Put MonoJitInfo on a diet.
2714
2715         * domain.c: Fix a warning.
2716
2717 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2718
2719         * gc.c: rework the gc handles code to reuse handles
2720         when freed.
2721
2722 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
2723
2724         * domain.c: fixed long standing bug in mono_string_equal() which
2725         was brought to light with the ldstr changes.
2726
2727 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
2728
2729         * reflection.c: Remove warning by adding missing include for marshal.h
2730
2731 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2732
2733         * domain.c, object.c: change the ldstr_table to hold
2734         MonoString* as keys: makes the runtime isinterned lookup
2735         faster and simplifies memory management.
2736
2737 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
2738  
2739         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
2740         possible to add imperative security checks before calling the icall.
2741         * reflection.c: Return security attributes on the original MonoMethod
2742         (and not the wrapped one). This fix permissions on icalls.
2743
2744 2005-01-25  Dick Porter  <dick@ximian.com>
2745
2746         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
2747         the check for mktime() support actually test the mktime() return
2748         value.  "Fixes" bug 71682, though the output is still different to
2749         MS.
2750
2751 2005-01-25  Martin Baulig  <martin@ximian.com>
2752
2753         * class.c (mono_class_is_assignable_from): Make this work for
2754         generic instances.
2755
2756 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
2757
2758         * marshal.c (mono_string_utf8_to_builder)
2759         (mono_string_builder_to_utf16): We might not have ownership of the
2760         string. In thise case, we need to create a new buffer.
2761
2762         * object-internals.h (mono_stringbuilder_capacity): sb->str might
2763         be null, in which case, use the default capacity.
2764
2765 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2766
2767         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
2768         GC events to the profiler.
2769
2770 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2771
2772         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
2773         if you don't want the GC to run.
2774
2775 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
2776
2777         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
2778         start providing a GC API and keeping different implementations in
2779         their own file.
2780         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
2781
2782 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
2783
2784         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
2785         mmap rather than allocating a huge buffer.
2786         (mono_debug_close_mono_symbol_file): Free the buffer allocated
2787         above.
2788
2789 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
2790
2791         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
2792         and CheckExecutionRights.
2793         * reflection.c|h: Keep the index of the declarative security to be 
2794         used, instead of the pointer, when AOT compiler is used. Also add 
2795         class initialization when requesting demands.
2796         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
2797         CheckExecutionRights. Both properties are now FALSE by default, and
2798         unmodifiable, unless the --security option is used.
2799
2800 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
2801
2802         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
2803         reflection.c: properly refcount images and assemblies, many leaks fixed.
2804
2805 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2806
2807         * threadpool.c: increase the timeout for threads in the thread pool to
2808         10s.  Fixes bug #67159.
2809
2810 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
2811
2812         * class-internals.h: Sun's compiler insists on explicit
2813         signed on bit fields to handle then correctly.
2814
2815 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
2816
2817         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
2818         Make the size of the array fit only the number of invalid path
2819         chars that we have.
2820
2821         * class.c (_mono_class_get): Improve the error reporting when a
2822         class referenced is not found, to assist debugging. 
2823
2824 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
2825
2826         * threads.c: fix off-by-one error.
2827         * domain.c: free data allocated in the domain.
2828
2829 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
2830
2831         * reflection.c (mono_method_body_get_object): Fill out exception info
2832         as well.
2833
2834         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
2835         structure.
2836         
2837 2005-01-19  Martin Baulig  <martin@ximian.com>
2838
2839         * loader.c (mono_get_method_constrained): Make this work again.
2840
2841 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
2842
2843         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
2844         guint16 to match the managed side.
2845
2846         * reflection.c (mono_reflection_body_get_object): Fill out local
2847         variables array.
2848
2849         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
2850         as well.
2851
2852         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
2853         'local_var_sig_token'.
2854
2855 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
2856
2857         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
2858         System.Drawing.
2859
2860         * reflection.c (mono_method_body_get_object): Handle abstract and
2861         runtime methods.
2862
2863 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
2864
2865         * marshal.c, loader.c, class-internals.h, reflection.c:
2866         store the emthod data for a wrapper in an array instead of a list.
2867
2868 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
2869
2870         * marshal.c: change the code to allocate memory more
2871         conservatively for method wrappers.
2872
2873 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
2874
2875         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
2876         fields from MonoClass to the marshal info structure where they belong.
2877
2878 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2879
2880         * class.c, object.c, class-internals.h, marshal.c: rearrange
2881         some fields and tweak some types to lower memory usage.
2882
2883 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
2884
2885         * threads.c (signal_thread_state_change): Handle the case when the
2886         target thread is the current thread.
2887
2888         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
2889
2890         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
2891         emit_ptr_to_object_conv. 
2892
2893         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
2894         marshalling. Fixes #71352.
2895
2896 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
2897
2898         * metadata.h, blob.h: move table enum to blob.h so it can be included
2899         in any header.
2900         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
2901         cut the size of MonoImage/MonoDynamicImage.
2902
2903 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
2904
2905         * profiler.c (mono_profiler_install_simple): Fix default arguments.
2906
2907 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2908
2909         * reflection.c, reflection.h, icall.c: add a function to check
2910         if an attribute type is defined for a metadata object.
2911
2912 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
2913
2914         * object-internals.h: Added some needed fields from StringBuilder class.
2915         * marshal.c: Set the maxCapacity when creating a StringBuilder.
2916
2917 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
2918
2919         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
2920         threads before shutting down the runtime.
2921
2922         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
2923
2924 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2925
2926         * object-internal.h, threads.c: implement stacksize and 
2927         parameterized thread start functionality (requires
2928         matching corlib). Marked broken code for later removal.
2929
2930 2005-01-12  Martin Baulig  <martin@ximian.com>
2931
2932         * class-internals.h (MonoGenericClass): Moved the `initialized'
2933         flag to MonoDynamicGenericClass, removed `init_pending'.
2934         (MonoGenericInst): Added `is_reference' flag.
2935
2936 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
2937
2938         * reflection.c (mono_image_create_pefile): Only set the pe_offset
2939         inside the MSDOS header. Fixes #71201.
2940
2941         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
2942         gc thread.
2943         (mono_domain_finalize): Ditto.
2944
2945 2005-01-12  Martin Baulig  <martin@ximian.com>
2946
2947         * class.c (mono_get_shared_generic_class): Use the cache for
2948         non-dynamic generic classes.
2949
2950         * class-internals.h (mono_class_create_generic_2): Removed
2951         function prototype, this function is now static inside class.c.
2952
2953         * class.c (mono_class_create_generic_2): Made this static, only
2954         call it from mono_class_init() and mono_class_setup_parent().
2955         (collect_implemented_interfaces_aux): Call mono_class_init() on
2956         the interfaces we collect.
2957         (mono_class_setup_vtable): Call mono_class_init (class->parent).
2958
2959 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
2960
2961         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
2962         it a real thread handle.
2963
2964         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
2965         MonoJitExceptionInfo, since each catch clause needs its own variable.
2966         
2967 2005-01-11  Dick Porter  <dick@ximian.com>
2968
2969         * image.c (mono_pe_file_open): New variant on mono_image_open()
2970         that does not set up the CLI metadata; used for FileVersionInfo so
2971         it can get the data for windows binaries too.
2972         
2973         * process.c (process_read_string_block): Don't read off the end of
2974         the StringTable block.
2975
2976         These both fix bug 70766.
2977
2978 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
2979
2980         * gc.c: set some fields to NULL at GC cleanup time.
2981         * threads.c: if we quit the main thread, call exit ().
2982
2983 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
2984
2985         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
2986
2987 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
2988
2989         * threads.h, threads.c, object.c: added accessor and settor for
2990         main_thread. Handle it specially when exiting from it: wait
2991         for other foreground threads to exit.
2992
2993 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
2994
2995         * process.c, verify.c: remove some bloat.
2996
2997 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
2998
2999         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
3000         the calling convention to cdecl under win32.
3001
3002 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
3003
3004         * object.c (mono_object_get_size): New function to get the size of
3005         an object instance.
3006
3007         * profiler.c (simple_allocation): Use above.
3008
3009 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
3010
3011         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
3012         ves_icall_System_AppDomain_getRootDomain (as it's not required to
3013         get an appdomain by it's id and we can't assume the root's id is 0).
3014         * domain-internals.h: Change the function prototype to match.
3015         * icall.c: Change the icall table for AppDomain.
3016
3017 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
3018
3019         * locales.c (string_invariant_compare_char): Only compute
3020         GUnicodeTypes in the case where we need them.  Test for ordinality
3021         first and return if so.
3022
3023         From the commit:
3024
3025                 /*
3026                  * FIXME: here we must use the information from c1type and c2type
3027                  * to find out the proper collation, even on the InvariantCulture, the
3028                  * sorting is not done by computing the unicode values, but their
3029                  * actual sort order.
3030                  */
3031
3032 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
3033
3034         * loader.c: for P/Invoke methods, allow the "Internal" shared
3035         library name to refer to the calling process symbol namespace.
3036
3037 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
3038
3039         * Makefile.am: Add the security manager to the build.
3040         * security-manager.c|h: New. Initialization of the security manager.
3041
3042 2005-01-07  Dick Porter  <dick@ximian.com>
3043
3044         * threads.c: 
3045         * monitor.c: Update thread state during Monitor and WaitHandle
3046         waits.  Fixes bug 71031.
3047
3048 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
3049
3050         * reflection.c (property_encode_signature): Correctly handle when the
3051         property has no methods.
3052
3053 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
3054
3055         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
3056         
3057         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
3058         fields from mb, not rmb. Fixes #71017.
3059
3060         * marshal.c (emit_ptr_to_str_conv): Add support for 
3061         ByValTStr -> string conversion. Fixes #71015.
3062
3063         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
3064
3065         * mempool.c (mono_mempool_contains_addr): New helper function.
3066
3067 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
3068
3069         * metadata.c (mono_metadata_compute_size): Fix size calculation of
3070         HasSematics encoded fields.
3071         
3072         * metadata.c (mono_type_to_unmanaged): Improve error message for 
3073         invalid string marshalling.
3074
3075         * metadata.c: Fix warnings.
3076         
3077 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3078
3079         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
3080         profiler support.
3081
3082 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
3083
3084         * domain.c object.c domain-internals.h: Revert part of r38077 since the
3085         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
3086         tests.
3087
3088 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
3089
3090         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
3091         so methods containing these can be AOTed.
3092
3093 2005-01-03  Martin Baulig  <martin@ximian.com>
3094
3095         * loader.c (find_method): Removed the hack for generic instances.
3096         (method_from_memberref): If our parent is a generic instance, pass
3097         its generic type definition to find_method() and then inflate the
3098         method.
3099         (mono_get_method_constrained): Pass the generic type definition to
3100         find_method() and inflate the method later.
3101
3102         * class-internals.h (MonoStats): Added `generic_class_count'.
3103
3104         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
3105         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
3106
3107         * reflection.c (mono_custom_attrs_from_params): Don't ignore
3108         generic type definitions.
3109
3110 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
3111
3112         * loader.c icall.c: Fix warnings.
3113
3114 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
3115
3116         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
3117         blittable types. Fixes #70864.
3118
3119 2004-12-29  Martin Baulig  <martin@ximian.com>
3120
3121         * icall.c
3122         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
3123
3124         * reflection.c (mono_method_get_object): Create a
3125         "System.Reflection.MonoGenericMethod" for inflated methods; don't
3126         call mono_get_inflated_method().
3127
3128         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
3129
3130 2004-12-27  Martin Baulig  <martin@ximian.com>
3131
3132         * class-internals.h (MonoMethod): Added `is_inflated' flag.
3133         (MonoMethodInflated): Added `inflated' field.
3134
3135         * class.c (mono_class_inflate_generic_method): Don't really
3136         inflate the method here; just set the `is_inflated' flag in the
3137         MonoMethod.
3138         (mono_class_get_inflated_method): Actually inflate the method here
3139         if it's not already inflated; we use the MonoMethodInflated's new
3140         `inflated' field as a cache.
3141
3142 2004-12-26  Martin Baulig  <martin@ximian.com>
3143
3144         * class.c
3145         (inflate_generic_class): Moved some code out of inflate_generic_type().
3146         (mono_class_inflate_generic_method): If we're already inflated,
3147         inflate the context and use the declaring method; ie. make sure
3148         the declaring method of an inflated method is always the generic
3149         method definition.
3150         (mono_class_create_from_typedef): Create
3151         `class->generic_container->context->gclass'.
3152
3153 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
3154
3155         * metadata-internals.h, marshal.c, reflection.c: More
3156         MonoGHashTable->GHashTable.
3157
3158         * domain-internals.h, class.c: Change MonoGHashTable's into
3159         GHashTables for some cases where no gc stuff is used
3160
3161         All users: update apis
3162
3163 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
3164
3165         * metadata.c (builtin_types): Make this `const'. Makes this get
3166         put into the shareable section.
3167         (mono_metadata_init): Casts to make gcc happy.
3168
3169 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
3170
3171         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
3172
3173 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
3174
3175         * icall.c: Added an internal call to retrieve the position and length
3176         of assembly-level declarative security attributes (RequestMinimum, 
3177         RequestOptional and RequestRefuse). This is used by the Assembly class
3178         to re-create the corresponding permission sets.
3179
3180 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
3181
3182         * marshal.c: fix the stelemref wrapper to be type correct
3183         (and faster).
3184
3185 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
3186
3187         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
3188         to do key & 0x7fffffff. Hashtable already does this. It just
3189         results in longer code.
3190
3191 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
3192
3193         * appdomain.c: Bump corlib version.
3194         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
3195         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
3196         * reflection.c|h: Add functions to get declarative security infos
3197         (blob position and length) for assemblies, classes and methods.
3198
3199 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
3200
3201         * reflection.c: sort the constant table (bug #70693).
3202
3203 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
3204
3205         * object-internals.h, threads.c, domain.c: add accessors for
3206         the MonoThread and MonoDomain tls keys.
3207
3208 2004-12-18  Martin Baulig  <martin@ximian.com>
3209
3210         * class.c (inflate_generic_type): If we're inflating a generic
3211         instance, set `ngclass->context->container = context->container';
3212         ie. the container we inflated into.
3213
3214         * metadata.c (mono_metadata_parse_generic_param): Reflect above
3215         inflate_generic_type() changes.
3216
3217 2004-12-17  Martin Baulig  <martin@ximian.com>
3218
3219         * class-internals.h
3220         (MonoGenericClass): Replaced `MonoType *generic_type' with
3221         `MonoClass *generic_class'.  Removed `dynamic_info'; if
3222         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
3223         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
3224
3225 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
3226
3227         * exception.c (mono_exception_from_token): New helper function.
3228
3229 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
3230
3231         * assembly.c (mono_assembly_load_with_partial_name): Call 
3232         mono_assembly_loaded before invoking the preload hooks. Fixes
3233         #70564.
3234
3235         * object-internals.h (MonoThread): Change culture_info and 
3236         ui_culture_info into an array.
3237
3238         * threads.c: Cache culture info objects from more than one appdomain.
3239
3240         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
3241         current UI culture.
3242
3243 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
3244
3245         * threads.h threads.c appdomain.c: Clear the culture_info field of
3246         all threads during unloading if they point to an object in the dying
3247         appdomain.
3248
3249 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
3250
3251         * culture-info.h (TextInfoEntry): New struct
3252         * object-internals.h: sync with managed
3253         * locales.c: fill the `text_info_data' field
3254         * culture-info-tables.h: update
3255
3256 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
3257
3258         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
3259         collector.
3260
3261 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
3262
3263         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
3264         (ves_icall_ModuleBuilder_getMethodToken): Ditto
3265
3266 2004-12-12  Martin Baulig  <martin@ximian.com>
3267
3268         * mono-debug-debugger.c (write_type): If we're an enum and the
3269         builtin types have already been initialized, call mono_class_init().
3270
3271 2004-12-11  Martin Baulig  <martin@ximian.com>
3272
3273         * metadata.c (mono_metadata_load_generic_params): Added
3274         `MonoGenericContainer *parent_container' argument; automatically
3275         compute `container->is_method'; pass the correct owner to
3276         get_constraints().      
3277
3278         * reflection.c (compare_genericparam): Sort the GenericParam table
3279         according to increasing owners. 
3280
3281 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
3282
3283         * profiler.c: allow disabling the default profiler.
3284
3285 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
3286
3287         * decimal.c, icall.c: allow disabling System.Decimal support.
3288
3289 2004-12-09  Marek Safar <marek.safar@seznam.cz>
3290
3291         * reflection.c: Add support for null attribute arguments.
3292
3293 2004-12-09  Martin Baulig  <martin@ximian.com>
3294
3295         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
3296         names to get rid of compiler warnings.
3297
3298 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
3299
3300         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
3301         mono_marshal_load_type_info (). Fixes #69625.
3302         (mono_marshal_get_ptr_to_struct): Likewise.
3303
3304 2004-12-08  Martin Baulig  <martin@ximian.com>
3305
3306         * mono-debug.h: Bumped version number to 47.
3307
3308         * mono-debug-debugger.c
3309         (mono_debugger_event_handler, mono_debugger_event): Take two
3310         guint64 arguments insteed of a gpointer and a guint32.  
3311
3312 2004-12-08  Martin Baulig  <martin@ximian.com>
3313
3314         * debug-mono-symfile.h
3315         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
3316         `address' to `native_offset'.
3317
3318 2004-12-08  Martin Baulig  <martin@ximian.com>
3319
3320         * class.c (mono_class_create_from_typespec): Only inflate if we
3321         either have `context->gclass' or `context->gmethod'.
3322
3323 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
3324
3325         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
3326
3327         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
3328
3329         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
3330
3331         * reflection.c (mono_assembly_get_object): Remove the workaround put
3332         in for the release.
3333         
3334         * appdomain.c: Use the corlib_internal field from MonoAssembly.
3335
3336         * appdomain.c: Bump corlib version.
3337
3338         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
3339         be visible in other appdomains.
3340
3341 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
3342
3343         * threads.c: Interlocked inc and dec for longs were messed up,
3344         use a KISS based impl for this. Fixes 70234
3345
3346 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
3347
3348         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
3349
3350 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
3351
3352         * icall.c: fix to follow policy not to allow struct
3353         arguments in icalls.
3354
3355 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3356
3357         * process.c: make the patch that handles spaces in file paths work
3358         on mono/windows too.
3359
3360 2004-12-06  Martin Baulig  <martin@ximian.com>
3361
3362         * class.c (mono_class_create_generic): Call
3363         mono_class_setup_supertypes() if we're dynamic.
3364         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
3365
3366 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
3367
3368         * object-internals.h: Add new fields to MonoThread.
3369
3370         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3371
3372         * icall.c threads-types.h threads.c: Add new icalls.
3373
3374         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
3375
3376         * object-internals.h (MonoReflectionAssembly): Sync object layout with
3377         managed side.
3378
3379         * appdomain.c: Bump corlib version.
3380
3381         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
3382         internal assemblies. Fixes #69181.
3383
3384 2004-12-05  Martin Baulig  <martin@ximian.com>
3385
3386         * class.c (mono_class_inflate_generic_signature): Make this a
3387         no-op if `context' is NULL or we don't have any type parameters;
3388         also copy `sentinelpos'.        
3389
3390 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
3391
3392         * image.c: Add unbox_wrapper_cache.
3393
3394         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
3395
3396         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
3397         function generator.
3398         
3399         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
3400         Fixes #70173.
3401
3402         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
3403         
3404 2004-12-04  Martin Baulig  <martin@ximian.com>
3405
3406         * loader.c (mono_method_get_signature_full): New public function;
3407         like mono_method_get_signature(), but with an additional
3408         `MonoGenericContext *' argument.
3409
3410         * class.c (mono_class_inflate_generic_signature): Formerly known
3411         as inflate_generic_signature(); make this public.
3412
3413 2004-12-04  Martin Baulig  <martin@ximian.com>
3414
3415         * metadata.c
3416         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
3417         instead of a `MonoGenericContainer *'.  
3418         (mono_metadata_parse_array_full): Likewise.
3419         (mono_metadata_parse_signature_full): Likewise.
3420         (mono_metadata_parse_method_signature_full): Likewise.
3421         (mono_metadata_parse_generic_inst): Likewise.
3422         (mono_metadata_parse_generic_param): Likewise.
3423         (mono_metadata_parse_mh_full): Likewise.
3424         (mono_type_create_from_typespec_full): Likewise.
3425
3426 2004-12-03  Martin Baulig  <martin@ximian.com>
3427
3428         * class-internals.h (MonoGenericContainer): Replaced the
3429         `MonoGenericContext * pointer with a `MonoGenericContext'
3430         structure and made it the first element.
3431
3432 2004-12-03  Martin Baulig  <martin@ximian.com>
3433
3434         * class.c
3435         (inflate_generic_type): Set the `context->container' when creating
3436         a new MonoGenericContext.
3437         (mono_class_inflate_generic_method): Likewise.
3438         (mono_class_create_from_typespec): Just use `context->container'
3439         to get the container.
3440
3441         * loader.c (method_from_methodspec): Set `context->parent' from
3442         `context->container' - and if that's a method container, use its
3443         parent.  Also set the `context->container' when creating a new
3444         MonoGenericContext.
3445         (mono_get_method_from_token): Use just `context->container' to get
3446         the container.
3447
3448         * metadata.c (do_mono_metadata_parse_generic_class): Also set
3449         `gclass->context->container'.
3450
3451         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
3452         the `context->container' when creating a new MonoGenericContext.
3453
3454 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
3455
3456         * reflection.c (compare_genericparam): Sort params with identical
3457         owner by their number. Fixes gen-111 on sparc.
3458
3459 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
3460
3461         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
3462         around the domain changes.
3463
3464         * appdomain.c (mono_domain_unload): Handle the case when the thread
3465         calling Unload is itself being aborted during unloading. Fixes #70022.
3466
3467         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
3468
3469         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
3470         checkpoint_func as an icall so it gets a wrapper.
3471         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
3472         in the cross-appdomain wrappers too.
3473
3474         * threads.c (mono_thread_has_appdomain_ref): Make this public.
3475
3476         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
3477
3478         * reflection.c: Fix some memory leaks.
3479         
3480 2004-12-02  Martin Baulig  <martin@ximian.com>
3481
3482         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
3483
3484         * metadata.c (generic_class_cache): New static hashtable.
3485         (mono_metadata_lookup_generic_class): New public method.
3486
3487 2004-12-02  Martin Baulig  <martin@ximian.com>
3488
3489         * class.c (mono_class_create_from_typedef): Call
3490         mono_class_setup_parent() and mono_class_create_mono_type() before
3491         parsing the interfaces.
3492
3493 2004-12-02  Martin Baulig  <martin@ximian.com>
3494
3495         * metadata.c (generic_inst_cache): New static hashtable.
3496         (mono_metadata_lookup_generic_inst): New public function.
3497         (mono_metadata_inflate_generic_inst): New public function.
3498         (mono_metadata_parse_generic_inst): New public function.
3499         (do_mono_metadata_parse_generic_class): Use the new
3500         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
3501         since this'll also use the cache.
3502
3503         * reflection.c (mono_reflection_bind_generic_method_parameters):
3504         Use mono_metadata_lookup_generic_inst() to use the new cache.
3505
3506         * class.c (inflate_mono_type): Use
3507         mono_metadata_inflate_generic_inst() to inflate a generic
3508         instance; this'll also use the new cache.
3509
3510         * loader.c (method_from_methodspec): Use
3511         mono_metadata_parse_generic_inst() and
3512         mono_metadata_inflate_generic_inst() rather than parsing it
3513         manually, so we can use the new cache.
3514
3515 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
3516
3517         * threads.c (wait_for_tids): Do not incorrectly free threads when 
3518         the wait times out.
3519
3520 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3521
3522         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
3523         iter->args based on whether parameters are passed in registers (i.e.
3524         MONO_ARCH_REGPARMS is defined)
3525
3526 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
3527
3528         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
3529         the exception message. Fixes #70070.
3530         (method_from_methodspec): Fix warnings.
3531
3532 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3533
3534         * process.c: (complete_path) return the path quoted
3535
3536 2004-12-01  Martin Baulig  <martin@ximian.com>
3537
3538         * class-internals.h (MonoGenericInst): New structure.
3539         (MonoGenericClass): Replaced `type_argc', `type_argv' and
3540         `is_open' with `MonoGenericInst *inst'.
3541         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
3542         `is_open' with `MonoGenericInst *inst'.
3543
3544 2004-11-30  Martin Baulig  <martin@ximian.com>
3545
3546         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
3547
3548         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
3549         to `generic_class_cache'.
3550
3551         * metadata.c
3552         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
3553         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
3554         (mono_generic_inst_is_valuetype): Renamed to
3555         mono_generic_class_is_valuetype().
3556
3557         * class-internals.h
3558         (MonoGenericInst): Renamed to MonoGenericClass.
3559         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
3560         (MonoClass): Renamed `generic_inst' to `generic_class'.
3561         (MonoGenericContext): Renamed `ginst' to `gclass'.
3562
3563         * object-internals.h
3564         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
3565
3566         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
3567         mono_reflection_generic_class_initialize().
3568
3569         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
3570         now known as "System.Reflection.MonoGenericClass".
3571         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
3572
3573 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
3574
3575         * class-internals.h: Added a flag field to MonoClass to cache the
3576         declarative security attributes actions associated with the class.
3577         * domain-internals.h: Added booleans to MonoJitInfo to cache the
3578         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
3579         applicable to the JITted method.
3580         * reflection.c|h: Added functions to extract (as flags) which security
3581         actions are available (declaratively) for a method, class or assembly.
3582         * metadata.c|h: Added functions to search the declarative security
3583         table in the metadata.
3584         
3585 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
3586
3587         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
3588         EXPORTEDTYPES are already in the class name cache, so there is no
3589         need to add extra code here to look at them. Just removes a bit of
3590         cruft.
3591
3592         (ves_icall_System_Environment_get_TickCount): No need for #if
3593         WINDOWS. We already have the code in io-layer.
3594
3595 2004-11-28  Martin Baulig  <martin@ximian.com>
3596
3597         * loader.c
3598         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
3599         Fixes gen-112.cs.
3600
3601 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
3602
3603         * assembly.c (do_mono_assembly_open): Instead of having a
3604         conditional WITH_BUNDLE, incorporate support for bundles here, by
3605         having a global `bundles' variable holding a pointer to the actual
3606         bundles. 
3607
3608         (mono_register_bundled_assemblies): New API call used by the
3609         bundle code. 
3610
3611         See mkbundle.1 for details.
3612         
3613 2004-11-27  Martin Baulig  <martin@ximian.com>
3614
3615         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
3616         the vtable for generic methods.
3617
3618 2004-11-26  Martin Baulig  <martin@ximian.com>
3619
3620         * metadata.c
3621         (mono_metadata_generic_method_hash): New public function.
3622         (mono_metadata_generic_method_equal): Likewise.
3623
3624         * class-internals.h
3625         (MonoGenericContainer): Added `GHashTable *method_hash'.
3626
3627         * reflection.c (ReflectionMethodBuilder): Added
3628         `MonoGenericContainer *generic_container'.
3629         (reflection_methodbuilder_to_mono_method): Don't create a new
3630         MonoGenericContainer each time we're called.
3631         (mono_reflection_bind_generic_method_parameters): Use
3632         `container->method_hash' to cache the results so we don't create a
3633         different method if we're called several times with the same
3634         arguments.
3635
3636         * loader.c (method_from_methodspec): Use the new
3637         `container->method_hash' here, too.
3638
3639 2004-11-26  Martin Baulig  <martin@ximian.com>
3640
3641         * class.c (inflate_generic_signature): Correctly compute
3642         `res->has_type_parameters'.
3643         (mono_class_vtable): Use the `has_type_parameters' flag to
3644         determine whether we're a generic method.
3645
3646         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
3647
3648 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
3649
3650         * object.c (mono_runtime_run_main): Fix a small memory leak.
3651
3652 2004-11-25  Martin Baulig  <martin@ximian.com>
3653
3654         * class.c (set_generic_param_owner): Fixed the loop.
3655
3656 2004-11-25  Martin Baulig  <martin@ximian.com>
3657
3658         * object.c (mono_class_vtable): Don't create any JIT wrappers for
3659         generic methods.
3660
3661 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
3662
3663         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
3664         names. Fixes #69787.
3665
3666 2004-11-24  Martin Baulig  <martin@ximian.com>
3667
3668         * class.c (mono_class_create_generic_2): If we don't have a
3669         `ginst->parent', inflate `gklass->parent' to get our parent.
3670
3671 2004-11-24  Martin Baulig  <martin@ximian.com>
3672
3673         * reflection.c (compare_genericparam): Correctly sort the
3674         GenericParam table; fixes #69779.
3675
3676 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
3677
3678         * reflection.c: When writing a PE file, don't create a huge
3679         buffer in memory. Just write the arrays we have to the file.
3680         This reduces memory usage.
3681
3682         * metadata-internals.h: MonoDynamicStream pefile is no longer used
3683         globally.
3684
3685 2004-11-17  Martin Baulig  <martin@ximian.com>
3686
3687         * class.c (mono_class_init): Don't setup `class->parent' for
3688         dynamic instances; moved this to mono_class_generic_2().
3689         (mono_class_create_generic): Also set `klass->inited' for dynamic
3690         generic instances.
3691         (mono_class_create_generic_2): Don't do anything for dynamic
3692         generic instances.  Set `klass->parent' here and also call
3693         mono_class_setup_parent() here. 
3694
3695         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
3696         `MonoType *parent' argument; set `ginst->parent' before calling
3697         mono_class_create_generic_2(), so we set the correct parent.
3698
3699 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
3700
3701         * reflection.c: allow getting attributes from ModuleBuilder
3702         (used by ikvm).
3703
3704 2004-11-17  Martin Baulig  <martin@ximian.com>
3705
3706         * class.c (mono_class_create_from_typedef): If a type parameter is
3707         inherited from an outer class, set its owner to that class.
3708
3709 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
3710
3711         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
3712           for (int*) written size. This fixes bug #69592.
3713
3714 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
3715
3716         * icall.c: Added IsAuthenticodePresnet internal call.
3717         * image.c|h: New function that check a MonoImage for an Authenticode
3718         signature in the certificate PE data directory.
3719         * security.c|h: New internal call to ask the runtime if an 
3720         Authenticode signature seems referenced in the PE header.
3721
3722 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
3723
3724         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
3725
3726         * reflection.c (mono_image_create_pefile): Free the assembly streams
3727         after writing out the assembly file.
3728
3729         * object.c (mono_runtime_run_main): Fix small memory leak.
3730
3731         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
3732         property access modifiers. Fixes #69389.
3733
3734 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
3735
3736         * domain.c, object.c, object-internals.h, domain-internals.h,
3737         object.h, marshal.c: keep dynamic code info per domain.
3738
3739 2004-11-15  Martin Baulig  <martin@ximian.com>
3740
3741         * class.c (mono_type_get_name_recurse): Put type arguments in
3742         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
3743         see bug #68387.
3744
3745 2004-11-15  Martin Baulig  <martin@ximian.com>
3746
3747         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
3748         (mono_class_setup_vtable): When computing `the_cname' for a
3749         generic instance, don't include the namespace since we'd otherwise
3750         add it twice.
3751
3752 2004-11-15  Martin Baulig  <martin@ximian.com>
3753
3754         * class.c (mono_class_create_generic): Changed return type to void.
3755         (mono_class_create_generic_2): New public function; setup
3756         `class->method', `class->field' and `class->interfaces' here
3757         instead of in mono_class_init().
3758
3759         * class.h (mono_class_create_generic): Moved to class-internals.h.
3760
3761 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
3762
3763         * reflection.c (mono_image_create_pefile): take a file HANDLE.
3764         rather than writing to memory, write to this file. Right now,
3765         we are just writting into a buffer, and copying that. However
3766         we can avoid the buffer later.
3767
3768         (mono_dynamic_stream_reset): new function
3769
3770         * icall.c, object-internals.h: update for the above.
3771
3772 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
3773
3774         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
3775         have been using gc'd memory. First it is slower, unlikely
3776         the comment in the source code said, secondly, it increases
3777         our footprint to do it in the gc.
3778
3779         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
3780         the method so that it does not have to copy to managed code.
3781
3782 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
3783
3784         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
3785
3786 2004-11-12  Martin Baulig  <martin@localhost>
3787
3788         * reflection.c (mono_image_create_token): Allow generic method
3789         definitions here, since they may appear in an `.override'; see
3790         gen-98/gen-99 for an example.
3791
3792 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
3793
3794         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
3795         #69365.
3796
3797         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
3798         descriptive.
3799
3800 2004-11-11  Martin Baulig  <martin@ximian.com>
3801
3802         * class.c (mono_class_setup_vtable): In an explicit interface
3803         implementation, the method name now includes the arity.
3804
3805 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
3806
3807         * object.c (mono_array_full_copy): Fix warning.
3808
3809 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
3810
3811         * appdomain.c: Removed look_for_method_by_name(). Use the new method
3812         mono_class_get_method_from_name() instead.
3813         
3814         * class-internals.h: Added two new types of wrappers. 
3815         Added MonoRemotingTarget enum. Added new trampoline function type, which
3816         takes an additional MonoRemotingTarget value as parameter, so it is
3817         possible to request a trampoline for a specific target.
3818         
3819         * class.c: Added new mono_class_get_method_from_name() method.
3820         
3821         * class.h: In MonoRemoteClass, we can have now to vtables, one for
3822         general remoting sinks and one specific for cross domain calls.
3823         
3824         * debug-helpers.c: Added new wrapper names.
3825         
3826         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
3827         of a remote class.
3828         
3829         * image.c: Porperly delete value objects form the remoting invoke hashtable.
3830         
3831         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
3832         with several other methods (mono_marshal_get_xappdomain_dispatch,
3833         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
3834         and others) can generate a fast remoting wrapper for cross domain calls.
3835         More information can be found in docs/remoting.
3836         Other changes: Removed mono_find_method_by_name, and used
3837         mono_class_get_method_from_name instead.
3838         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
3839         is stored in the remoting invoke hashtable.
3840         
3841         * marshal.h: published the new method for getting the xdomain wrapper,
3842         and also added a method for getting the adequate wrapper for a given
3843         method and target.
3844         
3845         * object-internals.h, object.c: Added a couple of methods for capying and
3846         cloning arrays.
3847         Modified mono_install_remoting_trampoline, which takes the new remoting
3848         trampoline that has a remoting target as parameter.
3849         mono_class_proxy_vtable now also takes a remoting target as parameter, and
3850         will return the most suitable vtable for the target.
3851         Added mono_remote_class_vtable, which returns the vtable of a remote class
3852         (which can be the normal remoting vtable or the xdomain vtable).
3853         
3854         * threads.c: the xdomain invoke and dispatch wrappers must also be
3855         protected against interruptions.
3856
3857 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3858
3859         * icall.c: use memmove in BlockCopyInternal when the source and
3860         destination arrays are the same.
3861
3862 2004-11-09  Martin Baulig  <martin@ximian.com>
3863
3864         * class-internals.h (MonoGenericContainer): Removed `method' and
3865         `signature', replaced them with `is_method' and `is_signature'
3866         flags.  Added `context'.
3867
3868         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
3869         instead of a `MonoGenericContainer *'.
3870
3871         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
3872         for dynamic type parameters.
3873         (mono_metadata_load_generic_params): Setup `container->context'.
3874
3875         * reflection.c (mono_reflection_setup_generic_class): Setup
3876         `tb->generic_container->context'.
3877         (do_mono_reflection_bind_generic_parameters): Use
3878         mono_class_inflate_generic_type() to correctly inflate types,
3879         rather than using our own hack just for MONO_TYPE_VAR.
3880
3881 2004-11-09  Martin Baulig  <martin@ximian.com>
3882
3883         * class.c (mono_class_inflate_generic_method): Small fix; don't
3884         crash here.
3885
3886         * icall.c
3887         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
3888         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
3889         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
3890         (ves_icall_Type_BindGenericParameters): Likewise.
3891         (ves_icall_Type_get_IsGenericInstance): Likewise.
3892         (ves_icall_Type_GetGenericParameterPosition): Likewise.
3893         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
3894         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
3895         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
3896
3897 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
3898
3899         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
3900         assembly versions and public key tokens. Fixes #69113.
3901
3902 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
3903
3904         * metadata.c: fix bug introduced with the type cache changes
3905         on 2004-11-06.
3906
3907 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
3908
3909         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
3910         the MonoClass pointer instead of the token in exception clauses.
3911         * reflection.c: updates for the above and make the code not depend
3912         on the structure of MonoExceptionClause.
3913
3914 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
3915
3916         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
3917         Add support for dynamic assemblies. Fixes #69114.
3918
3919         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
3920
3921 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
3922
3923         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
3924         since most only those methods use it. the code member of
3925         MonoMethodPInvoke was dead, so that can be removed too. Also,
3926         remove inline_count (again, not used), and move slot so that it
3927         can share bits with some other flags. This saves 8 bytes in the
3928         structure and gives us about 50 kb back for mcs helloworld.cs
3929
3930         * *.[ch]: Do naming changes for the above.
3931
3932         * loader.c (mono_method_get_header): Lazily init the header
3933         on first access.
3934         (mono_get_method_from_token): don't init the header here
3935         (mono_free_method): the header may never be allocated
3936
3937         Overall, this saves 150 kb of unmanaged allocations
3938         for mcs helloworld.cs. That accounts for 10% of the unmanaged
3939         memory at runtime.
3940         
3941         * loader.c, loader.h (mono_method_get_header): new accessor.
3942
3943         * *.[ch]: use the above method. Prepares us to lazily load
3944         the header.
3945
3946         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
3947         three warnings, which are actual bugs (see 69206).
3948
3949         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
3950         unused. Saves a cool 4 bytes / method.
3951
3952 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
3953
3954         * metadata.c (builtin_types): Add types for System.Object here.
3955         (mono_metadata_parse_type_full): Cache MonoType*'s that are
3956         for a class or valuetype from klass->this_arg or klass->byval_arg.
3957
3958         On mcs for a hello world, this gets us down from 21836 MonoType's
3959         to 14560.
3960
3961         (mono_metadata_free_type): Account for the above change.
3962
3963 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
3964
3965         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
3966         exception instead of asserting if name is null.
3967         (ves_icall_System_AppDomain_GetData): Ditto.
3968
3969 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
3970
3971         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
3972         EnumBuilder.
3973
3974         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
3975         Return NULL when the domain does not have entry_assembly set.
3976
3977         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
3978         Add a 'resource_modules' argument.
3979         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
3980
3981         * reflection.c (mono_reflection_create_runtime_class): Move setting
3982         of wastypebuilder here, so mono_get_type_object () returns a MonoType
3983         for enums too.
3984
3985         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
3986         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
3987         Throw an ArgumentNullException if 'ptr' is null.
3988
3989         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
3990         assemblies here. Fixes #69020.
3991
3992 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
3993
3994         * reflection.c (build_compressed_metadata): Fix the previous patch for
3995         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
3996         the stack.
3997
3998 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
3999
4000         * assembly.c (mono_assembly_names_equal): Allow a match if one of
4001         the cultures is false. Fixes #69090.
4002
4003         * reflection.c (build_compressed_metadata): Fix invalid memory read 
4004         detected by valgrind.
4005         
4006         * reflection.c (mono_reflection_get_type): Avoid triggering a 
4007         TypeResolve multiple times for the same type. Fixes #65577.
4008
4009 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
4010
4011         * marshal.c: Avoid using ldftn to call managed functions. It is
4012         much slower than just a call.
4013
4014         * reflection.c (mono_module_get_object): free the basename we
4015         allocate here from glib.
4016         
4017         * reflection.c (ensure_runtime_vtable): make sure to free
4018         overrides.  Also, we were allocating an array of MonoMethod not an
4019         array of MonoMethod*.
4020
4021         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
4022
4023         * image.c (mono_image_close): free image->guid here.
4024
4025 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
4026
4027         * reflection.c: Fix some spec conformance issues with the PE file
4028         structures so mcs compiled apps run on the Net 2.0 beta.
4029
4030 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
4031
4032         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
4033         Implement this. Fixes #67264.
4034
4035         * debug-helpers.h debug-helpers.c marshal.c: Move 
4036         mono_find_method_by_name to debug-helpers.c.
4037
4038 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
4039
4040         * object.c (mono_release_type_locks): type_initialization_hash is
4041         a GHashTable.
4042
4043         * reflection.c object.c object-internals.h: Fix warnings.
4044
4045         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
4046         without accessors. Fixes #61561.
4047
4048         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
4049         application base from the root domain if not set. Fixes #65641.
4050         (mono_runtime_init): Fix warning.
4051
4052 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4053
4054         * appdomain.c: call mono_thread_pool_init.
4055         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
4056         of worker threads based on the number of CPUs and the environment
4057         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
4058         for non-windows (windows) systems.
4059
4060 2004-10-27  Chris Toshok  <toshok@ximian.com>
4061
4062         * mono-debug-debugger.c (write_class): don't call mono_class_init
4063         here, as even with the check for (!klass->init_pending), we get
4064         into a situation where we're hitting cycles in class
4065         initialization.  Fixes #68816.
4066
4067 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
4068
4069         * image.c: Avoid overwriting values in the loaded_images_hash when an
4070         assembly is loaded multiple times. Fixes #61152.
4071
4072         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
4073         so multiple satellite assemblies for the same name can be loaded.
4074         Fixes #68259.
4075
4076         * mono_domain_assembly_preload: Actually return the loaded assembly, 
4077         not NULL.
4078
4079         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
4080         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
4081
4082         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
4083         pending finalizers are not invoked after the appdomain has been 
4084         unloaded. Fixes #67862.
4085
4086 2004-10-22  Martin Baulig  <martin@ximian.com>
4087
4088         * mono-debug-debugger.c
4089         (mono_debugger_runtime_invoke): Don't box valuetypes.
4090
4091 2004-10-22  Chris Toshok  <toshok@ximian.com>
4092
4093         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
4094         don't hide private methods.
4095
4096 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
4097
4098         * icall.c: Allows the runtime to "share" (when known) the public key
4099         token of an assembly. This avoid the need to recalculate the token 
4100         (from the public key) in managed code.
4101
4102 2004-10-21  Chris Toshok  <toshok@ximian.com>
4103
4104         * debug-helpers.c (append_class_name): argh, revert last patch.
4105         
4106 2004-10-21  Chris Toshok  <toshok@ximian.com>
4107
4108         * debug-helpers.c (append_class_name): use '+' as the delimiter,
4109         not '/', so that it matches what the debugger uses to look up
4110         methods.
4111
4112 2004-10-21  Martin Baulig  <martin@ximian.com>
4113
4114         * mono-debug-debugger.c (mono_debugger_throw_exception): New
4115         public method; this is called each time an exception is thrown and
4116         allows the debugger to use exception catch points.
4117
4118 2004-10-21  Martin Baulig  <martin@ximian.com>
4119
4120         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
4121         the stack pointer and the exception object in some struct and pass
4122         that to the debugger.
4123
4124 2004-10-21  Chris Toshok  <toshok@ximian.com>
4125
4126         * mono-debug-debugger.c (do_write_class): add instance/static
4127         event support.  We don't expose "raise" or "other" yet.
4128         (event_is_static): new method.
4129
4130 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
4131
4132         * mono-debug-debugger.c
4133         (mono_debugger_handle_exception): Remove
4134         bogus return value for fussy compilers.
4135
4136 2004-10-20  Martin Baulig  <martin@ximian.com>
4137
4138         * mono-debug-debugger.c
4139         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
4140         (mono_debugger_handled_exception): Likewise.
4141
4142 2004-10-20  Martin Baulig  <martin@ximian.com>
4143
4144         * mono-debug-debugger.h (MonoDebuggerEvent): Added
4145         MONO_DEBUGGER_EVENT_EXCEPTION.
4146
4147         * mono-debug-debugger.c (mono_debugger_handle_exception): New
4148         public function to send the debugger a notification for an
4149         exception and inform it about a catch/finally clause.
4150
4151 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
4152
4153         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
4154         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
4155         fix 2.95 build. 
4156
4157         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
4158
4159 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
4160
4161         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
4162         marshalled as [In,Out]. Fixes #58325.
4163
4164 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
4165
4166         * reflection.c (mono_method_body_get_object): Implement some fields.
4167
4168 2004-10-12  Martin Baulig  <martin@ximian.com>
4169
4170         * reflection.c (mono_reflection_bind_generic_parameters): Small
4171         fix, correctly retrieve our parent from a generic instance.
4172
4173 2004-10-12  Martin Baulig  <martin@ximian.com>
4174
4175         * metadata.c (mono_metadata_generic_param_equal): We always have
4176         an owner.
4177
4178         * class.c
4179         (mono_class_from_generic_parameter): We need to have an owner.
4180         (my_mono_class_from_generic_parameter): Likewise.
4181
4182         * reflection.c (mono_reflection_setup_generic_class): Renamed to
4183         mono_reflection_create_generic_class() and added a new
4184         mono_reflection_setup_generic_class().  
4185         (mono_reflection_initialize_generic_param): If we're a nested
4186         generic type and inherited from the containing class, set our
4187         owner to the outer class.
4188
4189 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
4190
4191         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
4192
4193         * reflection.c (mono_method_body_get_object): New function to create
4194         a MethodBody object.
4195
4196         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
4197
4198 2004-10-11  Martin Baulig  <martin@ximian.com>
4199
4200         * metadata.c (_mono_metadata_type_equal): Renamed to
4201         do_mono_metadata_type_equal() and made static.
4202
4203 2004-10-11  Martin Baulig  <martin@ximian.com>
4204
4205         * appdomain.c: Bump corlib version number to 28.
4206
4207 2004-10-10  Martin Baulig  <martin@ximian.com>
4208
4209         * class-internals.h
4210         (MonoGenericInst): Added `MonoGenericContainer *container'.
4211         (MonoGenericMethod): Likewise.
4212         (MonoGenericContext): Likewise.
4213         (MonoGenericParam): Added `MonoGenericContainer *owner'.
4214
4215         * metadata.c
4216         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
4217         (do_mono_metadata_parse_generic_inst): Likewise.
4218         (mono_metadata_parse_type_full): New public method.  This is the actual
4219         mono_metadata_parse_type() implementation - with an additional
4220         `MonoGenericContainer *' argument.
4221         (mono_metadata_parse_array_full): Likewise.
4222         (mono_metadata_parse_signature_full): Likewise.
4223         (mono_metadata_parse_method_signature_full): Likewise.
4224         (mono_metadata_parse_mh_full): Likewise.
4225         (mono_type_create_from_typespec): Likewise.
4226         (mono_metadata_interfaces_from_typedef_full): New public method;
4227         this is similar to the other _full() methods, but we take a
4228         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
4229         (mono_metadata_parse_generic_param): Take an additional
4230         `MonoGenericContainer *' argument and lookup the MonoGenericParam
4231         from that container.
4232         (mono_metadata_generic_param_equal): New static method to compare
4233         two type parameters.
4234         (_mono_metadata_type_equal): New static method; takes an
4235         additional `gboolean signature_only' argument - if true, we don't
4236         compare the owners of generic parameters.
4237         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
4238         with a TRUE argument - do a signature-only comparision.
4239
4240         * loader.c: Use the new _full() methods and pass the
4241         MonoGenericContainer to them.
4242
4243         * object-internals.h (MonoReflectionTypeBuilder): Added
4244         `MonoGenericContainer *generic_container' field.
4245         (MonoReflectionMethodBuilder): Likewise.
4246
4247 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
4248
4249         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
4250         case initial images of dynamic assemblies.
4251
4252         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
4253
4254         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
4255
4256         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
4257         length of event->other array.
4258         (typebuilder_setup_events): Ditto.
4259
4260         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
4261         'assembly_by_name' and add an 'assemblies' list.
4262
4263         * assembly.h assembly.c: Add a new search hook for determining whenever
4264         an assembly is already loaded. Use this instead of searching in the
4265         loaded_assemblies list.
4266
4267         * domain.c appdomain.c: Implement the new search hook so loaded 
4268         assemblies are now scoped by appdomain. Fixes #67727.
4269
4270 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
4271
4272         * threads.c (mono_thread_attach): Initialize synch_lock field so
4273         mono_thread_detach works again.
4274
4275         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
4276         'lib' too. Fixes #63130.
4277
4278 2004-10-06  Jackson Harper  <jackson@ximian.com>
4279
4280         * culture-info-tables.h: regenerated.
4281
4282 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
4283
4284         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
4285         implemented by other interfaces in the result. Fixes #65764.
4286         
4287         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
4288         Handle unloadable modules without crashing.
4289
4290         * image.c (load_modules): Revert the previous patch since modules must
4291         have a fixed index inside the array.
4292         
4293         * image.c (load_modules): Don't include native modules in the modules
4294         array.
4295
4296 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
4297
4298         * reflection.h: Add param_defaults field.
4299
4300         * reflection.c: Add support for parameter defaults in dynamic methods.
4301         Fixes #64595.
4302
4303         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
4304         an empty string when a type has no namespace. Fixes #64230.
4305
4306 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
4307
4308         * tabledefs.h: Added "internal" security actions to support non-CAS
4309         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
4310         Note: they do not seems to be used anymore in 2.0 (new metadata format)
4311
4312 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
4313
4314         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
4315         constructor of abstract class. Fixes #61689.
4316
4317 2004-10-04  Martin Baulig  <martin@ximian.com>
4318
4319         * class-internals.h (MonoGenericContainer): New type.
4320         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
4321         `MonoGenericContainer *generic_container'.
4322         (MonoClass): Replaced `gen_params' and `num_gen_params' with
4323         `MonoGenericContainer *generic_container'.
4324
4325         * metadata.c (mono_metadata_load_generic_params): Return a
4326         `MonoGenericContainer *' instead of a `MonoGenericParam *';
4327         removed the `num' argument.
4328
4329 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
4330
4331         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
4332         for dynamic images.
4333
4334         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
4335         machine fields.
4336
4337         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
4338
4339         * reflection.c: Save pe_kind and machine values into the generated
4340         image file.
4341
4342         * appdomain.c: Bump corlib version number.
4343
4344         * object-internals.h: Reorganize layout of LocalBuilder.
4345
4346         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
4347         New helper function.
4348
4349         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
4350         created MonoType for dynamic types. Fixes #66180.
4351
4352 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
4353
4354         * threadpool.c: the ares hashtable needs a critical section around it.
4355         this prevents some nasty segfaults
4356
4357 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
4358
4359         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
4360         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
4361         bug 67324).
4362         
4363 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
4364
4365         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
4366         
4367 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
4368
4369         * image.c: Always canonicalize image file names, to avoid loading
4370         the same assembly twice when referenced using a relative path.
4371
4372 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
4373
4374         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
4375
4376         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
4377
4378         * marshal.c: Fix warnings.
4379
4380 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
4381
4382         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
4383         attempting to marshal the delegate_trampoline as the method_addr.
4384         This patch has a static hashtable of marshalled delegates so that 
4385         we can map delegate_trampoline addresses back to delegates.  This
4386         allows a delegate passed to managed code to be passed back into native
4387         code.  Fixes #67039
4388
4389 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
4390
4391         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
4392
4393         * reflection.c (method_encode_code): Align method headers properly.
4394         Fixes #66025.
4395
4396 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
4397
4398         * marshal.c: In the runtime invoke wrapper, reset the abort
4399         exception if it is cached. This avoids the automatic rethrowal of 
4400         the exception after the catch of the wrapper. Also check for pending
4401         interruptions before calling the managed method. This is done using
4402         the new method emit_thread_force_interrupt_checkpoint, since the
4403         normal checkpoint method is ignored when running the invoke wrapper.
4404         * object.c: If the abort exception is rethrown, set the abort_exc
4405         field of the thread, so it will be rethrown aftere every catch.
4406         * threadpool.c: Only run an interruption checkpoint if what has been
4407         requested is a stop of the thread (aborts will be ignored).
4408         * threads.c: By default, a thread will now never be interrumped while
4409         running the runtime invoke wrapper (this ensures that runtime_invoke
4410         will always return to the caller if an exception pointer is provided).
4411         There is a new special method mono_thread_force_interruption_checkpoint()
4412         to force an interruption checkpoint even if running a protected
4413         wrapper, which is used by the same runtime invoke wrapper to do a check
4414         at a safe point.
4415
4416 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
4417
4418         * object.c, object-internals.h: Implemented mono_release_type_locks,
4419         which releases the cctor locks held by a thread.
4420         * threads.c, threads.h: In thread_cleanup, release cctor locks held
4421         by a thread. Added mono_thread_exit() method to be used to safely stop
4422         a thread.
4423
4424 2004-09-28  Raja R Harinath  <rharinath@novell.com>
4425
4426         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
4427         Move null check before dereference.  Avoid indexing beyond the end
4428         of the 'modules' array.
4429
4430 2004-09-28  Raja R Harinath  <rharinath@novell.com>
4431
4432         * metadata-internals.h (MonoImage): Add module_count field.
4433         * image.c (load_modules): Set image->module_count.
4434         (mono_image_load_file_for_image): Use image->module_count.
4435         * reflection.c (mono_image_load_module): Append to image->modules array 
4436         of dynamic assembly.
4437         (mono_module_get_object): Fix loop to actually increment index.
4438         Use image->module_count.
4439         * assembly.c (mono_assembly_load_references): Use image->module_count.
4440         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4441         Likewise.
4442
4443 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
4444
4445         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
4446         Avoid assert on generic types.
4447
4448 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
4449
4450         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
4451
4452         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
4453
4454         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
4455         function to convert a MarshalSpec structure to its managed counterpart.
4456
4457         * reflection.c: Fix warnings.
4458         
4459         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
4460         field.
4461
4462         * icall.c (mono_create_icall_signature): Fix build.
4463
4464 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
4465
4466         * icall.c: Add MakePointType icall.
4467
4468         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
4469         warnings.
4470
4471 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4472
4473         * threadpool.c: reuse allocated slots in the queue.
4474
4475 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
4476
4477         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
4478
4479         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
4480
4481         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
4482         previous change.
4483
4484         * tabledefs.h: Add constants for pinvoke attributes BestFit and
4485         ThrowOnUnmappableChar.
4486
4487         * icall.c (ves_icall_Type_GetPacking): New icall.
4488
4489 2004-09-24  Martin Baulig  <martin@ximian.com>
4490
4491         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
4492
4493 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4494
4495         * appdomain.c:
4496         (mono_domain_set): allow setting a domain that is being unloaded.
4497         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
4498         being unloaded.
4499
4500 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
4501
4502         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
4503         the GetCustomAttributes icall.
4504
4505 2004-09-23  Martin Baulig  <martin@ximian.com>
4506
4507         * object-internals.h (MonoReflectionGenericParam): Replaced
4508         'has_ctor_constraint', `has_reference_type' and `has_value_type'
4509         with `guint32 attrs'.
4510
4511 2004-09-23  Martin Baulig  <martin@ximian.com>
4512
4513         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
4514
4515 2004-09-23  Martin Baulig  <martin@ximian.com>
4516
4517         * object-internals.h (GenericParameterAttributes): New enum.
4518
4519 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
4520
4521         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
4522         
4523         * class.c (init_events): Fill out event->other field.
4524
4525         * class.c: Fix warnings.
4526
4527         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
4528
4529 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
4530
4531         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
4532         walk which doesn't supply the IL offset.
4533
4534 2004-09-22  Martin Baulig  <martin@ximian.com>
4535
4536         * reflection.c (mono_reflection_setup_internal_class): If we're
4537         System.ValueType, System.Object or System.Enum, set
4538         `klass->instance_size' and create the vtable.
4539         (mono_reflection_create_internal_class): If we're an enum type,
4540         get the base class from our current corlib.
4541
4542 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
4543
4544         * reflection.h (MonoResolveTokenError): New type.
4545
4546         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
4547         icall.
4548
4549         * icall.c: Add an 'error' argument to the ResolveToken icalls.
4550
4551 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
4552
4553         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
4554         Support also calling constructors, but only for already allocated objects.
4555
4556 2004-09-17  Geoff Norton <gnorton@customerdna.com>
4557
4558         * reflection.c (type_get_qualified_name): If the klass is null
4559         return the typename to avoid a NullRefEx.
4560         (encode_cattr_value): Get the qualified name of the boxed type,
4561         not the underlying enumtype.  Fixes #62984.
4562
4563 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
4564
4565         * marshal.c: Fix problems with previous checkin.
4566
4567 2004-09-21    <vargaz@freemail.hu>
4568
4569         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
4570         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
4571
4572         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
4573
4574 2004-09-21  Geoff Norton <gnorton@customerdna.com>
4575
4576         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
4577         should only return a type for pointers, arrays, and passbyref types.
4578         Fixes bug #63841.
4579
4580 2004-09-21  Martin Baulig  <martin@ximian.com>
4581
4582         * domain.c (mono_debugger_check_runtime_version): New public
4583         function.
4584
4585         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
4586
4587 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
4588
4589         * reflection.c: Added missing sort to the declarative security 
4590         attributes table. MS implementation stops seeing the attributes if the
4591         token number regress in the table (as shown by ildasm and permview).
4592
4593 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
4594
4595         * object-internals.h (MonoReflectionModule): Add 'token' field.
4596         
4597         * reflection.c (mono_reflection_get_token): Add support for Module
4598         and Assembly.
4599         (mono_module_get_object): Set 'token' field.
4600         (mono_module_file_get_object): Set 'token' field.
4601
4602         * icall.c: Add new Assembly and Module icalls.
4603
4604         * appdomain.c: Bump corlib version.
4605
4606 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
4607
4608         * loader.h loader.c class.h class.c: Add helper functions for obtaining
4609         tokens of metadata objects.
4610
4611         * reflection.h reflection.c (mono_reflection_get_token): New function
4612         to obtain the token of a metadata object.
4613
4614         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
4615
4616 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
4617
4618         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
4619         
4620         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
4621
4622 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
4623
4624         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
4625         * object-internals.h: Added 3 MonoArray* members to MonoReflection
4626         AssemblyBuilder to access the permissions set in the class lib.
4627         * reflection.c: Added security attributes encoding step in 
4628         mono_image_build_metadata.
4629         * tabledefs.h: Added new security actions defined in 2.0:
4630         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
4631
4632 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
4633
4634         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
4635         macro parameter.
4636
4637 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
4638  
4639         * locales.c: nullify the ICU_collator member of CompareInfo when it is
4640           finalized. There where random SIGSEVs at program termination, when
4641           an object being finalized was trying to do a string comparison and
4642           the current culture was already finalized.
4643  
4644 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4645
4646         * threads.c: call thread_cleanup before finishing the thread if we get
4647         there.
4648
4649 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
4650
4651         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
4652         assemblies from the parent. Fixes #65665.
4653
4654 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
4655
4656         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
4657         modifiers.
4658
4659 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
4660
4661         * reflection.h: add prototype for mono_get_dbnull_object
4662         * reflection.c: add prototypes for get_default_param_value_blobs 
4663         and mono_get_object_from_blob for fussier compilers
4664
4665 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
4666  
4667         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
4668         false deadlock checks in class initialization.
4669  
4670 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
4671
4672         * image.c (mono_image_addref): Fix comment.
4673
4674         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
4675         possible.
4676
4677 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
4678
4679         * reflection.c (mono_param_get_objects): Modified to return
4680         ParameterInfo.DefaultValue object.
4681
4682         (get_default_param_value_blobs):
4683         (mono_get_object_from_blob):
4684         (mono_get_dbnull_object): New helper routines. 
4685
4686         * object.c (mono_get_constant_value_from_blob): New helper routine
4687         carved out from get_default_field_value ()
4688
4689         * object-internals.h (mono_get_constant_value_from_blob): Added
4690         function declaration.
4691
4692 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
4693
4694         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
4695         referenced assemblies. Fixes #62135.
4696
4697         * exception.h exception.c (mono_get_exception_file_not_found2): New
4698         helper function.
4699
4700 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
4701
4702         * class.h class.c: Add mono_type_get_underlying_type ().
4703
4704 2004-09-09  Geoff Norton <gnorton@customerndna.com>
4705
4706         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
4707         Fix GetTypes() to support dynamically created assemblies.
4708
4709 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
4710
4711         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
4712         
4713         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
4714         previous patch.
4715
4716         * reflection.h reflection.c loader.c: Allow dynamic construction of
4717         pinvoke methods. Fixes #65571.
4718         
4719         * reflection.c (mono_reflection_get_type): Revert previous change since
4720         it causes regressions.
4721
4722 2004-09-08  Martin Baulig  <martin@ximian.com>
4723
4724         * class.c (class_compute_field_layout): Don't call
4725         mono_class_layout_fields() for open generic instances.
4726
4727 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
4728         * threads.c appdomain.c: fix typo in GC macro
4729
4730 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4731
4732         * threads.c: don't call mono_thread_detach() in start_wrapper(),
4733         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
4734
4735 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
4736
4737         * image.c (mono_image_close): Applied patch from 
4738         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
4739         assembly is loaded multiple times from data.
4740         
4741         * image.c (mono_image_open): Fix warning.
4742
4743 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
4744
4745         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
4746         once. Fixes #58334.
4747         
4748         * reflection.c (mono_reflection_create_runtime_class): Initialize
4749         klass->nested_classes. Fixes #61224.
4750
4751 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
4752
4753         * threads.c: sched_yield() on exit, to allow threads to quit.
4754
4755 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
4756
4757         * object.c (mono_unhandled_exception): Remove leftover debug code.
4758
4759 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
4760
4761         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
4762
4763 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
4764
4765         * marshal.c (emit_marshal_array): Really null terminate string arrays.
4766         
4767         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
4768
4769 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
4770
4771         * marshal.c (emit_marshal_array): Null terminate string arrays.
4772         
4773         * marshal.c (raise_auto_layout_exception): Fix warning.
4774
4775         * reflection.c (mono_param_get_objects): Initialize the default value
4776         with DBNull.Value, not null. Fixes #62123.
4777
4778 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
4779
4780         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
4781         throw an exception with a cute explanation.
4782
4783 2004-09-06  Dick Porter  <dick@ximian.com>
4784
4785         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
4786         Close the new process's thread handle, as we don't use it.  The
4787         handle stays around forever otherwise.
4788
4789 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
4790
4791         * object.c (arith_overflow): Fix warning.
4792
4793         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
4794         calling conventions in method refs. Fixes #65352.
4795
4796         * reflection.c: Fix warnings.
4797
4798 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
4799
4800         * icall.c: Add a new icall for Array.Clear
4801
4802 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
4803
4804         * object.c: When allocating an array, we have to throw
4805         an overflow exception if any of the lengths are < 0.
4806
4807 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
4808
4809         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
4810         properly. Also move implementation of string array marshalling to 
4811         managed code. Fixes #42316.
4812
4813 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4814
4815         * assembly.c: provide more information when loading an assembly fails.
4816
4817 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4818
4819         * filewatcher.c: don't expect the development fam package to be
4820         installed.
4821
4822 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
4823
4824         * marshal.c: Make a copy of the signature cookie since it will be
4825         freed by the caller.
4826         
4827         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
4828
4829         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
4830
4831         * metadata.c (mono_metadata_free_marshal_spec): New function to free
4832         marshal specs.
4833
4834         * marshal.c: More refactoring.
4835         
4836         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
4837         smaller functions.
4838
4839 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
4840
4841         * object.c: In mono_message_invoke, fill the output parameter array after
4842           calling the managed method (it was done before the call). This fixes
4843           bug #59299.
4844
4845 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
4846
4847         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
4848         as well.
4849
4850 2004-09-02  Martin Baulig  <martin@ximian.com>
4851
4852         * class.c (mono_class_instance_size): Don't allow generic type
4853         definitions or open generic instances.
4854         (mono_class_array_element_size): If we're a value type, call
4855         mono_class_instance_size() on the original class.
4856
4857         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
4858         handle generic instances.
4859
4860         * mono-debug-debugger.c (write_type): Handle generic instances
4861         like classes.
4862
4863 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
4864
4865         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
4866         the allocation request fails. Fixes #65089.
4867
4868         * object.c (mono_runtime_free_method): Do not call mono_free_method.
4869         
4870         * object.c (mono_runtime_free_method): New function to free a dynamic
4871         method.
4872
4873         * marshal.c (mono_delegate_free_ftnptr): New function to free the
4874         delegate trampoline.
4875
4876         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
4877         with hasthis as dynamic,
4878
4879         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
4880
4881         * domain.c (mono_jit_info_table_remove): New function to remove an
4882         entry from the jit info table.
4883
4884         * class-internals.h (MonoMethod): Add 'dynamic' field.
4885
4886         * loader.c: Fix warnings.
4887
4888 2004-09-01  Martin Baulig  <martin@ximian.com>
4889
4890         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
4891         instead of mono_debugger_lock() because the latter one is a no-op
4892         unless running in the debugger.
4893
4894 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
4895
4896         * class.c (class_compute_field_layout): Classes with auto-layout or
4897         reference fields are not blittable.
4898         
4899 2004-09-01  Dick Porter  <dick@ximian.com>
4900
4901         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
4902         mono_image_get_filename() to get the assembly location.
4903
4904         * icall.c:
4905         * metadata.h: Fix compile warnings
4906
4907 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
4908
4909         * class.c (class_compute_field_layout): System.Object is blittable.
4910
4911         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
4912         as in/out. Fixes #59909.
4913
4914 2004-09-01  Martin Baulig  <martin@ximian.com>
4915
4916         * metadata.h (MONO_TYPE_ISREFERENCE): Call
4917         mono_metadata_generic_inst_is_valuetype() if we're a generic
4918         instance to check whether our underlying type is a reference type.
4919
4920 2004-09-01  Martin Baulig  <martin@ximian.com>
4921
4922         * metadata.c (mono_type_size): If we're a generic instance, call
4923         mono_class_value_size() for value types.
4924
4925 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
4926
4927         * marshal.c: Implement more custom marshalling functionality. Fixes
4928         #64915.
4929
4930 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
4931
4932         * mono-debug.c, debug-mono-symfile.c: add some locking love.
4933
4934 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
4935
4936         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
4937
4938         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
4939
4940         * icall.c: Fix some warnings.
4941
4942         * threads.c (abort_appdomain_thread): Fix unref errors.
4943         (mono_thread_current): Fix THREAD_DEBUG define.
4944
4945 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
4946
4947         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
4948
4949         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
4950
4951 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
4952
4953         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
4954         string arrays.
4955
4956 2004-08-28  Martin Baulig  <martin@ximian.com>
4957
4958         * metadata.c
4959         (mono_metadata_generic_inst_is_valuetype): New public function.
4960
4961         * metadata.h (MONO_TYPE_ISSTRUCT): Call
4962         mono_metadata_generic_inst_is_valuetype() if we're a generic
4963         instance to check whether our underlying type is a valuetype.
4964
4965 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
4966
4967         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
4968         #63768.
4969
4970 2004-08-25  Martin Baulig  <martin@ximian.com>
4971
4972         * loader.c (mono_get_method_from_token): Abstract methods can also
4973         be generic and thus have type parameters.
4974
4975         * metadata-internals.h
4976         (MonoDynamicImage): Added `GPtrArray *gen_params'.
4977
4978         * reflection.c (mono_image_get_generic_param_info): Don't create a
4979         metadata row, just add an entry to the `gen_params' array.
4980         (build_compressed_metadata): Sort the `gen_params' array and then
4981         actually create the metadata.
4982
4983 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4984
4985         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
4986
4987 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
4988
4989         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
4990
4991 2004-08-24  Martin Baulig  <martin@ximian.com>
4992
4993         * class.cs (mono_class_is_subclass_of): Like an interface, a
4994         generic instance also derives from System.Object.
4995
4996 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
4997
4998         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
4999         custom modifiers to be in any order. Fixes #61990.
5000
5001 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
5002
5003         * object.c: Register mono_object_new_fast icall.
5004         
5005         * object.c (mono_class_get_allocation_ftn): Return to calling
5006         mono_object_new_fast, since it seems faster to compute the object 
5007         size in unmanaged code than passing it as a parameter.
5008
5009         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
5010
5011         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
5012         this function with Boehm as the oom handler, so we don't have to check
5013         the result of GC_malloc.
5014
5015         * object.c: Remove checks for oom.
5016
5017         * object.h object.c (mono_class_get_allocation_ftn): New function to
5018         return the icall which can be used to allocate an instance of a given
5019         class. 
5020
5021         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
5022
5023         * class-internals.h: Add 'enabled' field.
5024
5025 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
5026
5027         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
5028
5029 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
5030         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
5031         value 0x0010.
5032
5033 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
5034
5035         * appdomain.c: use the Tls function for appdomain too,
5036         at Zoltan's request. Actually return in mono_context_get
5037
5038         * appdomain.c, profiler.c, threads.c: use __thread
5039
5040 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
5041
5042         * appdomain.c threads.c: Call GC_CreateThread on windows.
5043
5044         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
5045         multiple libraries since this don't work on windows.
5046
5047 2004-08-18  Martin Baulig  <martin@ximian.com>
5048
5049         * class-internals.h
5050         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
5051         MonoMethodHeader.
5052
5053         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
5054         MonoMethodNormal since we also need it for abstract and interface
5055         methods.
5056
5057         * reflection.c
5058         (build_compressed_metadata): Sort the GenericParam table.
5059         (mono_image_create_token): Added `gboolean create_methodspec'
5060         argument; this is false when generating a MethodImpl token.
5061         (reflection_methodbuilder_to_mono_method): Abstract and interface
5062         methods may also have generic parameters.
5063
5064 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
5065
5066         * appdomain.c: thread local alloc
5067
5068 2004-08-17  Martin Baulig  <martin@ximian.com>
5069
5070         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
5071
5072         * icall.c
5073         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
5074         argument.
5075
5076         * class.c (mono_type_get_full_name): New public function.
5077         (mono_type_get_name): Don't include the type arguments.
5078
5079 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
5080
5081         * Makefile.am: Build static versions of libmetadata and libmonoruntime
5082         for inclusion into the mono executable.
5083
5084 2004-08-16  Martin Baulig  <martin@ximian.com>
5085
5086         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
5087         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
5088
5089 2004-08-14  Martin Baulig  <martin@ximian.com>
5090
5091         * class.c (dup_type): Also copy the `byref' field.
5092
5093 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
5094
5095         * reflection.c (create_dynamic_mono_image): Revert the last change 
5096         since it breaks bootstrap.
5097
5098 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
5099
5100         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
5101
5102         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
5103         not free them with g_free.
5104
5105 2004-08-11  Martin Baulig  <martin@ximian.com>
5106
5107         * reflection.c (mono_reflection_setup_internal_class): Also call
5108         mono_class_setup_mono_type() if we already have a `tb->type.type'.
5109
5110 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
5111
5112         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
5113         called during default (first) AppDomain creation. Keep track of
5114         Evidence when loading assemblies.
5115
5116 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
5117
5118         * opcodes.c, opcodes.h: reduce runtime relocations.
5119
5120 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
5121
5122         * culture-info.h, locales.c: fixes and chages to sue the new
5123         optimized format of the locale data.
5124         * culture-info-tables.h: regenerated.
5125
5126 2004-08-06  Geoff Norton <gnorton@customerdna.com>
5127         
5128         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
5129
5130 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
5131
5132         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
5133         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
5134         * domain-internals.h: icall declaration.
5135         * icall.c: icall registration.
5136         * object-internals.h: New fields in MonoAssembly for CAS.
5137
5138 2004-08-05  Duncan Mak  <duncan@ximian.com>
5139
5140         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
5141         CEE_LDELEM_ANY.
5142
5143 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
5144
5145         * reflection.c: fix to deal with object[] arrays in custom ctors
5146         (bug #62550).
5147
5148 2004-08-05  Martin Baulig  <martin@ximian.com>
5149
5150         * class.c (mono_class_array_element_size): Added support for
5151         generic instances and correctly handle "recursive" types.
5152
5153 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
5154
5155         * assembly.c: Fix warnings.
5156
5157 2004-08-04  Martin Baulig  <martin@ximian.com>
5158
5159         * class.c
5160         (mono_type_get_name_recurse): Added `gboolean include_arity'
5161         argument specifying whether or not we should include the generic
5162         arity in the type name.
5163         (_mono_type_get_name): New static function.
5164         (mono_class_setup_vtable): If we're a generic instance, don't
5165         include the generic arity in the names of explicit method
5166         implementations.        
5167
5168 2004-08-03  Martin Baulig  <martin@ximian.com>
5169
5170         * class.c (mono_type_get_name_recurse): Enclose the generic type
5171         arguments in `<', '>'.
5172
5173 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
5174
5175         * gc.c: make GC warning messages use the trace API, they are just
5176         noise to most of the users.
5177
5178 2004-08-03  Martin Baulig  <martin@ximian.com>
5179
5180         * debug-mono-symfile.c (read_string): Correctly read the string.
5181
5182 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
5183
5184         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
5185         
5186         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
5187         icalls.
5188         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
5189
5190 2004-07-30  Martin Baulig  <martin@ximian.com>
5191
5192         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
5193         Reflect latest symbol writer changes.   
5194
5195 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
5196
5197         * object.c: always create an object if null is passed
5198         to Invoke() where a valuetype is expected.
5199
5200 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
5201
5202         * marshal.c (mono_marshal_init): make managed
5203         signatures match native ones better for 64bits.
5204
5205 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5206
5207         * appdomain.c: hack to build correctly the private bin path on windows.
5208         Fixes bug #61991.
5209
5210 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
5211
5212         * assembly.c: Load mscorlib from the correct framework directory
5213           (mono/<version>/mscorlib.dll).
5214         * appdomain.h: Added prototypes for new functions.
5215         * internals.h: Added some prototypes.
5216         * domain.c: When initializing the runtime, get from the executable and
5217           the configuration files the runtime version that the app supports.
5218           Added support methods for reading app.exe.config. Added list of versions
5219           supported by the JIT. Added two new methods: mono_init_from_assembly,
5220           which initializes the runtime and determines the required version from
5221           the provided exe file, and mono_init_version, which initializes
5222           the runtime using the provided version.
5223         * icall.c: Get machine.config from version-specific directory.
5224         * reflection.c: When generating an image, embed the version number
5225           of the current runtime.
5226
5227 2004-07-28  Dick Porter  <dick@ximian.com>
5228
5229         * socket-io.c
5230         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
5231         returned sockaddr size before creating the remote address object.
5232         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
5233         61608.
5234
5235 2004-07-28  Dick Porter  <dick@ximian.com>
5236
5237         * locales.c (string_invariant_compare_char): Fix invariant char
5238         compares between upper and lower cases.  Fixes bug 61458.
5239
5240 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
5241         
5242         * marshal.c: actually cache stelem.ref wrappers.
5243         
5244 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
5245
5246         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
5247         sections and remove the mono_cli_rva_map () function.
5248
5249 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
5250
5251         * debug-mono-symfile.c: fix one more endianess issue, from a patch
5252         by Geoff Norton (<gnorton@customerdna.com>).
5253
5254 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
5255
5256         * class.c: fix class loads for pointer types (typeof(int) !=
5257         typeof(int*)).
5258
5259 2004-07-27  Martin Baulig  <martin@ximian.com>
5260
5261         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
5262         reading the debugging information from an external ".mdb" file.
5263
5264 2004-07-24  Martin Baulig  <martin@ximian.com>
5265
5266         * reflection.c (mono_image_get_type_info): Only write a class
5267         layout entry if we actually have a size or a packing size.
5268
5269 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
5270
5271         * reflection.c (type_get_fully_qualified_name): 
5272         insert cast to get type checking of ?: with non-gcc compilers
5273
5274 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
5275
5276         * rand.c: use g_getenv for both lookups of
5277         MONO_EGD_SOCKET
5278
5279 2004-07-17  Martin Baulig  <martin@ximian.com>
5280
5281         * reflection.c (mono_reflection_bind_generic_method_parameters):
5282         Set `gmethod->reflection_info'.
5283
5284 2004-07-17  Martin Baulig  <martin@ximian.com>
5285
5286         * class.c (mono_class_create_from_typedef): Insert the newly
5287         created class into the hash table before computing the interfaces
5288         since we could be called recursively.
5289
5290 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
5291
5292         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
5293         function to implement stelem.ref in managed code
5294         * class-internals.h, debug-helpers.c: a new wrapper type
5295         for the above.
5296
5297 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
5298
5299         * gc.c: allow GC handles to work even when no GC is compiled in.
5300         Fix part of bug #61134 (GetAddrOfPinnedObject).
5301
5302 2004-07-13  Peter Williams  <peter@newton.cx>
5303  
5304         * process.c (complete_path): Make sure we don't attempt to execute
5305         directories.
5306  
5307 2004-07-12  Geoff Norton <gnorton@customerdna.com>
5308
5309         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
5310           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
5311           and will add/subtract the hour if needed
5312
5313 2004-07-12  Martin Baulig  <martin@ximian.com>
5314
5315         * reflection.c (mono_field_get_object): If we have
5316         `field->generic_info', take the attributes from
5317         `field->generic_info->generic_type'.    
5318
5319 2004-07-12  Martin Baulig  <martin@ximian.com>
5320
5321         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
5322         This function must be called before initializing the runtime.
5323         (mono_debug_init_1): New function; call this after initializing
5324         the runtime, but before loading the assembly.  It tells the
5325         debugger to load corlib and the builtin types.
5326
5327         * mono-debug-debugger.c: Did some larger changes in the debugging
5328         code; support recursive class declarations, make sure we actually
5329         add all classes.
5330
5331 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5332
5333         * debug-helpers.c: undo my previous patch and fixed the real issue in
5334         ../mini/exceptions-x86.c
5335
5336 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5337
5338         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
5339         when no HOME env. variable was set and a NullRef was thrown in a .cctor
5340         called from other .cctors.
5341
5342 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
5343
5344         * loader.c: Removed the mono_loader_wine_init hack now that we are
5345         doing a managed version of Windows.Forms.
5346
5347 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
5348
5349         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
5350         threadpool.c, threads.c: remove static data from rootset.
5351
5352 2004-07-09  Dick Porter  <dick@ximian.com>
5353
5354         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
5355         Don't do any more processing if the matched length was 0.  It was
5356         increasing the size of the string before.  Fixes bug 61167.
5357
5358 2004-07-09  Dick Porter  <dick@ximian.com>
5359
5360         * socket-io.h:
5361         * socket-io.c
5362         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
5363         Add support for SO_PEERCRED if its available.
5364
5365 2004-07-09  Peter Bartok <pbartok@novell.com>
5366         * loader.c: winelib.exe.so error message is now only displayed if
5367         MONO_DEBUG is set. To help us avoid questions when people are trying
5368         out the new Managed.Windows.Forms.
5369
5370 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
5371
5372         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
5373         for isinst and castclass wrappers.
5374
5375         * class-internals.h icall.c: Move registration and lookup of JIT icalls
5376         to libmetadata from the JIT, so they could be used by the marshalling
5377         code and the interpreter.
5378
5379         * marshal.c: Register marshalling related JIT icalls here instead of
5380         in mini.c. Use CEE_MONO_ICALL instead of the family of 
5381         CEE_MONO_PROC<x> opcodes to call marshalling functions.
5382
5383         * metadata.h: Remove unneeded marshalling conversions.
5384
5385         * opcodes.c: Update for new opcodes.
5386         
5387 2004-07-08  Martin Baulig  <martin@ximian.com>
5388
5389         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
5390         (mono_debug_get_domain_data): Make this function static.
5391
5392 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
5393
5394         * gc.c, object.h: add nice GC handle API for embedders.
5395
5396 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
5397
5398         * reflection.c: more changes for the new api
5399
5400         * object.c: When we reflect on a field w/ a constant value, it
5401         will not have a memory location, so we must access metadata. Also,
5402         allow easier reading of strings so that we can read them from
5403         the constant data.
5404
5405         * class.c (mono_class_layout_fields): no need for literal fields here.
5406
5407         * class-internals.h: api changes for const fields
5408
5409         * icall.c (ves_icall_get_enum_info): use new apis for const fields
5410
5411 2004-07-06  Martin Baulig  <martin@ximian.com>
5412
5413         * mono-debug.h: Increment version number to 44.
5414
5415         * mono-debug.c (mono_debug_add_wrapper): The second argument is
5416         now a gpointer, rewrote this whole method.
5417
5418         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
5419         function.  Add information about the wrapper in a new "misc table".
5420
5421         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
5422         for the new misc table.
5423
5424 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
5425
5426         * metadata-internals.h image.c: Add a cache for helper signatures.
5427
5428         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
5429
5430 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
5431
5432         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
5433         delegates from a delegate. Fixes #61033.
5434         
5435         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
5436         marshalling of stringbuilder arrays. Fixes #59900.
5437
5438 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
5439
5440         * icall.c: Add EnumBuilder:setup_enum_type icall.
5441
5442 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
5443
5444         * icall.c: Added a new icall for the property version of
5445         OffsetOfStringData.
5446
5447 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
5448
5449         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
5450         it has a constant size across platforms.
5451
5452         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
5453         stack trace.
5454
5455 2004-06-29  Martin Baulig  <martin@ximian.com>
5456
5457         * mono-debug.c (mono_debug_add_method): Protect the whole function
5458         in mono_debugger_lock(), not just parts of it.
5459
5460 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
5461
5462         * reflection.c: make sure padding bytes in heaps are zeroed.
5463
5464 2004-06-24  David Waite  <mass@akuma.org>
5465
5466         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
5467         image.c, loader.c, locales.c, marshal.c, metadata.c,
5468         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
5469         string-icalls.c, threads.c: change to C90-style comments from C99 /
5470         C++ -style
5471
5472 2004-06-24  Dick Porter  <dick@ximian.com>
5473
5474         * threads.c
5475         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
5476         return createdNew.  Fixes bug 60412.
5477
5478         * threads-types.h: 
5479         * icall.c: Add createdNew parameter to CreateMutex icall
5480
5481 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5482
5483         * reflection.c, object-internals.h: save default value in params.
5484
5485 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5486
5487         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
5488         no need to build a new path combining that with the application base.
5489         Fixes bug #60442.
5490
5491 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
5492
5493         * reflection.c: fixed minor standard compliance issues.
5494
5495 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
5496
5497         * reflection.c: fixed issue with encoding some custom attributes
5498         (arrays in properties and fields, bug #60411).
5499
5500 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5501
5502         * reflection.c: fix start address when copying the public key token.
5503
5504 2004-06-23  Martin Baulig  <martin@ximian.com>
5505
5506         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
5507         the `exc' object in a static object to put it into the GC's root set.
5508
5509 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
5510
5511         * reflection.c: make mono_reflection_setup_internal_class ()
5512         callable a second time to setup a new parent class.
5513
5514 2004-06-23  Dick Porter  <dick@ximian.com>
5515
5516         * threads.c: Check for WAIT_IO_COMPLETION return values.
5517
5518 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
5519
5520         * appdomain.c: Removed the g_free on the public key token. Now copy 
5521         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
5522         * assembly.c: Added public key token string value when loading 
5523         assemblies. Fix bug #60439.
5524         * icall.c: Added missing informations (like public key) in 
5525         GetReferencedAssemblies. Fix #60519.
5526         * image.h: Changed definition for public key token from const char*
5527         public_tok_value to guchar public_key_token [17];
5528         * reflection.c: Updated for changes to public key token.
5529
5530 2004-06-22  Lluis Sanchez Gual
5531
5532         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
5533         for the field in base classes.
5534
5535 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
5536
5537         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
5538         mark headers as not supported, they are installed only for use by the
5539         debugger.
5540
5541 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
5542
5543         * *.c, *.h: avoid namespace pollution in public headers.
5544
5545 2004-06-21  Martin Baulig  <martin@ximian.com>
5546
5547         * exception.c (mono_get_exception_security): It's in
5548         "System.Security", not in "System".
5549
5550         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
5551         the exception classes.
5552
5553 2004-06-21  Martin Baulig  <martin@ximian.com>
5554
5555         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
5556         Protect the exception object from being finalized.
5557
5558 2004-06-21  Martin Baulig  <martin@ximian.com>
5559
5560         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
5561         public function.
5562
5563 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
5564
5565         * reflection.c: Load the assembly in mono_reflection_type_from_name,
5566         if it was not loaded before. Fix parts of #60439.
5567
5568 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
5569
5570         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
5571         code that was broken since Ben's change: wrappers are now
5572         dependent on the method signature only again.
5573
5574 2004-06-21  Martin Baulig  <martin@ximian.com>
5575
5576         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
5577         added interface support.
5578
5579 2004-06-21  Martin Baulig  <martin@ximian.com>
5580
5581         * class.c (mono_vtable_get_static_field_data): New public method.
5582
5583 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
5584
5585         * filewatcher.c : Windows build fix to be compliant with API changes.
5586
5587 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
5588
5589         * class.h, class.c: more accessors.
5590         * metadata.h, metadata.c: prepare for hiding MonoType and
5591         MonoMethodSignature: people should use the accessors from now on
5592         outside of the tree.
5593
5594 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
5595
5596         * *.c, *.h: more API cleanups.
5597
5598 2004-06-18  Jackson Harper  <jackson@ximian.com>
5599
5600         * assembly.c: Trace loading assemblies.
5601         * loader.c: Trace loading native libraries.
5602         * mono-config.c: Trace loading config files.
5603         
5604 2004-06-18  Dick Porter  <dick@ximian.com>
5605
5606         * locales.c: Tell ICU the lengths of strings, it can cope with
5607         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
5608
5609 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
5610
5611         * image.c: swapped name/filename;
5612
5613 2004-06-18  Martin Baulig  <martin@ximian.com>
5614
5615         * mono-debug-debugger.c (write_class): Write the parent class at
5616         the end of the header.
5617
5618 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
5619
5620         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
5621
5622 2004-06-17  Raja R Harinath  <rharinath@novell.com>
5623
5624         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
5625         (bundle_obj): New conditional define.
5626         (BUILT_SOURCES): Remove.
5627         ($(bundle_srcs)): Make parallel-make safe.
5628         (libmonoruntime_la_LIBADD): Make unconditional.
5629         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
5630         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
5631
5632 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
5633
5634         * culture-info-tables.h: It was inconsistent with the latest
5635           supp info files.
5636
5637 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
5638
5639         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
5640         be loaded.
5641
5642         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
5643         with gcc 2.95.
5644
5645 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
5646
5647         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
5648         cleaned up public header threads.h.
5649
5650 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5651
5652         * Makefile.am, *.c, *.h: more API cleanups.
5653
5654 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
5655
5656         * Makefile.am: removed monosn from compilation.
5657         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
5658         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
5659         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
5660         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
5661         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
5662         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
5663
5664 2004-06-15  Jackson Harper  <jackson@ximian.com>
5665
5666         * assembly.c: Make locales lower case when searching the GAC for
5667         assemblies. gacutil will always make locales lowercase when
5668         installing so this effectively makes them case insensitive.
5669         
5670 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
5671
5672         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
5673         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
5674           parameter which allows to choose whether the wait can be interrupted or 
5675           not. Also added the method mono_monitor_enter(), which locks the monitor
5676           using an infinite wait and without allowing interruption.
5677           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
5678           interrupted.
5679         * object.h: Added new fields in MonoThread. suspend_event holds the event
5680           used to susped/resume the thread. synch_lock is the lock object to use for
5681           modifying the thread state.
5682         * threads.c: Use the new synch_lock object for locking, instead of "this",
5683           which can generate deadlocks.
5684           Moved thread state change in Thread.Sleep and Thread.Join from managed
5685           to unmanaged code. This avoids a deadlock when the thread was suspended
5686           just after acquiring the thread lock.
5687           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
5688           Implemented Thread.Suspend using an event instead of ThreadSuspend,
5689           which is not fully implemented in the io-layer.
5690         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
5691
5692 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
5693
5694         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
5695         threads-types.h: more API cleanups.
5696
5697 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
5698
5699         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
5700         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
5701         threadpool.c, threads.c: first pass at the exported API cleanup.
5702
5703 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
5704
5705         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
5706
5707 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5708
5709         * icall.c: added internalGetHome.
5710
5711 2004-06-14  Dick Porter  <dick@ximian.com>
5712
5713         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
5714         possible to return successfully when '.' or '..' were the only
5715         entries in a directory, but were skipped.  The MonoIOStat was not
5716         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
5717         Fixes bug 59574.
5718
5719 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5720
5721         * reflection.c: make binaries run on .Net 1.1 by default.
5722
5723 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
5724
5725         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
5726
5727 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
5728
5729         * marshal.c: keep track of struct size with explicit layout
5730         (bug #59979).
5731
5732 2004-06-12  Martin Baulig  <martin@ximian.com>
5733
5734         * mono-debug-debugger.c: Comment out a debugging g_message().
5735
5736 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
5737
5738         * reflection.c, reflection.h: do not free custom attrs that are cached.
5739         * icall.c: use braces to make code clearer.
5740
5741 2004-06-11  Martin Baulig  <martin@ximian.com>
5742
5743         * class.h (MonoInflatedField): New type.
5744         (MonoClassField): Replaced `MonoType *generic_type' with
5745         `MonoInflatedField *generic_info'.
5746
5747         * icall.c
5748         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
5749
5750 2004-06-11  Martin Baulig  <martin@ximian.com>
5751
5752         * reflection.c (mono_image_create_method_token): Correctly encode
5753         varargs methods.
5754
5755 2004-06-11  Martin Baulig  <martin@ximian.com>
5756
5757         * metadata.c (mono_metadata_parse_method_signature): When parsing
5758         a MethodDef which has VarArgs, also set sentinelpos if we don't
5759         have any parameters.
5760
5761 2004-06-11  Martin Baulig  <martin@ximian.com>
5762
5763         * verify.c (mono_method_verify): In CEE_CALL, use
5764         mono_method_get_signature() to get the method's signature, unless
5765         we're a PInvoke method.
5766
5767 2004-06-10  Jackson Harper  <jackson@ximian.com>
5768
5769         * assembly.c: Use <path>/lib/mono/gac for the extra paths
5770         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
5771         logical name as the supplied path is just a prefix to the gac not
5772         the direct path to it.
5773         
5774 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
5775
5776         * reflection.c: make the token for a created method match
5777         the token of the MethodBuilder it was created from
5778         (IKVM requires this behaviour now).
5779
5780 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
5781
5782         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
5783         reflection.c, socket-io.c: leak fixes.
5784
5785 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
5786
5787         * icall.c: handle sentinel pos in vararg methods in position different
5788         from 0.
5789
5790 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5791
5792         * culture-info-tables.h: freshly generated.
5793
5794 2004-06-09  Martin Baulig  <martin@ximian.com>
5795
5796         * loader.c (mono_get_method_constrained): Call `mono_class_init
5797         (constrained_class)'.   
5798
5799 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
5800
5801         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
5802         any methods. Fixes #59629.
5803
5804 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
5805
5806         * culture-info-tables.h: reflecting locale-builder updates.
5807
5808 2004-06-08  Dick Porter  <dick@ximian.com>
5809
5810         * object.h:
5811         * locales.c: Fixed compile warnings, including a real bug in
5812         CompareInfo_internal_compare.
5813         
5814 2004-06-08  Dick Porter  <dick@ximian.com>
5815
5816         * locales.c
5817         (ves_icall_System_Globalization_CompareInfo_internal_index):
5818         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
5819         Double-check the resuls of usearches, because ICU currently
5820         ignores most of the collator settings here.  Fixes bug 59720.
5821         
5822 2004-06-08  Dick Porter  <dick@ximian.com>
5823
5824         * locales.c
5825         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
5826         Fix memory leak and segfault-causing typo.  No idea how this one
5827         lasted so long without being noticed.
5828
5829 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
5830
5831         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
5832         any methods. Fixes #59629.
5833
5834 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5835
5836         * assembly.c:
5837         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
5838         own the critical section before). Removed dead code (that's done
5839         in the preload hook).
5840
5841         (mono_assembly_load_with_partial_name): call the preload hook.
5842
5843 2004-06-08  Martin Baulig  <martin@ximian.com>
5844
5845         * metadata.c (mono_metadata_signature_alloc): Default
5846         `sentinelpos' to -1.
5847
5848         * reflection.c (mono_image_get_array_token): Likewise.
5849
5850 2004-06-08  Martin Baulig  <martin@ximian.com>
5851
5852         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
5853
5854         * metadata.c (mono_metadata_parse_method_signature): When parsing
5855         a MethodDef which has VarArgs, set sentinelpos.
5856
5857         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
5858         `gint16' since we're using -1 for non-varargs methods.
5859
5860         * reflection.c
5861         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
5862         (method_encode_signature): Added varargs support.
5863         (method_builder_encode_signature): Likewise.
5864         (mono_image_get_varargs_method_token): New static method.
5865         (mono_image_create_method_token): New public method; this is
5866         called via an icall instead of mono_image_create_token() when
5867         calling a varargs method.       
5868
5869 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
5870
5871         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
5872
5873 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
5874
5875         * culture-info-tables.h : Reflecting the latest locale-builder that
5876           fixed empty array representation ({} to {0}).
5877
5878 2004-06-07  Jackson Harper  <jackson@ximian.com>
5879
5880         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
5881         looking up extra gac paths. This allows MONO_GAC_PATH to act
5882         exactly like a prefix.
5883         
5884 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
5885
5886         * reflection.c (mono_reflection_type_from_name): Make a copy of the
5887         type name before modifying it. Fixes #59405.
5888
5889 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
5890
5891         * culture-info.h: added fields for "all datetime patterns".
5892         * locales.c: (  ves_icall_System_Globalization_CultureInfo
5893           _construct_datetime_format ()): fill xxx_patterns fields.
5894         * object.h: added fields for "all datetime patterns" to
5895           MonoDateTimeFormatInfo.
5896         * culture-info-tables.h: reflecting locale-builder updates.
5897
5898 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
5899
5900         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
5901         the event has no add and remove methods. Fixes #59629.
5902
5903 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
5904
5905         * object.c: Fixed possible integer overflow when allocating large
5906         strings.
5907
5908 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
5909
5910         * culture-info-tables.h: reflecting locale-builder updates.
5911
5912 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
5913
5914         * culture-info-tables.h: reflecting locale-builder updates.
5915
5916 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
5917
5918         * culture-info-tables.h: reflecting locale-builder updates.
5919
5920 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
5921
5922         * threads.c: Made Thread.Sleep abortable.
5923
5924 2004-06-02  Martin Baulig  <martin@ximian.com>
5925
5926         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
5927
5928         * debug-mono-symfile.h: Bumped symbol file version number to 37.
5929
5930 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
5931
5932         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
5933
5934 2004-05-30  Jackson Harper  <jackson@ximian.com>
5935
5936         * reflection.c: Do not hardcode assembly versions or public key
5937         tokens anymore. All of this except the corlib section was dead
5938         code anyways.
5939         
5940 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
5941
5942         * object.c (mono_runtime_invoke_array): Automatically create boxed
5943         objects for byref valuetypes if needed. Fixes #59300.
5944         
5945         * object.c (mono_method_return_message_restore): Handle 
5946         MONO_TYPE_OBJECT as well.
5947
5948 2004-05-28  Jackson Harper  <jackson@ximian.com>
5949
5950         * reflection.c: The modified type encoding was causing build
5951         problems. Reverted for now.
5952         
5953 2004-05-28  Jackson Harper  <jackson@ximian.com>
5954
5955         * reflection.c/h: Take an assembly ref so that we dont create
5956         fully qualified names when encoding types in the same assembly as
5957         the custom attribute being emitted.
5958         * appdomain.c: Increment version number.
5959         
5960 2004-05-26  Duncan Mak  <duncan@ximian.com>
5961
5962         * icall.c
5963         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
5964         Set the full version number (major, minor, build, revision).
5965
5966 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
5967
5968         * marshal.c (emit_struct_conv): increment src/dst after blit
5969         (mono_marshal_get_managed_wrapper,
5970         mono_marshal_get_native_wrapper): make sure we have marshalling
5971         info before marshalling params (info computation affects
5972         blittable)
5973
5974         * class.c (class_compute_field_layout): correctly deal with
5975         blittable
5976         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
5977         value types (as per what windows dows by default)
5978         (mono_class_setup_mono_type): System.ValueType is blittable
5979         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
5980         blittable
5981
5982         * marshal.c (mono_marshal_load_type_info): flag types  as
5983         non-blittable if the native layout doesn't match the managed
5984         layout
5985
5986 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5987
5988         * appdomain.c: don't add stuff in the private search path that is
5989         above the application base. If application base is not set, there's
5990         no private search path.
5991
5992 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
5993
5994         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
5995         byref struct arguments in native->managed marshalling.
5996
5997 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
5998
5999         * marshal.c (mono_marshal_get_runtime_invoke): correctly
6000         cache methods using signature (special case for methods
6001         that are value type or string class)
6002         
6003         * image.c (mono_image_close): clean up allocated GSList's
6004         in runtime_invoke_cache.
6005
6006 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6007
6008         * mono-config.c: set the correct path for mono_cfg_dir on windows when
6009         there's no MONO_CFG_DIR environment variable defined.
6010
6011 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6012
6013         * threads.c: windows version must be >= 0x0500 to include OpenThread.
6014
6015 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
6016
6017         * threadpool.c: Really wait for 500ms after the async call, even if the wait
6018           is interrumped.
6019         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
6020           before waiting for it, and call CloseHandle after the wait to unref it.
6021           This will make sure that handles are not disposed too early.
6022
6023 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6024
6025         * appdomain.c:
6026         * appdomain.h:
6027         * icall.c: removed
6028         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
6029         needed now.
6030
6031         * object.c: se the application_base only for the domain that runs
6032         Main. Fixes bug #59216,
6033
6034 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6035
6036         * appdomain.c:
6037         * object.c: only the domain in which Main is run have
6038         SetupInformation.ConfigurationFile set, so moved a few lines from
6039         appdomain.c to object.c.
6040
6041 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6042
6043         * appdomain.c: we tried to load [name].(dll|exe), but according
6044         to bug #57710, we must also try [culture]/[name].(dll|exe) and
6045         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
6046         There's a test case attached to bug #58922.
6047
6048 2004-05-27  Dick Porter  <dick@ximian.com>
6049
6050         * icall.c:
6051         * file-io.c: Implemented icalls for locking and unlocking regions
6052         in a file.
6053         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
6054         FALSE on error (fixes both compiler warning and real bug.)
6055
6056 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
6057
6058         * culture-info-tables.h: reflecting locale-builder updates.
6059
6060           (Added missing ChangeLog entry for 05/26)
6061
6062 2004-05-27  Jackson Harper  <jackson@ximian.com>
6063
6064         * locales.c: Fix some cut and paste errors.
6065         
6066 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6067
6068         * mono-config.c: set the correct path for config. directory on windows.
6069
6070 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
6071
6072         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
6073           on win32.
6074
6075 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
6076
6077         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
6078         from pinvoke functions.
6079         
6080         * marshal.c (mono_ftnptr_to_delegate): Implement this.
6081
6082 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
6083
6084         * culture-info-tables.h: reflecting locale-builder updates.
6085
6086 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
6087
6088         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
6089         #59086.
6090
6091 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
6092
6093         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
6094         * icall.c: Modified icalls for RNG.
6095         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
6096         Windows (CryptoAPI).
6097
6098 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
6099
6100         * locales.c: Fix build.
6101
6102 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
6103
6104         * culture-info-tables.h: reflecting locale-builder updates.
6105
6106 2004-05-25  Jackson Harper  <jackson@ximian.com>
6107
6108         * locales.c: When creating the current culture use the $LANGs
6109         specific culture. So DateTimeFormat and NumberFormat entries are created.
6110         
6111 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
6112
6113         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
6114         a char array as parameter.
6115
6116 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
6117
6118         * image.c: In mono_image_open(), always use an absolute path name to
6119           look for already loaded images.
6120
6121 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
6122
6123         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
6124         missing in the windows build (like older cygwin include files).
6125
6126 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
6127
6128         * icall.c: Fixed check for possible integer overflow in Buffer_
6129         BlockCopy icall. Replaced comments style // by /* */.
6130
6131 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
6132
6133         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
6134         
6135         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
6136         check after MONO_VTADDR. Fixes pinvoke2.exe.
6137
6138         * marshal.h marshal.c metadata.h: Add beginnings of support for
6139         ftnptr -> delegate marshalling.
6140
6141 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
6142
6143         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
6144         * threads.c: Fix warnings.
6145
6146 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
6147
6148         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
6149         * icall.c: Registered icalls for Suspend and Resume.
6150         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
6151           Thread.Abort.
6152         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
6153         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
6154         * process.c: Use WaitForSingleObjectEx.
6155         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
6156           checkpoints.
6157         * threads.c, threads.h: Make use of new Ex wait methods. Improved
6158           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
6159           for Suspend and Resume. Added new mono_thread_stop, used for stoping
6160           background threads. Added basic support for Abort in Windows.
6161           Start new threads using a managed delegate invoke wrapper. This wrapper
6162           has an interruption checkpoint that is needed since an interruption
6163           can be requested before the thread leaves the unmanaged code that starts 
6164           the thread.
6165         * marshal.c: Added interruption checkpoint after every native call, and
6166           also before managed calls for wrappers called from unmanaged code to
6167           go into managed code.
6168         * object.h: Added new field in MonoThread to keep track of interruption
6169           requests.
6170
6171 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
6172
6173         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
6174         calls.
6175
6176 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6177
6178         * appdomain.c:
6179         * assembly.c:
6180         * gc.c:
6181         * locales.c:
6182         * mono-config.c:
6183         * rand.c: getenv -> g_getenv (windows!)
6184
6185         * process.c: complete_path is also used on non-windows platforms.
6186
6187 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6188
6189         * icall.c: new signature for Process_Start.
6190
6191         * process.[ch]: new signature for Process_Start. If we're on windows
6192         and UseShellExecute is false, we have to search for the program by
6193         ourselves if we don't get a full path.
6194
6195 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
6196
6197         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
6198         marshalling and call CleanUpNativeData if needed. Fixes #58646.
6199
6200 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6201
6202         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
6203         Fixes bug #58373.
6204
6205 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6206
6207         * process.c: use double quotes to quote program name and arguments on
6208         windows. Fixes bug #58575.
6209
6210 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6211
6212         * file-io.c: don't return "." and ".." when using windows Find*File.
6213
6214 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
6215
6216         * marshal.c: Don't pass wrappers to message init because method 
6217         addressed used to lookup metadata. part of remoting[2|3] fix.
6218
6219 2004-05-15  Jackson Harper  <jackson@ximian.com>
6220
6221         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
6222         path is essentially the same as MONO_PATH except that it points to
6223         GACs instead of lib directories.
6224         * loader.h: The user gac is gone so we dont need function to
6225         enable/disable it.
6226         * mono-config.c: user gac option is now gone.
6227         
6228 2004-05-15  Jackson Harper  <jackson@ximian.com>
6229
6230         * culture-info.h: Make defines more consistent, add calendar data
6231         to the culture info table.
6232         * culture-info-tables.h: Add basic calendar data. Basically
6233         everyone gets default gregorian until all the data is
6234         updated.
6235         * locales.c: Use the new consistent defines. Set calendar data for
6236         culture info objects.
6237         * object.h: add a field for calendar data to CultureInfo
6238         
6239 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
6240
6241         * image.c: image->runtime_invoke_cache is keyed on signatures now.
6242         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
6243         a signature.
6244         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
6245         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
6246         an extra param that is the pointer of the method to invoke. The IL for
6247         the invoke method is no longer specific to the method, but to the
6248         signature of the method. Thus, we can share the same code for multiple
6249         methods. This reduces the number of methods that have to be compiled.
6250
6251 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
6252
6253         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
6254
6255         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6256
6257         * icall.c: Optimize Buffer.BlockCopy.
6258
6259 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6260
6261         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
6262         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
6263         quote). Changed them to "MMMM yyyy".
6264
6265 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
6266
6267         * rand.c
6268         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
6269
6270 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
6271
6272         * reflection.h: Updated after changes to managed structures.
6273
6274         * appdomain.c: Bump corlib version.
6275
6276 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6277
6278         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
6279         windows.
6280
6281 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6282
6283         * Makefile.am: link to ../os/libmonoos.la on windows.
6284
6285         * assembly.c:
6286                 -If MONO_DEBUG, warn about non-existing directories in
6287                 MONO_PATH.
6288                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
6289                 compile time variable.
6290                 -Removed init_default_path and call mono_set_rootdir from
6291                 libmonoos.a instead (windows only).
6292
6293         * assembly.h: declare mono_assembly_getrootdir().
6294
6295         * domain.c:
6296         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
6297
6298         * loader.c: s/getenv/g_getenv/
6299
6300 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
6301
6302         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
6303
6304         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
6305
6306         * metadata.h: Add new marshalling conversions.
6307
6308         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
6309         function.
6310
6311         * reflection.c (mono_reflection_get_type): Lookup the type in all
6312         modules of a multi-module assembly. Fixes #58291.
6313
6314 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
6315
6316         * threads.c: Before aborting a background, set the StopRequested
6317         state.  This avoids throwing the Abort exception.
6318         In mono_thread_manage, don't continue with the shutdown until all
6319         aborted threads have actually stopped.
6320
6321 2004-05-10  Jackson Harper  <jackson@ximian.com>
6322
6323         * locales.c: Remove the modifier from culture names.
6324         
6325 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6326
6327         * Makefile.am: monosn is not installed any more. It has been deprecated
6328         in favor of sn.
6329
6330 2004-05-07  Jackson Harper  <jackson@ximian.com>
6331
6332         * locales.c
6333         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
6334         Fix array construction, add bailout if the length is 0.
6335
6336 2004-05-07  Dick Porter  <dick@ximian.com>
6337
6338         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
6339         machine doesn't have a DNS entry.  Patch by Urs Muff
6340         (umuff@quark.com), fixes bug 57928.
6341
6342 2004-05-06  Jackson Harper  <jackson@ximian.com>
6343
6344         * reflection.c: Handle null PublicTokens properly. alloc mem for
6345         assembly names culture so we dont crash when freeing it.
6346         
6347 2004-05-06  Jackson Harper  <jackson@ximian.com>
6348
6349         * assembly.c: Check the usergac when loading with partial names.
6350         
6351 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
6352
6353         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
6354         does nothing for now (not required for Linux/Windows) but the class
6355         library can call it (and a newer or modified runtime could need it).
6356         * icall.c: Registred icall.
6357
6358 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6359
6360         * loader.c: prints a message on module loading error we set MONO_DEBUG
6361         environment variable.
6362
6363 2004-05-05  Jackson Harper  <jackson@ximian.com>
6364
6365         * appdomain.c: Handle PublicKeyToken=null properly.
6366         
6367 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
6368
6369         * environment.c|h: Added icall ves_icall_System_Environment_
6370         GetOSVersionString to get the current OS version as a string.
6371         * icall.c: Registred icall.
6372
6373 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
6374
6375         * object.c: in mono_object_get_virtual_method(), take into account that
6376         non-virtual methods don't have a slot in the vtable. Check needed when
6377         the object is a proxy.
6378
6379 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
6380
6381         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
6382         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
6383
6384         * object.c (mono_class_compute_gc_descriptor): Fix warning.
6385
6386         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
6387         passed when a valuetype is expected.
6388
6389         * object.c (mono_unhandled_exception): Only set the exit code if the
6390         exception happens in the main thread. Fixes thread5.exe.
6391
6392         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
6393         invalid names. Fixes #58047.
6394
6395 2004-05-03  Jackson Harper  <jackson@ximian.com>
6396
6397         * assembly.c: This line was committed accidently and is unneeded.
6398         
6399 2004-05-03  Jackson Harper  <jackson@ximian.com>
6400
6401         * icall.c: Add new icall for Assembly::LoadWithPartialName
6402         * assembly.c/.h: new function that probes the GAC to load partial
6403         assembly names by Paolo Molaro.
6404         
6405 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6406
6407         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
6408         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
6409         (type_get_fully_qualified_name): Added PublicKeyToken when building a
6410         full type name.
6411
6412 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6413
6414         * appdomain.c: fixed check for 'neutral' culture and removed warning.
6415         * reflection.c: fix bug when parsing a full type name and Version is not
6416         the last thing in the string.
6417
6418 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
6419
6420         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
6421         crashes when it is freed.
6422
6423 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6424
6425         * assembly.c: print the compat warning to stderr.
6426
6427 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
6428
6429         * assembly.c (mono_assembly_load_references): Add a compatibility
6430         hack to run old applications that might be still referencing the
6431         3300-based assemblies, only do this for System.xxx.
6432
6433 2004-05-01  Jackson Harper  <jackson@ximian.com>
6434
6435         * appdomain.c: If the culture is neutral we set it to "".
6436         
6437 2004-04-29  Jackson Harper  <jackson@ximian.com>
6438
6439         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
6440
6441 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
6442  
6443         * string-icalls.c: added low overhead function for copying chars
6444         * icall.c: added needed icall for the above function
6445  
6446 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6447
6448         * icall.c: fix return value of get_global_assembly_cache.  Implemented
6449         Environment.GetLogicalDrives.
6450
6451 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
6452
6453         * rand.c: try and talk to egd or prngd
6454         for random bytes if opening devices fail.
6455
6456 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
6457
6458         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
6459         alignment for the type using the native alignment of its members 
6460         instead of using klass->min_align.
6461
6462         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
6463
6464 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6465
6466         * file-io.c:
6467         * socket-io.c: added check for sys/aio.h.
6468
6469 2004-04-28  Dick Porter  <dick@ximian.com>
6470
6471         * threads.c: Don't abort a thread thats already aborting, when
6472         terminating everything.
6473
6474 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6475
6476         * icall.c: added 2 new async calls for Socket.
6477
6478         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
6479         IO on *nix systems.
6480
6481         * threadpool.c: removed unused variable.
6482
6483 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
6484
6485         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
6486
6487 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6488
6489         * locales.c: put back string_invariant_tolower () and
6490         string_invariant_toupper ().
6491
6492 2004-04-26 David Waite <mass@akuma.org>
6493
6494         * file-io.h:
6495         * socket-io.h:
6496         * threads.h:
6497         * unicode.h: remove comma from end of enumeration declarations
6498
6499 2004-04-26 David Waite <mass@akuma.org>
6500
6501         * debug-mono-symfile.h:
6502         * decimal.c:
6503         * mono_debug.h:
6504         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
6505
6506
6507 2004-04-26  Jackson Harper  <jackson@ximian.com>
6508
6509         * appdomain.c: Increment version number.
6510         
6511 2004-04-26  Jackson Harper  <jackson@ximian.com>
6512
6513         * appdomain.c: Set assembly references public token value when
6514         PublicKeyToken is specified, not the hash_value. Free public token
6515         values when free assembly name data. Previously the public key
6516         token was hex decoded, however we are using hex encoded public key
6517         tokens, so this is not neccasary.
6518         * assembly.c: Lookup assemblies in the gac if their public token
6519         value is set. Add function to allow enabling user gac
6520         lookups. Specify whether or not the assembly was loaded from the
6521         GAC. Compare full assembly names when checking the cache for
6522         assemblies (Temporarily disabled see comment in code). Remove
6523         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
6524         specifies trace-loader they get extra info to stdout on the
6525         loading of assemblies.
6526         * image.h: Add a field for an assembly references public token
6527         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
6528         whether an assembly has been loaded from the GAC.
6529         * image.c: Remove a corlib -> mscorlib name mapping.
6530         * loader.h: Add function to enable/disable the user gac.
6531         * mono-config.c: Check if the usergac is enabled in the config
6532         file.
6533         * icall.c: New icall to determine whether or not an assembly has
6534         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
6535         * tabldefs.h: Add constant for assemblyref flag that specifies a
6536         full public key is used instead of a public token.
6537         * reflection.c: Remove mscorlib -> corlib mappings. Set
6538         PublicTokenValue instead of hash value. This value is a hex
6539         string so it does not need to be expanded.
6540
6541 2004-04-26  Martin Baulig  <martin@ximian.com>
6542
6543         * mono-debug-debugger.c (mono_debugger_initialize): Set
6544         `mono_debugger_initialized' before calling mono_debug_lock().
6545
6546 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
6547
6548         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
6549           InternalToUpper/InternalToLower.
6550         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
6551           removed invariant culture shortcut.  This is now done in managed code.
6552         * locales.c: (string_invariant_toupper/tolower) removed.
6553
6554 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6555
6556         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
6557         Added Poll internal call.
6558
6559         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
6560         call for Poll. Select was too heavy for polling a single socket.
6561
6562         * threadpool.[ch]: added mono_threadpool_cleanup.
6563         * threads.c: use it. Don't use Thread_Abort on windows.
6564
6565 2004-04-23  Martin Baulig  <martin@ximian.com>
6566
6567         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
6568
6569 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
6570
6571         * icall.c: Registred new icalls for key pair protection and added an
6572         icall for Environment.GetFolderPath on Windows.
6573         * security.c|h: Added new icalls for key pair protection.
6574
6575 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6576
6577         * socket-io.c: don't display the non-supported family warning for known
6578         families. Now this is not displayed on windows when checking support
6579         for IPv4/IPv6.
6580
6581 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6582
6583         * class.c: don't display the layout warning for static fields.
6584
6585 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
6586
6587         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
6588         * locales.c, locales.h: Added new icalls for culture-specific
6589         Char.ToLower and Char.ToUpper.
6590
6591 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6592
6593         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
6594         by David Waite.
6595
6596 2004-04-20  Martin Baulig  <martin@ximian.com>
6597
6598         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
6599         of the type name before passing it to mono_reflection_type_from_name().
6600
6601 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
6602
6603         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
6604         encodings here. Fixes #56965.
6605
6606 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
6607
6608         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
6609         fix test on strstr result not that I can see anything that
6610         relies on the result.
6611
6612 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
6613
6614         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
6615         Fixes #57081.
6616
6617         * marshal.c (mono_marshal_get_string_encoding): New helper function.
6618
6619         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
6620         function to determine which marshalling to use for strings. Fixes
6621         #56965.
6622
6623         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
6624
6625         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
6626
6627 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
6628
6629         * icall.c: #include mono-config.h
6630
6631 2004-04-15  Jackson Harper  <jackson@ximian.com>
6632
6633         * culture-info-tables.h: Fix date formats for en-US culture.
6634         
6635 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
6636
6637         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
6638         ThreadPool.SetMinThreads.
6639         * threadpool.c: Implemented ThreadPool.GetMinThreads and
6640         ThreadPool.SetMinThreads.
6641
6642 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
6643
6644         * mono-config.c: also load the .config file in the directory
6645         where the assembly was found.
6646
6647 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
6648
6649         * assembly.c: load per-assembly config files.
6650         * icall.c: decrapified code to get the config dir and moved to
6651         mono-config.c.
6652         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
6653         per-assembly config files. When doing a dll map lookup give precedence
6654         to the per-assembly data.
6655
6656 2004-04-14  Martin Baulig  <martin@ximian.com>
6657
6658         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
6659         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
6660         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
6661
6662         * mono-debugger-debugger.c: While the debugger is locked, remember
6663         whether the symbol tables have changes and send one single
6664         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
6665
6666 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
6667
6668         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
6669
6670         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
6671         function.
6672
6673         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
6674         account when marshalling string arrays. Fixes #56965.
6675
6676 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
6677
6678         * icall.c: Add new icalls mapping for security.
6679         * security.c|h: Add internal calls for WindowsIdentity,
6680         WindowsImpersonationContext and WindowsPrincipal.
6681
6682 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
6683
6684         * class.c: Added comment to ensure the System.MonoDummy class
6685         is removed when no longer necessary
6686
6687 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
6688
6689         * appdomain.c: Pass arguments to the bootstraping exceptions to
6690         minimize JITed methods at boot
6691
6692         * metadata.c (mono_exception_from_name_two_strings): Allow for the
6693         second string to be null.
6694
6695         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
6696         Change the protocol to minimize the JIT methods at startup.  Now
6697         it Returns the internal codepage, if the value of "int_code_page"
6698         is 1 at entry, and we can not compute a suitable code page
6699         number, returns the code page as a string.
6700
6701 2004-04-13  Jackson Harper  <jackson@ximian.com>
6702
6703         * culture-info-tables.h: Fix number of decimal digits for all
6704         english locales.
6705
6706 2004-04-13  Jackson Harper  <jackson@ximian.com>
6707
6708         * icall.c: Clairfy out of sync error message. It is not always
6709         your corlib that is out of sync.
6710
6711 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
6712
6713         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
6714         properties when only the set accessor is overriden. Fixes #55874.
6715
6716 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
6717
6718         * assembly.c (mono_assembly_load_references): Make this thread safe.
6719         Fixes #56327.
6720
6721 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
6722
6723         * monosn.c: Add missing initialization calls.
6724
6725 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
6726
6727         * locales.c:
6728         ves_icall_System_Globalization_CultureInfo_construct_number_format
6729         Fix g_assert so it compiles on fussier compilers re int/ptr
6730         mismatch
6731
6732 2004-04-08  Dick Porter  <dick@ximian.com>
6733
6734         * socket-io.h:
6735         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
6736         53992.  Also rearrange the code so that the internal calls return
6737         an error value and exceptions are thrown from managed code.
6738
6739         * icall.c: Add type info to the socket icalls.
6740
6741 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6742
6743         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
6744         owes me a beer.
6745
6746 2004-04-07  Martin Baulig  <martin@ximian.com>
6747
6748         * class.c (mono_class_from_generic_parameter): Don't default
6749         `klass->parent' to `mono_defaults.object_type'.
6750
6751 2004-04-07  Martin Baulig  <martin@ximian.com>
6752
6753         * reflection.c (mono_reflection_initialize_generic_parameter): Set
6754         `param->pklass->reflection_info'.       
6755
6756 2004-04-07  Jackson Harper  <jackson@ximian.com>
6757
6758         * culture-info-tables.h: Fix date separator symbol.
6759         
6760 2004-04-07  Martin Baulig  <martin@ximian.com>
6761
6762         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
6763         from System.Type to System.MonoType.
6764
6765 2004-04-07  Martin Baulig  <martin@ximian.com>
6766
6767         * reflection.h
6768         (MonoReflectionGenericParam): Added `has_reference_type' and
6769         `has_value_type' fields.
6770
6771         * reflection.c (mono_image_get_generic_param_info): Encode the
6772         correct flags if we have the `class' or `struct' constraint.
6773
6774 2004-04-07  Martin Baulig  <martin@ximian.com>
6775
6776         * reflection.h
6777         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
6778
6779 2004-04-07  Jackson Harper  <jackson@ximian.com>
6780
6781         * appdomain.c: Revert extra patches, just wanted to bump the
6782         version number.
6783         
6784 2004-04-07  Jackson Harper  <jackson@ximian.com>
6785
6786         * Makefile.am: Add culture-info private headers.
6787         * icall.c: Add new icalls for contructing locales.
6788         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
6789         * locales.h: Declare new culture info construction methods.
6790         * object.h: Add new fields used to avoid the CultureMap to
6791         MonoCultureInfo.
6792         * culture-info.h: Definition of structs used in the culture info
6793         tables.
6794         * culture-info-tables.h: Autogenerated tables that contain culture
6795         info data. This file was generated with the locale-builder tool.
6796         * appdomain.c: Incement corlib version number.
6797         
6798 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
6799
6800         * appdomain.c: (mono_runtime_init) move mono_thread_init
6801         to before mono_object_new calls so critical sections
6802         are initialized before use.
6803
6804 2004-04-07  Martin Baulig  <martin@ximian.com>
6805
6806         * icall.c
6807         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
6808         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
6809         (ves_icall_MonoGenericParam_initialize): Removed.
6810         (monogenericparam_icalls): Removed.
6811         (generictypeparambuilder_icalls): Added new table for
6812         System.Reflection.Emit.GenericTypeParameterBuilder.
6813
6814         * reflection.c
6815         (mono_reflection_define_generic_parameter): Removed.
6816         (mono_reflection_initialize_generic_parameter): This is now called
6817         from GenericTypeParameterBuilder's .ctor.
6818
6819 2004-04-06  Martin Baulig  <martin@ximian.com>
6820
6821         * class.c (mono_class_init): Don't inflate nested classes in a
6822         generic instance.
6823         (mono_type_get_name_recurse): Include the generic arguments for
6824         generic instances and generic type declarations.
6825         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
6826         (_mono_class_get_instantiation_name): Removed.
6827         (mono_class_create_generic): Always use `gklass->name' as our name.
6828
6829         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
6830
6831         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
6832         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
6833         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
6834         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
6835         closed generic methods here.
6836
6837         * reflection.c
6838         (mono_reflection_generic_inst_get_nested_types): Removed.
6839         (inflate_mono_method): Copy the generic parameters from the
6840         MonoMethodHeader into out MonoGenericMethod.
6841
6842 2004-04-06  Martin Baulig  <martin@ximian.com>
6843
6844         * row-indexes.h
6845         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
6846
6847         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
6848
6849         * reflection.c (build_compressed_metadata): If we have any entries
6850         in the GenericParam, MethodSpec or GenericParamConstraint tables,
6851         set the header version to 1.1.
6852
6853 2004-04-06  Martin Baulig  <martin@ximian.com>
6854
6855         * class.c (mono_class_init): If we're a generic instance,
6856         initialize our nested classes, too.
6857         (_mono_class_get_instantiation_name): Deal with the new `!%d'
6858         suffix. 
6859
6860 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6861
6862         * process.c: quote the argument passed to the shell on windows.
6863
6864 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
6865
6866         * threads.c (mono_alloc_special_static_data): Allow this to be
6867         called during startup.
6868
6869 2004-04-02  Martin Baulig  <martin@ximian.com>
6870
6871         * icall.c
6872         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
6873
6874 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
6875
6876         * icall.c: Fix build.
6877
6878 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
6879
6880         * Makefile.am: Added security.c|h.
6881         * icall.c: Added icall for get_UserName;
6882         * security.c: New file for security related icalls. Added function
6883         get_UserName for System.Environment (fix #56144).
6884         * security.h: New. Header file for security.c
6885
6886 2004-04-02  Dick Porter  <dick@ximian.com>
6887
6888         * icall.c: Deleted the icalls that were obsoleted some time ago
6889         by the ICU string code, and which were mixed into the icall
6890         rearranging.  Fixes bug 55969.
6891
6892         * string-icalls.h: 
6893         * string-icalls.c: Deleted the code that those icalls reference.
6894
6895 2004-04-01  Martin Baulig  <martin@ximian.com>
6896
6897         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
6898
6899         * class.c (mono_class_from_generic_parameter): Don't set 
6900         TYPE_ATTRIBUTE_INTERFACE.
6901         (my_mono_class_from_generic_parameter): Likewise.
6902
6903 2004-04-01  Martin Baulig  <martin@ximian.com>
6904
6905         * loader.c (find_method): Added an optional `MonoClass *ic'
6906         argument to search in a specific interface.
6907         (mono_get_method_constrained): New public function.
6908
6909 2004-04-01  Martin Baulig  <martin@ximian.com>
6910
6911         * reflection.c (mono_image_get_generic_field_token): Use the
6912         `handleref' cache here.
6913
6914 2004-04-01  Martin Baulig  <martin@ximian.com>
6915
6916         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
6917
6918         * reflection.c (create_generic_typespec): Use the `typespec' hash
6919         here, not the `typeref' one.    
6920
6921 2004-04-01  Martin Baulig  <martin@ximian.com>
6922
6923         * class.c (mono_class_inflate_generic_type): Moved the
6924         functionality into a new static inflate_generic_type() which
6925         returns NULL if it didn't do anything.  Only increment the
6926         `mono_stats.inflated_type_count' if we actually inflated
6927         something.
6928         (mono_class_get_full): Check the classes type to see whether we
6929         need to inflate it; also inflate MONO_TYPE_(M)VAR.
6930
6931 2004-04-01  Jackson Harper  <jackson@ximian.com>
6932
6933         * reflection.c: Set culture for assembly references.
6934         
6935 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
6936
6937         * reflection.[ch], icall.[ch], Fix support for pinning variables.
6938
6939 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6940
6941         * assembly.c:
6942         (do_mono_assembly_open): the critical section also covers
6943         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
6944
6945 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6946
6947         * threads.c:
6948         (mono_manage_threads): abort the background threads when finishing.
6949         Fixes bug #47232.
6950
6951 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6952
6953         * gc.c: only close the done_event handle if there was no timeout.
6954         C-ified comments.
6955
6956 2004-03-30  Martin Baulig  <martin@ximian.com>
6957
6958         * icall.c (icall_entries): It's called "System.Activator", not
6959         "System.Activation".    
6960
6961 2004-03-30  Martin Baulig  <martin@ximian.com>
6962
6963         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
6964         (mono_class_create_from_typespec): Likewise.
6965
6966 2004-03-30  Martin Baulig  <martin@ximian.com>
6967
6968         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
6969         `has_ctor_constraint' and `initialized'.
6970
6971 2004-03-30  Martin Baulig  <martin@ximian.com>
6972
6973         * reflection.c (encode_new_constraint): New static function to add
6974         the constructor constraint attribute to a type parameter.
6975         (encode_constraints): Call encode_new_constraint() if necessary.
6976
6977         * reflection.h
6978         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
6979
6980         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
6981         
6982 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
6983
6984         * reflection.c, icall.c: add support for pinning variables. 
6985
6986 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
6987
6988         * marshal.c (mono_marshal_get_managed_wrapper):
6989         init bool local with zero rather than null.
6990
6991 2004-03-29  Martin Baulig  <martin@ximian.com>
6992
6993         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
6994         the "official" behavior here.
6995         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
6996
6997 2004-03-29  Martin Baulig  <martin@ximian.com>
6998
6999         * icall.c: Reflect latest API changes.
7000
7001 2004-03-29  Martin Baulig  <martin@ximian.com>
7002
7003         * loader.c (mono_get_method_from_token): Also call
7004         mono_metadata_load_generic_params () for abstract and interface
7005         methods; replace the type arguments in the method signature with
7006         the ones which are loaded from the metadata.
7007
7008 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
7009
7010         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
7011         of the lock is not the current thread. MS.NET don't do it, in spite of
7012         what the documentation says. See bug #56157.
7013
7014 2004-03-28  Martin Baulig  <martin@ximian.com>
7015
7016         * class.c (mono_class_init): Don't call init_properties() and
7017         init_events() for generic instances; set `prop->parent' when
7018         inflating properties.
7019
7020         * reflection.c (mono_generic_inst_get_object): Call
7021         `mono_class_init (ginst->klass)'.
7022         (mono_type_get_object): Only create a MonoGenericInst if your
7023         generic type is a TypeBuilder.
7024         (do_mono_reflection_bind_generic_parameters): Only set
7025         `ginst->is_dynamic' if our generic type is a TypeBuilder.
7026
7027 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
7028
7029         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
7030         Fixes #56091.
7031
7032 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7033
7034         * icall.c: added Kill_internal icall.
7035         * process.[ch]: added Kill_internal icall.
7036
7037 2004-03-25  Martin Baulig  <martin@ximian.com>
7038
7039         * class.h (MonoStats): Added `generic_instance_count',
7040         `inflated_method_count', `inflated_type_count' and
7041         `generics_metadata_size'.       
7042
7043 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7044
7045         * reflection.c: no warnings now.
7046
7047 2004-03-25  Martin Baulig  <martin@ximian.com>
7048
7049         * class.c (mono_class_get_full): New public function; does a
7050         mono_class_get(), but also takes a `MonoGenericContext *'.
7051
7052         * loader.c (mono_field_from_memberref): Renamed to
7053         `field_from_memberref', made static and added `MonoGenericContext *'
7054         argument.
7055         (mono_field_from_token): Added `MonoGenericInst *' argument.
7056         (method_from_memberef): Likewise.
7057         (mono_get_method_from_token): Likewise.
7058         (mono_get_method_full): New public function; does a
7059         mono_get_method(), but also takes a `MonoGenericContext *'.
7060
7061         * verify.c (mono_method_verify): Get the method's generic context
7062         and pass it to mono_field_from_token(), mono_get_method_full() and
7063         mono_class_get_full().
7064
7065 2004-03-25  Martin Baulig  <martin@ximian.com>
7066
7067         * class.c (mono_class_inflate_generic_type): Take a
7068         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
7069         `MonoGenericMethod *'.
7070
7071 2004-03-25  Martin Baulig  <martin@ximian.com>
7072
7073         * loader.h (MonoMethodInflated): Store the MonoGenericContext
7074         instead of the MonoGenericMethod here.
7075
7076 2004-03-25  Martin Baulig  <martin@ximian.com>
7077
7078         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
7079         each time we create a new MonoGenericInst, we also create a new
7080         context which points back to us.
7081
7082         * class.c (inflate_method): Use `ginst->context' instead of
7083         creating a new context.
7084
7085         * loader.c (method_from_memberref): Use
7086         `klass->generic_inst->context' instead of creating a new context.
7087
7088 2004-03-25  Martin Baulig  <martin@ximian.com>
7089
7090         * class.h (MonoGenericContext): New struct.
7091         (MonoGenericMethod): Removed `generic_inst'.
7092
7093         * class.c (mono_class_inflate_generic_method): Take a
7094         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
7095
7096 2004-03-25  Martin Baulig  <martin@ximian.com>
7097
7098         * loader.h (MonoMethodInflated): New typedef.
7099
7100         * metadata.h (MonoMethodSignature): Removed `gen_method', make
7101         `generic_param_count' consume just 30 bits, added `is_inflated'
7102         and `has_type_parameters' flags (one bit each).
7103
7104         * class.c (mono_class_inflate_generic_method): Create a
7105         MonoMethodInflated instead of a MonoMethodNormal and set
7106         `is_inflated' in the method signature.
7107
7108         * class.h (MonoGenericMethod): Removed `generic_method'.
7109
7110 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
7111
7112         * image.c: Make sure the name of a MonoImage is always an absolute path.
7113           This fixes bug #54415.
7114
7115 2004-03-24  Martin Baulig  <martin@ximian.com>
7116
7117         * class.c (mono_class_setup_vtable): If we're a generic instance,
7118         use our generic type's vtable size.
7119
7120 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
7121
7122         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
7123         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
7124         problems.
7125
7126 2004-03-23  Martin Baulig  <martin@ximian.com>
7127
7128         * class.h (MonoDynamicGenericInst): Added `int count_events' and
7129         `MonoEvent *events'.
7130
7131         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
7132         (typebuilder_icalls): Added "get_event_info"; calls
7133         mono_reflection_event_builder_get_event_info(). 
7134
7135         * reflection.c (mono_reflection_generic_inst_initialize): Added
7136         `MonoArray *events'.
7137         (mono_reflection_event_builder_get_event_info): New function.
7138
7139 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
7140
7141         * object.h: add mono_type_initialization_init
7142
7143         * object.c (mono_runtime_class_init): 
7144         implement class constructor synchronization rules
7145         to cope with threading issues.  
7146         add mono_type_initialization_init
7147
7148         * appdomain.c (mono_runtime_init): call 
7149         mono_type_initialization_init
7150
7151         * class.h: removing initializing field from MonoVTable
7152
7153 2004-03-23  Martin Baulig  <martin@ximian.com>
7154
7155         * class.c (my_mono_class_from_generic_parameter): Use
7156         `param->name' if it's not NULL. 
7157
7158 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
7159
7160         * class.c: do not insert non-virtual methods in the vtable.
7161         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
7162         that means the method is non-virtual. This never would have
7163         happened before.
7164
7165 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
7166
7167         * profiler.c: Added lock for accessing coverage_hash.
7168
7169 2004-03-22  Martin Baulig  <martin@ximian.com>
7170
7171         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
7172         `method->method->signature->generic_param_count != 0' to make it
7173         work for interface methods.
7174
7175 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7176
7177         * process.c: quote the string passed to the shell using g_shell_quote.
7178
7179 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7180
7181         * threads.c:
7182         (mono_threads_manage): don't remove the finalizer thread and self
7183         from the threads hash table so that mono_thread_manage can be called
7184         more than once.
7185
7186 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7187
7188         * process.c: quote the arguments when UseShellExecute is true. Fixes
7189         bug #55790.
7190
7191 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7192
7193         * threads.c: set mono_thread_detach as a cleanup routine for every
7194         thread. This way it's always executed upon thread termination, either
7195         aborted or finished normally. No more xsp hangs!
7196
7197 2004-03-17  Martin Baulig  <martin@ximian.com>
7198
7199         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
7200         `int count_nested' and a `MonoType **nested'.
7201
7202         * reflection.c (mono_reflection_bind_generic_parameters): Moved
7203         most of the functionality into a new static
7204         do_mono_reflection_bind_generic_parameters() and don't take a
7205         `MonoType *nested_in' argument any more.  Don't compute nested
7206         types here.
7207         (mono_reflection_generic_inst_get_nested_types): New public method
7208         to get nested types.
7209
7210         * class.c (mono_class_create_generic): Set `klass->nested_in' if
7211         we're a nested class.
7212
7213         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
7214         mono_reflection_generic_inst_get_nested_types() to compute the
7215         nested types.
7216
7217 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
7218
7219         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
7220         descriptive error message under windows.
7221         
7222 2004-03-17  Martin Baulig  <martin@ximian.com>
7223
7224         * class.c (dup_type): Added `const MonoType *original' argument;
7225         copy the attrs from the original type.
7226
7227 2004-03-17  Martin Baulig  <martin@ximian.com>
7228
7229         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
7230         `m->generic_inst_cache' here.
7231
7232 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
7233
7234         * exception.h exception.c: Add stack_overflow_exception.
7235
7236 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7237
7238         * threadpool.c:
7239         (overlapped_callback): call SetEvent *after* invoking the callback.
7240         No need to call CloseHandle.
7241
7242 2004-03-16  Martin Baulig  <martin@ximian.com>
7243
7244         * reflection.c (mono_image_get_fieldref_token): Take a
7245         `MonoReflectionField *' instead of a `MonoClassField *' and a
7246         `MonoClass *'; store the `MonoReflectionField *' in the hash.
7247
7248 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7249
7250         * appdomain.c: don't add the culture to the filename we're looking for
7251         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
7252
7253 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7254
7255         * locales.c: don't ignore symbols when doing case insensitive compares.
7256         Thanks Dick! Fixes bug #54046.
7257
7258         * threads.c: surround 'threads' usage with enter/leave in
7259         mono_thread_manage.
7260
7261 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
7262
7263         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
7264         implicitly marshalled as [Out]. Fixes #55450.
7265
7266         (mono_marshal_get_runtime_invoke): Zero out the result if there is
7267         an exception.
7268
7269 2004-03-16  Martin Baulig  <martin@ximian.com>
7270
7271         * class.c (mono_class_from_generic_parameter): Use the actual
7272         parameter name. 
7273
7274 2004-03-16  Martin Baulig  <martin@ximian.com>
7275
7276         * reflection.c (type_get_signature_size): New static function.
7277         Compues the size of the type in a method signature.
7278         (method_get_signature_size): New static function; calls
7279         type_get_signature_size() to compute the actual size of the
7280         method's signature.
7281         (method_encode_signature): Use method_get_signature_size() to get
7282         the signature's size rather than using `nparams * 10'.
7283
7284 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7285
7286         * file-io.h: define here WapiOverlapped on windows. I don't want the
7287         regular OVERLAPPED one.
7288
7289         * file-io.c:
7290         * threadpool.c: somehow, BindIoCompletionCallback is not found.
7291         Disabling AIO on windows.
7292
7293 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7294
7295         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
7296         bug #55385.
7297
7298 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7299
7300         * appdomain.c: upgraded corlib version.
7301
7302         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
7303         and BeginWrite. Allow opening files for asynchrnous operations.
7304
7305         * file-io.h: new struct that maps FileStreamAsyncResult.
7306         * icall.c: added new icalls.
7307         * process.[ch]: support setting child process environment variables
7308         and use the SHELL or COMSPEC when UseShellExecute is true.
7309
7310         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
7311         callback for async. IO is here and also BindHandle.
7312
7313         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
7314         from here.
7315
7316 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
7317
7318         * reflection.c (create_custom_attr): Allow len == 0.
7319
7320         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
7321         computation on big-endian machines.
7322
7323 2004-03-13  Martin Baulig  <martin@ximian.com>
7324
7325         * class.h (MonoGenericInst): Added `int count_ifaces'.
7326
7327         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
7328         `ginst->count_ifaces' instead `klass->interface_count' since we
7329         may get called before the vtable is created.
7330
7331         * loader.c (mono_method_get_param_names): If we're a generic
7332         instance, return and don't initialize the class.
7333
7334         * reflection.c (mono_reflection_setup_generic_class): Don't call
7335         ensure_runtime_vtable().
7336         (mono_reflection_bind_generic_parameters): Set
7337         `ginst->count_ifaces'.
7338
7339 2004-03-11  Jackson Harper <jackson@ximian.com>
7340
7341         * icall.c:
7342         * unicode.c:
7343         * unicode.h: Remove unused System.Char icalls.
7344         
7345 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
7346
7347         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
7348         code when we P/Invoke the first library in Windows.Forms, instead
7349         of when we first open the assembly.
7350
7351         * assembly.c: Drop the lookup from here.
7352
7353 2004-03-10  Martin Baulig  <martin@ximian.com>
7354
7355         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
7356         class for properties, fields and events.  Finally fixes #54945.
7357
7358 2004-03-10  Martin Baulig  <martin@ximian.com>
7359
7360         * metadata.c (mono_metadata_class_equal): New static function;
7361         checks whether two generic instances or two generic parameters are
7362         equal.
7363         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
7364         compare classes.        
7365
7366 2004-03-10  Martin Baulig  <martin@ximian.com>
7367
7368         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
7369
7370         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
7371         argument and write it into the `reflection_info' field.
7372
7373         * icall.c
7374         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
7375         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
7376
7377 2004-03-09  Jackson Harper  <jackson@ximian.com>
7378
7379         * char-conversions.h: use 8 bits for numeric data its all we need
7380         * icall.c: numeric data is only 8 bits now.
7381
7382 2004-03-09  Martin Baulig  <martin@ximian.com>
7383
7384         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
7385
7386         * class.c (init_properties, init_events): Initialize the new
7387         `parent' field.
7388
7389         * reflection.c (typebuilder_setup_properties): Likewise.
7390         (typebuilder_setup_events): Likewise.
7391
7392         * reflection.h (MonoEventInfo): Replaced `parent with
7393         `declaring_type' and `reflected_type'.
7394
7395         * icall.c (ves_icall_get_property_info): Distinguish between
7396         declaring and reflected type.
7397         (ves_icall_get_event_info): Likewise.
7398
7399 2004-03-09  Martin Baulig  <martin@ximian.com>
7400
7401         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
7402         (ves_icall_Type_GetField): Correctly set field->klass.
7403
7404 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
7405
7406         * loader.h: Fix warning.
7407
7408 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
7409
7410         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
7411         library routine if present.  Notice that it will still continue
7412         executing even if its missing, for those working on the Gtk#
7413         edition of Windows.Forms.
7414
7415         * assembly.c (do_mono_assembly_open): If loading the
7416         System.Windows.Forms call mono_loader_wini_init.
7417
7418 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
7419
7420         * class.h: Added MonoRemoteClass struct.
7421         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
7422         function for MonoStrings.
7423         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
7424         Added internal call for getting the proxy type.
7425         * marshal.c: Get the type of transparent proxies from its remote_class.
7426         Added methods that generate the IL for type checks and casts:
7427         mono_marshal_get_isinst, mono_marshal_get_castclass, 
7428         mono_marshal_get_proxy_cancast.
7429         * marshal.h: Declaration of the previous new methods.
7430         * object.c: Added new moethods for creating and updating MonoRemoteClass
7431         instances: mono_remote_class, mono_upgrade_remote_class, 
7432         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
7433         * verify.c: FIx transparent_proxy_fields layout.
7434         * appdomain.c: Bump corlib version.
7435
7436 2004-03-04  Jackson Harper  <jackson@ximian.com>
7437
7438         * icall.c: Add icall to access char conversion tables.
7439         * char-conversions.h: Character conversion tables.
7440         * Makefile.am: Add char-conversions.h private header file.
7441         
7442 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
7443
7444         * appdomain.c (unload_thread_main): Increase unloading timeout to
7445         10 sec as a temporary workaround for Nant problems.
7446
7447 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
7448
7449         * gc.c: Add checks for GC_enable and GC_disable.
7450
7451         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
7452         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
7453         (bug #54988).
7454         
7455 2004-02-27  Martin Baulig  <martin@ximian.com>
7456
7457         * reflection.c (mono_reflection_bind_generic_parameters): Take a
7458         `MonoReflectionType *' instead of a `MonoType *'.
7459
7460 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
7461
7462         * gc.c (run_finalize): Avoid finalizing the object representing the
7463         finalizer thread.
7464         (finalizer_thread): Fix warning.
7465
7466 2004-02-25  Martin Baulig  <martin@ximian.com>
7467
7468         * class.c (_mono_class_get_instantiation_name): Added `int offset'
7469         argument for nested types.
7470         (mono_class_create_generic): Added support for nested generictypes.
7471
7472         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
7473         `GList *nested'.
7474
7475         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
7476
7477         * reflection.c (method_encode_signature): Increase the minimum
7478         value of `size' from 10 to 11.
7479         (mono_reflection_bind_generic_parameters): Take `int type_argc'
7480         and `MonoType **types' arguments instead of the `MonoArray
7481         *types'; added `MonoType *nested_in'.  Recursively instantiate
7482         nested classes. 
7483
7484 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
7485
7486         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
7487         stack_overflow_ex members which are used by exception handling.
7488
7489         * appdomain.c (mono_runtime_init): Initialize the new members.
7490
7491         * gc.c (mono_gc_enable): New helper function.
7492         * gc.c (mono_gc_disable): New helper function.
7493
7494 2004-02-23  Martin Baulig  <martin@ximian.com>
7495
7496         * icall.c: I must have been really stupid - make it actually work
7497         this time ;-)
7498
7499 2004-02-23  Martin Baulig  <martin@ximian.com>
7500
7501         * loader.c (method_from_memberref): Only inflate the method if
7502         it's in another klass.
7503
7504 2004-02-23  Martin Baulig  <martin@ximian.com>
7505
7506         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
7507         (mono_class_init): If we're a generic instance and an interface,
7508         compute `class->interface_id'; also create `class->interfaces'
7509         here and inflate them.
7510
7511         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
7512         `ginst->is_open'.
7513         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
7514
7515         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
7516
7517 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
7518
7519         * reflection.c (method_encode_code): Improved the error message
7520         generated by the exception.
7521
7522 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7523
7524         * icall.c: Martin did not do what he said in the ChangeLog for
7525         2004-02-18, but put back the changes for properties and events.
7526         Commenting those changes out again and adding comment to bug #54518.
7527         
7528         * process.c: removed warning.
7529
7530 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
7531
7532         * marshal.c (emit_struct_conv): Print an error message instead of
7533         asserting when a type does not have the StructLayout attribute.
7534
7535 2004-02-20  Martin Baulig  <martin@ximian.com>
7536
7537         * reflection.c (mono_type_get_object): Also use the cache for
7538         generic instances.
7539         (mono_reflection_bind_generic_parameters): Always compute
7540         `ginst->ifaces'.        
7541
7542 2004-02-20  Martin Baulig  <martin@ximian.com>
7543
7544         * class.h (MonoGenericMethod): Removed `klass'.
7545
7546         * class.c (mono_class_inflate_generic_method): Added `MonoClass
7547         *klass' argument.
7548
7549 2004-02-20  Martin Baulig  <martin@ximian.com>
7550
7551         * reflection.c (method_encode_methodspec): Actually use the
7552         uninflated signature for the memberref.
7553
7554 2004-02-20  Martin Baulig  <martin@ximian.com>
7555
7556         * class.h (MonoGenericMethod): Removed `declaring'.
7557
7558         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
7559         is NULL, compute it here.
7560
7561 2004-02-20  Martin Baulig  <martin@ximian.com>
7562
7563         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
7564
7565         * metadata.c (mono_metadata_generic_inst_hash): New method.
7566         (mono_metadata_generic_inst_equal): New method.
7567
7568         * reflection.c (mono_reflection_bind_generic_parameters): Use the
7569         `klass->image->generic_inst_cache' cache to avoid creating
7570         duplicate MonoGenericInst's.
7571
7572         * class.c (mono_class_inflate_generic_type): Use the cache.
7573
7574 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
7575
7576         * object.c: fixed gc descriptor calculation for embedded valuetypes.
7577
7578 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7579
7580         * icall.c: added Socket.WSAIoctl icall.
7581
7582         * socket-io.[ch]: implemented
7583         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
7584
7585 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
7586
7587         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
7588
7589 2004-02-18  Urs C Muff  <umuff@quark.com>
7590
7591         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
7592         this work on PPC and other big-endian architectures.
7593
7594         * debug-mono-symfile.h: Prepended the names of all the `guint32'
7595         fields with an underscore to make sure they're only accessed by
7596         the read32() macro.
7597
7598 2004-02-18  Martin Baulig  <martin@ximian.com>
7599
7600         * icall.c: Put the klass->refclass changes back for methods and
7601         fields, but not for properties and events.  We're currently not
7602         distinguishing between DeclaringType and ReflectedType for
7603         properties and events, that's what caused the regressions.
7604
7605 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7606
7607         * object.c:
7608         (mono_async_result_new): the handle can be NULL.
7609
7610         * threadpool.c: Use an event instead of a semaphore, don't initialize
7611         it until needed. This saves quite a few semaphores from being created
7612         when using the threadpool.
7613
7614 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
7615
7616         * object.c (mono_string_is_interned_lookup): Fix interning of long
7617         strings. Fixes #54473.
7618
7619         * domain.c (ldstr_equal): Optimize if the two strings are equal.
7620
7621         * icall.c: Revert the klass->refclass changes since they introduce
7622         regressions (bug #54518).
7623
7624 2004-02-18  Martin Baulig  <martin@ximian.com>
7625
7626         * class.c (mono_class_init): If we're a generic instance and don't
7627         come from a TypeBuilder, inflate our members here.
7628         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
7629         (mono_class_create_generic): New public method.
7630         (mono_class_initialize_generic): Removed.
7631         (get_instantiation_name): Renamed to
7632         _mono_class_get_instantiation_name() and made it public.
7633
7634 2004-02-18  Martin Baulig  <martin@ximian.com>
7635
7636         * class.c (mono_class_inflate_generic_type): Clear the new
7637         instance's `nginst->klass' when inflating a generic instance.
7638         (mono_class_is_subclass_of): Added (basic) support for generic
7639         instances.
7640
7641 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
7642
7643         * appdomain.h, domain.c: use a MonoCodeManager instead of a
7644         MonoMempool to hold compiled native code.
7645
7646 2004-02-17  Martin Baulig  <martin@ximian.com>
7647
7648         * class.h (MonoDynamicGenericInst): Added `count_properties' and
7649         `properties'.
7650
7651         * reflection.c (mono_reflection_generic_inst_initialize): Added
7652         `MonoArray *properties' argument.
7653
7654         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
7655
7656 2004-02-17  Martin Baulig  <martin@ximian.com>
7657
7658         * icall.c (ves_icall_Type_GetFields): Renamed to
7659         ves_icall_Type_GetFields_internal() and added a
7660         `MonoReflectionType *rtype' argument; pass it to
7661         mono_field_get_object() to set the field's "reflected" type.
7662         (ves_icall_Type_GetConstructors): Likewise.
7663         (ves_icall_Type_GetEvents): Likewise.
7664         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
7665         argument; pass it to mono_method_get_object() to set the method's
7666         "reflected" type.       
7667
7668 2004-02-17  Martin Baulig  <martin@ximian.com>
7669
7670         * class.h (MonoDynamicGenericInst): New type.
7671         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
7672
7673         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
7674         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
7675         (ves_icall_MonoGenericInst_GetFields): New interncall.
7676
7677         * class.c (mono_class_from_generic): Don't call
7678         mono_class_initialize_generic() if this is a dynamic instance;
7679         ie. it's being created from a TypeBuilder.
7680         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
7681         `class->byval_arg.type'.
7682
7683         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
7684         to `inflate_method' and made static.
7685         (mono_reflection_inflate_field): Removed.
7686         (mono_reflection_generic_inst_initialize): New public method.
7687
7688         * reflection.h (MonoReflectionGenericInst): Removed `methods',
7689         `ctors' and `fields'; added `initialized'.
7690
7691 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
7692
7693         * debug-helpers.c (mono_method_full_name): Fix output for empty
7694         namespaces.
7695
7696 2004-02-12  Martin Baulig  <martin@ximian.com>
7697
7698         * class.h (MonoClassField): Added `MonoType *generic_type'.
7699
7700         * reflection.c (mono_image_get_fieldref_token): Added support for
7701         instantiated generic types.
7702         (field_encode_inflated_field): Removed.
7703         (mono_image_get_inflated_field_token): Removed.
7704         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
7705
7706         * reflection.h (MonoReflectionInflatedField): Removed.
7707
7708 2004-02-12  Martin Baulig  <martin@ximian.com>
7709
7710         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
7711         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
7712
7713         * reflection.c (mono_image_get_methodspec_token): Take a
7714         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
7715         (mono_image_create_token): Check whether we have a
7716         `method->signature->gen_method' and call
7717         mono_image_get_methodspec_token() if appropriate.
7718         (inflated_method_get_object): Removed.
7719         (mono_reflection_bind_generic_method_parameters): Return a
7720         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
7721         (mono_reflection_inflate_method_or_ctor): Likewise.
7722
7723         * reflection.h (MonoReflectionInflatedMethod): Removed.
7724
7725 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
7726
7727         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
7728         for custom valuetype marshalling.
7729
7730         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
7731
7732 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7733
7734         * icall.c: fixed WSAGetLastError_internal name.
7735
7736 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
7737
7738         * threads.c (mono_thread_attach): Allow this to be called multiple
7739         times for a thread.
7740         
7741         * threads.c (build_wait_tids): Do not wait for ourselves.
7742
7743         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
7744         appdomain list is empty.
7745
7746         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
7747         memory returned by mono_string_builder_to_utf16, since it points into
7748         managed memory. Thanks to Bernie Solomon for noticing this.
7749
7750         * icall.c: Add AppDomainSetup icalls.
7751
7752         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
7753
7754         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
7755         types.
7756
7757         * reflection.c (reflection_methodbuilder_to_mono_method): Save
7758         custom attributes to the method_aux struct. Also fix array indexes etc.
7759
7760         * loader.c (mono_method_get_param_names): Make dynamic case work again.
7761         
7762 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
7763
7764         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
7765         (both static and runtime) and reduce startup time.
7766
7767 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
7768
7769         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
7770         AsAny marshalling conversion instead of crashing.
7771
7772         * marshal.c: Fix warnings.
7773
7774 2004-02-09  Martin Baulig  <martin@ximian.com>
7775
7776         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
7777
7778         * reflection.h (MonoReflectionInflatedMethod): Removed the
7779         `declaring' field, it's now in the unmanaged MonoGenericMethod.
7780
7781         * reflection.c (method_encode_methodspec): Removed the `method'
7782         argument; we get it from `gmethod->declaring'.
7783         (inflated_method_get_object): Removed the `declaring' argument.
7784
7785 2004-02-09  Martin Baulig  <martin@ximian.com>
7786
7787         * class.h (MonoGenericMethod): New type.
7788         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
7789         `generic_method'.
7790
7791         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
7792         a `MonoGenericMethod *gen_method' one.
7793
7794         * class.c (mono_class_inflate_generic_type): Take an additional
7795         `MonoGenericMethod * argument.  This is only non-NULL if we're
7796         inflating types for a generic method.   
7797         (mono_class_inflate_generic_signature): Renamed to
7798         inflate_generic_signature() and made static; take a
7799         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
7800         (inflate_generic_header): Take a `MonoGenericMethod *' argument
7801         instead of a `MonoGenericInst *' one.
7802         (mono_class_inflate_generic_method): Likewise.
7803
7804         * reflection.c (encode_generic_method_sig): Take a
7805         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
7806         (method_encode_methodspec): Likewise.
7807         (inflated_method_get_object): Likewise. 
7808
7809         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
7810         field with a `MonoGenericMethod *gmethod' one.  
7811
7812 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
7813
7814         * class.h (mono_class_has_parent): add parens to expansion
7815         so you can ! this.
7816
7817 2004-02-08  Martin Baulig  <martin@ximian.com>
7818
7819         * image.h (MonoImage): Removed `generics_cache'.
7820
7821         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
7822         instead of a `MonoType *' argument; removed the `inflate_methods'
7823         argument.  Don't inflate methods here.
7824
7825         * loader.c (find_method): If it's a generic instance, call
7826         mono_class_init() on the `sclass->generic_inst->generic_type'.
7827
7828         * metadata.c (mono_type_size): Make this work on uninitialized
7829         generic instances; call it on the `ginst->generic_type's class.
7830
7831         * reflection.c (mono_reflection_bind_generic_parameters): Call
7832         mono_class_from_generic() to create the `ginst->klass'.
7833
7834 2004-02-08  Martin Baulig  <martin@ximian.com>
7835
7836         * class.h (MonoClass): Changed type of `generic_inst' from
7837         `MonoType *' to `MonoGenericInst *'.
7838
7839 2004-02-08  Martin Baulig  <martin@ximian.com>
7840
7841         * icall.c (ves_icall_Type_BindGenericParameters): Just call
7842         mono_type_get_object(), this is now creating a `MonoGenericInst'
7843         for MONO_TYPE_GENERICINST.
7844         (ves_icall_MonoGenericInst_GetParentType): Likewise.
7845         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
7846
7847         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
7848         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
7849         (inflated_method_get_object): Added `MonoClass *refclass' argument.
7850         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
7851         and reflected type.
7852
7853         * reflection.h (MonoReflectionInflatedMethod): Removed
7854         `declaring_type' and `reflected_type'.
7855
7856 2004-02-08  Martin Baulig  <martin@ximian.com>
7857
7858         * class.h (MonoGenericInst): Added `MonoType *parent' and
7859         `MonoType **ifaces'.
7860
7861         * reflection.h (MonoReflectionGenericInst): Removed `klass',
7862         `parent' and `interfaces'.
7863
7864         * reflection.c (mono_reflection_bind_generic_parameters): Take a
7865         `MonoType *' argument and return a `MonoType *'.
7866
7867         * icall.c
7868         (ves_icall_MonoGenericInst_GetParentType): New interncall.
7869         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
7870
7871 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
7872
7873         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
7874         valuetype marshalling.
7875
7876 2004-02-06  Martin Baulig  <martin@ximian.com>
7877
7878         * class.c
7879         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
7880         (my_mono_class_from_generic_parameter): Likewise.
7881
7882 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
7883
7884         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
7885         contents of the symbol files lazily.
7886
7887         * object.h (MonoThread): Add 'name' and 'name_len' fields.
7888
7889         * threads.h threads.c icall.c: New icalls for getting and setting the
7890         threads name.
7891
7892 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
7893
7894         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
7895         Raise an exception when the domain is not found.
7896
7897 2004-02-03  Martin Baulig  <martin@ximian.com>
7898
7899         * reflection.c (mono_image_get_methodspec_token): Use the
7900         uninflated signature; fixes gen-33.
7901
7902 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
7903
7904         * gc.c threads.c: Make the finalizer thread a normal managed thread so
7905         the finalizer code can use thread functionality.
7906
7907         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
7908         the finalizer thread.
7909
7910         * threads.c: Make some functions more robust.
7911
7912         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
7913
7914         * metadata.h: Add new marshalling conventions.
7915
7916         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
7917         stringbuilder marshalling. Fixes #53700.
7918
7919         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
7920
7921         * reflection.c (mono_image_get_type_info): Save declarative security
7922         info.
7923
7924         * reflection.c (mono_image_get_field_info): Handle uninitialized 
7925         unmanaged fields as well.
7926
7927         * appdomain.c: Bump corlib version.
7928
7929 2004-02-01  Martin Baulig  <martin@ximian.com>
7930
7931         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
7932         method type arguments.  
7933
7934 2004-01-30  Duncan Mak  <duncan@ximian.com>
7935
7936         * marshal.h: Add prototype for
7937         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
7938         and
7939         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
7940         fix the build.
7941
7942 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
7943
7944         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
7945         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
7946
7947 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
7948
7949         * marshal.c (mono_marshal_get_native_wrapper): Add support for
7950         custom marshalling of valuetypes.
7951
7952         * marshal.c: Fix some warnings.
7953
7954 2004-01-29  Martin Baulig  <martin@ximian.com>
7955
7956         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
7957         for generic method parameters.
7958
7959         * reflection.c (method_encode_methodspec): Write the uninflated
7960         signature into the methodspec table.
7961         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
7962         is always the uninflated method.
7963         (reflection_methodbuilder_to_mono_method): Copy the generic
7964         parameters from the MethodBuilder into `header->gen_params'.
7965
7966 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
7967
7968         * class.c (mono_class_from_generic_parameter): Fix warning.
7969
7970 2004-01-27  Martin Baulig  <martin@ximian.com>
7971
7972         * class.c (mono_class_from_generic_parameter): Don't create
7973         `klass->methods' here.  
7974
7975 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
7976
7977         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
7978         extension since it does not work with libraries named lib<FOO>.dll.so.
7979
7980 2004-01-25  Martin Baulig  <martin@ximian.com>
7981
7982         * class.c (mono_class_inflate_generic_type): Added support for
7983         MONO_TYPE_GENERICINST.
7984
7985         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
7986         inflate methods on open constructed types.      
7987
7988 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7989
7990         * object.c: fire ProcessExit event in the root AppDomain after running
7991         Main. Fixes bug #53299.
7992
7993 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
7994
7995         * socket-io.c: include the new socket-wrappers.h header.
7996         Use the wrappers instead of the unix socket functions to make the code
7997         more clear.
7998
7999 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
8000
8001         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
8002
8003         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
8004         Fixes #22532.
8005
8006 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
8007
8008         * reflection.c (mono_image_create_pefile): Handle the case when the
8009         entry point is not a MethodBuilder.
8010
8011         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
8012         field to ReflectionMethod since it is not allways a builder.
8013
8014         * reflection.c (type_get_fully_qualified_name): New helper function to
8015         return the fully qualified name of a type.
8016
8017         * reflection.c (encode_marshal_blob): Always emit the fully qualified
8018         type name for custom marshallers.
8019
8020         * reflection.c (mono_marshal_spec_from_builder): Ditto.
8021
8022         * class.c (mono_class_setup_vtable): If a parent class already 
8023         implements an interface, use the implementing methods from that class.
8024         Fixes #53148.
8025
8026 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8027
8028         * threadpool.c: just return instead of ExitThread to allow for thread
8029         clean up earlier.
8030
8031 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
8032
8033         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
8034         when closing resource modules.
8035
8036         * reflection.c (mono_image_create_pefile): Handle the case when the
8037         entry point is not a MethodBuilder.
8038
8039         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
8040         field to ReflectionMethod since it is not allways a builder.
8041
8042 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
8043
8044         * marshal.c (mono_marshal_get_managed_wrapper): 
8045         mono_marshal_alloc takes native int so CONV_I
8046         the arg for 64bits.
8047
8048 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
8049
8050         * reflection.c (fixup_cattrs): New function to fixup the methoddef
8051         tokens in the cattr table. Fixes #53108.
8052
8053 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8054
8055         * loader.c: don't trim ".dll" before looking up in the config file.
8056         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
8057
8058 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
8059
8060         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
8061         Return the module which contains the resource as well.
8062         (ves_icall_System_Reflection_Module_Close): New icall.
8063
8064         * appdomain.c: Bump corlib version number.
8065
8066         * image.c (mono_image_addref): New public function.
8067
8068         * assembly.c: Call mono_image_addref.
8069
8070         * reflection.c (mono_module_get_object): Increase reference count of 
8071         the image.
8072
8073         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
8074         Fixes #22532.
8075
8076         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
8077         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
8078         proper exceptions on DllImport problems.
8079
8080 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
8081
8082         * class.c, metadata.c: eliminate CSIZE macro.
8083
8084 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
8085
8086         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
8087         * object.h: Added async_callback field in MonoAsyncResult.
8088         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
8089         * verify.c: Added async_callback in MonoAsyncResult layout.
8090
8091 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
8092
8093         * reflection.c (mono_reflection_get_custom_attrs): Add support
8094         for Modules.
8095
8096 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
8097
8098         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
8099         marshalling.
8100         (mono_marshal_method_from_wrapper): Add null pointer check.
8101
8102 2004-01-16  Martin Baulig  <martin@ximian.com>
8103
8104         * debug-mono-symfile.h: Set version number to 36 and reflect
8105         latest symbol writer changes.
8106
8107 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
8108
8109         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
8110         multi-dimensional arrays.
8111         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
8112         (mono_class_from_mono_type): Use bounded_array_class_get.
8113         
8114         * class.c (mono_bounded_array_class_get): New function which takes
8115         a 'bounded' bool argument to distinguish vectors from one dimensional
8116         arrays.
8117
8118         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
8119         bounded_array_class_get if the array has bounds.
8120
8121         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
8122         Search modules loaded using AssemblyBuilder:AddModule as well.
8123
8124 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8125
8126         * appdomain.c: increased corlib version.
8127         * filewatcher.c: removed g_print.
8128         * icall.c:
8129         (get_property_info): only allocate what is actually requested.
8130         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
8131
8132 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8133
8134         * Makefile.am: added filewatcher.[ch]
8135         * filewatcher.[ch]: FileSystemWatcher runtime support.
8136         * icall.c: added new FSW icalls.
8137
8138 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
8139
8140         * string-icalls.c: fix stringbuilder regression as suggested by
8141         Iain McCoy <iain@mccoy.id.au>.
8142
8143 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
8144
8145         * process.c (process_read_stringtable_block): Recognize '007f' as
8146         a language neutral stringtable block.
8147
8148 2004-01-12  Patrik Torstensson
8149
8150         * object.h (MonoStringBuilder) : Changed layout to support our
8151         new stringbuilder class.
8152         * marshal.c: Change marshalling to support the new layout of 
8153         string builder.
8154         * appdomain.c: increased version number because new layout of
8155         string builder.
8156
8157 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
8158
8159         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
8160         assembly name as an string instead of an AssemblyName, since it is
8161         easier to extract info from it.
8162
8163         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
8164         the culture subdirectories too. Fixes #52231.
8165
8166 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8167
8168         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
8169         It takes 2 new parameters with an optional name for the method to look
8170         for and case ignoring info.
8171
8172         * threadpool.c: removed unused variable.
8173
8174 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8175
8176         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
8177         It takes 2 new parameters with an optional name for the property to look
8178         for and case ignoring info.
8179         Fixes bug #52753.
8180
8181 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
8182
8183         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
8184         Fix #52451.
8185
8186 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8187
8188         * appdomain.c:
8189         * assembly.c: escape the uri before passing it to g_filename_from_uri.
8190         Fixes bug #52630.
8191
8192 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
8193
8194         * reflection.c: Add support for more than one unmanaged resource.
8195
8196         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
8197         in field->def_value, as done in all other cases.
8198
8199         * reflection.c (mono_reflection_get_custom_attrs): Add support for
8200         TypeBuilders.
8201
8202         * reflection.c (mono_reflection_create_runtime_class): Remove 
8203         errorneous assignment to klass->element_class, since it is already
8204         done in mono_reflection_setup_internal_class.
8205
8206 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8207
8208         * gc.c: added missing LeaveCriticalSection.
8209         * icall.c: indented a couple of lines.
8210         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
8211         if we call EndInvoke inside a callback. Fixes bug #52601.
8212
8213 2004-01-07  Martin Baulig  <martin@ximian.com>
8214
8215         * mono-debug-debugger.h
8216         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
8217
8218 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
8219
8220         * appdomain.c: Use messages in NotImplementedException.
8221
8222         * exception.c (mono_get_exception_not_implemented): Now this takes
8223         a message argument.
8224
8225         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
8226         exception instead of g_asserting an aborting when something is not
8227         implemented.
8228
8229         Add some inline docs.
8230
8231 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
8232
8233         * reflection.h: Update after changes to object layout.
8234
8235         * reflection.c: Implement saving of unmanaged aka win32 resources.
8236
8237         * appdomain.c: Bump version number.
8238
8239         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
8240         Handle missing domains gracefully.
8241
8242 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
8243
8244         * file-io.c : On Windows, there are much more invalid_path_chars.
8245
8246 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
8247
8248         * class.h, object.c: prepare for GetType () speedup.
8249
8250 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
8251
8252         * profiler.c: workaround for --profile null reference exception on
8253           cygwin. Patch by Patrik Torstensson.
8254
8255 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
8256
8257         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
8258         make work for unaligned access.
8259
8260 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
8261
8262         * class.c: small cleanup (class->fields [i] -> field).
8263         * image.c: check address of metadata is valid.
8264
8265 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
8266
8267         * assembly.h assembly.c (mono_assembly_loaded): New public function to
8268         search the list of loaded assemblies.
8269
8270         * reflection.c (mono_reflection_type_from_name): Use 
8271         mono_assembly_loaded instead of mono_image_loaded.
8272
8273         * reflection.c: Fix warnings.
8274
8275 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
8276
8277         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
8278         is dynamic. This is needed since an assembly can contain both dynamic and
8279         non-dynamic images.
8280
8281         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
8282         assembly->dynamic.
8283
8284         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
8285
8286         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
8287         to store modules loaded using AddModule.
8288
8289         * reflection.c (mono_image_fill_file_table): Generalize this so it works
8290         on Modules.
8291
8292         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
8293
8294         * reflection.c (mono_image_fill_export_table_from_module): New function to
8295         fill out the EXPORTEDTYPES table from a module.
8296
8297         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
8298         into a separate function. Also handle loaded non-dynamic modules.
8299
8300         * reflection.c (mono_image_basic_init): Fix memory allocation.
8301
8302         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8303
8304         * assembly.c (mono_assembly_load_references): Make this public.
8305
8306 2003-12-19  Martin Baulig  <martin@ximian.com>
8307
8308         * class.c (mono_class_initialize_generic): Made this static, take
8309         a `MonoGenericInst *' instead of a `MonoClass *'.
8310         (mono_class_from_generic): Call mono_class_initialize_generic()
8311         unless we're already initialized or being called from
8312         do_mono_metadata_parse_generic_inst().
8313
8314         * class.h (MonoGenericInst): Added `initialized' and
8315         `init_pending' flags.
8316
8317         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
8318         `mono_class_init (gklass)' or mono_class_initialize_generic()
8319         here; set `generic_inst->init_pending' while parsing the
8320         `type_argv'.
8321
8322 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
8323
8324         * locales.c: include string.h for memxxx prototypes
8325
8326 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
8327
8328         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
8329         constructor when accessing literal fields.
8330
8331 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
8332
8333         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8334
8335         * reflection.c (assembly_add_resource_manifest): New function to fill
8336         the MANIFESTRESOURCE table.
8337
8338         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
8339
8340         * reflection.h: Update to changes in class layout.
8341
8342         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
8343         Reenable call to mono_runtime_is_shutting_down ().
8344
8345         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
8346         determine if the runtime is shutting down.
8347
8348 2003-12-16  Jackson Harper <jackson@ximian.com>
8349
8350         * icall.c: comment out call to mono_runtime_is_shutting_down to
8351         fix build.
8352         
8353 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
8354
8355         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
8356         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
8357
8358 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
8359
8360         * reflection.c: move definition of swap_with_size
8361         to before its first call
8362
8363 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
8364
8365         * appdomain.c (mono_runtime_is_shutting_down): New public function.
8366
8367         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
8368         icall.
8369
8370         * object.c: Fix warnings.
8371
8372         * icall.c (ves_icall_Type_Get...): Only consider inherited static
8373         members if FlattenHierarchy is set.
8374
8375         * reflection.c (mono_image_add_decl_security): New function to emit
8376         declarative security.
8377
8378         * reflection.h reflection.c: Add support for declarative security.
8379
8380         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
8381         
8382 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
8383
8384         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
8385         
8386         * appdomain.c verify.c: Moved corlib version checking into its own
8387         function in appdomain.c since it needs to create vtables etc.
8388
8389 2003-12-13  Patrik Torstensson <p@rxc.se>
8390
8391         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
8392         instead of unwrapped server.
8393
8394 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
8395
8396         * verify.c (check_corlib): Fix field index.
8397
8398 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
8399
8400         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
8401         GetGacPath icall.
8402
8403 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
8404
8405         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
8406         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
8407         cope with sizeof(size_t) != sizeof(guint32).
8408
8409 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8410
8411         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
8412         in case of failure.
8413
8414 2003-12-10  Mark Crichton <crichton@gimp.org>
8415
8416         * icall.c: removed the GetNonZeroBytes.  We now handle this case
8417         in managed code.
8418
8419         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
8420
8421 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
8422
8423         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
8424         marked as deleted.
8425
8426 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
8427
8428         * verify.c (check_corlib): Handle the case when the version field is 
8429         initialized by a static constructor.
8430
8431 2003-12-08  Patrik Torstensson  <p@rxc.se>
8432
8433     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
8434
8435 2003-12-08  Martin Baulig  <martin@ximian.com>
8436
8437         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
8438         a MonoReflectionGenericParameter, also take the parameter index
8439         and name as arguments.
8440         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
8441         (ves_icall_MonoGenericParam_initialize): New interncall.
8442         (ves_icall_Type_make_byref_type): New interncall.
8443
8444         * reflection.h (MonoReflectionGenericParam): Derive from
8445         MonoReflectionType, not just from MonoObject.  Added `refobj' and
8446         `index' fields.
8447
8448         * reflection.c (mono_reflection_define_generic_parameter): Create
8449         and return a new MonoReflectionGenericParam; don't initialize the
8450         constraints here.
8451         (mono_reflection_initialize_generic_parameter): New public method;
8452         initializes the constraints and creates the `param->pklass'.
8453
8454 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
8455
8456         * reflection.h reflection.c: Use the new fields 'num_types', 
8457         'num_fields' and 'num_methods' to track the number of types etc.
8458
8459         * verify.c (check_corlib): Check corlib version number.
8460
8461 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
8462
8463         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
8464         function works on all methods.
8465
8466 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
8467
8468         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
8469         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
8470         the custom_type_info flag of the transparent proxy.
8471         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
8472         objects that supports IRemotingTypeInfo.
8473         * object.h: Added custom_type_info field in transparent proxy.
8474
8475 2003-12-06  Martin Baulig  <martin@ximian.com>
8476
8477         * class.c (mono_class_create_from_generic): Removed.
8478         (mono_class_from_generic): Check `ginst->klass' before doing
8479         anything else.  This is important to fully support "recursive"
8480         generic types.
8481
8482         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
8483         empty `generic_inst->klass' before doing anything else.
8484
8485 2003-12-06  Dick Porter  <dick@ximian.com>
8486
8487         * verify.c: 
8488         * object.h:
8489         * icall.c:
8490         * locales.c: Use C structs to access class fields.  Don't do a
8491         conversion between MonoString and UChar because both are
8492         platform-endian UTF-16.  Compare now takes startindex and count
8493         parameters.  Add a char overload for IndexOf.  Speed up the
8494         invariant string IndexOf.
8495
8496 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
8497
8498         * Makefile.am (monosn_LDADD): Fix parallel build.
8499
8500 2003-12-04  Martin Baulig  <martin@ximian.com>
8501
8502         * icall.c
8503         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
8504         (ves_icall_Type_make_array_type): New interncall.       
8505
8506 2003-12-04  Martin Baulig  <martin@ximian.com>
8507
8508         * locales.c: also change it in the !HAVE_ICU case.
8509
8510 2003-12-04  Dick Porter  <dick@ximian.com>
8511
8512         * icall.c:
8513         * locales.c: construct_compareinfo is now in CompareInfo, not
8514         CultureInfo.
8515
8516 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
8517
8518         * image.c (mono_image_load_file_for_image): Cache loaded images in the
8519         image->files array.
8520
8521         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
8522         table as well.
8523
8524         * assembly.c (mono_assembly_load_references): Only load references
8525         once.
8526
8527         * class.c (mono_class_from_name): Avoid linear search of the 
8528         EXPORTEDTYPE table.
8529
8530         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
8531
8532 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
8533
8534         * image.h (MonoImage): Add 'field_cache' field.
8535
8536         * loader.c (mono_field_from_token): Cache field lookups.
8537         
8538         * reflection.c (mono_module_get_object): Fix name property.
8539
8540         * icall.c (ves_icall_get_enum_info): Update after changes to 
8541         mono_metadata_get_constant_index ().
8542
8543         * icall.c: Get rid of get_type_info icall, use a separate icall for
8544         each type property to avoid needless memory allocations. Fixes #51514.
8545
8546         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
8547         to avoid needless binary searches.
8548
8549         * class.c (class_compute_field_layout): Move the initialization of
8550         field->def_value to mono_class_vtable ().
8551
8552         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
8553         non-corlib types.
8554
8555         * object.c (mono_object_allocate): Make it inline.
8556
8557         * object.c (mono_object_allocate_spec): Make it inline.
8558         
8559 2003-12-02  Dick Porter  <dick@ximian.com>
8560
8561         * locales.c (create_NumberFormat): NumberFormatInfo construction.
8562         Patch by Mohammad DAMT (mdamt@cdl2000.com).
8563
8564 2003-12-01  Dick Porter  <dick@ximian.com>
8565
8566         * threads.c: Fix signature and call in CreateMutex and
8567         CreateEvent.
8568
8569 2003-12-01  Dick Porter  <dick@ximian.com>
8570
8571         * icall.c: 
8572         * locales.c: Implement string compares and searching
8573
8574         * object.h: Add extra Thread field
8575
8576 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
8577
8578         * reflection.c (fixup_method): Add support for MonoCMethod.
8579
8580 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
8581
8582         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
8583
8584         * reflection.c (assembly_name_to_aname): Allow extra characters in
8585         assembly names. Fixes #51468.
8586
8587 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
8588
8589         * exception.c (mono_exception_from_name_domain): New helper function.
8590
8591         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
8592         exception object in the correct domain.
8593
8594         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
8595         formatting + make a copy a the input data.
8596
8597         * loader.c (mono_get_method_from_token): Methods which contain
8598         native code do not have entries in the ImplMap.
8599
8600         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
8601         Thanks to Gonzalo for spotting this.
8602         
8603         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
8604         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
8605
8606         * assembly.h (mono_assembly_load_from): Split the second part of 
8607         assembly loading into a new public function.
8608
8609         * exception.h (mono_get_exception_bad_image_format): New function.
8610
8611 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
8612
8613         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
8614         Enumerate all modules inside a dynamic assembly. Fixes #51293.
8615         
8616         * icall.c: Add new icall for creating dynamic methods.
8617
8618         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
8619
8620         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
8621
8622         * reflection.c (mono_reflection_create_dynamic_method): New icall to
8623         create a dynamic method.
8624
8625         * reflection.c (resolve_object): New helper function.
8626
8627         * reflection.c: Generalize ReflectionMethodBuilder and the functions
8628         which manipulate it so they can also work on dynamic methods.
8629
8630         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
8631         creating the MonoReflectionMethodAux structure if it is not needed.
8632         
8633         * reflection.h verify.c: Update after changes to object layout.
8634
8635         * reflection.c (method_builder_encode_signature): Fix compilation on
8636         gcc 2.95.x.
8637
8638 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
8639
8640         * appdomain.h: Added support for context static fields. Added static_data
8641           field to MonoAppContext and renamed thread_static_fields to a more
8642           generic special_static_fields in MonoAppDomain, since it can now contain
8643           context static fields.
8644         * domain.c: Updated hashtable name.
8645         * object.c: Replaced field_is_thread_static() for a more generic
8646           field_is_special_static() which also checks for context static attribute.
8647           In mono_class_vtable(), added support for static context fields.
8648         * threads.c: Changed methods that manage thread static fields to more
8649           generic methods so they can be reused both for thread and context static
8650           data.
8651         * threads.h: Declared some new methods.
8652
8653 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
8654
8655         * reflection.h: Update after changes to the managed types.
8656
8657         * reflection.c (encode_custom_modifiers): New helper function.
8658
8659         * reflection.c (method_encode_signature): Emit custom modifiers.
8660
8661         * reflection.c (field_encode_signature): Emit custom modifiers.
8662
8663 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
8664
8665         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
8666
8667         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
8668         implementation.
8669
8670         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
8671         icall.
8672
8673         * object.c (mono_field_get_value_object): New function.
8674
8675         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
8676         specific.
8677
8678 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
8679
8680         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
8681         return a preallocated out-of-memory exception instance.
8682
8683         * object.c (out_of_memory): Use the new function.
8684
8685         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
8686         flag is before the custom modifiers. Fixes #49802.
8687
8688 2003-11-16  Martin Baulig  <martin@ximian.com>
8689
8690         * class.c (mono_class_is_open_constructed_type): Implemented the
8691         MONO_TYPE_GENERICINST case.
8692
8693 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
8694
8695         * assembly.c (mono_assembly_fill_assembly_name): New function to
8696         fill out the MonoAssemblyName structure.
8697         (mono_assembly_open): Use the new function.
8698
8699         * icall.c (fill_reflection_assembly_name): New helper function.
8700
8701         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
8702         new function.
8703
8704         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
8705
8706 2003-11-15  Martin Baulig  <martin@ximian.com>
8707
8708         * class.c (mono_class_is_open_constructed_type): New public
8709         function; checks whether a type is an open constructed type,
8710         ie. whether it still contains type parameters.
8711         (mono_class_inflate_generic_type): If we're a type parameter and
8712         the inflated type is also a MONO_TYPE_(M)VAR, return the original
8713         type.
8714
8715         * class.h (MonoGenericInst): Added `guint32 is_open'.
8716
8717         * loader.c (method_from_methodspec): Check whether we're an open
8718         or closed constructed type and set `ginst->is_open'.
8719
8720         * reflection.c (mono_reflection_bind_generic_parameters): Check
8721         whether we're an open or closed constructed type and set
8722         `ginst->is_open'.
8723         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
8724         from open constructed types.
8725
8726 2003-11-15  Martin Baulig  <martin@ximian.com>
8727
8728         * reflection.c (mono_reflection_bind_generic_parameters): If we're
8729         a generic instance (instead of a generic type declaration) with
8730         unbound generic parameters, bind them to our actual types.
8731
8732 2003-11-14  Martin Baulig  <martin@ximian.com>
8733
8734         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
8735
8736         * reflection.c (mono_reflection_bind_generic_parameters): If we're
8737         an interface type, populate `res->interfaces' with instantiated
8738         versions of all the interfaces we inherit.
8739
8740 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
8741
8742         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
8743         when MONO_PATH is set but doesn't contain the install dir.
8744
8745 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8746
8747         * icall.c:
8748         (ves_icall_Type_GetInterfaces): don't return an interface twice when
8749         it's also implemented in base classes. Fixes bug #50927.
8750
8751 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
8752
8753         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
8754         if this method is called from a finalizer. Fixes #50913.
8755
8756 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
8757
8758         * threads.c: Implement VolatileRead/VolatileWrite
8759
8760         * icall.c: Add new icalls for VolatileRead/VolatileWrite
8761
8762 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
8763
8764         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
8765         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
8766         2.95.3.
8767
8768         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
8769         from Peter Ross (pro@missioncriticalit.com).
8770         
8771 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
8772
8773         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
8774
8775 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
8776
8777         * assembly.c (mono_assembly_load_references): Disable check because it
8778         triggers on older corlibs which lots of people have.
8779
8780 2003-11-12  Jackson Harper  <jackson@ximian.com>
8781
8782         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
8783         load corlib.dll if mscorlib.dll is not found.
8784         * assembly.h: Remove corlib name define.
8785         * class.c:
8786         * domain.c:
8787         * image.c: Change corlib name to mscorlib.
8788         
8789 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
8790
8791         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
8792
8793 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
8794
8795         * appdomain.h: Added loader_optimization here to sync with the C#
8796         code, and add disallow_binding_redirects field.
8797
8798 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
8799
8800         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
8801
8802         * reflection.c (mono_image_build_metadata): Fix crash on modules
8803         with no types.
8804
8805         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
8806
8807         * icall.c (ves_icall_get_method_info): Return callingConvention as
8808         well.
8809
8810         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
8811         namespaces from the EXPORTEDTYPE table as well.
8812
8813         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
8814         from all modules inside the assembly.
8815         
8816 2003-11-11  Martin Baulig  <martin@ximian.com>
8817
8818         * reflection.c (mono_reflection_bind_generic_parameters): Make
8819         this work for interfaces.
8820
8821 2003-11-11  Martin Baulig  <martin@ximian.com>
8822
8823         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
8824
8825 2003-11-11  Martin Baulig  <martin@ximian.com>
8826
8827         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
8828         "MonoInflatedMethod" and "MonoInflatedCtor".
8829
8830 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
8831
8832         * reflection.c (resolution_scope_from_image): Use the assembly table
8833         from the manifest module, since other modules don't have it.
8834
8835         * debug-helpers.c (mono_type_full_name): New helper function.
8836
8837         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
8838
8839         * image.c (mono_image_load_file_for_image): New public function which
8840         is a replacement for the load_file_for_image in class.c.
8841
8842         * assembly.c (mono_assembly_load_module): A wrapper for the function
8843         above which does assembly association and reference loading too.
8844
8845         * class.c (mono_class_from_name): Call mono_assembly_load_module.
8846
8847 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8848
8849         * appdomain.c: not all of the attributes for the full assembly name
8850         are required and the order doesn't matter. Fixes bug #50787.
8851
8852 2003-11-10  Dick Porter  <dick@ximian.com>
8853
8854         * locales.c: Use platform-endian UTF16
8855
8856 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
8857
8858         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
8859         
8860 2003-11-10  Martin Baulig  <martin@ximian.com>
8861
8862         * metadata.c
8863         (mono_metadata_load_generic_params): Make this actually work.
8864
8865         * reflection.c (mono_reflection_bind_generic_parameters): If our
8866         parent is a generic instance, pass all the `types' to it, no
8867         matter whether it has the same number of type parameters or not.
8868
8869 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
8870
8871         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
8872
8873         * assembly.c (mono_assembly_load_references): Move the image<->assembly
8874         assignment code to this function so it gets called recursively for all
8875         modules.
8876
8877         * image.c (load_modules): Remove the assembly assignment since it is
8878         now done by mono_assembly_load_references.
8879         
8880         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
8881         Add 'module' argument.
8882         (mono_module_get_types): New helper function.
8883         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
8884
8885 2003-11-08  Martin Baulig  <martin@ximian.com>
8886
8887         * class.c (mono_class_inflate_generic_method): Interface method
8888         don't have a header.
8889
8890         * reflection.c (mono_image_get_methodspec_token): Take an
8891         additional `MonoGenericInst *' argument instead of reading it from
8892         the header; this is necessary to support interfaces.
8893         (mono_image_create_token): Pass the `MonoGenericInst *' from the
8894         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
8895         (inflated_method_get_object): Take an additional `MonoGenericInst *'
8896         argument.
8897
8898         * reflection.h (MonoReflectionInflatedMethod): Added
8899         `MonoGenericInst *ginst'.
8900
8901 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
8902
8903         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
8904
8905 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
8906
8907         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
8908
8909 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
8910
8911         * reflection.c 
8912         (reflection_methodbuilder_from_method_builder):
8913         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
8914         initialize a ReflectionMethodBuilder structure.
8915         (mono_image_get_methodbuilder_token):
8916         (mono_image_get_ctorbuilder_token): New functions to emit memberref
8917         tokens which point to types in another module inside the same assembly.
8918
8919         * reflection.c: Use the new helper functions.
8920         
8921         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
8922
8923         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
8924         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
8925
8926         * reflection.c (resolution_scope_from_image): Emit a moduleref if
8927         neccesary.
8928
8929         * reflection.c (mono_image_build_metadata): Emit metadata only for the
8930         current module. Emit the manifest only for the main module.
8931
8932         * reflection.c (mono_image_create_token): Add assertion when a 
8933         memberref needs to be created.
8934
8935         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
8936
8937         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
8938         larger buffer for the custom attribute blob. Fixes #50637.
8939         
8940 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8941
8942         * threadpool.c: notify listener on async processing handles after
8943         invoking the async callback. Thanks to Zoltan.
8944
8945 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
8946
8947         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
8948         avoid code duplication.
8949
8950         * reflection.h (MonoDynamicImage): New type which is currently unused,
8951         but will be used through the ref.emit code in place of 
8952         MonoDynamicAssembly.
8953
8954         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
8955         object layout.
8956
8957         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
8958         a MonoDynamicImage instead of just a MonoImage.
8959         
8960         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
8961         icalls to ModuleBuilder but keep their semantics, so they will work
8962         with moduleb->assemblyb. This will change later.
8963         
8964 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
8965
8966         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
8967         object layout.
8968
8969         * reflection.c (mono_image_build_metadata): Avoid creation of a default
8970         main module, since it is now done by the managed code.
8971
8972 2003-11-03  Martin Baulig  <martin@ximian.com>
8973
8974         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
8975         `ginst->klass' here.
8976         (method_encode_methodspec): Don't use the `ginst->generic_method's
8977         klass if it's a generic instance, use `ginst->klass' in this case.
8978
8979 2003-11-03  Martin Baulig  <martin@ximian.com>
8980
8981         * reflection.c (mono_image_get_generic_method_param_info):
8982         Removed, use mono_image_get_generic_param_info() instead.
8983         (mono_image_get_type_info): Write the GenericParam table before
8984         the Method table.  This is neccessary because in the GenericParam
8985         table, type parameters of the class (ie. '!0' etc.) must come
8986         before the ones from its generic methods (ie. '!!0' etc).
8987
8988 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
8989
8990         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
8991
8992 2003-11-02  Martin Baulig  <martin@ximian.com>
8993
8994         * reflection.c (create_generic_typespec): Take a
8995         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
8996         the generic parameters from it.
8997
8998 2003-11-02  Martin Baulig  <martin@ximian.com>
8999
9000         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
9001         instead of a `MonoClassField *' since we just need the type.
9002         (create_generic_typespec): New static function.  Creates a
9003         TypeSpec token for a generic type declaration.
9004         (mono_image_get_generic_field_token): New static function.
9005         (mono_image_create_token): If we're a FieldBuilder in a generic
9006         type declaration, call mono_image_get_generic_field_token() to get
9007         the token.
9008
9009 2003-11-02  Martin Baulig  <martin@ximian.com>
9010
9011         * reflection.h
9012         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
9013         `MonoReflectionGenericInst *declaring_type' and
9014         `MonoReflectionGenericInst *reflected_type' fields.
9015
9016         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
9017         `MonoReflectionGenericInst *declaring_type' and a
9018         `MonoReflectionGenericInst *reflected_type' argument instead of a
9019         single `MonoReflectionGenericInst *type' one.  Set
9020         `res->declaring_type' and `res->reflected_type' from them.
9021         (mono_reflection_inflate_field): Likewise.      
9022
9023 2003-11-02  Martin Baulig  <martin@ximian.com>
9024
9025         * class.c (mono_class_setup_vtable): Don't store generic methods
9026         in the vtable.  
9027
9028 2003-11-02  Martin Baulig  <martin@ximian.com>
9029
9030         * reflection.h (MonoReflectionGenericInst): Added
9031         `MonoReflectionType *declaring_type'.
9032
9033         * reflection.c (mono_reflection_bind_generic_parameters): Use
9034         `if (tb->parent)' instead of `klass->parent'.
9035
9036 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
9037
9038         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
9039         with an empty ASSEMBLY table.
9040
9041         * reflection.c (mono_image_build_metadata): Avoid using the same loop
9042         variable in the inner and outer loops.
9043
9044 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
9045
9046         * metadata.h (mono_metadata_make_token): Put parentheses around macro
9047         argument.
9048
9049         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
9050         
9051         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
9052         icalls. Instead, do everything in managed code. This is needed since
9053         it is hard to restore the original domain etc. in unmanaged code in the
9054         presence of undeniable exceptions.
9055
9056         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
9057         New icalls to push and pop appdomain refs.
9058
9059 2003-10-31  Martin Baulig  <martin@ximian.com>
9060
9061         * class.c (inflate_generic_type): Renamed to
9062         mono_class_inflate_generic_type() and made it public.
9063
9064         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
9065         New interncall.
9066
9067         * loader.c (mono_field_from_memberref): Also set the retklass for
9068         typespecs.
9069
9070         * fielder.c (mono_image_get_inflated_field_token): New static
9071         method; creates a metadata token for an inflated field.
9072         (mono_image_create_token, fixup_method): Added support for
9073         "MonoInflatedField".
9074         (fieldbuilder_to_mono_class_field): New static function.
9075         (mono_reflection_inflate_field): New public function.
9076
9077         * reflection.h
9078         (MonoReflectionGenericInst): Added `MonoArray *fields'.
9079         (MonoReflectionInflatedField): New typedef.     
9080
9081 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
9082
9083         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
9084         for Solaris and other platforms without s6_addr16
9085
9086 2003-10-30  Martin Baulig  <martin@ximian.com>
9087
9088         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
9089         argument instead of two.
9090         (mono_class_inflate_generic_signature): Likewise.
9091         (inflate_generic_header): Likewise.
9092         (mono_class_inflate_generic_method): Likewise.  In addition, if
9093         `ginst->klass' is set, it becomes the new `method->klass'.
9094
9095         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
9096         field.
9097
9098         * reflection.c (encode_generic_method_sig): Write a 0xa as the
9099         first byte. [FIXME]
9100         (method_encode_methodspec): If we have generic parameters, create
9101         a MethodSpec instead of a MethodRef.
9102         (fixup_method): Added support for "MonoInflatedMethod" and
9103         "MonoInflatedCtor".
9104         (mono_image_create_token): Added support for "MonoInflatedMethod"
9105         and "MonoInflatedCtor".
9106         (inflated_method_get_object): New static function; returns a
9107         managed "System.Reflection.MonoInflatedMethod" object.
9108         (mono_reflection_bind_generic_method_parameters): Return a
9109         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
9110         (mono_reflection_inflate_method_or_ctor): Likewise.
9111         (mono_image_get_generic_method_param_info): Initialize unused
9112         fields to zero.
9113         (mono_image_get_generic_param_info): Likewise.
9114
9115         * reflection.h (MonoReflectionInflatedMethod): New public
9116         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
9117         "S.R.MonoInflatedCtor" classes.
9118
9119         * loader.c (method_from_memberref): If we're a TypeSpec and it
9120         resolves to a generic instance, inflate the method.
9121
9122 2003-10-28  Dick Porter  <dick@ximian.com>
9123
9124         * object.c (mono_runtime_run_main): Convert command-line arguments
9125         into utf8, falling back to the user's locale encoding to do so.
9126
9127 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
9128
9129         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
9130         at this time.
9131
9132         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
9133
9134         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
9135         up icalls at method definition time. Partially fixes #33569.
9136
9137 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
9138
9139         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
9140         marshalling of arrays. Fixes #50116.
9141
9142         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
9143
9144         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
9145         points to a vtable in the dying appdomain.
9146
9147         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
9148         listeners into unmanaged code inside the lock.
9149
9150         * object.c (mono_class_vtable): Turn off typed allocation in non-root
9151         domains and add some comments.
9152
9153 2003-10-25  Martin Baulig  <martin@ximian.com>
9154
9155         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
9156
9157         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
9158
9159         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
9160         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
9161         currently parsing.  Create the generic class and store it in
9162         `generic_inst->klass' before parsing the type arguments.  This is
9163         required to support "recursive" definitions; see mcs/tests/gen-23.cs
9164         for an example.
9165         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
9166         to support recursive typespec entries.
9167
9168         * class.c (mono_class_setup_parent): If our parent is a generic
9169         instance, we may get called before it has its name set.
9170         (mono_class_from_generic): Splitted into
9171         mono_class_create_from_generic() and mono_class_initialize_generic().
9172
9173 2003-10-25  Martin Baulig  <martin@ximian.com>
9174
9175         * icall.c (ves_icall_Type_BindGenericParameters): Return a
9176         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
9177         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
9178         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
9179
9180         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
9181         (create_typespec): Likewise.
9182         (mono_reflection_bind_generic_parameters): Return a
9183         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
9184         (mono_reflection_inflate_method_or_ctor): New public function.
9185
9186         * reflection.h (MonoReflectionGenericInst): New typedef.        
9187
9188 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
9189
9190         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
9191         inside the domain lock. Fixes #49993.
9192         
9193         * object.c (mono_class_vtable): When typed allocation is used, 
9194         allocate vtables in the GC heap instead of in the mempool, since the
9195         vtables contain GC descriptors which are used by the collector even
9196         after the domain owning the mempool is unloaded.
9197
9198         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
9199
9200         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
9201         reflect what it does. Also invalidate mempools instead of freeing
9202         them if a define is set.
9203
9204         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
9205         of the appdomain.
9206         
9207         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
9208         hold the finalizable objects in this domain.
9209
9210         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
9211         appdomain.
9212
9213         * appdomain.c (mono_domain_set): New function to set the current
9214         appdomain, but only if it is not being unloaded.
9215
9216         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
9217         appdomain which is being unloaded.
9218         
9219         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
9220         unloading of the root appdomain.
9221
9222         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
9223         icall to execute a method in another appdomain. Intended as a 
9224         replacement for InternalSetDomain, which can confuse the code 
9225         generation in the JIT.
9226
9227         * appdomain.c (mono_domain_is_unloading): New function to determine
9228         whenever an appdomain is unloading.
9229
9230         * appdomain.c (mono_domain_unload): New function to correctly unload
9231         an appdomain.
9232
9233         * assembly.c (mono_assembly_load_references): Check that an assembly
9234         does not references itself.
9235
9236         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
9237         domain manually, it asks the finalizer thread to do it, then waits for
9238         the result. Also added a timeout.
9239
9240         * icall.c: Register the new icalls.
9241
9242         * threads.h threads.c: Export the mono_gc_stop_world and 
9243         mono_gc_start_world functions.
9244         
9245         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
9246         function to fill out the mempool with 0x2a.
9247
9248 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
9249
9250         * reflection.h (MonoReflectionMethodAux): New structure to store
9251         information which is rarely used, thus is not in the MonoMethod
9252         structure.
9253
9254         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
9255         store the aux info.
9256
9257         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
9258         and marshalling info into the aux structure.
9259
9260         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
9261         from the aux structure.
9262
9263         * loader.c (mono_method_get_param_names): Retrieve the param names from
9264         the aux structure.
9265         
9266 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
9267
9268         * exception.h exception.c: Add AppDomainUnloadedException && fix 
9269         warning.
9270
9271 2003-10-21  Dick Porter  <dick@ximian.com>
9272
9273         * socket-io.c
9274         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
9275         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
9276
9277 2003-10-21  Martin Baulig  <martin@ximian.com>
9278
9279         * reflection.c (mono_reflection_bind_generic_parameters):
9280         `klass->parent' is NULL for interfaces.
9281
9282 2003-10-21  Martin Baulig  <martin@ximian.com>
9283
9284         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9285
9286 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
9287
9288         * exception.c (mono_exception_from_name_msg): New helper function for
9289         creating exceptions and initializing their message field.
9290
9291         * exception.c: Simplify functions using the new helper.
9292
9293         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
9294         New function.
9295
9296         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
9297         mono_raise_exception, since otherwise gcc doesn't generate the function
9298         epilog for raise_exception, confusing the stack unwinding in the JIT.
9299         Fixes #45043.
9300
9301         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
9302         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
9303         Fixes #49499.
9304
9305 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9306
9307         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
9308         utf8.
9309
9310 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
9311
9312         * icall.c: Removed GetUninitializedObject method because
9313           AllocateUninitializedClassInstance does the same.
9314
9315 2003-10-18  Martin Baulig  <martin@ximian.com>
9316
9317         * class.c (inflate_generic_signature): Renamed to
9318         mono_class_inflate_generic_signature() and made it public.
9319         (my_mono_class_from_generic_parameter): New static function; if we
9320         don't already have the generic parameter's MonoClass, create a
9321         very simple one which is just used internally in the runtime and
9322         not passed back to managed code.
9323
9324         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
9325
9326         * metadata.h (MonoMethodSignature): Moved the
9327         `MonoGenericParam *gen_params' to the MonoMethodHeader.
9328         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
9329
9330         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
9331         ves_icall_MonoMethod_GetGenericArguments(); this is now an
9332         interncall on the MonoMethod class, not on MethodInfo.
9333         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
9334         calling mono_reflection_bind_generic_method_parameters() directly.
9335
9336         * loader.c (mono_method_get_signature): If this is a MethodSpec;
9337         return the already computed `method->signature'.
9338         (method_from_methodspec): New static function to load a method
9339         from a MethodSpec entry.
9340         (mono_get_method_from_token): Call the new method_from_methodspec()
9341         for MethodSpec tokens.  
9342         (mono_get_method_from_token): If we're a generic method, load the
9343         type parameters.
9344
9345         * reflection.c (mono_image_get_memberref_token): Allow
9346         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
9347         table.
9348         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
9349         (mono_image_create_token): First check whether it's a generic
9350         method (so we'd need to create a MethodSpec), then do the other
9351         two alternatives.
9352         (mono_reflection_bind_generic_method_parameters): Return a
9353         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
9354         called directly from the interncall.
9355
9356 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
9357
9358         * reflection.c (load_public_key): Move loading of the public key
9359         into managed code.
9360
9361         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
9362
9363         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
9364         fields.
9365
9366         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
9367         culture, hash_alg and public_key. Fixes #49555.
9368
9369 2003-10-17  Martin Baulig  <martin@ximian.com>
9370
9371         * class.h (MonoGenericInst): Moved this declaration here and added
9372         `MonoMethod *generic_method'.
9373
9374         * icall.c
9375         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
9376         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
9377
9378         * metadata.c (mono_metadata_type_equal): Two types of
9379         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
9380         index; ie. don't compare the address of the `MonoGenericParam'
9381         structure.
9382         (mono_metadata_load_generic_params): Removed the `MonoMethod
9383         *method' argument.
9384
9385         * metadata.h (MonoGenericInst): Moved declaration to class.h.
9386         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
9387
9388         * reflection.c (method_encode_signature): Encode the number of
9389         generic parameters.
9390         (encode_generic_method_sig): New static function.
9391         (method_encode_methodspec): New static function; creates an entry
9392         in the MethodSpec table for a generic method.
9393         (mono_image_get_methodspec_token): New static function.
9394         (mono_image_create_token): Call mono_image_get_methodspec_token()
9395         for generic methods.
9396         (mono_reflection_bind_generic_method_parameters): New public
9397         function.  Instantiates a generic method.
9398
9399 2003-10-16  Martin Baulig  <martin@ximian.com>
9400
9401         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
9402         *gen_params' here from MonoMethodHeader.
9403
9404         * metadata.c (mono_metadata_parse_method_signature): If we have
9405         generic parameters, initialize `method->gen_params' and then set
9406         the correct `type->data.generic_param' in all the parameters.
9407
9408 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
9409
9410         * threads.c (mono_threads_get_default_stacksize): New function to 
9411         return the default stacksize.
9412
9413         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
9414         termination of the finalizer thread, since the previous method had
9415         race conditions. Fixes #49628.
9416
9417         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
9418         as for the other managed threads.
9419
9420 2003-10-16  Martin Baulig  <martin@ximian.com>
9421
9422         * class.c (inflate_generic_signature): Copy `generic_param_count'
9423         and `gen_params'.
9424
9425         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
9426         New interncall.
9427
9428         * metadata.c (mono_metadata_parse_method_signature): Actually set
9429         the `method->generic_param_count' here.
9430         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
9431
9432 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
9433
9434         * object.h: Add a new field to TypedRef to simplify the implementation
9435         of the REFANY opcodes in the JIT.
9436
9437         * icall.c: Make use of the new field.
9438
9439         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
9440         dynamically.
9441
9442 2003-10-15  Martin Baulig  <martin@ximian.com>
9443
9444         * class.c (mono_class_from_gen_param): Renamed to
9445         mono_class_from_generic_parameter() and moved most of the
9446         functionality from mono_reflection_define_generic_parameter()
9447         here; ie. we create a "real" class here.
9448         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
9449         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
9450         previously been called.
9451
9452         * class.h (MonoGenericParam): Moved the declaration of this struct
9453         here from metadata.h and added `MonoMethod *method'.
9454
9455         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
9456         interncall.
9457
9458         * loader.c (mono_get_method_from_token): If we have any generic
9459         parameters, call mono_metadata_load_generic_params() to read them
9460         from the MONO_TABLE_GENERICPAR.
9461
9462         * metadata.c (mono_metadata_load_generic_params): Added
9463         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
9464
9465         * metadata.h (MonoMethodSignature): Replaced
9466         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
9467         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
9468
9469         * reflection.c (mono_reflection_define_generic_parameter): Moved
9470         most of the functionality into the new
9471         mono_class_from_generic_parameter(); set the `method' field if
9472         we're a method parameter.       
9473
9474 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
9475
9476         * marshal.c (emit_struct_conv): if native size is 0
9477         emit no code.
9478
9479 2003-10-14  Martin Baulig  <martin@ximian.com>
9480
9481         * icall.c: The generics API has changed in the spec since it was
9482         added to System.Type; these modifications make it match the spec
9483         again.
9484         (ves_icall_Type_GetGenericParameters): Renamed to
9485         `ves_icall_Type_GetGenericArguments'.
9486         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
9487         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
9488         `ves_icall_MonoType_get_HasGenericArguments'.
9489         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
9490         `ves_icall_MonoType_get_IsGenericParameter'.
9491         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
9492         this is no interncall anymore.
9493         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
9494         `ves_icall_TypeBuilder_get_IsGenericParameter'.
9495
9496 2003-10-14  Martin Baulig  <martin@ximian.com>
9497
9498         * reflection.c (mono_reflection_bind_generic_parameters): Also
9499         inflate generic methods if we're reading the class from IL.
9500
9501 2003-10-13  Martin Baulig  <martin@ximian.com>
9502
9503         * reflection.c (mono_reflection_define_generic_parameter): This
9504         method isn't called directly from the icall anymore; take a
9505         `MonoReflectionAssemblyBuilder *' so we can use this for type and
9506         method generic parameters.
9507         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
9508         (method_builder_encode_signature): Encode generic parameters.
9509         (mono_image_get_method_info): Write generic params to the
9510         MONO_TABLE_GENERICPARAM table.
9511
9512         * reflection.h (MonoReflectionMethodBuilder): Added
9513         `MonoArray *generic_params'.
9514
9515         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
9516
9517         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
9518         wrapper for mono_reflection_define_generic_parameter().
9519         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
9520
9521 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
9522
9523         * marshal.h: Add missing function to fix build.
9524
9525         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
9526         the SetLastError pinvoke attribute.
9527
9528         * marshal.c (mono_marshal_set_last_error): New helper function called
9529         by the generated code.
9530         
9531         * marshal.c (mono_mb_emit_branch): New helper function.
9532
9533         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
9534
9535         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
9536         classes as parameters and return values of delegates. Fixes #29256. 
9537
9538 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
9539
9540         * locales.c: use gint32 in non HAVE_ICU case
9541
9542 2003-10-11  Martin Baulig  <martin@ximian.com>
9543
9544         * mono-debug.c (mono_debug_add_method): Added a workaround for
9545         bug #48591.
9546
9547 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
9548
9549         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
9550         delegates passed to native code must use the STDCALL calling 
9551         convention. Fixes #35987.
9552
9553 2003-10-10  Martin Baulig  <martin@ximian.com>
9554
9555         * class.c (inflate_generic_type): If we're inflating for a generic
9556         type instance (and not for a generic method), return
9557         MONO_TYPE_MVAR unchanged.
9558
9559 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9560
9561         * string-icalls.c: Join ignores null strings in the source array.
9562         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
9563         * threads.c: GetAvailableTheads is slightly more accurate.
9564
9565 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
9566
9567         * threads.h threads.c : add mono_threads_set_default_stacksize
9568         and pass default to CreateThread calls.
9569
9570 2003-10-09  Dick Porter  <dick@ximian.com>
9571
9572         * icall.c:
9573         * locales.h:
9574         * locales.c: Internal calls for constructing CultureInfo and
9575         related objects from libicu (if its available.)
9576
9577 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
9578
9579         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
9580
9581 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9582
9583         * threadpool.c: added an argument to async_invoke_thread that is the
9584         item to process, pass the MonoAsyncResult to the thread start function
9585         when creating a new thread. This way we don't need to acquire any lock
9586         when we're creating a new thread. Readded a semaphore for faster
9587         response times (instead of that Sleep i added).
9588
9589 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
9590
9591         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
9592         get daylight change dates better on Windows, fix handling
9593         of platforms without tm_gmtoff.
9594
9595 2003-10-06  Martin Baulig  <martin@ximian.com>
9596
9597         * class.c (inflate_generic_method): Renamed to
9598         mono_class_inflate_generic_method() and made public.
9599         (mono_class_init): Don't inflate the generic methods here.
9600         (mono_class_from_generic): Added `gboolean inflate_methods'
9601         argument.  Inflate the methods here.
9602
9603         * loader.c (mono_method_get_param_names): Ignore instances of
9604         generic types for the moment.
9605
9606         * reflection.c (fixup_method): Added support for inflated methods.
9607         (mono_image_create_token): Use mono_image_get_methodref_token()
9608         for inflated methods.
9609         (mono_custom_attrs_from_param): Ignore instances of generic types
9610         for the moment.
9611         (mono_reflection_bind_generic_parameters): New public function.
9612         Moved all the functionality from
9613         ves_icall_Type_BindGenericParameters() here and added support for
9614         dynamic types.
9615         (mono_reflection_define_generic_parameter): Initialize
9616         `klass->methods' here.
9617
9618         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
9619         functionality into mono_reflection_define_generic_parameter().
9620         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
9621         TypeBuilder, return that TypeBuilder.
9622
9623 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9624
9625         * appdomain.c: removed mono_delegate_semaphore.
9626
9627         * threadpool.c:
9628         (mono_thread_pool_add): moved hash table creation inside and the thread 
9629         creation outside of the critical region.
9630         (mono_thread_pool_finish): removed obsolete code.
9631         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
9632         continue or exit the thread depending on the queue.
9633
9634 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
9635
9636         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
9637         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
9638         handle more bool marshalling options
9639
9640 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
9641
9642         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
9643         arrays of structs. Also add a more descriptive error message when
9644         a structure member is marshalled as LPArray.
9645
9646 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
9647
9648         * marshal.c (mono_marshal_get_native_wrapper): Add support for
9649         marshalling arrays of complex types. Fixes #29098. Also remove an
9650         usused and incomplete function.
9651
9652 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
9653
9654         * gc.c: report heap_size - free_bytes as total memory allocated
9655         (bug#49362).
9656
9657 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
9658
9659         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
9660         fix timezone handling problems on Windows.
9661         
9662         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
9663         asserts when the year is outside the range handled by ms the functions.
9664
9665         * class.c (setup_interface_offsets): If the class is an interface,
9666         fill out its interface_offsets slot.
9667
9668 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9669
9670         * threadpool.c: mark threadpool threads as background.
9671
9672 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
9673
9674         * decimal.c - define DECINLINE to nothing if not using GCC
9675
9676 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
9677
9678         * assembly.c: More refcount fixes.
9679
9680 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9681
9682         * string-icalls.c: if we're not trimming, return the same string.
9683         When not splitting, don't create a new string.
9684
9685 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9686
9687         * image.c:
9688         (mono_image_open): increment the ref_count inside the critical section.
9689
9690 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
9691
9692         * image.c (mono_image_open): Fix reference counting bug.
9693
9694 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
9695
9696         * marshal.c (mono_marshal_type_size) struct alignment changed for 
9697         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
9698         64bits. Avoid leak in mono_marshal_get_native_wrapper when
9699         mono_lookup_pinvoke_call throws.        
9700
9701 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
9702
9703         * reflection.c (mono_reflection_parse_type): Fix #49114.
9704
9705         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
9706         temporary workaround for cygwin header problem.
9707
9708         * object.c (mono_object_isinst): Synchronize this with the code
9709         generated by the JIT for casts.
9710
9711 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
9712
9713         * reflection.c (encode_type): Fix #38332.
9714
9715 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
9716
9717         * marshal.c (mono_marshal_method_from_wrapper): New function to return
9718         the original method from the wrapper method.
9719
9720 2003-09-25  Martin Baulig  <martin@ximian.com>
9721
9722         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
9723         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
9724         (ves_icall_Type_get_IsGenericInstance): New interncall.
9725
9726 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
9727
9728         * object.c: fix cast warning in big endian code.
9729
9730 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
9731
9732         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
9733         
9734 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9735
9736         * assembly.c: don't call check_env from mono_assembly_load. It's
9737         already done once in mono_assemblies_init and may cause headaches when
9738         multiple threads are loading assemblies.
9739
9740 2003-09-19  Martin Baulig  <martin@ximian.com>
9741
9742         * reflection.c (mono_reflection_define_generic_parameter): Don't
9743         allocate `klass->methods', set `klass->flags' to
9744         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
9745
9746 2003-09-18  Martin Baulig  <martin@ximian.com>
9747
9748         * class.c (mono_class_init): Don't create `class->methods' if it's
9749         already initialized.
9750
9751         * metadata.c (mono_metadata_load_generic_params): Make this
9752         actually work.
9753
9754         * reflection.c (mono_reflection_define_generic_parameter): Set
9755         parent class and interfaces from the constraints.
9756
9757         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
9758         to keep this struct in sync with the declaration in TypeBuilder.cs.
9759
9760 2003-09-17  Martin Baulig  <martin@ximian.com>
9761
9762         * metadata.h (MonoType): Replaced the data's `int type_param'
9763         field with `MonoGenericParam *generic_param'.
9764         (MonoGenericParam): Added `MonoClass *klass'.
9765
9766         * class.c (mono_class_from_gen_param): Removed the
9767         `MonoImage *image' and `int type_num' arguments.
9768
9769         * metadata.c (mono_metadata_parse_generic_param): New static
9770         method; creates a MonoGenericParam which just contains the index.
9771         (do_mono_metadata_parse_type): Call
9772         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
9773         MONO_TYPE_MVAR.
9774
9775         * reflection.c (mono_image_typedef_or_ref): Generic type
9776         parameters may be in the same assembly, but never use a typedef
9777         for them.
9778         (mono_reflection_define_generic_parameter): We're now creating a
9779         "real" class for the type parameter; it's now safe to call
9780         mono_class_from_mono_type() on the class'es type, it'll do the
9781         right thing.
9782
9783 2003-09-16  Martin Baulig  <martin@ximian.com>
9784
9785         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
9786         `symfile->range_entry_size' and `symfile->class_entry_size' here;
9787         the `symfile' data structure must be fully initialized before it
9788         gets added to the table.
9789
9790 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
9791
9792         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
9793
9794         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
9795         class init trampolines.
9796
9797 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
9798
9799         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
9800         to the built-in profiler to turn off time and allocation profiling
9801         respectively.
9802
9803 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
9804
9805         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
9806         g_direct_equal.
9807
9808         * debug-helpers.c (mono_method_full_name): Print the wrapper type
9809         in human readable form.
9810
9811 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
9812
9813         * reflection.c icall.c: Fixed warnings.
9814
9815         * image.c (load_class_names): Use a temporary hash table to hold the
9816         namespaces in order to avoid doing many string comparisons.
9817
9818         * image.h: Fix typo.
9819
9820         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
9821         Pass NULL instead of g_direct_equal to the GHashTable constructor 
9822         since the NULL case is short-circuited inside g_hash_table_lookup, 
9823         leading to better performance.  
9824
9825         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
9826         obtain the first custom attribute for a given index. Depends on the
9827         CustomAttribute table being sorted by the parent field.
9828
9829         * reflection.c (mono_custom_attrs_from_index): Use the new function 
9830         for better performance.
9831
9832 2003-09-07  Martin Baulig  <martin@ximian.com>
9833
9834         * class.c (mono_class_init): If we're a generic instance, inflate
9835         all our methods instead of loading them from the image.
9836         (mono_class_from_generic): Set `class->methods = gklass->methods'.
9837
9838 2003-09-07  Martin Baulig  <martin@ximian.com>
9839
9840         * mono-debug-debugger.c: Added support for constructors.
9841
9842 2003-09-06  Martin Baulig  <martin@ximian.com>
9843
9844         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
9845         New interncall.
9846
9847         * reflection.c (mono_reflection_setup_generic_class): Call
9848         ensure_runtime_vtable() to create the vtable.
9849
9850 2003-09-05  Martin Baulig  <martin@ximian.com>
9851
9852         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
9853         MONO_TYPE_MVAR.
9854
9855 2003-09-04  Martin Baulig  <martin@ximian.com>
9856
9857         * reflection.c (mono_reflection_define_generic_parameter): Generic
9858         parameters start with zero.
9859
9860 2003-09-04  Martin Baulig  <martin@ximian.com>
9861
9862         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9863
9864         * reflection.h (MonoReflectionGenericParam): New typedef.
9865         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
9866         the generic parameters from the managed TypeBuilder.
9867
9868         * reflection.c (mono_reflection_define_generic_parameter): New function.
9869         (mono_reflection_create_runtime_class): Encode generic parameters.
9870         (mono_reflection_setup_generic_class): New function; this is
9871         called after adding adding all generic params to the TypeBuilder.
9872         (encode_type): Added MONO_TYPE_VAR.
9873
9874 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
9875
9876         * class.h class.c (mono_class_needs_cctor_run): Moved this method
9877         here from the JIT.
9878
9879         * assembly.h assembly.c: Moved the AOT loading code into an assembly
9880         load hook.
9881
9882 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
9883
9884         * reflection.h reflection.c class.h class.c: Delete duplicate 
9885         definition of mono_type_get_name () from reflection.c and export the
9886         one in class.c.
9887
9888         * class.c: Class loading fixes from Bernie Solomon 
9889         (bernard@ugsolutions.com).
9890
9891         * reflection.c: Endianness fixes from Bernie Solomon 
9892         (bernard@ugsolutions.com).
9893         
9894 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
9895
9896         * assembly.h assembly.c: Define a file format version for AOT
9897         libraries.
9898         
9899         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
9900
9901         * appdomain.h (MonoJitInfo): New field to determine whenever the
9902         code is domain neutral.
9903         
9904 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
9905
9906         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
9907
9908 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
9909
9910         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
9911         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
9912         Avoid caching the result since strings must be domain specific. Fixes
9913         #48050.
9914
9915 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
9916
9917         * marshal.c (mono_marshal_init): Make this callable multiple times
9918         since it is hard to find a correct place to call it.
9919
9920         * object.c (mono_runtime_class_init): Execute static constructors in
9921         the correct appdomain.
9922
9923         * image.c (build_guid_table): Handle the case when multiple images have
9924         the same GUID.
9925
9926 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9927
9928         * icall.c: added a couple of icalls for System.Web.
9929
9930 2003-08-28  Martin Baulig  <martin@ximian.com>
9931
9932         * icall.c (ves_icall_Type_BindGenericParameters): Use
9933         `klass->generic_inst' instead of `&klass->byval_arg' in the
9934         mono_type_get_object() call.  The returned type must be
9935         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
9936
9937 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
9938
9939         * NOTES: New file.
9940
9941         * object.c (mono_class_proxy_vtable): Make it thread safe.
9942
9943         * pedump.c: Fix warning.
9944
9945         * object.c appdomain.h: Get rid of metadata_section. 
9946         It is no longer needed and it was causing deadlocks with domain->lock.
9947
9948         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
9949
9950 2003-08-26  Martin Baulig  <martin@ximian.com>
9951
9952         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
9953
9954 2003-08-26  Martin Baulig  <martin@ximian.com>
9955
9956         * pedump.c (main): Call mono_metadata_init(),
9957         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
9958         and mono_loader_init().
9959
9960 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
9961
9962         * loader.h: Add missing include to fix build.
9963
9964         * image.h: mono_image_load_references is no more.
9965
9966         * assembly.c: Reworked assembly loading to make it really thread safe.
9967         After these changes, the assembly returned by mono_assembly_open is
9968         fully initialized, i.e. all its references assemblies are loaded.
9969
9970         * assembly.c (mono_image_load_references): Renamed to 
9971         mono_assembly_load_references, and made private, since clients no
9972         longer need to call it.
9973
9974         * class.c: Removed calls to mono_assembly_load_references, since it was
9975         a source of deadlocks.
9976
9977         * loader.h loader.c class.h class.c: Protect data structures using a 
9978         new lock, the loader lock.
9979
9980         * class.c (mono_class_setup_vtable): Create temporary hash tables and
9981         GPtrArrays only when needed.
9982
9983         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
9984         into empty structures by mcs. Fixes pinvoke7.cs.
9985         
9986         * domain.c (mono_init): Call a new initialization function.
9987
9988         * appdomain.c (mono_runtime_init): Call the new initializer function
9989         of the marshal module.
9990
9991         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
9992         inserted into empty structures by mcs. Fixes pinvoke7.cs.
9993
9994         * marshal.h marshal.c: Added locks around the wrapper caches to make
9995         this module thread safe.
9996
9997         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
9998         this argument. Fixes pinvoke1.exe.
9999
10000 2003-08-25  Lluis Sanchez <lluis@ximian.com>
10001
10002         * object.h: Added call_type field to MonoMethodMessage and the corresponding
10003         enumeration of values. Removed fields to store remote call output values in
10004         MonoAsyncResult. Not needed any more.
10005         * object.c: Initialize call_type and async_result fields in mono_message_init.
10006         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
10007         dispatching the message.
10008         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
10009         async call to finish. To do it use a message with EndInvoke call type.
10010
10011 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
10012
10013         * loader.h loader.c (mono_method_hash_marhal_info): New function which
10014         determines whenever a method has marshalling info.
10015
10016 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10017
10018         * assembly.c: fix the build on windows.
10019
10020 2003-08-22 Lluis Sanchez <lluis@ximian.com>
10021
10022         * object.cs: Fixed bug #47785.
10023
10024 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
10025
10026         * string-icalls.c (StringReplace): If their are no occurances of
10027         the old string found return a reference to the supplied
10028         string. This saves some memory and matches MS behavoir.
10029         
10030 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10031
10032         * socket-io.c: fixed compilation for systems that define AF_INET6
10033         and don't define SOL_IP/SOL_IPV6.
10034
10035 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
10036
10037         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
10038         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
10039
10040         * rawbuffer.c rawbuffer.h: Make this module thread safe.
10041
10042         * domain.c: Make this module thread safe.
10043
10044         * domain.c (mono_init): Call new initialization function.
10045
10046         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
10047         reference types too. Fixes #38812.
10048
10049         * image.c (mono_image_init): Fixed warnings.
10050
10051         * class.c (mono_class_from_typeref): Handle assembly load failure
10052         correctly.
10053
10054         * appdomain.c (add_assemblies_to_domain): Handle the case when
10055         the references of an assembly are not yet loaded.
10056
10057         * metadata.c image.c assembly.c: Moved initialization of global
10058         variables to a separate function called at startup since lazy 
10059         initialization of these variables is not thread safe.
10060         
10061         * image.c assembly.c: Made this module thread safe by adding locks in 
10062         the appropriate places.
10063
10064         * domain.c (mono_init): Call the new initialization functions of the
10065         three modules.
10066
10067 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
10068
10069         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
10070           make a direct call. It is proxy's work to make the call asynchronous.
10071           mono_delegate_end_invoke(): If the targe is a proxy, just collect
10072           the return values.
10073         * object.cs: mono_method_call_message_new(): read AsyncResult and
10074           state object from parameters list, if this info is requested.
10075         * object.h: Added fields to store remote call output values in
10076           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
10077
10078 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10079
10080         * object.h: add needed fields to MonoThread.
10081         * threads.c, threads.h: allow registering a function to cleanup data
10082         allocated per thread by the JIT.
10083
10084 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10085
10086         * loader.h: portability fix by Bernie Solomon
10087         * <bernard@ugsolutions.com>.
10088
10089 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
10090
10091         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
10092         return a MonoArray. This simplifies the code and also ensures that
10093         the cache allways contains an object reference as a value.
10094
10095         * icall.c (ves_icall_get_parameter_info): Simplified using the new
10096         function.
10097
10098 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10099
10100         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
10101         fixes a problem with byte ordering when getting the address family for
10102         a socket.
10103
10104 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
10105
10106         * .cvsignore: Added monosn.
10107
10108         * reflection.h reflection.c loader.c: Added support for parameter
10109         marshalling to dynamically created types. Fixes #47295.
10110
10111 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
10112
10113         * rand.c: remove useless warnings.
10114
10115 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10116
10117         * class.c: implemented ldtoken for methods and fieldrefs.
10118
10119 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10120
10121         * threadpool.c: when mono_async_invoke was called, no one took care of
10122         monitoring the queue. So if the method invoked took some time and we
10123         got new async invoke requests after 500 ms (the thread created waited
10124         that long in WaitForSingleObject), the new async invoke was not called
10125         until the previous one finished.
10126
10127         This is fixed now. Thanks to Totte for helping with it.
10128
10129 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10130
10131         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
10132
10133 2003-08-11  Martin Baulig  <martin@ximian.com>
10134
10135         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
10136
10137 2003-08-06  Martin Baulig  <martin@ximian.com>
10138
10139         * mono-debug-debugger.c: Added support for static fields,
10140         properties and methods.
10141
10142 2003-08-06  Martin Baulig  <martin@ximian.com>
10143
10144         * mono-debug-debugger.c: Don't store the MonoString's vtable to
10145         make this work for applications with multiple application domains.
10146
10147 2003-08-04  Martin Baulig  <martin@ximian.com>
10148
10149         * mono-debug-debugger.c: Completely reworked the type support; the
10150         most important thing is that we're now just using one single
10151         `MonoType' instance per type.
10152
10153 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
10154
10155         * mono-endian.h, mono-endian.c, icall.c: Added icall
10156         ves_icall_System_Double_AssertEndianity to assert double word endianity
10157         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
10158
10159 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10160
10161         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
10162         support, icalls and fixes.
10163
10164 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
10165
10166         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
10167         classes that are a punctuation character in .NET is not the same a
10168         g_unichar_ispunct.
10169
10170 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10171
10172         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
10173
10174 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
10175
10176         * icall.c: Add new MemCopy internalcall.
10177         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
10178         Simplified code; It is not necessary to handle all the cases here,
10179         as the C# code takes care of it.  Only handle the case of the name
10180         resource embedded into the assembly.
10181
10182         Changed signature to return the data pointer and the size of the
10183         data. 
10184
10185 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
10186
10187         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
10188         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
10189
10190 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
10191
10192         * socket-io.c: ignore EINTR error in select.
10193
10194 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
10195
10196         * class.h, class.c: removed unused subclasses field in MonoClass.
10197
10198 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
10199
10200         * icall.c: improve fix of get_base_definition(). If the parent class
10201           doesn't have the mehod, look at the parent of the parent.
10202         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
10203           to check if a parameter is an in or out parameter
10204           (PARAM_ATTRIBUTE_IN is not set by default).
10205           mono_method_return_message_restore(): Use mono_class_value_size to
10206           get the size of a value type. mono_type_stack_size (parameterType)
10207           does not return the correct value if parameterType is byRef.
10208           mono_load_remote_field(), mono_load_remote_field_new(),
10209           mono_store_remote_field(), mono_store_remote_field_new():
10210           raise exception if the remote call returns an exception.
10211
10212 2003-07-28  Martin Baulig  <martin@ximian.com>
10213
10214         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
10215         method.  This is a wrapper around mono_runtime_invoke() which
10216         boxes the instance object if neccessary.
10217
10218 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10219
10220         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
10221         metadata.h, row-indexes.h, verify.c: first cut of generics support.
10222
10223 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10224
10225         * icall.c: disable mcs bug workaround.
10226
10227 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
10228
10229         * object.c (mono_runtime_class_init): Take the metadata_section
10230         mutex before obtaining the domain mutex.
10231
10232         * appdomain.h: Added definition of metadata_section mutex here. 
10233
10234         * object.c: define metadata_mutex here.
10235
10236 2003-07-24  Ravi Pratap  <ravi@ximian.com>
10237
10238         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
10239         fixed.
10240
10241 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
10242
10243         * reflection.c: Fix bug #46669
10244
10245 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10246
10247         * exception.c:
10248         * exception.h:
10249         * icall.c:
10250         * object.h: fill in the type name for TypeLoadException.
10251
10252 2003-07-23  Ravi Pratap  <ravi@ximian.com>
10253
10254         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
10255         relationship between TypeBuilders while compiling corlib) and bug
10256         45993 (Array types returned from the runtime while compiling
10257         corlib were from the loaded corlib).
10258
10259 2003-07-22  Martin Baulig  <martin@ximian.com>
10260
10261         * mono-debug-debugger.c: Reworked the type support a bit more;
10262         distinguish between types and classes.
10263
10264 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
10265
10266         * icall.c: add IsArrayImpl icall.
10267
10268 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
10269
10270         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
10271         initializing real_size only once. Also fix bug #46602.
10272
10273 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
10274
10275         * object.c: Renamed mono_metadata_section to metadata_section.
10276
10277 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
10278
10279         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
10280           empty array if the type is an array. Fixed.
10281           ves_icall_MonoMethod_get_base_definition: if the base method
10282           is abstract, get the MethodInfo from the list of methods of
10283           the class.
10284         * reflection.c: ParameterInfo.PositionImpl should be zero-based
10285           and it was 1-based. Fixed in mono_param_get_objects.
10286
10287 2003-07-20  Martin Baulig  <martin@ximian.com>
10288
10289         * mono-debug.h: Set version number to 31.
10290         (mono_debug_init): Added `MonoDomain *' argument.
10291
10292         * mono-debug-debugger.c: Reworked the type support; explicitly
10293         tell the debugger about builtin types; pass the `klass' address to
10294         the debugger.
10295
10296 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
10297
10298         * image.c: Allow new metadata tables to be loaded without a
10299         warning. Also update the warning message to give the new constant value.
10300                 
10301 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
10302
10303         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
10304         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
10305         array type representation changes.
10306
10307 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10308
10309         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
10310         on Environment.Exit () call.
10311
10312 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10313
10314         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
10315         requires a matching corlib.
10316
10317 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
10318
10319         * Changelog: My editor decided to add a CR to each line. Sorry about that.
10320           Committed again without the CRs.
10321         
10322 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
10323
10324         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
10325           getting it from the "this" socket instance. Did not work
10326           if the socket is a subclass of Socket.
10327           Also fixed bug #35371.
10328
10329 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10330
10331         * metadata.c: fixed size for TypedByRef.
10332         * loader.c: when searching for a method, consider the vararg amrker.
10333         * unicode.c, decimal.c: constify some arrays.
10334
10335 2003-07-15  Dick Porter  <dick@ximian.com>
10336
10337         * socket-io.c: Fixed compilation for gcc < 3.2.
10338
10339         Fixed compilation for machines that don't have AF_INET6 (thanks to
10340         Bernie Solomon <bernard@ugsolutions.com> for that part.)
10341
10342         Fixed compile warnings.
10343         
10344         Fixed formatting and line endings.
10345
10346 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
10347
10348         * socket-io.h:
10349         * socket-io.c: Added IPv6 support.
10350
10351 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
10352
10353         * class.c (mono_class_is_assignable_from): New function to implement
10354         the is_assignable_from logic. Used by mono_object_isinst, 
10355         Type::IsAssignableFrom () and the interpreter.
10356
10357         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
10358         Object, even interfaces.
10359         
10360         * object.c (mono_object_isinst): Implement in terms of 
10361         is_assignable_from.
10362
10363         * icall.c (ves_icall_type_is_assignable_from): New icall.
10364
10365 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
10366
10367         * domain.c (foreach_domain): fix compiler warning.
10368
10369 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
10370
10371         * image.c (load_metadata_ptrs): use g_strndup because strndup is
10372         not available on all plattforms
10373
10374 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
10375
10376         * image.h image.c: Store the metadata version string in MonoImage.
10377         * icall.c: New icall to retrieve the image version.
10378         * reflection.c (create_dynamic_image): Fill in the image version field
10379         * reflection.c (build_compressed_metadata): Use the image version
10380         from the image structure.
10381
10382 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10383
10384         * appdomain.c: modified comment.
10385         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
10386         That will be its last iteration when mono_gc_cleanup is called from
10387         mono_runtime_cleanup and before the domain is unloaded.
10388
10389         Fixes bug #45962.
10390
10391 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
10392
10393         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
10394         attributes.
10395
10396 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10397
10398         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
10399         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
10400         Bernie Solomon <bernard@ugsolutions.com>.
10401
10402 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10403
10404         * object.c, object.h: provide mono_object_new_fast() for faster
10405         allocation in some special cases.
10406
10407 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
10408
10409         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
10410         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
10411
10412 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
10413
10414         * threadpool.c: fix leaks.
10415
10416 2003-07-01  Dick Porter  <dick@ximian.com>
10417
10418         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
10419         using MonoGHashTables.  Fixes threadpool bug posted to list.
10420
10421 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
10422
10423         * image.h, image.c: added support to load an assembly from a byte array.
10424         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
10425         assembly bundle support.
10426
10427 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
10428
10429         * threadpool.c (mono_thread_pool_add): keep a reference to the
10430         AsyncResult to prevent GC
10431
10432 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
10433
10434         * class.c: leak fix.
10435
10436 2003-06-25  Dick Porter  <dick@ximian.com>
10437
10438         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
10439         for the async object, the WaitHandle object will close the handle.
10440         Fixes bug 45321.
10441
10442 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10443
10444         * class.c: in mono_array_class_get (), lookup from the hash with the
10445         same type we insert: this works around a bug in
10446         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
10447         lluis. The real fix will have to wait for after the release.
10448
10449 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10450
10451         * icall.c: fix memory leak when getting type members.
10452
10453 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
10454
10455         * reflection.c: added more pubtoken special cases.
10456
10457 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
10458
10459         * class.c: handle field offset correctly when class size
10460         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
10461
10462 2003-06-20  Martin Baulig  <martin@ximian.com>
10463
10464         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
10465         *image' field.
10466
10467 2003-06-20  Martin Baulig  <martin@ximian.com>
10468
10469         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
10470
10471 2003-06-20  Martin Baulig  <martin@ximian.com>
10472
10473         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
10474         just distinguish between variables in registers and variables at
10475         an offset relative to a register.
10476
10477 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10478
10479         * icall.c: #ifdef out latest changes until mcs is fixed.
10480
10481 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10482
10483         * icall.c: return members in metadata order.
10484
10485 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10486
10487         * icall.c: avoid infinite loop in GetTimeZoneData.
10488
10489 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
10490
10491         * icall.c: added Marshal.Prelink/All icalls.
10492
10493 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
10494
10495         * object.c, object.h: fix warnings and do some overflow checking
10496         when creating arrays.
10497
10498 2003-06-17  Dick Porter  <dick@ximian.com>
10499
10500         * file-io.h:
10501         * file-io.c: File attributes need to be tweaked slightly when
10502         passed from the managed to the w32 world.
10503
10504 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
10505         * profiler.h profiler-private.h profiler.c: Rework last patch
10506         based on suggestion by Paolo.
10507         
10508 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
10509
10510         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
10511         instruction level coverage data collection.
10512         * profiler.h profiler.c (: Added new callback function which can be
10513         used by the profiler to limit which functions should have coverage
10514         instrumentation.
10515         * profiler.c (mono_profiler_load): Call g_module_build_path to
10516         generate the file name of the profiler library.
10517
10518 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10519
10520         * profiler.c, profiler.h, profiler-private.h: added basic block 
10521         coverage profiling API.
10522
10523 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
10524
10525         * reflection.c (mono_reflection_create_runtime_class): Add support
10526         for events in dynamically generated code.
10527
10528         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
10529         not allocated.
10530
10531 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10532
10533         * icall.c: when getting timezone info, return reasonable values if we
10534         can't get the actual data.
10535
10536 2003-06-14  Dick Porter  <dick@ximian.com>
10537
10538         * threads.c (start_wrapper): Remove the reference to the thread
10539         object in the TLS data, so the thread object can be finalized.
10540         This won't be reached if the thread threw an uncaught exception,
10541         so those thread handles will stay referenced :-( (This is due to
10542         missing support for scanning thread-specific data in the Boehm GC
10543         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
10544
10545 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
10546
10547         * reflection.c: ensure streams and tables are first allocated with
10548         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
10549
10550 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10551
10552         * icall.c: fixed GetElementType for byrefs (bug# 44792).
10553
10554 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
10555
10556         * reflection.c (mono_reflection_create_runtime_class): Add support for
10557         properties to dynamically created classes.
10558         * reflection.c: Fix a few places where non-MonoObjects were inserted
10559         into the tokens hashtable.
10560
10561 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10562
10563         * object.c: some support to handle out of memory exceptions.
10564
10565 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
10566
10567         * marshal.c (mono_marshal_get_native_wrapper): support reference
10568         return types
10569
10570 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10571
10572         * object.h, object.c: more portability stuff from Bernie Solomon.
10573         Unexport mono_object_allocate(). Added mono_object_unbox ().
10574         Set exitcode when an unhandled exception is thrown.
10575
10576 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
10577
10578         * marshal.c (mono_marshal_get_native_wrapper): use custom
10579         marshaler for return types.
10580
10581 2003-06-10  Dick Porter  <dick@ximian.com>
10582
10583         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
10584         ip_mreq is available
10585
10586 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
10587
10588         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
10589         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
10590         by Bernie Solomon <bernard@ugsolutions.com>.
10591
10592 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
10593
10594         * gc.c (mono_gc_init): Avoid error message on shutdown when
10595         GC_DONT_GC=1 is used.
10596
10597         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
10598         New icall to return the GUID of a module.
10599
10600 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10601
10602         * class.c: ensure instance size always includes the parent's size
10603         even whem class size is set explicitly (fixes bug#44294).
10604
10605 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10606
10607         * profiler.h, profiler.c: made the simple profiler thread-safe,
10608         get more accurate timing info. Allow the loading of an
10609         externally-developed profiler module.
10610
10611 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
10612
10613         * marshal.c (mono_marshal_get_native_wrapper): improved
10614         class/byref arguments.
10615         (mono_marshal_get_native_wrapper): better string marshaling support.
10616
10617 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
10618
10619         * class.c: ensure .pack and .size are handled correctly and
10620         simplified layout of static fields.
10621
10622 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
10623
10624         * appdomain.c
10625         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
10626
10627         * loader.c (mono_lookup_pinvoke_call): look for modules in the
10628         current directory (fix bug 44008)
10629
10630 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
10631
10632         * marshal.c (mono_marshal_get_native_wrapper): started support for
10633         custom marshalers.
10634         (mono_delegate_to_ftnptr): consider marshalling specifications
10635
10636 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
10637
10638         * reflection.c, reflection.h: emit custom marshal info.
10639
10640 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10641
10642         * object.c: free the GError.
10643         * icall.c: added CloseEvent_internal.
10644         * threads.[ch]:
10645         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
10646         call.
10647
10648 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
10649
10650         * loader.c (mono_method_get_signature): Add support for dynamic
10651         assemblies.
10652
10653 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
10654
10655         * reflection.c: fixed bug #43905.
10656
10657 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10658
10659         * class.c, domain.c, icall.c, metadata.h, object.h: support for
10660         handling TypedReference and ArgIterator.
10661         * loader.c, loader.h: added function to get signature at call site.
10662
10663 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10664
10665         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
10666         data readonly. Buglets and warning fixes. Some MethodSpec support.
10667
10668 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10669
10670         * class.h, class.c, object.c: remove relative numbering support.
10671
10672 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
10673
10674         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
10675         free the string, until we get a chance to fix Gtk#
10676
10677 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10678
10679         * marshal.c: revert last patch.
10680
10681 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
10682
10683         * icall.c: updates for new mono_class_vtable() not calling
10684         the type constructor anymore.
10685
10686 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
10687
10688         * object.h, object.c: separate vtable creation from type
10689         initialization. Make running the .cctor thread safe.
10690
10691 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
10692
10693         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
10694
10695 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
10696
10697         * loader.c (mono_get_method): consider calling convention
10698
10699 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
10700
10701         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
10702         to return the invisible global type for a module.
10703
10704         * reflection.c (mono_image_build_metadata): Emit global fields too.
10705
10706 2003-05-20  Peter Williams  <peterw@ximian.com>
10707
10708         * loader.c (mono_lookup_internal_call): Add a few newlines.
10709
10710 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
10711
10712         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
10713         literal strings.
10714
10715         * appdomain.c (set_domain_search_path): Recalculate search path when
10716         AppDomainSetup.PrivateBinPath changes.
10717
10718         * object.c (mono_class_compute_gc_descriptor): It turns out some
10719         parts of the class libs (like System.Thread) holds pointers to
10720         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
10721         to treat native int a pointer type here.
10722         
10723 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
10724
10725         * appdomain.h, domain.c: add hashtable for jump target resolution.
10726
10727 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
10728
10729         * reflection.h reflection.c icall.c: Added new icalls 
10730         GetManifestResourceInfoInternal, GetModulesInternal and support
10731         infrastructure.
10732
10733 2003-05-16  Dick Porter  <dick@ximian.com>
10734
10735         * icall.c:
10736         * file-io.h:
10737         * file-io.c: Implement System.IO.MonoIO::GetTempPath
10738
10739 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
10740
10741         * object.c: mono_store_remote_field: little fix to previous patch.
10742
10743 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10744
10745         * class.c: add constructors to array classes.
10746         * icall.c: special case array construction for InternalInvoke (),
10747
10748 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
10749
10750         * class.h class.c reflection.c object.c: Added support for field
10751         defaults in dynamically generated classes.
10752
10753 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
10754
10755         * reflection.c: properly encode charset for ddlimport.
10756
10757 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
10758
10759         * threads.c: allow compiling without GC.
10760
10761 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10762
10763         * appdomain.h, object.c, object.h, threads.c, threads.h: added
10764         handling of thread static data.
10765
10766 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10767
10768         * reflection.h, reflection.c: added mono_custom_attrs_free ().
10769
10770 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
10771
10772         * class.c (mono_array_class_get): always set the serializable flags
10773         (mono_array_class_get): always set the SEALED attribute for array types
10774
10775 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
10776
10777         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
10778         attributes (fix for bug 42021).
10779
10780 2003-05-12  Dick Porter  <dick@ximian.com>
10781
10782         * gc.c: Don't run finalizers when the finalizer thread is
10783         finishing up, because the default domain has already been
10784         destroyed.
10785
10786 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
10787
10788         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
10789         value is null, we should throw an exception.   This is slightly
10790         different than the other conventions used for the constructor.
10791
10792 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10793
10794         * socket-io.c: fixed windows build.
10795
10796 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10797
10798         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
10799
10800 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
10801
10802         * object.c (mono_string_new_wrapper): Compatibility fix for MS
10803         compilers.
10804
10805 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
10806
10807         * class.c (mono_class_layout_fields): Add experimental GC aware
10808         auto layout facility. Requires class library changes to work correctly.
10809
10810         (mono_class_setup_vtable): Avoid overriding explicit interface
10811         method implementations. Fixes iface3.exe test.
10812
10813         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
10814         object reference.
10815         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
10816         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
10817
10818         * metadata.h: Add new type classification macro which determines
10819         whenever the type holds an object reference.
10820
10821 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
10822
10823         * marshal.c (mono_marshal_get_native_wrapper): cleanups
10824
10825 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
10826
10827         * gc.c (finalizer_thread): Work around a GC bug.
10828
10829 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
10830
10831         * marshal.c (emit_struct_conv): allow unions
10832
10833         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
10834
10835 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
10836
10837         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
10838
10839 2003-05-06  Martin Baulig  <martin@ximian.com>
10840
10841         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
10842
10843 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10844
10845         * socket-io.c:
10846         (Select_internal): allow NULLs, don't create arrays if not needed.
10847         Coupled with Socket.cs changes.
10848
10849         * threadpool.c:
10850         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
10851         register a finalizer for it that will close the semaphore handle. This
10852         fixes the leak and make Lupus' test run with > 4080 loops.
10853
10854 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
10855
10856         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
10857         Jerome Laban (bug #42287)
10858
10859 2003-05-02  Martin Baulig  <martin@ximian.com>
10860
10861         * debug-mono-symfile.h
10862         (MonoSymbolFile): Moved declaration into mono-debug.h.
10863         (MonoDebugMethodJitInfo): Likewise.
10864         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
10865         argument.
10866         (_mono_debug_address_from_il_offset): Take a
10867         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
10868
10869         * mono-debug.h
10870         (MonoDebugDomainData): New struct.
10871         (mono_debug_get_domain_data): New function.
10872         (mono_debug_add_method): Take an additional `MonoDomain *'
10873         argument.
10874         (mono_debug_source_location_from_address): Likewise.
10875         (mono_debug_il_offset_from_address): Likewise.
10876         (mono_debug_address_from_il_offset): Likewise.
10877
10878 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
10879
10880         * reflection.c: one more check for null type in custom attrs.
10881
10882 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10883
10884         * reflection.c: avoid warning (comparison is always false due to limited
10885         range of data type).
10886
10887 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10888
10889         * icall.c: throw an exception in Type.GetField if the argument 'name'
10890         is NULL.
10891
10892 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
10893
10894         * reflection.c: fixed handling of enums in named arguments to custom
10895         attributes (bug #42123).
10896
10897 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
10898
10899         * reflection.c: use the right array element type and handle
10900         a null for a Type argument, too.
10901
10902 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
10903
10904         * reflection.c: handle arrays as arguments to custom attributes.
10905
10906 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
10907
10908         * reflection.c: handle a string value in a custom attr
10909         ctor that takes an object.
10910
10911 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
10912
10913         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
10914         (fix bug #42063)
10915
10916 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
10917
10918         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
10919
10920 2003-04-27  Martin Baulig  <martin@ximian.com>
10921
10922         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
10923         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
10924         MONO_DEBUGGER_EVENT_BREAKPOINT.
10925         (mono_breakpoint_trampoline_code): Removed.
10926         (mono_debugger_event_handler): The last argument is now a
10927         `guint32'.
10928         (mono_debugger_insert_breakpoint_full): Removed the
10929         `use_trampoline' argument.
10930         (mono_debugger_method_has_breakpoint): Likewise.
10931         (mono_debugger_trampoline_breakpoint_callback): Renamed to
10932         mono_debugger_breakpoint_callback(); take the method and
10933         breakpoint number as arguments.
10934
10935 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
10936
10937         * metadata.c: fix off by one when loading parameters attributes.
10938
10939 2003-04-24  Martin Baulig  <martin@ximian.com>
10940
10941         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
10942
10943 2003-04-24  Martin Baulig  <martin@ximian.com>
10944
10945         * mono-debug-debugger.c: Moved all code which interacts with the
10946         Mono Debugger here.
10947
10948         * debug-mono-symfile.c: This code now just deals with the symbol
10949         file itself, the debugger code is now in mono-debug-debugger.c.
10950
10951 2003-04-23  Martin Baulig  <martin@ximian.com>
10952
10953         * mono-debug.c (mono_debug_source_location_from_il_offset):
10954         New method; like mono_debug_source_location_from_address(), but
10955         takes an IL offset instead of a machine address.
10956
10957 2003-04-23  Martin Baulig  <martin@ximian.com>
10958
10959         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
10960         `line' field; this is now computed by the debugger.
10961
10962 2003-04-23  Martin Baulig  <martin@ximian.com>
10963
10964         * mono-debug.[ch]: New files.  This is the new debugging interface.
10965
10966         * mono-debug-debugger.[ch]: New files.  Moved all code which
10967         interacts with the Mono Debugger here.
10968
10969 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
10970
10971         * domain.c (mono_init): initialize mono_defaults.monitor_class
10972
10973 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
10974
10975         * reflection.c (method_encode_code): Add a spicy exception to help
10976         future compiler authors.
10977
10978 2003-04-21  Martin Baulig  <martin@ximian.com>
10979
10980         * icall.c
10981         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
10982         Make this work with relative pathnames; g_filename_to_uri() needs
10983         an absolute filename.
10984
10985 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
10986
10987         * icall.c: Track name changes in Object and ValueType.
10988
10989 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
10990
10991         * metadata.c (mono_type_stack_size): size should be a multiple of
10992         sizeof (gpointer)
10993
10994 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10995
10996         * gc.c:
10997         (internal_domain_finalize): moved into mono_domain_finalize. No need
10998         to create another thread because the finalizers will be run in the
10999         finalizer thread.
11000         
11001         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
11002         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
11003         to be run (MS does this too).
11004
11005 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
11006
11007         * object.c (mono_class_compute_gc_descriptor): Update comment.
11008
11009         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
11010
11011         * image.h: Add synchronized wrapper cache.
11012
11013         * image.c (do_mono_image_open): Initialize cache.
11014
11015         * reflection.c (create_dynamic_mono_image): Initialize cache.
11016
11017 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11018
11019         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
11020         ves_icall_System_Buffer_ByteLengthInternal.
11021
11022 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
11023
11024         * reflection.c: setup klass->nested_in earlier. Allow
11025         a dash in the assembly name.
11026
11027 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
11028
11029         * metadata.c (mono_type_to_unmanaged): dont access
11030         type->data.klass for MONO_TYPE_OBJECT
11031         (mono_type_to_unmanaged): consider System.Delegate class
11032
11033 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
11034
11035         * class.c: just setup supertypes in the proper place instead of
11036         initializing the full element class for arrays.
11037
11038 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
11039
11040         * class.c: ensure the element class of arrays is initialized.
11041         Setup the supertype info for array classes, too.
11042
11043 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
11044
11045         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
11046
11047 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11048
11049         * Makefile.am: re-added -m option when running cygpath. This way,
11050         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
11051         separator.
11052         * mono-config.c: same codepath for locating mono config file for WIN32
11053         and the rest.
11054         * assembly.c: if mono_assembly_setrootdir is called, don't override
11055         the value set.
11056
11057 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11058
11059         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
11060         MONO_ASSEMBLIES variable.
11061
11062 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
11063
11064         * icall.c: added Assembly::GetNamespaces() icall.
11065
11066 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11067
11068         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
11069
11070 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
11071
11072         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
11073         * object.c: fixed bug in the construction of vtable for proxies
11074
11075 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
11076
11077         * object.c (mono_array_new): Mark mono_array_new as an icall.
11078
11079 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11080
11081         * class.c: fixed test for public method when overriding interfaces.
11082         Closes bug #40970.
11083
11084 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11085
11086         * appdomain.h, domain.c: added mono_domain_foreach() to
11087         be able to access the currently loaded appdomains.
11088         * object.c: make string interning work across sppdomains.
11089         Mark some functions for use as icalls.
11090
11091 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
11092
11093         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
11094
11095         * reflection.h reflection.c: Allocate long living data using 
11096         GC_MALLOC_ATOMIC so the collector does not need to scan it.
11097
11098         * reflection.c: Double the allocation size in streams instead of
11099         increasing it, to prevent unneccesary copying on large assemblies.
11100         
11101         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
11102         creation if the assembly does not have the Run flag set.
11103
11104 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11105
11106         * class.h: avoid the C++ keywords in header files (Jerome Laban
11107         spotted and fixed this).
11108
11109 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11110
11111         * object.c:
11112         (mono_unhandled_exception): fill in the arguments for the
11113         UnhandledException event. Only trigger that event for the default
11114         domain (as MS does).
11115
11116 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
11117
11118         * object.c: Improve typed allocation stuff based on suggestions from
11119         Paolo. Also turn it on if the GC library supports it.
11120
11121 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
11122
11123         * object.c object.h class.h: Added experimental typed allocation
11124         facility using the interfaces in gc_gcj.h.
11125
11126         * os/gc_wrapper.h: Added new include files.
11127         
11128 2003-04-03  Martin Baulig  <martin@ximian.com>
11129
11130         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
11131         which is not yet enabled by default.
11132
11133         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
11134         functions.
11135         (mono_gc_lock, mono_gc_unlock): New static functions.
11136
11137         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
11138         functions; stop/start the world for the garbage collector.  This
11139         is using the windows API; we need to complete the SuspendThread()/
11140         ResumeThread() implementation in the io-layer to make this work on Unix.
11141         (mono_gc_push_all_stacks): New public function; tells the garbage
11142         collector about the stack pointers from all managed threads.
11143
11144 2003-04-03  Martin Baulig  <martin@ximian.com>
11145
11146         * object.h (MonoThread): Added `gpointer stack_ptr'.
11147
11148         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
11149
11150 2003-04-03  Martin Baulig  <martin@ximian.com>
11151
11152         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
11153
11154 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
11155
11156         * reflection.c (typebuilder_setup_fields): Initialize field.first and
11157         field.last.
11158
11159 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
11160
11161         * loader.c (mono_lookup_internal_call): Report the corlib that is
11162         out of sync.
11163
11164 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
11165
11166         * icall.c (ves_icall_type_GetTypeCode): fixed check for
11167         System.DBNull (it's class not valuetype).
11168
11169 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
11170
11171         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
11172         if the array method was already assigned a token (fixes bug#40646).
11173
11174 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
11175
11176         * reflection.c (mono_reflection_get_type): Attempt type resolve even
11177         if no assembly is given.
11178
11179 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
11180
11181         * metadata.h: Added the new tables.
11182
11183         * row-indexes.h: Added definitions for new tables.
11184
11185         * metadata.c: Add schemas for new tables, and add support for
11186         computing the sizes of them.
11187
11188         * class.c: Update for handling the new type cases.
11189
11190 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
11191
11192         * metadata.h (MONO_TYPE_IS_VOID): new macro
11193
11194 2003-03-31  Martin Baulig  <martin@ximian.com>
11195
11196         * threads.h (MonoThreadCallbacks): Added `thread_created'.
11197
11198         * threads.c (mono_thread_new_init): Call `thread_created' in the
11199         mono_thread_callbacks.
11200
11201 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
11202
11203         * loader.h: added marshalbyrefobject_class to mono_defaults
11204         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
11205         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
11206           generation of output parameters.
11207           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
11208         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
11209           contextbound and the target object belongs to the context of the caller.
11210         * object.h: added context and unwrapped_server variables in MonoRealProxy.
11211         * object.c: Implemented support for interfaces and abstract classes
11212           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
11213           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
11214
11215 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
11216
11217         * class.h class.c (mono_class_is_subclass_of): New function.
11218         
11219         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
11220         routines for most common case (calls from ArrayList::ToArray).
11221
11222         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
11223         routine so programs which call Environment::Exit() can be profiled.
11224
11225         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
11226         Added MONO_ARCH_SAVE_REGS.
11227
11228         * icall.c (ves_icall_type_is_subtype_of): Use new function.
11229
11230 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
11231
11232         * blob.h: Add a couple of new MonoType types definitions.
11233
11234         * tabledefs.h: Add a couple of new call convs.
11235
11236 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
11237
11238         * reflection.h (MonoReflectionDynamicAssembly): track changes in
11239         the layout of the class.
11240
11241         * reflection.c (alloc_table): double the size on overflow to avoid
11242         unnecessary copying.
11243
11244         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
11245         avoid filling out metadata tables and blobs. Also set mb->ilgen to
11246         null so it can be garbage collected.
11247         
11248 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
11249
11250         * reflection.c (mono_reflection_get_type): Return the resolved type
11251         only if it is in the assembly we searched.
11252
11253         * reflection.c (ensure_runtime_vtable): Initialize method slots.
11254
11255         * class.c (mono_class_setup_vtable): Set the slot of the overriding
11256         method.
11257
11258 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11259
11260         * appdomain.c:
11261         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
11262         the right one is 'file:///blah', but MS allows it.
11263         * assembly.c:
11264         (mono_assembly_open): allow 'file://blah'
11265
11266         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
11267
11268 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
11269
11270         * socket-io.c: fixes bug #40310.
11271
11272 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
11273
11274         * reflection.c (mono_reflection_parse_type): handle deeply nested
11275         types correctly.
11276
11277         * reflection.c (mono_image_create_token): Use unique token values
11278         since they will be put into a hash table.
11279
11280         * class.c (mono_class_setup_vtable): If a method occurs in more than
11281         one place in the vtable, and it gets overriden, then change the
11282         other occurances too.
11283
11284         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
11285         object as return type.
11286
11287 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
11288
11289         * icall.c: Deleted "ToString" implementation for double and float
11290         because they are full implemented in managed code.
11291
11292 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11293
11294         * reflection.c, reflection.h: implemented and exported functions
11295         to retrieve info about custom attributes.
11296
11297 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11298
11299         * appdomain.c: moved Uri handling to assembly.c
11300         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
11301         work when using a file Uri in *nix and windows.
11302
11303         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
11304         GetReferencedAssemblies.
11305
11306 2003-03-18  Dick Porter  <dick@ximian.com>
11307
11308         * icall.c: Rename a couple of internal calls
11309
11310         * threads.c: Set the thread state to Stopped when a thread exits.
11311         Fixes bug 39377.
11312
11313 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
11314
11315         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
11316         New icall.
11317
11318         * object.c (mono_class_vtable): fix warning.
11319
11320 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
11321
11322         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
11323
11324         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
11325         memory.
11326         (method_encode_clauses): Create exception info structures in the right
11327         order.
11328         (mono_reflection_setup_internal_class): Initialize supertypes field.
11329
11330         * class.c object.c: Handle interfaces which implement other interfaces 
11331         correctly.
11332
11333         * class.h class.c: Move the supertypes array initialization code into 
11334         a separate function so it can be used for dynamic types too. Also call
11335         it earlier, in mono_class_init(), since it can be used before the
11336         type is initialized.
11337
11338 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11339
11340         * Makefile.am:
11341         * assembly.c:
11342         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
11343
11344         * appdomain.c:
11345         * appdomain.h:
11346         * marshal.c:
11347         * object.c: remove warnings.
11348
11349 2003-03-13  Martin Baulig  <martin@ximian.com>
11350
11351         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
11352         (MonoDebugLexicalBlockEntry): New types.
11353
11354         * debug-mono-symfile.c
11355         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
11356
11357 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11358
11359         * process.c: ret can be any non-zero value accroding to MS doc.
11360
11361 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
11362
11363         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
11364         fixing a warning for a miss-used prototype, would have cause
11365         random memory corruption.
11366
11367 2003-03-07  Martin Baulig  <martin@ximian.com>
11368
11369         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
11370         getting really annoying ....
11371
11372 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
11373
11374         * reflection.c (fixup_method): added support for array methods.
11375
11376 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
11377
11378         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
11379         (pointed out by Michael Adams).
11380
11381 2003-03-04  Dick Porter  <dick@ximian.com>
11382
11383         * icall.c: Temporarily reverted the Double and Single ToString()
11384         change, because it broke nunit.
11385
11386 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
11387
11388         * object.h, threads.h: make include files compatible with C++
11389         (patch by Jerome Laban <jlaban@wanadoo.fr>).
11390
11391 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
11392
11393         * icall.c: Erased ToString helper functions for Double and Single.
11394         Now, that implementations ar all in managed code (Double and Single
11395         Formatters).
11396
11397 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
11398
11399         * appdomain.c: Added method for initializing the default context of
11400         a domain. Added internal call for getting the default context.
11401         * appdomain.h: Added context variable in MonoDomain struct.
11402         * domain.c: mono_domain_set also sets the default context of the domain
11403         * icall.c: Mapped internal method InternalGetDefaultContext.
11404         * object.c: mono_object_get_virtual_method returns always a remoting
11405         wrapper if the object is a transparent proxy.
11406         mono_runtime_invoke_array: when creating an object by calling the
11407         constructor, if the created object is a proxy, then the constructor should
11408         be called using the a remoting wrapper.
11409
11410 2003-03-03  Dick Porter  <dick@ximian.com>
11411
11412         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
11413         variable so it compiles on solaris.  Problem spotted by
11414         Christopher Taylor <ct@cs.clemson.edu>
11415
11416 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11417
11418         * appdomain.c:
11419         (get_info_from_assembly_name): don't leak value.
11420
11421         * icall.c:
11422         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
11423         result.
11424
11425 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
11426
11427         * assembly.c: export mono_image_load_references ().
11428         * class.c: handle function pointers. mono_class_from_name() now
11429         supports nested type names directly.
11430
11431 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
11432
11433         * reflection.h reflection.c: Encode already created dynamic methods 
11434         and fields correctly as a DEF instead of a REF.
11435
11436         * reflection.c: Get rid of the force_ref argument to 
11437         mono_image_typedef_or_ref since it was wrong in the first place.
11438
11439         * string-icalls.c: add error checking to string constructors according
11440         to the MSDN docs.
11441
11442         * reflection.c: Emit types in the order their TypeBuilders were 
11443         created. Previously, a new table index was assigned to each type before
11444         the tables were emitted. This was wrong because the signature blob
11445         might already refer to a type by its original table index.
11446
11447 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
11448
11449         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
11450         change.
11451         
11452 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11453
11454         * Makefile.am: make assemblies dir have \ instead of / on windows.
11455
11456 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
11457
11458         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
11459         iterate over the NESTEDCLASS table using a linear search since the
11460         table is not guaranteed to be sorted by the secondary key.
11461
11462         * class.c (mono_class_create_from_typedef): fixed up call to
11463         mono_metadata_nesting_typedef.
11464         
11465 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
11466
11467         * marshal.c (mono_string_to_byvalstr): clear the memory as
11468         suggested by Jerome Laban <jlaban@wanadoo.fr>
11469
11470 2003-02-26  Dick Porter  <dick@ximian.com>
11471
11472         * process.c: Cope with padding in .rsrc blocks
11473
11474 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
11475
11476         * metadata.h: reverted the filter_len change, it breaks reflection
11477         
11478 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
11479
11480         * metadata.h: added a new field to store the filter_len
11481         
11482
11483 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11484
11485         * reflection.c: handle custom attributes for types and members
11486         created with Reflection.Emit (bug#38422).
11487
11488 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
11489
11490         * reflection.c: define RTSpecialName automatically for constructors for
11491         compatibility with MS.NET.
11492
11493         * reflection.c (mono_reflection_create_runtime_class): initialize
11494         nested_in field of dynamically created classes.
11495
11496 2003-02-22  Martin Baulig  <martin@ximian.com>
11497
11498         * debug-mono-symfile.h: Incremented version number.
11499
11500 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
11501
11502         * object.h icall.c process.c: fix warnings.
11503
11504 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
11505
11506         * appdomain.h appdomain.c:
11507         (mono_domain_try_type_resolve): split the 
11508         name_or_tb argument into a name and a tb argument.
11509         (mono_domain_has_type_resolve): new function to check whenever the
11510         application has registered a TypeResolve event handler.
11511         
11512         * icall.c reflection.h reflection.c: move the type resolve logic into
11513         mono_reflection_get_type () so it will be invoked when 
11514         Assembly::GetType () is called.
11515
11516         * reflection.c:
11517         (mono_reflection_get_type): renamed to get_type_internal.
11518         (mono_reflection_get_type): fixed type name generation so it works 
11519         for nested types too.
11520         (mono_reflection_get_type): call has_type_resolve () to avoid the 
11521         costly type name generation if there is no resolve event handler.
11522
11523 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11524
11525         * class.c, image.c: load exported types from file references.
11526
11527 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
11528
11529         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
11530           used to cache the managed methods used to create proxies and make 
11531           remote invocation of methods.
11532         * class.h: Added in MonoVTable a flag to indicate that a class needs 
11533           to be remotely created.
11534         * object.c: Modified the method mono_class_vtable(). It now initializes 
11535           the remote flag of the vtable. Modified mono_object_new_specific(), 
11536           so now it checks the remote flag.
11537         * icall.c: Added a couple of internal methods, one for enabling instance 
11538           creation interception for a type, and one for creating objects bypassing
11539           the remote check.
11540
11541 2003-02-18  Martin Baulig  <martin@ximian.com>
11542
11543         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
11544         New interncall to get a method's metadata token.
11545
11546         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
11547         New interncall for the debugger.
11548
11549 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
11550
11551         * class.c (mono_class_setup_vtable): allocate supertype array
11552
11553 2003-02-18  Martin Baulig  <martin@ximian.com>
11554
11555         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
11556
11557 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11558
11559         * reflection.c:
11560         (assembly_name_to_aname): jump over unknown properties (i've found
11561         something like: 'type, assembly, version=xxx, custom=null, public...',
11562         so now will ignore custom=null and still get the rest of the values).
11563
11564 2003-02-17  Dick Porter  <dick@ximian.com>
11565
11566         * threads.c: Have Thread.Start() wait for a semaphore to signal
11567         that the thread has set up all its local data.  This fixes bug
11568         34323, where Abort() raced the new thread's TLS data.
11569
11570         Also removes the handle_store() call from start_wrapper, because
11571         threads are now always created suspended and there is no longer a
11572         race between the parent and child threads to store the info.
11573
11574 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
11575
11576         * image.c: explain the #- heap issue in a message, hopefully
11577         avoiding FAQs on mono-list.
11578
11579 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11580
11581         * icall.c:
11582         (GetEntryAssembly): if the domain has not invoked
11583         AppDomain.ExecuteAssembly yet, return the assembly of the default
11584         AppDomain.
11585
11586 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
11587
11588         * class.c (mono_ldtoken): make it work in dynamic assemblies.
11589
11590 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
11591
11592         * metadata.c, reflection.c: simple speedup to type hash
11593         and equals code.
11594
11595 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
11596
11597         * image.c, image.h, class.c, assembly.c: move module loading
11598         to MonoImage. When loading metadata, consider alignemnet from
11599         the start of metadata, not from the metadata address in memory.
11600
11601 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
11602
11603         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
11604         AssemblyBuilder objects. Factored out custom attribute creation into
11605         a separate function.
11606         (create_custom_attr): new function to create custom attributes.
11607
11608 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
11609
11610         * Makefile.am: Got tired of typing the full pathname to pedump.
11611         Until there is another option, am installing this.
11612
11613 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
11614
11615         * class.c (class_compute_field_layout): always set field->parent 
11616         (mono_ldtoken): use mono_defaults.fieldhandle_class;
11617
11618 2003-02-11  Dick Porter  <dick@ximian.com>
11619
11620         * threads-types.h:
11621         * monitor.c: Rewrote Monitor, making lock much faster and
11622         Pulse/Wait work as specified.  Also uses much fewer handles, and only
11623         creates them as needed.
11624
11625         * exception.c: Added SynchronizationLockException
11626
11627         * threads.c: Deleted old Monitor implementation.  The new one is
11628         in a new file.
11629
11630 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11631
11632         * class.c: handled TypedReference type code. Set the correct size for
11633         class data. Setup interface_offsets for interface classes, too.
11634
11635 2003-02-09  Martin Baulig  <martin@ximian.com>
11636
11637         * debug-mono-symfile.h: Reflect latest symbol writer changes.
11638
11639 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
11640
11641         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
11642         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
11643         * object.c: fixed mono_object_get_virtual_method () for interfaces.
11644         * verify.c: check for code that runs after the end of the method.
11645
11646 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
11647
11648         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
11649         "System.Math::Round2".
11650         * sysmath.h: Added Floor, Round and Round2 definitions.
11651         * sysmath.c: Modified certain functions that were not 100% compliant
11652         with MS.NET (math precision) and added the implementation of Floor,
11653         Round and Round2.
11654
11655 2003-02-07  Martin Baulig  <martin@ximian.com>
11656
11657         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
11658
11659 2003-02-07  Martin Baulig  <martin@ximian.com>
11660
11661         * debug-mono-symfile.c: Reflected latest symwriter changes.
11662         (mono_debug_create_mono_symbol_file): Removed.
11663         (mono_debug_open_mono_symbol_file): Take an argument which
11664         specifies whether to create a dynamic symbol file.
11665
11666 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
11667
11668         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
11669
11670 2003-02-05  Martin Baulig  <martin@ximian.com>
11671
11672         * reflection.c (mono_image_build_metadata): Make this public,
11673         protect it against being called multiple times, don't create
11674         resources and don't build the compressed metadata here.
11675         (mono_image_create_pefile): Do this here.
11676
11677         * icall.c
11678         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
11679
11680 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11681
11682         * socket-io.c: fixed bug #36322.
11683
11684 2003-02-06  Piers Haken <piersh@friskit.com>
11685
11686         * appdomain.[ch]:
11687         * class.h:
11688         * debug-mono-symfile.c:
11689         * icall.c:
11690         * loader.c:
11691         * mono-config.c:
11692         * monosn.c:
11693         * reflection.c:
11694         * socket-io.c: warning cleanups
11695
11696 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
11697
11698         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
11699         function. works like remoting invoke, but does a check for the Proxy first.
11700
11701 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
11702
11703         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
11704
11705 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
11706
11707         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
11708         array of pointers.
11709         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
11710         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
11711
11712         * object.c (mono_store_remote_field_new): used by the new jit
11713         instead of mono_store_remote_field
11714         (mono_load_remote_field_new): used by the new jit
11715         instead of mono_load_remote_field
11716
11717 2003-02-05  Patrik Torstensson
11718
11719         * appdomain.c: changed unload to take the domain id instead
11720         of domain
11721         
11722         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
11723
11724
11725 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11726
11727         * appdomain.c: don't look for assemblies in ApplicationBase if
11728         PrivateBinPathProbe is set.
11729
11730 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11731
11732         * object.c: make the first argument in main_args contain the absolute
11733         path to the assembly. Fixes bug #37511.
11734
11735 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11736
11737         * icall.c: get correct UTC offset for countries not using daylight
11738         time saving. Fixes bug #30030.
11739
11740 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11741
11742         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
11743         and 1 are the family).
11744
11745 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
11746
11747         * icall.c (ves_icall_InternalExecute): removed wrong assertion
11748
11749         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
11750
11751 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
11752
11753         * reflection.c: added support for SignatureHelper tokens, which is
11754         needed by the Calli opcode.
11755
11756         * reflection.h: track changes to SignatureHelper class.
11757
11758         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
11759
11760 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11761
11762         * appdomain.c: fixed loading assemblies from PrivateBinPath.
11763
11764 2003-02-03  Patrik Torstensson
11765         * appdomain.[c|h], domain.c : 
11766          - Added support for getting a domain via domain id
11767          - Support for setting and getting domain from System.AppDomain 
11768            (used in cross appdomain channel)
11769          - Added support for get/set for a MonoAppContext on a thread 
11770            (Context class in System.Runtime.Remoting.Contexts),
11771          - Removed hack in Get/SetData and ExecuteAssembly.
11772         
11773         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
11774         the managed world to get control when a proxy is created.
11775
11776         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
11777         
11778 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
11779
11780         * icall.c
11781         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11782         Populate the codebase field as well.
11783
11784 2003-02-02  Martin Baulig  <martin@ximian.com>
11785
11786         * debug-mono-symfile.c
11787         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
11788         (mono_debug_symfile_add_method): Allow interncalls.
11789
11790 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11791
11792         * icall.c: throw parse exception if strtod fails or the string is empty.
11793
11794 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
11795
11796         * marshal.c: handle object type separately from defined
11797         class types.
11798
11799 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
11800
11801         * marshal.c: handle NATIVE_LPSTR for strings when it's
11802         explicitly specified.
11803
11804 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
11805
11806         * reflection.c, reflection.h, icall.c: setup the reflection
11807         handle cache for ModuleBuilders and AssemblyBuilders.
11808
11809 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
11810
11811         * reflection.c (reflection_methodbuilder_to_mono_method): set
11812         pinvoke flag
11813
11814 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11815
11816         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
11817
11818 2003-01-29  Dick Porter  <dick@ximian.com>
11819
11820         * threads.c: No need for the fake_thread kludge now that Thread
11821         doesn't run a class constructor
11822         
11823 2003-01-29  Dick Porter  <dick@ximian.com>
11824
11825         * threads.c: Use g_direct_hash instead of the rather bogus
11826         g_int_hash
11827
11828 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
11829
11830         * marshal.c (mono_marshal_get_native_wrapper): add check for null
11831         (fix pinvoke12.exe)
11832         (mono_marshal_get_struct_to_ptr): generate valid IL code
11833         (mono_marshal_get_ptr_to_struct): generate valid IL code
11834         (*): correctly set sig->pinvoke, we need to memdup the signature
11835         to do that
11836
11837 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11838
11839         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
11840         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
11841
11842 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
11843
11844         * profiler.c: provide more callers information.
11845
11846 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
11847
11848         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
11849
11850         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
11851
11852         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
11853
11854 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
11855
11856         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
11857         exception instead of going into an infinite loop on dates which it 
11858         can't yet handle.
11859
11860         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
11861         out-of-range exception if needed.
11862
11863         * class.c (mono_class_setup_vtable): allow a virtual method to provide
11864         an implementation for an interface method and to override an inherited
11865         method at the same time. 
11866         Imagine a scenario when a virtual method is used to override a
11867         virtual abstract method in a parent class, and this same method 
11868         provides an implementation for an method inherited from an interface. 
11869         In this case, the interface resolution code will set im->slot, which 
11870         means that the virtual method override pass will skip this method 
11871         which means a pointer to the abstract method inherited from the parent
11872         will remain in the vtable of this non-abstract class.
11873
11874         * class.c: (mono_class_setup_vtable): continue search for a real 
11875         method if only an abstract method is found.     
11876
11877 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
11878
11879         * reflection.c: add size to encoding for ByValStr and ByValArray
11880         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
11881
11882 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
11883
11884         * class.c (mono_class_setup_vtable): pass the override info as an
11885         argument.
11886
11887         * class.c (mono_class_setup_vtable): set the slot of overriding methods
11888         correctly.
11889         
11890         * reflection.c (ensure_runtime_vtable); add support for method 
11891         overrides.
11892         
11893 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
11894
11895         * reflection.c (resolution_scope_from_image): Hack to work to work with
11896         dynamic assemblies.
11897
11898         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
11899         added a 'force_ref' argument to force this function to allways return 
11900         a TypeRef. This is needed by mono_image_get_memberref_token ().
11901         
11902 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
11903
11904         * reflection.c (mono_image_get_type_info): interfaces really don't have
11905         a parent.
11906
11907         * reflection.c (mono_image_basic_init): fill out missing fields of
11908         image structure.
11909
11910         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
11911         dynamic assemblies. This is required so dynamic assemblies show up in
11912         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
11913         Type::GetType() etc. This is consistent with MS behaviour.
11914
11915         * image.c image.h reflection.c: add newly created classes to the name 
11916         cache so mono_class_get () will find them.      
11917
11918 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
11919
11920         First part of changes to get IKVM.NET running under mono.
11921         
11922         * appdomain.h, appdomain.c: added new function 
11923         mono_domain_try_type_resolve() which will emit TypeResolve events. 
11924         This function will call AppDomain::DoTypeResolve to do the actual work.
11925
11926         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
11927         moved existing code dealing with dynamic tokens to a new function 
11928         called mono_reflection_lookup_dynamic_token (). This function will 
11929         raise TypeResolve events when appropriate. Since reflection.c is not 
11930         part of libmetadata, a new hook function called 
11931         mono_lookup_dynamic_token() is added to class.c which will call this.
11932
11933         * assembly.h assembly.c: make the invoke_load_hook function public,
11934         so it can be called for dynamic assemblies.
11935
11936         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
11937
11938         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
11939         type isn't found.
11940
11941         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
11942         MonoGHashTable, since it contains pointers to objects which the GC 
11943         needs to track.
11944
11945         * assembly.c (search_loaded): remove unused variable.
11946         
11947 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
11948
11949         * object.c: fixed issue exposed by gcc-generated IL programs
11950         that use RVA data for pointers.
11951
11952 2003-01-25  Martin Baulig  <martin@ximian.com>
11953
11954         * threads.c (start_wrapper): Moved the initialization of
11955         `start_func' above the mono_new_thread_init() call to which we
11956         pass it as argument.
11957
11958 2003-01-24  Martin Baulig  <martin@ximian.com>
11959
11960         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
11961         the MonoThread pointer.
11962
11963 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
11964
11965         * icall.c: Rename `PowImpl' to Pow.
11966
11967 2003-01-23  Dick Porter  <dick@ximian.com>
11968
11969         * threads.c (start_wrapper): Create a Thread object if needed, so
11970         the Main() thread can do the class initialisation in a subthread
11971         that has been set up to allow managed code execution.
11972
11973         Pass the thread ID instead of the MonoThread pointer to the thread
11974         start and attach callbacks.  This change is required, because the
11975         jit thread start callback must be called _before_ the Thread
11976         object can be created.
11977         
11978         (mono_thread_init): Removed much object creation code that is no
11979         longer needed.  No managed code is called from here now.
11980
11981         * object.c (mono_runtime_exec_managed_code): Create a subthread
11982         for Main, and call back to the runtime to use it.
11983         Set the exit code when Main exits.
11984
11985         * gc.c: Make sure domain finalisation happens in a subthread.
11986         Re-enable threaded GC, fixing bug 31333 (again).
11987
11988         * environment.c: System.Environment internall calls (so far just
11989         ExitCode is here, the others are still in icall.c)
11990
11991         * appdomain.c (mono_runtime_cleanup): All threads running managed
11992         code should have finished before mono_runtime_cleanup() is
11993         reached, so no need to clean up threads.
11994
11995 2003-01-22  Martin Baulig  <martin@ximian.com>
11996
11997         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
11998         `gpointer func' arguments.      
11999         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
12000         but added `MonoThread *thread' argument.
12001         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
12002
12003         * threads.c (mono_new_thread_init): Added `gpointer func' argument
12004         and pass it to the mono_thread_start_cb callback.
12005         (mono_install_thread_callbacks): New public function to install a
12006         set of callbacks which are set by the debugger.
12007         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
12008
12009 2003-01-22  Martin Baulig  <martin@ximian.com>
12010
12011         * Makefile.am: Install debug-mono-symfile.h.
12012
12013 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
12014
12015         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
12016
12017 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
12018
12019         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
12020         * class.c (mono_ptr_class_get): correctly set access levels of pointers
12021         (mono_array_class_get): correctly set access levels of arrays
12022
12023 2003-01-20      Patrik Torstensson
12024         * image.h (MonoAssemblyName): changed major, minor, build, revision
12025         from signed to unsigned.
12026
12027 2003-01-20  sean kasun <skasun@azstarnet.com>
12028
12029         * reflection.c (load_cattr_value): Now this handles
12030         MONO_TYPE_SZARRAY.  Fixes bug #35629
12031
12032 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
12033
12034         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
12035         integer value
12036
12037 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12038
12039         * decimal.c: fixed bug #26056.
12040
12041 2003-01-17  Martin Baulig  <martin@ximian.com>
12042
12043         * gc.c: Raise an ExecutionEngineException instead of using g_error().
12044
12045 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12046
12047         * exception.[ch]:
12048         (mono_get_exception_type_initialization): new function.
12049
12050         * object.c: throw a TypeInitializationException when an exception is
12051         thrown invoking the class constructor.
12052
12053 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12054
12055         * reflection.c: fixed attribute reading.
12056
12057 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12058
12059         * icall.c:
12060         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
12061         provided, look for the type in the calling assembly and then in
12062         mscorlib; if the assembly name is provided, only try that one.
12063
12064 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12065
12066         * object.c: register the vtable before there is a chance it's
12067         queried again recursively.
12068
12069 2003-01-13  Duncan Mak  <duncan@ximian.com>
12070
12071         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
12072         gc-internal.h. 
12073         
12074 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
12075
12076         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
12077
12078 2003-01-11  Martin Baulig  <martin@ximian.com>
12079
12080         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
12081         this to 20 for the release.
12082
12083 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
12084
12085         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
12086
12087         * loader.c (mono_method_get_marshal_info): bug fix
12088
12089         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
12090         structures with explicit layout
12091
12092 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12093
12094         * profiler.c: made the output more readable (and sorted). 
12095         Added caller information for the allocation profiler.
12096
12097 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
12098
12099         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
12100
12101 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12102
12103         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
12104         to get value types.
12105         
12106 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
12107
12108         * object.c, profiler.h, profiler.c, profiler-private.h:
12109         Added object allocation profiler.
12110
12111 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
12112
12113         * reflection.h, reflection.c: handle global methods.
12114         Compress blob entries.
12115
12116 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
12117
12118         * marshal.c: fix compilation.
12119
12120 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
12121
12122         * loader.c (mono_method_get_marshal_info): impl.
12123
12124         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
12125
12126 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12127
12128         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
12129         for reference types.
12130
12131 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
12132
12133         * loader.c: fixed off by one error in loaded parameter names.
12134
12135 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
12136
12137         * marshal.c (mono_marshal_get_icall_wrapper): like
12138         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
12139         instead of a MonoMethod.
12140
12141 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12142
12143         * decimal.c: fixed bug #36537.
12144
12145 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
12146
12147         * marshal.c: throw a missing method exception if a
12148         P/Invoke method is not found.
12149
12150 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12151
12152         * icall.c: allow a null this for constructors.
12153
12154 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12155
12156         * icall.c: raise the proper exceptions if the arguments to the
12157         internal Invoke are incorrect.
12158
12159 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
12160
12161         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
12162
12163 2003-01-03  Martin Baulig  <martin@ximian.com>
12164
12165         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
12166
12167 2002-12-31  Martin Baulig  <martin@ximian.com>
12168
12169         * debug-mono-symfile.c: Completely rewrote the type section.
12170         Instead of using individual malloc()ed fields, we use one big
12171         continuous memory area and offsets into this area.
12172         See the comments in the source code for details.
12173
12174 2002-12-30  Martin Baulig  <martin@ximian.com>
12175
12176         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
12177
12178 2002-12-30  Martin Baulig  <martin@ximian.com>
12179
12180         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
12181         line number table in this data blob instead of using an external
12182         pointer.
12183
12184 2002-12-28  Martin Baulig  <martin@ximian.com>
12185
12186         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
12187
12188 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
12189
12190         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
12191         as a boxed return type.
12192
12193 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
12194
12195         * appdomain.c
12196         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
12197         g_build_filename to properly get separators on the filename created.
12198
12199         * object.h: Small change, introduce MonoMarshalByRefObject to
12200         track the layout of that structure in the C# universe as we make
12201         changes there.
12202
12203 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
12204
12205         * object.c: removed assert to allow static fields on interfaces.
12206         * loader.c: a TypeSpec may be used for any type, not just arrays.
12207
12208 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
12209
12210         * class.c, class.h: added mono_class_array_element_size ().
12211         Ignore static methods in interfaces.
12212
12213 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12214
12215         * threads.c: fixed the build under cygwin.
12216
12217 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
12218
12219         * reflection.c: handle nullref constants. Allocate keys for
12220         reflection handles with the GC.
12221
12222 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12223
12224         * threads.c, threads.h: added mono_thread_get_abort_signal()
12225         to get a suitable signal for thread abort.
12226
12227 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12228
12229         * metadata.c: fix handling of ExportedType table.
12230
12231 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12232
12233         * icall.c: added WriteWindowsDebugString internal call.
12234
12235 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12236
12237         * reflection.h: added fields to match C# implementation.
12238
12239 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12240
12241         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
12242
12243 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
12244
12245         * gc.h, gc-internal.h: Rename header for GC internal calls to
12246         gc-internal.h from gc.h as to not clash with Boehm GC having its
12247         header installed as <gc.h> in outside include paths.
12248         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
12249         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
12250
12251 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12252
12253         * icall.c: assign minor, build and revision in FillName.
12254
12255 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
12256
12257         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
12258         Added support for running code generated by Reflection.Emit.
12259
12260 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12261
12262         * appdomain.c: check for NULL argument in LoadFrom.
12263
12264 2002-12-10  Dick Porter  <dick@ximian.com>
12265
12266         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
12267
12268 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12269
12270         * appdomain.c: fix buglet when building exe file name.  Handle full
12271         assembly name (needed after latest changes to AssemblyName).
12272         * image.c:
12273         (mono_image_close): free some hashtables.
12274
12275 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
12276
12277         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
12278         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
12279         on some systems (redhat 7.3) 
12280
12281 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
12282
12283         * threads.c: delete the critical section of a sync block,
12284         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
12285
12286 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
12287
12288         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
12289
12290 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12291
12292         * appdomain.[ch]: handle the assembly preload event to try loading the
12293         assemblies using the paths we have in the current domain.
12294
12295         * assembly.[ch]: created an assembly preload hook that is called to try
12296         loading the assembly by other means that the ones provided here.
12297
12298         * domain.c: initialize the domain search path.
12299
12300         From now on, assemblies (TODO: except corlib and System) are loaded
12301         according to these rules when using mono_assembly_load ():
12302
12303                 1. It tries to load the assembly from the ApplicationBase
12304                 of the current domain appending .dll and .exe (TODO: have to
12305                 try loading from name/name.dll and name/name.exe).
12306
12307                 2. It tries the search path specified in PrivateBinPath for the
12308                 current domain (if any).
12309
12310                 3. Previous behavior.
12311
12312 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
12313
12314         * icall.c: implemented GetInterfaceMap() related icall.
12315         * domain.c, loader.h: load MethodInfo in mono_defaults.
12316
12317 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
12318
12319         * gc.c: disable the finalizer thread for now, untill all the issues
12320         with it are resolved.
12321
12322 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12323
12324         * string-icalls.c: handle embedded nulls in string ctor when the
12325         length is specified.
12326
12327 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
12328
12329         * class.c: look for explicit interface implementation in parent
12330         classes, too.
12331
12332 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
12333
12334         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
12335
12336 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
12337
12338         * gc.c: protect handles with a critical section.
12339
12340 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12341
12342         * icall.c:
12343         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
12344         parameters. If no assembly specified, try getting the type from all
12345         the assemblies in the current domain, else, load the assembly and get
12346         the type from it.
12347
12348 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12349
12350         * marshal.c: applied patch from Aleksey Demakov that fixes
12351         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
12352
12353 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12354
12355         * icall.c: fixed get_location.
12356
12357 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
12358
12359         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
12360         declarations to make it work with older gcc. 
12361
12362         * loader.c (mono_get_method): set signature->pinvoke for native calls
12363
12364 2002-11-20  Dick Porter  <dick@ximian.com>
12365
12366         * threads.c (mono_thread_init): Set the main thread's handle
12367
12368 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
12369
12370         * gc.c: allow compilation without GC support. Changed to match the
12371         mono coding style.
12372
12373 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
12374
12375         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
12376
12377 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
12378
12379         * reflection.c: set a public key token on the core assemblies.
12380
12381 2002-11-18  Dick Porter  <dick@ximian.com>
12382
12383         * threads.c: Split out some thread initialisation so that other
12384         files can set the start callback function.
12385
12386         * gc.c: Run finalisers in a separate thread, to avoid stack
12387         overflow.  Fixes bug 31333.
12388
12389         * appdomain.c: Set up GC finalisation thread.
12390
12391         * reflection.c: 
12392         * object.c: 
12393         * domain.c: Use gc.h macros for GC_malloc
12394         
12395 2002-11-15  Dick Porter  <dick@ximian.com>
12396
12397         * threadpool.c: 
12398         * threads.c:
12399         * appdomain.c: Removed mono_runtime_init_with_attach(),
12400         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
12401         merging the extra parameter with the existing function.  Removed
12402         unneeded code in mono_thread_attach().
12403
12404 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
12405
12406         * image.c (mono_image_loaded_by_guid): a method to get loaded
12407         images by guid. 
12408         (load_metadata_ptrs): we store the guid as string.
12409
12410 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
12411
12412         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
12413
12414         * metadata.c (mono_guid_to_string): imported method form Zoltan
12415         Varga (slightly modified)
12416
12417         * assembly.c (mono_assembly_open): load precompiled code
12418
12419         * loader.h (MonoMethod): we store the method token for use in the
12420         aot compiler. 
12421
12422 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12423
12424         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
12425         the hook function called when an assembly is loaded.
12426         
12427         * domain.c: Modified file.
12428         (mono_domain_assembly_load): removed hash table insertion of assemblies.
12429
12430         Fixes bug #33196.
12431
12432 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
12433
12434         * reflection.c: Map PEFileKind to the value expected by the WinNT
12435         image loader. 
12436
12437 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12438
12439         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
12440         Read until the buffer is filled completely.
12441
12442 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12443
12444         * icall.c: implemented MonoType.InternalGetEvent ().
12445
12446 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12447
12448         * appdomain.c: implemented InitAppDomainSetup. Delayed
12449         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
12450         the entry_assembly.
12451
12452         * assembly.c: base_dir is now an absolute path ending with
12453         G_DIR_SEPARATOR.
12454
12455         * icall.c: modified get_location according to the above changes.
12456
12457         * object.c: init AppDomain.SetupInformation for the default domain after
12458         we have the entry assembly.
12459
12460         * domain.c: when unloading a domain, setup = NULL.
12461
12462 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
12463
12464         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
12465
12466 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
12467
12468         * object.h, object.c: introduced mono_object_get_virtual_method ()
12469         to lookup the method invoked on an object when a callvirt is done on
12470         a method.
12471         * icall.c: make MethodInfo::Invoke() always do a virtual call.
12472
12473 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12474
12475         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
12476         current domain when loaded an assembly and failed to load it.
12477
12478         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
12479
12480 2002-10-31  Dick Porter  <dick@ximian.com>
12481
12482         * icall.c: 
12483         * file-io.h: 
12484         * file-io.c: Return the error status in a parameter, as the
12485         GetLastError() value has long since been blown away if we try and
12486         look it up in a subsequent internal call invocation.  Delete the
12487         GetLastError() internal call, because it's useless.
12488
12489 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
12490
12491         * class.[ch]: added cast_class to fix bug 29517
12492
12493 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
12494
12495         * marshal.c: create valid IL code in the filter clause:
12496         the new JIT is less forgiving:-)
12497
12498 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12499
12500         * icall.c: removed get_property internal call.
12501
12502 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
12503
12504         * appdomain.h domain.c: Added an ID to appdomains.
12505         
12506         * threads.c threads.h icall.c: Implement icall
12507         Thread:GetDomainID(), and remove unused icall 
12508         CurrentThreadDomain_internal.
12509
12510 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12511
12512         * icall.c: Don't recurse through the base types in GetConstructor.
12513         Fixes bug #32063. 
12514
12515 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
12516
12517         * mempool.h, mempool.c: added mono_mempool_empty() and
12518         mono_mempool_stats().
12519
12520 2002-10-23  Dick Porter  <dick@ximian.com>
12521
12522         * file-io.c: 
12523         * file-io.h: 
12524         * icall.c: Added MonoIO.GetFileType internal call
12525
12526 2002-10-17  Dick Porter  <dick@ximian.com>
12527
12528         * appdomain.c (mono_runtime_cleanup): Don't signal the async
12529         delegate semaphore before waiting for all threads to finish,
12530         because new threads can also call async delegates.  Fixes bug
12531         32004.
12532
12533         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
12534         of 3 seconds, in case another async job is queued.  (This part is
12535         needed because the bug fix reintroduced the 3s exit lag.)  This
12536         makes the mono_runtime_shutdown flag superfluous.
12537
12538 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
12539
12540         * reflection.c: include ehader size in method section headers.
12541         Really check for suplicated modules entries.
12542
12543 2002-10-17  Martin Baulig  <martin@gnome.org>
12544
12545         * debug-mono-symfile.c: Added back support for locals.
12546
12547 2002-10-14  Martin Baulig  <martin@gnome.org>
12548
12549         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
12550         MONO_TYPE_VOID.
12551
12552 2002-10-14  Martin Baulig  <martin@gnome.org>
12553
12554         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
12555         mono_class_get() instead of looking in the class cache. 
12556
12557 2002-10-13  Martin Baulig  <martin@gnome.org>
12558
12559         * debug-mono-symfile.c: Set version number to 28, include the
12560         signature in method names.
12561
12562 2002-10-13  Martin Baulig  <martin@gnome.org>
12563
12564         * debug-mono-symfile.h: Set version number to 27.
12565
12566 2002-10-11  Martin Baulig  <martin@gnome.org>
12567
12568         * gc.c: Don't register/unregister NULL pointers as disappearing links.
12569
12570 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12571
12572         * metadata.c, metadata.h: added helper function to allocate signatures.
12573
12574 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12575
12576         * icall.c: added internal call to get the location of machine.config.
12577
12578 2002-10-08  Martin Baulig  <martin@gnome.org>
12579
12580         * debug-mono-symfile.c: Ignore classes with a pending init for the
12581         moment.
12582
12583 2002-10-03  Dick Porter  <dick@ximian.com>
12584
12585         * threads.c: Freebsd pthread_t is a pointer
12586
12587 2002-10-03  Dick Porter  <dick@ximian.com>
12588
12589         * socket-io.c: Implemented GetHostName_internal
12590
12591 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12592
12593         * mono-config.c:
12594         (mono_config_parse_file): don't leak the text.
12595
12596 2002-10-02  Martin Baulig  <martin@gnome.org>
12597
12598         * debug-mono-symfile.c: Added support for methods.
12599
12600 2002-10-01  Martin Baulig  <martin@gnome.org>
12601
12602         * debug-mono-symfile.c: Don't emit methods and line numbers for
12603         the dynamic symbol file, just write the type table.  We can easily
12604         have an external helper program which creates a symbol file for an
12605         IL file.        
12606
12607 2002-10-01  Dick Porter  <dick@ximian.com>
12608
12609         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
12610         Only add the handle to the cleanup array when we're about to
12611         launch the thread.  Bug 31425 deadlocked when the test was run on
12612         mono under w32.
12613
12614 2002-10-01  Martin Baulig  <martin@gnome.org>
12615
12616         * debug-mono-symfile.c: Added support for properties.
12617
12618 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12619
12620         * reflection.c: unaligned store fix from Mark Crichton
12621         <crichton@gimp.org>.
12622
12623 2002-09-27  Martin Baulig  <martin@gnome.org>
12624
12625         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
12626         New interncall.
12627
12628 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
12629
12630         * assembly.h, assembly.c: use a sane API to hook into the assembly
12631         loading process instead of a useless special-purpouse hack
12632         (ngen needs a hook, too, for example).
12633
12634 2002-09-27  Dick Porter  <dick@ximian.com>
12635
12636         * threads.c (mono_thread_init): Call GetCurrentProcess() so
12637         io-layer can set up some process handle info.  Not needed on w32,
12638         but doesn't hurt either.
12639
12640         * process.c: Pass the program name in the second parameter to
12641         CreateProcess, so the path is searched.  Include the working
12642         directory. Implemented process name, process enumeration, and some
12643         process detail internal calls.
12644         
12645         * icall.c: Added internal calls for process lookup, and some
12646         process details
12647
12648 2002-09-26  Martin Baulig  <martin@gnome.org>
12649
12650         * assembly.c (mono_install_open_assembly_hook): New global
12651         function to install a function to be invoked each time a new
12652         assembly is loaded.
12653         (mono_assembly_open): Run this callback function if set.
12654
12655         * debug-mono-symfile.c: Put back line numbers for the dynamic
12656         symbol file and also record the .il file as source file.  This
12657         allows us to install the temporary symbol file as `file.dbg' just
12658         like a compiler-generated one.
12659
12660 2002-09-26  Nick Zigarovich <nick@chemlab.org>
12661
12662         * Corrected typo in gc.c (BOHEM vs BOEHM).
12663
12664 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12665
12666         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
12667         GetProperties. Also avoid calling g_slist_length in GetProperties and
12668         GetMethods.
12669
12670 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
12671
12672         * reflection.c: avoid unaligned stores (bug spotted by
12673         Mark Crichton  <crichton@gimp.org>).
12674
12675 2002-09-25  Martin Baulig  <martin@gnome.org>
12676
12677         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
12678         instead of guint64 for addresses and added prologue/epilogue info.
12679
12680 2002-09-25  Martin Baulig  <martin@gnome.org>
12681
12682         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
12683         store line number info.  For the dynamic symbol file, we only need
12684         to provide the JIT generated dynamic line number info for the dynamic
12685         symbol file.
12686
12687 2002-09-25  Martin Baulig  <martin@gnome.org>
12688
12689         * debug-mono-symfile.h: Incremented version number.
12690
12691 2002-09-24  Martin Baulig  <martin@gnome.org>
12692
12693         * class.c (mono_debugger_class_init_func): New global function
12694         pointer variable.
12695         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
12696         call it.
12697
12698         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
12699         function.  This is called via the mono_debugger_class_init_func
12700         hook to add all types to the dynamic type table.
12701         (ves_icall_MonoDebugger_GetType): New interncall to get a class
12702         from its metadata token.
12703
12704         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
12705         New interncall for the debugger.
12706
12707 2002-09-24  Nick Drochak <ndrochak@gol.com>
12708
12709         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
12710         before using it in case it is null.
12711         
12712 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12713
12714         * metadata.c: allow custom modifiers in local var signatures
12715         (bug spotted by Zoltan Varga).
12716
12717 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12718
12719         * class.c: deal with the <Module> class that may have a NULL vtable.
12720         Eliminate warnings.
12721
12722 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
12723
12724         * image.c, image.h: more strong name helpers.
12725         * monosn.c: more work: convert pem keys to cryptoapi format.
12726
12727 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
12728
12729         * string-icalls.c: speedup IndexOf.
12730
12731 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12732
12733         * icall.c: updates from Zoltan.2.Varga@nokia.com.
12734
12735 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
12736
12737         * icall.c: cleanup: use mono_object_domain ().
12738
12739 2002-09-23  Martin Baulig  <martin@gnome.org>
12740
12741         * debug-mono-symfile.c: Improved type support.
12742
12743 2002-09-22  Martin Baulig  <martin@gnome.org>
12744
12745         * debug-mono-symfile.c: Added support for reference types and strings.
12746
12747 2002-09-22  Martin Baulig  <martin@gnome.org>
12748
12749         * debug-mono-symfile.c: Started to work on the type table.
12750
12751 2002-09-21  Martin Baulig  <martin@gnome.org>
12752
12753         * debug-mono-symfile.c: Largely reworked the symbol table format.
12754         The symbol table is now incrementally updated each time a new
12755         method is added.  We're now also using our own magic and version
12756         so that you don't need to recompile all your classes if the
12757         dynamic table changes.
12758         (mono_debug_update_mono_symbol_file): Removed.
12759         (mono_debug_symfile_add_method): New function to add a method.
12760
12761 2002-09-21  Martin Baulig  <martin@gnome.org>
12762
12763         * icall.c
12764         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
12765         New interncall.
12766
12767         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
12768         New interncall to get a method from its metadata token.
12769
12770 2002-09-21  Martin Baulig  <martin@gnome.org>
12771
12772         * debug-mono-symfile.c: Create type table.
12773
12774 2002-09-20  Martin Baulig  <martin@gnome.org>
12775
12776         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
12777
12778 2002-09-20  Martin Baulig  <martin@gnome.org>
12779
12780         * debug-mono-symfile.c: Provide information about params and locals.
12781
12782 2002-09-20  Martin Baulig  <martin@gnome.org>
12783
12784         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
12785         New interncall.
12786
12787         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
12788         interncall to get a method from its metadata token.
12789
12790 2002-09-20  Martin Baulig  <martin@gnome.org>
12791
12792         * debug-mono-symfile.c: Added a few checks for method->header
12793         being non-NULL.  This should never happen, but for the moment
12794         let's use a g_warning() rather than a g_assert().
12795
12796 2002-09-19  Mark Crichton  <crichton@gimp.org>
12797
12798         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
12799         even if support for it isn't present.  Added an #ifdef to fix this.
12800
12801         * socket-io.c: Added checks back for Solaris support.
12802
12803 2002-09-19  Martin Baulig  <martin@gnome.org>
12804
12805         * debug-mono-symfile.c (read_string, write_string): Reflect latest
12806         changes in the symbol file format.
12807
12808 2002-09-18  Martin Baulig  <martin@gnome.org>
12809
12810         * debug-mono-symfile.c: Set version number to 21.
12811
12812 2002-09-18  Dick Porter  <dick@ximian.com>
12813
12814         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
12815         on netbsd.  Fixes bug 30051.
12816
12817 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12818
12819         * reflection.c:
12820         (set_version_from_string): little fix.
12821
12822 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12823
12824         * monosn.c, Makefile.am: added strong name utility.
12825         * reflection.h, reflection.c: implemented delayed signing,
12826         locale, version and hash id assembly attributes.
12827
12828 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
12829
12830         * loader.c, metadata.c: load param attributes in signatures.
12831
12832 2002-09-16  Martin Baulig  <martin@gnome.org>
12833
12834         * debug-mono-symfile.c: Added string table with all method names.
12835
12836 2002-09-14  Martin Baulig  <martin@gnome.org>
12837
12838         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
12839         fast method lookup.
12840
12841 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
12842
12843         * reflection.c: record the public key token of referenced assemblies.
12844
12845 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
12846
12847         * image.c, image.h: added functions to get the strong name and the
12848         public key of an assembly.
12849         * pedump.c: use them.
12850
12851 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
12852
12853         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
12854
12855 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
12856
12857         * marshal.c (mono_marshal_get_managed_wrapper): Added
12858         MONO_TYPE_BOOLEAN 
12859
12860 2002-09-11  Martin Baulig  <martin@gnome.org>
12861
12862         * gc.c: Call GC_unregister_disappearing_link() on all links when
12863         finalizing them, this is necessary to aviod a crash in boehm's
12864         finalize handler.
12865
12866 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
12867
12868         * gc.c: handle GetTarget for finalized objects spotted and fixed by
12869         nick@chemlab.org.
12870
12871 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
12872
12873         * icall.c: implemented MonoType::Module.
12874         * reflection.c, reflection.h: mono_module_get_object () from
12875         Tomi Pakarinen <tomi.pakarinen@welho.com>.
12876
12877 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12878
12879         * icall.c: ignore overridden methods in GetMethods ().
12880         Fix for FieldInfo::SetValue().
12881         * object.c: handle float/double in runtime invoke.
12882
12883 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
12884
12885         * object.c: allow a constructor to be called again on an object.
12886
12887 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
12888
12889         * class.h, class.c: move field layout code to it's own function and
12890         export it. Get an interface id earlier. Move fields in MonoClass
12891         so they are more cache friendly and align the bitfields.
12892         * loader.c: temporary handle get_param_names() for a runtime method.
12893         * reflection.c, reflection.h: more code to handle runtime creation of
12894         types.
12895
12896 2002-09-09  Martin Baulig  <martin@gnome.org>
12897
12898         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
12899         signature with the pinvoke field being set for the actual call.
12900
12901 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
12902
12903         * icall.c: removed some unused icalls. Start of map of glib charsets
12904         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
12905
12906 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
12907
12908         * debug-helpers.c: break infinite loop (found and fixed by
12909         Holger Arnold <harnold@gmx.de>).
12910
12911 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
12912
12913         * icall.c: target may be null in create_delegate.
12914
12915 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12916
12917         * marshal.c: handle a boolean return type.
12918
12919 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
12920
12921         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
12922
12923 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
12924
12925         * gc.c: fix weakreferences.
12926
12927 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
12928
12929         * icall.c: added icall to get default codepage.
12930
12931 2002-09-03  Dick Porter  <dick@ximian.com>
12932
12933         * threads.h: 
12934         * threads.c: Use MonoThread instead of MonoObject where
12935         apropriate.
12936
12937         Store running thread objects in a hash table, so that we have all
12938         the info to hand when waiting for them to finish
12939         (means we don't need OpenThread() any more, so mingw builds should
12940         be fully functional again.)
12941
12942         * verify.c:
12943         * object.h: Added thread ID to MonoThread
12944
12945 2002-09-03  Martin Baulig  <martin@gnome.org>
12946
12947         * icall.c (System.Reflection.Assembly::get_location): New interncall.
12948
12949 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12950
12951         * icall.c: fixed leak in get_temp_path. Thanks lupus.
12952
12953 2002-09-03  Martin Baulig  <martin@gnome.org>
12954
12955         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
12956         argument to store the end address of the disassembled instruction.
12957
12958         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
12959         here from debug-symfile.h.
12960         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
12961         JIT into this struct.
12962         (MonoSymbolFile): Added `char *image_file' field.
12963         (MonoDebugGetMethodFunc): Removed.
12964         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
12965         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
12966         (mono_debug_find_method): New method.
12967
12968         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
12969         create a full symbol file.
12970         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
12971         and static symbol files.
12972         (mono_debug_find_method): The symbol file keeps an internal method hash,
12973         call this to get a MonoDebugMethodInfo from a MonoMethod.
12974
12975         * debug-symfile.[ch]: Removed.
12976
12977 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
12978
12979         * image.c (do_mono_image_open): Remove linker version check.
12980
12981 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
12982
12983         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
12984         wrappers for instance methods.
12985         
12986 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12987
12988         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
12989
12990 2002-08-28  Dick Porter  <dick@ximian.com>
12991
12992         * Makefile.am: Export HOST_CC for w32 builds
12993
12994 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12995
12996         * file-io.c process.c: MonoString are null terminated, no
12997         need for mono_string_to_utf16() anymore.
12998
12999 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13000
13001         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
13002
13003 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
13004
13005         * icall.c, reflection.h: speedup System.MonoType.
13006
13007 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
13008
13009         * reflection.c: allow null as the value of a string argument in
13010         custom attributes constructors.
13011
13012 2002-08-27  Martin Baulig  <martin@gnome.org>
13013
13014         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
13015         `trampoline_address' field.
13016
13017 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
13018
13019         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
13020         check (fixes bug #29486) 
13021
13022 2002-08-27  Martin Baulig  <martin@gnome.org>
13023
13024         * debug-mono-symfile.c: Changed the file format in a way that allows us
13025         open it read-only and to use a specially malloced area for all the
13026         dynamic data.  We can now also generate a symbol file on-the-fly if we're
13027         debugging IL code and there is no MCS generated symbol file for it.
13028
13029 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
13030
13031         * object.c: added a define for a good string and array
13032         creation speedup (not enabled by default because we need to deal with
13033         the synch stuff).
13034
13035 2002-08-26  Martin Baulig  <martin@gnome.org>
13036
13037         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
13038         function to create a dynamic symbol file.  This is used by the
13039         debugger to create a symbol file for IL code on-the-fly.
13040
13041 2002-08-26  Martin Baulig  <martin@gnome.org>
13042
13043         * loader.c (mono_lookup_pinvoke_call): Include the error message
13044         from g_module_error() in the error message.
13045
13046 2002-08-24  Martin Baulig  <martin@gnome.org>
13047
13048         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
13049         function to update the symbol file.  The symbol file is mmap()ed
13050         writable, but private.  This allows us to install the symbol file
13051         together with the assembly.
13052
13053 2002-08-24  Martin Baulig  <martin@gnome.org>
13054
13055         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
13056         but they can read the new symbol file format which mcs is now creating.
13057
13058         * debug-symfile.c (mono_debug_find_source_location): Moved to
13059         debug-mono-symfile.c; this is now operating on the new symbol file.
13060
13061 2002-08-23  Martin Baulig  <martin@gnome.org>
13062
13063         * debug-helpers.c (mono_method_desc_from_method): New function to get
13064         a MonoMethodDesc from a MonoMethod.
13065
13066 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
13067
13068         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
13069         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
13070
13071 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
13072
13073         * string-icalls.[ch]: make helper methods static.
13074
13075 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13076
13077         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
13078         types to it and to SetValueInternal.
13079
13080         * object.c: Moved handle_enum label to its proper place. This was the
13081         f... bug! ;-)
13082
13083         This time i compiled mcs and gtk-sharp and they both work.
13084
13085 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13086
13087         * icall.c: reverted partially my previous patch until 
13088         object.c:set_value handles enums correcly.
13089
13090 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13091
13092         * icall.c:
13093         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
13094         (ves_icall_System_Environment_get_MachineName): removed warning when
13095         compiling under cygwin.
13096
13097 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
13098
13099         * object.c: fixed field_get_value() for reference types.
13100
13101 2002-08-22  Dick Porter  <dick@ximian.com>
13102
13103         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
13104         Don't free a buffer while it's still needed.  Patch from Jonathan
13105         Liger <Jonathan.liger@wanadoo.fr>
13106
13107 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
13108
13109         * icall.c (ves_icall_System_Environment_get_Platform): Add new
13110         internal call.
13111
13112 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
13113
13114         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
13115         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
13116
13117         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
13118         we call unmanaged code which throws exceptions.
13119
13120 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13121
13122         * appdomain.h: added per-domain entry_assembly.
13123         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
13124         arguments.
13125         * icall.c: Assembly::GetEntryAssembly icall.
13126         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
13127         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
13128
13129 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13130
13131         * appdomain.h, gc.c: added mono_domain_finalize ().
13132
13133 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13134
13135         * object.c:
13136         (mono_print_unhandled_exception): changed g_warning by g_printerr
13137         because g_log has a 1024 characters limit (yeah, i got a big stack
13138         trace). Don't print exception name, that should be in ToString 
13139         returned string.
13140
13141 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13142
13143         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
13144         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
13145
13146 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13147
13148         * object.c:
13149         (mono_print_unhandled_exception): after previous commit, i realized
13150         that MS calls ToString on the exception. I changed this function to
13151         do that. This way we get stack_trace for free.
13152
13153 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13154
13155         * object.c:
13156         (mono_print_unhandled_exception): invoke Message property instead of
13157         getting 'message' field from Exception. Don't allocate memory for
13158         'trace' and 'message' if not needed.
13159
13160 2002-08-18  Dick Porter  <dick@ximian.com>
13161
13162         * unicode.c: Fix asserts to match Encoder.cs checks
13163
13164 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13165
13166         * marshal.c: fix unaligned store issue and a few wrong
13167         opcode argument types.
13168
13169 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13170
13171         * icall.c: added GetUninitializedObjectInternal internal call.
13172
13173 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
13174
13175         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
13176         to the right domain.
13177
13178 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
13179
13180         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
13181
13182         * class.c (class_compute_field_layout): set blittable to false for Strings
13183
13184         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
13185
13186 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13187
13188         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
13189         first chunk of code to create types at runtime. Code to
13190         handle ReflectedType/DeclaringType. Make reflection handles
13191         domain specific.
13192
13193 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
13194
13195         * class.c: set correct name in arrays.
13196
13197 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
13198
13199         * appdomain.c (mono_domain_transfer_object): make it work with
13200         valuetypes. bug fixes.
13201
13202 2002-08-12  Dick Porter  <dick@ximian.com>
13203
13204         * object.h: Rename some parameters to avoid c++ keywords (Patch
13205         from Joseph Wenninger <kde@jowenn.at>)
13206
13207 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
13208
13209         * icall.c: added icall to implement Assembly.GetFile*.
13210
13211 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13212
13213         * reflection.h, reflection.c: code to embed managed resources.
13214
13215 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
13216
13217         * class.c: move all the type size stuff into
13218         class_compute_field_layout().
13219
13220 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13221
13222         * class.c: ensure enums have always the correct instance size.
13223         * unicode.c: remove wrong assert.
13224
13225 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
13226
13227         * assembly.c: fix mem corruption issue.
13228         * image.h, image.c: added mono_image_get_resource () to access
13229         managed resources.
13230         * icall.c: implemented Assembly.EntryPoint property and some
13231         Managed Resources related internalcalls.
13232
13233
13234 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13235
13236         * image.c, image.h: impemented mono_image_get_entry_point ().
13237         * appdomain.c: use mono_image_get_entry_point.
13238
13239 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13240
13241         * reflection.c: support the object type argument when loading
13242         custom attributes.
13243
13244 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
13245
13246         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
13247         String as return type.
13248
13249 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
13250
13251         * reflection.c: fix encoding of named args for custom attrs to match
13252         the ms implementation. Read them back when instantiating custom
13253         attributes.
13254
13255 2002-08-02  Radek Doulik  <rodo@ximian.com>
13256
13257         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
13258         by Dietmar as quick fix
13259         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
13260         16 as stack size, used on more places as quick fix before Dietmar
13261         will fix it properly
13262
13263 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13264
13265         * object.h, object.c: added accessors for fields and properties.
13266
13267 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13268
13269         * class.c, class.h: made mono_class_get_field_from_name ()
13270         loop on parent types.
13271         Added mono_class_get_property_from_name ().
13272
13273 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13274
13275         * class.c, class.h: move the code to setup the type vtable in its own
13276         function so that it can be reused also for types created at runtime.
13277         Eliminate the "class" identifier from the header file.
13278         * reflection.c: setup the vtable for enums so that we can create
13279         objects for use in SetConstant ().
13280
13281 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
13282
13283         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
13284         instead of the delegate itself as this pointer (bug #28383)
13285
13286 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
13287
13288         * marshal.c (mono_marshal_get_managed_wrapper): added return type
13289         conversions.
13290
13291 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13292
13293         * loader.c: don't set the pinvoke bit on icalls.
13294
13295 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
13296
13297         * debug-helpers.c (mono_method_full_name): only print a number to
13298         indicate wrapper type (so that the output is more readable in traces).
13299
13300 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
13301
13302         * class.c (mono_class_init): include method override patch from Paolo
13303
13304 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
13305
13306         * icall.c: fixed GetTypeCode().
13307
13308 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
13309
13310         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
13311         use real delegate invoke function to make it work with multicast
13312         delegates (fix bug# 28291).
13313
13314 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13315
13316         * object.c: load constant strings.
13317
13318 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
13319
13320         * reflection.c: no magic numbers.
13321         * tabledefs.h: security action enum.
13322
13323 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
13324
13325         * assembly.c: fix possible memory corruption.
13326
13327 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13328
13329         * reflection.h, reflection.c: added support for linking resources.
13330         * verify.c: check we have an updated corlib.
13331
13332 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
13333
13334         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
13335         string arrays.
13336         (mono_marshal_string_array): null terminate unmanaged string arrays.
13337         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
13338
13339 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13340
13341         * icall.c: Type.GetType () can now return also types from the
13342         calling assembly.
13343
13344 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
13345
13346         * loader.h, loader.c: stack walking support.
13347         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
13348         GetCallingAssembly.
13349
13350 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
13351
13352         * marshal.c: added optimisations for blittable types 
13353
13354         * class.c (mono_array_class_get): do not set blittable attribute on arrays
13355         (mono_class_setup_mono_type): set blittable attribute for single
13356         and double.
13357
13358         * marshal.c (mono_string_utf8_to_builder): impl.
13359         (mono_string_builder_to_utf8): impl.
13360         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
13361
13362 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
13363
13364         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
13365         (mono_marshal_get_managed_wrapper): impl. byref types
13366
13367 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13368
13369         * icall.c:
13370         (search_method): don't display debug message. 
13371
13372 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
13373
13374         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
13375
13376 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
13377
13378         * appdomain.c: set the missing filename when throwing exception.
13379
13380 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
13381
13382         * metadata.c (mono_type_size): code cleanup
13383         (mono_type_stack_size): removed some test code
13384
13385 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
13386
13387         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
13388         mono_get_exception_file_not_found now.
13389
13390         * exception.c (mono_exception_from_name_two_strings): New version
13391         that will call a constructor with two string arguments. 
13392         (mono_get_exception_file_not_found): New helper routine, used to
13393         report file-not-found errors.
13394
13395 2002-07-20  Dick Porter  <dick@ximian.com>
13396
13397         * process.h:
13398         * process.c: Pass file handles to CreateProcess
13399         
13400         * icall.c:
13401         * file-io.h:
13402         * file-io.c: Implemented CreatePipe
13403
13404 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
13405
13406         * metadata.c (mono_get_param_info): set alignment for value types
13407
13408 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13409
13410         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
13411         Constify mono_domain_assembly_open().
13412         * loader.c: handle null namespace in icalls.
13413
13414 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
13415
13416         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
13417         (emit_str_to_ptr_conv): marshal object as structs
13418
13419         * metadata.c (mono_type_to_unmanaged): marshal object as structs
13420
13421         * marshal.c (mono_marshal_get_runtime_invoke): support value types
13422
13423 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
13424
13425         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
13426         (mono_marshal_get_native_wrapper): we an now return value types
13427
13428 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13429
13430         * verify.c: more checks implemented.
13431
13432 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
13433
13434         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
13435         (fix bug #27695)
13436         (mono_marshal_get_native_wrapper): allow byref arguments
13437         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
13438         impl. PtrToStringXXX methods
13439         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
13440         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
13441         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
13442         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
13443         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
13444
13445 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13446
13447         * reflection.c: fix buglet in parsing an assembly name.
13448
13449 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
13450
13451         * marshal.c (emit_ptr_to_str_conv): first impl.
13452
13453 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
13454
13455         * object.c, class.h: cache the vtable in the class as suggested by
13456         vargaz@freemail.hu (Zoltan Varga).
13457
13458 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13459
13460         * class.h, loader.c: added mono_field_from_token().
13461         * verify.c: first cut of type checking code.
13462
13463 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
13464
13465         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
13466
13467 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
13468
13469         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
13470         (fix bug #27782)
13471         (mono_marshal_get_remoting_invoke): impl.
13472         (mono_delegate_begin_invoke): impl.
13473         (mono_mb_emit_save_args): impl.
13474         (mono_delegate_end_invoke): impl.
13475         (mono_marshal_get_delegate_begin_invoke):
13476         (mono_marshal_get_delegate_end_invoke):
13477         (mono_marshal_get_delegate_invoke): generate a special name for
13478         those methods (including the signature) and associate them whith
13479         the delegate class. 
13480
13481 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
13482
13483         * reflection.[ch]: 
13484         (mono_reflection_type_from_name): now it has a MonoImage parameter
13485         which is used as the default image to search the type in. If the image
13486         is NULL or getting the type from it fails, it defaults to corlib.
13487
13488         * icall.c: changed 1 call to mono_reflection_type_from_name to match
13489         new parameter.
13490
13491 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13492
13493         * reflection.c: update the parameter table index.
13494
13495 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13496
13497         * domain.c: don't include the mark byte in the string hash.
13498
13499 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13500
13501         * icall.cs: icall for Type.GetTypeCode ().
13502         * verify: a couple of fixes and disabled local initialization checks.
13503
13504 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
13505
13506         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
13507
13508         * debug-helpers.c (mono_method_full_name): print the type of the
13509         runtime wrapper
13510
13511         * metadata.c (mono_signature_hash): a hash function for signatures
13512         (mono_signature_hash): better hash algorithm
13513
13514         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
13515
13516         * debug-helpers.c (mono_method_full_name): this can now generate
13517         method names with signatures
13518
13519         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
13520         method dont have this pointers.
13521
13522 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
13523
13524         * reflection.c: fixup typebuilder tokens.
13525         * image.c: fix buglet.
13526         * marshal.h: remove whitespace.
13527         * metadata.h, metadata.c: reinstate code that was removed.
13528         * verify.c: handle catch directives and fix another couple of bugs.
13529
13530 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
13531
13532         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
13533         (mono_marshal_get_native_wrapper): make it comp. with the old code
13534         (mono_marshal_get_native_wrapper): support boolean
13535         (mono_marshal_get_managed_wrapper): support more types
13536
13537 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
13538
13539         * class.c (class_compute_field_layout): compute class->blittable attribute.
13540
13541 2002-07-09  Dick Porter  <dick@ximian.com>
13542
13543         * threads.c: Make the thread cleaning up cope with threads that
13544         call ExitThread()
13545
13546 2002-07-08  Radek Doulik  <rodo@ximian.com>
13547
13548         * reflection.c (method_encode_code): use non-translated values to
13549         compute finally_start, this fixes exception handling on ppc, yay!
13550
13551         * decimal.h (struct signscale): fix endianess
13552
13553 2002-07-07  Radek Doulik  <rodo@ximian.com>
13554
13555         * reflection.c: swap box_val and not val
13556
13557 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
13558
13559         * reflection.c, reflection.h: handle full assembly info in type name.
13560         Handle Type arguments when loading custom attributes.
13561         * icall.c: updated to use new mono_reflection_type_from_name () method.
13562
13563 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13564
13565         * loader.c:
13566         (method_from_memberref): also print assembly name when method not found.
13567
13568 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13569
13570         * icall.c:
13571         (ves_icall_TypeGetProperties): fixed bug #27473. 
13572
13573 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13574
13575         * reflection.c: display image name and token when cannot find the
13576         .ctor for an attribute.
13577
13578 2002-07-05  Martin Baulig  <martin@gnome.org>
13579
13580         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
13581
13582 2002-07-04  Dick Porter  <dick@ximian.com>
13583
13584         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
13585         compile on mingw.  This will cause mingw builds to not wait for
13586         subthreads to terminate after the main thread does.  I've lodged a
13587         bug with the mingw developers for them to wrap OpenThread().
13588
13589 2002-07-03  Dick Porter  <dick@ximian.com>
13590
13591         * threads.c: Store thread IDs instead of handles, because
13592         GetCurrentThread() returns a pseudohandle and therefore stores
13593         useless values.  mono_thread_cleanup() continues checking the
13594         array of threads until it is empty, to cope with subthreads
13595         spawning new threads after the main thread has finished.
13596
13597         * profiler.h:
13598         * profiler.c:
13599         * profiler-private.h: Pass the thread ID to thread profiler
13600         functions, instead of a handle
13601
13602 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
13603
13604         * verify.c: fixes to make it more usable.
13605         * pedump.c: added --verify code to verify IL code in an assembly.
13606
13607 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13608
13609         * reflection.c: turn errors into warnings to allow compiling corlib.
13610
13611 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
13612
13613         * reflection.c: add special cases to compile corlib.
13614
13615 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13616
13617         * reflection.c: handle properties with only a set method.
13618
13619 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
13620
13621         * opcodes.h: add enum with opcodes in opval order.
13622
13623 2002-07-01  Dick Porter  <dick@ximian.com>
13624         
13625         * object.h:
13626         * object.c (mono_runtime_run_main): Removed unneeded argument
13627
13628 2002-06-28  Martin Baulig  <martin@gnome.org>
13629
13630         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
13631
13632 2002-06-27  Dick Porter  <dick@ximian.com>
13633
13634         * threads.c: Store the handle in both the parent thread and in the
13635         subthread, to minimise the time between starting a new thread and
13636         storing its ID.
13637
13638 2002-06-26  Dick Porter  <dick@ximian.com>
13639
13640         * appdomain.c (mono_runtime_cleanup): Close the socket library
13641         after all the threads have finished, not before
13642
13643 2002-06-26  Martin Baulig  <martin@gnome.org>
13644
13645         * debug-symfile.c (mono_debug_find_source_location): Added
13646         `guint32 *line_number' argument.  If it's not NULL, store the line number
13647         there and return the file name without the line number.
13648
13649 2002-06-25  Dick Porter  <dick@ximian.com>
13650
13651         * icall.c:
13652         * process.h:
13653         * process.c: Process forking and other support functions
13654
13655 2002-06-25  Dick Porter  <dick@ximian.com>
13656
13657         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
13658         things dont happen when the image is closed.
13659         (mono_image_lookup_resource): Walk the resource section looking
13660         for a particular entry
13661
13662         * cil-coff.h: PE resource section decoding
13663
13664 2002-06-25  Dick Porter  <dick@ximian.com>
13665         
13666         * assembly.h:
13667         * assembly.c: 
13668         (mono_assembly_foreach): Accessor functions to walk the list of
13669         loaded assemblies
13670         (mono_assembly_set_main):
13671         (mono_assembly_get_main): Process methods need to know which
13672         assembly is the "main" one
13673
13674         * object.c (mono_runtime_run_main): Record the main assembly
13675
13676         * debug-helpers.c: Fix typo
13677
13678 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
13679
13680         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
13681         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
13682
13683 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13684
13685         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
13686
13687 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
13688
13689         * image.c (do_mono_image_open): Initialize reference count,
13690         otherwise we leak the MonoImage.
13691
13692 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13693
13694         * reflection.c: small tweak to handle self-hosting.
13695
13696 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13697
13698         * reflection.c: fix type name parse code.
13699
13700 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13701
13702         * reflection.c: break out of the loop.
13703         * image.c: special case corlib.
13704
13705 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13706
13707         * reflection.c: add all the custom attrs at the end to ensure the
13708         ctors have been properly initialized when the attributes are defined
13709         in the current assembly.
13710
13711 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13712
13713         * reflection.c: handle correctly multiple-nested types.
13714
13715 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
13716
13717         * row-indexes.h: fix typos.
13718         * reflection.c: adjust for typos and fix method_def_or_ref
13719         encoding in MethodImpl table.
13720
13721 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
13722
13723         * reflection.c: fix entry point patching (thanks Serge!).
13724
13725 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
13726
13727         * verify.c: add check for System.Exception
13728
13729 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13730
13731         * image.c, class.c: minifix for code just c&p'ed.
13732         * reflection.c: warning fix.
13733         * object.h, loader.h, domain.c: load also StringBuilder.
13734
13735 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13736
13737         * marshal.h, marshal.c: some support code to handle complex marshaling.
13738
13739 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13740
13741         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
13742         Better signatures with vtable error dump.
13743
13744 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
13745
13746         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
13747
13748 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
13749
13750         * icall.c (ves_icall_Type_GetField): impl.
13751
13752 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13753
13754         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
13755         to retrieve a marshal description blob for a field or param.
13756
13757 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13758
13759         * reflection.h, reflection.c: change order of nested type emission
13760         to avoid table corruption. The NestedTypes table is sorted.
13761         * icall.c: change order of GetConstructor results to workaround mcs bug.
13762
13763 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
13764
13765         * reflection.h, reflection.c: handle field and param marshal
13766         information.
13767
13768 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13769
13770         * icall.c, marshal.c marshal.h: more Marshal class implementation.
13771
13772 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13773
13774         * reflection.c: fix call convention.
13775
13776 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13777
13778         * reflection.h, reflection.c: mono_image_get_memberref_token()
13779         takes a type instead of a class, now. Added
13780         mono_image_get_array_token() to create tokens for the special
13781         multi-dim array methods.
13782
13783 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
13784
13785         * assembly.c: handle modules (no assembly table). Split
13786         loading references in its own function.
13787         * class.c: handle moduleref resolution scope.
13788         * image.c, image.h: cache module name in image.
13789
13790 2002-06-07  Martin Baulig  <martin@gnome.org>
13791
13792         * reflection.c (mono_image_get_type_info): Only add a class layout entry
13793         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
13794
13795 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13796
13797         * icall.c: more signature fixes that used uint instead of int.
13798
13799 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13800
13801         * reflection.c: fixed signature of field refs.
13802
13803 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
13804
13805         * class.c, reflection.c: handle typerefs of nested types
13806         (both on read and when writing files).
13807
13808 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
13809
13810         * icall.c: fix method signatures that tried to workaround the previous
13811         typo, d'oh!
13812
13813 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
13814
13815         * debug-helpers.c: fix typo.
13816
13817 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
13818
13819         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
13820         rewrote the PE/COFF writing code (our programs are understood by the
13821         ms runtime, now).
13822
13823 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13824
13825         * gc.c, gc.h, icall.c: weakreference support.
13826
13827 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13828
13829         * Makefile.am, mono-config.c: use $(sysconfdir).
13830
13831 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13832
13833         * icall.c: changed default precision of Double.ToString() to 15.
13834         Fixed memory leak. Unified with Single.ToString.
13835
13836 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
13837
13838         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
13839
13840 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13841
13842         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
13843         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
13844         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
13845         and myself.
13846
13847 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13848
13849         * debug-symfile.c, sysmath.c: yet more compilation fixes.
13850
13851 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13852
13853         * reflection.c, socket-io.c: more compilation fixes.
13854
13855 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13856
13857         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
13858         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
13859         unicode.c: warning and compiler compatibility fixes.
13860
13861 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13862
13863         * class.h, metadata.c: fixed warnings/compilation errors.
13864
13865 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13866
13867         * Makefile.am, mono-config.c, mono-config.h: configuration file
13868         support routines.
13869         * loader.c, loader.h: make Dll mapping configurable at runtime in the
13870         config file. Export methods to insert and lookup mappings.
13871
13872 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13873
13874         * reflection.c: handle types and boxed objects in custom attr
13875         constructors.
13876
13877 2002-05-30  Martin Baulig  <martin@gnome.org>
13878
13879         * debug-symfile.c
13880         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
13881
13882 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
13883
13884         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
13885         to lookup the implmap row for a P/Invoke method.
13886         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
13887         P/Invoke method from the runtime on an as needed basis.
13888
13889 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
13890
13891         * metadata.c (mono_metadata_parse_signature): impl.
13892
13893 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13894
13895         * class.c: handle .pack directive.
13896
13897 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13898
13899         * object.c: initialize static fields with RVA data.
13900
13901 2002-05-25  Martin Baulig  <martin@gnome.org>
13902
13903         * debug-symfile.c
13904         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
13905
13906 2002-05-24  Martin Baulig  <martin@gnome.org>
13907
13908         * debug-symfile.c
13909         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
13910         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
13911         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
13912
13913 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
13914
13915         * object.c: special case string ctros in invoke.
13916         * gc.c: silly whitespace changes.
13917
13918 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
13919
13920         * threadpool.[ch]: impl. a threadpool that can
13921         be used by mint and mono.
13922
13923 2002-05-22  Martin Baulig  <martin@gnome.org>
13924
13925         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
13926         The first argument is now a `MonoReflectionModuleBuilder *', the return
13927         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
13928         `methods' field to get the method builder.  The `token' argument is the
13929         unfixed token.
13930
13931         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
13932         invalid characters instead of g_assert_not_reached()ing.  This seems
13933         to be the behaviour of mscorlib.
13934
13935 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
13936
13937         * object.c (mono_runtime_invoke_array): applied patch from Rachel
13938         Hestilow to fix bug #25104
13939
13940 2002-05-21  Martin Baulig  <martin@gnome.org>
13941
13942         * debug-symfile.c (mono_debug_find_source_location): New function.
13943         Looks up an IL offset in the line number table and returns the source
13944         location as a string.
13945
13946 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13947
13948         * icall.c:
13949         (mono_double_ToStringImpl): changed %f by %g until we have something
13950         better.
13951
13952 2002-05-21  Nick Drochak  <ndrochak@gol.com>
13953
13954         * icall.c : Use different name for Math.Pow's icall.  Needed to check
13955         parameters first in C#.
13956
13957 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13958
13959         * icall.c, reflection.h: added icall to get info about an event.
13960
13961 2002-05-20  Radek Doulik  <rodo@ximian.com>
13962
13963         * object.c (mono_value_box): don't use memcpy for boxing on BIG
13964         endian
13965         (mono_value_box): don't use memcpy for small sizes on
13966         architectures with unaligned access
13967
13968 2002-05-20  Martin Baulig  <martin@gnome.org>
13969
13970         * reflection.c (mono_reflection_setup_internal_class): Don't crash
13971         if `tb->parent == NULL'.
13972         (mono_reflection_create_internal_class): New function.  This is
13973         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
13974         for enum types.
13975
13976         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
13977         New interncall.
13978
13979 2002-05-19  Martin Baulig  <martin@gnome.org>
13980
13981         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
13982         argument to get the length, don't default to the array length.
13983
13984 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
13985
13986         * assembly.c (mono_assembly_setrootdir): New function used to
13987         override the MONO_ASSEMBLIES directory.
13988
13989 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13990
13991         * icall.c: ValueType_GetHashCode() initialize local var.
13992
13993 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13994
13995         * reflection.c: sort custom attributes table.
13996
13997 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
13998
13999         * reflection.c: support named args in custom attributes (write support).
14000
14001 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
14002
14003         * reflection.c: fix finally position calculation.
14004
14005 2002-05-15  Radek Doulik  <rodo@ximian.com>
14006
14007         * reflection.c: fixed endianess at many places
14008
14009         * icall.c (ves_icall_InitializeArray): comment out debug msg
14010
14011 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
14012
14013         * object.c (mono_unhandled_exception): new function to handle
14014         unhandled exceptions.
14015         (mono_unhandled_exception): call the UnhandledException event.
14016         (mono_runtime_delegate_invoke): impl.
14017
14018 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
14019
14020         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
14021         returns the RVA, not the direct pointer to the data. Handle the case
14022         when the class size is fixed.
14023
14024 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14025
14026         * reflection.c: fix some endianess issues.
14027
14028 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
14029
14030         * object.c (mono_runtime_invoke): is now able to catch exceptions.
14031
14032         * threads.c (mono_thread_init): added a callback which is invoked
14033         at thread start.
14034
14035 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
14036         
14037         * icall.c: make GetHashCode return non-negative values.
14038
14039 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
14040
14041         * object.c, icall.c, gc.c: revert to address-based hashcode.
14042
14043 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
14044
14045         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
14046
14047 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14048
14049         * icall.c, class.c: special case <Module>.
14050
14051 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
14052
14053         * icall.c: fix bug in GetNow().
14054
14055 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
14056
14057         * object.c (mono_runtime_class_init): make sure that we call all
14058         static class constructors.
14059
14060 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14061
14062         * reflection.c: sort methodsemantics table.
14063
14064 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14065
14066         * reflection.h, reflection.c: honour init locals setting.
14067
14068 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
14069
14070         * icall.c: copied Double ToStringImpl for Single ToStringImpl
14071
14072 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14073
14074         * reflection.c: support ContructorBuilders in attribute blob creation.
14075
14076 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14077
14078         * reflection.c: some changes to build a binary that can be run
14079         directly in windows.
14080
14081 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
14082
14083         * loader.c: print a big message when an icall can't be found.
14084
14085 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14086
14087         * string-icalls.c: fix bug 24248.
14088
14089 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
14090
14091         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
14092         icall.c, reflection.h: separate assembly loading by pathname and by
14093         assembly name. Use the MONO_PATH env var to search for assemblies.
14094
14095 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14096
14097         * assembly.c, image.h: add some support for assemblies
14098         with multiple modules.
14099         * class.c, class.h: export mono_class_from_typeref().
14100         * loader.c: remove duplicated code and use mono_class_from_typeref(),
14101         instead.
14102
14103 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14104
14105         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
14106         documentation says (the ECMA one is correct).
14107
14108 2002-05-02  Dick Porter  <dick@ximian.com>
14109
14110         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
14111         Don't name the synchronisation mutex.
14112
14113 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
14114
14115         * rand.c
14116         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
14117         Make the prototypes match.
14118         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
14119         Same.
14120
14121         * icall.c
14122         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
14123         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
14124         all systems have tm.tm_zone, so use strftime() with %Z to print
14125         the timezone abreviation into a temp string.
14126
14127         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
14128         rather than mono_array_addr() on a MonoString on Big Endian
14129         machines.
14130
14131 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
14132
14133         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
14134         fix bug 24041
14135
14136 2002-04-30  Dick Porter  <dick@ximian.com>
14137
14138         * socket-io.c: Cope with SOCKET being an integer rather than a
14139         pointer now.
14140
14141         * threads.c: Added Thread_free_internal, to deal with thread
14142         handle cleanup.  Moved calls to handle_store() and handle_remove()
14143         to start_wrapper(), so each can only be called once.  Allocate
14144         synchronisation blocks with GC_malloc(), and use GC finalisation
14145         to close the handles.
14146
14147         * icall.c: added System.Threading.Thread::Thread_free_internal
14148
14149 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14150
14151         * icall.c: support Environment.Exit, CommandLineArgs().
14152
14153 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14154
14155         * object.c, object.h: added mono_runtime_run_main () and
14156         mono_runtime_get_main_args () for use in System.Environment.
14157
14158 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14159
14160         * gc.c: fix thinko, enable actual finalization since the jit is now
14161         fixed.
14162
14163 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14164
14165         * gc.c, object.c: take into account that an object may be offset wrt the address
14166         returned by GC_malloc().
14167
14168 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
14169
14170         * image.c: handle files without entries in the assembly table (modules).
14171
14172 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
14173
14174         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
14175         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
14176         allowed to be null when it's System.Object class setup.
14177
14178 2002-04-27  Martin Baulig  <martin@gnome.org>
14179
14180         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
14181         if `tb->parent == NULL' rather than crashing.
14182
14183 2002-04-28  Nick Drochak  <ndrochak@gol.com>
14184
14185         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
14186         calling acos() where asin() should have been called.
14187
14188 2002-04-26  Martin Baulig  <martin@gnome.org>
14189
14190         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
14191         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
14192         there's a subdirectory called `System', but we don't want to read that
14193         subdirectory as an assembly.
14194
14195 2002-04-25  Martin Baulig  <martin@gnome.org>
14196
14197         * debug-symfile.c: Reflect latest MonoString changes.
14198
14199 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14200
14201         * rand.c, rand.h: instance method icalls need to have an explicit
14202         this pointer as first argument in the C implementation.
14203
14204 2002-04-25  Nick Drochak <ndrochak@gol.com>
14205
14206         * icall.c: Fix typo in map for GetNonZeroBytes
14207
14208 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
14209
14210         * string-icalls.c : String does now passes unit tests without any 
14211         errors, the following changes has been made:
14212         
14213         Implemented replace methods.
14214         Renaming of methods to (try) follow the standard.
14215         Fixed compare ordinal
14216         Made all memory allocated directly to function instead of via icall function.
14217         Small performance fix in is_in_array function
14218                         
14219  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
14220
14221         c (mono_string_Internal_ctor_charp_int_int):
14222         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
14223         sindex < 0, throw ArgumentOutOfRangeException instead of
14224         ArgumentNullException.
14225
14226         Added new check for length == 0, however
14227         I need to make it return String.Empty from the C code.
14228         
14229         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
14230         that calculate the length for us here.
14231         
14232         (mono_string_Internal_ctor_sbytep_int_int): Replaced
14233         mono_string_new_utf16 with mono_string_new, since value is utf8.
14234
14235 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14236
14237         * object.c: register the object for finalization if needed.
14238         Allocate one more char in the string for the terminating 0 char.
14239
14240 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14241
14242         * class.c, class.h, image.c: check if a type implemenst a destructor.
14243         Use the proper key for array class lookups.
14244         * icall.c: register the icalls in the System.GC class.
14245         * gc.c, gc.h: GC-related functions and icalls.
14246
14247 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14248
14249         * icall.c:
14250         * socket-io.c:
14251         * unicode.c: free some strings gotten from mono_string_to_utf8 and
14252         changed a couple of free () by g_free ().
14253
14254         * decimal.c: one-liner in the comments for decimal2string ().
14255
14256 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
14257
14258         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
14259
14260 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
14261
14262         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
14263         * object.c (mono_runtime_invoke_array) : handle null in params
14264
14265 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
14266
14267         * string-icalls.c: fixed bug in split (one off bug)
14268
14269 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
14270
14271         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
14272         * icalls.c: added String::Equals as internal method
14273
14274 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
14275
14276         * threads.c: fixed bug in the double interlocked functions
14277
14278 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
14279
14280         * threads.c: implemented all of the new interlocked icalls.
14281         * string-icalls.c: fix a bug in insert.
14282         * icalls.c: added the icalls for interlocked, removed old string functions.
14283         
14284 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14285
14286         * loader.c: fix off-by-one error when reading argument names.
14287
14288 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14289
14290         * profiler.c: win32 counter implementation (untested).
14291         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
14292         (the latter needs testing and more complete impl. from win32 folks).
14293
14294 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
14295
14296         * object.c: mono_array_new_full workaround mono_array_class_get
14297         problem.
14298
14299 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
14300
14301         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
14302         * object.h (mono_string_chars): Changed casting type.
14303
14304 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
14305
14306         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
14307                            method signatures to use gunichar2 instead of gint16.
14308
14309 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
14310
14311         * object.h, object.c: domain-specific versions of mono_object_new and
14312         mono_array_new.
14313
14314 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
14315
14316         * object.c: changed String layout
14317
14318         * string-icalls.c (mono_string_Internal_ctor_chara): added
14319         internal string constructors.
14320
14321 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
14322
14323         * threads.c: pass 'this' to the thread start routine.
14324
14325 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14326
14327         * string-icalls.c: fix IndexOf and LastIndexOf. Now
14328         InternalCompareStr don't call twice mono_string_cmp_char for the last
14329         character. Improved performance in mono_string_cmp_char.
14330
14331 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14332
14333         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
14334         code into its own library: libmonoruntime.
14335
14336 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
14337
14338         * object.h, object.c: changed array format so that szarrays do not
14339         require a bounds structure.
14340         * icall.c, appdomain.c: support for new szarray format.
14341
14342 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
14343
14344         * metadata.c: compare also the retuns type when comparing signatures:
14345         we didn't do this as an optimization since really overloaded methods
14346         must differ also in the arguments, but this doesn't work with
14347         low-level IL code (or when using explicit conversion operators: see
14348         bug#23498 for an example).
14349
14350 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14351
14352         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
14353
14354 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14355
14356         * icall.c: make MonoType::GetElementType its own icall.
14357
14358 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14359
14360         * icall.c: remove MonoMethod_get_Name().
14361         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
14362         object.
14363
14364 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
14365
14366         * string-icalls.c: optimized a few methods.
14367
14368 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
14369
14370         * icall.c: added all new string internal calls
14371         * string-icalls.c: added, new string internal call implementation.
14372         * object.c: added mono_string_new_size for allocating a string a size
14373
14374 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
14375
14376         * object.c (mono_object_isinst): use the same code as in the
14377         optimized x86 version.
14378
14379 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14380
14381         * profiler.c: TSC-based timer code (faster and more accurate).
14382         Not hooked up in configure, yet (set USE_X86TSC to 1).
14383
14384 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
14385
14386         * profiler.c, profiler.h: track time spent compiling methods.
14387         * threads.c: track thread creation/destruction.
14388
14389 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
14390
14391         * profiler.c, profiler.h, profiler-private.h: profiling interface
14392         and sample implementation. Moved here so that it can be used also by
14393         the jit.
14394
14395 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
14396
14397         * reflection.c, reflection.h: keep types and other handles separate in
14398         the hash tables for referred tokens. Add guid for modules.
14399
14400 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14401
14402         * assembly.c: fix bugs found with valgrind.
14403         * metadata.h, metadata.c: added mono_metadata_guid_heap().
14404
14405 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
14406
14407         * threads: added icall support for getting current domain for
14408                    the thread.
14409  
14410 2002-04-13  Martin Baulig  <martin@gnome.org>
14411
14412         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
14413         (MonoDebugVarInfo): Added `index' field for register based addresses.
14414         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
14415         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
14416         `MonoDebugVarInfo *params' and `guint32 this_offset' with
14417         `MonoDebugVarInfo *this_var'.
14418
14419         * debug-symfile.c (relocate_variable): New static function to write
14420         a location description for a local variable or method parameter.
14421
14422 2002-04-12  Martin Baulig  <martin@gnome.org>
14423
14424         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
14425         stack offset and begin/end scope address of a local variable.
14426         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
14427         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
14428         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
14429
14430         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
14431         Added new relocation types for start/end scope of a local variable.
14432
14433 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14434
14435         * object.h: add mono_object_domain() macro.
14436         * reflection.c: handle typespecs.
14437         * icall.c: MonoMethod::get_Name() implementation.
14438
14439 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14440
14441         * icall.c: String::GetHashCode() icall implementation.
14442
14443 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14444
14445         * icall.c: String::IndexOfAny icall.
14446         * object.c, object.h: make array->max_length more useful.
14447         Intrduced mono_object_class() and mono_string_length() macros.
14448
14449 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14450
14451         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
14452         instead of g_unichar_isdigit.
14453
14454 2002-04-11  Nick Drochak  <ndrochak@gol.com>
14455
14456         * icall.c: Implement a simple Double.ToString().
14457
14458 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14459
14460         * appdomain.h: only io-layer.h is supposed to be included.
14461         * icall.c: explicitly import environ. Fix warning.
14462
14463 2002-04-10  Nick Drochak  <ndrochak@gol.com>
14464
14465         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
14466                 return true even if it's not Daylight Savings time.
14467                 Only return false for the case where the function isn't
14468                 implemented for a plaform (read Windows).
14469
14470 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14471
14472         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
14473         data with a mutex.
14474
14475 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
14476
14477         * mempool.c (mono_mempool_alloc): only use g_malloc when
14478         absolutely necessary.
14479
14480 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
14481
14482         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
14483
14484         * class.c (mono_class_vtable): use domain mempool to allocate vtable
14485         (mono_class_proxy_vtable): use domain mempool
14486
14487 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14488
14489         * appdomain.h, appdomain.c: split initialization that requires the
14490         execution engine support into mono_runtime_init().
14491
14492 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
14493
14494         * class.c (mono_class_init): don't include vtable inside MonoClass
14495         to save some memory, gather some statistics.
14496         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
14497
14498 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14499
14500         * icall.c: internalcall implementation for ValueType.Equals().
14501
14502 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
14503
14504         * object.c (mono_message_init): moved 
14505         (mono_runtime_exec_main): new arch. independent impl.
14506         (mono_runtime_invoke_array): new method - like
14507         mono_runtime_invoke, but you can pass an array of objects.
14508         (mono_remoting_invoke): new arch. independent impl.
14509         (mono_message_invoke): new arch. independent impl.
14510         (mono_runtime_class_init): new arch. independent impl.
14511         (mono_runtime_object_init): new arch. independent impl.
14512
14513 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14514
14515         * metadata.c, object.c, reflection.c: documented the exported
14516         functions.
14517
14518 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
14519
14520         * icall.c: simpler code to pass the assembly builder data to corlib.
14521         Implement GetNestedTypes() internalcall.
14522
14523 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14524
14525         * class.c: warn if a type can't be loaded.
14526
14527 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
14528
14529         * image.h: typedef MonoImageOpenStatus
14530         * types.h: removed unused file
14531         
14532 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
14533
14534         * icall.c: Enum_ToObject accepts enum value arguments.
14535
14536 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14537
14538         * class.c: move initialization of properties, events and nested
14539         classes, so that they happen for interfaces, too.
14540
14541 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14542
14543         * icall.c: cleanup some ugly casts in Array_SetValue*.
14544
14545 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14546
14547         * icall.c: the values array fro enums is of the correct type, now.
14548         Implement (correctly) getFullName instead of assQualifiedName for
14549         MonoType.
14550         * reflection.h, reflection.c: added mono_type_get_name ().
14551
14552 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14553
14554         * assembly.c, image.h: for each MonoImage, record from wich assembly
14555         it was loaded.
14556         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
14557         Make Type.Assembly work.
14558
14559 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
14560
14561         * debug-symfile.h: use char* instead of gpointer to avoid
14562         unnecessary casts.
14563
14564         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
14565
14566         * icall.c (ves_icall_InternalExecute): impl. FielSetter
14567         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
14568
14569 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
14570
14571         * icall.c (mono_message_init): impl. (code cleanup)
14572         (ves_icall_InternalExecute): impl. FieldGetter
14573
14574         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
14575         defined we call all (non-static)methods through the vtable. 
14576
14577 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
14578
14579         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
14580         finalizer even though the memory is still referenced (and the chunk of
14581         memory is not freed).
14582
14583 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
14584
14585         * assembly.c: fix brokeness.
14586
14587 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
14588
14589         * class.c: kill some warnings. Check explicit interface method
14590         implementation also without considering the namespace.
14591         Load also literal strings in static class data.
14592
14593 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
14594
14595         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
14596         (default_assembly_name_resolver): Make the resolver take the
14597         "base" directory where the assembly was originally defined, so we
14598         can load DLLs that are in the same directory as the assembly that
14599         is being referenced.
14600
14601 2002-03-28  Dick Porter  <dick@ximian.com>
14602
14603         * file-io.h: 
14604         * file-io.c:
14605         * socket-io.c: 
14606         * unicode.h: 
14607         * unicode.c: Warning cleanups
14608
14609 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
14610
14611         * object.h, reflection.h: use the correct type instead of MonoObject.
14612
14613 2002-03-28  Martin Baulig  <martin@gnome.org>
14614
14615         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
14616         (mono_debug_update_symbol_file): Initialize classes if necessary.
14617
14618 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
14619
14620         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
14621         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
14622
14623 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
14624
14625         * assembly.h: fix function prototype.
14626         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
14627         * mono-endian.h: use const cast.
14628
14629 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
14630
14631         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
14632
14633 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
14634
14635         * loader.c: don't assert when a typeref can't be loaded, give
14636         a chance to the runtime to trow an exception instead.
14637         * loader.h: fix warning.
14638
14639 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
14640
14641         * class.c (mono_class_proxy_vtable): added proxy support
14642
14643 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
14644
14645         * icall.c: removed last of PAL calls, added System.Environment
14646         * file-io.h, file-io.c: MonoIO implementation
14647         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
14648
14649 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
14650
14651         * appdomain.c: do not use the byte marker in ldstr table lookup.
14652         * debug-helpers.c: allow two ':' to separate class and method name.
14653         * object.c: allocate arrays bounds with the GC, too.
14654         * verify: add a few more checks.
14655
14656 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
14657
14658         * reflection.c: output also literal strings. Allocate parameter data
14659         with GC_malloc() (thanks, Martin, for catching this!).
14660
14661 2002-03-26  Martin Baulig  <martin@gnome.org>
14662
14663         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
14664         include the `this' offset in the `param_offsets'.
14665
14666 2002-03-25  Martin Baulig  <martin@gnome.org>
14667
14668         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
14669         mono_debug_get_class() function to get the classes. Added new
14670         relocation types for arrays and strings.
14671         (mono_debug_get_class): New static function to search in all
14672         referenced assemblies for a metadata token.
14673
14674         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
14675
14676 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14677
14678         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
14679         hold gc-allocated objects. Make the string heap a stream like the
14680         others. Removed duplicated code when writing stream info.
14681         Added asserts to catch possible buffer overflows. Set the sorted map
14682         for tables that need sorting. Added some documentation.
14683
14684 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
14685
14686         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
14687         for interned strings and vtables.
14688
14689 2002-03-24  Martin Baulig  <martin@gnome.org>
14690
14691         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
14692         it in the array since it was created with g_slist_prepend().
14693
14694 2002-03-24  Martin Baulig  <martin@gnome.org>
14695
14696         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
14697         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
14698         (mono_debug_method_from_token): Renamed to
14699         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
14700         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
14701
14702         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
14703         relocation types.
14704
14705         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
14706
14707 2002-03-24  Martin Baulig  <martin@gnome.org>
14708
14709         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
14710         (mono_debug_method_from_token): New func.
14711
14712         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
14713         New interncall, calls mono_debug_local_type_from_signature().
14714         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
14715         calls mono_debug_method_from_token().
14716
14717 2002-03-23  Martin Baulig  <martin@gnome.org>
14718
14719         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
14720         specifies the number of bytes to be converted, not the array size.
14721         Return the number of chars, not the number of bytes.
14722         (ves_icall_iconv_get_chars): The `byteCount' argument
14723         specifies the number of bytes to be converted, not the array size.
14724
14725 2002-03-23  Martin Baulig  <martin@gnome.org>
14726
14727         * reflection.h (MonoReflectionSigHelper): New type.
14728
14729         * reflection.c (mono_reflection_sighelper_get_signature_local),
14730         (mono_reflection_sighelper_get_signature_local): New functions.
14731
14732         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
14733         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
14734         interncalls.
14735
14736 2002-03-23  Martin Baulig  <martin@gnome.org>
14737
14738         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
14739         is_writeable is set.
14740         (mono_raw_buffer_update): New function to write the modified map
14741         back to disk.
14742
14743         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
14744
14745         * debug-symfile.c (mono_debug_update_symbol_file): Call
14746         mono_raw_buffer_update() when done writing.
14747
14748 2002-03-23  Martin Baulig  <martin@gnome.org>
14749
14750         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
14751
14752         * debug-symfile.c: Added support for arguments and local variables.
14753
14754 2002-03-23  Dick Porter  <dick@ximian.com>
14755
14756         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
14757         protected by ifdefs, hence breaking the w32 build.
14758
14759 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14760
14761         * object.c: implement is_interned() the right way.
14762
14763 2002-03-21  Martin Baulig  <martin@gnome.org>
14764
14765         * debug-symfile.[ch]: New files to handle debugging information
14766         files. There's also support to dynamically update these symbol
14767         files to include machine dependent information.
14768
14769 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
14770
14771         * threads.c (mono_thread_create): new function to create thread
14772         from C
14773
14774 2002-03-20  Martin Baulig  <martin@gnome.org>
14775
14776         * icall.c (ves_icall_InternalInvoke): Create a new object if the
14777         method is a constructor.
14778         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
14779         points to ves_icall_InternalInvoke().
14780
14781 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
14782
14783         * file-io.c: Flush shouldn't throw exceptions.
14784
14785 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
14786
14787         * file-io.c: FileStream flush support; FileSetLength now
14788         restores file pointer.
14789
14790 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
14791
14792         * class.c: set image for pointer classes.
14793
14794 2002/03/19  Nick Drochak <ndrochak@gol.com>
14795
14796         * sysmath.c: Forgot one.
14797
14798 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
14799
14800         * sysmath.c: Avoid redefining existing names.
14801
14802 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
14803
14804         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
14805         handled by runtime as icall rather than dllimport from libm.so
14806         * file-io.c, file-io.h: fixed handle argument type.
14807
14808 2002-03-18  Dick Porter  <dick@ximian.com>
14809
14810         * reflection.c (mono_image_get_type_info): rename interface to
14811         iface, because of "#define interface struct" on windows.
14812
14813 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
14814
14815         * class.c, class.h: rename and export mono_ptr_class_get().
14816         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
14817         * reflection.c, reflection.h, icall.c: better/saner type name
14818         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
14819         method signatures.
14820
14821 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
14822
14823         * class.c (mono_class_init): removed hardcoded GHC_SLOT
14824
14825         * icall.c (ves_icall_InternalInvoke): impl.
14826
14827 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14828
14829         * reflection.c: output the interface map table, too.
14830
14831 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
14832
14833         * class.c (class_compute_field_layout): separate computation of 
14834         static field layout
14835
14836 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
14837
14838         * icall.c: added System.Buffer support.
14839         * file-io.c: moved file icalls from PAL to FileStream.
14840
14841 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
14842
14843         * icall.c (ves_icall_System_Object_GetHashCode): impl.
14844
14845 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
14846
14847         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
14848
14849 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14850
14851         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
14852
14853 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
14854
14855         * debug-helpers.{c,h}: moved here from monograph some useful functions
14856         to locate a method by name/signature in a class or image. Included
14857         also a small and flexible IL disassembler.
14858
14859 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
14860
14861         * reflection.c: fixup tokens in methods with small header size, too.
14862
14863 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
14864
14865         * object.c (mono_string_to_utf8): remove assert(!error), instead
14866         print a warning. 
14867
14868 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
14869
14870         * icall.c: update to the new mono_Array_class_get interface.
14871
14872 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
14873
14874         * appdomain.c, object.c: Boehm-GC enable.
14875         * icall.c: make get_data_chunk() support split data requests.
14876         Ensure a class is initialized in more cases. Return only the first
14877         property found in GetProperties() or the compiler gets confused. 
14878         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
14879         * reflection.h, reflection.c: add fixup mechanism for field and method
14880         tokens. Initialize assembly->typeref in a single place. Output
14881         properties after events. Support custom attributes for events, too.
14882         Typo fix for paramter custom attrs.
14883
14884 2002-03-07  Martin Baulig  <martin@gnome.org>
14885
14886         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
14887
14888 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
14889
14890         * class.c (mono_array_class_get): fix. for multi. dim. arrays
14891
14892 2002-03-06  Martin Baulig  <martin@gnome.org>
14893
14894         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
14895         non-zero lower bounds. See testcases #F10-#F13.
14896
14897 2002-03-05  Martin Baulig  <martin@gnome.org>
14898
14899         * exception.c (mono_get_exception_argument_out_of_range): New exception.
14900
14901         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
14902         ves_icall_System_Array_GetValue(), only calculate the absolute array position
14903         here.
14904         (ves_icall_System_Array_SetValue): Likewise.
14905         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
14906         as argument and does the actual work. This function is used when copying a
14907         multi-dimensional array.
14908         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
14909         now do all the widening conversions of value types.
14910         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
14911
14912 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14913
14914         * class.c: remove some magic numbers and use the smbolic names,
14915         instead. Added init_events() to load event info at class init time.
14916         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
14917         and mono_metadata_methods_from_event().
14918         * reflection.h, reflection.c: added support for writing out the evnets
14919         related information.
14920
14921 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
14922
14923         * reflection.h, icall.c: use a different method (GetInterfaces)
14924         to gather interface info and add isbyref, isprimitive and
14925         ispointer to the ves_icall_get_type_info() return value.
14926
14927 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
14928
14929         * class.h: stared adding support for events.
14930         * icall.c: split find_members implementation. Added debug icall to get
14931         the address of an object.
14932         * reflection.c: handle TypeBuilders in mono_type_get_object().
14933
14934 2002-03-01  Martin Baulig  <martin@gnome.org>
14935
14936         * icall.c (ves_icall_System_Array_GetLength): This must throw an
14937         ArgumentOutOfRangeException(), not an ArgumentException().
14938         (ves_icall_System_Array_GetLowerBound): Likewise.
14939         (ves_icall_System_Array_GetValue): Improved argument checking.
14940         (ves_icall_System_Array_SetValue): Improved argument checking.
14941
14942 2002-03-01  Martin Baulig  <martin@gnome.org>
14943
14944         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
14945         called with invalid arguments rather than just dying with g_assert().
14946         (ves_icall_System_Array_SetValue): Likewise.
14947         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
14948         raise a NotImplementedException instead.
14949         (ves_icall_System_Array_GetLength): Added argument checking.
14950         (ves_icall_System_Array_GetLowerBound): Added argument checking.
14951
14952 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
14953
14954         * object.h (mono_assert): new macros mono_assert and
14955         mono_assert_not_reached
14956
14957 2002-02-28  Martin Baulig  <martin@gnome.org>
14958
14959         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
14960         and "System::String::IsInterned" to "System::String::_IsInterned".
14961
14962 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
14963
14964         * icall.c: remove hacks for typebuilder. Added icall to create a
14965         modified type from a tybebuilder.
14966         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
14967         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
14968         to create a backing MonoClass for a TypeBuilder.
14969
14970 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
14971
14972         * class.c, class.h: more refactoring of class init.
14973         Export mono_class_setup_mono_type() and mono_class_setup_parent().
14974
14975 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
14976
14977         * marshal.c, marshal.h: start of marshaling interface.
14978
14979 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
14980
14981         * icall.c: fix order in assembly qualified name icall.
14982
14983 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
14984
14985         * class.c: do not free str, since we store it in the hash table.
14986         * reflection.h: add label field to MonoILExceptionInfo.
14987         * reflection.c: handle references to more than one assembly. Handle
14988         case when there isn't a module created in the assembly.
14989
14990 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
14991
14992         * class.c: Fix typo. Start refactoring of class init code.
14993
14994 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
14995
14996         * appdomain.c: exit with 1 on error.
14997         * class.c: we already have the name in MonoClassField.
14998         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
14999         MonoStreamHeader instead of an offset of image->raw_metadata.
15000
15001 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
15002
15003         * appdomain.c (mono_init): Be even more descriptive about the error.
15004
15005 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
15006
15007         * appdomain.c: give the user an informative message when corlib can't
15008         be loaded.
15009
15010 2002-02-26  Martin Baulig  <martin@gnome.org>
15011
15012         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
15013         New icall to get the time zone data.
15014
15015 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15016
15017         * reflection.c: set virtual and raw size of section correctly.
15018         * threads.c: transfer domain information to newly created threads.
15019
15020 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
15021
15022         * class.c: when instancing a class in a domain, load the default
15023         vaules for static fields from the constant table. Fix System.Enum to
15024         not be an enum.
15025         * icall.c: implement Object::GetType() internalcall. Implemented
15026         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
15027         Fixed checking of binding flags in find_members().
15028         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
15029         * reflection.c: handle enumerations when writing to the constant
15030         table. Use a different object cache for types.
15031
15032
15033 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
15034
15035         * object.c (mono_object_isinst): fix for arrays
15036
15037         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
15038
15039 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
15040
15041         * object.c: don't use mprotect ()  and fix intern pool hash table
15042         lookup for big endian systems.
15043
15044 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15045
15046         * icall.c: change type_is_subtype_of () signature.
15047
15048 2002-02-21  Mark Crichton  <crichton@gimp.org>
15049
15050         * rand.c, rand.h: Added random number generator for
15051         System.Security.Cryptography classes.
15052
15053         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
15054
15055         * icall.c: Added System.Security.Cryptography calls.
15056
15057 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15058
15059         * class.c, icall.c, metadata.c: better support for pointer types.
15060         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
15061         * reflection.c: Add support for getting custom attrs for properties
15062         and simplify some code.
15063
15064 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15065
15066         * icall.c: change getToken () and add custom attribute GetBlob()helper
15067         method.
15068         * reflection.h: add custom attrs array to the reflection builder structures.
15069         * reflection.c: encode and emit custom attributes for all the relevant
15070         reflection objects. Cache fieldref and methodref tokens. Change
15071         mono_image_create_token() interface to take a MonoDynamicAssembly.
15072         More complete custom attributes decoder. Load custom attributes for
15073         Assembly, Field, Method and Constructor objects, too. Make the
15074         returned array an Attribute[] one, not object[]. Added
15075         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
15076         custom attribute constructor.
15077
15078 2002-02-20  Dick Porter  <dick@ximian.com>
15079
15080         * icall.c:
15081         * rawbuffer.c:
15082         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
15083         problem code out for now).
15084
15085 2002-02-19  Radek Doulik  <rodo@ximian.com>
15086
15087         * object.c (mono_ldstr): use hash table to avoid multiple swapping
15088
15089 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
15090
15091         * icall.c: register the GetCustomAttributes method.
15092         * object.c, object.h: add mono_string_new_len ().
15093         * reflection.h, reflection.c: added mono_runtime_invoke(),
15094         mono_install_runtime_invoke(). Added
15095         mono_reflection_get_custom_attrs () to load custom attributes and
15096         create the attribute objects.
15097
15098 2002-02-19  Dick Porter  <dick@ximian.com>
15099         * threads-dummy-types.c:
15100         * threads-dummy-types.h:
15101         * threads-dummy.c:
15102         * threads-dummy.h:
15103         * threads-pthread-types.c:
15104         * threads-pthread-types.h:
15105         * threads-pthread.c:
15106         * threads-pthread.h:  Deleted obsolete files
15107
15108 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
15109
15110         * class.c (mono_class_vtable): runtime init the class when we
15111         allocate static class data.
15112
15113         * icall.c (ves_icall_System_Array_SetValue): check for null values.
15114
15115         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
15116         and String - but we will need generic marshalling support in the
15117         future. 
15118         (mono_init): set the domain name in a ms compatible way
15119
15120         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
15121         String[].
15122
15123 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
15124
15125         * object.c (mono_array_clone): use alloca() instead of g_malloc  
15126         for sizes
15127
15128         * appdomain.c (mono_domain_unload): impl.
15129
15130 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15131
15132         * appdomain.c, object.c: fix intern pool implementation.
15133         * class.c: fix alignment code.
15134
15135 2002-02-16  Radek Doulik  <rodo@ximian.com>
15136
15137         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
15138         and s2 > s1, just copy lower bytes to be compatible with little
15139         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
15140         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
15141
15142         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
15143         force big_endian to be 1 for big endian machines 
15144         (ves_icall_iconv_new_decoder): ditto
15145
15146 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
15147
15148         * socket-io.c (convert_sockopt_level_and_name): If the system
15149         doesn't define SOL_IP or SOL_TCP, get them by hand using
15150         getprotobyname() and caching the values (because this could be a
15151         slow operation).
15152         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
15153         Use the appropriate struct when the system does support it. Ie,
15154         not all systems have struct ip_mreqn so use struct ip_mreq when
15155         appropriate.
15156
15157 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
15158
15159         * reflection.c: handle finally clauses.
15160
15161 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
15162
15163         * socket-io.c: use g_snprintf() instead of snprintf.
15164
15165 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
15166
15167         * reflection.c (mono_param_get_objects): Cast second argument to
15168         mono_method_get_param_names to a const char** to silence the
15169         compiler warning.
15170
15171         * appdomain.c (mono_domain_assembly_open): Put parens around the
15172         truth statement in the for-loop.
15173
15174         * unicode.c (iconv_convert): Got rid of a compiler warning about
15175         int i being unused when the system has a new iconv.
15176         (iconv_get_length): Same.
15177
15178         * image.c (load_class_names): Cast the second argument to
15179         g_hash_table_insert() to char* to hush compiler warnings about the
15180         arg being a const.
15181         (mono_image_open): Same here.
15182
15183         * socket-io.c: Don't conditionally include sys/filio.h or
15184         sys/sockio.h here anymore since we now get them from
15185         io-layer/io-layer.h
15186         (inet_pton): If the system doesn't support inet_aton, implement
15187         using inet_addr and also #define INADDR_NONE if it isn't defined
15188         by the system.
15189
15190 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15191
15192         * metadata.c, metadata.h: added function to get packing and size info
15193         of a typedef.
15194         * reflection.h, reflection.c: handle field RVA data. Save info about
15195         the table layout if needed. Assign typedef indexes to all the types
15196         before dumping the info about them to avoid forward reference problems.
15197
15198 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
15199
15200         * socket-io.c (convert_sockopt_level_and_name): ifdef
15201         SO_ACCEPTCONN because it is not defined on my system (old debian)
15202
15203 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15204
15205         * opcode.c: use stddef.h to get NULL.
15206
15207 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
15208
15209         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
15210         for FIONBIO, FIONREAD and SIOCATMARK.
15211         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
15212         define INADDR_NONE and besides, inet_addr() is deprecated and
15213         should not be used. Use inet_pton() instead - it also has the
15214         added bonus that it can easily handle IPv6 addresses as well.
15215         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
15216
15217 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
15218
15219         * decimal.c: remove _MSC_VER conditional.
15220
15221 2002-02-13  Dick Porter  <dick@ximian.com>
15222
15223         * socket-io.c: 
15224         * icall.c: Internal calls for Blocking, Select, Shutdown,
15225         GetSocketOption and SetSocketOption
15226
15227 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15228
15229         * assembly.cs: better resolver: use it instead of some kludgy
15230         code.
15231
15232 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
15233
15234         * reflection.c: the best way to speed-up the compiler is to avoid
15235         infinite loops.
15236
15237 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
15238
15239         * class.c (mono_class_vtable): changed the object layout
15240         (obj->vtable->class). 
15241         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
15242
15243 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15244
15245         * assembly.c: look for assemblies in the assembly dir, too.
15246
15247 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15248
15249         * class.c: fix thinko in mono_class_from_type().
15250
15251 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15252
15253         * exception.h, exception.c: added TypeLoadException.
15254         * object.h, object.c: added mono_array_clone ().
15255         * icall.c: handle throwOnError in AssemblyGetType().
15256         Added Array.Clone().
15257         * opcode.h, opcode.c: use a single value for the opcode val.
15258         Compile fix for non-gcc compilers.
15259
15260 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
15261
15262         * opcodes.c, opcodes.h: export interesting info about opcodes.
15263
15264 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
15265
15266         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
15267         icalls. 
15268
15269         * class.c (class_compute_field_layout): set element_class for enums
15270         (mono_class_create_from_typedef): set element_class for normal classes
15271
15272         * icall.c (ves_icall_System_Enum_get_value): impl.
15273
15274         * class.c (mono_class_create_from_typedef): do not set valuetype
15275         flag for System.ValueType and System.Enum
15276
15277 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
15278
15279         * unicode.c (iconv_convert): fix big endian problem.
15280
15281 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15282
15283         * class.c: add asserts if we are ever going to scribble over memory.
15284         * socket-io.c: not all systems have AF_IRDA defined.
15285
15286 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
15287
15288         * class.c (class_compute_field_layout): do not consider static
15289         fields to compute alignment
15290
15291 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
15292
15293         * appdomain.c (mono_appdomain_get): impl.
15294         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
15295
15296 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
15297
15298         * icall.c: ignore "file://" prefix when loading an assembly.
15299
15300 2002-01-23  Dick Porter  <dick@ximian.com>
15301
15302         * socket-io.c:
15303         * icall.c:
15304         * Makefile.am: Added socket support
15305
15306 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
15307
15308         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
15309         code back.  This should return the assemblies that are loaded by
15310         the runtime on behalf of an application domain. 
15311
15312         The current implementation is still broken, it just returns every
15313         assembly loaded, but until we get real applications domain this
15314         will do.
15315
15316 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
15317
15318         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
15319         AppDomain object.
15320
15321 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
15322
15323         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
15324         the mono_class_from_name lookup.
15325         (ves_icall_get_parameter_info): ditto.
15326         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
15327         method.
15328         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
15329
15330 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15331
15332         * class.c: load also nested classes on class init.
15333         System.ValueType instance methods gets passed boxed
15334         values, unless methods in derived classed that get a pointer to the
15335         data.
15336         * icall.c: use better name parsing code in GetType().
15337         * image.c, image.h: add mono_image_loaded ().
15338         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
15339         * reflection.c, reflection.h: added mono_reflection_parse_type().
15340
15341 2002-01-22  Veronica De Santis <veron78@interfree.it>
15342
15343         * icall.c : Added mapping of internal calls for Manual and Auto reset events
15344         * threads.c : Added the implementation of internal calls for events
15345         * threads.h : Added prototypes of internal calls for events
15346         
15347 2002-01-21  Radek Doulik  <rodo@ximian.com>
15348
15349         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
15350
15351 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
15352
15353         * class.c (mono_class_init): set min_align to 1 (instead of 0)
15354         (mono_class_value_size): use min_align
15355
15356 2002-01-20  Dick Porter  <dick@ximian.com>
15357
15358         * threads.h:
15359         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
15360         so it compiles on w32.
15361
15362 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
15363
15364         * metadata.c (mono_type_stack_size): impl.
15365
15366         * class.c (mono_class_get_field): impl. memberref token
15367
15368 2002-01-16 Veronica De Santis <veron78@@interfree.it>
15369
15370         * icall.h : Added the internal calls mapping for CreateMutex_internal
15371                     and ReleaseMutex_internal.
15372         * threads.h : Added the prototype of mutexes internal calls.
15373         * threads.c : Added the implementations of mutexes internal calls.
15374
15375 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
15376
15377         * metaparse.h: removed unused file.
15378         * reflection.c, reflection.h: added stream_data_align () function 
15379         to align data in streams and keep stream aligned. Add support for
15380         exception support in method headers.
15381
15382 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
15383
15384         * unicode.c: make iconv_convert () return the number of bytess written
15385         in the output buffer.
15386
15387 2002-01-15  Dick Porter  <dick@ximian.com>
15388         * threads.c: Make the runtime's idea of infinite timeouts coincide
15389         with the class library's
15390
15391         Fix a particularly egregious bug in mono_thread_cleanup(). That
15392         code was so utterly bogus it must have been written on a Monday.
15393
15394 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
15395
15396         * reflection.h: add subtypes field to TypeBuilder.
15397         * reflection.c: encode constants for literal fields.
15398         Handle subtypes. Fix user string token (and add a zero byte)
15399         at the end.
15400         
15401 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
15402
15403         * class.c (mono_class_init): bug fix: assign slot numbers for
15404         abstract methods.
15405
15406 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15407
15408         * reflection.c: don't try to output a code RVA for abstract methods.
15409         Small fixes for method header format. Output parameter info to the
15410         ParamDef table. Save method overriding info to MethodImpl table.
15411         Fix property support. Allow typedef.extends to be a type in the
15412         building assembly.
15413         * verify.c: fix off-by-one error.
15414
15415 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
15416
15417         * class.c: fix mono_class_from_mono_type () for szarray types.
15418         Remove unused cache check in mono_class_from_type_spec().
15419         * icall.c: *type_from_name () functions handle simple arrays and byref.
15420         * reflection.c: handle byref and szarray types. Handle methods without
15421         body (gets P/Invoke compilation working). Handle types and fields in
15422         get_token ().
15423         * reflection.h: add rank to MonoTypeInfo.
15424
15425 2002-01-10  Dick Porter  <dick@ximian.com>
15426
15427         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
15428         internal calls
15429
15430 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
15431
15432         * icall.c: initialize class in type_from_handle ().
15433         Loop also in parent classes for get_method ().
15434         * reflection.c: properly encode class and valuetype types.
15435         Start on encoding TypeBuilder types. Handle fieldrefs.
15436         Use correct length when registering a user string.
15437         Handle ConstructorBuilder and MonoMethod in get_token ().
15438         Make mono_type_get_object () aware of cached types.
15439         * object.c: back out change to mono_string_new ().
15440
15441 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
15442         * object.c: mono_string_new should return a NULL when the string 
15443         passed in is NULL -- not try to deference it.
15444         
15445 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
15446
15447         * icall.c: hack to make IsSubType work for TypeBuilders.
15448         * reflection.c: emit constructors before methods.
15449         Retrieve param names in mono_param_get_objects().
15450
15451 2002/01/05  Nick Drochak  <ndrochak@gol.com>
15452
15453         * Makefile.am: fix list of headers and sources so automake 1.5
15454         doesn't complain. Removed \# at end of list.
15455
15456 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
15457
15458         * reflection.c: get token for a method ref. Set return type of
15459         constructor to void.
15460         * loader.c: debug message.
15461         * class.c: typo fix.
15462
15463 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
15464
15465         * icall.c: fix array init with rank > 1. FindMembers
15466         loops in parent class as well.
15467         * image.c: do not insert nested types in name cache.
15468         * reflection.c: warning fix.
15469         * reflection.h: add override method (for interface impl).
15470
15471 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
15472
15473         * metadata.c: fix customattr decoding.
15474
15475 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
15476
15477         * rawbuffer.cs: Added native Win32 implementation, avoids using
15478         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
15479
15480 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
15481
15482         * class.c: make the low-level routines handle the cache.
15483
15484 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
15485
15486         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
15487
15488 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
15489
15490         * class.c: fix mono_array_element_size() for objects.
15491         * class.h, class.c: add properties to MonoClass and load them
15492         at init time.
15493         * icall.c: check with isinst() when assigning a value to an array
15494         instead of requiring the classes to match exactly.
15495         Implemented icall for System.Type::GetType().
15496         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
15497         enums. Handle bindingflags when looking for methods and fields.
15498         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
15499         and mono_metadata_methods_from_property().
15500         * reflection.h, reflection.c: added structures for propreties,
15501         parameters and enums. Implemented mono_property_get_object() and
15502         mono_param_get_objects().
15503
15504 2001-12-18  Dick Porter  <dick@ximian.com>
15505
15506         * file-io.c: Use mono_string_to_utf16() instead of
15507         mono_string_chars()
15508
15509         * object.c: Added mono_string_to_utf16(), which copies the non
15510         NULL-terminated MonoString into a new double-null-terminated
15511         buffer.
15512
15513 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
15514
15515         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
15516
15517 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
15518
15519         * file-io.c: raise exceptions if handle is invalid.
15520
15521 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
15522
15523         * assembly.c: yet another check for mscorlib.
15524         * class.c, class.h: load nesting info for classes.
15525         * icall.c: many new functions to support the Reflection classes.
15526         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
15527         * reflection.h, reflection.c: mono_image_create_token(),
15528         mono_assembly_get_object(), mono_type_get_object(),
15529         mono_method_get_object(), mono_field_get_object(): methods to return
15530         objects that parallel the C representation of assemblies, types,
15531         methods, fields.
15532
15533 2001-12-11  Dick Porter  <dick@ximian.com>
15534
15535         * icall.c:
15536         * file-io.c: Internal calls for file IO.
15537
15538 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
15539
15540         * tabledefs.h: missing FileAttributes.
15541         * verify.h, verify.c: use is_valid_string () to simplify and check for
15542         valid strings more correctly. Fix warnings and speeling.
15543         Check more tables: Filed, File, ModuleRef, StandAloneSig.
15544         Check code: branches, maxstack, method calls.
15545
15546 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
15547
15548         * object.c (mono_object_allocate): removed static, so that the jit
15549         can allocate value types.
15550
15551         * icall.c (ves_icall_System_DateTime_GetNow): impl.
15552
15553 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15554
15555         * class.c: init enum types right away and register the
15556         token->MonoClass map in mono_class_create_from_typedef ().
15557         * verify.h, verify.c: first cut of the verifier.
15558         * pedump.c: add --verify switch to verify metadata tables.
15559         * tabledefs.h: add some missing enums.
15560
15561 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
15562
15563         * class.c (mono_install_runtime_class_init): impl.
15564         (mono_class_init): renamed mono_class_metadata_init to
15565         mono_class_init, also removed the metadata_inited flag
15566
15567         * object.c (mono_object_isinst): use faster algorithm
15568
15569 2001-11-30  Radek Doulik  <rodo@ximian.com>
15570
15571         * mono-endian.h: reverted last change
15572         added function prototypes
15573
15574         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
15575         add mono-endian.c back
15576
15577         * mono-endian.c: returned back, as Paolo pointed out, it's needed
15578         for unaligned access, I've mistaked it with endianess. I am
15579         sorry.
15580         (mono_read16): fix reverted endianess
15581         (mono_read64): ditto
15582         (mono_read32): ditto
15583
15584 2001-11-30  Dick Porter  <dick@ximian.com>
15585
15586         * exception.c: Implement mono_exception_from_name()
15587
15588 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
15589
15590         * metadata.h, metadata.c: remove params_size and locals_size and their
15591         calculation from the metadata code: they are only usefult to the
15592         interp.
15593
15594 2001-11-29  Radek Doulik  <rodo@ximian.com>
15595
15596         * object.c (mono_ldstr): swap bytes here, it's probably not the
15597         best place, but works for me now, I'll redo it once I know mono
15598         better, also note that I add PROT_WRITE and don't reset back, also
15599         note that it's only affects big endians, so x86 should be OK
15600
15601         * mono-endian.h (read16): use just glib macros for both endians
15602
15603         * mono-endian.c: removed as glib macros are used in in
15604         mono-endian.h so we don't need to care about endianess for read
15605         macros as glib does that for us already
15606
15607 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
15608
15609         * class.h, class.h: take minimum alignment into consideration so
15610         that the fields of a class remain aligned also when in an array.
15611
15612 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15613
15614         * loader.h, loader.c: add mono_method_get_param_names().
15615         * class.c: 0-init class fields.
15616
15617 2001-11-26  Dick Porter  <dick@ximian.com>
15618
15619         * icall.c:
15620         * threads-types.h:
15621         * threads.c: New file that handles System.Threading on all platforms
15622
15623         * object.c: 
15624         * object.h: Remove the synchronisation struct from MonoObject,
15625         replace it with a pointer that gets initialised on demand
15626
15627         * Makefile.am: Replace all the system-specific threading code with
15628         a single file that uses the new wrapper library
15629
15630 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
15631
15632         * class.c, class.h: add mono_install_trampoline() so that the runtime
15633         can register a function to create a trampoline: removes the ugly
15634         requirement that a runtime needed to export arch_create_jit_trampoline.
15635         * object.h, object.c: added mono_install_handler() so that the runtime
15636         can install an handler for exceptions generated in C code (with
15637         mono_raise_exception()). Added C struct for System.Delegate.
15638         * pedump.c: removed arch_create_jit_trampoline.
15639         * reflection.c: some cleanups to allow registering user strings and
15640         later getting a token for methodrefs and fieldrefs before the assembly
15641         is built.
15642         * row-indexes.h: updates and fixes from the new ECMA specs.
15643
15644 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
15645
15646         * class.h, class.c: add enum_basetype field to MonoClass.
15647         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
15648         to get index in the constant table reated to a field, param or
15649         property.
15650         * reflection.h, reflection.c: handle constructors. Set public-key and
15651         version number of the built assembly to 0.
15652         * row-indexes.h: update from new ECMA spec.
15653
15654 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
15655
15656         * class.h, class.c: add a max_interface_id to MonoClass.
15657         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
15658         since it's used to do that. Added mono_type_type_from_obj().
15659         Make GetType() return NULL instead of segfaulting if the type was not
15660         found. Handle simple arrays in assQualifiedName.
15661         * object.h: add a struct to represent an Exception.
15662         * reflection.c: output call convention in method signature.
15663         Add code to support P/Invoke methods and fixed offsets for fields.
15664
15665 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
15666
15667         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
15668         the value.
15669         * icall.c: use mono_array_addr instead of array->vector: fixes the
15670         reflection image writing.
15671         * reflection.c: init call convention byte to 0 in method signature.
15672         Encode the property signature. Don't output property-related methods
15673         twice. Really process the properties for a type (don't cast a field to
15674         a property, my mom always told me that).
15675         Fix 64 bit issues in pointer alignment in a different and more
15676         readable way.
15677
15678 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
15679
15680         * loader.h: Removed type class from MonoDefaults, added monotype
15681
15682         * loader.c: Loaded MonoType, removed loading of Type
15683
15684         * icall.c (my_mono_new_object): Now returns a System.MonoType,
15685         and fills in System.Type._impl with a RuntimeTypeHandle rather
15686         than the actual MonoClass *
15687
15688         (ves_icall_type_from_handle): change from type_class to
15689         monotype_class
15690
15691         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
15692         implemented
15693
15694         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
15695         implemented
15696
15697         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
15698
15699         (ves_icall_System_Reflection_Assembly_GetType): implemented
15700
15701         (ves_icall_System_MonoType_assQualifiedName): implemented
15702
15703         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
15704
15705 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
15706
15707         * assembly.c (mono_assembly_open): Implement a cache for the
15708         assemblies. 
15709
15710         (mono_assembly_close): only destroy the assembly when the last
15711         reference is gone.
15712         
15713 2001-11-09  Dick Porter  <dick@ximian.com>
15714
15715         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
15716
15717 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
15718
15719         * class.c (mono_class_metadata_init): bug fix: compute the right slot
15720
15721 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
15722
15723         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
15724         from Martin Weindel.
15725         * object.h: add mono_string_chars ().
15726
15727 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
15728
15729         * reflection.c (build_compressed_metadata): Eliminates warnings
15730         and uses 64-bit clean code.
15731
15732         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
15733         (mono_type_equal): Change signature to eliminate warnings.
15734
15735 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15736
15737         * icall.c, loader.c: remove the internalcall array constructors.
15738         Changes to match the new MonoArray structure.
15739         * object.h, object.c: an array object doesn't allocate an extra
15740         vector. Add mono_array_new_full () to create jagged arrays easily.
15741
15742 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
15743
15744         * metadata.h, metadata.c: add mono_metadata_field_info () to
15745         retreive all the info about a field from vairous tables.
15746         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
15747         * class.h, class.c: augment MonoClassField with more info.
15748         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
15749         policy and load a field's RVA if needed.
15750
15751 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
15752
15753         * class.c (mono_class_metadata_init): create a trampoline for all
15754         virtual functions instead of actually compiling them.
15755
15756 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
15757
15758         * class.h, class.c: include name in MonoClassField.
15759         * class.c: fix fundamental type of System.Object and System.String.
15760         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
15761         tokens in ldtoken.
15762         * icall.c: remove internalcalls for the Reflection stuff that is now
15763         done in C# code.
15764         * loader.c: mono_field_from_memberref () implementation.
15765         * mono-endian.c: thinko (s/struct/union/g).
15766         * object.c, object.h: make the mono_string_* prototypes actually use
15767         MonoString instead of MonoObject.
15768         * reflection.c, reflection.h: updates for changes in the reflection
15769         code in corlib: we use C structures that map to the actual C# classes.
15770         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
15771         fat method header if needed and use the info from the ILGenerator for
15772         methods. Handle fields in types. Misc fixes.
15773
15774 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
15775
15776         * class.c (mono_class_metadata_init): bug fix: always allocate
15777         space for static class data
15778
15779 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
15780
15781         * class.c (mono_compute_relative_numbering): use relative
15782         numbering to support fast runtime type checks.
15783
15784 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
15785
15786         * class.c (mono_class_create_from_typeref): added debugging output
15787         to print class name when MonoDummy is returned instead of real class
15788
15789 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
15790
15791         * class.c (mono_class_metadata_init): interface offset table now
15792         contains pointers into the vtable - this is more efficient for the jit
15793
15794 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
15795
15796         * class.c (mono_class_metadata_init): use a temporary vtable (the
15797         old algorithm only worked for the interpreter, but not for the jit)
15798
15799 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
15800
15801         * loader.c (method_from_memberref): use mono_class_get to get the
15802         class of an array instead of using System.Array directly.
15803         (mono_get_method): also add MEMBERREF methods to the method cache
15804         which usefull for arrays.
15805
15806 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
15807
15808         * pedump.c (arch_compile_method): added to compute vtable entry
15809
15810         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
15811         number of interfaces.
15812         
15813         * class.h: merged MonoArrayClass into MonoClass
15814
15815         * class.c (mono_class_create_from_typedef): compute the vtable size and
15816         allocate space to include the vtable inside MonoClass
15817         (mono_class_metadata_init): initialize the vtable
15818
15819 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
15820
15821         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
15822         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
15823         * image.c: endian fixes by Laurent Rioux.
15824         * object.h, object.c: rename MonoStringObject to MonoString and
15825         MonoArrayObject to MonoArray. Change some function names to conform to
15826         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
15827         guint16* as first argument, so don't use char*.
15828         Provide macros to do the interesting things on arrays in a portable way.
15829         * threads-pthread.c: updates for the API changes and #include <sched.h>
15830         (required for sched_yield()).
15831         * icall.c: updates for the API changes above.
15832         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
15833         platforms that need them.
15834
15835 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
15836
15837         * class.c: set the correct type for all the fundamental
15838         type when loading the class.
15839
15840 2001-10-05  Dick Porter  <dick@ximian.com>
15841
15842         * threads-pthread.c (pthread_mutex_timedlock): Simple
15843         compatibility version for C libraries that lack this call.
15844
15845 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
15846
15847         * class.c: MonoTypes stored in MonoClass are stored as
15848         fundamental MonoTypes when the class represents a
15849         fundamental type (System.Int32, ...).
15850         The TypeHandle return by ldtoken is a MonoType*.
15851         * icall.c: ves_icall_get_data_chunk () write out all the
15852         PE/COFF stuff. Implement ves_icall_define_method (),
15853         ves_icall_set_method_body (), ves_icall_type_from_handle ().
15854         * image.c: properly skip unknown streams.
15855         * loader.h, loader.c: add type_class to mono_defaults.
15856         * metadata.c, metadata.h: export compute_size () as
15857         mono_metadata_compute_size () with a better interface.
15858         Typo and C&P fixes.
15859         * pedump.c: don't try to print the entry point RVA if there is no entry point.
15860         * reflection.c, reflection.h: many cleanups, fixes, output method
15861         signatures and headers, typedef and typeref info, compress the metadata
15862         tables, output all the heap streams, cli header etc.
15863         * row-indexes.h: typo fixes.
15864
15865 2001-10-04  Dick Porter  <dick@ximian.com>
15866
15867         * object.h: Add a synchronisation mutex struct to MonoObject
15868
15869         * object.c (mono_new_object): Initialise the object
15870         synchronisation mutexes
15871
15872         * icall.c: System.Threading.Monitor internal calls
15873         
15874         * threads-pthread.h:
15875         * threads-pthread.c: System.Threading.Monitor internal calls
15876
15877         * threads-types.h: New file, includes the system-specific thread
15878         structures
15879         
15880         * threads-pthread-types.h:
15881         * threads-pthread-types.c: New files, handle pthread-specific
15882         synchronisation types
15883
15884         * threads-dummy-types.h: 
15885         * threads-dummy-types.c: New files of dummy support for
15886         thread-specific types
15887
15888         * metadata.c:
15889         * image.c:
15890         * pedump.c: include mono-endian.h not endian.h
15891         
15892         * Makefile.am: More threads files.
15893         Name mono-endian.h not endian.h
15894
15895 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
15896
15897         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
15898         stuff and implement a few more bits.
15899         * icall.c: a field needs to be dereferenced twice. Do not use the same
15900         name for two variables in the same scope.
15901         * image.c, image.h: cleanups.
15902
15903 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
15904
15905         * class.c (mono_class_metadata_init): bug fix: compute the right size
15906
15907 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
15908
15909         * icall.c: implemented some of the Reflection internalcalls.
15910         * image.c, image.h: start writing out the PE/COFF image.
15911         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
15912         that does the reverse than decode_blob_size ().
15913         * object.c: use mono_metadata_encode_value (). Move here
15914         temporary implementation of mono_string_to_utf8 ().
15915         * rawbuffer.c: make malloc_map static.
15916
15917 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
15918
15919         * metadata.c: fix type comparison for arrays.
15920         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
15921         Added a couple of new classes to monodefaults.
15922         * icall.c: added a couple of Reflection-related internalcalls.
15923         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
15924         Added a byval_arg MonoType to MonoClass.
15925
15926 2001-09-28  Dick Porter  <dick@ximian.com>
15927
15928         * icall.c:
15929         * threads-pthread.h: 
15930         * threads-pthread.c: Implemented internal calls for
15931         LocalDataStoreSlot operations.  Applied mutexes around all shared
15932         data.  Reworked the thread creation and Start() operations to
15933         avoid a race condition.
15934         
15935         * threads-dummy.h:
15936         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
15937
15938 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
15939
15940         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
15941
15942 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
15943
15944         * class.c, loader.c: warn and return NULL instead of erroring out.
15945         * icall.c: added System.AppDomain::getCurDomain().
15946         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
15947
15948 2001-09-25  Dick Porter  <dick@ximian.com>
15949
15950         * threads-pthread.h:
15951         * threads-pthread.c: Implemented timed thread joining and added
15952         System.Threading.Thread::Join_internal internal call
15953
15954         * icall.c: Added System.Threading.Thread::Join_internal internal call
15955
15956         * threads-dummy.h:
15957         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
15958
15959 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
15960
15961         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
15962         mono_string_intern () to implement the semantics of the ldstr opcode
15963         and the interning of System.Strings.
15964         * icall.c: provide hooks to make String::IsIntern and String::Intern
15965         internalcalls.
15966
15967 2001-09-23  Dick Porter  <dick@ximian.com>
15968
15969         * threads-dummy.c: 
15970         * threads-dummy.h: New files of dummy threading routines
15971
15972         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
15973         support code based on system specifics
15974
15975         Rename PTHREAD_LIBS to THREAD_LIBS
15976         
15977 2001-09-23  Dick Porter  <dick@ximian.com>
15978
15979         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
15980         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
15981         internal calls.
15982         (mono_thread_init): Set up a Thread object instance to return when
15983         the main thread calls Thread.CurrentThread
15984         (mono_thread_cleanup): Wait for all subthreads to exit
15985
15986         * icall.c: New internal calls for System.Threading.Thread::Sleep
15987         (including Schedule) and CurrentThread
15988
15989         * threads.h: New file, to insulate thread-specific stuff from the
15990         rest of the code
15991
15992 2001-09-21  Dick Porter  <dick@ximian.com>
15993
15994         * threads-pthread.h: 
15995         * threads-pthread.c: New file, for handling pthreads-style
15996         threading support.  Start() now starts a new thread and executes
15997         the ThreadStart delegate instance.
15998
15999         * icall.c: Added the internalcall for
16000         System.Threading.Thread::Start_internal
16001
16002         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
16003
16004 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
16005
16006         * loader.c: work around the different signatures for delegates
16007         constructors csc generates in compiled code vs the ones compiled in mscorlib.
16008
16009 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
16010
16011         * class.h, class.c: add mono_class_get_field_from_name ().
16012         * *: Fix C comments and other ANSI C issues.
16013
16014 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
16015
16016         * endian.h, assembly.c: fix some endianness issues.
16017
16018 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
16019
16020         * loader.h, load.c: add delegate_class to mono_defaults.
16021         Handle runtime provided methods in mono_get_method ().
16022
16023 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
16024
16025         * loader.c (mono_get_method): use pinvoke for internal call
16026
16027         * icall.c: use pinvoke for internal call
16028
16029         * loader.c (method_from_memberref): set the method name
16030
16031 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
16032
16033         * metadata.c: help the compiler generate better code for
16034         mono_class_from_mono_type ().
16035
16036 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
16037
16038         * class.c (mono_class_metadata_init): delayed computing of the
16039         class size to mono_class_metadata_init ()
16040
16041 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
16042
16043         * class.c, class.h: add an interfaces member to MonoClass.
16044         * image.c, image.h: add assembly_name field to MonoImage
16045         from the assembly table.
16046         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
16047
16048 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
16049
16050         * class.c: Handle Array in mono_class_from_mono_type ().
16051         * metadata.c, pedump.c: some endian fixes.
16052
16053 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
16054
16055         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
16056         * metadata.c: fix small problem introduced with the latest commit.
16057
16058 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
16059
16060         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
16061         We don't need a MonoMetadata pointer anymore to compare signatures in
16062         mono_metadata_signature_equal (), update callers.
16063         Reduced memory usage an number of allocations for MonoMethodHeader and
16064         MonoMethodSignature.
16065
16066 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
16067
16068         * metadata.c: added compare for szarray.
16069
16070 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
16071
16072         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
16073         and add a couple more types to it and mono_defaults. Give an hint on
16074         classes that need implementing in our corlib and are referenced
16075         in mscorlib.
16076
16077 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
16078
16079         * class.h, class.c: keep track if a class is also an Enum.
16080         * loader.c: Implement a couple more types for use in libffi
16081         marshalling. Gives better diagnostics when failing to dlopen
16082         a library. Set method->klass for P/Invoke methods, too.
16083
16084 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
16085
16086         * class.c, class.h: add a MonoType this_arg to MonoClass that
16087         represents a pointer to an object of the class' type that
16088         can be used by the interpreter and later the type cache.
16089         Add best guess alignment info for valuetype objects.
16090
16091 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
16092
16093         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
16094         into MonoType: one less level of indirection and allocation and
16095         simplifies quite a bit of code. Added cache for MonoTypes that are
16096         used frequently, so that we don't need to allocate them all the time.
16097
16098 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
16099
16100         * class.c (mono_class_create_from_typedef): System.Enum is also a
16101         value type, although it does not derive from System.ValueType
16102         (maybe a bug in the ms compiler?)
16103
16104         * metadata.c (mono_type_size): return the right size for value types
16105
16106         * loader.c (mono_get_method): only initialize method header if not abstract
16107
16108         * class.c (mono_class_from_mono_type): use mono_default values. 
16109
16110 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
16111
16112         * *: use MonoClass pointers instead of <type_tokens>
16113         
16114         * class.h: new flag: metadata_inited.
16115
16116         * class.c (mono_class_metadata_init): impl.
16117         (mono_class_instance_size): impl.
16118         (mono_class_data_size): impl.
16119
16120 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16121
16122         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
16123         MonoClass now has the name and name_space fields. 
16124         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
16125         mono_get_method () takes and optional MonoClass as argument.
16126         Removed mono_typedef_from_name() and added mono_class_token_from_name()
16127         instead that takes advantage of a map from class names to typedef
16128         tokens in MonoImage.
16129
16130 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
16131
16132         * metadata.c: zero is not a valid alignment boundary.
16133         Merge MONO_TYPE_VOID in default decoding code.
16134
16135 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
16136
16137         * image.h: merged MonoMetadata into MonoImage
16138
16139         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
16140         identify the type of elements.
16141
16142 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
16143
16144         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
16145         * cil-coff.h: split MonoMSDOSHeader and add size info.
16146         * image.c: add some consistency checks.
16147         * metadata.c: fix row size computation: one programmer
16148         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
16149         add explanation for the locator routine.
16150         Fix decoding of size in method header.
16151         
16152 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
16153
16154         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
16155         (g_concat_dir_and_file): Bring g_concat_dir_and_file
16156         function from gnome-libs.  This uses the right path separator
16157         based on the OS, and also works around a bug in some systems where
16158         a double slash is not allowed. 
16159         (default_assembly_name_resolver): Use g_concat_dir_and_file
16160         (mono_assembly_open): ditto.
16161
16162 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
16163
16164         * metadata.c (mono_metadata_signature_equal): impl.
16165
16166         * *: void is now a realy MonoType (instead of using NULL)
16167         
16168         * metadata.c (do_mono_metadata_parse_type): use
16169         mono_metadata_parse_type to parse void value.
16170
16171 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
16172
16173         * metadata.c, metadata.h: in the signature and method header store
16174         only the space required for holding the loca vars and incoming arguments.
16175
16176 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
16177
16178         * metadata.c (do_mono_metadata_parse_type): treat void like any
16179         other type (instead of assigning NULL);
16180
16181 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
16182
16183         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
16184
16185 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
16186
16187         * image.c (do_mono_image_open): added a cache for arrays.
16188
16189 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
16190
16191         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
16192         decode a single column from a row in a metadata table and changes
16193         to take advantage of it in the typedef locator (gives a nice speed up).
16194         Store offset info for function params.
16195
16196 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
16197
16198         * image.h (MONO_IMAGE_IS_CORLIB): removed 
16199
16200 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
16201
16202         * assembly.c: how could mono_assembly_close () had ever worked?
16203         * metadata.c, metadata.h: provide offset info for local vars.
16204         Implement mono_type_size () to take care of alignment as well
16205         as size (it was mono_field_type_size in cli/class.c before).
16206
16207 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
16208
16209         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
16210
16211         * assembly.h (CORLIB_NAME): set to corlib.dll
16212
16213         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
16214
16215 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
16216
16217         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
16218         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
16219         tokentype.h: massive namespace cleanup.
16220
16221 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
16222
16223         * metadata.h, metadata.c: decode exception clauses when parsing method header.
16224
16225 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
16226
16227         * metadata.c (mono_metadata_free_type): added check for type !=
16228         NULL (void) before calling mono_metadata_free_type()
16229
16230 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
16231
16232         * metadata.h, row_indexes.h: added header with enumerations to use
16233         to index in the columns from tables in metadata and to decode coded
16234         tokens: we should start using this instead of embedding magic numbers
16235         all over the code.
16236
16237 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
16238
16239         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
16240         Move metadata_t info from cli_image_info_t to MonoImage, where
16241         it's easily accessible. Changed all the uses accordingly.
16242         Added the method and class caches to MonoImage.
16243         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
16244         and mono_metadata_decode_value () signature to be more consistent
16245         with the other parse functions (and simplify code). Taken advantage
16246         of zero-length array allocation with GCC. Removed reduntant (and
16247         wrong) MonoFieldType struct and use MonoParam instead. Changed
16248         mono_metadata_parse_field_type () to use common code for parsing.
16249         Added mono_metadata_typedef_from_field () and
16250         mono_metadata_typedef_from_method () to lookup a typedef index from a
16251         field or method token.
16252         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
16253
16254 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
16255
16256         * metadata.c (mono_metadata_parse_field_type): Implement. 
16257         (do_mono_metadata_parse_type): Split engine from
16258         mono_metadata_parse_type, so that we can create smaller structures
16259         for things that just have one pointer to the MonoType (look at
16260         the MonoFieldType)
16261
16262 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
16263
16264         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
16265         as Jan Gray found out, it is incorrect. 
16266
16267 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
16268
16269         * assembly.c: Implement asssembly loading.  This loads an image
16270         and loads all the referenced assemblies.  Come to think of it, we
16271         could always do lazy loading of the assemblies. 
16272
16273         * image.c (mono_image_open): Keep loaded images in a hashtable.
16274
16275         * image.h (MonoImage): Add reference count.
16276
16277 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
16278
16279         * assembly.c (mono_assembly_open): Keep track of the file name in
16280         case the assembly has no ASSEMBLY table.
16281
16282         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
16283         from get.c here.
16284
16285 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
16286
16287         * metadata.c, metadata.h: decode local vars in method header
16288         parse function. Change callers accordingly.
16289
16290 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
16291
16292         * metadata.h, cil-coff.h: protect against multiple inclusion.
16293         Added some new structures to hold information decoded from metadata:
16294         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
16295         and relevant decoding/free functions.
16296         * metadata.c: implement decoding functions. Add warning for out of bounds
16297         index in mono_metadata_locate(). Implement mono_get_method () to retreive
16298         all the info about a method signature and invocation. Remove check on
16299         uninitialized local var in parse_mh() and fix memory leak.
16300
16301 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
16302
16303         * metadata.h: More macros.
16304
16305         * tokentype.h: New file.
16306
16307 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
16308
16309         * assembly.c: added a consistency check and initialize
16310         some structures with g_new0().
16311         * metadata.c: fixed a couple more bugs in table size computation
16312         and add other checks for out-of bound access to metadata.
16313
16314 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
16315
16316         * metatada.c: fix bugs computing table sizes. Spew a
16317         warning when index in string heap is out of bounds.
16318
16319 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
16320
16321         * metadata.h: Add a couple of macros to manipulate tokens. 
16322
16323 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
16324
16325         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
16326         cli_section_tables).
16327
16328 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
16329
16330         * metadata.c (mono_metadata_user_string): New function, provides
16331         access to the UserString heap. 
16332
16333 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
16334
16335         * metadata.c: Add inline documentation.
16336
16337 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
16338
16339         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
16340         files. 
16341
16342 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
16343
16344         * typeattr.h: New file, TypeAttribute flags. 
16345
16346 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
16347
16348         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
16349         mono_assembly_ensure_section): Section loading code.
16350         (load_section_tables): Load the sections.
16351
16352         * mono/metadata/metadata.c (mono_metadata_locate_token,
16353         mono_metadata_locate): Functions to locate the information
16354         definition given a token or a table and an index.
16355         (mono_metadata_compute_table_bases): New.
16356         (compute_size): New function to compute the sizes of the various
16357         tables.
16358
16359         * mono/metadata/metadata.h: Finish listing the different index
16360         types. 
16361
16362         * mono/metadata/pedump.c: Improve to dump new information.
16363
16364 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
16365
16366         * mono/metadata/metadata.c: Entered all the tables matching
16367         Beta2. 
16368
16369         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
16370
16371