2006-09-12 Martin Baulig <martin@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1 2006-09-12  Martin Baulig  <martin@ximian.com>
2
3         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
4         to array interfaces.
5
6 2006-09-11  Martin Baulig  <martin@ximian.com>
7
8         * reflection.c (mono_image_build_metadata): Create the
9         MethodImpl's after emitting all types and methods, so we don't
10         need another fixup pass for them.
11
12 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
13
14         * class.c (mono_class_from_name_case): Fix regression introduced by the last
15         change.
16
17 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
18
19         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
20         unload.
21
22 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
23
24         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
25         args is not set. Fixes #78926.
26
27 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
28
29         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
30
31         * image.c (load_class_names): Move this to class.c, and rename it to 
32         'mono_image_init_name_cache'.
33         (load_modules): Fix a warning.
34
35         * class.c icall.c image.c: Initialize image->name_cache lazily.
36
37         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
38         on its name using information in the AOT file.
39
40         * class.c (mono_class_from_name): Use the new hook function.
41
42 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
43
44         * reflection.c (mono_param_get_objects): Handle enum default parameter values
45         correctly.
46
47         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
48         Fixes #79289.
49         
50 2006-09-06  Martin Baulig  <martin@ximian.com>
51
52         * icall.c (mono_lookup_internal_call): Small fix.
53
54 2006-09-05  Raja R Harinath  <rharinath@novell.com>
55
56         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
57         double g_free.
58
59 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
60
61         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
62         when --debug is specified.
63
64 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
65
66         * class.c (setup_generic_array_ifaces): Fix a warning.
67
68 2006-09-04  Miguel de Icaza  <miguel@novell.com>
69
70         * Temporarily remove the patch to assemly.c that checks the
71         assembly versions as it breaks our gacutil.
72
73 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
74
75         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
76
77         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
78         a net 1.0 runtime.
79
80         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
81         created using the default ctor. Fixes #79152.
82         (mono_string_builder_to_utf16): Ditto.
83
84 2006-09-01  Martin Baulig  <martin@ximian.com>
85
86         Fix handling of the generic array interfaces.
87
88         * class-internals.h
89         (MonoDefaults): Removed `generic_array_class' and added
90         `generic_ilist' class.
91
92         * class.c
93         (mono_bounded_array_class_get): Add the new generic array interfaces.
94         (setup_generic_array_ifaces): New static method; create vtable
95         entries for each method in the generic array interfaces.
96
97         * metadata.c
98         (select_container): Allow "parent-less" generic methods.
99
100         * marshal.c
101         (mono_marshal_get_generic_array_helper): New public method.
102
103         * icall.c
104         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
105         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
106         moved the interncall into System.Array.
107
108 2006-09-01  Raja R Harinath  <rharinath@novell.com>
109
110         A few more cases of avoiding work on types with ->byref set.
111         Has the real fix for #79238
112         * icall.c (is_generic_parameter): New helper.
113         (ves_icall_Type_GetGenericParameterPosition): Use it.
114         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
115         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
116         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
117         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
118         reference types.
119         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
120         reference types.
121         (ves_icall_Type_get_IsGenericInstance): Likewise.
122         (ves_icall_Type_get_IsGenericType): Likewise.
123
124 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
125
126         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
127         class if possible.
128
129         * mempool.h (mono_mempool_get_allocated): New helper function.
130
131         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
132         change.
133
134         * mempool.c: Fix warnings and the calculation of stats.
135
136         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
137
138         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
139
140         * loader.c (mono_get_method_from_token): Update method_count stat.
141
142         * class-internals.h (MonoStats): Add some stats.
143
144 2006-08-31 Robert Jordan  <robertj@gmx.net>
145
146         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
147         with managed variants.
148         All code is contributed under the MIT/X11 license.
149         
150 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
151
152         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
153         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
154
155         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
156
157         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
158         with cycles in classes.
159
160         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
161
162         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
163         missing a [MarshalAs] directive. Fixes #79203.
164
165         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
166         klass->marshal_info. Fixes #79217.
167
168 2006-08-30  Martin Baulig  <martin@ximian.com>
169
170         Committing a patch from Joachim Ante <joe@otee.dk>:
171         Add support for binary data symbol stores.
172
173         * debug-mono-symfile.c
174         (mono_debug_open_mono_symbol_file): Renamed into
175         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
176         arguments.
177
178         * mono-debug.c
179         (mono_debug_open_image): Added `raw_contents' and `size' args.
180         (mono_debug_init_2_memory): New public function.
181
182 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
183
184         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
185
186 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
187
188         * appdomain.c: implement support for ShadowCopyFiles.
189
190 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
191
192         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
193         when value is NULL (and should remove CID #51).
194
195 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
196
197         * image.c: moved 2 functions to ../utils.
198
199 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
200
201         * gc.c: cope with the target object of a GC handle being NULL
202         (bug #78877).
203
204 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
205
206         * class.c: recursively check parent's explicit implementations
207         of interface methods (fixes bug #79125).
208
209 2006-08-19  Miguel de Icaza  <miguel@novell.com>
210
211         * filewatcher.c: Avoid warnings when building, do not redefine
212         constants that are defined.
213
214         Remove warnings.
215
216 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
217
218         * image.c: don't fail when the link points to an absolute path.
219
220 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
221
222         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
223         Fix CID #3.
224
225 2006-08-17  Miguel de Icaza  <miguel@novell.com>
226
227         * image.c (full_path): A new method used to obtain the actual path
228         of an assembly even in the presence of symbolic links.  
229
230         This is necessary for the case where we are running a binary that
231         has been GACed, but we are using the "published" path name
232         ($prefix/mono/1.0/blah.exe) which happens to point to the real
233         file in the GAC.
234
235         This was the source of the failure for the `xsp' command with the
236         recent AppDomain changes, as far as the runtime was concerned,
237         there were two different assemblies: $prefix/mono/1.0/blah.exe and
238         $prefix/mono/gac/blah/version/blah.exe.
239
240         (do_mono_image_open): use full path
241
242 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
243
244         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
245
246 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
247
248         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
249         domain_id is supplied. Fix CID #241 and corlib's unit tests.
250
251 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
252
253         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
254         small structures. Fixes #78990.
255
256 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
257
258         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
259
260         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
261
262 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
263
264         * appdomain.c:
265         * marshal.c: don't load all the assemblies from a domain into newly
266         created ones. The new domains might have different rules and load
267         assemblies from different locations. Fixes bug #76757.
268
269         Patch by Lluis. Conflicts resolved by Brian Crowell.
270
271 2006-08-16  Alp Toker  <alp@atoker.com>
272
273         * socket-io.c: First half of the fix for #79084.
274         Set sa_size to the length of the content, not that of the struct.
275         Don't add NULL suffix to the content, this should be done in
276         managed code if needed.
277
278 2006-08-14  Raja R Harinath  <rharinath@novell.com>
279
280         Fix part of #79012
281         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
282         mono_metadata_parse_type returns NULL.
283
284 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
285
286         * normalization-tables.h : new file for string normalization data.
287         * locales.c, locales.h, icall.c :
288           added load_normalization_resource() for string normalization,
289           and icall as well.
290         * Makefile.am : added normalization-tables.h to the sources.
291
292 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
293
294         * marshal.c: Add more helper functions to reduce code duplication and use them
295         everywhere.
296
297 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
298
299         * marshal.c: Fix non-x86 stdcall warnings.
300         
301         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
302         them everywhere.
303
304 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
305
306         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
307         type check on multi-dimensional arrays. Fixes #79000.
308
309 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
310
311         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
312         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
313         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
314         * class-internals.h: add is_com_object to class structure.
315         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
316         null checks to COM object marshalling. Fix .ctor call on RCW.
317         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
318         
319         All code is contributed under the MIT/X11 license.
320
321 2006-08-09  Dick Porter  <dick@ximian.com>
322
323         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
324         racing mono_monitor_allocator_lock() somewhere, so don't delete
325         the critical section for now.  Found by running and exiting
326         monodevelop.
327
328 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
329
330         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
331         (ves_icall_System_ComObject_FindInterface): Ditto.
332         (ves_icall_System_ComObject_CacheInterface): Ditto.
333
334         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
335         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
336
337 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
338
339         * threadpool.c: treat pipes from process asynchronous reads as sockets
340         when reading from them, so we get select/poll or epoll to wait for
341         data.
342
343 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
344
345         * loader.c: Fix a typo (CID #233) in the null check.
346
347 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
348
349         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
350         Hopefully fixes #78949.
351         
352         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
353         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
354         bytes. Fixes #78972.
355
356 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
357
358         * filewatcher.c: we need to set errno here.
359
360 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
361
362         * filewatcher.c: let Win32Exception get the error value.
363
364 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
365
366         * filewatcher.c: translate errno into win32 errors for Win32Exception
367         to know what happened.
368
369 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
370
371         * threadpool.c: Fix more warnings.
372
373         * assembly.c (search_loaded): Fix warnings.
374
375         * threadpool.c (mono_thread_pool_finish): Fix warnings.
376         (mono_async_invoke): Ditto.
377
378 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
379
380         * object.c (mono_remote_class_vtable): Need to create proxy vtable
381         entries for __ComObject type in addition to ComImport types.
382         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
383         about hash table.
384         
385         All code is contributed under the MIT/X11 license.
386
387 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
388
389         * image.c: avoid tentative loading of modulerefs that contain
390         no metadata (P/Invoke library names).
391
392 2006-07-28  Dick Porter  <dick@ximian.com>
393
394         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
395         mono_loader_lock() somewhere, so don't delete the critical section
396         for now.  Found by running and exiting monodevelop.
397
398 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
399
400         * filewatcher.c: define the inotify syscalls when we're building on
401         linux and have sys/syscall.h. The build system might not have support
402         for inotify but the target system might have it.
403
404 2006-07-26  Miguel de Icaza  <miguel@novell.com>
405
406         * domain.c: Documentation updates.
407
408         * loader.c (mono_free_method): Do not release the method
409         information if we are being profiled, as profilers will use this
410         information at shut down to present some data to the user.
411
412         This is needed so that the profiler does not crash, as the
413         profiler tends to keep MonoMethods around, and they might become
414         invalid if we free these.
415
416         (mono_get_method_constrained): Return the original CIL stream
417         method as well, so verification can be performed against it.
418
419 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
420
421         * filewatcher.[ch]: support for inotify file system watcher.
422         * icall.c: add new internal calls for the inotify file system watcher.
423
424 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
425
426         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
427         #78888.
428
429 2006-07-20  Dick Porter  <dick@ximian.com>
430
431         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
432         warning.
433
434 2006-07-20  Dick Porter  <dick@ximian.com>
435
436         * threads.c (start_wrapper): Do the thread cleanup while we still
437         hold a reference to its object.  Fixes bug 78123.
438
439 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
440
441         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
442         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
443           "managed-to-managed".
444         * icall.c: Redirect string constructors that take sbyte* to
445           ves_icall_System_String_ctor_RedirectToCreateString.
446         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
447           to CreateString () methods with matching signature.
448         * reflection.c: Use original security informations for
449           MONO_WRAPPER_MANAGED_TO_MANAGED.
450         * security-manager.c: Use original security informations for
451           MONO_WRAPPER_MANAGED_TO_MANAGED.
452         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
453           that is a placeholder and only its address should be used.
454         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
455           that is a placeholder and only its address should be used.
456
457 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
458
459         Begin implementing COM Interop.
460         * appdomain.c: Increment corlib version.
461         * class.c: Set ComImport classes' parent to __ComObject.
462         * loader.c: Mark cominterop methods as such.
463         * domain.c: Add __ComObject class to MonoDefaults structure.
464         * image.c: Add 2 hashtables to the image for COM Interop related methods
465         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
466         using the mempool allocator
467         
468         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
469         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
470         declaration for mono_metadata_type_dup_mp.
471         
472         * debug-helpers.c: Added strings for two additional wrapper types
473         * object.c: Create proxy objects for ComImport classes
474         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
475         and added __ComObject class to MonoDefaults structure.
476         
477         * object-internals.h: Finish MonoRealProxy definition, and add definition of
478         MonoComInteropProxy and MonoComObject.
479         
480         * marshal.c: Added support for COM Interop
481         (signature_cominterop): Converts managed signature to corresponding
482         unmanaged COM signature.
483         (cominterop_get_function_pointer): gets unmanaged function pointer via
484         COM object vtable
485         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
486         (cominterop_get_method_interface): returns interface type that method is defined on
487         (mono_mb_emit_cominterop_call): emits native call to function pointer
488         gotten from vtable
489         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
490         that matches signature of unmanaged function.
491         (cominterop_get_native_wrapper): wrapper around adjusted method call.
492         (cominterop_get_invoke): forwards call from proxy to __ComObject
493         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
494         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
495         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
496         
497         * marshal.h: Added Marshal icall declarations.
498         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
499         so we can access them in finalizer
500         
501 2006-07-14  Dick Porter  <dick@ximian.com>
502
503         * object.c (mono_type_initialization_cleanup): Fix a race
504         condition by temporarily commenting out the critical section
505         deletion.
506
507 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
508
509         * reflection.c (create_custom_attr): Fix some warnings.
510         (create_custom_attr_data): Ditto.
511         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
512         types. Fixes #78855.
513
514 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
515
516         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
517
518         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
519
520 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
521
522         * reflection.c (resolve_object): Add support for DynamicMethod.
523
524         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
525         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
526
527 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
528
529         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
530         don't leak GPtrArray's pdata has we have no use (nor free) for it.
531
532 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
533
534         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
535         Fixes #77888.
536
537 2006-06-30  Raja R Harinath  <rharinath@novell.com>
538
539         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
540         slightly: remove a shadow local variable.
541
542 2006-06-29  Raja R Harinath  <rharinath@novell.com>
543
544         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
545         definition that introduces the virtual function slot.
546         Also fix Coverity #105.
547
548 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
549
550         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
551         for dynamic assemblies. Fixes #78724.
552
553 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
554
555         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
556         Fixes #78722.
557
558 2006-06-21  Martin Baulig  <martin@ximian.com>
559
560         * reflection.c
561         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
562         fixes #76484.
563
564 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
565
566         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
567
568 2006-06-20  Raja R Harinath  <rharinath@novell.com>
569
570         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
571         nor TYPEREFs.
572         * class.c (mono_class_create_from_typespec): Add 'context' argument.
573         Inflate result if necessary.
574         (mono_class_get_full): Remove old version.  Rename from
575         'mono_class_get' and add 'context' argument.  Pass it to
576         ..._create_from_typespec.
577         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
578         (mono_ldtoken): Revert change below.
579
580 2006-06-20  Martin Baulig  <martin@ximian.com>
581
582         * class.c (mono_ldtoken): Don't pass the generic context to
583         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
584
585 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
586
587         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
588         and later freeing it. Fixes #78638.
589
590 2006-06-15  Miguel de Icaza  <miguel@novell.com>
591
592         * icall.c (mono_class_get_throw): Revert over-zealous error
593         throwing, the caller for mono_class_get_throw will cope with
594         errors when classes are not properly initialized already.
595
596         The code still copes with loader exceptions though.
597
598         Fixes the regression in reftype1 and reftype3 from the CAS tests.
599         
600 2006-06-14  Miguel de Icaza  <miguel@novell.com>
601
602         Fixes the `make run1' version of RuntimeAbort (to be commited,
603         source is in Bugzilla).
604         
605         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
606         FALSE on class loading failure instead of returning true.
607
608         * class.c (mono_class_create_from_typedef): It is possible for
609         mono_metadata_interfaces_from_typedef_full to fail if a class is
610         not found, cope with this.
611         
612
613 2006-06-14  Dick Porter  <dick@ximian.com>
614
615         * socket-io.c: 
616         * process.c: Fix a bunch of signed/unsigned warnings from gcc
617         4.1.1
618
619 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
620
621         * culture-info-table.h : oops, forgot to make it nsync with r61548.
622
623 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
624
625         * icall.c: Another fix for building mono in Visual Studio.
626
627 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
628
629         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
630         
631 2006-06-09  Martin Baulig  <martin@ximian.com>
632
633         * debug-mono-symfile.c: Put this back and really fix it this
634         time. Sorry for all the trouble.
635
636 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
637
638         * icall.c (mono_class_get_throw): Fix a warning.
639         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
640         ReflectionTypeLoadException if needed. Fixes #78606.
641
642         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
643         (mono_class_init): Ditto.
644
645         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
646         ref_only exceptions.
647         (mono_loader_clear_error): Make this work even if there is no error.
648
649 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
650
651         * object-internals.h marshal.c marshal.h icall.c: Implement method 
652         Marshal.GetComSlotForMethodInfo using internal call.
653
654 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
655
656         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
657         a function for signalling it.
658
659         * class.c (mono_class_from_typeref): Use the new kind of loader error when
660         a referenced assembly is not found.
661
662         * loader.c (mono_loader_error_prepare_exception): Add support for 
663         LOADER_ERROR_ASSEMBLY. Fix formatting.
664
665 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
666
667         * domain.c appdomain.c class-internals.h marshal.c: Add support 
668         for VARIANT marshalling on windows and increment corlib version
669         since Variant struct was added.
670
671 2006-06-03  Miguel de Icaza  <miguel@novell.com>
672
673         * debug-mono-symfile.c: Revert Martin's previous patch which broke
674         stack trace line information:
675
676         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
677         (Martin) when looking up B which is between A and C, return A not C.
678
679         Bug is #78573.
680
681         Thanks to Alexander Olk for tracking this down.
682
683 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
684
685         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
686         
687         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
688         avoid clobbering its value.
689         (mono_string_to_lpstr): Fix a warning on windows.
690
691 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
692
693         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
694
695         * reflection.c loader.c: Removed references to 'dummy' flag.
696
697         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
698
699         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
700         it gets GC tracking.
701
702         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
703         GC tracking.
704         
705         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
706
707         * marshal.c threadpool.c: Update callers of mono_async_result_new.
708
709         * appdomain.c: Bump corlib version.
710
711 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
712
713         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
714         CEE_STIND_REF when working with object references.
715
716 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
717
718         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
719         Fixes #78539.
720
721 2006-05-30  Miguel de Icaza  <miguel@novell.com>
722
723         * loader.c (method_from_memberref): Fix argument value for
724         mono_loader_set_error_method_load (I was passing the MonoClass
725         instead of the class name char *).
726
727 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
728
729         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
730         CEE_STIND_REF when working with object references.
731
732 2006-05-30  Martin Baulig  <martin@ximian.com>
733
734         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
735         mono_method_full_name() change and replace the ':' with a '.'
736         here.
737
738 2006-05-30  Martin Baulig  <martin@ximian.com>
739
740         * debug-mono-symfile.c
741         (mono_debug_symfile_lookup_location): Fix the algorithm:
742         when looking up B which is between A and C, return A not C.
743
744 2006-05-29  Martin Baulig  <martin@ximian.com>
745
746         * mono-debug.h
747         (MonoDebugMethodInfo): Make the typedef public.
748         (MonoDebugSourceLocation): New public struct.
749
750         * mono-debug.c
751         (mono_debug_source_location_from_address): Removed.
752         (mono_debug_source_location_from_il_offset): Removed.
753         (mono_debug_il_offset_from_address): Removed.
754         (mono_debug_address_from_il_offset): Removed.
755         (mono_debug_lookup_method): New public function.
756         (mono_debug_lookup_source_location): New public function; replaces
757         the old mono_debug_source_location_from_*() functions; see the
758         inline documentation.
759         (mono_debug_free_source_location): New public function.
760         (mono_debug_print_stack_frame): New public function; see the
761         inline documentation.
762
763         * debug-mono-symfile.c
764         (mono_debug_find_source_location): Renamed into
765         mono_debug_symfile_lookup_location(); only take a
766         `MonoDebugMethodInfo *' and an `offset' argument; added inline
767         documentation.
768         (mono_debug_find_method): Renamed into
769         mono_debug_symfile_lookup_method().
770
771 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
772
773         * assembly.c (mono_assembly_open_full): Dont overwrite the status
774         returned by mono_image_open_full ().
775
776         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
777         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
778         #78517.
779
780         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
781         #78518.
782
783 2006-05-27  Miguel de Icaza  <miguel@novell.com>
784
785         * class.c (mono_class_from_typeref): handle missing images
786         earlier, deals with bug #78418.   Refactor code; 
787
788         Fix a warning introduced in my previous commit (some stale code
789         from before I revisited my patch).
790
791         * class.c (mono_class_create_from_typedef): On failure, remove the
792         class from the MonoImage->class_cache as the class is not
793         initialized;   Fixes the leak pointed out by Paolo.
794
795 2006-05-25  Dick Porter  <dick@ximian.com>
796
797         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
798         DeleteCriticalSections until I figure out which one may still be
799         sometimes locked when mono_thread_cleanup is called.
800
801 2006-05-24  Dick Porter  <dick@ximian.com>
802
803         * threads.c (mono_thread_cleanup): Move the threading cleanup out
804         of mono_thread_manage and back into its own function, so it can be
805         called after the finalizer thread has finished.
806
807         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
808
809 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
810
811         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
812         Fixes #78495.
813
814         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
815         with non-blittable elements.
816         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
817
818 2006-05-24  Martin Baulig  <martin@ximian.com>
819
820         * mono-debug-debugger.h (MonoDebuggerEvent): Added
821         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
822
823         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
824         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
825         `mono_debugger_event_handler' to NULL.
826
827 2006-05-24  Martin Baulig  <martin@ximian.com>
828
829         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
830
831 2006-05-24  Martin Baulig  <martin@ximian.com>
832
833         * mono-debug-debugger.h
834         (mono_debugger_create_notification_function): Added
835         `MonoCodeManager *' argument.
836
837 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
838
839         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
840
841 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
842
843         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
844         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
845         implementation.
846
847 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
848
849         * icall.c: precise GC support: objects can't be stored in unmanaged
850         memory anymore, even if they are kept alive by other references: since
851         they can move the GC needs to be able to always find them.
852
853 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
854
855         * object.c: precise GC support for static fields. Support
856         for moving GCs: write barriers and pinned allocation for interned
857         strings.
858
859 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
860
861         * domain.c, domain-internals.h: precise GC support for the MonoDomain
862         structure.
863
864 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
865
866         * class.c, gc.c: sgen and precise GC updates.
867
868 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
869
870         * marshal.h, marshal.c: added write barrier wrapper and precise type
871         fixes.
872
873 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
874
875         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
876         support.
877
878 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
879
880         * reflection.c: precise and sgen GC updates.
881
882 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
883
884         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
885
886 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
887
888         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
889
890 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
891
892         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
893         MONO_TYPE_OBJECT. Fixes #78462.
894
895 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
896
897         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
898         and blittable types.
899
900 2006-05-17  Miguel de Icaza  <miguel@novell.com>
901
902         * class.c (mono_class_get_exception_for_failure): Implement parts
903         of a TODO: if the loader error is set (instead of the class
904         error), we return a Loader exception that can be properly thrown
905         elsewhere.
906
907         This was exposed by some Winforms 2.0 code that I tried to run
908         (Atsushi pointed me to it).
909
910 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
911
912         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
913         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
914         
915         * marshal.c (emit_marshal_vtype): Add limited support for 
916         UnmanagedType.LPStruct. Fixes #78427.
917
918         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
919         Applied a patch from kangaroo to fix #77523.
920
921 2006-05-17  Martin Baulig  <martin@ximian.com>
922
923         * threads.c
924         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
925         (debugger_thread_created): Removed.
926         (debugger_thread_exited): Removed.
927
928 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
929
930         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
931
932         * object-internals.h (MonoReflectionResource): Sync with managed version.
933
934 2006-05-12  Wade Berrier <wberrier@novell.com>
935
936         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
937
938 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
939
940         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
941         functions try to allocate from the image mempool.
942
943 2006-05-12  Dick Porter  <dick@ximian.com>
944
945         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
946
947 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
948
949         * object.c: The FieldGetter and FieldSetter methods require the full
950         name of the class, not only the name. Fixes bug #78277.
951
952 2006-05-11  Miguel de Icaza  <miguel@novell.com>
953
954         * loader.c (method_from_memberref): Do not pass the NULL klass to
955         mono_loader_set_error_() methods.  Pass the non-NULL value
956         (class). 
957
958 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
959
960         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
961         (mono_assembly_close): Null out assembly->image->references after freeing it.
962
963         * image.c (mono_image_close): Free image->references.
964         
965         * reflection.c (mono_image_basic_init): Fix a small memory leak.
966
967 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
968
969         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
970         before checking if it's NULL (g_assert).
971
972 2006-05-10  Martin Baulig  <martin@ximian.com>
973
974         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
975         I thought I already killed that two months ago, but now it somehow reappeared.
976
977 2006-05-10  Martin Baulig  <martin@ximian.com>
978
979         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
980
981 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
982
983         * reflection.c: Allocate memory for dynamically created methods in the image
984         mempools.
985
986 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
987
988         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
989         don't use the ad pointer before checking if it's NULL (g_assert).
990
991 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
992
993         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
994         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
995
996         * marshal.c: Allocate all signatures from mempools.
997
998         * marshal.c: Allocate some more signatures from mempools.
999
1000 2006-05-09  Miguel de Icaza  <miguel@novell.com>
1001
1002         * object.c (mono_load_remote_field): The code used to provide a
1003         temporary variable for returning results if the user did not
1004         provide a result pointer.  But our temporary variable was allocted
1005         on the satck.
1006
1007         Fix calling code to always pass a result area.   Coverity ID 103.
1008
1009 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
1010
1011         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1012         value, not the old. Fixes #78312.
1013         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1014
1015         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
1016         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
1017         per-image cache.
1018
1019         * assembly.c (mono_assembly_close): Free image->references.
1020
1021         * assembly.c (mono_assembly_names_equal): Fix a warning.
1022         (mono_assemblies_cleanup): Cleanup more global data.
1023
1024         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1025
1026         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1027         ptr_cache and image->modules.
1028
1029         * image.c (mono_image_init): Allocate array_cache lazily.
1030         
1031 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1032
1033         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1034         behavior was changed recently and has bad side effects.
1035
1036 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
1037
1038         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1039         
1040         * assembly.c (mono_assembly_close): Remove a debug printf.
1041
1042         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1043
1044         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1045         to also allow for temporary references between mono_image_open ()/close ().
1046
1047         * domain.c (get_runtimes_from_exe): Add a FIXME.        
1048
1049 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
1050
1051         * marshal.c: Fix support for dynamic methods.
1052
1053         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1054
1055         * marshal.c (mono_marshal_cleanup): New cleanup function.
1056
1057         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
1058         image mempools.
1059
1060         * class.c (mono_class_init): Fix leaking class->nested_classes.
1061
1062         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1063
1064         * image.c (mono_image_init): Initialize the new cashes.
1065
1066         * image.c (mono_image_close): Destroy the new cashes.
1067
1068         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1069
1070         * mempool.c (mono_mempool_strdup): New helper function.
1071
1072         * class-internals.h: Add prototype for mono_loader_unlock ().
1073
1074         * domain.c (mono_jit_info_table_find): Fix a warning.
1075         (mono_debugger_check_runtime_version): Ditto.
1076
1077         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
1078         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1079         functions to these modules.
1080
1081         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1082         metadata modules.
1083         
1084         * marshal.c (mono_free_bstr): Fix a warning.
1085
1086         * assembly.c (mono_assembly_open_full): Fix another small leak.
1087
1088         * object.c: Fix some unload leaks in the remoting code.
1089
1090         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1091         function.
1092
1093         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1094
1095         * reflection.c: Fix some unload leaks in dynamic assemblies.
1096
1097 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
1098
1099         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1100         * marshal.h: Add BSTR support on Win32
1101         * icall.c: Add BSTR icalls
1102         * metadata.h: Add BSTR enums
1103
1104 2006-04-28  Miguel de Icaza  <miguel@novell.com>
1105
1106         Work to catch the crash from #76795 and turn it into an
1107         exception.   As I stubbed out pieces of the VisualBasic support,
1108         I found a number of places where the code was failing and I added
1109         checks to those places. 
1110         
1111         * metadata.c (do_mono_metadata_parse_generic_class): Make this
1112         function return a status code.  If we fail to parse the signature
1113         from mono_metadata_parse_generic_inst, return FALSE.
1114
1115         * loader.c (mono_get_method_from_token): If we fail to load the
1116         method (mono_class_get) return NULL.   
1117
1118         * (method_from_memberref): Return NULL if we are unable to parse
1119         the method signature
1120
1121         (mono_loader_error_prepare_exception): Since we now use the
1122         loader_error flag internally to stop processing, and obtaining
1123         exceptions that might be thrown will walk this code path the
1124         proper way of going from a MonoLoaderError into a
1125         MonoException was convoluted.   This new routine encapsulates the
1126         process of turning the error into an exception and *clearing* the
1127         error afterwards.
1128         
1129 2006-04-27  Miguel de Icaza  <miguel@novell.com>
1130
1131         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1132         with missing assemblies), and to cope with:
1133
1134                 * Missing fieldref from a non-existing assembly.
1135                 * Missing methodref from a non-existing assembly.
1136
1137         The first batch of work to address *some* of the issues from 76661.
1138         
1139         * object.c (mono_class_create_runtime_vtable): If we fail to
1140         initialize the class raise the exception here. 
1141
1142         * metadata.c (mono_class_get_overrides_full): If any methods fail
1143         to load return the failure to the caller.
1144
1145         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1146         flagging assemblies that failed to load.   
1147
1148         Do not crash if we are unable to load the assembly.
1149
1150         (mono_assembly_close): Do nothing with REFERENCE_MISSING
1151         assemblies. 
1152
1153         * loader.c (mono_loader_set_error_type_load): Change the
1154         convention to always pass unallocated strings, so we make our own
1155         copies (I know our own code had duplicated strings before, but
1156         this keeps the normal conventions).
1157         (method_from_memberref): Call mono_loader_set_error_method_load
1158         for all possible failures of loading the class. 
1159         Remove assert, turn into a loader error.
1160
1161         (mono_loader_error_to_exception): Move this routine from mini
1162         (mini_loader_error_to_exception) there was no need to have that in
1163         mini. 
1164
1165         * class.c (mono_class_from_typeref): If we were not able to load
1166         the assembly with mono_assembly_load_reference, call the
1167         mono_loader_set_error_type_load to register the problem.
1168
1169         (mono_class_setup_fields): If we fail to load the type from
1170         mono_metadata_parse_type_full, call mono_class_set_failure and
1171         break from the loop.
1172
1173         If class->exception_type is set, we do not layout the fields as
1174         that might crash the runtime, and instead return (from breaking
1175         from the previous loop).
1176
1177         (mono_class_setup_vtable): This now returns a boolean indicating
1178         whether the table was properly setup.   The decision is driven by
1179         mono_class_get_overrides_full which might run into non-existing
1180         methods. 
1181         
1182         (mono_class_init): Returns TRUE on success or FALSE if there was a
1183         problem in loading the type (incorrect assemblies, missing
1184         assemblies, methods, etc).
1185
1186         When we call mono_class_setup_fields we also check for a potential
1187         error inside this call (either a class exception or a general
1188         loader exception).
1189
1190         (mono_class_create_from_typedef): If the parent fails to load
1191         (calling mono_class_get_full) return NULL.
1192         
1193         ** Important **
1194
1195         calls to mono_metadata_parse_type_full should be checked
1196         everywhere and set the mono_class_set_failure
1197         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1198
1199         The current patch checks the places where my manually constructed
1200         tests show the errors are showing up, but we should do it
1201         everywhere. 
1202
1203         ** Important2 **
1204
1205         mono_class_init return values should be tested everywhere, like
1206         the previous case this is something that we should audit
1207         everywhere and not only on the cases exposed by the tests I
1208         created. 
1209
1210 2006-04-26  Miguel de Icaza  <miguel@novell.com>
1211
1212         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1213         boolean parameter and instead pass the information on `options'
1214         parameter (FileOptions).
1215
1216         * icall.c: Register the new signature for MonoIO.Open.
1217
1218         * debug-helpers.c (dis_one): Trying to understand how coverity
1219         works.  Fix Run 5, item 78.
1220
1221 2006-04-26  Dick Porter  <dick@ximian.com>
1222
1223         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1224         dereference.
1225
1226 2006-04-25  Martin Baulig  <martin@ximian.com>
1227
1228         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1229
1230         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1231         debugger_thread_created().
1232         (debugger_gc_push_all_stacks): Don't handle the main thread in any
1233         special way.
1234         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1235         (mono_debugger_finalize_threads): New function; undo the effects
1236         of mono_debugger_init_threads().
1237         (mono_debugger_create_all_threads): Removed.
1238
1239 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
1240
1241         * image.c (mono_image_close): Tidy up trace messages.
1242
1243         * assembly.c (mono_assembly_close): Ditto.
1244
1245         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1246         no longer references an already freed assembly. Fixes #78168.
1247
1248 2006-04-21  Dick Porter  <dick@ximian.com>
1249
1250         * threads.c (mono_thread_detach): Fix reference counting when
1251         detaching threads.
1252
1253 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
1254
1255         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1256         #78155.
1257
1258 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
1259
1260         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1261         (mono_type_to_stind): Ditto.
1262
1263         * marshal.c: Use the new helper functions to simplify code.
1264
1265         * image.c (mono_image_close): Add some code for help debug assembly unloading
1266         problems.
1267
1268         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1269         image mempool.
1270
1271         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1272         assembly was already loaded in another appdomain. Fixes #78083.
1273
1274 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
1275
1276         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1277         referenced assemblies.
1278         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1279
1280         * domain.c (mono_domain_free): Add a trace message.
1281
1282         * appdomain.c (add_assemblies_to_domain): Ditto.        
1283
1284         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1285         field.  
1286
1287 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1288
1289         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1290
1291 2006-04-12  Martin Baulig  <martin@ximian.com>
1292
1293         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1294         `USE_INCLUDED_LIBGC'.   
1295
1296 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1297
1298         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1299         the patch contains ../ and a small directory name later. Hopefully fixes
1300         #78035.
1301
1302 2006-04-10  Martin Baulig  <martin@ximian.com>
1303
1304         Clean up the debugger's thread-handling code.
1305
1306         The debugger's thread-handling code has been moved from
1307         ../mini/debug-debugger.c to threads.c.  We now iterate directly
1308         over the `threads' hash, keep track of exiting threads and also
1309         use proper locking.
1310
1311         We can now debug XSP and XSP based applications with the debugger.
1312
1313         * object-internals.h (MonoThread): Added `gpointer end_stack'.
1314
1315         * threads.h
1316         (MonoThreadCallbacks): Removed; this was only used by the debugger.
1317         (mono_install_thread_callbacks): Likewise.      
1318
1319         * threads.c (mono_thread_callbacks): Removed.
1320         (debugger_thread_created, debugger_thread_exited): New static functions.
1321         (start_wrapper): Call debugger_thread_created().
1322         (thread_cleanup): Call debugger_thread_exited().
1323         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1324         (mono_debugger_init_threads): New public function.
1325         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1326         iterate directly over the `threads' hash and also use proper locking.
1327
1328         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1329
1330         * mono-debug-debugger.h
1331         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1332
1333 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
1334
1335         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
1336         argument type=array. Fixes #78057.
1337
1338 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
1339
1340         * culture-info-table.h : regenerated. Fixed bug #69652.
1341
1342 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
1343
1344         * loader.c metadata.c: Reapply a variant r59116.
1345         
1346         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1347
1348         * class.c (mono_class_setup_interface_offsets): New internal function.
1349
1350         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1351         interfaces too. Fixes #77398.
1352
1353         * reflection.c (encode_cattr_value): Add support for 
1354         parameter type=object, argument type=array.
1355         (load_cattr_value): Ditto. Fixes #77916.
1356
1357         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1358         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1359
1360         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1361         a byval char array and CharSet is Ansi.
1362
1363         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1364
1365 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
1366
1367         * metadata.c: Add some locking comments.
1368         
1369         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1370         mempool.
1371         (mono_metadata_free_method_signature): Don't free the signature itself.
1372
1373         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
1374
1375         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1376         reference the same MonoImage.
1377         (mono_assembly_load_from_full): Add an assert.
1378
1379 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
1380
1381         * image.c (mono_image_close): Don't put the image we are about to free into the
1382         loaded_images_guid_hash.
1383
1384         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1385         to reduce code duplication.
1386
1387         * marshal.c: Register the native functions called by this module as icalls, to
1388         somewhat centralize the creation of MonoMethodSignature's.
1389
1390         * loader.c (mono_method_signature): Add a cache for method signatures.
1391
1392         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1393         the parameter attributes of a method.
1394         (mono_metadata_parse_method_signature_full): Refactored the computation of
1395         parameter attributes into a separate function. Also avoid one allocation in
1396         most cases.
1397
1398         * assembly.c (mono_assembly_close): Ditto.
1399
1400         * image.c (mono_image_close): Log trace messages with INFO level.
1401
1402         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1403
1404         * image.c reflection.c: Correct reference counting of image modules.
1405         
1406         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1407         of this function from the image mempool.
1408         
1409         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1410         to allow more cached types to be used.
1411
1412         * mono-debug.c (mono_debug_add_method): Appled patch from
1413         David S. Miller  <davem@sunset.davemloft.net>: Access 
1414         minfo->lexical_blocks[] entry elements using read32().
1415
1416 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
1417
1418         * loader.c (mono_free_method): No longer free the method header for non-dynamic
1419         methods as it is allocated from the mempool.
1420
1421         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1422         image mempool.
1423
1424         * metadata-internals.h: Add comments describing the reference counting scheme
1425         used for MonoImage and MonoAssembly.
1426
1427         * image.c assembly.c reflection.c: Rework reference counting of images and 
1428         assemblies so they are freed when the runtime is shut down. Free some 
1429         additional memory structures when an image is unloaded.
1430         
1431 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
1432
1433         * class.c loader.c reflection.c: Allocate more data structures in
1434         the image mempool.
1435
1436 2006-03-31  Miguel de Icaza  <miguel@novell.com>
1437
1438         * icall.c
1439         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1440         build on pre glib 2.4 systems.
1441
1442 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
1443
1444         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1445
1446         * icall.c: Fix some warnings.
1447
1448 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
1449
1450         * culture-info-table.h : regenerated.
1451
1452 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1453
1454         * threads.c, object-internals.h, verify.c: changed the culture caching
1455         code to use a normal MonoArray for storage so the GC can keep track of
1456         them easily. Fixed bits of the cache logic, too and simplified the
1457         code.
1458
1459 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1460
1461         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1462         thread for non-Boehm GCs.
1463
1464 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1465
1466         * domain.c, object.c, domain-internals.h: reduce the amount of memory
1467         needed to keep track of the data for static fields.
1468
1469 2006-03-29  Raja R Harinath  <rharinath@novell.com>
1470
1471         Fix #75172
1472         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1473         for interface classes.  Use 'num_methods' instead.
1474         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
1475         before using '->vtable_size' field.
1476
1477 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1478
1479         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1480         doesn't contain managed pointers, so use a normal hashtable.
1481
1482 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1483
1484         * reflection.c, class-internals.h, domain.c: fixed handling of types
1485         used as values for objects in custom attributes (bug #77915):
1486
1487 2006-03-24  Martin Baulig  <martin@ximian.com>
1488
1489         * class.c (mono_class_setup_fields): Added support for generic
1490         instances; fixes #77580.
1491
1492 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1493
1494         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1495
1496 2006-03-24  Dick Porter  <dick@ximian.com>
1497
1498         * file-io.c (get_file_attributes): More stat macro breakage.
1499         Fixes bug 77759.
1500
1501 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1502
1503         * profiler.c: added the file=filename option in the default profiler
1504         to output the profile data to filename.
1505
1506 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1507
1508         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1509         bug #77877.
1510
1511 2006-03-22  Martin Baulig  <martin@ximian.com>
1512
1513         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1514         allocated `MonoClassField *' in `fb->handle'.
1515
1516 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1517
1518         * class.c, image.c, metadata-internals.h: implemented new mechanism to
1519         allocate interface ID to save memory and allow better ID reuse on
1520         appdomain unload. setup_generic_vtable () removal from Martin.
1521
1522 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1523
1524         * object.h, appdomain.c, domain.c, exception.c, icall.c,
1525         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1526         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1527         write barriers for reference stores with managed objects accessed with
1528         C structures in the runtime and in embedding programs.
1529
1530 2006-03-20  Raja R Harinath  <rharinath@novell.com>
1531
1532         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1533         'interface_id' and 'max_interface_id' fields of MonoClasses
1534         representing open generic types.
1535
1536 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1537
1538         * object.h, object.c, icall.c: added functions to deal with
1539         storing valuetypes that contain references in managed objects.
1540         * reflection.c, string-icalls.c, threads.c, marshal.c: small
1541         fixes and comments around uses of mono_array_addr ().
1542
1543 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1544
1545         * object.h, icall.c, monitor.c: object.GetHashCode ()
1546         implementation that supports the moving garbage collector.
1547
1548 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1549
1550         * icall.c, threads-types.h, threads.c: implemented finalizer for
1551         LocalDataStoreSlot.
1552
1553 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
1554
1555         * metadata.c (mono_type_size): Add a fixme.
1556         (mono_type_stack_size): Ditto.
1557
1558         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
1559         'type_forwarders' field.
1560
1561         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1562         attribute from net 2.0.
1563
1564         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1565         from class.c.
1566
1567         * class.c (mono_class_setup_fields): Fix a warning.
1568         
1569         * class.c (mono_class_from_name): Add support for assemblyref entries
1570         in the EXPORTEDTYPE table.
1571
1572         * reflection.c: Add support for handling type forwarders under net 2.0.
1573
1574         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
1575         
1576 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
1577
1578         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1579         overwriting entries in ModuleBuild->types, also clean up the code
1580         a little. Fixes #77774.
1581
1582 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1583
1584         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1585         load friend assembly info when present.
1586
1587 2006-03-14  Raja R Harinath  <rharinath@novell.com>
1588
1589         Fix crasher on gtest-158.cs.
1590         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1591         the return value if the MonoClass we want is yet in an
1592         inconsistent state.
1593         * class.c (mono_class_create_from_typedef): Add an comment
1594         explaining an order dependency between mono_class_setup_parent and
1595         mono_class_setup_mono_type.
1596
1597 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1598
1599         * class.c: documentation updates and events bug fix.
1600
1601 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1602
1603         * class.c: some cleanup, locking fixes.
1604
1605 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1606
1607         * class.c: fix the generics code to setup nested
1608         type info to the instantiated type (bug #77770).
1609
1610 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1611
1612         * marshal.c: fixed a few type correctness issues.
1613
1614 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1615
1616         * loader.c: the Set/Get/Addrtess array methods should be public.
1617
1618 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
1619
1620         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1621         
1622         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1623         info->wrapper.
1624
1625 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
1626
1627         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1628
1629         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1630
1631         * mempool.c (mono_mempool_alloc): Speed this up a bit.
1632         (mono_mempool_alloc0): Ditto.
1633
1634 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1635
1636         * socket-io.c:
1637         (create_object_from_sockaddr): it was allocating 4 extra bytes
1638         for the AF_UNIX data. Fixes bug #77747.
1639
1640 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
1641
1642         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1643
1644 2006-03-09  Dick Porter  <dick@ximian.com>
1645
1646         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1647         Fixes bug 76966 again.
1648
1649 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
1650
1651         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1652         names from r57532
1653         * appdomain.c: Bumped corlib version to 48 (due to r57532)
1654
1655 2006-03-07  Martin Baulig  <martin@ximian.com>
1656
1657         * object.c
1658         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1659
1660 2006-03-07  Martin Baulig  <martin@ximian.com>
1661
1662         * class.c
1663         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1664         regression introduced in r56970; see gtest-252.cs.
1665
1666         * loader.c (mono_get_method_constrained): Correctly handle generic
1667         methods; see gtest-253.cs.
1668
1669 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
1670
1671         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1672
1673 2006-03-04  Martin Baulig  <martin@ximian.com>
1674
1675         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1676         compute the parent type at runtime, just like we're already doing
1677         it for interfaces.
1678
1679         * reflection.c
1680         (mono_reflection_bind_generic_parameters): Don't compute the
1681         parent type anymore.
1682
1683         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1684
1685 2006-03-04  Martin Baulig  <martin@ximian.com>
1686
1687         * mono-debug-debugger.h
1688         (mono_debugger_create_notification_function): Allocate memory at
1689         runtime and return a pointer to it.
1690
1691 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
1692
1693         * assembly.c: Fix windows build.
1694         
1695         * assembly.c: Fix build.
1696
1697         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
1698
1699         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1700         
1701 2006-03-03  Dick Porter  <dick@ximian.com>
1702
1703         * process.c
1704         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1705         Check parameters before dereferencing them.  Fixes Aaron's part of
1706         bug 77393.
1707
1708 2006-03-03  Raja R Harinath  <rharinath@novell.com>
1709
1710         Fix performance regression.
1711         * loader.c (find_method_in_class): Add 'from_class' argument.
1712         Rename 'klass' argument to 'in_class'.  The signature is compared
1713         against the method in 'in_class', and the corresponding method is
1714         returned from 'from_class'.
1715         (find_method): Walk both 'in_class' and 'from_class' in parallel.
1716         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1717         type definition and generic instantiation in parallel.
1718         (mono_get_method_constrained): Update to changes.
1719
1720 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1721
1722         * threads.c: make sure the domain is correct, too when doing
1723         mono_thread_attach ().
1724
1725 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
1726
1727         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1728         windows. Fixes #77683.
1729
1730 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1731
1732         * object.h, *: introduced specific way to set elements of an array
1733         of references to be used as write barrier. Still need to audit the
1734         uses of mono_array_addr.
1735
1736 2006-03-01  Miguel de Icaza  <miguel@novell.com>
1737
1738         * object-internals.h: New field to cache the assmebly name, patch
1739         from Tambet Ingo (tambet@ximian.com)
1740
1741 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1742
1743         * decimal.h, class-internals.h, metadata-internals.h,
1744         file-io.h: mark a few function declarations as internal, to
1745         reduce the number of PLT entries.
1746
1747 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1748
1749         * file-io.c: fix typo in warning message.
1750
1751 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1752
1753         * loader.c: on unix, lookup the "*A" version of a function
1754         if charset is auto as a second option before failing.
1755
1756 2006-02-28  Raja R Harinath  <rharinath@novell.com>
1757
1758         * class.h (mono_class_inflate_generic_method): Revert to two
1759         argument version.
1760         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1761         (mono_class_inflate_generic_method_full): Add.
1762         * class.c (mono_class_inflate_generic_method_full): Rename from
1763         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
1764         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
1765         * loader.c, reflection.c: Update to changes.
1766
1767 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1768
1769         * icall.c: const fixes and small improvements.
1770
1771 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1772
1773         * threadpool.c: for asynchronous connect(), enable the same workaround
1774         for BSD 6 as for the Mac. Fixes bug #77637.
1775
1776 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
1777
1778         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1779         formatted classes. Fixes #77524.
1780
1781 2006-02-24  Raja R Harinath  <rharinath@novell.com>
1782
1783         * class.c (inflate_generic_type): Add a couple more
1784         micro-optimizations.
1785         (inflate_generic_context): Don't use the 'gmethod' from
1786         'inflate_with'.
1787         (mono_class_inflate_generic_method): If the method has generic
1788         parameters, but the passed-in context doesn't have a 'gmethod',
1789         create one.  Use the possibly simplified generic instantiation
1790         from the declaring class instead of the one passed in.
1791
1792 2006-02-24  Raja R Harinath  <harinath@gmail.com>
1793
1794         Make generic method signature and method header handling lazy.
1795         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1796         (inflate_generic_header): Likewise.
1797         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
1798         parameter to avoid inflating types.
1799         (mono_get_inflated_method): Empty out.
1800         * class.h (mono_class_inflate_generic_method): Update to changes.
1801         * loader.c (mono_get_method_from_token): Don't parse signature for
1802         generic methods, nor methods of generic classes.
1803         (mono_method_signature): Rename from 'mono_method_signature'.
1804         Inflate signature on demand.
1805         (mono_method_get_header): Inflate method header on demand.
1806         * reflection.c: Update to changes.
1807
1808 2006-02-23  Raja R Harinath  <rharinath@novell.com>
1809
1810         * metadata.c (mono_metadata_inflate_generic_inst): If the
1811         instantiation is closed, don't bother expanding it in the new
1812         context.
1813         * class.c (inflate_generic_class): If the generic instantiation
1814         doesn't change after inflation, return the argument itself.
1815         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1816         Add bounds checks.
1817         (inflate_generic_context): If neither the generic class nor the
1818         generic method instantiations change, return the original context.
1819         * reflection.c (mono_method_get_object): Do
1820         'mono_get_inflated_method' before accessing the ->klass field.
1821         (inflate_mono_method): Don't create a MonoGenericMethod unless
1822         necessary.
1823         (inflate_method): Don't pass a constructed type as the declaring
1824         type of a methodbuilder.
1825
1826 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1827
1828         * object.c: fix memory overwrite.
1829
1830 2006-02-22  Dick Porter  <dick@ximian.com>
1831
1832         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1833         it doesn't work any more.
1834         (mono_threads_request_thread_dump): Fix unused variable warnings.
1835
1836 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1837
1838         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1839         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1840         the public header file.
1841
1842 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
1843
1844         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1845
1846 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1847
1848         * class-internals.h, object.c: reduce the size of MonoVTable
1849         and store the interface_offsets array at negative offsets.
1850
1851 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1852
1853         * metadata.c: tweak table descriptors data structures to reduce
1854         size and runtime relocations.
1855
1856 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1857
1858         * marshal.c: fix some types and opcodes to be type-safe
1859         in marshaling wrappers.
1860
1861 2006-02-21  Ankit Jain  <jankit@novell.com>
1862
1863         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1864
1865 2006-02-21  Raja R Harinath  <rharinath@novell.com>
1866
1867         * metadata.c (get_constraints): Relax debugging checks for monodis.
1868
1869 2006-02-21  Ankit Jain  <jankit@novell.com>
1870
1871         * metadata.c (mono_metadata_load_generic_params): Move the code
1872         checking for ambiguous generic params from here to mono/dis/get.c
1873         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1874
1875 2006-02-21  Raja R Harinath  <harinath@gmail.com>
1876
1877         Fix assertion triggered when compiling nemerle.
1878         * class.c (mono_get_shared_generic_inst): Rename from
1879         get_shared_inst and make non-static.
1880         * loader.c (mono_get_shared_generic_method): New.  Used to create
1881         the MonoGenericContext-equivalent of a MonoGenericContainer.
1882         (mono_get_method_from_token): Initialize the 'context' field of
1883         the created MonoGenericContainer.
1884         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1885         * metadata.c (get_constraints): Add sanity check.
1886         * class-internals.h: Add new internal methods.
1887
1888         * reflection.c (verify_safe_for_managed_space): New sanity check.
1889         Currently checks that owner-less generic parameters aren't allowed
1890         in managed space.
1891         (mono_type_get_object): Use it.
1892         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1893         that are now in mono_type_get_object.
1894         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1895
1896 2006-02-19  Raja R Harinath  <harinath@gmail.com>
1897
1898         * metadata.c (mono_type_create_from_typespec): Rename from
1899         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
1900         argument and caching of types in the generic container.
1901         (unwrap_arrays, find_generic_param): Remove.
1902         * metadata-internals.h: Update.
1903         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1904
1905 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
1906
1907         * class.c (mono_class_get_exception_for_failure): Fix a warning.
1908
1909         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1910         return values. Fixes #77581.
1911
1912         * class.c (mono_fnptr_class_get): Switch name and name_space.
1913
1914         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1915         classes and add support for [In, Out] attributes.
1916         (mono_marshal_free_asany): Ditto. Fixes #77524.
1917
1918 2006-02-18  Raja R Harinath  <harinath@gmail.com>
1919
1920         * class.c (mono_class_from_generic_parameter): Make more robust to
1921         incomplete MonoGenericContainers from monodis.
1922
1923 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1924
1925         * class-internals.h: added some more exception types.
1926         * class.c, metadata.c: added a few checks to handle missing
1927         types.
1928
1929 2006-02-17  Raja R Harinath  <rharinath@novell.com>
1930
1931         Use owner-less generic-params some more.
1932         * class.c (my_mono_class_from_generic_parameter): Remove.
1933         (mono_class_from_generic_parameter): Handle null image,
1934         param->name and param->owner.
1935         (mono_class_from_mono_type): Update.
1936         (mono_class_create_from_typespec): Remove 'container' parameter.
1937         If that parameter is non-null, the result is always inflated by
1938         'mono_class_get_full' anyway.
1939         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
1940         parameter.
1941         (mono_class_get_full): Update.
1942
1943         * class.c (inflate_generic_type) [GENERICINST]: If the generic
1944         instance is not open, don't bother inflating.
1945         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
1946         parse metadata for inflated classes.
1947         (_mono_class_get): Change GenericContext* parameter to
1948         GenericContainer*.
1949         (mono_class_create_from_typespec): Likewise.  Simplify, and
1950         implement trivially.  All the cases are handled in
1951         mono_class_from_mono_type.  Don't inflate returned class.
1952         (mono_class_get_full): Delegate GENERICINST optimization to
1953         inflate_generic_type.
1954         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1955
1956 2006-02-16  Dick Porter  <dick@ximian.com>
1957
1958         * socket-io.c (create_object_from_sockaddr): Fix typo.
1959         (create_sockaddr_from_object): Check array lengths before
1960         potentially accessing items off the end.
1961         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1962         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1963         (ves_icall_System_Net_Sockets_Socket_Send_internal)
1964         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1965         length checks to avoid wraparound overflows.
1966         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1967         contents of the array of sockets
1968         (hostent_to_IPHostEntry2)
1969         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1970         Check return value of inet_ntop ().
1971         (addrinfo_to_IPHostEntry): Fix typo
1972
1973 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1974
1975         Type metadata parsing doesn't use generic-instantiation information.
1976         * metadata.c (mono_metadata_parse_array_full): Change
1977         MonoGenericContext* parameter to MonoGenericContainer*.
1978         (mono_metadata_parse_type_full): Likewise.
1979         (mono_type_create_from_typespec_full): Likewise.
1980         (mono_metadata_parse_mh_full): Likewise.
1981         (mono_metadata_parse_generic_inst): Likewise.
1982         (do_mono_metadata_parse_generic_class): Likewise.
1983         (do_mono_metadata_parse_type): Likewise.
1984         * metadata-internals.h: Update to changes.
1985         * class.c (mono_class_find_enum_basetype): Likewise.
1986         (mono_class_setup_fields): Likewise.
1987         (mono_class_create_from_typespec): Likewise.
1988         * loader.c (method_from_methodspec): Likewise.
1989         (mono_get_method_from_token): Likewise.
1990         (mono_method_get_header): Likewise.
1991
1992 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1993
1994         * marshal.c: handle additional GENERICINST case (patch from
1995         Thong Nguyen <tum@veridicus.com>).
1996         Fix a few cases where LDIND_I/STIND_I was used for references.
1997
1998 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1999
2000         * reflection.c (mono_reflection_get_token): Remove unused variable.
2001
2002 2006-02-16  Martin Baulig  <martin@ximian.com>
2003
2004         * reflection.c (mono_reflection_get_token): Add support for fields
2005         in instantiated generic types.
2006
2007         * icall.c
2008         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2009
2010 2006-02-15  Martin Baulig  <martin@ximian.com>
2011
2012         * icall.c
2013         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2014         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2015         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
2016         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
2017
2018 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2019
2020         * class.c, metadata.c, metadata.h, object.c, icall.c,
2021         marshal.c: changed mono_type_get_underlying_type () to do
2022         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2023         Fixed handling of instantiated generic valuetypes (bug #75479).
2024
2025 2006-02-15  Raja R Harinath  <rharinath@novell.com>
2026
2027         * metadata.c (mono_metadata_decode_signed_value): Simplify.
2028         Delegate to mono_metadata_decode_value, and work on the returned value.
2029
2030         * icall.c (ves_icall_MonoType_GetGenericArguments):
2031         Add consistency check here too.
2032         
2033 2006-02-15  Ankit Jain  <jankit@novell.com>
2034
2035         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2036         char/short etc.
2037
2038 2006-02-15  Ankit Jain  <jankit@novell.com>
2039
2040         * metadata.c (mono_metadata_decode_signed_value): New function to decode
2041         signed values, used only for representing lower bounds of arrays.
2042         (mono_metadata_parse_array_full): Use new
2043         mono_metadata_decode_signed_value to decode lower bounds.
2044
2045 2006-02-14  Martin Baulig  <martin@ximian.com>
2046
2047         * reflection.c
2048         (mono_reflection_get_token): Support "MonoGenericMethod" and
2049         "MonoGenericCMethod" and allow generic instances / methods.
2050
2051 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
2052
2053         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2054         to obtain the terminal size using an ioctl.
2055
2056         * object.c (mono_nullable_init): Revert this as nullable reference
2057         types are not valid.
2058         (mono_nullable_box): Ditto.
2059
2060 2006-02-09  Dick Porter  <dick@ximian.com>
2061
2062         * threads.c (mono_thread_detach): Drop a reference to the thread
2063         we're detaching.
2064
2065 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
2066
2067         * object.c (mono_nullable_init): Handle nullable reference types.
2068         (mono_nullable_box): Ditto. Fixes #77446.
2069
2070 2006-02-07  Martin Baulig  <martin@ximian.com>
2071
2072         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2073
2074 2006-02-07  Ankit Jain  <jankit@novell.com>
2075
2076         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2077         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2078         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2079         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2080         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2081         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2082
2083 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
2084
2085         * class.c (mono_class_create_generic): Set type_token as well.
2086
2087         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2088         compatible with MS.
2089
2090 2006-02-02  Martin Baulig  <martin@ximian.com>
2091
2092         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2093         has never been used so far.
2094
2095 2006-02-02  Martin Baulig  <martin@ximian.com>
2096
2097         * mono-debug-debugger.h: Changed comment at the top of this file;
2098         the header is not installed, but it's safe to #include it from
2099         within the JIT.
2100
2101         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2102         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2103
2104 2006-02-02  Martin Baulig  <martin@ximian.com>
2105
2106         * mono-debug.h
2107         (MonoSymbolTable): Removed the `metadata_info' field.
2108
2109         * mono-debug.c
2110         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2111
2112         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2113         (mono_debugger_add_builtin_types): Removed.
2114         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2115         (mono_debugger_create_notification_function): We now operate on a
2116         pre-allocated area; take a `gpointer' and return `void'.
2117
2118         * mono-debug-debugger.c
2119         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2120         (mono_debugger_add_builtin_types): Removed.
2121
2122 2006-02-02  Martin Baulig  <martin@ximian.com>
2123
2124         * threads.c (mono_debugger_create_all_threads): New public method.
2125
2126 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2127
2128         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2129         breaks on several platforms.
2130
2131 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
2132
2133         * assembly.c: the VS.NET build doesn't supply default values for
2134         MONO_ASSEMBLIES and MONO_CFG_DIR.
2135
2136 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
2137
2138         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2139         helper function.
2140
2141         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2142
2143         * loader.c (method_from_memberref): Fix a warning.
2144
2145         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2146
2147         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2148         with explicit layout. Fixes #77433.
2149
2150 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
2151
2152         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
2153         max_interface_id is initialized before using it. Fixes #77398.
2154         (ves_icall_Type_GetInterfaces): Ditto.
2155
2156 2006-01-30  Raja R Harinath  <rharinath@novell.com>
2157
2158         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2159         allocate memory for parameter attributes when parsing memberref
2160         signatures.
2161         * loader.c (mono_loader_set_error_method_load): Don't warn.
2162         (method_from_memberref): Ensure MissingMethodException gets thrown
2163         if method is not found.  Make warning more informative.
2164
2165 2006-01-29  Raja R Harinath  <harinath@gmail.com>
2166
2167         Fix #77397
2168         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2169         return true if is byref.
2170         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2171         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2172         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2173
2174 2006-01-27  Raja R Harinath  <rharinath@novell.com>
2175
2176         Fix tests/find-method.2.il
2177         * loader.c (find_method, find_method_in_class): Remove is_inflated
2178         argument.  Revert 2006-01-18 change.
2179         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2180         is generic, search for method in its generic definition.
2181         * class.c (mono_class_setup_vtable_general): Print generic
2182         arguments of generic types in debugging printf.
2183
2184 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
2185
2186         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2187
2188         * threads.c (mono_threads_request_thread_dump): New helper function.
2189
2190 2006-01-25  Raja R Harinath  <rharinath@novell.com>
2191
2192         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2193
2194 2006-01-25  Ankit Jain  <jankit@novell.com>
2195
2196         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2197         move definition to ..
2198         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2199         
2200 2006-01-25  Ankit Jain  <jankit@novell.com>
2201             Raja R Harinath  <rharinath@novell.com>
2202
2203         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2204         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2205         as necessary.
2206
2207 2006-01-25  Martin Baulig  <martin@ximian.com>
2208
2209         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2210         `MonoDebuggerThread' into debug-debugger.c.
2211
2212 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2213
2214         * profiler.c: fix printing of data.
2215
2216 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
2217
2218         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2219           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2220
2221 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2222
2223         * object.c: fix deadlock related to string interning.
2224
2225 2006-01-23  Martin Baulig  <martin@ximian.com>
2226
2227         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2228
2229         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2230
2231 2006-01-23  Martin Baulig  <martin@ximian.com>
2232
2233         * mono-debug.h: Moved the prototypes of some functions which are
2234         used by the JIT here from mono-debug-debugger.h.
2235
2236 2006-01-21  Martin Baulig  <martin@ximian.com>
2237
2238         * Makefile.am: Don't install mono-debug-debugger.h.
2239
2240 2006-01-21  Martin Baulig  <martin@ximian.com>
2241
2242         * mono-debug-debugger.h: Enforce the private status of this header
2243         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2244         Moved some stuff from mono-debugger-jit-wrapper.h here.
2245
2246 2006-01-20  Raja R Harinath  <rharinath@novell.com>
2247
2248         * class.c (mono_class_from_typeref): Add a sanity test to help
2249         catch lack of assembly load/search hooks.
2250
2251 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
2252
2253         * marshal.c (emit_struct_conv): Relax the fields with same offset
2254         check even more. Fixes #77230.
2255
2256 2006-01-18  Martin Baulig  <martin@ximian.com>
2257
2258         * loader.c (find_method_in_class): Added `gboolean is_inflated'
2259         argument; if false, we compare the uninstantiated signatures.
2260         (method_from_memberref): Compare the uninstantiated signatures;
2261         fixes #76417.
2262
2263 2006-01-18  Robert Jordan  <robertj@gmx.net>
2264
2265         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2266         Clear the weak link. Fixes bug #77170.
2267
2268         * gc.c (mono_gchandle_free):
2269         Reflect *-gc.c changes (tiny optimization).
2270
2271 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
2272
2273         * metadata.c (mono_metadata_signature_dup): Applied patch from
2274         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2275         Fixes #77288.
2276
2277 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
2278
2279         * marshal.c (emit_struct_conv): Allow fields with the same offset when
2280         marshalling from native to managed code. Fixes #77230.
2281
2282 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2283
2284         * threadpool.c: fix problem (Mac only) when more than one asynchronous
2285         connect. Fixes bug #77020.
2286
2287 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2288
2289         * class.c: fixed id assignement for nested interfaces (bug #77275).
2290         Added also better info for --print-vtable debugging.
2291
2292 2006-01-12  Martin Baulig  <martin@ximian.com>
2293
2294         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2295         interfaces on-the-fly; fixes #76625.
2296
2297         * class-internals.h
2298         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2299         don't need that anymore.
2300
2301 2006-01-12  Miguel de Icaza  <miguel@novell.com>
2302
2303         * socket-io.c
2304         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2305         To avoid initing the nested_classes when not needed I turned the
2306         PeerCredData as a toplevel internal class, as it has to be shared
2307         anyways. 
2308
2309         Fixes the CASA issue.
2310
2311 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
2312
2313         * domain.c: Accessors for MonoJitInfo
2314
2315         * profiler-private.h: Add jitinfo to the end jit hook
2316
2317         * profiler.[ch]: Define new hooks, called after jitting which give
2318         the MonoJitInfo that was compiled
2319
2320 2006-01-10  Martin Baulig  <martin@ximian.com>
2321
2322         * class.c (mono_class_setup_events): Add support for generic
2323         classes; fixes #76440.
2324
2325 2006-01-06  Raja R Harinath  <rharinath@novell.com>
2326
2327         Fix #77160.
2328         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2329         on passed-in method.
2330
2331 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2332
2333         * object.c (mono_runtime_invoke_array): Add Nullable support.
2334
2335         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2336
2337 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
2338
2339         * file-io.c: Don't consider sockets as directory and avoid an endless
2340         loop. Fix bug #76966.
2341
2342 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2343
2344         * object.c (mono_nullable_init): New helper function.
2345         (mono_nullable_box): Ditto.
2346
2347         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2348
2349         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2350
2351         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2352         
2353 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
2354
2355         * class.c (mono_class_is_assignable_from): Make T assignable to 
2356         Nullable<T>.
2357
2358 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
2359
2360         * appdomain.c: Bump corlib version to 46.
2361         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2362         serialization purpose) and changed ves_icall_System_Reflection_
2363         Assembly_get_code_base signature to accept a boolean (to escape, or 
2364         not, the assembly code base).
2365
2366 2005-12-23  Dick Porter  <dick@ximian.com>
2367
2368         * icall.c: 
2369         * threads-types.h: 
2370         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2371         CreateEvent icall now returns "created" boolean parameter.
2372
2373 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
2374
2375         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2376         #76967.
2377
2378         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
2379         when attr_klass is an interface. Fixes #77045.
2380
2381 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
2382
2383         * marshal.c (emit_struct_conv): Fix previous patch.
2384         
2385         * marshal.c (emit_struct_conv): Add a check for fields with the same
2386         offset.
2387
2388 2005-12-20  Raja R Harinath  <rharinath@novell.com>
2389
2390         Fix regression in Mono.C5.
2391         * class.c (mono_class_create_generic): If 'klass' is an interface
2392         set up the interface offsets.
2393         (mono_class_is_assignable_from): Don't throw away generic arguments.
2394
2395 2005-12-19  Raja R Harinath  <rharinath@novell.com>
2396
2397         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2398         type parameters.
2399
2400 2005-12-15  Raja R Harinath  <rharinath@novell.com>
2401
2402         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2403         dead store.
2404         (do_mono_metadata_parse_generic_class): Don't pass the current
2405         generic context when parsing the type being instantiated: it
2406         cannot use it, anyway.
2407
2408         * loader.c (method_from_memberref): Don't inflate a signature if
2409         it doesn't contain any type parameters.
2410
2411 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
2412
2413         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2414
2415 2005-12-14  Martin Baulig  <martin@ximian.com>
2416
2417         * class.c
2418         (mono_type_get_name_recurse): Don't return null for type
2419         parameters and open generic classes.
2420         (mono_class_setup_methods): Don't exclude generic instances.
2421         (mono_get_unique_iid): Use different IDs for different
2422         instantiations of the same generic type.
2423         (mono_class_setup_vtable): Only use setup_generic_vtable() for
2424         open generic instances; create a normal vtable for closed generic
2425         instances.
2426         (mono_class_setup_vtable_general): We're now also called for
2427         closed generic instances.
2428
2429         * reflection.c
2430         (mono_reflection_bind_generic_parameters): Correctly use
2431         mono_metadata_lookup_generic_inst() everywhere.
2432
2433 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
2434
2435         * object.c (mono_class_create_runtime_vtable): Call 
2436         mono_class_setup_vtable ().
2437
2438         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2439         function.
2440         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2441         #76959.
2442
2443         * loader.c (mono_loader_set_error_type_load): Print the type load
2444         warnings to the console so they are more visible to the user.
2445         (mono_loader_set_error_method_load): Ditto.
2446
2447         * reflection.c (ensure_runtime_vtable): Revert the last change as it
2448         is still broken.
2449         
2450         * reflection.c (ensure_runtime_vtable): Fix build.
2451
2452         * reflection.c (ensure_runtime_vtable): Disable an optimization which
2453         doesn't work in all cases.
2454
2455 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
2456
2457         * object.c (mono_array_new_full): Treat a single dimensional array
2458         with 0 lower bounds as an szarray. Fixes #76973.
2459
2460         * reflection.c (custom_attr_visible): Really fix this.
2461
2462 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
2463
2464         * reflection.c (custom_attr_visible): Allow nested public attributes
2465         as well.
2466
2467         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2468         interface check.
2469
2470 2005-12-12  Raja R Harinath  <harinath@gmail.com>
2471
2472         * class.c (set_generic_param_owner): Delete.
2473         (mono_class_create_from_typedef): Don't set ->owner field of
2474         generic parameters to "param containers" of enclosing classes.
2475         * reflection.c (mono_reflection_initialize_generic_parameter):
2476         Likewise.
2477
2478 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
2479
2480         * reflection.c (custom_attr_visible): Fix build.
2481
2482 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
2483
2484         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2485         private attributes.
2486         
2487         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2488         handling of null parameter defaults.
2489
2490 2005-12-09  Raja R Harinath  <rharinath@novell.com>
2491
2492         * class.c (mono_class_from_generic_parameter): Don't set
2493         klass->generic_container.
2494         (my_mono_class_from_generic_parameter): Likewise.
2495
2496 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
2497
2498         * reflection.c (load_public_key): Fix a warning.
2499         (method_encode_code): Fix unaligned accesses.
2500
2501 2005-12-07  Martin Baulig  <martin@ximian.com>
2502
2503         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2504
2505         * reflection.c
2506         (write_generic_param_entry): Encode our custom attrs.
2507
2508         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2509
2510 2005-12-07  Martin Baulig  <martin@ximian.com>
2511
2512         * reflection.c (encode_new_constraint): Removed; we don't use the
2513         `NewConstraintAttribute' anymore.
2514
2515 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
2516
2517         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2518         not fire a TypeResolve event when Assembly.GetType () is called.
2519
2520 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
2521
2522         Beginning of support for nullable types in the runtime. Parts of
2523         this patch are from Martin.
2524
2525         * appdomain.c (MONO_CORLIB_VERSION): Bump
2526
2527         * domain.c (mono_init_internal): get the nullable type
2528
2529         * class.c (mono_class_is_nullable): New method
2530         (mono_class_get_nullable_param): New mehod
2531         (mono_class_create_generic): In types T? set cast_class to T
2532
2533         * class-internals.h (MonoDefaults): new nullable default class
2534         (mono_class_get_nullable_param, mono_class_get_nullable_param):
2535         new methods.
2536
2537 2005-12-05  Raja R Harinath  <rharinath@novell.com>
2538
2539         * metadata.c (select_container): New.  Refactor code to select the
2540         appropriate GenericContainer given the type of generic parameter
2541         we are looking for.
2542         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2543         not a MonoGenericContext.  Use select_container.  Update parameters.
2544         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2545         and MONO_TYPE_MVAR.
2546         (unwrap_arrays): Remove duplicate tests.
2547         (find_generic_param): Rename from 'has_same_context'.  Now walks a
2548         generic instantiated class to find any arguments that are generic
2549         parameters.
2550         (mono_type_create_from_typespec_full): Use find_generic_param to
2551         avoid evicting some generic instantiations from the typespec
2552         cache.
2553
2554 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2555
2556         * reflection.c: fixed writing of doubles on ARM FPA.
2557
2558 2005-12-02  Robert Jordan  <robertj@gmx.net>
2559
2560         * icall.c: Fixed EventInfo.ReflectedType (#76829).
2561
2562 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2563
2564         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2565         least on SUSE 10 they are not the same (on debian, they are just the
2566         same thing).
2567
2568 2005-12-01  Raja R Harinath  <rharinath@novell.com>
2569
2570         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2571         DeclaringType for VARs and MVARs.
2572         * class.c (set_generic_param_owner): Fix initialization of owner
2573         fields.
2574
2575 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2576
2577         * icall.c: fixed Enum.ToObject() to correctly convert the values.
2578
2579 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2580
2581         * threadpool.c: workaround for a bug that shows up on the Mac:
2582         select()+connect() on a blocking socket is not like it should
2583         be, so we proceed to connect() in that case, wasting the I/O
2584         threadpool thread until connect succeedes. Fixes bug #75436.
2585
2586 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2587
2588         * threadpool.c: fix typo when setting file descriptor states.
2589
2590 2005-11-28  Raja R Harinath  <rharinath@novell.com>
2591
2592         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
2593         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2594         create a temporary signature container.
2595         (mono_metadata_parse_generic_param): Update to changes.
2596         (mono_type_create_from_typespec_full): Update to changes.
2597         * loader.c (method_from_memberref): Don't use a
2598         MonoGenericContainer while parsing a memberref signature.
2599         (method_from_methodspec): Remove dead-store of the 'container'
2600         variable.  It's overwritten before use.
2601
2602         * metadata.c (mono_type_create_from_typespec_full): Make debugging
2603         checks tighter.
2604         (mono_metadata_parse_generic_param): Likewise.
2605         * loader.c (find_method_in_class): Does not need a
2606         MonoGenericContainer.  Use 'mono_method_signature' rather than
2607         'mono_method_signature_full'.
2608         (find_method, mono_get_method_constrained, method_from_memberref):
2609         Update to changes.
2610
2611         * metadata.c (mono_type_create_from_typespec_full): Ensure that
2612         owner-less generic-parameters are never evicted from the typespec
2613         cache.
2614
2615         * loader.c (method_from_memberref): Don't use the current context
2616         when parsing signatures.
2617         (method_from_methodspec, mono_get_method_from_token): Update to changes.
2618
2619         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2620         side-effects in g_assert.
2621         * loader.c (mono_get_method_from_token): Resolve klass earlier so
2622         that we don't potentially lose information.
2623
2624 2005-11-26  Dick Porter  <dick@ximian.com>
2625
2626         * icall.c:
2627         * threads.c: icalls to implement basic (ie, not named)
2628         System.Threading.Semaphore.
2629
2630 2005-11-24  Dick Porter  <dick@ximian.com>
2631
2632         * process.c
2633         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2634         Use GetProcessId() if it's available.
2635
2636 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
2637
2638         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2639
2640 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2641             Ankit Jain  <jankit@novell.com>
2642
2643         * loader.c (mono_get_method_from_token): Initialize 'method' field
2644         of all generic parameters before parsing the signature.  Remove
2645         code that "fixed"-up MVAR references.
2646
2647 2005-11-23  Ankit Jain  <jankit@novell.com>
2648
2649         * metadata.c (mono_metadata_has_generic_params):
2650         (mono_metadata_load_generic_param_constraints):
2651         (mono_metadata_load_generic_params): Move duplicate code ...
2652         (mono_metadata_get_generic_param_row): ... here. Returns the
2653         first row-id in GenericParam table for a given owner (token).
2654         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2655         prototype.
2656
2657 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2658             Ankit Jain  <jankit@novell.com>
2659
2660         * metadata.c (mono_metadata_class_equal): Pass signature_only when
2661         comparing VARs too.
2662         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
2663         type->data.generic_param only if the type is an MVAR.
2664         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2665         leak owner-less VARs and MVARs into managed space.
2666
2667 2005-11-21  Martin Baulig  <martin@ximian.com>
2668
2669         * class-internals.h
2670         (MonoMethod): Moved the `generic_container' here from
2671         `MonoMethodNormal' since we now also need it for
2672         `MonoMethodPInvoke';
2673         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2674         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2675         an union containing both `MonoMethodNormal' and
2676         `MonoMethodPInvoke'.
2677
2678         * loader.c
2679         (mono_get_method_from_token): Allow implementing generic methods
2680         as interncalls.
2681
2682         * threads.c
2683         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2684         icall.
2685
2686 2005-11-17  Dick Porter  <dick@ximian.com>
2687
2688         * icall.c: 
2689         * process.h: 
2690         * process.c: Split the Process Start_internal icall into
2691         ShellExecuteEx_internal and CreateProcess_internal, which are
2692         called depending on whether UseShellExecute is true.  Fixes bug
2693         76670.
2694
2695         * appdomain.c (MONO_CORLIB_VERSION): Incremented
2696
2697 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
2698
2699         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2700         'msize' parameters, use the information in 'mspec' instead.
2701         (emit_object_to_ptr_conv): Ditto.
2702
2703         * marshal.c (emit_struct_conv): Handle explicit layout structs with
2704         fields out of order. Fixes #76733.
2705
2706 2005-11-17  Ankit Jain  <jankit@novell.com>
2707
2708         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2709
2710 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
2711
2712         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2713           bug #76575.
2714
2715 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2716
2717         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2718         for types with non-auto layout. Fixes #76717.
2719
2720 2005-11-16  Ankit Jain  <jankit@novell.com>
2721
2722         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2723         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
2724         if generic_context is null.
2725           (mono_metadata_generic_param_equal): param->owner can be null.
2726           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2727         null.
2728
2729 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2730
2731         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2732         the correct value.
2733
2734 2005-11-15  Martin Baulig  <martin@ximian.com>
2735
2736         * object.c (set_value): Use mono_class_from_mono_type() instead of
2737         the hack for generic instances; fixes #76136.
2738
2739 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
2740
2741         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2742         fields.
2743
2744         * image.c (load_metadata_ptrs): Initialize the new fields.
2745
2746         * reflection.c (create_dynamic_mono_image): Ditto.
2747
2748         * reflection.c (build_compressed_metadata): Use the new fields.
2749
2750         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2751         icall.
2752
2753         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2754         icall.
2755         
2756 2005-11-15  Ankit Jain  <jankit@novell.com>
2757             Raja R Harinath  <harinath@gmail.com>
2758
2759         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2760         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2761         new per-generic_container cache if the cached MonoType's context matches
2762         the current context.
2763           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2764         to the expected context.
2765           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2766
2767 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2768
2769         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2770         we changed the signature of an icall.
2771         * icall.c: Modify to mono_double_ParseImpl return true/false 
2772         depending on the success, instead of throwing the exception. This will
2773         help us in Double.TryParse methods.
2774         
2775 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
2776
2777         * marshal.c (emit_marshal_object): Throw an exception when
2778         marshalling 'object' instead of crashing. Fixes #76696.
2779
2780 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2781
2782         * class-internals.h: Add prototype for mono_type_get_full_name ().
2783
2784 2005-11-11  Dick Porter  <dick@ximian.com>
2785
2786         * threads.c (mono_thread_manage): Make sure the main thread has
2787         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
2788
2789 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2790
2791         * loader.c (mono_loader_set_error_type_load): Log a warning to the
2792         console about the missing type.
2793         (mono_loader_set_error_method_load): Ditto.
2794
2795 2005-11-09  Miguel de Icaza  <miguel@novell.com>
2796
2797         * mono-config.c (mono_get_config_dir): Set the system defaults if
2798         none is specified.
2799
2800         * assembly.c (mono_set_dirs): New API entry point to set the
2801         assembly and the config directory in one call
2802
2803 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
2804
2805         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2806         the ftnptr was created from a delegate in a domain other than the
2807         current domain. Fixes #75377.
2808
2809         * exception.h exception.c: Add mono_get_exception_not_supported ().
2810
2811 2005-11-08  Martin Baulig  <martin@ximian.com>
2812
2813         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2814
2815 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
2816
2817         * security-manager.h: Added definitions to deal with strongname key 
2818         pairs bigger (and smaller) than 1024 bits.
2819         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
2820         adjust wrt the public key length being used.
2821
2822 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
2823
2824         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2825           Windows build (r51396-51397).
2826
2827 2005-11-03  Martin Baulig  <martin@ximian.com>
2828
2829         * class.c (mono_class_setup_vtable_general): Also add generic
2830         methods to the vtable; fixes #76581.
2831
2832 2005-11-01  Miguel de Icaza  <miguel@novell.com>
2833
2834         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2835         sure that we lookup GetString method from the System.Text.Encoding
2836         class, not the derived class or we get an empty method.
2837
2838         Fixed class #76612.
2839
2840 2005-10-25  Miguel de Icaza  <miguel@novell.com>
2841
2842         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2843         if it has been previously set (embedders). 
2844
2845         Make mono_set_rootdir available also on Unix.
2846
2847 005-10-24  Robert Jordan  <robertj@gmx.net>
2848
2849         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2850
2851 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
2852
2853         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2854         only calls which are made to native code use this flag.
2855
2856         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2857
2858 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
2859
2860         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2861         Add support for FieldBuilders.
2862
2863 2005-10-29  Martin Baulig  <martin@ximian.com>
2864
2865         * mono-debug.c
2866         (mono_debug_using_mono_debugger): New public method; returns
2867         whether we're running inside the debugger.
2868
2869 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
2870
2871         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2872         for Method/Constructor/FieldBuilders.
2873
2874 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
2875
2876         * reflection.c (module_add_cattrs): Save custom attributes for global methods
2877         and fields as well.
2878
2879 2005-10-26  Martin Baulig  <martin@ximian.com>
2880
2881         * mono-debug-debugger.c
2882         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2883
2884 2005-10-24  Raja R Harinath  <harinath@gmail.com>
2885
2886         * icall.c (base64_to_byte_array): Don't pass an out-of-range
2887         integer to isspace.
2888
2889 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
2890
2891         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2892         when passing valuetypes byref. Fixes #76502.
2893
2894 2005-10-19  Jackson Harper  <jackson@ximian.com>
2895
2896         * profiler.c: Don't put a . in front of types that are not in a
2897         namespace.
2898
2899 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
2900
2901         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2902
2903 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
2904
2905         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2906         #76436.
2907         (mono_marshal_get_ldflda_wrapper): Fix a warning.
2908
2909 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2910
2911         * assembly.c metadata-internals.h icall.c: Define an additional
2912         parameter for mono_assembly_name_parse_full, so we can avoid creating
2913         S.R.AssemblyName.Version when no version info wasn't passed.
2914         
2915 2005-10-09  Miguel de Icaza  <miguel@novell.com>
2916
2917         * class.c (mono_type_get_full_name): Reimplement method that was
2918         removed. 
2919
2920         * image.c: Some docs
2921
2922 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
2923
2924         * profiler.c (output_newobj_profile): Fix printing of Total memory
2925         on x86.
2926
2927 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2928
2929         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2930
2931 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
2932
2933         * threads.c: remove debug output.
2934
2935 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2936
2937         * threads.c (mono_thread_manage): Fix crashes if more than 64
2938         threads need to be aborted. Hopefully fixes #75899.
2939
2940         * assembly.c (mono_stringify_assembly_name): New helper function.
2941
2942         * class.c: Use mono_stringify_assembly_name instead of the similar
2943         static function.
2944
2945         * assembly.h assembly.c: Add support for calling a postload search 
2946         hook if an assembly cannot be loaded.
2947
2948         * appdomain.c: Register new search hooks which call the AssemblyResolve
2949         events in AppDomain. Fixes #75231
2950
2951 2005-10-07  Martin Baulig  <martin@ximian.com>
2952
2953         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2954         methods without debug info.
2955
2956 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
2957
2958         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2959         wrappers.
2960
2961 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2962
2963         * file-io.c: now that we return symlinks, use lstat and, when the file
2964         is a symbolic link, stat, to get the file attributes. Also avoid the
2965         conversion to/from utf16/external.
2966
2967 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
2968
2969         * class.c (mono_class_layout_fields): Compute klass->has_references
2970         correctly if an embedded valuetype is not yet initialized. Fixes
2971         #76331.
2972
2973 2005-10-04  Martin Baulig  <martin@ximian.com>
2974
2975         * metadata.c
2976         (mono_metadata_load_generic_param_constraints): New public
2977         function; splitted the constraints loading out from
2978         mono_metadata_load_generic_params().
2979
2980         * class.c (mono_class_create_from_typedef): Call
2981         mono_metadata_load_generic_param_constraints() after setting up
2982         the type and creating our parent; fixes #75329.
2983
2984 2005-10-04  Martin Baulig  <martin@ximian.com>
2985
2986         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2987         non-dynamic parent classes.
2988
2989 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
2990
2991         * file-io.c : win32 build fix (ETXTBSY seems not found).
2992
2993 2005-10-04  Martin Baulig  <martin@ximian.com>
2994
2995         * reflection.c
2996         (mono_image_get_methodspec_token): Make the cache actually work;
2997         fixes #75974.
2998
2999 2005-10-04  Martin Baulig  <martin@ximian.com>
3000
3001         * class.c (mono_class_name_from_token): Removed the unneccessary
3002         `MonoGenericContext *' argument.
3003
3004 2005-10-04  Martin Baulig  <martin@ximian.com>
3005
3006         * loader.c
3007         (method_from_methodspec): Make the caching work again; fixes the
3008         performance regression from #76262.
3009
3010 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3011
3012         * file-io.c:
3013         * file-io.h:
3014         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3015         GetFileSystemEntries that performs the same work but without going
3016         into io-layer, locking, etc.
3017
3018 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
3019
3020         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
3021         ThreadState_Stopped as well. Fixes #76047.
3022
3023 2005-09-29  Martin Baulig  <martin@ximian.com>
3024
3025         * class.c
3026         (inflate_generic_context): If the new context has a `gmethod', set
3027         its `container' that that gmethod's `container'.
3028
3029         * metadata.c
3030         (mono_metadata_parse_generic_param): Simplify things;
3031         `generic_container = generic_context->container;' is just fine.
3032
3033         * loader.c (method_from_methodspec): Code cleanups.
3034
3035 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3036
3037         * decimal.c: fix warning (and let gcc generate correct
3038         code on ARM with optimizations).
3039
3040 2005-09-28  Martin Baulig  <martin@ximian.com>
3041
3042         * loader.c
3043         (method_from_memberref): Added `MonoGenericContext *class_context'
3044         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3045         (method_from_methodspec): If we're a memberref, use the enclosing
3046         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
3047
3048 2005-09-28  Martin Baulig  <martin@ximian.com>
3049
3050         * object.c (mono_runtime_invoke_array): Added support for
3051         MONO_TYPE_GENERICINST; fixes #75917.
3052
3053 2005-09-27  Martin Baulig  <martin@ximian.com>
3054
3055         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3056         `k->byval_arg.type' to determine the actual type.
3057
3058         * loader.c (method_from_methodspec): Removed some hacks.
3059
3060 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
3061
3062         * class-internals.h (mono_field_is_deleted): Do the test for
3063         rtspecialname before we check the actual name of the field. This
3064         prevents us from dereferencing a pointer into the string table,
3065         saving us from accessing a few pages
3066
3067         * *.c: Replace the use of {Enter,Leave}CriticalSection with
3068         macros. This will allow a deadlock debugger to easily be plugged
3069         in.
3070
3071 2005-09-27  Martin Baulig  <martin@ximian.com>
3072
3073         * loader.c (method_from_methodspec): Create a "signature"
3074         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
3075
3076 2005-09-27  Martin Baulig  <martin@ximian.com>
3077
3078         * class.c
3079         (inflate_generic_class): Correctly set the new context's
3080         container.
3081
3082         * loader.c
3083         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3084         instead of a `MonoGenericContext *'.
3085         (mono_method_signature_full): Take a `MonoGenericContainer *'
3086         instead of a `MonoGenericContext *'.
3087
3088         * metadata.c
3089         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3090         instead of a `MonoGenericContext *'.
3091         (mono_metadata_parse_method_signature_full): Likewise.
3092
3093 2005-09-26  Martin Baulig  <martin@ximian.com>
3094
3095         * class.c
3096         (mono_class_from_generic_parameter): Set `klass->generic_container'
3097         (mono_class_from_generic_parameter): Likewise.
3098         (mono_bounded_array_class_get): We inherit the generic container
3099         from the element class.
3100
3101         * loader.c
3102         (find_method, find_method_in_class): Take a `MonoGenericContext *'
3103         argument rather than computing it here.
3104         (method_from_memberref): Correctly set the generic context before
3105         parsing the signature.  Fixes #75681.
3106
3107 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
3108
3109         * object.c (mono_class_has_special_static_fields): Fix warnings.
3110
3111 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3112
3113         * assembly.c: Add parse_public_key function, to
3114         par the public keys. Also added mono_assembly_name_parse_full,
3115         to define it the parsed key should be freed or not.
3116         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3117         to parse a long format assembly name.
3118         * metadata-internals.h: Keep mono_assembly_name_parse_full as
3119         private, since calling it to preserve the key requires
3120         freeing it manually.
3121         
3122 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
3123
3124         * locales.c : removed HAVE_ICU part.
3125
3126 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3127
3128         * object.c (mono_class_create_runtime_vtable): Avoid calling 
3129         field_is_special_static if the klass has no special static fields.
3130
3131         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3132         (MonoCachedClassInfo): Likewise.
3133
3134         * object.c (mono_class_has_special_static_fields): New helper function.
3135
3136 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3137
3138         * class.c (mono_class_create_from_typedef): Don't call 
3139         interfaces_from_typedef_full for enums.
3140         (mono_class_create_from_typedef): Compute the base types of enums directly
3141         without calling mono_class_setup_fields ().
3142         (mono_class_find_enum_basetype): New helper function.
3143
3144         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3145         one place inside the string heap.
3146         
3147 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3148
3149         * class.c: locking fixes, code cleanups, some docs added.
3150         Allocate some data structures in the image mempool.
3151
3152 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3153
3154         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3155         the example code.
3156         
3157 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3158
3159         * class-internals.h, class.c, reflection.c: reduce memory taken by
3160         MonoClass.
3161
3162 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3163
3164         * metadata.c, metadata.h, loader.h: documentation updates, code and
3165         API cleanups.
3166
3167 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3168
3169         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3170         the example code.
3171
3172         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3173         page faults caused by the runtime while reading metadata.
3174
3175 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3176
3177         * socket-io.c: the field names were changed 3 months ago and no one
3178         realized until bug #76077 got filed!
3179
3180 2005-09-20  Martin Baulig  <martin@ximian.com>
3181
3182         * icall.c (assembly_icalls): Removed some unused debugger icalls.
3183
3184 2005-09-20  Martin Baulig  <martin@ximian.com>
3185
3186         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3187         write the rank into the class entry.
3188
3189 2005-09-20  Martin Baulig  <martin@ximian.com>
3190
3191         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3192
3193 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
3194
3195         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3196
3197         * icall.c (custom_attrs_defined_internal): New icall.
3198
3199         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3200         function.
3201         (mono_custom_attrs_construct_by_type): New helper function.
3202
3203 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
3204
3205         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3206         terminate the resulting string. Fixes #76123.
3207
3208 2005-09-16  Martin Baulig  <martin@ximian.com>
3209
3210         * mono-debug.c
3211         (mono_debug_add_method): Ignore inflated methods for the moment.
3212
3213 2005-09-14  Martin Baulig  <martin@ximian.com>
3214
3215         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3216
3217 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
3218
3219         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3220         return a success/failure indication.
3221         (mono_metadata_interfaces_from_typedef_full): Ditto.
3222         (get_constraints): Ditto.
3223
3224 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
3225
3226         * marshal.c (emit_marshal_array): Fix handling of null arrays.
3227         
3228         * marshal.c (emit_marshal_array): Add support for returning string
3229         arrays from delegates. Fixes #76063.
3230
3231         * marshal.c: Use the emit_ldloc/stloc macros where possible.
3232
3233 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
3234
3235         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3236         icall.
3237
3238 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
3239
3240         * reflection.c icall.c: Fix after mono_get_exception_type_load
3241         signature change.
3242
3243         * assembly.c (mono_assembly_get_assemblyref): New helper function.
3244         (mono_assembly_load_reference): Use the new helper.
3245
3246         * class-internals.h (MonoLoaderError): New structure containing 
3247         information about type loading errors.
3248
3249         * class-internals.h loader.c: Add APIs to store per-thread loader
3250         error information.
3251
3252         * loader.c class.c: Set the loader error if needed.
3253
3254         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3255
3256 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3257
3258         * decimal.c: fixed to handle the broken ARM fp format.
3259
3260 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3261
3262         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3263         broken.
3264
3265 2005-09-06  Martin Baulig  <martin@ximian.com>
3266
3267         * domain.c (supported_runtimes): Added v2.0.50727.
3268
3269 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3270
3271         * culture-info.h: reduce the size of some structures.
3272
3273 2005-09-05  Martin Baulig  <martin@ximian.com>
3274
3275         Reflect latest API changes in the August CTP.
3276
3277         * icall.c
3278         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3279         ("MonoType.HasGenericArguments"): Removed.
3280         ("MonoMethod.BindGenericParameters"): Renamed to
3281         "MakeGenericMethod".
3282         ("MethodBuilder.BindGenericParameters"): Renamed to
3283         "MakeGenericMethod".    
3284
3285 2005-09-05  Martin Baulig  <martin@ximian.com>
3286
3287         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3288
3289 2005-09-05  Martin Baulig  <martin@ximian.com>
3290
3291         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3292
3293         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3294         generic_container is non-NULL.
3295
3296 2005-09-05  Martin Baulig  <martin@ximian.com>
3297
3298         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3299
3300         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3301
3302 2005-08-29  Michal Moskal  <malekith@nemerle.org>
3303
3304         * reflection.c (encode_locals,
3305         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3306         for large generic types.
3307
3308 2005-09-05  Martin Baulig  <martin@ximian.com>
3309
3310         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3311
3312         * class.c (mono_dup_array_type): New public method.
3313         (mono_metadata_signature_deep_dup): New public method.
3314         (dup_type): Correctly duplicate array and function types.
3315
3316 2005-09-05  Martin Baulig  <martin@ximian.com>
3317
3318         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3319
3320         * reflection.c (get_default_param_value_blobs): Handle generic types
3321         and generic methods.
3322
3323 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
3324
3325         * class.c: Fixed error reporting (method/class were inversed) for 
3326         inheritance demands.
3327         * security-manager.c|h: Added the AppDomain when calling the managed
3328         System.Security.SecurityManager.InheritanceDemand method.
3329
3330 2005-09-01  Raja R Harinath  <rharinath@novell.com>
3331
3332         * reflection.c (encode_marshal_blob): 'marshaltype' and
3333         'marshaltyperef' are alternate sources for the custom marshaler
3334         name.
3335
3336 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3337
3338         * class.c: fix creation of array classes with rank == 1
3339         (patch by Ankit Jain <jankit@novell.com>).
3340
3341 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3342
3343         * object.c: fix check for creating the bound data for arrays vs
3344         szarrays.
3345
3346 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3347
3348         * object.c: configuration file name is now based on the executable name,
3349         not the image name. Fixes bug #75931.
3350
3351 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
3352
3353         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3354         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3355
3356 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
3357
3358         * rand.c: Use wincrypt.h instead of WinCrypt.h.
3359
3360 2005-08-24  Ankit Jain  <jankit@novell.com>
3361             Raja R Harinath  <rharinath@novell.com>
3362
3363         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3364           called by it recursively.
3365           (mono_class_init): Remove special case in pending_init handling, since it's
3366           superseded by the fix to mono_class_from_typeref.
3367
3368 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
3369
3370         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
3371         BROKEN_THREAD_START stuff.
3372
3373 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
3374
3375         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
3376         trampoline.
3377
3378         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3379         
3380         * object.c (mono_delegate_ctor): Replace the original function address with
3381         a delegate trampoline.
3382
3383 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3384
3385         * icall.c: add boolean argument to base64_to_byte_array and 
3386         InternalFromBase64String to control whether a whitespace-only string
3387         is allowed (or should casue a FormatException to be thrown). We need
3388         this as the behavior has changed between MS.NET 1.x and 2.0, and we
3389         to match the MS behaviour in both profiles.
3390         * appdomain.c: Bump corlib version.
3391
3392 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3393
3394         This patch implements a big portion of publisher policy
3395         support, used to bind assembly versions and redirect
3396         one assembly from version A to version B.
3397
3398         * assembly.c:
3399         New GSList loaded_assembly_bindings, for storing the cached
3400         assembly bindings.
3401         (assembly_binding_maps_name): New static function for checking if a 
3402         assembly binding information maps an assembly name.
3403         (mono_assembly_binding_info_free): New function for freeing
3404         assembly binding information resources.
3405         (get_publisher_policy_info): New static function for retrieving 
3406         assembly binding information from a MonoImage.
3407         (compare_versions): New static function for comparing an assembly
3408         binding information data and the version of an assembly name.
3409         (check_policy_versions): New static function for checking if an
3410         assembly binding info mapping an assembly name is valid for it.
3411         (mono_assembly_load_publisher_policy): New static function for
3412         loading the 'policy.major.minor.MyAssembly' image for an assembly
3413         with an assembly name 'aname'.
3414         (mono_assembly_bind_version): New static function for updating
3415         assembly redirection.
3416         (mono_assembly_apply_binding): New static function for applying
3417         assembly binding.
3418         (search_binding_loaded): New static function for searching 
3419         loaded assembly binding infos in the cache domain.
3420         (mono_assembly_load_full): Don't apply assembly binding for
3421         reflection only assemblies.
3422
3423         * metadata-internals.h: Add MonoAssemblyBindingInfo,
3424         which contains information about assembly binding. Also
3425         declare signature for mono_config_parse_publisher_policy ()
3426         function, used to retrieve pub policy info.
3427         
3428         * mono-config.c:
3429         (publisher_policy_start): New static function used to parse publisher 
3430         policy config files.
3431         (publisher_policy_parser): New static MonoParseHandler containing 
3432         the functions used when parsing config files.
3433         (mono_config_parse_publisher_policy): New function for parsing
3434         publisher policy files.
3435         
3436 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
3437
3438         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3439
3440         * marshal.c (mono_delegate_free_ftnptr): Ditto.
3441
3442         * object.c (mono_get_addr_from_ftnptr): New helper function.
3443
3444         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3445
3446         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3447
3448 2005-08-19  Dick Porter  <dick@ximian.com>
3449
3450         * threads.c, threads.h, appdomain.c, appdomain.h,
3451         profiler-private.h, monitor.c, object.c, object-internals.h,
3452         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3453         store the thread ID, so it can hold a 64 bit value if needed.
3454
3455 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
3456
3457         * reflection.c (mono_reflection_create_dynamic_method): Store the
3458         handle class into the method references as well so ldtoken works in
3459         dynamic methods.
3460
3461         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3462         types.
3463
3464 2005-08-19  Ankit Jain <jankit@novell.com>
3465
3466         Fix #75847.
3467         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
3468           here rather than using the method signature of a arbitrary function
3469           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
3470           two arguments.
3471           Hack done with Harinath.
3472
3473 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3474
3475         * threadpool.c: disable printing stack traces when we get a exception
3476         in a threadpool thread. I need to do more testing to figure out which
3477         cases actually print this. Fixes bug #75828.
3478
3479 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3480
3481         * icall.c: there might be ignored whitespace after the last '='. This
3482         fixes length computation and bug #75840.
3483
3484 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
3485
3486         * assembly.c (mono_assembly_load_full): Consider .exe extension as
3487         well. Fixes #75809.
3488
3489         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3490         #75784.
3491         
3492         * reflection.c (create_custom_attr_data): Ditto.
3493
3494 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
3495
3496         * locales.c, culture-info.h : removed RegionLCIDMap.
3497         * culture-info-tables.h : regenerated.
3498
3499 2005-08-16  Martin Baulig  <martin@ximian.com>
3500
3501         * class.c (mono_type_get_name_recurse): Small fix.
3502
3503 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
3504
3505         * locales.c : indentation fixie.
3506
3507 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
3508
3509         * object-internals.h,
3510           locales.h,
3511           locales.c,
3512           culture-info.h,
3513           icall.c : added RegionInfo table support.
3514         * culture-info-table.h : regenerated for region support.
3515
3516 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
3517
3518         * reflection.c (resolve_object): handle all kinds of MonoMethod
3519         including generic ones
3520
3521 2005-08-12  Ankit Jain <jankit@novell.com>
3522
3523         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3524           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
3525
3526 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
3527
3528         * process.c: Don't close a thread handle when it's NULL. This is a
3529         workaround for bug #75733.
3530
3531 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
3532
3533         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3534
3535 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
3536
3537         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3538
3539 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3540
3541         * threadpool.c: if a work item in the thread pool has a callback that
3542         catches a exception, don't propagate it after invoking the callback.
3543         Fixes bug #75336.
3544
3545 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
3546
3547         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3548
3549         * class-internals.h (MonoCachedClassInfo): Add some new fields.
3550
3551         * class.c (mono_class_init): Load field info lazily in the AOT case.    
3552
3553         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3554
3555 2005-08-03  Ankit Jain  <jankit@novell.com>
3556
3557         Fix #75683.
3558         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3559           PInvoke calling convention is 0.
3560
3561 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
3562
3563         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
3564         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3565
3566 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3567
3568         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3569         to handle threads not started by the GC (patch by Michael Meeks
3570         <michael.meeks@novell.com>).
3571
3572 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
3573
3574         * reflection.c: Make buffer used in emitting types larger for some
3575         big generic types (patch by Michal Moskal).
3576
3577 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
3578
3579         * mono-debug.c: Fix some (not all) alignment problems.
3580
3581 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3582
3583         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3584         Invoke mono_image_load_from_data_full passing the refonly
3585         parameter.
3586
3587         * assembly.c
3588         (mono_assembly_open_from_bundle): Add the refonly argument, 
3589         in order to pass it to other methods it calls to.
3590         (do_mono_assembly_open): Add the refonly argument, in order 
3591         to pass it to other methods it calls to.
3592         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3593         the refonly parameter to it.
3594
3595         * image.c: Add loaded_images_refonly_hash and
3596         loaded_images_refonly_guid_hash to cache the reflection
3597         only loaded images.
3598         (mono_images_init): Initialize the hash tables used for
3599         caching the reflection only images.
3600         (load_modules): Invoke mono_image_open_full passing the refonly
3601         parameter to load the modules the correct way.
3602         (build_guid_table): Add the refonly argument, to re-build the 
3603         correct hash table.
3604         (do_mono_image_open): Added the refonly argument, in order to
3605         define it for the loaded image.
3606         (mono_image_loaded_full): New function, which receives an
3607         additional parameter to look for the image in the refonly or
3608         non-refonly section.
3609         (mono_image_loaded): Updated, using mono_image_loaded_full.
3610         (mono_image_loaded_by_guid_full): The same case that happens
3611         with mono_image_loaded_full.
3612         (mono_image_loaded_by_guid): Likewise.
3613         (register_image): Use the ref_only variable inside MonoImage
3614         to decide in which hash table store the current image.
3615         (mono_image_open_from_data_full): Rename
3616         mono_image_open_from_data to mono_image_open_from_data_full,
3617         adding the refonly argument, to define the ref_only variable 
3618         inside MonoImage.
3619         (mono_image_open_from_data): Return 
3620         mono_image_open_from_data_full.
3621         (mono_image_open_full): Rename mono_image_open to
3622         mono_image_open_full, receiving the new refonly argument,
3623         to pass it to inner methods.
3624         (mono_pe_file_open): Update this function, to open
3625         a MonoImage as a non-refonly image.
3626         (mono_image_close): Use the refonly variable inside
3627         MonoImage to remove the image from the correct caches.
3628
3629         * image.h: Add the signatures of mono_image_open_full,
3630         mono_image_open_from_data_full, mono_image_loaded_full,
3631         mono_image_loaded_by_guid_full.
3632
3633         * metadata-internals.h: Add the ref_only field to 
3634         MonoImage.
3635         
3636 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3637
3638         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3639         Fix the last behavior, which used to load the assemblies and
3640         extract MonoReflectionAssemblyName information, instead of
3641         extract it from the metadata tables. Needed for Reflection
3642         Only assemblies.
3643         
3644 2005-07-29  Martin Baulig  <martin@ximian.com>
3645
3646         * mono-debug-debugger.c
3647         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3648         not initialized.
3649
3650         * mono-debug.c
3651         (mono_debug_address_from_il_offset): Check whether we have
3652         debugging support before attempting to take the lock.
3653         (mono_debug_source_location_from_address): Likewise.
3654         (mono_debug_source_location_from_il_offset): Likewise.
3655         (mono_debug_il_offset_from_address): Likewise.
3656         (mono_debug_address_from_il_offset): Likewise.
3657
3658 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
3659
3660         * class.c (mono_class_from_name_case): Add support for dynamic images.
3661         Fixes #75650.
3662
3663         * object.c (mono_class_compute_gc_descriptor): Add a workaround
3664         for #75479.
3665
3666 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3667         
3668         * reflection.c (mono_method_get_object): Fix warning.
3669
3670 2005-07-28  Martin Baulig  <martin@ximian.com>
3671
3672         * mono-debug.c
3673         (mono_debug_add_wrapper): Also write the wrapper type.
3674
3675 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3676
3677         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3678         
3679         * class.c (mono_class_init): Avoid reading nested classes if the AOT
3680         data indicates the class has none.
3681
3682 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
3683
3684         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3685         loader lock with the debugger lock. Prevents deadlocks for beagle.
3686
3687         Beagle can now run on an smp box for a weekend without any
3688         issues. Woohoo!
3689
3690 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
3691
3692         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3693         in a module. Fixes #75629.
3694
3695 2005-07-26  Martin Baulig  <martin@ximian.com>
3696
3697         * mono-debug.c (mono_debug_add_wrapper): New static method.
3698         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3699         interncall or a wrapper.
3700
3701         * mono-debug.h (MonoDebugWrapperData): New public typedef.
3702         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3703         (MONO_DEBUGGER_VERSION): Bump to 51.
3704
3705         * mono-debug-debugger.c
3706         (mono_debugger_add_type): Removed this empty function.
3707         (mono_debugger_add_method): Likewise.
3708
3709 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
3710
3711         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
3712         before accessing method->slot.
3713
3714 2005-07-21  Jb Evain  <jbevain@gmail.com>
3715
3716         * reflection.c (method_encode_clauses/class): Handle filters clauses.
3717         Fixes #75010.
3718
3719 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
3720
3721         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3722         #75587.
3723
3724 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3725
3726         * image.h image.c: Add mono_image_get_guid () API function.
3727
3728 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
3729
3730         There were issues when multiple threads tried to load
3731         assemblies. A deadlock was created between assemblies_mutex and
3732         mono_domain_assemblies_lock. This fixes the issue by making the
3733         assembly ref counting be lock free. See bug 75586.
3734         
3735         * image.c (mono_image_close): The add ref function here was using
3736         Interlocked operations while the unref was using a mutex and a
3737         --. I don't think this was ever a bug that would be exposed in a
3738         non-pendantic way (ie, by an embedder doing a ref on one thread
3739         and an unref on another), but for the sake of correctness, this is
3740         now Interlocked.
3741
3742         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3743         (mono_assembly_load_reference): Call mono_assembly_addref rather
3744         than touching the refcount ourselves.
3745         (mono_assembly_close): Use InterlockedDecrement to unref the
3746         assembly. Don't acquire the lock unless it is actually needed.
3747
3748 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3749
3750         * class.c (mono_class_layout_fields): Fix calculation of has_references
3751         for generic types.
3752
3753 2005-07-12  Martin Baulig  <martin@ximian.com>
3754
3755         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3756
3757         * metadata.c
3758         (mono_type_hash): Provide better hashing for generic instances.
3759         (mono_generic_inst_hash): Improve hashing.
3760         (mono_generic_class_hash): Likewise.
3761
3762         * reflection.c (mymono_metadata_type_hash): Improve hashing for
3763         generic instances.
3764
3765 2005-07-12  Martin Baulig  <martin@ximian.com>
3766
3767         * reflection.c (mono_reflection_create_runtime_class): Remove the
3768         hack for generic type definitions and non-`Run' assemblies.
3769         (mono_reflection_bind_generic_parameters): Also use
3770         `klass->wastypebuilder' to check for TypeBuilders.
3771
3772 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3773
3774         * class.c (mono_class_layout_fields): Fix calculation of has_references
3775         for generic types.
3776
3777         * class.c (inflate_generic_class): Fix a leak.
3778         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3779         for generic types.
3780
3781 2005-07-11  Martin Baulig  <martin@ximian.com>
3782
3783         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3784         on error.
3785
3786 2005-07-11  Martin Baulig  <martin@ximian.com>
3787
3788         * loader.c (find_method): Also lookup in
3789         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3790
3791 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3792
3793         * appdomain.c (mono_domain_unload): Don't free the error message
3794         before passing it to mono_get_exception_...
3795
3796         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3797         
3798 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3799
3800         * threads.c: try to better guess an available RT signal (bug #75387).
3801
3802 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3803
3804         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3805         and CACHE_OBJECT.
3806
3807 2005-07-07  Martin Baulig  <martin@ximian.com>
3808
3809         * class.c (mono_type_get_name_full): Return NULL for
3810         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3811         fixes #75408.
3812
3813 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3814
3815         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3816         exit the appdomain as well being aborted.
3817
3818         * threadpool.c: Create all threadpool threads inside the root appdomain, and
3819         change back to the root domain after calling managed code. This enables
3820         appdomains using threadpools to be unloaded.
3821
3822 2005-07-07  Martin Baulig  <martin@ximian.com>
3823
3824         * class-internals.h
3825         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3826         into `MonoDynamicGenericClass' since we only need it for dynamic
3827         types.
3828
3829         * reflection.c (mono_class_bind_generic_parameters): We don't need
3830         to compute the `parent' here.
3831
3832 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
3833
3834         * culture-info-table.h : regenerated.
3835
3836 2005-07-06  Martin Baulig  <martin@ximian.com>
3837
3838         * icall.c
3839         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3840
3841         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3842
3843 2005-07-06  Martin Baulig  <martin@ximian.com>
3844
3845         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3846         we're doing a signature-only comparision; fixes #74945.
3847
3848 2005-07-06  Martin Baulig  <martin@ximian.com>
3849
3850         * class-internals.h (MonoGenericClass): Moved some things out into
3851         a new `MonoInflatedGenericClass' type.  
3852         (MonoInflatedGenericClass): New type; the `klass' of a
3853         `MonoGenericClass' is now computed lazyly in
3854         mono_get_inflated_generic_class().      
3855
3856         * class.c (mono_get_inflated_generic_class): New public function.
3857         (mono_class_inflate_generic_method): Removed the unused
3858         `MonoClass *' argument.
3859         (setup_generic_vtable): Don't call mono_get_inflated_method() on
3860         all the methods.
3861         (mono_class_create_generic): Make this static and merge it with
3862         mono_class_create_generic_2(); we're now called automatically from
3863         mono_get_inflated_generic_class().
3864
3865         * loader.c (mono_method_signature): Call
3866         mono_get_inflated_method() here.
3867
3868 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
3869
3870         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3871         type of fields with RVA.
3872
3873         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3874         for this pseudo class.
3875         (my_mono_class_from_generic_parameter): Likewise.
3876         (mono_class_init): Allow interfaces to have cctors.
3877
3878 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3879
3880         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3881         lazily for AOT methods.
3882
3883 2005-07-05  Martin Baulig  <martin@ximian.com>
3884
3885         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3886         returns FALSE for a successful match, not TRUE.
3887
3888 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3889
3890         * loader.c (mono_method_get_index): Optimize this a bit.
3891
3892 2005-07-04  Martin Baulig  <martin@ximian.com>
3893
3894         * class.c
3895         (class_compute_field_layout): Move the check for generic type
3896         definitions into mono_class_layout_fields().  Fixes #74684.
3897         (mono_class_from_generic_parameter): Correctly compute
3898         `klass->parent'; fixes #75457.
3899
3900         * reflection.c (register_assembly, register_module): Make sure
3901         `domain->rejobject_hash' is already created.
3902
3903 2005-07-02  Martin Baulig  <martin@ximian.com>
3904
3905         * class-internals.h
3906         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3907         `MonoDynamicGenericClass'.      
3908
3909 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
3910
3911         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3912         returned by a field getter is null, since null is a valid value.
3913
3914 2005-07-01  Martin Baulig  <martin@ximian.com>
3915
3916         * reflection.c (mono_reflection_generic_class_initialize): Update
3917         the `dgclass->fields [i].parent' to the correct class.
3918         (mono_image_get_fieldref_token): Use the declaring type, not the
3919         reflected type.
3920
3921 2005-07-01  Martin Baulig  <martin@ximian.com>
3922
3923         * loader.c (find_method): Also look in the interfaces; fixes #75429.
3924
3925 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
3926
3927         * threads.c (thread_cleanup): assert that thread != NULL
3928         (wait_for_tids_or_state_change): We were using the wrong variable
3929         when accessing wait->threads. `i' was always out of the bounds of
3930         the array.
3931
3932 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3933
3934         * loader.c: map user32 and kernel32 to libMonoSupportW
3935
3936 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
3937
3938         * appdomain.c (unload_thread_main): Mark this as WINAPI.
3939
3940 2005-06-28  Martin Baulig  <martin@ximian.com>
3941
3942         * loader.c (method_from_methodspec): Fix #75334.
3943
3944 2005-06-28  Martin Baulig  <martin@ximian.com>
3945
3946         Fix #74953 - Arrays now implement the generic IList<T> interface
3947         on the 2.0 platform.
3948
3949         * class-internals.h (MonoDefaults): Added `generic_array_class'.
3950
3951         * reflection.c (mono_class_bind_generic_parameters): New public
3952         function; similar to mono_reflection_bind_generic_parameters(),
3953         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3954
3955         * domain.c (mono_init_internal): Try to initialize.
3956         `mono_defaults.generic_array_class' here; this'll only succeed if
3957         we're using the 2.0 corlib.
3958
3959         * icall.c
3960         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3961         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3962         (mono_lookup_internal_call): Added support for nested classes.
3963
3964         * loader.c
3965         (mono_get_method_from_token): Set `result->signature->pinvoke' if
3966         we're an interncall and have generic arguments.
3967
3968         * class.c
3969         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3970         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3971         instance of System.Array.InternalArray<T> for arrays, so they
3972         implement the generic IList<T> interface.
3973
3974 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
3975
3976         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3977         (chastamar@yahoo.com). Fixes #75374.    
3978
3979 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
3980
3981         * culture-info-table.h: regenerated.
3982
3983 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3984
3985         * icall.c: handle spaces correctly for base64 strings.
3986
3987 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
3988
3989         * *.c: Kill some warnings.
3990
3991 2005-06-23  Duncan Mak  <duncan@novell.com>
3992
3993         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3994         that this builds on Solaris 10 (x86).
3995
3996 2005-06-23  Martin Baulig  <martin@ximian.com>
3997
3998         * class.c
3999         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4000         generic type definitions.
4001
4002 2005-06-23  Martin Baulig  <martin@ximian.com>
4003
4004         Fix #75331.
4005
4006         * metadata.c (mono_class_get_overrides): Renamed to
4007         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4008         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4009         pass it to mono_get_method_full().
4010
4011 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
4012
4013         * reflection.c (mono_reflection_create_runtime_class): take the
4014         mono_domain_lock in this method. Prevents deadlocks
4015
4016 2005-06-22  Martin Baulig  <martin@ximian.com>
4017
4018         * loader.c (method_from_methodspec): Fix #75330.
4019
4020 2005-06-22  Martin Baulig  <martin@ximian.com>
4021
4022         * reflection.c (type_get_qualified_name): Use
4023         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4024         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4025         argument; use it if we don't have an assembly name.
4026
4027 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
4028
4029         * object.c: In mono_message_init, set "copy out" flag for in
4030         parameters with the [Out] flag.
4031
4032 2005-06-21  Martin Baulig  <martin@ximian.com>
4033
4034         * class.c
4035         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4036         and MONO_TYPE_PTR.
4037
4038 2005-06-21  Martin Baulig  <martin@ximian.com>
4039
4040         * class.c (mono_class_init): Don't initialize `class->fields' for
4041         generic instances since they're initialized again in
4042         compute_field_layout(). 
4043         (compute_field_layout): Set the field's `generic_info' here; fix
4044         #75320. 
4045
4046 2005-06-21  Martin Baulig  <martin@ximian.com>
4047
4048         * class-internals.h
4049         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4050
4051         * metadata.c (mono_metadata_generic_method_equal): Also
4052         distinguish the `generic_class'; fixes #75334.
4053
4054 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4055
4056         * domain.c:
4057         * appdomain.c:
4058         * domain-internals.h:
4059         * reflection.c: 'domain_assemblies' field is now protected by its own
4060         lock. Don't call into managed code to run the AssemblyLoad event if we
4061         now there are no registered delegates for it.
4062
4063 2005-06-20  Martin Baulig  <martin@ximian.com>
4064
4065         * class.c (mono_class_is_assignable_from): Use a custom version of
4066         mono_class_has_parent() to make things work for generic instances;
4067         fix #75300.
4068
4069 2005-06-20  Martin Baulig  <martin@ximian.com>
4070
4071         * loader.c (method_from_methodspec): Apply a patch from
4072         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4073
4074 2005-06-20  Martin Baulig  <martin@ximian.com>
4075
4076         * class.c (mono_class_init): Reverted Zoltan's last change; it
4077         breaks generics.
4078
4079 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
4080
4081         * threads.c (wait_for_tids_or_state_change): Add missing locking.
4082
4083 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4084
4085         * socket-io.c: fix the index in the socket array for writable/error
4086         sockets. Fixes bug #75306.
4087
4088 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
4089
4090         * class.c (mono_class_init): Allow interfaces to have static ctors.
4091
4092 2005-06-17  Martin Baulig  <martin@ximian.com>
4093
4094         * loader.c (method_from_methodspec): Use `context->container' when
4095         parsing the `gmethod->inst'.
4096
4097 2005-06-17  Martin Baulig  <martin@ximian.com>
4098
4099         * class.c (mono_type_get_name_recurse): Don't add the assembly
4100         name for type arguments.
4101
4102 2005-06-15  Martin Baulig  <martin@ximian.com>
4103
4104         * reflection.c (mono_image_get_inflated_method_token): Encode
4105         correct klass; fixes #75260.
4106
4107 2005-06-13 Michal Moskal <malekith@nemerle.org>
4108
4109         * icall.c: Make GetCorrespondingMethod/Constructor take
4110         MonoReflectionMethod method not MonoMethod. Removed
4111         MonoType.GetCorrespondingField, and make
4112         MonoGenericType.GetCorrespondingField take name not
4113         MonoClassField.
4114
4115 2005-06-13  Michal Moskal <malekith@nemerle.org>
4116
4117         * reflection.c (field_encode_signature, encode_locals):
4118          Make sizes of buffers for types larger (for big generic types).
4119          (create_generic_typespec,
4120          mono_reflection_sighelper_get_signature_local,
4121          mono_reflection_sighelper_get_signature_field):
4122          Add asserts for too small buffers.
4123
4124 2005-06-15  Martin Baulig  <martin@ximian.com>
4125
4126         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4127         if our parent is not a dynamic type.
4128
4129 2005-06-15  Martin Baulig  <martin@ximian.com>
4130
4131         * class-internals.h (MonoTypeNameFormat): New enum.
4132
4133         * class.c
4134         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4135         (mono_type_get_full_name): Removed.
4136         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4137         argument instead of the boolean's.
4138
4139         * icall.c (ves_icall_System_MonoType_getFullName):
4140         Added `gboolean assembly_qualified'.    
4141
4142         * reflection.h
4143         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4144
4145         * reflection.c (mono_reflection_parse_type): Parse the new type
4146         name format.
4147
4148 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4149
4150         * icall.c: no need to convert from utf16 to utf8 and then back again
4151         after the call to GetLogicalDrives.
4152
4153 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4154
4155         * icall.c: frombase64. Fix problems exposed by new tests.
4156
4157 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4158
4159         * icall.c: added internal calls for converting char [] and strings in
4160         base64 into byte [].
4161
4162 2005-06-10  Martin Baulig  <martin@ximian.com>
4163
4164         * class.c (mono_class_create_generic_2): Read the nested classes
4165         from the metadata rather than from `gklass->nested_classes' since
4166         `gklass' might not be initialized yet.
4167
4168 2005-06-09  Duncan Mak  <duncan@novell.com>
4169
4170         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4171         all public headers. Fixes #74919.
4172
4173 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
4174
4175         * domain.c: The key for proxy_vtable_hash is now a pointer
4176         array. Added new GHashFunc and GCompareFunc functions for this.
4177
4178         * class.h: The list of interfaces in MonoRemoteClass is known in
4179         advance and can't grow (we create a new MonoRemoteClass if needed),
4180         so now the interface array can be allocated together with
4181         MonoRemoteClass.
4182         
4183         * object.c: Added a new method create_remote_class_key.
4184         Fixed mono_remote_class so it does not depend on
4185         mono_upgrade_remote_class.
4186         Removed extend_interface_array.
4187         Added new method clone_remote_class(), which makes a copy of a remote
4188         class and adds a new interface or class to it.
4189         mono_upgrade_remote_class() now creates a new remote class (or gets
4190         it from the cache) if an vtable upgrade is needed. In this way
4191         we make sure that other objects sharing the same remote class
4192         don't get the new vtable with unwanted interfaces.
4193         
4194         * object-internals.h:
4195         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4196         
4197         * marshal.c: Track changes in mono_upgrade_remote_class().
4198
4199 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
4200         * icall.c: Add runtime methods for obtaining members of inflated
4201         class, which were created from supplied non-inflated members. It
4202         is used in internal Get{Method,Constructor,Field} methods in
4203         System.Type
4204
4205 2005-06-09  Martin Baulig  <martin@ximian.com>
4206
4207         * reflection.c
4208         (mono_reflection_bind_generic_method_parameters): Fix #75169.
4209
4210 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4211         * reflection.c (mono_image_basic_init): Define
4212         Version in MonoDynamicAssembly. 
4213         
4214 2005-06-08  Martin Baulig  <martin@ximian.com>
4215
4216         Fix #75136.
4217
4218         * loader.c
4219         (mono_method_signature_full): New public method; takes a
4220         `MonoGenericContext *'.
4221         (find_method): Use mono_method_signature_full() and pass the
4222         klass'es context to it.
4223
4224         * class.c (mono_class_is_inflated_method): Use
4225         mono_method_signature_full() and pass the context to it.
4226
4227 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4228
4229         * object.c: add proper locking in mono_remote_class_vtable(),
4230         fixes possible memory corruption.
4231
4232 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
4233
4234         * marshal.c (mono_remoting_marshal_init): set
4235         initialized after initialization.
4236
4237 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
4238
4239         * locales.c : hush.
4240
4241 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
4242
4243         * object.c (extend_interface_array): fix really silly
4244         memory corrupting / comparison bug.
4245
4246 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4247
4248         * reflection.c: Functions added to support the creation
4249         of CustomAttributeData, which includes Attribute data
4250         used by ReflectionOnly methods.
4251
4252         * reflection.h:  mono_reflection_get_custom_attrs_data and
4253          mono_custom_attrs_data_construct added (functions exposed).
4254
4255          * icall.c: Added mono_reflection_get_custom_attrs_data
4256          as icall.
4257         
4258 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
4259
4260         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4261         lupus's request.
4262
4263 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
4264
4265         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4266
4267         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4268         dynamic DllImportAttribute.
4269
4270         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
4271         dynamic DllImportAttribute.
4272
4273         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4274         Fixes #75162.
4275
4276 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4277
4278         * threads.c: avoid segfault when an unstarted thread is aborted.
4279
4280 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
4281
4282         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4283         Returns the name and version of the runtime for reporting.
4284
4285 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4286
4287         * appdomain.c: bump corlib version.
4288         * object-internals.h: new field in MonoReflectionAssembly.
4289
4290 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4291
4292         * object-internals.h: Carlos forgot to add this field.
4293
4294 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4295
4296         * icall.c: Added create_version to create instances
4297         of Version of MonoReflectionAssemblyName. This change helps
4298         the AssemblyName tests to keep running fine.
4299         
4300 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
4301   
4302         * object.c (mono_method_return_message_restore): A somehow less
4303         intrusive fix for #75138.
4304
4305 2005-06-03  Raja R Harinath  <rharinath@novell.com>
4306
4307         * object.c (mono_method_return_message_restore): Fix computation
4308         of expected number of out args.
4309
4310 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4311
4312         * reflection.c (mono_image_get_method_info): Fix the case when the
4313         charset is empty.
4314
4315 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
4316
4317         * object.c: Added missing null check in
4318           mono_method_return_message_restore.
4319
4320 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4321
4322         * reflection.c (mono_image_get_method_info): Handle the case when
4323         dllentry is empty.
4324
4325 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
4326
4327         * object.c: When creating the vtable for a proxy, take into account
4328         all inherited interfaces, not only the ones registered in
4329         iclass->interfaces. This fixs bug #74996.
4330         Also, in mono_method_return_message_restore, verify that the array
4331         of out args has the expected lengh.
4332
4333 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4334
4335         * socket-io.c: update the timeout in Poll when the call is interrupte.
4336
4337 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4338
4339         * socket-io.c: support abort/suspend in Select_internal after last
4340         change.
4341
4342 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4343
4344         * threadpool.c: remove warning.
4345
4346 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4347
4348         * icall.c:
4349         * socket-io.[ch]: Select_internal uses poll() now when available, thus
4350         removing the 1024 limit from select(). Runtime part of the fix for
4351         bug #71203.
4352
4353 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4354
4355         * socket-io.c: when resolving the addresses for the same
4356         host returned by gethostname(), get the local IPs from the interface
4357         list. Loopback addresses are discarded if the are interfaces up with
4358         non-loopback ones. Fixes bug #63265.
4359
4360 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
4361
4362         * appdomain.c, verify.c, object-internals.h, reflection.c:
4363         bumped corlib number to 36, and added new extra_flags field
4364         to ReflectionMethodBuilder and friends.  Fixes #75060.
4365
4366 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4367
4368         * gc.c: register a new weak link only if the object is non-null
4369         (fixes bug#75047).
4370
4371 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4372
4373         * culture-info.h : short time pattern too.
4374
4375 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4376
4377         * culture-info.h : expand long time pattern string length.
4378
4379 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4380
4381         * culture-info-table.h : update (more French date format; #72788).
4382
4383 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
4384
4385         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4386         the method is static. Fixes #75029.
4387
4388 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
4389
4390         * reflection.c: Update the table_idx field of method builders after
4391         saving the module, since it can change. This is a workaround for
4392         bug #74914. 
4393
4394 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4395
4396         * culture-info-table.h : update (additional French date format).
4397
4398 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
4399
4400         * icall.c (ves_icall_type_Equals): Revert last change.
4401         
4402         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4403
4404         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4405
4406 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
4407
4408         * class-internals.h: Added executioncontext_class field to 
4409         MonoDefaults structure.
4410         * domain.c: Cache System.Threading.ExecutionContext class in 
4411         mono_defaults.
4412         * object.c: Capture the ExecutionContext for asynchroneous calls in
4413          mono_async_result_new.
4414         * object-internals.h: Added execution_context and original_context 
4415         fields to MonoAsyncResult. Added execution_context to MonoThread.
4416         * security-manager.c|.h: Added mono_get_context_capture_method to 
4417         return the capture method (if required by the security manager or by
4418         the framework version used).
4419         * threadpool.c: Apply capture (if present) ExecutionContext in 
4420         mono_async_invoke and revert to original context after it completes.
4421
4422 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
4423
4424         * culture-info-table.h : updated (real hacky solution for zh-CHT).
4425
4426 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
4427
4428         * culture-info-table.h : zh-CHT related workaround.
4429
4430 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4431
4432         * marshal.c (emit_marshal_custom): Add some error checking and call the
4433         methods in the ICustomMarshaler interface. Fixes #74875.
4434         
4435         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4436         native->managed wrappers.
4437
4438 2005-05-12  Martin Baulig  <martin@ximian.com>
4439
4440         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4441         here and use the loader lock.
4442
4443         * mono-debug.c: Properly lock when the debugger is not attached.
4444         (mono_debug_init): Release the initial lock if we're not running
4445         in the debugger.
4446
4447 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4448
4449         * marshal.c (emit_marshal_custom): Pass through NULL values without
4450         calling the custom marshalling routines.
4451
4452         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4453         conversion in structures. Fixes #74882.
4454
4455 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
4456
4457         * culture-info-table.h : zh-* cultures were missing.
4458
4459 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
4460
4461         * threads.c: Added a new event background_change_event which is signaled
4462         when a thread changes its background mode.
4463         Moved here several checks previously done in managed code. The checks
4464         require the thread lock, and using the thread lock in managed code
4465         can result in deadlocks.
4466         Merged Start_internal and Thread_internal into a single method. Now 
4467         Thread_internal does all work of creating and starting a thread.
4468         Added icalls for setting and getting the state of the object. Moved from
4469         managed code to avoid locking there.
4470         Added wait_for_tids_or_state_change() which is called instad of
4471         wait_for_tids when waiting for non-backround threads to end. This method
4472         will return if one of the threads ends or the background_change_event
4473         is signaled.
4474         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4475         the background mode. This method signals the background_change_event
4476         event.
4477         * icall.c:
4478         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4479         removed Start_internal.
4480         
4481 2005-05-11  Martin Baulig  <martin@ximian.com>
4482
4483         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4484         to order of some fields to get proper alignment on 64-bit machines.
4485
4486 2005-05-11  Martin Baulig  <martin@ximian.com>
4487
4488         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4489         changes as they're broken and completely fuck up the debugger.
4490
4491         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4492
4493 2005-05-10  Martin Baulig  <martin@ximian.com>
4494
4495         * reflection.c (mono_reflection_generic_class_initialize): Don't
4496         call mono_class_setup_parent() here.
4497
4498 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4499
4500         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4501         send/receive timeout use an integer in milliseconds. We were using a
4502         struct timeval.
4503
4504 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4505
4506         * locales.c:
4507         (internal_get_cultures): reserve the first slot of the array for the
4508         InvariantCulture, which will be filled in managed code.
4509
4510 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
4511
4512         * reflection.c (mono_image_fill_module_table): Initialize the
4513         GENERATION field as well.
4514
4515 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4516
4517         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4518         Monitor.Enter on the object.
4519
4520 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
4521
4522         * threads.c: Enable the wait for running threads when exiting.
4523         * icall.c: Suspend all threads before exiting.
4524
4525 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
4526
4527         * assembly.c (mono_assembly_load_reference): Fix warning.
4528
4529 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4530
4531         * threadpool.c: changed the default number of threads per cpu. From now
4532         on, the default will be 20 + (5 * number of cpus) instead of 50.
4533
4534 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
4535
4536         * loader.c (mono_method_get_signature_full): Add locking here.
4537
4538 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
4539
4540         * appdomain.c: Moved methods for parsing and freeing assembly
4541         names to assembly.c.
4542         * assembly.c, domain-internals.h: Created public methods for parsing
4543         assembly names. Fixed mono_assembly_load_with_partial_name:
4544         it now finds the best match, taking into account the version,
4545         token and culture specified in the partial name. Also return
4546         the latest version if no version information is specified.
4547
4548 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4549
4550         * threadpool.c: replace check for SocketAsyncCall class.
4551
4552 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4553
4554         * threadpool-internals.h:
4555         * Makefile.am: added threadpool-internals.h
4556
4557         * threadpool.c: call mono_unhandled_exception on exceptions not handled
4558         that happen in threadpool threads (tested on MS).
4559         (mono_thread_pool_remove_socket): new function that dispatch any pending
4560         AIO call on a socket that is closing. By now only epoll really needs it,
4561         as select/poll wake up when the socket closes.
4562
4563
4564         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4565
4566 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
4567
4568         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4569
4570 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
4571
4572         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4573
4574 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
4575
4576         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4577         has an abort request, convert it into a suspend request.
4578
4579 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
4580
4581         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4582         warning for the usage of `UnmanagedFunctionPointerAttribute' which
4583         is not supported yet.
4584
4585 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4586
4587         * image.c: register assemblies loaded from data (bundles) in the loaded
4588         assemblies hash. Fixes bug #74772.
4589
4590 2005-04-29  Martin Baulig  <martin@ximian.com>
4591
4592         * class.c (mono_type_get_name_recurse): Update to the new naming
4593         schema from the latest .NET 2.x beta2.
4594         (mono_class_setup_vtable_general): If we're a generic instance,
4595         copy the vtable from our generic type definition and inflate all
4596         the methods in it.
4597
4598         * loader.c (find_method): Update to the new naming schema from the
4599         latest .NET 2.x beta2.
4600
4601 2005-04-29  Raja R Harinath  <harinath@gmail.com>
4602
4603         * class.c (mono_class_init): Add a mono_loader_unlock to the
4604         #74734 fix.
4605
4606 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4607
4608         * icall.c (ves_icall_System_Environment_Exit): Remove the 
4609         suspend_all_other_threads () call for the time being, since it can hang.
4610
4611         * threads.c (mono_thread_manage): Similarly, disable the waiting for
4612         the background threads to exit, since it can also hang.
4613
4614         * class.c (mono_class_init): Applied patch from Ankit Jain 
4615         (radical@gmail.com). Avoid pending init errors when a field refers
4616         to a nested class using a typeref. Fixes #74734.
4617
4618         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4619         this for dynamic modules.
4620
4621 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4622
4623         * threads.c: don't wait for threads that are in the process of aborting
4624         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4625         and waiting for background threads to finish. This makes xsp and
4626         mod-mono-server exit without random length delays and/or hangs.
4627
4628 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4629
4630         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4631
4632 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
4633
4634         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4635         dynamic types to prevent infinite loops. Fixes #74727.
4636
4637         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4638         ..._is_assignable_to.
4639
4640 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
4641
4642         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4643
4644 2005-04-25  Martin Baulig  <martin@ximian.com>
4645
4646         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4647
4648         * domain.c
4649         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4650
4651         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4652
4653         * reflection.c (build_compressed_metadata): Set metadata header
4654         version to 2.0.
4655
4656 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4657
4658         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4659         number into an integral and a decimal part. Fixes #70473.
4660
4661         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4662
4663 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
4664
4665         * culture-info-table.h : reflected the latest locale-builder output.
4666
4667 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4668
4669         * threadpool.c: check for SuspendRequested too when deciding if
4670         mono_thread_interruption_checkpoint should be called.
4671
4672 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4673
4674         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4675         * threads.c: remove interruption_mutex and use Interlocked instead. When
4676         suspending all the threads, wait for all the suspended events at once.
4677         If we're shutting down and get an APC that is going to be queued,
4678         call mono_thread_execute_interruption immediately, as the thread might
4679         be sleeping on a pthread condition or mutex.
4680
4681         * icall.c: call mono_runtime_set_shutting_down before suspending the
4682         threads.
4683
4684         Fixes bug #74693. And now xsp is happier when exiting.
4685
4686 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4687
4688         * loader.c (mono_stack_walk): Fix #74690.
4689
4690 2005-04-22  Martin Baulig  <martin@ximian.com>
4691
4692         * mono-debug.h (MonoDebugMethodJitInfo): Added
4693         `MonoDebugMethodJitInfo *jit'.
4694
4695         * mono-debug.c (mono_debug_read_method): Cache the
4696         MonoDebugMethodJitInfo in `address->jit'.
4697         (mono_debug_free_method_jit_info): New public method.
4698
4699 2005-04-22  Martin Baulig  <martin@ximian.com>
4700
4701         * class.c (mono_class_is_assignable_from): Disallow
4702         type parameter -> interface.
4703
4704 2005-04-21  Dick Porter  <dick@ximian.com>
4705
4706         * threads.c (mono_thread_create): Turn an assertion into an error.
4707
4708 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4709
4710         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4711         
4712         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
4713         Fix some gcc 4.0 warnings.
4714
4715 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4716
4717         * file-io.c: fix alt dir separator char on unix systems
4718         and cleanup (fixes bug #71214).
4719
4720 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
4721
4722         * marshal.c: Use CALLVIRT instead of CALL when dispatching
4723         a call to a remote domain, since the method may be an
4724         interface method in the client domain. This fixes bug #74192.
4725
4726 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4727
4728         * threadpool.c: recv/send are now performed before going back to managed
4729         code to save one transition.
4730
4731 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4732
4733         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4734
4735         * metadata/threadpool.c: removed hack to workaround the bug above.
4736
4737         Fixes bug #74618.
4738
4739 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4740
4741         * reflection.c reflection.h: Fix handling of parameter defaults in
4742         dynamic methods. Also fixes handling of parameter attributes.
4743         Fixes #74609.
4744
4745         * mono-debug.c (mono_debug_close_image): Fix warning.
4746
4747 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4748
4749         * socket-io.h: replaced old unused field with new 'blocking'.
4750         * threadpool.c: restore socket blocking state on windows(tm).
4751
4752 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
4753
4754         * icall.c: don't return the codebase in the AssemblyName[] returned by
4755         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4756         * object-internals.h: Removed FIXME (fields were presents) and fixed
4757         versioncompat declaration.
4758
4759 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4760
4761         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4762         not closed, so don't cleanup when it happens.
4763
4764 2005-04-13  Chris Toshok  <toshok@ximian.com>
4765
4766         * mono-debug-debugger.h: change prototype for
4767         mono_debugger_lookup_type.
4768
4769         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4770         this function, although it should probably be named
4771         mono_debugger_init_type.
4772
4773 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4774
4775         * threadpool.c: fix non-AIO case.
4776
4777 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4778
4779         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4780         the built-in profiler to measure just JIT compilation times.
4781
4782 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4783
4784         * threadpool.c: the epollfd might be closed by another thread at
4785         any time, so ignore EBADF at treat it as a "we're closing" sign.
4786
4787 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4788
4789         * threadpool.c: release the semaphores with a count equals to the number
4790         of working threads in both IO and regular pools. Fixed typo that messed
4791         up the count of IO pool threads. Don't initialize the pipe handles if
4792         we're using epoll.
4793
4794 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4795
4796         * threadpool.c: some systems don't like a NULL when deleting the socket
4797         from epoll.
4798
4799 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4800
4801         * threadpool.c: fix semaphore allocation.
4802
4803 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4804
4805         * threadpool.c: added epoll() based implementation for asynchronous IO
4806         that is used instead of the default poll() when available.
4807         It can be disabled by setting MONO_DISABLE_AIO.
4808
4809 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4810
4811         * threadpool.c: windows needs 'closesocket' and instead of returning
4812         0 when the stream is closed while in select, it returns -1. Fixes bug
4813         #74573.
4814
4815 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
4816
4817         * class.c (class_compute_field_layout): Fix the regression caused by
4818         the previous try.
4819
4820 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4821
4822         * threadpool.c: separate pool for socket async. IO.
4823         * threadpool.h: mono_max_worker_threads is not a global any more.
4824
4825 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
4826
4827         * class.c (class_compute_field_layout): Fix #74549.
4828
4829 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4830
4831         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4832         use 2 connected sockets instead.
4833
4834 2005-04-08  Miguel de Icaza  <miguel@novell.com>
4835
4836         * mono-config.c: Add new entry point for mkbundle
4837         mono_config_parse_memory. 
4838
4839 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4840
4841         * threadpool.c: removed another unused function.
4842
4843 2005-04-08  Ankit Jain  <radical@corewars.org>
4844
4845         * reflection.c (get_default_param_value_blobs): Add 'types'
4846         parameter to get the types encoded in the constant table.
4847         (mono_param_get_objects): Use the type from the constant table,
4848         not the type of the parameter, when creating default values.
4849         Handle null default values correctly.
4850
4851 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4852
4853         * file-io.c:
4854         * file-io.h:
4855         * threadpool.c:
4856         * threadpool.h:
4857         * icall.c:
4858         * socket-io.c: removed dead code for async IO.
4859
4860 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4861
4862         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4863
4864         * threadpool.c: intercept socket async. calls and pass them to a thread
4865         that is polling and dispatching the job items to the threadpool as
4866         socket become ready. Fixes bugs #71217, #71933.
4867
4868         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4869         between char and short/ushort arrays.
4870
4871         * socket-io.c: remove dead code.
4872
4873 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4874
4875         * locales.c,
4876           icall.c : removed InternalToUpper_Comp() and
4877           InternalToLower_Comp().
4878
4879 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4880
4881         * char-conversions.h : The tables were incorrectly generated. Should
4882           be generated against invariant culture.
4883
4884 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
4885
4886         * object.c (mono_runtime_invoke_array): Fix return value when 
4887         passing pre-created valuetype objects to ctors.
4888
4889         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
4890         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4891         Fixes #74338.
4892
4893 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
4894
4895         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
4896         only used with --security and hides the wrong corlib version error.
4897
4898 2005-03-30  Joshua Tauberer  <tauberer@for.net>
4899
4900         * class.c: Changed mono_class_name_from_token so that types
4901         outside of a namespace don't have an initial period.  Improved
4902         the g_warning message used in _mono_class_get when loading
4903         fails.
4904         * assembly.c: In mono_assembly_load_reference, when an assembly
4905         can't be found, "No such file or directory" is misleading and
4906         unhelpful because a few paths were checked for the presence of
4907         the assembly.  When that happens (ENOENT), display a nicer
4908         message indicating the directories that were searched.  In all
4909         cases, the warning is made easier to read for non-hackers.
4910
4911 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
4912
4913         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4914         project/solution.
4915         * appdomain.h|domain.c: Removed inline from functions.
4916         * appdomain.c: Reduced warnings when compiling on windows.
4917         * icall.c: Fixed output_debug declaration to gunichar2*.
4918         * mono-config.c: Reduced warnings when compiling on windows.
4919         * rand.c: Added missing "windows.h". Added missing return value.
4920         * rawbuffer.c: Added missing winsock2.h for windows.
4921         * sysmath.h: Added mono-compiler.h header to allow/ease 
4922         compilation with non-GCC compilers.
4923         * threads.c: Fixed declarations to compile with VS.NET C compiler.
4924         Removed cast warnings.
4925
4926         Adapted from the work of J Lothian (for VC6).
4927
4928 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
4929
4930         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4931         from default_path.
4932
4933 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
4934
4935         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4936         the 2.0 profile.
4937
4938 2005-03-27  Raja R Harinath  <harinath@gmail.com>
4939
4940         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
4941         has to be in $(exec_prefix).  $(prefix) is for arch-independent
4942         stuff, and it would probably use $(prefix)/share rather than
4943         $(prefix)/lib.
4944
4945 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4946
4947         * console-io.c: added 2 includes that might be missing.
4948
4949 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
4950
4951         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4952         profile.
4953
4954         * reflection.c (create_custom_attr): Allocate the params array using
4955         alloca so it gets GC tracking.
4956
4957 2005-03-23  Chris Toshok  <toshok@ximian.com>
4958
4959         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4960         out some spew.
4961
4962 2005-03-24  Raja R Harinath  <rharinath@novell.com>
4963
4964         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4965         changes to pick up any changes in prefix, etc.
4966
4967 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4968
4969         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4970         
4971         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4972         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4973
4974 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4975
4976         * class-internals.h object-internals.h class.c reflection.c: Extend the
4977         mono_lookup_dynamic_token () function to return the class of the
4978         token as well. 
4979
4980         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4981         well. Fixes #73848.
4982
4983 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
4984
4985         * security-manager.c: Skip inheritance checks for intra-corlib
4986         class inheritance and method overrides. This skips a lot of checks
4987         and (anyway) permissions cannot work until corlib is loaded.
4988
4989 2005-03-23  Martin Baulig  <martin@ximian.com>
4990
4991         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4992         MONO_TYPE_GENERICINST.  
4993
4994 2005-03-23  Martin Baulig  <martin@ximian.com>
4995
4996         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4997
4998 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4999
5000         * class.c: added locking comments to some functions.
5001         Cache the interface offsets arrays (saves about 20 KB
5002         of runtime memory in a typical app).
5003         Reduce the time overhead in mono_class_setup_supertypes ().
5004
5005 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5006
5007         * icall.c: speedup and fix leaks in GetMethodsByName and
5008         GetPropertiesByName.
5009
5010 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5011
5012         * reflection.c: some locking fixes.
5013
5014 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5015
5016         * metadata.c: added missing break in case statement.
5017
5018 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
5019
5020         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5021         typedbyref return values. Fixes #73941.
5022
5023 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5024
5025         * security-manager.c|h: Added demandunmanaged method and 
5026         suppressunmanagedcodesecurity class to MonoSecurityManager.
5027         Renamed aptc class to allowpartiallytrustedcallers.
5028
5029 2005-03-17  Martin Baulig  <martin@ximian.com>
5030
5031         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5032
5033 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5034
5035         * file-io.c: disabled file async. IO using aio_*. It uses the
5036         threadpool now. Workaround for bug #73718.
5037
5038 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5039
5040         * assembly.h, mono-config.c: added code to deal with bundled configs
5041         for bundled assemblies.
5042
5043 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5044
5045         * *.c, private.h: cleanup, removing old private.h header file.
5046
5047 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5048
5049         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5050         and throw_on_unmappable_char attributes.
5051
5052 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
5053
5054         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5055         _ProcessName_internal.
5056
5057 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
5058
5059         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5060         #73631.
5061
5062         * icall.c threads.c threads-types.h: Remove slothash icalls as they
5063         are no longer used.
5064
5065 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
5066
5067         * object.c (compute_class_bitmap): Add support for generics. Fixes
5068         #73527.
5069
5070 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5071
5072         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5073
5074 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5075
5076         * filewatcher.c: commented out the code for windows watcher, as we don't
5077         use it (we use the managed implementation instead).
5078
5079 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5080
5081         * object-internals.h (MonoThread): Remove 'unused1' field.
5082
5083         * appdomain.c: Bump corlib version.
5084
5085         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5086
5087         * reflection.c (mono_reflection_create_runtime_class): Remove the
5088         AssemblyBuilder.Save optimization since it causes too many problems.
5089
5090 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
5091
5092         * exception.c|h: Added mono_get_exception_reflection_type_load to
5093         create a ReflectionTypeLoadException object.
5094         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5095         to return NULL is a InheritanceDemand fails during reflection. Updated
5096         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
5097         ReflectionTypeLoadException if an InheritanceDemand fails during 
5098         reflection. Added icall mapping for GetLinkDemandSecurity.
5099         * security-manager.c|h: Added ves_icall_System_Security_
5100         SecurityManager_GetLinkDemandSecurity internal call to return the
5101         class and methods permissions set for a LinkDemand. Removed unused
5102         fields in MonoSecurityManager.
5103
5104 2005-03-10  Martin Baulig  <martin@ximian.com>
5105
5106         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5107         it's a generic instance.
5108
5109 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
5110
5111         * reflection.c (mono_get_object_from_blob): Applied patch from
5112         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5113
5114         * class.c (mono_class_is_assignable_from): Another try at fixing 
5115         #73469 without breaking anything.
5116
5117 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
5118
5119         * class.c: (mono_class_is_assignable_from): Revert the last changes
5120         since they don't work with generics.
5121         
5122         * class.c (mono_class_is_assignable_from): Fix build bustage.
5123
5124         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5125         the managed IsAssignableFrom method. Fixes #73469.
5126
5127         * reflection.c (mono_reflection_call_is_assignable_from): New helper
5128         function.
5129
5130 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
5131
5132         * object.c (mono_load_remote_field_new): Fix returning uninitialized
5133         memory when the remoting callback does not sets the out arguments.
5134         Fixes #73007.
5135
5136         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5137         by mistake.
5138
5139         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5140
5141         * object-internals.h (MonoStackFrame): Sync with managed object layout.
5142
5143         * appdomain.c: Bump corlib version.
5144
5145 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
5146
5147         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5148         function.
5149
5150         * threads.c (mono_thread_attach): Detect threads which are not started
5151         by the GC pthread wrappers.
5152
5153 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
5154
5155         * icall.c: Added new icall for RNG.
5156         * rand.c|h: Added new icall to open the RNG. This allows to share a 
5157         single handle on Linux to access /dev/urandom and fix #73183.
5158
5159 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5160
5161         * object.c: setting the new vtable in a transparent proxy object must
5162         not change the GC descriptor.
5163
5164 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5165
5166         * object.c: fixed compilation without GCJ support.
5167         * reflection.c: for runtime-created types ensure klass->has_references
5168         is correct (bug #73215).
5169
5170 2005-03-02  Martin Baulig  <martin@ximian.com>
5171
5172         * class.c (mono_class_is_assignable_from): Make this work if
5173         `oklass' is a generic instance; fixes #72831.
5174
5175 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5176
5177         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5178         with hasthis set.
5179         
5180         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5181
5182         * marshal.c: Reorganize native->managed marshalling code to also use
5183         the emit_marshal_... functions.
5184
5185 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5186
5187         * object.c: typed allocs have issues with bitmap sizes > 30,
5188         so check for max_set >= 30.
5189
5190 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5191
5192         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5193         managed code. Fixes #73012.
5194
5195         * metadata.h (MonoMarshalSpec): Add elem_mult field.
5196
5197         * metadata.c reflection.c: Load/Emit elem_mult as well.
5198         
5199         * metadata.h (MonoMarshalSpec): Add comment.
5200
5201         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5202
5203         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5204         num_elem to -1 if not given.
5205
5206         * object-internals.h (MonoReflectionMarshal): Add has_size field.
5207
5208         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5209         given values.
5210
5211 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
5212
5213         * null-gc.c (mono_gc_free_fixed): Was not compilable.
5214
5215 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
5216
5217         * reflection.c (encode_marshal_blob): Encode param_num field as well.
5218
5219         * object-internals.h (MonoReflectionMarshal): Add param_num field.
5220
5221 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5222
5223         * object.c: generalized the reference bitmap creation
5224         and added hooks for the new GC.
5225         * class-internals.c: removed the gc_bitmap field from MonoClass.
5226
5227 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5228
5229         * domain.c: help the compiler to produce better code
5230         in mono_jit_info_table_find ().
5231
5232 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5233
5234         * object.c: make all allocations look typed.
5235
5236 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5237
5238         * socket-io.c: load Mono.Posix if it's not loaded already
5239         (fixes bug#73033).
5240
5241 2005-02-24  Martin Baulig  <martin@ximian.com>
5242
5243         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5244         * reflection.c (dup_type): Likewise.
5245
5246 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
5247
5248         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5249         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5250
5251 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5252
5253         * domain.c, threads.c, object-internals.h: make the critical thread
5254         local vars use the fast access mode (even when we're compiled in
5255         a lib). Provide accessors to be used by the jit during codegen.
5256
5257 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5258
5259         * appdomain.c: Changed hook functios behavior to include
5260         support for the reflection only assemblies. Some icalls were changed
5261         to support the mentioned assemblies too. Signatures of static methods
5262         try_assembly_resolve and real_load now have an additional parameter:
5263         refonly.
5264
5265         * assembly.c: General changes to mono_assembly_ methods to support
5266         reflection only api. Functions mono_assembly_open, mono_assembly_load,
5267         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5268         suffix, to support an additional gbool parameter to specify whether
5269         the assembli is reflection only or not. Created some new hook functions 
5270         to add support for reflection only assemblies. Signatures of static 
5271         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
5272         have now an additional parameter: refonly.
5273
5274         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5275         indicating whether the assembly is reflection only or not.
5276
5277         * exception.c: Add mono_get_exception_invalid_operation.
5278
5279         * icall.c: Throw an InvalidOperationException when trying to invoke
5280         a property/method/event, or trying to set/get the value of a field.
5281         Also add an icall to retrieve the ref_only flag to the
5282         MonoReflectionAssembly.
5283
5284 2005-02-23  Chris Toshok  <toshok@ximian.com>
5285
5286         Part of fix for #72827.
5287         * mono-debug.c (mono_debug_add_method): add lexical block data to
5288         the info we write.  Kind of a hack at the moment - we copy the
5289         lexical block info from the MonoDebugMethodInfo to the
5290         MonoDebugMethodJitInfo here, before writing it.
5291         (mono_debug_read_method): read the lexical block info.
5292
5293         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5294
5295         * debug-mono-symfile.h: add lexical block support.
5296
5297         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5298         support.
5299
5300 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5301
5302         * loader.c (mono_lookup_pinvoke_call): Fix warning.
5303
5304         * object.c (mono_runtime_free_method): Call mono_free_method () and
5305         put the TODOs there.
5306
5307         * loader.c (mono_free_method): Free up most memory allocated for 
5308         dynamic methods.
5309
5310 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5311
5312         * reflection.c: properly flag a Type argument to a
5313         named custom attr value (bug #72248).
5314
5315 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5316
5317         * reflection.c: reduce code duplication in named custom
5318         attribute encoding.
5319
5320 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5321
5322         * reflection.c: properly encode custom attrs of type object
5323         (bug #72649).
5324
5325 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5326
5327         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5328
5329 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5330
5331         * socket-io.c: load System.dll if it's not loaded already
5332         (bug #72850 and #70477).
5333
5334 2005-02-21  Martin Baulig  <martin@ximian.com>
5335
5336         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5337         generic instances.
5338
5339 2005-02-21  Martin Baulig  <martin@ximian.com>
5340
5341         * reflection.c (mono_image_build_metadata): We also need to
5342         "fixup" the MethodImpl table after we computed the final method
5343         indices.  Call fixup_methodimpl() to do that.
5344         (fixup_methodimpl): New private method.
5345
5346 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5347
5348         * assembly.c: special case mscorlib.dll (bug#72536),
5349         patch from Carlos Alberto Cortez.
5350
5351 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
5352
5353         * threads-types.h threads.c: Fix build bustage.
5354
5355         * threads.c: Use a union for long<->double conversions.
5356
5357         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5358         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5359
5360         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
5361         containing the checkpoint call with NOT_TAKEN.
5362         
5363         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
5364         checkpoint before pushing the arguments, so they won't have to be
5365         spilled to stack.
5366
5367 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5368
5369         * domain.c, assembly.c, domain-internals.h: make some data
5370         const and relocation-free.
5371
5372 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5373
5374         * object.c, appdomain.c, class-internals.h: introduce the
5375         MonoClassRuntimeInfo structure to hold the info needed to
5376         use a class at runtime. Made mono_class_vtable() lock-free
5377         for all the appdomains.
5378
5379 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5380
5381         * metadata-internals.h, image.c: introduce a per-image mempool to
5382         be used for memory that has the same lifetime as the image.
5383
5384 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
5385
5386         * domain.c: In mono_init_internal(), instead of selecting the first
5387         runtime version supported by an executable, get a list of all
5388         supported versions and select the one for which an mscorlib exists
5389         (since even if the runtime supports a given version, it doesn't mean
5390         that the framework for that version is installed).
5391         Modified get_runtimes_from_exe to support this behavior.
5392         In supported_runtimes, added information about additional system
5393         assembly versions.
5394         
5395         * assembly.c: Added support for more than one system assembly version
5396         per runtime version. Updated the assembly list.
5397         In mono_assembly_remap_version, removed the initial version check,
5398         since we don't know to which version we need to compare until we
5399         get the version set on which the assembly is based.
5400         Moved the code for loading corlib into the new method
5401         mono_assembly_load_corlib(), so it can be used by the initialization
5402         code.
5403         
5404         * domain-internals.h: Updated data structures and added declaration
5405         for mono_assembly_load_corlib.
5406
5407 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5408
5409         * reflection.c (resolve_object): Fix the creation of the signature in 
5410         the SignatureHelper case.
5411
5412         * assembly.c (mono_assembly_remap_version): Fix binary search.
5413         
5414 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
5415  
5416         * class.c: Added inheritance check when a method is overloaded (from a
5417         virtual method or when implementing an interface) and when a class is
5418         inherited. Added functions to set a failure for a class and to 
5419         retreive the exception from a failure.
5420         * class-internals.h: Added fields to MonoClass to keep the exception
5421         information status for inheritance (or other exceptions) to be thrown
5422         later (i.e. not at load time).
5423         * object.c: Throw the inheritance SecurityException when a type is to 
5424         be created with either class or method inheritance violations.
5425         * reflection.c|h: Fix when getting declsec from a class. Removed 
5426         unrequired code for class. Improved sanity in parameter naming.
5427         * security-manager.c|h: Added functions to check for class and method
5428         inheritance.
5429
5430 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5431
5432         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5433         and has_finalize in dynamic types as well.
5434
5435 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
5436
5437         * culture-info-table.h : fixed currency format for en-GB (and so on).
5438
5439 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5440
5441         * gc.c: ensure the GC handles never have 0 as a value.
5442
5443 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5444
5445         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5446         a pointer to a struct to unmanaged code. Fixes #72625.
5447
5448 2005-02-16  Martin Baulig  <martin@ximian.com>
5449
5450         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5451
5452 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5453
5454         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5455
5456 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5457
5458         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5459
5460         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
5461         UnmanagedFunctionPointerAttribute, use it for determining calling convention
5462         etc. Fixes #71471.
5463
5464         * reflection.c (mono_custom_attrs_get_attr): New helper function.
5465
5466         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5467
5468 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5469
5470         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5471         changes to make the current context a field in MonoThread.
5472
5473 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5474
5475         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5476         the last change.
5477         
5478         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5479         extracted from mono_marshal_get_native_wrapper.
5480
5481         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5482         to create wrappers around native functions.
5483
5484         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
5485         delegates for arbitrary function pointers. Fixes #71472.
5486
5487 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5488
5489         * threads.c: cleaned up the code a little.
5490
5491 2005-02-15  Martin Baulig  <martin@ximian.com>
5492
5493         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5494         the data table.
5495
5496         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5497         allocate larger chunks if needed.
5498
5499 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5500
5501         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5502         in by mistake.
5503
5504 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5505
5506         * domain.c: keep the domains in an array and ensure the domain ids
5507         are kept small, so they can be used as indexes to domain-specific data
5508         with a small memory overhead.
5509
5510 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5511
5512         * icall.c: Handle byref types in Type icalls. Fixes #72544.
5513
5514 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5515
5516         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5517
5518 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
5519
5520         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5521
5522         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5523         values.
5524
5525         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5526         
5527 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
5528
5529         * domain-internals.h: add the hashtable here.
5530
5531         * class-internals.h: Remove `info' from MonoMethod
5532
5533         * domain.c: Add a new hashtable, jit_trampoline_hash
5534
5535 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5536
5537         * object.c: don't set the value of static fields
5538         (fixes bug#72494).
5539
5540 2005-02-11  Martin Baulig  <martin@ximian.com>
5541
5542         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5543         (mono_debug_add_method): Silently ignore the method if it's too big.
5544         (mono_debug_add_type): Likewise.
5545
5546 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5547
5548         * threads.c, appdomain.c: remove #ifdefs from the code.
5549
5550 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
5551
5552         * metadata-internals.h: Added flags to MonoAssembly to cache the most
5553         common security informations. This allows us to stay in unmanaged code
5554         when doing LinkDemand and it's special cases (except for the first 
5555         time for initialization). The flags a very much used with --security.
5556         * reflection.c|h: Added code to get declarative security attributes 
5557         for LinkDemand and InheritanceDemand. This required to refactor the
5558         existing code for Demand.
5559         * security-manager.c|h: Added new method fields for the special cases
5560         of LinkDemand.
5561
5562 2005-02-10  Martin Baulig  <martin@ximian.com>
5563
5564         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5565         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5566
5567 2005-02-10  Martin Baulig  <martin@ximian.com>
5568
5569         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5570         debugging code; this is almost a complete rewrite.
5571
5572         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5573
5574 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5575
5576         * domain.c, object.h: expose mono_string_equal () and 
5577         mono_string_hash ().
5578         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5579         it's implemented in managed code.
5580
5581 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5582
5583         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5584         lo leak objects between appdomains.
5585
5586 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5587
5588         * assembly.c: old compilers compilation fix from 
5589         robertj@gmx.net (Robert Jordan).
5590
5591 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
5592
5593         * class-internals.h: Little reminder for the future.
5594
5595         * debug-helpers.c: Fix up wrapper_type_names
5596
5597 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5598
5599         * image.c, metadata-internals.h: when loading an image from a file,
5600         mmap all of it and use the same codepaths as when using a
5601         in-memory image: the code is simpler and we use less memory
5602         (both writable and readonly).
5603
5604 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5605
5606         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5607         API to alloc runtime data structures that need to be tracked by the
5608         GC and contain pointers.
5609         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5610         make the code more readable and eventually use a different GC.
5611
5612 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
5613
5614         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5615         for out arguments.
5616         
5617 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
5618
5619         * object.c: In release_type_locks(), don't release the cctor lock
5620         if it has already been released. This fixes a crash in the
5621         thread5 test.
5622
5623 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5624
5625         * gc.c, marshal.c, icall.c: register a delegate for finalization
5626         only when the native function pointer has been allocated for it.
5627
5628 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5629
5630         * object.c: cleaned up some code, allocate objects that are
5631         pointer free with the atomic malloc variant. Allocate memory
5632         for static data from the mempool if it's pointer-free.
5633         Allocate the bounds array at the end of the array data, when needed.
5634         * object-internals.h, object.h: move a private function in a private
5635         header.
5636         * class.c: handle missing case in tracking references in fields.
5637
5638 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5639
5640         * class.c, class-internals.h: keep track if a type has
5641         reference fields in either the instance or static fields.
5642
5643 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
5644
5645         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5646         and renamed to MonoRuntimeInfo. Added fields to store the expected
5647         framework assembly version. Changed mono_get_framework_version and
5648         mono_get_runtime_version for a single mono_get_runtime_info method.
5649         
5650         * assembly.c: Added method to remap system assembly versions to the
5651         current executing runtime version. Removed old mapping code.
5652         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5653         
5654         * icall.c, reflection.c: Track api changes.
5655
5656 2005-02-06  Miguel de Icaza  <miguel@novell.com>
5657
5658         * loader.c (method_from_memberref): Improve error reporting,
5659         produce the class name instead of the typeref/typedef index. 
5660
5661 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
5662
5663         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5664
5665 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5666
5667         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5668         stdcall and charset name mangling.  Reorganize the code and add
5669         some tracing stuff.
5670
5671 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5672
5673         * monodiet.c: More iters!
5674
5675         * marshal.c: Iter usage.
5676
5677         * icall.c: Iter usage.
5678
5679         * object.c: Use iters.
5680
5681         * debug-helpers.c: More iters
5682
5683 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5684
5685         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5686         under win32.
5687
5688 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5689
5690         * mono-debug-debugger.c: use iters
5691
5692         * class.c, class-internals.h: mono_class_setup_events is static
5693         now
5694
5695         * All callers: use iters
5696
5697 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5698
5699         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5700         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5701
5702 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5703
5704         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5705
5706         * marshal.h: Add prototypes for ldfld/stfld_remote.
5707
5708         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5709         this is called during startup.
5710         
5711 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5712
5713         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5714         MonoThreadsSync struct private in monitor.c. Changed the way
5715         MonoThreadsSync is allocated so it's faster and there is no
5716         need to keep track of it with a finalizer and it uses less memory.
5717         This also finally allows us to allocate mono objects as ptrfree when
5718         there are no reference fields.
5719
5720 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5721
5722         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5723         disappearing link to the GC interface and use them to simplify
5724         the gchandles code.
5725
5726 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5727
5728         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5729         stfld_remote which call mono_load/store_field_new. This allows methods
5730         calling ldfld/stfld wrappers to be AOTed.
5731
5732         * console-io.c: Include sys/filio.h under solaris.
5733         
5734         * console-io.c: Include curses.h if needed correctly.
5735
5736 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5737         
5738         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5739         method->klass as well.
5740
5741         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5742
5743         * class.c (mono_class_init): Switch on lazy initialization of 
5744         methods.
5745
5746         * class.c (mono_class_get_finalizer): Handle the case when the 
5747         finalizer is inherited.
5748
5749 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5750
5751         * console-io.c: <curses.h> is needed by term.h on solaris.
5752
5753 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
5754
5755         * icall.c, class-internals.h, monodiet.c, class.c: Remove
5756         mono_class_setup_properties where possible. Remove this ftn from
5757         the header file, and make it static.
5758
5759 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5760
5761         * loader.c: Add missing setup_... call.
5762
5763         * class.c: Add missing setup_... calls.
5764
5765         * class.c (mono_class_init): Switch on lazy initialization of 
5766         the generic vtable.
5767         
5768         * class.c (mono_class_init): Fix generics broken by the recent changes.
5769
5770         * monodiet.c (handle_type): Add missing setup_... calls.
5771
5772         * class.c: Back out garbage in previous patch.
5773         
5774         * class.c: Add missing setup_... calls.
5775
5776         * class.c (mono_class_get_method_from_name_flags): Avoid calling
5777         mono_class_setup_methods () if possible.
5778
5779         * class-internals.h (MonoClass): Add 'has_cctor' flag.
5780
5781         * class-internals.h (MonoCachedClassInfo): New structure.
5782
5783         * class.c: Initialize properties and events fields of MonoClass lazily.
5784
5785         * class.c: Add infrastructure for lazily initializing the methods and
5786         vtable fields of MonoClass. Not yet used.
5787
5788         * class.c (mono_class_get_finalizer): New helper function.
5789
5790         * class.c: Add infrastructure for loading some class related data from
5791         an AOT file.
5792
5793         * object.c: Add infrastructure for initializing the vtable from data
5794         in the AOT file.
5795
5796         * gc.c (run_finalize): Use mono_class_get_finalizer ().
5797
5798         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5799         appropriate initialization function before accessing parts of the
5800         MonoClass structure.
5801
5802         * marshal.c: Fix warnings.
5803         
5804         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5805
5806         * mono-debug-debugger.c (get_exception_message): Use 
5807         mono_class_get_method_from_name_flags ().
5808
5809 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
5810
5811         * reflection.c, appdomain.c: Replace a few manual searches that
5812         Zoltan missed. (Paolo approved this part of my initial patch).
5813
5814 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5815
5816         * profiler.c: disable recording statistical events at report time.
5817
5818 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5819
5820         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5821         to byteswap arrays of enum values, too (bug #72080).
5822
5823 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
5824
5825         * appdomain.c (set_domain_search_path): Allow this to be called if
5826         domain->setup is not yet set.
5827
5828         * loader.c (mono_method_get_index): New helper function.
5829
5830         * loader.c reflection.c: Use mono_method_get_index ().
5831
5832         * class.c (mono_class_get_method_from_name_flags): New helper method.
5833
5834         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5835         this.
5836
5837         * class.c (mono_class_get_cctor): New helper method.
5838
5839         * string-icalls.c object.c class.c marshal.c reflection.c: Use
5840         mono_class_get_method () to look up methods.
5841
5842 2005-02-01  Miguel de Icaza  <miguel@novell.com>
5843
5844         * console-io.c: Fix the build, this should work on Windows.
5845
5846 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
5847
5848         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5849         be set to null to keep things valid
5850
5851 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5852
5853         * icall.c: added Console 2.0 icalls.
5854         * Makefile.am: added console-io.[ch]
5855         * console-io.[ch]: internal calls for Console 2.0 API.
5856
5857 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5858
5859         * class.c: make sure we consider all the interfaces
5860         when calculating max_interface_id (bug found by
5861         Jeroen Frijters running ikvm).
5862
5863 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
5864
5865         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5866         valuetype fields to null.
5867
5868         * object.c (set_value): Ditto. Fixes #71669.    
5869
5870 2005-01-31  Martin Baulig  <martin@ximian.com>
5871
5872         * metadata.c (mono_metadata_has_generic_params): New public
5873         function; checks whether something is a generic method.
5874
5875 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5876
5877         * appdomain.c: fix infinite recursion when adding assemblies.
5878
5879 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
5880
5881         * object.c: Fix small typo to return all items for Environment.
5882         GetCommandLineArgs.
5883
5884 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5885
5886         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5887         reflection.c: more domain and assembly-unload related fixes
5888         and memory leaks plugs.
5889
5890 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
5891
5892         * 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.
5893
5894 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
5895
5896         * loader.c (mono_method_signature): Make this method lazy
5897         (mono_get_method_from_token): Don't computate the signature here.
5898
5899         Doing this saves quite a bit of memory. I got 90 kb on starting up
5900         monodoc. It should also save some disk reads on startup.
5901
5902         * *: MonoMethod->signature might be NULL now. You *MUST* use
5903         mono_method_signature.
5904
5905 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
5906
5907         * object.c (mono_runtime_get_main_args): Return an array from the
5908         current domain here. Fixes #71938.
5909
5910 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5911
5912         * monitor.c: formatting changes to comply with the
5913         mono coding style and remove #ifdefs from the code.
5914
5915 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5916
5917         * metadata.c, private.h: remove some unneeded data
5918         and use a more compact representation for table schemas.
5919
5920 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5921
5922         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5923         to get a better distribution in hash tables.
5924         * *.c: use mono_aligned_addr_hash() where appropriate.
5925         * assembly.c: make var static.
5926
5927 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
5928
5929         * domain-internals.h: Put MonoJitInfo on a diet.
5930
5931         * domain.c: Fix a warning.
5932
5933 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5934
5935         * gc.c: rework the gc handles code to reuse handles
5936         when freed.
5937
5938 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5939
5940         * domain.c: fixed long standing bug in mono_string_equal() which
5941         was brought to light with the ldstr changes.
5942
5943 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
5944
5945         * reflection.c: Remove warning by adding missing include for marshal.h
5946
5947 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5948
5949         * domain.c, object.c: change the ldstr_table to hold
5950         MonoString* as keys: makes the runtime isinterned lookup
5951         faster and simplifies memory management.
5952
5953 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
5954  
5955         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5956         possible to add imperative security checks before calling the icall.
5957         * reflection.c: Return security attributes on the original MonoMethod
5958         (and not the wrapped one). This fix permissions on icalls.
5959
5960 2005-01-25  Dick Porter  <dick@ximian.com>
5961
5962         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5963         the check for mktime() support actually test the mktime() return
5964         value.  "Fixes" bug 71682, though the output is still different to
5965         MS.
5966
5967 2005-01-25  Martin Baulig  <martin@ximian.com>
5968
5969         * class.c (mono_class_is_assignable_from): Make this work for
5970         generic instances.
5971
5972 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
5973
5974         * marshal.c (mono_string_utf8_to_builder)
5975         (mono_string_builder_to_utf16): We might not have ownership of the
5976         string. In thise case, we need to create a new buffer.
5977
5978         * object-internals.h (mono_stringbuilder_capacity): sb->str might
5979         be null, in which case, use the default capacity.
5980
5981 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5982
5983         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5984         GC events to the profiler.
5985
5986 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5987
5988         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5989         if you don't want the GC to run.
5990
5991 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5992
5993         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5994         start providing a GC API and keeping different implementations in
5995         their own file.
5996         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5997
5998 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
5999
6000         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6001         mmap rather than allocating a huge buffer.
6002         (mono_debug_close_mono_symbol_file): Free the buffer allocated
6003         above.
6004
6005 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
6006
6007         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6008         and CheckExecutionRights.
6009         * reflection.c|h: Keep the index of the declarative security to be 
6010         used, instead of the pointer, when AOT compiler is used. Also add 
6011         class initialization when requesting demands.
6012         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6013         CheckExecutionRights. Both properties are now FALSE by default, and
6014         unmodifiable, unless the --security option is used.
6015
6016 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6017
6018         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
6019         reflection.c: properly refcount images and assemblies, many leaks fixed.
6020
6021 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6022
6023         * threadpool.c: increase the timeout for threads in the thread pool to
6024         10s.  Fixes bug #67159.
6025
6026 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
6027
6028         * class-internals.h: Sun's compiler insists on explicit
6029         signed on bit fields to handle then correctly.
6030
6031 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
6032
6033         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6034         Make the size of the array fit only the number of invalid path
6035         chars that we have.
6036
6037         * class.c (_mono_class_get): Improve the error reporting when a
6038         class referenced is not found, to assist debugging. 
6039
6040 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6041
6042         * threads.c: fix off-by-one error.
6043         * domain.c: free data allocated in the domain.
6044
6045 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6046
6047         * reflection.c (mono_method_body_get_object): Fill out exception info
6048         as well.
6049
6050         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
6051         structure.
6052         
6053 2005-01-19  Martin Baulig  <martin@ximian.com>
6054
6055         * loader.c (mono_get_method_constrained): Make this work again.
6056
6057 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6058
6059         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
6060         guint16 to match the managed side.
6061
6062         * reflection.c (mono_reflection_body_get_object): Fill out local
6063         variables array.
6064
6065         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6066         as well.
6067
6068         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6069         'local_var_sig_token'.
6070
6071 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
6072
6073         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
6074         System.Drawing.
6075
6076         * reflection.c (mono_method_body_get_object): Handle abstract and
6077         runtime methods.
6078
6079 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6080
6081         * marshal.c, loader.c, class-internals.h, reflection.c:
6082         store the emthod data for a wrapper in an array instead of a list.
6083
6084 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6085
6086         * marshal.c: change the code to allocate memory more
6087         conservatively for method wrappers.
6088
6089 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6090
6091         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6092         fields from MonoClass to the marshal info structure where they belong.
6093
6094 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6095
6096         * class.c, object.c, class-internals.h, marshal.c: rearrange
6097         some fields and tweak some types to lower memory usage.
6098
6099 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
6100
6101         * threads.c (signal_thread_state_change): Handle the case when the
6102         target thread is the current thread.
6103
6104         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6105
6106         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
6107         emit_ptr_to_object_conv. 
6108
6109         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6110         marshalling. Fixes #71352.
6111
6112 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6113
6114         * metadata.h, blob.h: move table enum to blob.h so it can be included
6115         in any header.
6116         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6117         cut the size of MonoImage/MonoDynamicImage.
6118
6119 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
6120
6121         * profiler.c (mono_profiler_install_simple): Fix default arguments.
6122
6123 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6124
6125         * reflection.c, reflection.h, icall.c: add a function to check
6126         if an attribute type is defined for a metadata object.
6127
6128 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
6129
6130         * object-internals.h: Added some needed fields from StringBuilder class.
6131         * marshal.c: Set the maxCapacity when creating a StringBuilder.
6132
6133 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
6134
6135         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6136         threads before shutting down the runtime.
6137
6138         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6139
6140 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6141
6142         * object-internal.h, threads.c: implement stacksize and 
6143         parameterized thread start functionality (requires
6144         matching corlib). Marked broken code for later removal.
6145
6146 2005-01-12  Martin Baulig  <martin@ximian.com>
6147
6148         * class-internals.h (MonoGenericClass): Moved the `initialized'
6149         flag to MonoDynamicGenericClass, removed `init_pending'.
6150         (MonoGenericInst): Added `is_reference' flag.
6151
6152 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
6153
6154         * reflection.c (mono_image_create_pefile): Only set the pe_offset
6155         inside the MSDOS header. Fixes #71201.
6156
6157         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6158         gc thread.
6159         (mono_domain_finalize): Ditto.
6160
6161 2005-01-12  Martin Baulig  <martin@ximian.com>
6162
6163         * class.c (mono_get_shared_generic_class): Use the cache for
6164         non-dynamic generic classes.
6165
6166         * class-internals.h (mono_class_create_generic_2): Removed
6167         function prototype, this function is now static inside class.c.
6168
6169         * class.c (mono_class_create_generic_2): Made this static, only
6170         call it from mono_class_init() and mono_class_setup_parent().
6171         (collect_implemented_interfaces_aux): Call mono_class_init() on
6172         the interfaces we collect.
6173         (mono_class_setup_vtable): Call mono_class_init (class->parent).
6174
6175 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6176
6177         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6178         it a real thread handle.
6179
6180         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
6181         MonoJitExceptionInfo, since each catch clause needs its own variable.
6182         
6183 2005-01-11  Dick Porter  <dick@ximian.com>
6184
6185         * image.c (mono_pe_file_open): New variant on mono_image_open()
6186         that does not set up the CLI metadata; used for FileVersionInfo so
6187         it can get the data for windows binaries too.
6188         
6189         * process.c (process_read_string_block): Don't read off the end of
6190         the StringTable block.
6191
6192         These both fix bug 70766.
6193
6194 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6195
6196         * gc.c: set some fields to NULL at GC cleanup time.
6197         * threads.c: if we quit the main thread, call exit ().
6198
6199 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6200
6201         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6202
6203 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6204
6205         * threads.h, threads.c, object.c: added accessor and settor for
6206         main_thread. Handle it specially when exiting from it: wait
6207         for other foreground threads to exit.
6208
6209 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6210
6211         * process.c, verify.c: remove some bloat.
6212
6213 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
6214
6215         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6216         the calling convention to cdecl under win32.
6217
6218 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
6219
6220         * object.c (mono_object_get_size): New function to get the size of
6221         an object instance.
6222
6223         * profiler.c (simple_allocation): Use above.
6224
6225 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
6226
6227         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6228         ves_icall_System_AppDomain_getRootDomain (as it's not required to
6229         get an appdomain by it's id and we can't assume the root's id is 0).
6230         * domain-internals.h: Change the function prototype to match.
6231         * icall.c: Change the icall table for AppDomain.
6232
6233 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
6234
6235         * locales.c (string_invariant_compare_char): Only compute
6236         GUnicodeTypes in the case where we need them.  Test for ordinality
6237         first and return if so.
6238
6239         From the commit:
6240
6241                 /*
6242                  * FIXME: here we must use the information from c1type and c2type
6243                  * to find out the proper collation, even on the InvariantCulture, the
6244                  * sorting is not done by computing the unicode values, but their
6245                  * actual sort order.
6246                  */
6247
6248 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6249
6250         * loader.c: for P/Invoke methods, allow the "Internal" shared
6251         library name to refer to the calling process symbol namespace.
6252
6253 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
6254
6255         * Makefile.am: Add the security manager to the build.
6256         * security-manager.c|h: New. Initialization of the security manager.
6257
6258 2005-01-07  Dick Porter  <dick@ximian.com>
6259
6260         * threads.c: 
6261         * monitor.c: Update thread state during Monitor and WaitHandle
6262         waits.  Fixes bug 71031.
6263
6264 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
6265
6266         * reflection.c (property_encode_signature): Correctly handle when the
6267         property has no methods.
6268
6269 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
6270
6271         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6272         
6273         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6274         fields from mb, not rmb. Fixes #71017.
6275
6276         * marshal.c (emit_ptr_to_str_conv): Add support for 
6277         ByValTStr -> string conversion. Fixes #71015.
6278
6279         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6280
6281         * mempool.c (mono_mempool_contains_addr): New helper function.
6282
6283 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6284
6285         * metadata.c (mono_metadata_compute_size): Fix size calculation of
6286         HasSematics encoded fields.
6287         
6288         * metadata.c (mono_type_to_unmanaged): Improve error message for 
6289         invalid string marshalling.
6290
6291         * metadata.c: Fix warnings.
6292         
6293 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6294
6295         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6296         profiler support.
6297
6298 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6299
6300         * domain.c object.c domain-internals.h: Revert part of r38077 since the
6301         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6302         tests.
6303
6304 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
6305
6306         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6307         so methods containing these can be AOTed.
6308
6309 2005-01-03  Martin Baulig  <martin@ximian.com>
6310
6311         * loader.c (find_method): Removed the hack for generic instances.
6312         (method_from_memberref): If our parent is a generic instance, pass
6313         its generic type definition to find_method() and then inflate the
6314         method.
6315         (mono_get_method_constrained): Pass the generic type definition to
6316         find_method() and inflate the method later.
6317
6318         * class-internals.h (MonoStats): Added `generic_class_count'.
6319
6320         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6321         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6322
6323         * reflection.c (mono_custom_attrs_from_params): Don't ignore
6324         generic type definitions.
6325
6326 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
6327
6328         * loader.c icall.c: Fix warnings.
6329
6330 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
6331
6332         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6333         blittable types. Fixes #70864.
6334
6335 2004-12-29  Martin Baulig  <martin@ximian.com>
6336
6337         * icall.c
6338         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6339
6340         * reflection.c (mono_method_get_object): Create a
6341         "System.Reflection.MonoGenericMethod" for inflated methods; don't
6342         call mono_get_inflated_method().
6343
6344         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6345
6346 2004-12-27  Martin Baulig  <martin@ximian.com>
6347
6348         * class-internals.h (MonoMethod): Added `is_inflated' flag.
6349         (MonoMethodInflated): Added `inflated' field.
6350
6351         * class.c (mono_class_inflate_generic_method): Don't really
6352         inflate the method here; just set the `is_inflated' flag in the
6353         MonoMethod.
6354         (mono_class_get_inflated_method): Actually inflate the method here
6355         if it's not already inflated; we use the MonoMethodInflated's new
6356         `inflated' field as a cache.
6357
6358 2004-12-26  Martin Baulig  <martin@ximian.com>
6359
6360         * class.c
6361         (inflate_generic_class): Moved some code out of inflate_generic_type().
6362         (mono_class_inflate_generic_method): If we're already inflated,
6363         inflate the context and use the declaring method; ie. make sure
6364         the declaring method of an inflated method is always the generic
6365         method definition.
6366         (mono_class_create_from_typedef): Create
6367         `class->generic_container->context->gclass'.
6368
6369 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
6370
6371         * metadata-internals.h, marshal.c, reflection.c: More
6372         MonoGHashTable->GHashTable.
6373
6374         * domain-internals.h, class.c: Change MonoGHashTable's into
6375         GHashTables for some cases where no gc stuff is used
6376
6377         All users: update apis
6378
6379 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
6380
6381         * metadata.c (builtin_types): Make this `const'. Makes this get
6382         put into the shareable section.
6383         (mono_metadata_init): Casts to make gcc happy.
6384
6385 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
6386
6387         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6388
6389 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
6390
6391         * icall.c: Added an internal call to retrieve the position and length
6392         of assembly-level declarative security attributes (RequestMinimum, 
6393         RequestOptional and RequestRefuse). This is used by the Assembly class
6394         to re-create the corresponding permission sets.
6395
6396 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6397
6398         * marshal.c: fix the stelemref wrapper to be type correct
6399         (and faster).
6400
6401 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6402
6403         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6404         to do key & 0x7fffffff. Hashtable already does this. It just
6405         results in longer code.
6406
6407 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
6408
6409         * appdomain.c: Bump corlib version.
6410         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6411         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6412         * reflection.c|h: Add functions to get declarative security infos
6413         (blob position and length) for assemblies, classes and methods.
6414
6415 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6416
6417         * reflection.c: sort the constant table (bug #70693).
6418
6419 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6420
6421         * object-internals.h, threads.c, domain.c: add accessors for
6422         the MonoThread and MonoDomain tls keys.
6423
6424 2004-12-18  Martin Baulig  <martin@ximian.com>
6425
6426         * class.c (inflate_generic_type): If we're inflating a generic
6427         instance, set `ngclass->context->container = context->container';
6428         ie. the container we inflated into.
6429
6430         * metadata.c (mono_metadata_parse_generic_param): Reflect above
6431         inflate_generic_type() changes.
6432
6433 2004-12-17  Martin Baulig  <martin@ximian.com>
6434
6435         * class-internals.h
6436         (MonoGenericClass): Replaced `MonoType *generic_type' with
6437         `MonoClass *generic_class'.  Removed `dynamic_info'; if
6438         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6439         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6440
6441 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
6442
6443         * exception.c (mono_exception_from_token): New helper function.
6444
6445 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
6446
6447         * assembly.c (mono_assembly_load_with_partial_name): Call 
6448         mono_assembly_loaded before invoking the preload hooks. Fixes
6449         #70564.
6450
6451         * object-internals.h (MonoThread): Change culture_info and 
6452         ui_culture_info into an array.
6453
6454         * threads.c: Cache culture info objects from more than one appdomain.
6455
6456         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
6457         current UI culture.
6458
6459 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
6460
6461         * threads.h threads.c appdomain.c: Clear the culture_info field of
6462         all threads during unloading if they point to an object in the dying
6463         appdomain.
6464
6465 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
6466
6467         * culture-info.h (TextInfoEntry): New struct
6468         * object-internals.h: sync with managed
6469         * locales.c: fill the `text_info_data' field
6470         * culture-info-tables.h: update
6471
6472 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6473
6474         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6475         collector.
6476
6477 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
6478
6479         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6480         (ves_icall_ModuleBuilder_getMethodToken): Ditto
6481
6482 2004-12-12  Martin Baulig  <martin@ximian.com>
6483
6484         * mono-debug-debugger.c (write_type): If we're an enum and the
6485         builtin types have already been initialized, call mono_class_init().
6486
6487 2004-12-11  Martin Baulig  <martin@ximian.com>
6488
6489         * metadata.c (mono_metadata_load_generic_params): Added
6490         `MonoGenericContainer *parent_container' argument; automatically
6491         compute `container->is_method'; pass the correct owner to
6492         get_constraints().      
6493
6494         * reflection.c (compare_genericparam): Sort the GenericParam table
6495         according to increasing owners. 
6496
6497 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6498
6499         * profiler.c: allow disabling the default profiler.
6500
6501 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6502
6503         * decimal.c, icall.c: allow disabling System.Decimal support.
6504
6505 2004-12-09  Marek Safar <marek.safar@seznam.cz>
6506
6507         * reflection.c: Add support for null attribute arguments.
6508
6509 2004-12-09  Martin Baulig  <martin@ximian.com>
6510
6511         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6512         names to get rid of compiler warnings.
6513
6514 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6515
6516         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
6517         mono_marshal_load_type_info (). Fixes #69625.
6518         (mono_marshal_get_ptr_to_struct): Likewise.
6519
6520 2004-12-08  Martin Baulig  <martin@ximian.com>
6521
6522         * mono-debug.h: Bumped version number to 47.
6523
6524         * mono-debug-debugger.c
6525         (mono_debugger_event_handler, mono_debugger_event): Take two
6526         guint64 arguments insteed of a gpointer and a guint32.  
6527
6528 2004-12-08  Martin Baulig  <martin@ximian.com>
6529
6530         * debug-mono-symfile.h
6531         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6532         `address' to `native_offset'.
6533
6534 2004-12-08  Martin Baulig  <martin@ximian.com>
6535
6536         * class.c (mono_class_create_from_typespec): Only inflate if we
6537         either have `context->gclass' or `context->gmethod'.
6538
6539 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6540
6541         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6542
6543         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6544
6545         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6546
6547         * reflection.c (mono_assembly_get_object): Remove the workaround put
6548         in for the release.
6549         
6550         * appdomain.c: Use the corlib_internal field from MonoAssembly.
6551
6552         * appdomain.c: Bump corlib version.
6553
6554         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6555         be visible in other appdomains.
6556
6557 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
6558
6559         * threads.c: Interlocked inc and dec for longs were messed up,
6560         use a KISS based impl for this. Fixes 70234
6561
6562 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
6563
6564         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6565
6566 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6567
6568         * icall.c: fix to follow policy not to allow struct
6569         arguments in icalls.
6570
6571 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6572
6573         * process.c: make the patch that handles spaces in file paths work
6574         on mono/windows too.
6575
6576 2004-12-06  Martin Baulig  <martin@ximian.com>
6577
6578         * class.c (mono_class_create_generic): Call
6579         mono_class_setup_supertypes() if we're dynamic.
6580         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6581
6582 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
6583
6584         * object-internals.h: Add new fields to MonoThread.
6585
6586         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6587
6588         * icall.c threads-types.h threads.c: Add new icalls.
6589
6590         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6591
6592         * object-internals.h (MonoReflectionAssembly): Sync object layout with
6593         managed side.
6594
6595         * appdomain.c: Bump corlib version.
6596
6597         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6598         internal assemblies. Fixes #69181.
6599
6600 2004-12-05  Martin Baulig  <martin@ximian.com>
6601
6602         * class.c (mono_class_inflate_generic_signature): Make this a
6603         no-op if `context' is NULL or we don't have any type parameters;
6604         also copy `sentinelpos'.        
6605
6606 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
6607
6608         * image.c: Add unbox_wrapper_cache.
6609
6610         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6611
6612         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6613         function generator.
6614         
6615         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6616         Fixes #70173.
6617
6618         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6619         
6620 2004-12-04  Martin Baulig  <martin@ximian.com>
6621
6622         * loader.c (mono_method_get_signature_full): New public function;
6623         like mono_method_get_signature(), but with an additional
6624         `MonoGenericContext *' argument.
6625
6626         * class.c (mono_class_inflate_generic_signature): Formerly known
6627         as inflate_generic_signature(); make this public.
6628
6629 2004-12-04  Martin Baulig  <martin@ximian.com>
6630
6631         * metadata.c
6632         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6633         instead of a `MonoGenericContainer *'.  
6634         (mono_metadata_parse_array_full): Likewise.
6635         (mono_metadata_parse_signature_full): Likewise.
6636         (mono_metadata_parse_method_signature_full): Likewise.
6637         (mono_metadata_parse_generic_inst): Likewise.
6638         (mono_metadata_parse_generic_param): Likewise.
6639         (mono_metadata_parse_mh_full): Likewise.
6640         (mono_type_create_from_typespec_full): Likewise.
6641
6642 2004-12-03  Martin Baulig  <martin@ximian.com>
6643
6644         * class-internals.h (MonoGenericContainer): Replaced the
6645         `MonoGenericContext * pointer with a `MonoGenericContext'
6646         structure and made it the first element.
6647
6648 2004-12-03  Martin Baulig  <martin@ximian.com>
6649
6650         * class.c
6651         (inflate_generic_type): Set the `context->container' when creating
6652         a new MonoGenericContext.
6653         (mono_class_inflate_generic_method): Likewise.
6654         (mono_class_create_from_typespec): Just use `context->container'
6655         to get the container.
6656
6657         * loader.c (method_from_methodspec): Set `context->parent' from
6658         `context->container' - and if that's a method container, use its
6659         parent.  Also set the `context->container' when creating a new
6660         MonoGenericContext.
6661         (mono_get_method_from_token): Use just `context->container' to get
6662         the container.
6663
6664         * metadata.c (do_mono_metadata_parse_generic_class): Also set
6665         `gclass->context->container'.
6666
6667         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6668         the `context->container' when creating a new MonoGenericContext.
6669
6670 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
6671
6672         * reflection.c (compare_genericparam): Sort params with identical
6673         owner by their number. Fixes gen-111 on sparc.
6674
6675 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6676
6677         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6678         around the domain changes.
6679
6680         * appdomain.c (mono_domain_unload): Handle the case when the thread
6681         calling Unload is itself being aborted during unloading. Fixes #70022.
6682
6683         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6684
6685         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
6686         checkpoint_func as an icall so it gets a wrapper.
6687         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6688         in the cross-appdomain wrappers too.
6689
6690         * threads.c (mono_thread_has_appdomain_ref): Make this public.
6691
6692         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6693
6694         * reflection.c: Fix some memory leaks.
6695         
6696 2004-12-02  Martin Baulig  <martin@ximian.com>
6697
6698         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6699
6700         * metadata.c (generic_class_cache): New static hashtable.
6701         (mono_metadata_lookup_generic_class): New public method.
6702
6703 2004-12-02  Martin Baulig  <martin@ximian.com>
6704
6705         * class.c (mono_class_create_from_typedef): Call
6706         mono_class_setup_parent() and mono_class_create_mono_type() before
6707         parsing the interfaces.
6708
6709 2004-12-02  Martin Baulig  <martin@ximian.com>
6710
6711         * metadata.c (generic_inst_cache): New static hashtable.
6712         (mono_metadata_lookup_generic_inst): New public function.
6713         (mono_metadata_inflate_generic_inst): New public function.
6714         (mono_metadata_parse_generic_inst): New public function.
6715         (do_mono_metadata_parse_generic_class): Use the new
6716         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6717         since this'll also use the cache.
6718
6719         * reflection.c (mono_reflection_bind_generic_method_parameters):
6720         Use mono_metadata_lookup_generic_inst() to use the new cache.
6721
6722         * class.c (inflate_mono_type): Use
6723         mono_metadata_inflate_generic_inst() to inflate a generic
6724         instance; this'll also use the new cache.
6725
6726         * loader.c (method_from_methodspec): Use
6727         mono_metadata_parse_generic_inst() and
6728         mono_metadata_inflate_generic_inst() rather than parsing it
6729         manually, so we can use the new cache.
6730
6731 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6732
6733         * threads.c (wait_for_tids): Do not incorrectly free threads when 
6734         the wait times out.
6735
6736 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6737
6738         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6739         iter->args based on whether parameters are passed in registers (i.e.
6740         MONO_ARCH_REGPARMS is defined)
6741
6742 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
6743
6744         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6745         the exception message. Fixes #70070.
6746         (method_from_methodspec): Fix warnings.
6747
6748 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6749
6750         * process.c: (complete_path) return the path quoted
6751
6752 2004-12-01  Martin Baulig  <martin@ximian.com>
6753
6754         * class-internals.h (MonoGenericInst): New structure.
6755         (MonoGenericClass): Replaced `type_argc', `type_argv' and
6756         `is_open' with `MonoGenericInst *inst'.
6757         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6758         `is_open' with `MonoGenericInst *inst'.
6759
6760 2004-11-30  Martin Baulig  <martin@ximian.com>
6761
6762         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6763
6764         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6765         to `generic_class_cache'.
6766
6767         * metadata.c
6768         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6769         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6770         (mono_generic_inst_is_valuetype): Renamed to
6771         mono_generic_class_is_valuetype().
6772
6773         * class-internals.h
6774         (MonoGenericInst): Renamed to MonoGenericClass.
6775         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6776         (MonoClass): Renamed `generic_inst' to `generic_class'.
6777         (MonoGenericContext): Renamed `ginst' to `gclass'.
6778
6779         * object-internals.h
6780         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6781
6782         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6783         mono_reflection_generic_class_initialize().
6784
6785         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6786         now known as "System.Reflection.MonoGenericClass".
6787         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6788
6789 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
6790
6791         * class-internals.h: Added a flag field to MonoClass to cache the
6792         declarative security attributes actions associated with the class.
6793         * domain-internals.h: Added booleans to MonoJitInfo to cache the
6794         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6795         applicable to the JITted method.
6796         * reflection.c|h: Added functions to extract (as flags) which security
6797         actions are available (declaratively) for a method, class or assembly.
6798         * metadata.c|h: Added functions to search the declarative security
6799         table in the metadata.
6800         
6801 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
6802
6803         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6804         EXPORTEDTYPES are already in the class name cache, so there is no
6805         need to add extra code here to look at them. Just removes a bit of
6806         cruft.
6807
6808         (ves_icall_System_Environment_get_TickCount): No need for #if
6809         WINDOWS. We already have the code in io-layer.
6810
6811 2004-11-28  Martin Baulig  <martin@ximian.com>
6812
6813         * loader.c
6814         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6815         Fixes gen-112.cs.
6816
6817 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
6818
6819         * assembly.c (do_mono_assembly_open): Instead of having a
6820         conditional WITH_BUNDLE, incorporate support for bundles here, by
6821         having a global `bundles' variable holding a pointer to the actual
6822         bundles. 
6823
6824         (mono_register_bundled_assemblies): New API call used by the
6825         bundle code. 
6826
6827         See mkbundle.1 for details.
6828         
6829 2004-11-27  Martin Baulig  <martin@ximian.com>
6830
6831         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6832         the vtable for generic methods.
6833
6834 2004-11-26  Martin Baulig  <martin@ximian.com>
6835
6836         * metadata.c
6837         (mono_metadata_generic_method_hash): New public function.
6838         (mono_metadata_generic_method_equal): Likewise.
6839
6840         * class-internals.h
6841         (MonoGenericContainer): Added `GHashTable *method_hash'.
6842
6843         * reflection.c (ReflectionMethodBuilder): Added
6844         `MonoGenericContainer *generic_container'.
6845         (reflection_methodbuilder_to_mono_method): Don't create a new
6846         MonoGenericContainer each time we're called.
6847         (mono_reflection_bind_generic_method_parameters): Use
6848         `container->method_hash' to cache the results so we don't create a
6849         different method if we're called several times with the same
6850         arguments.
6851
6852         * loader.c (method_from_methodspec): Use the new
6853         `container->method_hash' here, too.
6854
6855 2004-11-26  Martin Baulig  <martin@ximian.com>
6856
6857         * class.c (inflate_generic_signature): Correctly compute
6858         `res->has_type_parameters'.
6859         (mono_class_vtable): Use the `has_type_parameters' flag to
6860         determine whether we're a generic method.
6861
6862         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6863
6864 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
6865
6866         * object.c (mono_runtime_run_main): Fix a small memory leak.
6867
6868 2004-11-25  Martin Baulig  <martin@ximian.com>
6869
6870         * class.c (set_generic_param_owner): Fixed the loop.
6871
6872 2004-11-25  Martin Baulig  <martin@ximian.com>
6873
6874         * object.c (mono_class_vtable): Don't create any JIT wrappers for
6875         generic methods.
6876
6877 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
6878
6879         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6880         names. Fixes #69787.
6881
6882 2004-11-24  Martin Baulig  <martin@ximian.com>
6883
6884         * class.c (mono_class_create_generic_2): If we don't have a
6885         `ginst->parent', inflate `gklass->parent' to get our parent.
6886
6887 2004-11-24  Martin Baulig  <martin@ximian.com>
6888
6889         * reflection.c (compare_genericparam): Correctly sort the
6890         GenericParam table; fixes #69779.
6891
6892 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
6893
6894         * reflection.c: When writing a PE file, don't create a huge
6895         buffer in memory. Just write the arrays we have to the file.
6896         This reduces memory usage.
6897
6898         * metadata-internals.h: MonoDynamicStream pefile is no longer used
6899         globally.
6900
6901 2004-11-17  Martin Baulig  <martin@ximian.com>
6902
6903         * class.c (mono_class_init): Don't setup `class->parent' for
6904         dynamic instances; moved this to mono_class_generic_2().
6905         (mono_class_create_generic): Also set `klass->inited' for dynamic
6906         generic instances.
6907         (mono_class_create_generic_2): Don't do anything for dynamic
6908         generic instances.  Set `klass->parent' here and also call
6909         mono_class_setup_parent() here. 
6910
6911         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6912         `MonoType *parent' argument; set `ginst->parent' before calling
6913         mono_class_create_generic_2(), so we set the correct parent.
6914
6915 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6916
6917         * reflection.c: allow getting attributes from ModuleBuilder
6918         (used by ikvm).
6919
6920 2004-11-17  Martin Baulig  <martin@ximian.com>
6921
6922         * class.c (mono_class_create_from_typedef): If a type parameter is
6923         inherited from an outer class, set its owner to that class.
6924
6925 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
6926
6927         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6928           for (int*) written size. This fixes bug #69592.
6929
6930 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
6931
6932         * icall.c: Added IsAuthenticodePresnet internal call.
6933         * image.c|h: New function that check a MonoImage for an Authenticode
6934         signature in the certificate PE data directory.
6935         * security.c|h: New internal call to ask the runtime if an 
6936         Authenticode signature seems referenced in the PE header.
6937
6938 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
6939
6940         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6941
6942         * reflection.c (mono_image_create_pefile): Free the assembly streams
6943         after writing out the assembly file.
6944
6945         * object.c (mono_runtime_run_main): Fix small memory leak.
6946
6947         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6948         property access modifiers. Fixes #69389.
6949
6950 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6951
6952         * domain.c, object.c, object-internals.h, domain-internals.h,
6953         object.h, marshal.c: keep dynamic code info per domain.
6954
6955 2004-11-15  Martin Baulig  <martin@ximian.com>
6956
6957         * class.c (mono_type_get_name_recurse): Put type arguments in
6958         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
6959         see bug #68387.
6960
6961 2004-11-15  Martin Baulig  <martin@ximian.com>
6962
6963         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6964         (mono_class_setup_vtable): When computing `the_cname' for a
6965         generic instance, don't include the namespace since we'd otherwise
6966         add it twice.
6967
6968 2004-11-15  Martin Baulig  <martin@ximian.com>
6969
6970         * class.c (mono_class_create_generic): Changed return type to void.
6971         (mono_class_create_generic_2): New public function; setup
6972         `class->method', `class->field' and `class->interfaces' here
6973         instead of in mono_class_init().
6974
6975         * class.h (mono_class_create_generic): Moved to class-internals.h.
6976
6977 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
6978
6979         * reflection.c (mono_image_create_pefile): take a file HANDLE.
6980         rather than writing to memory, write to this file. Right now,
6981         we are just writting into a buffer, and copying that. However
6982         we can avoid the buffer later.
6983
6984         (mono_dynamic_stream_reset): new function
6985
6986         * icall.c, object-internals.h: update for the above.
6987
6988 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
6989
6990         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6991         have been using gc'd memory. First it is slower, unlikely
6992         the comment in the source code said, secondly, it increases
6993         our footprint to do it in the gc.
6994
6995         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6996         the method so that it does not have to copy to managed code.
6997
6998 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
6999
7000         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7001
7002 2004-11-12  Martin Baulig  <martin@localhost>
7003
7004         * reflection.c (mono_image_create_token): Allow generic method
7005         definitions here, since they may appear in an `.override'; see
7006         gen-98/gen-99 for an example.
7007
7008 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
7009
7010         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7011         #69365.
7012
7013         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7014         descriptive.
7015
7016 2004-11-11  Martin Baulig  <martin@ximian.com>
7017
7018         * class.c (mono_class_setup_vtable): In an explicit interface
7019         implementation, the method name now includes the arity.
7020
7021 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
7022
7023         * object.c (mono_array_full_copy): Fix warning.
7024
7025 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
7026
7027         * appdomain.c: Removed look_for_method_by_name(). Use the new method
7028         mono_class_get_method_from_name() instead.
7029         
7030         * class-internals.h: Added two new types of wrappers. 
7031         Added MonoRemotingTarget enum. Added new trampoline function type, which
7032         takes an additional MonoRemotingTarget value as parameter, so it is
7033         possible to request a trampoline for a specific target.
7034         
7035         * class.c: Added new mono_class_get_method_from_name() method.
7036         
7037         * class.h: In MonoRemoteClass, we can have now to vtables, one for
7038         general remoting sinks and one specific for cross domain calls.
7039         
7040         * debug-helpers.c: Added new wrapper names.
7041         
7042         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7043         of a remote class.
7044         
7045         * image.c: Porperly delete value objects form the remoting invoke hashtable.
7046         
7047         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7048         with several other methods (mono_marshal_get_xappdomain_dispatch,
7049         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7050         and others) can generate a fast remoting wrapper for cross domain calls.
7051         More information can be found in docs/remoting.
7052         Other changes: Removed mono_find_method_by_name, and used
7053         mono_class_get_method_from_name instead.
7054         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7055         is stored in the remoting invoke hashtable.
7056         
7057         * marshal.h: published the new method for getting the xdomain wrapper,
7058         and also added a method for getting the adequate wrapper for a given
7059         method and target.
7060         
7061         * object-internals.h, object.c: Added a couple of methods for capying and
7062         cloning arrays.
7063         Modified mono_install_remoting_trampoline, which takes the new remoting
7064         trampoline that has a remoting target as parameter.
7065         mono_class_proxy_vtable now also takes a remoting target as parameter, and
7066         will return the most suitable vtable for the target.
7067         Added mono_remote_class_vtable, which returns the vtable of a remote class
7068         (which can be the normal remoting vtable or the xdomain vtable).
7069         
7070         * threads.c: the xdomain invoke and dispatch wrappers must also be
7071         protected against interruptions.
7072
7073 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7074
7075         * icall.c: use memmove in BlockCopyInternal when the source and
7076         destination arrays are the same.
7077
7078 2004-11-09  Martin Baulig  <martin@ximian.com>
7079
7080         * class-internals.h (MonoGenericContainer): Removed `method' and
7081         `signature', replaced them with `is_method' and `is_signature'
7082         flags.  Added `context'.
7083
7084         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7085         instead of a `MonoGenericContainer *'.
7086
7087         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7088         for dynamic type parameters.
7089         (mono_metadata_load_generic_params): Setup `container->context'.
7090
7091         * reflection.c (mono_reflection_setup_generic_class): Setup
7092         `tb->generic_container->context'.
7093         (do_mono_reflection_bind_generic_parameters): Use
7094         mono_class_inflate_generic_type() to correctly inflate types,
7095         rather than using our own hack just for MONO_TYPE_VAR.
7096
7097 2004-11-09  Martin Baulig  <martin@ximian.com>
7098
7099         * class.c (mono_class_inflate_generic_method): Small fix; don't
7100         crash here.
7101
7102         * icall.c
7103         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7104         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7105         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7106         (ves_icall_Type_BindGenericParameters): Likewise.
7107         (ves_icall_Type_get_IsGenericInstance): Likewise.
7108         (ves_icall_Type_GetGenericParameterPosition): Likewise.
7109         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7110         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7111         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7112
7113 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
7114
7115         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7116         assembly versions and public key tokens. Fixes #69113.
7117
7118 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7119
7120         * metadata.c: fix bug introduced with the type cache changes
7121         on 2004-11-06.
7122
7123 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7124
7125         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7126         the MonoClass pointer instead of the token in exception clauses.
7127         * reflection.c: updates for the above and make the code not depend
7128         on the structure of MonoExceptionClause.
7129
7130 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
7131
7132         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7133         Add support for dynamic assemblies. Fixes #69114.
7134
7135         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7136
7137 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
7138
7139         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7140         since most only those methods use it. the code member of
7141         MonoMethodPInvoke was dead, so that can be removed too. Also,
7142         remove inline_count (again, not used), and move slot so that it
7143         can share bits with some other flags. This saves 8 bytes in the
7144         structure and gives us about 50 kb back for mcs helloworld.cs
7145
7146         * *.[ch]: Do naming changes for the above.
7147
7148         * loader.c (mono_method_get_header): Lazily init the header
7149         on first access.
7150         (mono_get_method_from_token): don't init the header here
7151         (mono_free_method): the header may never be allocated
7152
7153         Overall, this saves 150 kb of unmanaged allocations
7154         for mcs helloworld.cs. That accounts for 10% of the unmanaged
7155         memory at runtime.
7156         
7157         * loader.c, loader.h (mono_method_get_header): new accessor.
7158
7159         * *.[ch]: use the above method. Prepares us to lazily load
7160         the header.
7161
7162         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7163         three warnings, which are actual bugs (see 69206).
7164
7165         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7166         unused. Saves a cool 4 bytes / method.
7167
7168 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
7169
7170         * metadata.c (builtin_types): Add types for System.Object here.
7171         (mono_metadata_parse_type_full): Cache MonoType*'s that are
7172         for a class or valuetype from klass->this_arg or klass->byval_arg.
7173
7174         On mcs for a hello world, this gets us down from 21836 MonoType's
7175         to 14560.
7176
7177         (mono_metadata_free_type): Account for the above change.
7178
7179 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
7180
7181         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
7182         exception instead of asserting if name is null.
7183         (ves_icall_System_AppDomain_GetData): Ditto.
7184
7185 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
7186
7187         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7188         EnumBuilder.
7189
7190         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
7191         Return NULL when the domain does not have entry_assembly set.
7192
7193         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
7194         Add a 'resource_modules' argument.
7195         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7196
7197         * reflection.c (mono_reflection_create_runtime_class): Move setting
7198         of wastypebuilder here, so mono_get_type_object () returns a MonoType
7199         for enums too.
7200
7201         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7202         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7203         Throw an ArgumentNullException if 'ptr' is null.
7204
7205         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7206         assemblies here. Fixes #69020.
7207
7208 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
7209
7210         * reflection.c (build_compressed_metadata): Fix the previous patch for
7211         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
7212         the stack.
7213
7214 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
7215
7216         * assembly.c (mono_assembly_names_equal): Allow a match if one of
7217         the cultures is false. Fixes #69090.
7218
7219         * reflection.c (build_compressed_metadata): Fix invalid memory read 
7220         detected by valgrind.
7221         
7222         * reflection.c (mono_reflection_get_type): Avoid triggering a 
7223         TypeResolve multiple times for the same type. Fixes #65577.
7224
7225 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
7226
7227         * marshal.c: Avoid using ldftn to call managed functions. It is
7228         much slower than just a call.
7229
7230         * reflection.c (mono_module_get_object): free the basename we
7231         allocate here from glib.
7232         
7233         * reflection.c (ensure_runtime_vtable): make sure to free
7234         overrides.  Also, we were allocating an array of MonoMethod not an
7235         array of MonoMethod*.
7236
7237         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7238
7239         * image.c (mono_image_close): free image->guid here.
7240
7241 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
7242
7243         * reflection.c: Fix some spec conformance issues with the PE file
7244         structures so mcs compiled apps run on the Net 2.0 beta.
7245
7246 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
7247
7248         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
7249         Implement this. Fixes #67264.
7250
7251         * debug-helpers.h debug-helpers.c marshal.c: Move 
7252         mono_find_method_by_name to debug-helpers.c.
7253
7254 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
7255
7256         * object.c (mono_release_type_locks): type_initialization_hash is
7257         a GHashTable.
7258
7259         * reflection.c object.c object-internals.h: Fix warnings.
7260
7261         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7262         without accessors. Fixes #61561.
7263
7264         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7265         application base from the root domain if not set. Fixes #65641.
7266         (mono_runtime_init): Fix warning.
7267
7268 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7269
7270         * appdomain.c: call mono_thread_pool_init.
7271         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7272         of worker threads based on the number of CPUs and the environment
7273         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7274         for non-windows (windows) systems.
7275
7276 2004-10-27  Chris Toshok  <toshok@ximian.com>
7277
7278         * mono-debug-debugger.c (write_class): don't call mono_class_init
7279         here, as even with the check for (!klass->init_pending), we get
7280         into a situation where we're hitting cycles in class
7281         initialization.  Fixes #68816.
7282
7283 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
7284
7285         * image.c: Avoid overwriting values in the loaded_images_hash when an
7286         assembly is loaded multiple times. Fixes #61152.
7287
7288         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7289         so multiple satellite assemblies for the same name can be loaded.
7290         Fixes #68259.
7291
7292         * mono_domain_assembly_preload: Actually return the loaded assembly, 
7293         not NULL.
7294
7295         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7296         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7297
7298         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7299         pending finalizers are not invoked after the appdomain has been 
7300         unloaded. Fixes #67862.
7301
7302 2004-10-22  Martin Baulig  <martin@ximian.com>
7303
7304         * mono-debug-debugger.c
7305         (mono_debugger_runtime_invoke): Don't box valuetypes.
7306
7307 2004-10-22  Chris Toshok  <toshok@ximian.com>
7308
7309         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7310         don't hide private methods.
7311
7312 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
7313
7314         * icall.c: Allows the runtime to "share" (when known) the public key
7315         token of an assembly. This avoid the need to recalculate the token 
7316         (from the public key) in managed code.
7317
7318 2004-10-21  Chris Toshok  <toshok@ximian.com>
7319
7320         * debug-helpers.c (append_class_name): argh, revert last patch.
7321         
7322 2004-10-21  Chris Toshok  <toshok@ximian.com>
7323
7324         * debug-helpers.c (append_class_name): use '+' as the delimiter,
7325         not '/', so that it matches what the debugger uses to look up
7326         methods.
7327
7328 2004-10-21  Martin Baulig  <martin@ximian.com>
7329
7330         * mono-debug-debugger.c (mono_debugger_throw_exception): New
7331         public method; this is called each time an exception is thrown and
7332         allows the debugger to use exception catch points.
7333
7334 2004-10-21  Martin Baulig  <martin@ximian.com>
7335
7336         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7337         the stack pointer and the exception object in some struct and pass
7338         that to the debugger.
7339
7340 2004-10-21  Chris Toshok  <toshok@ximian.com>
7341
7342         * mono-debug-debugger.c (do_write_class): add instance/static
7343         event support.  We don't expose "raise" or "other" yet.
7344         (event_is_static): new method.
7345
7346 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
7347
7348         * mono-debug-debugger.c
7349         (mono_debugger_handle_exception): Remove
7350         bogus return value for fussy compilers.
7351
7352 2004-10-20  Martin Baulig  <martin@ximian.com>
7353
7354         * mono-debug-debugger.c
7355         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7356         (mono_debugger_handled_exception): Likewise.
7357
7358 2004-10-20  Martin Baulig  <martin@ximian.com>
7359
7360         * mono-debug-debugger.h (MonoDebuggerEvent): Added
7361         MONO_DEBUGGER_EVENT_EXCEPTION.
7362
7363         * mono-debug-debugger.c (mono_debugger_handle_exception): New
7364         public function to send the debugger a notification for an
7365         exception and inform it about a catch/finally clause.
7366
7367 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
7368
7369         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7370         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7371         fix 2.95 build. 
7372
7373         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7374
7375 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
7376
7377         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7378         marshalled as [In,Out]. Fixes #58325.
7379
7380 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
7381
7382         * reflection.c (mono_method_body_get_object): Implement some fields.
7383
7384 2004-10-12  Martin Baulig  <martin@ximian.com>
7385
7386         * reflection.c (mono_reflection_bind_generic_parameters): Small
7387         fix, correctly retrieve our parent from a generic instance.
7388
7389 2004-10-12  Martin Baulig  <martin@ximian.com>
7390
7391         * metadata.c (mono_metadata_generic_param_equal): We always have
7392         an owner.
7393
7394         * class.c
7395         (mono_class_from_generic_parameter): We need to have an owner.
7396         (my_mono_class_from_generic_parameter): Likewise.
7397
7398         * reflection.c (mono_reflection_setup_generic_class): Renamed to
7399         mono_reflection_create_generic_class() and added a new
7400         mono_reflection_setup_generic_class().  
7401         (mono_reflection_initialize_generic_param): If we're a nested
7402         generic type and inherited from the containing class, set our
7403         owner to the outer class.
7404
7405 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
7406
7407         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7408
7409         * reflection.c (mono_method_body_get_object): New function to create
7410         a MethodBody object.
7411
7412         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7413
7414 2004-10-11  Martin Baulig  <martin@ximian.com>
7415
7416         * metadata.c (_mono_metadata_type_equal): Renamed to
7417         do_mono_metadata_type_equal() and made static.
7418
7419 2004-10-11  Martin Baulig  <martin@ximian.com>
7420
7421         * appdomain.c: Bump corlib version number to 28.
7422
7423 2004-10-10  Martin Baulig  <martin@ximian.com>
7424
7425         * class-internals.h
7426         (MonoGenericInst): Added `MonoGenericContainer *container'.
7427         (MonoGenericMethod): Likewise.
7428         (MonoGenericContext): Likewise.
7429         (MonoGenericParam): Added `MonoGenericContainer *owner'.
7430
7431         * metadata.c
7432         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7433         (do_mono_metadata_parse_generic_inst): Likewise.
7434         (mono_metadata_parse_type_full): New public method.  This is the actual
7435         mono_metadata_parse_type() implementation - with an additional
7436         `MonoGenericContainer *' argument.
7437         (mono_metadata_parse_array_full): Likewise.
7438         (mono_metadata_parse_signature_full): Likewise.
7439         (mono_metadata_parse_method_signature_full): Likewise.
7440         (mono_metadata_parse_mh_full): Likewise.
7441         (mono_type_create_from_typespec): Likewise.
7442         (mono_metadata_interfaces_from_typedef_full): New public method;
7443         this is similar to the other _full() methods, but we take a
7444         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7445         (mono_metadata_parse_generic_param): Take an additional
7446         `MonoGenericContainer *' argument and lookup the MonoGenericParam
7447         from that container.
7448         (mono_metadata_generic_param_equal): New static method to compare
7449         two type parameters.
7450         (_mono_metadata_type_equal): New static method; takes an
7451         additional `gboolean signature_only' argument - if true, we don't
7452         compare the owners of generic parameters.
7453         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7454         with a TRUE argument - do a signature-only comparision.
7455
7456         * loader.c: Use the new _full() methods and pass the
7457         MonoGenericContainer to them.
7458
7459         * object-internals.h (MonoReflectionTypeBuilder): Added
7460         `MonoGenericContainer *generic_container' field.
7461         (MonoReflectionMethodBuilder): Likewise.
7462
7463 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
7464
7465         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7466         case initial images of dynamic assemblies.
7467
7468         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7469
7470         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7471
7472         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7473         length of event->other array.
7474         (typebuilder_setup_events): Ditto.
7475
7476         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7477         'assembly_by_name' and add an 'assemblies' list.
7478
7479         * assembly.h assembly.c: Add a new search hook for determining whenever
7480         an assembly is already loaded. Use this instead of searching in the
7481         loaded_assemblies list.
7482
7483         * domain.c appdomain.c: Implement the new search hook so loaded 
7484         assemblies are now scoped by appdomain. Fixes #67727.
7485
7486 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
7487
7488         * threads.c (mono_thread_attach): Initialize synch_lock field so
7489         mono_thread_detach works again.
7490
7491         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7492         'lib' too. Fixes #63130.
7493
7494 2004-10-06  Jackson Harper  <jackson@ximian.com>
7495
7496         * culture-info-tables.h: regenerated.
7497
7498 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
7499
7500         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
7501         implemented by other interfaces in the result. Fixes #65764.
7502         
7503         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7504         Handle unloadable modules without crashing.
7505
7506         * image.c (load_modules): Revert the previous patch since modules must
7507         have a fixed index inside the array.
7508         
7509         * image.c (load_modules): Don't include native modules in the modules
7510         array.
7511
7512 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
7513
7514         * reflection.h: Add param_defaults field.
7515
7516         * reflection.c: Add support for parameter defaults in dynamic methods.
7517         Fixes #64595.
7518
7519         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7520         an empty string when a type has no namespace. Fixes #64230.
7521
7522 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
7523
7524         * tabledefs.h: Added "internal" security actions to support non-CAS
7525         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
7526         Note: they do not seems to be used anymore in 2.0 (new metadata format)
7527
7528 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
7529
7530         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7531         constructor of abstract class. Fixes #61689.
7532
7533 2004-10-04  Martin Baulig  <martin@ximian.com>
7534
7535         * class-internals.h (MonoGenericContainer): New type.
7536         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7537         `MonoGenericContainer *generic_container'.
7538         (MonoClass): Replaced `gen_params' and `num_gen_params' with
7539         `MonoGenericContainer *generic_container'.
7540
7541         * metadata.c (mono_metadata_load_generic_params): Return a
7542         `MonoGenericContainer *' instead of a `MonoGenericParam *';
7543         removed the `num' argument.
7544
7545 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
7546
7547         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7548         for dynamic images.
7549
7550         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7551         machine fields.
7552
7553         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7554
7555         * reflection.c: Save pe_kind and machine values into the generated
7556         image file.
7557
7558         * appdomain.c: Bump corlib version number.
7559
7560         * object-internals.h: Reorganize layout of LocalBuilder.
7561
7562         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
7563         New helper function.
7564
7565         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7566         created MonoType for dynamic types. Fixes #66180.
7567
7568 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
7569
7570         * threadpool.c: the ares hashtable needs a critical section around it.
7571         this prevents some nasty segfaults
7572
7573 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
7574
7575         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7576         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7577         bug 67324).
7578         
7579 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7580
7581         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7582         
7583 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
7584
7585         * image.c: Always canonicalize image file names, to avoid loading
7586         the same assembly twice when referenced using a relative path.
7587
7588 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7589
7590         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7591
7592         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7593
7594         * marshal.c: Fix warnings.
7595
7596 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
7597
7598         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7599         attempting to marshal the delegate_trampoline as the method_addr.
7600         This patch has a static hashtable of marshalled delegates so that 
7601         we can map delegate_trampoline addresses back to delegates.  This
7602         allows a delegate passed to managed code to be passed back into native
7603         code.  Fixes #67039
7604
7605 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7606
7607         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7608
7609         * reflection.c (method_encode_code): Align method headers properly.
7610         Fixes #66025.
7611
7612 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7613
7614         * marshal.c: In the runtime invoke wrapper, reset the abort
7615         exception if it is cached. This avoids the automatic rethrowal of 
7616         the exception after the catch of the wrapper. Also check for pending
7617         interruptions before calling the managed method. This is done using
7618         the new method emit_thread_force_interrupt_checkpoint, since the
7619         normal checkpoint method is ignored when running the invoke wrapper.
7620         * object.c: If the abort exception is rethrown, set the abort_exc
7621         field of the thread, so it will be rethrown aftere every catch.
7622         * threadpool.c: Only run an interruption checkpoint if what has been
7623         requested is a stop of the thread (aborts will be ignored).
7624         * threads.c: By default, a thread will now never be interrumped while
7625         running the runtime invoke wrapper (this ensures that runtime_invoke
7626         will always return to the caller if an exception pointer is provided).
7627         There is a new special method mono_thread_force_interruption_checkpoint()
7628         to force an interruption checkpoint even if running a protected
7629         wrapper, which is used by the same runtime invoke wrapper to do a check
7630         at a safe point.
7631
7632 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7633
7634         * object.c, object-internals.h: Implemented mono_release_type_locks,
7635         which releases the cctor locks held by a thread.
7636         * threads.c, threads.h: In thread_cleanup, release cctor locks held
7637         by a thread. Added mono_thread_exit() method to be used to safely stop
7638         a thread.
7639
7640 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7641
7642         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7643         Move null check before dereference.  Avoid indexing beyond the end
7644         of the 'modules' array.
7645
7646 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7647
7648         * metadata-internals.h (MonoImage): Add module_count field.
7649         * image.c (load_modules): Set image->module_count.
7650         (mono_image_load_file_for_image): Use image->module_count.
7651         * reflection.c (mono_image_load_module): Append to image->modules array 
7652         of dynamic assembly.
7653         (mono_module_get_object): Fix loop to actually increment index.
7654         Use image->module_count.
7655         * assembly.c (mono_assembly_load_references): Use image->module_count.
7656         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7657         Likewise.
7658
7659 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7660
7661         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
7662         Avoid assert on generic types.
7663
7664 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
7665
7666         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7667
7668         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7669
7670         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
7671         function to convert a MarshalSpec structure to its managed counterpart.
7672
7673         * reflection.c: Fix warnings.
7674         
7675         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7676         field.
7677
7678         * icall.c (mono_create_icall_signature): Fix build.
7679
7680 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
7681
7682         * icall.c: Add MakePointType icall.
7683
7684         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7685         warnings.
7686
7687 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7688
7689         * threadpool.c: reuse allocated slots in the queue.
7690
7691 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
7692
7693         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7694
7695         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7696
7697         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7698         previous change.
7699
7700         * tabledefs.h: Add constants for pinvoke attributes BestFit and
7701         ThrowOnUnmappableChar.
7702
7703         * icall.c (ves_icall_Type_GetPacking): New icall.
7704
7705 2004-09-24  Martin Baulig  <martin@ximian.com>
7706
7707         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7708
7709 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7710
7711         * appdomain.c:
7712         (mono_domain_set): allow setting a domain that is being unloaded.
7713         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7714         being unloaded.
7715
7716 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7717
7718         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7719         the GetCustomAttributes icall.
7720
7721 2004-09-23  Martin Baulig  <martin@ximian.com>
7722
7723         * object-internals.h (MonoReflectionGenericParam): Replaced
7724         'has_ctor_constraint', `has_reference_type' and `has_value_type'
7725         with `guint32 attrs'.
7726
7727 2004-09-23  Martin Baulig  <martin@ximian.com>
7728
7729         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7730
7731 2004-09-23  Martin Baulig  <martin@ximian.com>
7732
7733         * object-internals.h (GenericParameterAttributes): New enum.
7734
7735 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7736
7737         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7738         
7739         * class.c (init_events): Fill out event->other field.
7740
7741         * class.c: Fix warnings.
7742
7743         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7744
7745 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7746
7747         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7748         walk which doesn't supply the IL offset.
7749
7750 2004-09-22  Martin Baulig  <martin@ximian.com>
7751
7752         * reflection.c (mono_reflection_setup_internal_class): If we're
7753         System.ValueType, System.Object or System.Enum, set
7754         `klass->instance_size' and create the vtable.
7755         (mono_reflection_create_internal_class): If we're an enum type,
7756         get the base class from our current corlib.
7757
7758 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
7759
7760         * reflection.h (MonoResolveTokenError): New type.
7761
7762         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7763         icall.
7764
7765         * icall.c: Add an 'error' argument to the ResolveToken icalls.
7766
7767 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
7768
7769         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7770         Support also calling constructors, but only for already allocated objects.
7771
7772 2004-09-17  Geoff Norton <gnorton@customerdna.com>
7773
7774         * reflection.c (type_get_qualified_name): If the klass is null
7775         return the typename to avoid a NullRefEx.
7776         (encode_cattr_value): Get the qualified name of the boxed type,
7777         not the underlying enumtype.  Fixes #62984.
7778
7779 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
7780
7781         * marshal.c: Fix problems with previous checkin.
7782
7783 2004-09-21    <vargaz@freemail.hu>
7784
7785         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7786         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7787
7788         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7789
7790 2004-09-21  Geoff Norton <gnorton@customerdna.com>
7791
7792         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7793         should only return a type for pointers, arrays, and passbyref types.
7794         Fixes bug #63841.
7795
7796 2004-09-21  Martin Baulig  <martin@ximian.com>
7797
7798         * domain.c (mono_debugger_check_runtime_version): New public
7799         function.
7800
7801         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
7802
7803 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
7804
7805         * reflection.c: Added missing sort to the declarative security 
7806         attributes table. MS implementation stops seeing the attributes if the
7807         token number regress in the table (as shown by ildasm and permview).
7808
7809 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
7810
7811         * object-internals.h (MonoReflectionModule): Add 'token' field.
7812         
7813         * reflection.c (mono_reflection_get_token): Add support for Module
7814         and Assembly.
7815         (mono_module_get_object): Set 'token' field.
7816         (mono_module_file_get_object): Set 'token' field.
7817
7818         * icall.c: Add new Assembly and Module icalls.
7819
7820         * appdomain.c: Bump corlib version.
7821
7822 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
7823
7824         * loader.h loader.c class.h class.c: Add helper functions for obtaining
7825         tokens of metadata objects.
7826
7827         * reflection.h reflection.c (mono_reflection_get_token): New function
7828         to obtain the token of a metadata object.
7829
7830         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7831
7832 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
7833
7834         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7835         
7836         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7837
7838 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
7839
7840         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7841         * object-internals.h: Added 3 MonoArray* members to MonoReflection
7842         AssemblyBuilder to access the permissions set in the class lib.
7843         * reflection.c: Added security attributes encoding step in 
7844         mono_image_build_metadata.
7845         * tabledefs.h: Added new security actions defined in 2.0:
7846         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7847
7848 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7849
7850         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7851         macro parameter.
7852
7853 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7854  
7855         * locales.c: nullify the ICU_collator member of CompareInfo when it is
7856           finalized. There where random SIGSEVs at program termination, when
7857           an object being finalized was trying to do a string comparison and
7858           the current culture was already finalized.
7859  
7860 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7861
7862         * threads.c: call thread_cleanup before finishing the thread if we get
7863         there.
7864
7865 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
7866
7867         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7868         assemblies from the parent. Fixes #65665.
7869
7870 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
7871
7872         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7873         modifiers.
7874
7875 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
7876
7877         * reflection.h: add prototype for mono_get_dbnull_object
7878         * reflection.c: add prototypes for get_default_param_value_blobs 
7879         and mono_get_object_from_blob for fussier compilers
7880
7881 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
7882  
7883         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7884         false deadlock checks in class initialization.
7885  
7886 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
7887
7888         * image.c (mono_image_addref): Fix comment.
7889
7890         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7891         possible.
7892
7893 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
7894
7895         * reflection.c (mono_param_get_objects): Modified to return
7896         ParameterInfo.DefaultValue object.
7897
7898         (get_default_param_value_blobs):
7899         (mono_get_object_from_blob):
7900         (mono_get_dbnull_object): New helper routines. 
7901
7902         * object.c (mono_get_constant_value_from_blob): New helper routine
7903         carved out from get_default_field_value ()
7904
7905         * object-internals.h (mono_get_constant_value_from_blob): Added
7906         function declaration.
7907
7908 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7909
7910         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
7911         referenced assemblies. Fixes #62135.
7912
7913         * exception.h exception.c (mono_get_exception_file_not_found2): New
7914         helper function.
7915
7916 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
7917
7918         * class.h class.c: Add mono_type_get_underlying_type ().
7919
7920 2004-09-09  Geoff Norton <gnorton@customerndna.com>
7921
7922         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7923         Fix GetTypes() to support dynamically created assemblies.
7924
7925 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
7926
7927         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7928         
7929         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7930         previous patch.
7931
7932         * reflection.h reflection.c loader.c: Allow dynamic construction of
7933         pinvoke methods. Fixes #65571.
7934         
7935         * reflection.c (mono_reflection_get_type): Revert previous change since
7936         it causes regressions.
7937
7938 2004-09-08  Martin Baulig  <martin@ximian.com>
7939
7940         * class.c (class_compute_field_layout): Don't call
7941         mono_class_layout_fields() for open generic instances.
7942
7943 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7944         * threads.c appdomain.c: fix typo in GC macro
7945
7946 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7947
7948         * threads.c: don't call mono_thread_detach() in start_wrapper(),
7949         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7950
7951 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
7952
7953         * image.c (mono_image_close): Applied patch from 
7954         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7955         assembly is loaded multiple times from data.
7956         
7957         * image.c (mono_image_open): Fix warning.
7958
7959 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7960
7961         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7962         once. Fixes #58334.
7963         
7964         * reflection.c (mono_reflection_create_runtime_class): Initialize
7965         klass->nested_classes. Fixes #61224.
7966
7967 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7968
7969         * threads.c: sched_yield() on exit, to allow threads to quit.
7970
7971 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7972
7973         * object.c (mono_unhandled_exception): Remove leftover debug code.
7974
7975 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
7976
7977         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7978
7979 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7980
7981         * marshal.c (emit_marshal_array): Really null terminate string arrays.
7982         
7983         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7984
7985 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7986
7987         * marshal.c (emit_marshal_array): Null terminate string arrays.
7988         
7989         * marshal.c (raise_auto_layout_exception): Fix warning.
7990
7991         * reflection.c (mono_param_get_objects): Initialize the default value
7992         with DBNull.Value, not null. Fixes #62123.
7993
7994 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
7995
7996         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7997         throw an exception with a cute explanation.
7998
7999 2004-09-06  Dick Porter  <dick@ximian.com>
8000
8001         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8002         Close the new process's thread handle, as we don't use it.  The
8003         handle stays around forever otherwise.
8004
8005 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8006
8007         * object.c (arith_overflow): Fix warning.
8008
8009         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8010         calling conventions in method refs. Fixes #65352.
8011
8012         * reflection.c: Fix warnings.
8013
8014 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8015
8016         * icall.c: Add a new icall for Array.Clear
8017
8018 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8019
8020         * object.c: When allocating an array, we have to throw
8021         an overflow exception if any of the lengths are < 0.
8022
8023 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8024
8025         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8026         properly. Also move implementation of string array marshalling to 
8027         managed code. Fixes #42316.
8028
8029 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8030
8031         * assembly.c: provide more information when loading an assembly fails.
8032
8033 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8034
8035         * filewatcher.c: don't expect the development fam package to be
8036         installed.
8037
8038 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
8039
8040         * marshal.c: Make a copy of the signature cookie since it will be
8041         freed by the caller.
8042         
8043         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8044
8045         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8046
8047         * metadata.c (mono_metadata_free_marshal_spec): New function to free
8048         marshal specs.
8049
8050         * marshal.c: More refactoring.
8051         
8052         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8053         smaller functions.
8054
8055 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
8056
8057         * object.c: In mono_message_invoke, fill the output parameter array after
8058           calling the managed method (it was done before the call). This fixes
8059           bug #59299.
8060
8061 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8062
8063         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8064         as well.
8065
8066 2004-09-02  Martin Baulig  <martin@ximian.com>
8067
8068         * class.c (mono_class_instance_size): Don't allow generic type
8069         definitions or open generic instances.
8070         (mono_class_array_element_size): If we're a value type, call
8071         mono_class_instance_size() on the original class.
8072
8073         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8074         handle generic instances.
8075
8076         * mono-debug-debugger.c (write_type): Handle generic instances
8077         like classes.
8078
8079 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8080
8081         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8082         the allocation request fails. Fixes #65089.
8083
8084         * object.c (mono_runtime_free_method): Do not call mono_free_method.
8085         
8086         * object.c (mono_runtime_free_method): New function to free a dynamic
8087         method.
8088
8089         * marshal.c (mono_delegate_free_ftnptr): New function to free the
8090         delegate trampoline.
8091
8092         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8093         with hasthis as dynamic,
8094
8095         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8096
8097         * domain.c (mono_jit_info_table_remove): New function to remove an
8098         entry from the jit info table.
8099
8100         * class-internals.h (MonoMethod): Add 'dynamic' field.
8101
8102         * loader.c: Fix warnings.
8103
8104 2004-09-01  Martin Baulig  <martin@ximian.com>
8105
8106         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8107         instead of mono_debugger_lock() because the latter one is a no-op
8108         unless running in the debugger.
8109
8110 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8111
8112         * class.c (class_compute_field_layout): Classes with auto-layout or
8113         reference fields are not blittable.
8114         
8115 2004-09-01  Dick Porter  <dick@ximian.com>
8116
8117         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8118         mono_image_get_filename() to get the assembly location.
8119
8120         * icall.c:
8121         * metadata.h: Fix compile warnings
8122
8123 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8124
8125         * class.c (class_compute_field_layout): System.Object is blittable.
8126
8127         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8128         as in/out. Fixes #59909.
8129
8130 2004-09-01  Martin Baulig  <martin@ximian.com>
8131
8132         * metadata.h (MONO_TYPE_ISREFERENCE): Call
8133         mono_metadata_generic_inst_is_valuetype() if we're a generic
8134         instance to check whether our underlying type is a reference type.
8135
8136 2004-09-01  Martin Baulig  <martin@ximian.com>
8137
8138         * metadata.c (mono_type_size): If we're a generic instance, call
8139         mono_class_value_size() for value types.
8140
8141 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
8142
8143         * marshal.c: Implement more custom marshalling functionality. Fixes
8144         #64915.
8145
8146 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8147
8148         * mono-debug.c, debug-mono-symfile.c: add some locking love.
8149
8150 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
8151
8152         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8153
8154         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8155
8156         * icall.c: Fix some warnings.
8157
8158         * threads.c (abort_appdomain_thread): Fix unref errors.
8159         (mono_thread_current): Fix THREAD_DEBUG define.
8160
8161 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
8162
8163         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8164
8165         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8166
8167 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
8168
8169         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
8170         string arrays.
8171
8172 2004-08-28  Martin Baulig  <martin@ximian.com>
8173
8174         * metadata.c
8175         (mono_metadata_generic_inst_is_valuetype): New public function.
8176
8177         * metadata.h (MONO_TYPE_ISSTRUCT): Call
8178         mono_metadata_generic_inst_is_valuetype() if we're a generic
8179         instance to check whether our underlying type is a valuetype.
8180
8181 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
8182
8183         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8184         #63768.
8185
8186 2004-08-25  Martin Baulig  <martin@ximian.com>
8187
8188         * loader.c (mono_get_method_from_token): Abstract methods can also
8189         be generic and thus have type parameters.
8190
8191         * metadata-internals.h
8192         (MonoDynamicImage): Added `GPtrArray *gen_params'.
8193
8194         * reflection.c (mono_image_get_generic_param_info): Don't create a
8195         metadata row, just add an entry to the `gen_params' array.
8196         (build_compressed_metadata): Sort the `gen_params' array and then
8197         actually create the metadata.
8198
8199 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8200
8201         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8202
8203 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
8204
8205         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8206
8207 2004-08-24  Martin Baulig  <martin@ximian.com>
8208
8209         * class.cs (mono_class_is_subclass_of): Like an interface, a
8210         generic instance also derives from System.Object.
8211
8212 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
8213
8214         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8215         custom modifiers to be in any order. Fixes #61990.
8216
8217 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
8218
8219         * object.c: Register mono_object_new_fast icall.
8220         
8221         * object.c (mono_class_get_allocation_ftn): Return to calling
8222         mono_object_new_fast, since it seems faster to compute the object 
8223         size in unmanaged code than passing it as a parameter.
8224
8225         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8226
8227         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8228         this function with Boehm as the oom handler, so we don't have to check
8229         the result of GC_malloc.
8230
8231         * object.c: Remove checks for oom.
8232
8233         * object.h object.c (mono_class_get_allocation_ftn): New function to
8234         return the icall which can be used to allocate an instance of a given
8235         class. 
8236
8237         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8238
8239         * class-internals.h: Add 'enabled' field.
8240
8241 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
8242
8243         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8244
8245 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
8246         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8247         value 0x0010.
8248
8249 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
8250
8251         * appdomain.c: use the Tls function for appdomain too,
8252         at Zoltan's request. Actually return in mono_context_get
8253
8254         * appdomain.c, profiler.c, threads.c: use __thread
8255
8256 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
8257
8258         * appdomain.c threads.c: Call GC_CreateThread on windows.
8259
8260         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8261         multiple libraries since this don't work on windows.
8262
8263 2004-08-18  Martin Baulig  <martin@ximian.com>
8264
8265         * class-internals.h
8266         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8267         MonoMethodHeader.
8268
8269         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8270         MonoMethodNormal since we also need it for abstract and interface
8271         methods.
8272
8273         * reflection.c
8274         (build_compressed_metadata): Sort the GenericParam table.
8275         (mono_image_create_token): Added `gboolean create_methodspec'
8276         argument; this is false when generating a MethodImpl token.
8277         (reflection_methodbuilder_to_mono_method): Abstract and interface
8278         methods may also have generic parameters.
8279
8280 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8281
8282         * appdomain.c: thread local alloc
8283
8284 2004-08-17  Martin Baulig  <martin@ximian.com>
8285
8286         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8287
8288         * icall.c
8289         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8290         argument.
8291
8292         * class.c (mono_type_get_full_name): New public function.
8293         (mono_type_get_name): Don't include the type arguments.
8294
8295 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
8296
8297         * Makefile.am: Build static versions of libmetadata and libmonoruntime
8298         for inclusion into the mono executable.
8299
8300 2004-08-16  Martin Baulig  <martin@ximian.com>
8301
8302         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8303         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8304
8305 2004-08-14  Martin Baulig  <martin@ximian.com>
8306
8307         * class.c (dup_type): Also copy the `byref' field.
8308
8309 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
8310
8311         * reflection.c (create_dynamic_mono_image): Revert the last change 
8312         since it breaks bootstrap.
8313
8314 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
8315
8316         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8317
8318         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8319         not free them with g_free.
8320
8321 2004-08-11  Martin Baulig  <martin@ximian.com>
8322
8323         * reflection.c (mono_reflection_setup_internal_class): Also call
8324         mono_class_setup_mono_type() if we already have a `tb->type.type'.
8325
8326 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
8327
8328         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
8329         called during default (first) AppDomain creation. Keep track of
8330         Evidence when loading assemblies.
8331
8332 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8333
8334         * opcodes.c, opcodes.h: reduce runtime relocations.
8335
8336 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8337
8338         * culture-info.h, locales.c: fixes and chages to sue the new
8339         optimized format of the locale data.
8340         * culture-info-tables.h: regenerated.
8341
8342 2004-08-06  Geoff Norton <gnorton@customerdna.com>
8343         
8344         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8345
8346 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
8347
8348         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8349         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8350         * domain-internals.h: icall declaration.
8351         * icall.c: icall registration.
8352         * object-internals.h: New fields in MonoAssembly for CAS.
8353
8354 2004-08-05  Duncan Mak  <duncan@ximian.com>
8355
8356         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8357         CEE_LDELEM_ANY.
8358
8359 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8360
8361         * reflection.c: fix to deal with object[] arrays in custom ctors
8362         (bug #62550).
8363
8364 2004-08-05  Martin Baulig  <martin@ximian.com>
8365
8366         * class.c (mono_class_array_element_size): Added support for
8367         generic instances and correctly handle "recursive" types.
8368
8369 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
8370
8371         * assembly.c: Fix warnings.
8372
8373 2004-08-04  Martin Baulig  <martin@ximian.com>
8374
8375         * class.c
8376         (mono_type_get_name_recurse): Added `gboolean include_arity'
8377         argument specifying whether or not we should include the generic
8378         arity in the type name.
8379         (_mono_type_get_name): New static function.
8380         (mono_class_setup_vtable): If we're a generic instance, don't
8381         include the generic arity in the names of explicit method
8382         implementations.        
8383
8384 2004-08-03  Martin Baulig  <martin@ximian.com>
8385
8386         * class.c (mono_type_get_name_recurse): Enclose the generic type
8387         arguments in `<', '>'.
8388
8389 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8390
8391         * gc.c: make GC warning messages use the trace API, they are just
8392         noise to most of the users.
8393
8394 2004-08-03  Martin Baulig  <martin@ximian.com>
8395
8396         * debug-mono-symfile.c (read_string): Correctly read the string.
8397
8398 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
8399
8400         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8401         
8402         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8403         icalls.
8404         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8405
8406 2004-07-30  Martin Baulig  <martin@ximian.com>
8407
8408         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8409         Reflect latest symbol writer changes.   
8410
8411 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8412
8413         * object.c: always create an object if null is passed
8414         to Invoke() where a valuetype is expected.
8415
8416 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
8417
8418         * marshal.c (mono_marshal_init): make managed
8419         signatures match native ones better for 64bits.
8420
8421 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8422
8423         * appdomain.c: hack to build correctly the private bin path on windows.
8424         Fixes bug #61991.
8425
8426 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
8427
8428         * assembly.c: Load mscorlib from the correct framework directory
8429           (mono/<version>/mscorlib.dll).
8430         * appdomain.h: Added prototypes for new functions.
8431         * internals.h: Added some prototypes.
8432         * domain.c: When initializing the runtime, get from the executable and
8433           the configuration files the runtime version that the app supports.
8434           Added support methods for reading app.exe.config. Added list of versions
8435           supported by the JIT. Added two new methods: mono_init_from_assembly,
8436           which initializes the runtime and determines the required version from
8437           the provided exe file, and mono_init_version, which initializes
8438           the runtime using the provided version.
8439         * icall.c: Get machine.config from version-specific directory.
8440         * reflection.c: When generating an image, embed the version number
8441           of the current runtime.
8442
8443 2004-07-28  Dick Porter  <dick@ximian.com>
8444
8445         * socket-io.c
8446         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8447         returned sockaddr size before creating the remote address object.
8448         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8449         61608.
8450
8451 2004-07-28  Dick Porter  <dick@ximian.com>
8452
8453         * locales.c (string_invariant_compare_char): Fix invariant char
8454         compares between upper and lower cases.  Fixes bug 61458.
8455
8456 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
8457         
8458         * marshal.c: actually cache stelem.ref wrappers.
8459         
8460 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8461
8462         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
8463         sections and remove the mono_cli_rva_map () function.
8464
8465 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8466
8467         * debug-mono-symfile.c: fix one more endianess issue, from a patch
8468         by Geoff Norton (<gnorton@customerdna.com>).
8469
8470 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8471
8472         * class.c: fix class loads for pointer types (typeof(int) !=
8473         typeof(int*)).
8474
8475 2004-07-27  Martin Baulig  <martin@ximian.com>
8476
8477         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8478         reading the debugging information from an external ".mdb" file.
8479
8480 2004-07-24  Martin Baulig  <martin@ximian.com>
8481
8482         * reflection.c (mono_image_get_type_info): Only write a class
8483         layout entry if we actually have a size or a packing size.
8484
8485 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8486
8487         * reflection.c (type_get_fully_qualified_name): 
8488         insert cast to get type checking of ?: with non-gcc compilers
8489
8490 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8491
8492         * rand.c: use g_getenv for both lookups of
8493         MONO_EGD_SOCKET
8494
8495 2004-07-17  Martin Baulig  <martin@ximian.com>
8496
8497         * reflection.c (mono_reflection_bind_generic_method_parameters):
8498         Set `gmethod->reflection_info'.
8499
8500 2004-07-17  Martin Baulig  <martin@ximian.com>
8501
8502         * class.c (mono_class_create_from_typedef): Insert the newly
8503         created class into the hash table before computing the interfaces
8504         since we could be called recursively.
8505
8506 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
8507
8508         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8509         function to implement stelem.ref in managed code
8510         * class-internals.h, debug-helpers.c: a new wrapper type
8511         for the above.
8512
8513 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8514
8515         * gc.c: allow GC handles to work even when no GC is compiled in.
8516         Fix part of bug #61134 (GetAddrOfPinnedObject).
8517
8518 2004-07-13  Peter Williams  <peter@newton.cx>
8519  
8520         * process.c (complete_path): Make sure we don't attempt to execute
8521         directories.
8522  
8523 2004-07-12  Geoff Norton <gnorton@customerdna.com>
8524
8525         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
8526           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
8527           and will add/subtract the hour if needed
8528
8529 2004-07-12  Martin Baulig  <martin@ximian.com>
8530
8531         * reflection.c (mono_field_get_object): If we have
8532         `field->generic_info', take the attributes from
8533         `field->generic_info->generic_type'.    
8534
8535 2004-07-12  Martin Baulig  <martin@ximian.com>
8536
8537         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8538         This function must be called before initializing the runtime.
8539         (mono_debug_init_1): New function; call this after initializing
8540         the runtime, but before loading the assembly.  It tells the
8541         debugger to load corlib and the builtin types.
8542
8543         * mono-debug-debugger.c: Did some larger changes in the debugging
8544         code; support recursive class declarations, make sure we actually
8545         add all classes.
8546
8547 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8548
8549         * debug-helpers.c: undo my previous patch and fixed the real issue in
8550         ../mini/exceptions-x86.c
8551
8552 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8553
8554         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8555         when no HOME env. variable was set and a NullRef was thrown in a .cctor
8556         called from other .cctors.
8557
8558 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
8559
8560         * loader.c: Removed the mono_loader_wine_init hack now that we are
8561         doing a managed version of Windows.Forms.
8562
8563 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
8564
8565         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8566         threadpool.c, threads.c: remove static data from rootset.
8567
8568 2004-07-09  Dick Porter  <dick@ximian.com>
8569
8570         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8571         Don't do any more processing if the matched length was 0.  It was
8572         increasing the size of the string before.  Fixes bug 61167.
8573
8574 2004-07-09  Dick Porter  <dick@ximian.com>
8575
8576         * socket-io.h:
8577         * socket-io.c
8578         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8579         Add support for SO_PEERCRED if its available.
8580
8581 2004-07-09  Peter Bartok <pbartok@novell.com>
8582         * loader.c: winelib.exe.so error message is now only displayed if
8583         MONO_DEBUG is set. To help us avoid questions when people are trying
8584         out the new Managed.Windows.Forms.
8585
8586 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
8587
8588         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
8589         for isinst and castclass wrappers.
8590
8591         * class-internals.h icall.c: Move registration and lookup of JIT icalls
8592         to libmetadata from the JIT, so they could be used by the marshalling
8593         code and the interpreter.
8594
8595         * marshal.c: Register marshalling related JIT icalls here instead of
8596         in mini.c. Use CEE_MONO_ICALL instead of the family of 
8597         CEE_MONO_PROC<x> opcodes to call marshalling functions.
8598
8599         * metadata.h: Remove unneeded marshalling conversions.
8600
8601         * opcodes.c: Update for new opcodes.
8602         
8603 2004-07-08  Martin Baulig  <martin@ximian.com>
8604
8605         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8606         (mono_debug_get_domain_data): Make this function static.
8607
8608 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8609
8610         * gc.c, object.h: add nice GC handle API for embedders.
8611
8612 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
8613
8614         * reflection.c: more changes for the new api
8615
8616         * object.c: When we reflect on a field w/ a constant value, it
8617         will not have a memory location, so we must access metadata. Also,
8618         allow easier reading of strings so that we can read them from
8619         the constant data.
8620
8621         * class.c (mono_class_layout_fields): no need for literal fields here.
8622
8623         * class-internals.h: api changes for const fields
8624
8625         * icall.c (ves_icall_get_enum_info): use new apis for const fields
8626
8627 2004-07-06  Martin Baulig  <martin@ximian.com>
8628
8629         * mono-debug.h: Increment version number to 44.
8630
8631         * mono-debug.c (mono_debug_add_wrapper): The second argument is
8632         now a gpointer, rewrote this whole method.
8633
8634         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8635         function.  Add information about the wrapper in a new "misc table".
8636
8637         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8638         for the new misc table.
8639
8640 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
8641
8642         * metadata-internals.h image.c: Add a cache for helper signatures.
8643
8644         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8645
8646 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
8647
8648         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8649         delegates from a delegate. Fixes #61033.
8650         
8651         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8652         marshalling of stringbuilder arrays. Fixes #59900.
8653
8654 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8655
8656         * icall.c: Add EnumBuilder:setup_enum_type icall.
8657
8658 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
8659
8660         * icall.c: Added a new icall for the property version of
8661         OffsetOfStringData.
8662
8663 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8664
8665         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8666         it has a constant size across platforms.
8667
8668         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8669         stack trace.
8670
8671 2004-06-29  Martin Baulig  <martin@ximian.com>
8672
8673         * mono-debug.c (mono_debug_add_method): Protect the whole function
8674         in mono_debugger_lock(), not just parts of it.
8675
8676 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8677
8678         * reflection.c: make sure padding bytes in heaps are zeroed.
8679
8680 2004-06-24  David Waite  <mass@akuma.org>
8681
8682         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8683         image.c, loader.c, locales.c, marshal.c, metadata.c,
8684         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8685         string-icalls.c, threads.c: change to C90-style comments from C99 /
8686         C++ -style
8687
8688 2004-06-24  Dick Porter  <dick@ximian.com>
8689
8690         * threads.c
8691         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8692         return createdNew.  Fixes bug 60412.
8693
8694         * threads-types.h: 
8695         * icall.c: Add createdNew parameter to CreateMutex icall
8696
8697 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8698
8699         * reflection.c, object-internals.h: save default value in params.
8700
8701 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8702
8703         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8704         no need to build a new path combining that with the application base.
8705         Fixes bug #60442.
8706
8707 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8708
8709         * reflection.c: fixed minor standard compliance issues.
8710
8711 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8712
8713         * reflection.c: fixed issue with encoding some custom attributes
8714         (arrays in properties and fields, bug #60411).
8715
8716 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8717
8718         * reflection.c: fix start address when copying the public key token.
8719
8720 2004-06-23  Martin Baulig  <martin@ximian.com>
8721
8722         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8723         the `exc' object in a static object to put it into the GC's root set.
8724
8725 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8726
8727         * reflection.c: make mono_reflection_setup_internal_class ()
8728         callable a second time to setup a new parent class.
8729
8730 2004-06-23  Dick Porter  <dick@ximian.com>
8731
8732         * threads.c: Check for WAIT_IO_COMPLETION return values.
8733
8734 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
8735
8736         * appdomain.c: Removed the g_free on the public key token. Now copy 
8737         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8738         * assembly.c: Added public key token string value when loading 
8739         assemblies. Fix bug #60439.
8740         * icall.c: Added missing informations (like public key) in 
8741         GetReferencedAssemblies. Fix #60519.
8742         * image.h: Changed definition for public key token from const char*
8743         public_tok_value to guchar public_key_token [17];
8744         * reflection.c: Updated for changes to public key token.
8745
8746 2004-06-22  Lluis Sanchez Gual
8747
8748         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
8749         for the field in base classes.
8750
8751 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8752
8753         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8754         mark headers as not supported, they are installed only for use by the
8755         debugger.
8756
8757 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8758
8759         * *.c, *.h: avoid namespace pollution in public headers.
8760
8761 2004-06-21  Martin Baulig  <martin@ximian.com>
8762
8763         * exception.c (mono_get_exception_security): It's in
8764         "System.Security", not in "System".
8765
8766         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8767         the exception classes.
8768
8769 2004-06-21  Martin Baulig  <martin@ximian.com>
8770
8771         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8772         Protect the exception object from being finalized.
8773
8774 2004-06-21  Martin Baulig  <martin@ximian.com>
8775
8776         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8777         public function.
8778
8779 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
8780
8781         * reflection.c: Load the assembly in mono_reflection_type_from_name,
8782         if it was not loaded before. Fix parts of #60439.
8783
8784 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8785
8786         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8787         code that was broken since Ben's change: wrappers are now
8788         dependent on the method signature only again.
8789
8790 2004-06-21  Martin Baulig  <martin@ximian.com>
8791
8792         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8793         added interface support.
8794
8795 2004-06-21  Martin Baulig  <martin@ximian.com>
8796
8797         * class.c (mono_vtable_get_static_field_data): New public method.
8798
8799 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
8800
8801         * filewatcher.c : Windows build fix to be compliant with API changes.
8802
8803 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8804
8805         * class.h, class.c: more accessors.
8806         * metadata.h, metadata.c: prepare for hiding MonoType and
8807         MonoMethodSignature: people should use the accessors from now on
8808         outside of the tree.
8809
8810 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8811
8812         * *.c, *.h: more API cleanups.
8813
8814 2004-06-18  Jackson Harper  <jackson@ximian.com>
8815
8816         * assembly.c: Trace loading assemblies.
8817         * loader.c: Trace loading native libraries.
8818         * mono-config.c: Trace loading config files.
8819         
8820 2004-06-18  Dick Porter  <dick@ximian.com>
8821
8822         * locales.c: Tell ICU the lengths of strings, it can cope with
8823         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
8824
8825 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8826
8827         * image.c: swapped name/filename;
8828
8829 2004-06-18  Martin Baulig  <martin@ximian.com>
8830
8831         * mono-debug-debugger.c (write_class): Write the parent class at
8832         the end of the header.
8833
8834 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8835
8836         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8837
8838 2004-06-17  Raja R Harinath  <rharinath@novell.com>
8839
8840         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
8841         (bundle_obj): New conditional define.
8842         (BUILT_SOURCES): Remove.
8843         ($(bundle_srcs)): Make parallel-make safe.
8844         (libmonoruntime_la_LIBADD): Make unconditional.
8845         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
8846         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8847
8848 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
8849
8850         * culture-info-tables.h: It was inconsistent with the latest
8851           supp info files.
8852
8853 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
8854
8855         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8856         be loaded.
8857
8858         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8859         with gcc 2.95.
8860
8861 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8862
8863         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8864         cleaned up public header threads.h.
8865
8866 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8867
8868         * Makefile.am, *.c, *.h: more API cleanups.
8869
8870 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8871
8872         * Makefile.am: removed monosn from compilation.
8873         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8874         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8875         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8876         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8877         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8878         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8879
8880 2004-06-15  Jackson Harper  <jackson@ximian.com>
8881
8882         * assembly.c: Make locales lower case when searching the GAC for
8883         assemblies. gacutil will always make locales lowercase when
8884         installing so this effectively makes them case insensitive.
8885         
8886 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
8887
8888         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8889         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8890           parameter which allows to choose whether the wait can be interrupted or 
8891           not. Also added the method mono_monitor_enter(), which locks the monitor
8892           using an infinite wait and without allowing interruption.
8893           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8894           interrupted.
8895         * object.h: Added new fields in MonoThread. suspend_event holds the event
8896           used to susped/resume the thread. synch_lock is the lock object to use for
8897           modifying the thread state.
8898         * threads.c: Use the new synch_lock object for locking, instead of "this",
8899           which can generate deadlocks.
8900           Moved thread state change in Thread.Sleep and Thread.Join from managed
8901           to unmanaged code. This avoids a deadlock when the thread was suspended
8902           just after acquiring the thread lock.
8903           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8904           Implemented Thread.Suspend using an event instead of ThreadSuspend,
8905           which is not fully implemented in the io-layer.
8906         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8907
8908 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8909
8910         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8911         threads-types.h: more API cleanups.
8912
8913 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8914
8915         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8916         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8917         threadpool.c, threads.c: first pass at the exported API cleanup.
8918
8919 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8920
8921         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8922
8923 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8924
8925         * icall.c: added internalGetHome.
8926
8927 2004-06-14  Dick Porter  <dick@ximian.com>
8928
8929         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8930         possible to return successfully when '.' or '..' were the only
8931         entries in a directory, but were skipped.  The MonoIOStat was not
8932         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
8933         Fixes bug 59574.
8934
8935 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8936
8937         * reflection.c: make binaries run on .Net 1.1 by default.
8938
8939 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8940
8941         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8942
8943 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8944
8945         * marshal.c: keep track of struct size with explicit layout
8946         (bug #59979).
8947
8948 2004-06-12  Martin Baulig  <martin@ximian.com>
8949
8950         * mono-debug-debugger.c: Comment out a debugging g_message().
8951
8952 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8953
8954         * reflection.c, reflection.h: do not free custom attrs that are cached.
8955         * icall.c: use braces to make code clearer.
8956
8957 2004-06-11  Martin Baulig  <martin@ximian.com>
8958
8959         * class.h (MonoInflatedField): New type.
8960         (MonoClassField): Replaced `MonoType *generic_type' with
8961         `MonoInflatedField *generic_info'.
8962
8963         * icall.c
8964         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8965
8966 2004-06-11  Martin Baulig  <martin@ximian.com>
8967
8968         * reflection.c (mono_image_create_method_token): Correctly encode
8969         varargs methods.
8970
8971 2004-06-11  Martin Baulig  <martin@ximian.com>
8972
8973         * metadata.c (mono_metadata_parse_method_signature): When parsing
8974         a MethodDef which has VarArgs, also set sentinelpos if we don't
8975         have any parameters.
8976
8977 2004-06-11  Martin Baulig  <martin@ximian.com>
8978
8979         * verify.c (mono_method_verify): In CEE_CALL, use
8980         mono_method_get_signature() to get the method's signature, unless
8981         we're a PInvoke method.
8982
8983 2004-06-10  Jackson Harper  <jackson@ximian.com>
8984
8985         * assembly.c: Use <path>/lib/mono/gac for the extra paths
8986         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8987         logical name as the supplied path is just a prefix to the gac not
8988         the direct path to it.
8989         
8990 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8991
8992         * reflection.c: make the token for a created method match
8993         the token of the MethodBuilder it was created from
8994         (IKVM requires this behaviour now).
8995
8996 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8997
8998         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8999         reflection.c, socket-io.c: leak fixes.
9000
9001 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9002
9003         * icall.c: handle sentinel pos in vararg methods in position different
9004         from 0.
9005
9006 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9007
9008         * culture-info-tables.h: freshly generated.
9009
9010 2004-06-09  Martin Baulig  <martin@ximian.com>
9011
9012         * loader.c (mono_get_method_constrained): Call `mono_class_init
9013         (constrained_class)'.   
9014
9015 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
9016
9017         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
9018         any methods. Fixes #59629.
9019
9020 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9021
9022         * culture-info-tables.h: reflecting locale-builder updates.
9023
9024 2004-06-08  Dick Porter  <dick@ximian.com>
9025
9026         * object.h:
9027         * locales.c: Fixed compile warnings, including a real bug in
9028         CompareInfo_internal_compare.
9029         
9030 2004-06-08  Dick Porter  <dick@ximian.com>
9031
9032         * locales.c
9033         (ves_icall_System_Globalization_CompareInfo_internal_index):
9034         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9035         Double-check the resuls of usearches, because ICU currently
9036         ignores most of the collator settings here.  Fixes bug 59720.
9037         
9038 2004-06-08  Dick Porter  <dick@ximian.com>
9039
9040         * locales.c
9041         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9042         Fix memory leak and segfault-causing typo.  No idea how this one
9043         lasted so long without being noticed.
9044
9045 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
9046
9047         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9048         any methods. Fixes #59629.
9049
9050 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9051
9052         * assembly.c:
9053         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9054         own the critical section before). Removed dead code (that's done
9055         in the preload hook).
9056
9057         (mono_assembly_load_with_partial_name): call the preload hook.
9058
9059 2004-06-08  Martin Baulig  <martin@ximian.com>
9060
9061         * metadata.c (mono_metadata_signature_alloc): Default
9062         `sentinelpos' to -1.
9063
9064         * reflection.c (mono_image_get_array_token): Likewise.
9065
9066 2004-06-08  Martin Baulig  <martin@ximian.com>
9067
9068         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9069
9070         * metadata.c (mono_metadata_parse_method_signature): When parsing
9071         a MethodDef which has VarArgs, set sentinelpos.
9072
9073         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9074         `gint16' since we're using -1 for non-varargs methods.
9075
9076         * reflection.c
9077         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9078         (method_encode_signature): Added varargs support.
9079         (method_builder_encode_signature): Likewise.
9080         (mono_image_get_varargs_method_token): New static method.
9081         (mono_image_create_method_token): New public method; this is
9082         called via an icall instead of mono_image_create_token() when
9083         calling a varargs method.       
9084
9085 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
9086
9087         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9088
9089 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9090
9091         * culture-info-tables.h : Reflecting the latest locale-builder that
9092           fixed empty array representation ({} to {0}).
9093
9094 2004-06-07  Jackson Harper  <jackson@ximian.com>
9095
9096         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9097         looking up extra gac paths. This allows MONO_GAC_PATH to act
9098         exactly like a prefix.
9099         
9100 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9101
9102         * reflection.c (mono_reflection_type_from_name): Make a copy of the
9103         type name before modifying it. Fixes #59405.
9104
9105 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9106
9107         * culture-info.h: added fields for "all datetime patterns".
9108         * locales.c: (  ves_icall_System_Globalization_CultureInfo
9109           _construct_datetime_format ()): fill xxx_patterns fields.
9110         * object.h: added fields for "all datetime patterns" to
9111           MonoDateTimeFormatInfo.
9112         * culture-info-tables.h: reflecting locale-builder updates.
9113
9114 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9115
9116         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9117         the event has no add and remove methods. Fixes #59629.
9118
9119 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
9120
9121         * object.c: Fixed possible integer overflow when allocating large
9122         strings.
9123
9124 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9125
9126         * culture-info-tables.h: reflecting locale-builder updates.
9127
9128 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9129
9130         * culture-info-tables.h: reflecting locale-builder updates.
9131
9132 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
9133
9134         * culture-info-tables.h: reflecting locale-builder updates.
9135
9136 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
9137
9138         * threads.c: Made Thread.Sleep abortable.
9139
9140 2004-06-02  Martin Baulig  <martin@ximian.com>
9141
9142         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9143
9144         * debug-mono-symfile.h: Bumped symbol file version number to 37.
9145
9146 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
9147
9148         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9149
9150 2004-05-30  Jackson Harper  <jackson@ximian.com>
9151
9152         * reflection.c: Do not hardcode assembly versions or public key
9153         tokens anymore. All of this except the corlib section was dead
9154         code anyways.
9155         
9156 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
9157
9158         * object.c (mono_runtime_invoke_array): Automatically create boxed
9159         objects for byref valuetypes if needed. Fixes #59300.
9160         
9161         * object.c (mono_method_return_message_restore): Handle 
9162         MONO_TYPE_OBJECT as well.
9163
9164 2004-05-28  Jackson Harper  <jackson@ximian.com>
9165
9166         * reflection.c: The modified type encoding was causing build
9167         problems. Reverted for now.
9168         
9169 2004-05-28  Jackson Harper  <jackson@ximian.com>
9170
9171         * reflection.c/h: Take an assembly ref so that we dont create
9172         fully qualified names when encoding types in the same assembly as
9173         the custom attribute being emitted.
9174         * appdomain.c: Increment version number.
9175         
9176 2004-05-26  Duncan Mak  <duncan@ximian.com>
9177
9178         * icall.c
9179         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9180         Set the full version number (major, minor, build, revision).
9181
9182 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
9183
9184         * marshal.c (emit_struct_conv): increment src/dst after blit
9185         (mono_marshal_get_managed_wrapper,
9186         mono_marshal_get_native_wrapper): make sure we have marshalling
9187         info before marshalling params (info computation affects
9188         blittable)
9189
9190         * class.c (class_compute_field_layout): correctly deal with
9191         blittable
9192         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9193         value types (as per what windows dows by default)
9194         (mono_class_setup_mono_type): System.ValueType is blittable
9195         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9196         blittable
9197
9198         * marshal.c (mono_marshal_load_type_info): flag types  as
9199         non-blittable if the native layout doesn't match the managed
9200         layout
9201
9202 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9203
9204         * appdomain.c: don't add stuff in the private search path that is
9205         above the application base. If application base is not set, there's
9206         no private search path.
9207
9208 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
9209
9210         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9211         byref struct arguments in native->managed marshalling.
9212
9213 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
9214
9215         * marshal.c (mono_marshal_get_runtime_invoke): correctly
9216         cache methods using signature (special case for methods
9217         that are value type or string class)
9218         
9219         * image.c (mono_image_close): clean up allocated GSList's
9220         in runtime_invoke_cache.
9221
9222 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9223
9224         * mono-config.c: set the correct path for mono_cfg_dir on windows when
9225         there's no MONO_CFG_DIR environment variable defined.
9226
9227 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9228
9229         * threads.c: windows version must be >= 0x0500 to include OpenThread.
9230
9231 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
9232
9233         * threadpool.c: Really wait for 500ms after the async call, even if the wait
9234           is interrumped.
9235         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9236           before waiting for it, and call CloseHandle after the wait to unref it.
9237           This will make sure that handles are not disposed too early.
9238
9239 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9240
9241         * appdomain.c:
9242         * appdomain.h:
9243         * icall.c: removed
9244         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9245         needed now.
9246
9247         * object.c: se the application_base only for the domain that runs
9248         Main. Fixes bug #59216,
9249
9250 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9251
9252         * appdomain.c:
9253         * object.c: only the domain in which Main is run have
9254         SetupInformation.ConfigurationFile set, so moved a few lines from
9255         appdomain.c to object.c.
9256
9257 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9258
9259         * appdomain.c: we tried to load [name].(dll|exe), but according
9260         to bug #57710, we must also try [culture]/[name].(dll|exe) and
9261         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9262         There's a test case attached to bug #58922.
9263
9264 2004-05-27  Dick Porter  <dick@ximian.com>
9265
9266         * icall.c:
9267         * file-io.c: Implemented icalls for locking and unlocking regions
9268         in a file.
9269         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9270         FALSE on error (fixes both compiler warning and real bug.)
9271
9272 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
9273
9274         * culture-info-tables.h: reflecting locale-builder updates.
9275
9276           (Added missing ChangeLog entry for 05/26)
9277
9278 2004-05-27  Jackson Harper  <jackson@ximian.com>
9279
9280         * locales.c: Fix some cut and paste errors.
9281         
9282 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9283
9284         * mono-config.c: set the correct path for config. directory on windows.
9285
9286 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9287
9288         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9289           on win32.
9290
9291 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9292
9293         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9294         from pinvoke functions.
9295         
9296         * marshal.c (mono_ftnptr_to_delegate): Implement this.
9297
9298 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9299
9300         * culture-info-tables.h: reflecting locale-builder updates.
9301
9302 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9303
9304         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9305         #59086.
9306
9307 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
9308
9309         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9310         * icall.c: Modified icalls for RNG.
9311         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
9312         Windows (CryptoAPI).
9313
9314 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9315
9316         * locales.c: Fix build.
9317
9318 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9319
9320         * culture-info-tables.h: reflecting locale-builder updates.
9321
9322 2004-05-25  Jackson Harper  <jackson@ximian.com>
9323
9324         * locales.c: When creating the current culture use the $LANGs
9325         specific culture. So DateTimeFormat and NumberFormat entries are created.
9326         
9327 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9328
9329         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9330         a char array as parameter.
9331
9332 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
9333
9334         * image.c: In mono_image_open(), always use an absolute path name to
9335           look for already loaded images.
9336
9337 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
9338
9339         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9340         missing in the windows build (like older cygwin include files).
9341
9342 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
9343
9344         * icall.c: Fixed check for possible integer overflow in Buffer_
9345         BlockCopy icall. Replaced comments style // by /* */.
9346
9347 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
9348
9349         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9350         
9351         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9352         check after MONO_VTADDR. Fixes pinvoke2.exe.
9353
9354         * marshal.h marshal.c metadata.h: Add beginnings of support for
9355         ftnptr -> delegate marshalling.
9356
9357 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
9358
9359         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9360         * threads.c: Fix warnings.
9361
9362 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
9363
9364         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9365         * icall.c: Registered icalls for Suspend and Resume.
9366         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9367           Thread.Abort.
9368         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9369         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9370         * process.c: Use WaitForSingleObjectEx.
9371         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
9372           checkpoints.
9373         * threads.c, threads.h: Make use of new Ex wait methods. Improved
9374           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9375           for Suspend and Resume. Added new mono_thread_stop, used for stoping
9376           background threads. Added basic support for Abort in Windows.
9377           Start new threads using a managed delegate invoke wrapper. This wrapper
9378           has an interruption checkpoint that is needed since an interruption
9379           can be requested before the thread leaves the unmanaged code that starts 
9380           the thread.
9381         * marshal.c: Added interruption checkpoint after every native call, and
9382           also before managed calls for wrappers called from unmanaged code to
9383           go into managed code.
9384         * object.h: Added new field in MonoThread to keep track of interruption
9385           requests.
9386
9387 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
9388
9389         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9390         calls.
9391
9392 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9393
9394         * appdomain.c:
9395         * assembly.c:
9396         * gc.c:
9397         * locales.c:
9398         * mono-config.c:
9399         * rand.c: getenv -> g_getenv (windows!)
9400
9401         * process.c: complete_path is also used on non-windows platforms.
9402
9403 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9404
9405         * icall.c: new signature for Process_Start.
9406
9407         * process.[ch]: new signature for Process_Start. If we're on windows
9408         and UseShellExecute is false, we have to search for the program by
9409         ourselves if we don't get a full path.
9410
9411 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9412
9413         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
9414         marshalling and call CleanUpNativeData if needed. Fixes #58646.
9415
9416 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9417
9418         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9419         Fixes bug #58373.
9420
9421 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9422
9423         * process.c: use double quotes to quote program name and arguments on
9424         windows. Fixes bug #58575.
9425
9426 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9427
9428         * file-io.c: don't return "." and ".." when using windows Find*File.
9429
9430 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
9431
9432         * marshal.c: Don't pass wrappers to message init because method 
9433         addressed used to lookup metadata. part of remoting[2|3] fix.
9434
9435 2004-05-15  Jackson Harper  <jackson@ximian.com>
9436
9437         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9438         path is essentially the same as MONO_PATH except that it points to
9439         GACs instead of lib directories.
9440         * loader.h: The user gac is gone so we dont need function to
9441         enable/disable it.
9442         * mono-config.c: user gac option is now gone.
9443         
9444 2004-05-15  Jackson Harper  <jackson@ximian.com>
9445
9446         * culture-info.h: Make defines more consistent, add calendar data
9447         to the culture info table.
9448         * culture-info-tables.h: Add basic calendar data. Basically
9449         everyone gets default gregorian until all the data is
9450         updated.
9451         * locales.c: Use the new consistent defines. Set calendar data for
9452         culture info objects.
9453         * object.h: add a field for calendar data to CultureInfo
9454         
9455 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
9456
9457         * image.c: image->runtime_invoke_cache is keyed on signatures now.
9458         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9459         a signature.
9460         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9461         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9462         an extra param that is the pointer of the method to invoke. The IL for
9463         the invoke method is no longer specific to the method, but to the
9464         signature of the method. Thus, we can share the same code for multiple
9465         methods. This reduces the number of methods that have to be compiled.
9466
9467 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
9468
9469         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9470
9471         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9472
9473         * icall.c: Optimize Buffer.BlockCopy.
9474
9475 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9476
9477         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9478         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9479         quote). Changed them to "MMMM yyyy".
9480
9481 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
9482
9483         * rand.c
9484         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
9485
9486 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
9487
9488         * reflection.h: Updated after changes to managed structures.
9489
9490         * appdomain.c: Bump corlib version.
9491
9492 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9493
9494         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9495         windows.
9496
9497 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9498
9499         * Makefile.am: link to ../os/libmonoos.la on windows.
9500
9501         * assembly.c:
9502                 -If MONO_DEBUG, warn about non-existing directories in
9503                 MONO_PATH.
9504                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9505                 compile time variable.
9506                 -Removed init_default_path and call mono_set_rootdir from
9507                 libmonoos.a instead (windows only).
9508
9509         * assembly.h: declare mono_assembly_getrootdir().
9510
9511         * domain.c:
9512         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9513
9514         * loader.c: s/getenv/g_getenv/
9515
9516 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
9517
9518         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9519
9520         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9521
9522         * metadata.h: Add new marshalling conversions.
9523
9524         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9525         function.
9526
9527         * reflection.c (mono_reflection_get_type): Lookup the type in all
9528         modules of a multi-module assembly. Fixes #58291.
9529
9530 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
9531
9532         * threads.c: Before aborting a background, set the StopRequested
9533         state.  This avoids throwing the Abort exception.
9534         In mono_thread_manage, don't continue with the shutdown until all
9535         aborted threads have actually stopped.
9536
9537 2004-05-10  Jackson Harper  <jackson@ximian.com>
9538
9539         * locales.c: Remove the modifier from culture names.
9540         
9541 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9542
9543         * Makefile.am: monosn is not installed any more. It has been deprecated
9544         in favor of sn.
9545
9546 2004-05-07  Jackson Harper  <jackson@ximian.com>
9547
9548         * locales.c
9549         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9550         Fix array construction, add bailout if the length is 0.
9551
9552 2004-05-07  Dick Porter  <dick@ximian.com>
9553
9554         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9555         machine doesn't have a DNS entry.  Patch by Urs Muff
9556         (umuff@quark.com), fixes bug 57928.
9557
9558 2004-05-06  Jackson Harper  <jackson@ximian.com>
9559
9560         * reflection.c: Handle null PublicTokens properly. alloc mem for
9561         assembly names culture so we dont crash when freeing it.
9562         
9563 2004-05-06  Jackson Harper  <jackson@ximian.com>
9564
9565         * assembly.c: Check the usergac when loading with partial names.
9566         
9567 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9568
9569         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
9570         does nothing for now (not required for Linux/Windows) but the class
9571         library can call it (and a newer or modified runtime could need it).
9572         * icall.c: Registred icall.
9573
9574 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9575
9576         * loader.c: prints a message on module loading error we set MONO_DEBUG
9577         environment variable.
9578
9579 2004-05-05  Jackson Harper  <jackson@ximian.com>
9580
9581         * appdomain.c: Handle PublicKeyToken=null properly.
9582         
9583 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9584
9585         * environment.c|h: Added icall ves_icall_System_Environment_
9586         GetOSVersionString to get the current OS version as a string.
9587         * icall.c: Registred icall.
9588
9589 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
9590
9591         * object.c: in mono_object_get_virtual_method(), take into account that
9592         non-virtual methods don't have a slot in the vtable. Check needed when
9593         the object is a proxy.
9594
9595 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
9596
9597         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9598         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9599
9600         * object.c (mono_class_compute_gc_descriptor): Fix warning.
9601
9602         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9603         passed when a valuetype is expected.
9604
9605         * object.c (mono_unhandled_exception): Only set the exit code if the
9606         exception happens in the main thread. Fixes thread5.exe.
9607
9608         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9609         invalid names. Fixes #58047.
9610
9611 2004-05-03  Jackson Harper  <jackson@ximian.com>
9612
9613         * assembly.c: This line was committed accidently and is unneeded.
9614         
9615 2004-05-03  Jackson Harper  <jackson@ximian.com>
9616
9617         * icall.c: Add new icall for Assembly::LoadWithPartialName
9618         * assembly.c/.h: new function that probes the GAC to load partial
9619         assembly names by Paolo Molaro.
9620         
9621 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9622
9623         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9624         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9625         (type_get_fully_qualified_name): Added PublicKeyToken when building a
9626         full type name.
9627
9628 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9629
9630         * appdomain.c: fixed check for 'neutral' culture and removed warning.
9631         * reflection.c: fix bug when parsing a full type name and Version is not
9632         the last thing in the string.
9633
9634 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
9635
9636         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9637         crashes when it is freed.
9638
9639 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9640
9641         * assembly.c: print the compat warning to stderr.
9642
9643 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
9644
9645         * assembly.c (mono_assembly_load_references): Add a compatibility
9646         hack to run old applications that might be still referencing the
9647         3300-based assemblies, only do this for System.xxx.
9648
9649 2004-05-01  Jackson Harper  <jackson@ximian.com>
9650
9651         * appdomain.c: If the culture is neutral we set it to "".
9652         
9653 2004-04-29  Jackson Harper  <jackson@ximian.com>
9654
9655         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9656
9657 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9658  
9659         * string-icalls.c: added low overhead function for copying chars
9660         * icall.c: added needed icall for the above function
9661  
9662 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9663
9664         * icall.c: fix return value of get_global_assembly_cache.  Implemented
9665         Environment.GetLogicalDrives.
9666
9667 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
9668
9669         * rand.c: try and talk to egd or prngd
9670         for random bytes if opening devices fail.
9671
9672 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
9673
9674         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9675         alignment for the type using the native alignment of its members 
9676         instead of using klass->min_align.
9677
9678         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9679
9680 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9681
9682         * file-io.c:
9683         * socket-io.c: added check for sys/aio.h.
9684
9685 2004-04-28  Dick Porter  <dick@ximian.com>
9686
9687         * threads.c: Don't abort a thread thats already aborting, when
9688         terminating everything.
9689
9690 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9691
9692         * icall.c: added 2 new async calls for Socket.
9693
9694         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9695         IO on *nix systems.
9696
9697         * threadpool.c: removed unused variable.
9698
9699 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
9700
9701         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9702
9703 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9704
9705         * locales.c: put back string_invariant_tolower () and
9706         string_invariant_toupper ().
9707
9708 2004-04-26 David Waite <mass@akuma.org>
9709
9710         * file-io.h:
9711         * socket-io.h:
9712         * threads.h:
9713         * unicode.h: remove comma from end of enumeration declarations
9714
9715 2004-04-26 David Waite <mass@akuma.org>
9716
9717         * debug-mono-symfile.h:
9718         * decimal.c:
9719         * mono_debug.h:
9720         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9721
9722
9723 2004-04-26  Jackson Harper  <jackson@ximian.com>
9724
9725         * appdomain.c: Increment version number.
9726         
9727 2004-04-26  Jackson Harper  <jackson@ximian.com>
9728
9729         * appdomain.c: Set assembly references public token value when
9730         PublicKeyToken is specified, not the hash_value. Free public token
9731         values when free assembly name data. Previously the public key
9732         token was hex decoded, however we are using hex encoded public key
9733         tokens, so this is not neccasary.
9734         * assembly.c: Lookup assemblies in the gac if their public token
9735         value is set. Add function to allow enabling user gac
9736         lookups. Specify whether or not the assembly was loaded from the
9737         GAC. Compare full assembly names when checking the cache for
9738         assemblies (Temporarily disabled see comment in code). Remove
9739         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9740         specifies trace-loader they get extra info to stdout on the
9741         loading of assemblies.
9742         * image.h: Add a field for an assembly references public token
9743         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9744         whether an assembly has been loaded from the GAC.
9745         * image.c: Remove a corlib -> mscorlib name mapping.
9746         * loader.h: Add function to enable/disable the user gac.
9747         * mono-config.c: Check if the usergac is enabled in the config
9748         file.
9749         * icall.c: New icall to determine whether or not an assembly has
9750         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9751         * tabldefs.h: Add constant for assemblyref flag that specifies a
9752         full public key is used instead of a public token.
9753         * reflection.c: Remove mscorlib -> corlib mappings. Set
9754         PublicTokenValue instead of hash value. This value is a hex
9755         string so it does not need to be expanded.
9756
9757 2004-04-26  Martin Baulig  <martin@ximian.com>
9758
9759         * mono-debug-debugger.c (mono_debugger_initialize): Set
9760         `mono_debugger_initialized' before calling mono_debug_lock().
9761
9762 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
9763
9764         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9765           InternalToUpper/InternalToLower.
9766         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9767           removed invariant culture shortcut.  This is now done in managed code.
9768         * locales.c: (string_invariant_toupper/tolower) removed.
9769
9770 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9771
9772         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9773         Added Poll internal call.
9774
9775         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9776         call for Poll. Select was too heavy for polling a single socket.
9777
9778         * threadpool.[ch]: added mono_threadpool_cleanup.
9779         * threads.c: use it. Don't use Thread_Abort on windows.
9780
9781 2004-04-23  Martin Baulig  <martin@ximian.com>
9782
9783         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9784
9785 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
9786
9787         * icall.c: Registred new icalls for key pair protection and added an
9788         icall for Environment.GetFolderPath on Windows.
9789         * security.c|h: Added new icalls for key pair protection.
9790
9791 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9792
9793         * socket-io.c: don't display the non-supported family warning for known
9794         families. Now this is not displayed on windows when checking support
9795         for IPv4/IPv6.
9796
9797 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9798
9799         * class.c: don't display the layout warning for static fields.
9800
9801 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
9802
9803         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9804         * locales.c, locales.h: Added new icalls for culture-specific
9805         Char.ToLower and Char.ToUpper.
9806
9807 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9808
9809         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9810         by David Waite.
9811
9812 2004-04-20  Martin Baulig  <martin@ximian.com>
9813
9814         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9815         of the type name before passing it to mono_reflection_type_from_name().
9816
9817 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9818
9819         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9820         encodings here. Fixes #56965.
9821
9822 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
9823
9824         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9825         fix test on strstr result not that I can see anything that
9826         relies on the result.
9827
9828 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
9829
9830         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9831         Fixes #57081.
9832
9833         * marshal.c (mono_marshal_get_string_encoding): New helper function.
9834
9835         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9836         function to determine which marshalling to use for strings. Fixes
9837         #56965.
9838
9839         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9840
9841         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9842
9843 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
9844
9845         * icall.c: #include mono-config.h
9846
9847 2004-04-15  Jackson Harper  <jackson@ximian.com>
9848
9849         * culture-info-tables.h: Fix date formats for en-US culture.
9850         
9851 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
9852
9853         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
9854         ThreadPool.SetMinThreads.
9855         * threadpool.c: Implemented ThreadPool.GetMinThreads and
9856         ThreadPool.SetMinThreads.
9857
9858 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9859
9860         * mono-config.c: also load the .config file in the directory
9861         where the assembly was found.
9862
9863 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9864
9865         * assembly.c: load per-assembly config files.
9866         * icall.c: decrapified code to get the config dir and moved to
9867         mono-config.c.
9868         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9869         per-assembly config files. When doing a dll map lookup give precedence
9870         to the per-assembly data.
9871
9872 2004-04-14  Martin Baulig  <martin@ximian.com>
9873
9874         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9875         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9876         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9877
9878         * mono-debugger-debugger.c: While the debugger is locked, remember
9879         whether the symbol tables have changes and send one single
9880         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9881
9882 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
9883
9884         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9885
9886         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
9887         function.
9888
9889         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9890         account when marshalling string arrays. Fixes #56965.
9891
9892 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
9893
9894         * icall.c: Add new icalls mapping for security.
9895         * security.c|h: Add internal calls for WindowsIdentity,
9896         WindowsImpersonationContext and WindowsPrincipal.
9897
9898 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
9899
9900         * class.c: Added comment to ensure the System.MonoDummy class
9901         is removed when no longer necessary
9902
9903 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
9904
9905         * appdomain.c: Pass arguments to the bootstraping exceptions to
9906         minimize JITed methods at boot
9907
9908         * metadata.c (mono_exception_from_name_two_strings): Allow for the
9909         second string to be null.
9910
9911         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9912         Change the protocol to minimize the JIT methods at startup.  Now
9913         it Returns the internal codepage, if the value of "int_code_page"
9914         is 1 at entry, and we can not compute a suitable code page
9915         number, returns the code page as a string.
9916
9917 2004-04-13  Jackson Harper  <jackson@ximian.com>
9918
9919         * culture-info-tables.h: Fix number of decimal digits for all
9920         english locales.
9921
9922 2004-04-13  Jackson Harper  <jackson@ximian.com>
9923
9924         * icall.c: Clairfy out of sync error message. It is not always
9925         your corlib that is out of sync.
9926
9927 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9930         properties when only the set accessor is overriden. Fixes #55874.
9931
9932 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
9933
9934         * assembly.c (mono_assembly_load_references): Make this thread safe.
9935         Fixes #56327.
9936
9937 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
9938
9939         * monosn.c: Add missing initialization calls.
9940
9941 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
9942
9943         * locales.c:
9944         ves_icall_System_Globalization_CultureInfo_construct_number_format
9945         Fix g_assert so it compiles on fussier compilers re int/ptr
9946         mismatch
9947
9948 2004-04-08  Dick Porter  <dick@ximian.com>
9949
9950         * socket-io.h:
9951         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
9952         53992.  Also rearrange the code so that the internal calls return
9953         an error value and exceptions are thrown from managed code.
9954
9955         * icall.c: Add type info to the socket icalls.
9956
9957 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9958
9959         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9960         owes me a beer.
9961
9962 2004-04-07  Martin Baulig  <martin@ximian.com>
9963
9964         * class.c (mono_class_from_generic_parameter): Don't default
9965         `klass->parent' to `mono_defaults.object_type'.
9966
9967 2004-04-07  Martin Baulig  <martin@ximian.com>
9968
9969         * reflection.c (mono_reflection_initialize_generic_parameter): Set
9970         `param->pklass->reflection_info'.       
9971
9972 2004-04-07  Jackson Harper  <jackson@ximian.com>
9973
9974         * culture-info-tables.h: Fix date separator symbol.
9975         
9976 2004-04-07  Martin Baulig  <martin@ximian.com>
9977
9978         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9979         from System.Type to System.MonoType.
9980
9981 2004-04-07  Martin Baulig  <martin@ximian.com>
9982
9983         * reflection.h
9984         (MonoReflectionGenericParam): Added `has_reference_type' and
9985         `has_value_type' fields.
9986
9987         * reflection.c (mono_image_get_generic_param_info): Encode the
9988         correct flags if we have the `class' or `struct' constraint.
9989
9990 2004-04-07  Martin Baulig  <martin@ximian.com>
9991
9992         * reflection.h
9993         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9994
9995 2004-04-07  Jackson Harper  <jackson@ximian.com>
9996
9997         * appdomain.c: Revert extra patches, just wanted to bump the
9998         version number.
9999         
10000 2004-04-07  Jackson Harper  <jackson@ximian.com>
10001
10002         * Makefile.am: Add culture-info private headers.
10003         * icall.c: Add new icalls for contructing locales.
10004         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10005         * locales.h: Declare new culture info construction methods.
10006         * object.h: Add new fields used to avoid the CultureMap to
10007         MonoCultureInfo.
10008         * culture-info.h: Definition of structs used in the culture info
10009         tables.
10010         * culture-info-tables.h: Autogenerated tables that contain culture
10011         info data. This file was generated with the locale-builder tool.
10012         * appdomain.c: Incement corlib version number.
10013         
10014 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
10015
10016         * appdomain.c: (mono_runtime_init) move mono_thread_init
10017         to before mono_object_new calls so critical sections
10018         are initialized before use.
10019
10020 2004-04-07  Martin Baulig  <martin@ximian.com>
10021
10022         * icall.c
10023         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10024         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10025         (ves_icall_MonoGenericParam_initialize): Removed.
10026         (monogenericparam_icalls): Removed.
10027         (generictypeparambuilder_icalls): Added new table for
10028         System.Reflection.Emit.GenericTypeParameterBuilder.
10029
10030         * reflection.c
10031         (mono_reflection_define_generic_parameter): Removed.
10032         (mono_reflection_initialize_generic_parameter): This is now called
10033         from GenericTypeParameterBuilder's .ctor.
10034
10035 2004-04-06  Martin Baulig  <martin@ximian.com>
10036
10037         * class.c (mono_class_init): Don't inflate nested classes in a
10038         generic instance.
10039         (mono_type_get_name_recurse): Include the generic arguments for
10040         generic instances and generic type declarations.
10041         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10042         (_mono_class_get_instantiation_name): Removed.
10043         (mono_class_create_generic): Always use `gklass->name' as our name.
10044
10045         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10046
10047         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10048         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10049         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10050         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10051         closed generic methods here.
10052
10053         * reflection.c
10054         (mono_reflection_generic_inst_get_nested_types): Removed.
10055         (inflate_mono_method): Copy the generic parameters from the
10056         MonoMethodHeader into out MonoGenericMethod.
10057
10058 2004-04-06  Martin Baulig  <martin@ximian.com>
10059
10060         * row-indexes.h
10061         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10062
10063         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10064
10065         * reflection.c (build_compressed_metadata): If we have any entries
10066         in the GenericParam, MethodSpec or GenericParamConstraint tables,
10067         set the header version to 1.1.
10068
10069 2004-04-06  Martin Baulig  <martin@ximian.com>
10070
10071         * class.c (mono_class_init): If we're a generic instance,
10072         initialize our nested classes, too.
10073         (_mono_class_get_instantiation_name): Deal with the new `!%d'
10074         suffix. 
10075
10076 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10077
10078         * process.c: quote the argument passed to the shell on windows.
10079
10080 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10081
10082         * threads.c (mono_alloc_special_static_data): Allow this to be
10083         called during startup.
10084
10085 2004-04-02  Martin Baulig  <martin@ximian.com>
10086
10087         * icall.c
10088         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10089
10090 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
10091
10092         * icall.c: Fix build.
10093
10094 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
10095
10096         * Makefile.am: Added security.c|h.
10097         * icall.c: Added icall for get_UserName;
10098         * security.c: New file for security related icalls. Added function
10099         get_UserName for System.Environment (fix #56144).
10100         * security.h: New. Header file for security.c
10101
10102 2004-04-02  Dick Porter  <dick@ximian.com>
10103
10104         * icall.c: Deleted the icalls that were obsoleted some time ago
10105         by the ICU string code, and which were mixed into the icall
10106         rearranging.  Fixes bug 55969.
10107
10108         * string-icalls.h: 
10109         * string-icalls.c: Deleted the code that those icalls reference.
10110
10111 2004-04-01  Martin Baulig  <martin@ximian.com>
10112
10113         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10114
10115         * class.c (mono_class_from_generic_parameter): Don't set 
10116         TYPE_ATTRIBUTE_INTERFACE.
10117         (my_mono_class_from_generic_parameter): Likewise.
10118
10119 2004-04-01  Martin Baulig  <martin@ximian.com>
10120
10121         * loader.c (find_method): Added an optional `MonoClass *ic'
10122         argument to search in a specific interface.
10123         (mono_get_method_constrained): New public function.
10124
10125 2004-04-01  Martin Baulig  <martin@ximian.com>
10126
10127         * reflection.c (mono_image_get_generic_field_token): Use the
10128         `handleref' cache here.
10129
10130 2004-04-01  Martin Baulig  <martin@ximian.com>
10131
10132         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10133
10134         * reflection.c (create_generic_typespec): Use the `typespec' hash
10135         here, not the `typeref' one.    
10136
10137 2004-04-01  Martin Baulig  <martin@ximian.com>
10138
10139         * class.c (mono_class_inflate_generic_type): Moved the
10140         functionality into a new static inflate_generic_type() which
10141         returns NULL if it didn't do anything.  Only increment the
10142         `mono_stats.inflated_type_count' if we actually inflated
10143         something.
10144         (mono_class_get_full): Check the classes type to see whether we
10145         need to inflate it; also inflate MONO_TYPE_(M)VAR.
10146
10147 2004-04-01  Jackson Harper  <jackson@ximian.com>
10148
10149         * reflection.c: Set culture for assembly references.
10150         
10151 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
10152
10153         * reflection.[ch], icall.[ch], Fix support for pinning variables.
10154
10155 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10156
10157         * assembly.c:
10158         (do_mono_assembly_open): the critical section also covers
10159         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10160
10161 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10162
10163         * threads.c:
10164         (mono_manage_threads): abort the background threads when finishing.
10165         Fixes bug #47232.
10166
10167 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10168
10169         * gc.c: only close the done_event handle if there was no timeout.
10170         C-ified comments.
10171
10172 2004-03-30  Martin Baulig  <martin@ximian.com>
10173
10174         * icall.c (icall_entries): It's called "System.Activator", not
10175         "System.Activation".    
10176
10177 2004-03-30  Martin Baulig  <martin@ximian.com>
10178
10179         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10180         (mono_class_create_from_typespec): Likewise.
10181
10182 2004-03-30  Martin Baulig  <martin@ximian.com>
10183
10184         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10185         `has_ctor_constraint' and `initialized'.
10186
10187 2004-03-30  Martin Baulig  <martin@ximian.com>
10188
10189         * reflection.c (encode_new_constraint): New static function to add
10190         the constructor constraint attribute to a type parameter.
10191         (encode_constraints): Call encode_new_constraint() if necessary.
10192
10193         * reflection.h
10194         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10195
10196         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10197         
10198 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
10199
10200         * reflection.c, icall.c: add support for pinning variables. 
10201
10202 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
10203
10204         * marshal.c (mono_marshal_get_managed_wrapper):
10205         init bool local with zero rather than null.
10206
10207 2004-03-29  Martin Baulig  <martin@ximian.com>
10208
10209         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10210         the "official" behavior here.
10211         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10212
10213 2004-03-29  Martin Baulig  <martin@ximian.com>
10214
10215         * icall.c: Reflect latest API changes.
10216
10217 2004-03-29  Martin Baulig  <martin@ximian.com>
10218
10219         * loader.c (mono_get_method_from_token): Also call
10220         mono_metadata_load_generic_params () for abstract and interface
10221         methods; replace the type arguments in the method signature with
10222         the ones which are loaded from the metadata.
10223
10224 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
10225
10226         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10227         of the lock is not the current thread. MS.NET don't do it, in spite of
10228         what the documentation says. See bug #56157.
10229
10230 2004-03-28  Martin Baulig  <martin@ximian.com>
10231
10232         * class.c (mono_class_init): Don't call init_properties() and
10233         init_events() for generic instances; set `prop->parent' when
10234         inflating properties.
10235
10236         * reflection.c (mono_generic_inst_get_object): Call
10237         `mono_class_init (ginst->klass)'.
10238         (mono_type_get_object): Only create a MonoGenericInst if your
10239         generic type is a TypeBuilder.
10240         (do_mono_reflection_bind_generic_parameters): Only set
10241         `ginst->is_dynamic' if our generic type is a TypeBuilder.
10242
10243 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
10244
10245         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10246         Fixes #56091.
10247
10248 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10249
10250         * icall.c: added Kill_internal icall.
10251         * process.[ch]: added Kill_internal icall.
10252
10253 2004-03-25  Martin Baulig  <martin@ximian.com>
10254
10255         * class.h (MonoStats): Added `generic_instance_count',
10256         `inflated_method_count', `inflated_type_count' and
10257         `generics_metadata_size'.       
10258
10259 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10260
10261         * reflection.c: no warnings now.
10262
10263 2004-03-25  Martin Baulig  <martin@ximian.com>
10264
10265         * class.c (mono_class_get_full): New public function; does a
10266         mono_class_get(), but also takes a `MonoGenericContext *'.
10267
10268         * loader.c (mono_field_from_memberref): Renamed to
10269         `field_from_memberref', made static and added `MonoGenericContext *'
10270         argument.
10271         (mono_field_from_token): Added `MonoGenericInst *' argument.
10272         (method_from_memberef): Likewise.
10273         (mono_get_method_from_token): Likewise.
10274         (mono_get_method_full): New public function; does a
10275         mono_get_method(), but also takes a `MonoGenericContext *'.
10276
10277         * verify.c (mono_method_verify): Get the method's generic context
10278         and pass it to mono_field_from_token(), mono_get_method_full() and
10279         mono_class_get_full().
10280
10281 2004-03-25  Martin Baulig  <martin@ximian.com>
10282
10283         * class.c (mono_class_inflate_generic_type): Take a
10284         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10285         `MonoGenericMethod *'.
10286
10287 2004-03-25  Martin Baulig  <martin@ximian.com>
10288
10289         * loader.h (MonoMethodInflated): Store the MonoGenericContext
10290         instead of the MonoGenericMethod here.
10291
10292 2004-03-25  Martin Baulig  <martin@ximian.com>
10293
10294         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10295         each time we create a new MonoGenericInst, we also create a new
10296         context which points back to us.
10297
10298         * class.c (inflate_method): Use `ginst->context' instead of
10299         creating a new context.
10300
10301         * loader.c (method_from_memberref): Use
10302         `klass->generic_inst->context' instead of creating a new context.
10303
10304 2004-03-25  Martin Baulig  <martin@ximian.com>
10305
10306         * class.h (MonoGenericContext): New struct.
10307         (MonoGenericMethod): Removed `generic_inst'.
10308
10309         * class.c (mono_class_inflate_generic_method): Take a
10310         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10311
10312 2004-03-25  Martin Baulig  <martin@ximian.com>
10313
10314         * loader.h (MonoMethodInflated): New typedef.
10315
10316         * metadata.h (MonoMethodSignature): Removed `gen_method', make
10317         `generic_param_count' consume just 30 bits, added `is_inflated'
10318         and `has_type_parameters' flags (one bit each).
10319
10320         * class.c (mono_class_inflate_generic_method): Create a
10321         MonoMethodInflated instead of a MonoMethodNormal and set
10322         `is_inflated' in the method signature.
10323
10324         * class.h (MonoGenericMethod): Removed `generic_method'.
10325
10326 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
10327
10328         * image.c: Make sure the name of a MonoImage is always an absolute path.
10329           This fixes bug #54415.
10330
10331 2004-03-24  Martin Baulig  <martin@ximian.com>
10332
10333         * class.c (mono_class_setup_vtable): If we're a generic instance,
10334         use our generic type's vtable size.
10335
10336 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
10337
10338         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10339         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
10340         problems.
10341
10342 2004-03-23  Martin Baulig  <martin@ximian.com>
10343
10344         * class.h (MonoDynamicGenericInst): Added `int count_events' and
10345         `MonoEvent *events'.
10346
10347         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10348         (typebuilder_icalls): Added "get_event_info"; calls
10349         mono_reflection_event_builder_get_event_info(). 
10350
10351         * reflection.c (mono_reflection_generic_inst_initialize): Added
10352         `MonoArray *events'.
10353         (mono_reflection_event_builder_get_event_info): New function.
10354
10355 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
10356
10357         * object.h: add mono_type_initialization_init
10358
10359         * object.c (mono_runtime_class_init): 
10360         implement class constructor synchronization rules
10361         to cope with threading issues.  
10362         add mono_type_initialization_init
10363
10364         * appdomain.c (mono_runtime_init): call 
10365         mono_type_initialization_init
10366
10367         * class.h: removing initializing field from MonoVTable
10368
10369 2004-03-23  Martin Baulig  <martin@ximian.com>
10370
10371         * class.c (my_mono_class_from_generic_parameter): Use
10372         `param->name' if it's not NULL. 
10373
10374 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
10375
10376         * class.c: do not insert non-virtual methods in the vtable.
10377         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10378         that means the method is non-virtual. This never would have
10379         happened before.
10380
10381 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
10382
10383         * profiler.c: Added lock for accessing coverage_hash.
10384
10385 2004-03-22  Martin Baulig  <martin@ximian.com>
10386
10387         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10388         `method->method->signature->generic_param_count != 0' to make it
10389         work for interface methods.
10390
10391 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10392
10393         * process.c: quote the string passed to the shell using g_shell_quote.
10394
10395 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10396
10397         * threads.c:
10398         (mono_threads_manage): don't remove the finalizer thread and self
10399         from the threads hash table so that mono_thread_manage can be called
10400         more than once.
10401
10402 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10403
10404         * process.c: quote the arguments when UseShellExecute is true. Fixes
10405         bug #55790.
10406
10407 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10408
10409         * threads.c: set mono_thread_detach as a cleanup routine for every
10410         thread. This way it's always executed upon thread termination, either
10411         aborted or finished normally. No more xsp hangs!
10412
10413 2004-03-17  Martin Baulig  <martin@ximian.com>
10414
10415         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10416         `int count_nested' and a `MonoType **nested'.
10417
10418         * reflection.c (mono_reflection_bind_generic_parameters): Moved
10419         most of the functionality into a new static
10420         do_mono_reflection_bind_generic_parameters() and don't take a
10421         `MonoType *nested_in' argument any more.  Don't compute nested
10422         types here.
10423         (mono_reflection_generic_inst_get_nested_types): New public method
10424         to get nested types.
10425
10426         * class.c (mono_class_create_generic): Set `klass->nested_in' if
10427         we're a nested class.
10428
10429         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10430         mono_reflection_generic_inst_get_nested_types() to compute the
10431         nested types.
10432
10433 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10434
10435         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10436         descriptive error message under windows.
10437         
10438 2004-03-17  Martin Baulig  <martin@ximian.com>
10439
10440         * class.c (dup_type): Added `const MonoType *original' argument;
10441         copy the attrs from the original type.
10442
10443 2004-03-17  Martin Baulig  <martin@ximian.com>
10444
10445         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10446         `m->generic_inst_cache' here.
10447
10448 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10449
10450         * exception.h exception.c: Add stack_overflow_exception.
10451
10452 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10453
10454         * threadpool.c:
10455         (overlapped_callback): call SetEvent *after* invoking the callback.
10456         No need to call CloseHandle.
10457
10458 2004-03-16  Martin Baulig  <martin@ximian.com>
10459
10460         * reflection.c (mono_image_get_fieldref_token): Take a
10461         `MonoReflectionField *' instead of a `MonoClassField *' and a
10462         `MonoClass *'; store the `MonoReflectionField *' in the hash.
10463
10464 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10465
10466         * appdomain.c: don't add the culture to the filename we're looking for
10467         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10468
10469 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10470
10471         * locales.c: don't ignore symbols when doing case insensitive compares.
10472         Thanks Dick! Fixes bug #54046.
10473
10474         * threads.c: surround 'threads' usage with enter/leave in
10475         mono_thread_manage.
10476
10477 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
10478
10479         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
10480         implicitly marshalled as [Out]. Fixes #55450.
10481
10482         (mono_marshal_get_runtime_invoke): Zero out the result if there is
10483         an exception.
10484
10485 2004-03-16  Martin Baulig  <martin@ximian.com>
10486
10487         * class.c (mono_class_from_generic_parameter): Use the actual
10488         parameter name. 
10489
10490 2004-03-16  Martin Baulig  <martin@ximian.com>
10491
10492         * reflection.c (type_get_signature_size): New static function.
10493         Compues the size of the type in a method signature.
10494         (method_get_signature_size): New static function; calls
10495         type_get_signature_size() to compute the actual size of the
10496         method's signature.
10497         (method_encode_signature): Use method_get_signature_size() to get
10498         the signature's size rather than using `nparams * 10'.
10499
10500 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10501
10502         * file-io.h: define here WapiOverlapped on windows. I don't want the
10503         regular OVERLAPPED one.
10504
10505         * file-io.c:
10506         * threadpool.c: somehow, BindIoCompletionCallback is not found.
10507         Disabling AIO on windows.
10508
10509 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10510
10511         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10512         bug #55385.
10513
10514 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10515
10516         * appdomain.c: upgraded corlib version.
10517
10518         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10519         and BeginWrite. Allow opening files for asynchrnous operations.
10520
10521         * file-io.h: new struct that maps FileStreamAsyncResult.
10522         * icall.c: added new icalls.
10523         * process.[ch]: support setting child process environment variables
10524         and use the SHELL or COMSPEC when UseShellExecute is true.
10525
10526         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10527         callback for async. IO is here and also BindHandle.
10528
10529         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10530         from here.
10531
10532 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
10533
10534         * reflection.c (create_custom_attr): Allow len == 0.
10535
10536         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10537         computation on big-endian machines.
10538
10539 2004-03-13  Martin Baulig  <martin@ximian.com>
10540
10541         * class.h (MonoGenericInst): Added `int count_ifaces'.
10542
10543         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10544         `ginst->count_ifaces' instead `klass->interface_count' since we
10545         may get called before the vtable is created.
10546
10547         * loader.c (mono_method_get_param_names): If we're a generic
10548         instance, return and don't initialize the class.
10549
10550         * reflection.c (mono_reflection_setup_generic_class): Don't call
10551         ensure_runtime_vtable().
10552         (mono_reflection_bind_generic_parameters): Set
10553         `ginst->count_ifaces'.
10554
10555 2004-03-11  Jackson Harper <jackson@ximian.com>
10556
10557         * icall.c:
10558         * unicode.c:
10559         * unicode.h: Remove unused System.Char icalls.
10560         
10561 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
10562
10563         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10564         code when we P/Invoke the first library in Windows.Forms, instead
10565         of when we first open the assembly.
10566
10567         * assembly.c: Drop the lookup from here.
10568
10569 2004-03-10  Martin Baulig  <martin@ximian.com>
10570
10571         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10572         class for properties, fields and events.  Finally fixes #54945.
10573
10574 2004-03-10  Martin Baulig  <martin@ximian.com>
10575
10576         * metadata.c (mono_metadata_class_equal): New static function;
10577         checks whether two generic instances or two generic parameters are
10578         equal.
10579         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10580         compare classes.        
10581
10582 2004-03-10  Martin Baulig  <martin@ximian.com>
10583
10584         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10585
10586         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10587         argument and write it into the `reflection_info' field.
10588
10589         * icall.c
10590         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10591         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10592
10593 2004-03-09  Jackson Harper  <jackson@ximian.com>
10594
10595         * char-conversions.h: use 8 bits for numeric data its all we need
10596         * icall.c: numeric data is only 8 bits now.
10597
10598 2004-03-09  Martin Baulig  <martin@ximian.com>
10599
10600         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10601
10602         * class.c (init_properties, init_events): Initialize the new
10603         `parent' field.
10604
10605         * reflection.c (typebuilder_setup_properties): Likewise.
10606         (typebuilder_setup_events): Likewise.
10607
10608         * reflection.h (MonoEventInfo): Replaced `parent with
10609         `declaring_type' and `reflected_type'.
10610
10611         * icall.c (ves_icall_get_property_info): Distinguish between
10612         declaring and reflected type.
10613         (ves_icall_get_event_info): Likewise.
10614
10615 2004-03-09  Martin Baulig  <martin@ximian.com>
10616
10617         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10618         (ves_icall_Type_GetField): Correctly set field->klass.
10619
10620 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10621
10622         * loader.h: Fix warning.
10623
10624 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
10625
10626         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10627         library routine if present.  Notice that it will still continue
10628         executing even if its missing, for those working on the Gtk#
10629         edition of Windows.Forms.
10630
10631         * assembly.c (do_mono_assembly_open): If loading the
10632         System.Windows.Forms call mono_loader_wini_init.
10633
10634 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10635
10636         * class.h: Added MonoRemoteClass struct.
10637         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10638         function for MonoStrings.
10639         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10640         Added internal call for getting the proxy type.
10641         * marshal.c: Get the type of transparent proxies from its remote_class.
10642         Added methods that generate the IL for type checks and casts:
10643         mono_marshal_get_isinst, mono_marshal_get_castclass, 
10644         mono_marshal_get_proxy_cancast.
10645         * marshal.h: Declaration of the previous new methods.
10646         * object.c: Added new moethods for creating and updating MonoRemoteClass
10647         instances: mono_remote_class, mono_upgrade_remote_class, 
10648         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10649         * verify.c: FIx transparent_proxy_fields layout.
10650         * appdomain.c: Bump corlib version.
10651
10652 2004-03-04  Jackson Harper  <jackson@ximian.com>
10653
10654         * icall.c: Add icall to access char conversion tables.
10655         * char-conversions.h: Character conversion tables.
10656         * Makefile.am: Add char-conversions.h private header file.
10657         
10658 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
10659
10660         * appdomain.c (unload_thread_main): Increase unloading timeout to
10661         10 sec as a temporary workaround for Nant problems.
10662
10663 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
10664
10665         * gc.c: Add checks for GC_enable and GC_disable.
10666
10667         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10668         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
10669         (bug #54988).
10670         
10671 2004-02-27  Martin Baulig  <martin@ximian.com>
10672
10673         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10674         `MonoReflectionType *' instead of a `MonoType *'.
10675
10676 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10677
10678         * gc.c (run_finalize): Avoid finalizing the object representing the
10679         finalizer thread.
10680         (finalizer_thread): Fix warning.
10681
10682 2004-02-25  Martin Baulig  <martin@ximian.com>
10683
10684         * class.c (_mono_class_get_instantiation_name): Added `int offset'
10685         argument for nested types.
10686         (mono_class_create_generic): Added support for nested generictypes.
10687
10688         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10689         `GList *nested'.
10690
10691         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10692
10693         * reflection.c (method_encode_signature): Increase the minimum
10694         value of `size' from 10 to 11.
10695         (mono_reflection_bind_generic_parameters): Take `int type_argc'
10696         and `MonoType **types' arguments instead of the `MonoArray
10697         *types'; added `MonoType *nested_in'.  Recursively instantiate
10698         nested classes. 
10699
10700 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10701
10702         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
10703         stack_overflow_ex members which are used by exception handling.
10704
10705         * appdomain.c (mono_runtime_init): Initialize the new members.
10706
10707         * gc.c (mono_gc_enable): New helper function.
10708         * gc.c (mono_gc_disable): New helper function.
10709
10710 2004-02-23  Martin Baulig  <martin@ximian.com>
10711
10712         * icall.c: I must have been really stupid - make it actually work
10713         this time ;-)
10714
10715 2004-02-23  Martin Baulig  <martin@ximian.com>
10716
10717         * loader.c (method_from_memberref): Only inflate the method if
10718         it's in another klass.
10719
10720 2004-02-23  Martin Baulig  <martin@ximian.com>
10721
10722         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10723         (mono_class_init): If we're a generic instance and an interface,
10724         compute `class->interface_id'; also create `class->interfaces'
10725         here and inflate them.
10726
10727         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10728         `ginst->is_open'.
10729         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10730
10731         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10732
10733 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
10734
10735         * reflection.c (method_encode_code): Improved the error message
10736         generated by the exception.
10737
10738 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10739
10740         * icall.c: Martin did not do what he said in the ChangeLog for
10741         2004-02-18, but put back the changes for properties and events.
10742         Commenting those changes out again and adding comment to bug #54518.
10743         
10744         * process.c: removed warning.
10745
10746 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
10747
10748         * marshal.c (emit_struct_conv): Print an error message instead of
10749         asserting when a type does not have the StructLayout attribute.
10750
10751 2004-02-20  Martin Baulig  <martin@ximian.com>
10752
10753         * reflection.c (mono_type_get_object): Also use the cache for
10754         generic instances.
10755         (mono_reflection_bind_generic_parameters): Always compute
10756         `ginst->ifaces'.        
10757
10758 2004-02-20  Martin Baulig  <martin@ximian.com>
10759
10760         * class.h (MonoGenericMethod): Removed `klass'.
10761
10762         * class.c (mono_class_inflate_generic_method): Added `MonoClass
10763         *klass' argument.
10764
10765 2004-02-20  Martin Baulig  <martin@ximian.com>
10766
10767         * reflection.c (method_encode_methodspec): Actually use the
10768         uninflated signature for the memberref.
10769
10770 2004-02-20  Martin Baulig  <martin@ximian.com>
10771
10772         * class.h (MonoGenericMethod): Removed `declaring'.
10773
10774         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10775         is NULL, compute it here.
10776
10777 2004-02-20  Martin Baulig  <martin@ximian.com>
10778
10779         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10780
10781         * metadata.c (mono_metadata_generic_inst_hash): New method.
10782         (mono_metadata_generic_inst_equal): New method.
10783
10784         * reflection.c (mono_reflection_bind_generic_parameters): Use the
10785         `klass->image->generic_inst_cache' cache to avoid creating
10786         duplicate MonoGenericInst's.
10787
10788         * class.c (mono_class_inflate_generic_type): Use the cache.
10789
10790 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10791
10792         * object.c: fixed gc descriptor calculation for embedded valuetypes.
10793
10794 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10795
10796         * icall.c: added Socket.WSAIoctl icall.
10797
10798         * socket-io.[ch]: implemented
10799         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10800
10801 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
10802
10803         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10804
10805 2004-02-18  Urs C Muff  <umuff@quark.com>
10806
10807         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10808         this work on PPC and other big-endian architectures.
10809
10810         * debug-mono-symfile.h: Prepended the names of all the `guint32'
10811         fields with an underscore to make sure they're only accessed by
10812         the read32() macro.
10813
10814 2004-02-18  Martin Baulig  <martin@ximian.com>
10815
10816         * icall.c: Put the klass->refclass changes back for methods and
10817         fields, but not for properties and events.  We're currently not
10818         distinguishing between DeclaringType and ReflectedType for
10819         properties and events, that's what caused the regressions.
10820
10821 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10822
10823         * object.c:
10824         (mono_async_result_new): the handle can be NULL.
10825
10826         * threadpool.c: Use an event instead of a semaphore, don't initialize
10827         it until needed. This saves quite a few semaphores from being created
10828         when using the threadpool.
10829
10830 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
10831
10832         * object.c (mono_string_is_interned_lookup): Fix interning of long
10833         strings. Fixes #54473.
10834
10835         * domain.c (ldstr_equal): Optimize if the two strings are equal.
10836
10837         * icall.c: Revert the klass->refclass changes since they introduce
10838         regressions (bug #54518).
10839
10840 2004-02-18  Martin Baulig  <martin@ximian.com>
10841
10842         * class.c (mono_class_init): If we're a generic instance and don't
10843         come from a TypeBuilder, inflate our members here.
10844         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10845         (mono_class_create_generic): New public method.
10846         (mono_class_initialize_generic): Removed.
10847         (get_instantiation_name): Renamed to
10848         _mono_class_get_instantiation_name() and made it public.
10849
10850 2004-02-18  Martin Baulig  <martin@ximian.com>
10851
10852         * class.c (mono_class_inflate_generic_type): Clear the new
10853         instance's `nginst->klass' when inflating a generic instance.
10854         (mono_class_is_subclass_of): Added (basic) support for generic
10855         instances.
10856
10857 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10858
10859         * appdomain.h, domain.c: use a MonoCodeManager instead of a
10860         MonoMempool to hold compiled native code.
10861
10862 2004-02-17  Martin Baulig  <martin@ximian.com>
10863
10864         * class.h (MonoDynamicGenericInst): Added `count_properties' and
10865         `properties'.
10866
10867         * reflection.c (mono_reflection_generic_inst_initialize): Added
10868         `MonoArray *properties' argument.
10869
10870         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
10871
10872 2004-02-17  Martin Baulig  <martin@ximian.com>
10873
10874         * icall.c (ves_icall_Type_GetFields): Renamed to
10875         ves_icall_Type_GetFields_internal() and added a
10876         `MonoReflectionType *rtype' argument; pass it to
10877         mono_field_get_object() to set the field's "reflected" type.
10878         (ves_icall_Type_GetConstructors): Likewise.
10879         (ves_icall_Type_GetEvents): Likewise.
10880         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10881         argument; pass it to mono_method_get_object() to set the method's
10882         "reflected" type.       
10883
10884 2004-02-17  Martin Baulig  <martin@ximian.com>
10885
10886         * class.h (MonoDynamicGenericInst): New type.
10887         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10888
10889         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10890         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10891         (ves_icall_MonoGenericInst_GetFields): New interncall.
10892
10893         * class.c (mono_class_from_generic): Don't call
10894         mono_class_initialize_generic() if this is a dynamic instance;
10895         ie. it's being created from a TypeBuilder.
10896         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10897         `class->byval_arg.type'.
10898
10899         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10900         to `inflate_method' and made static.
10901         (mono_reflection_inflate_field): Removed.
10902         (mono_reflection_generic_inst_initialize): New public method.
10903
10904         * reflection.h (MonoReflectionGenericInst): Removed `methods',
10905         `ctors' and `fields'; added `initialized'.
10906
10907 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
10908
10909         * debug-helpers.c (mono_method_full_name): Fix output for empty
10910         namespaces.
10911
10912 2004-02-12  Martin Baulig  <martin@ximian.com>
10913
10914         * class.h (MonoClassField): Added `MonoType *generic_type'.
10915
10916         * reflection.c (mono_image_get_fieldref_token): Added support for
10917         instantiated generic types.
10918         (field_encode_inflated_field): Removed.
10919         (mono_image_get_inflated_field_token): Removed.
10920         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10921
10922         * reflection.h (MonoReflectionInflatedField): Removed.
10923
10924 2004-02-12  Martin Baulig  <martin@ximian.com>
10925
10926         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10927         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10928
10929         * reflection.c (mono_image_get_methodspec_token): Take a
10930         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10931         (mono_image_create_token): Check whether we have a
10932         `method->signature->gen_method' and call
10933         mono_image_get_methodspec_token() if appropriate.
10934         (inflated_method_get_object): Removed.
10935         (mono_reflection_bind_generic_method_parameters): Return a
10936         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10937         (mono_reflection_inflate_method_or_ctor): Likewise.
10938
10939         * reflection.h (MonoReflectionInflatedMethod): Removed.
10940
10941 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
10942
10943         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10944         for custom valuetype marshalling.
10945
10946         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10947
10948 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10949
10950         * icall.c: fixed WSAGetLastError_internal name.
10951
10952 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
10953
10954         * threads.c (mono_thread_attach): Allow this to be called multiple
10955         times for a thread.
10956         
10957         * threads.c (build_wait_tids): Do not wait for ourselves.
10958
10959         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
10960         appdomain list is empty.
10961
10962         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10963         memory returned by mono_string_builder_to_utf16, since it points into
10964         managed memory. Thanks to Bernie Solomon for noticing this.
10965
10966         * icall.c: Add AppDomainSetup icalls.
10967
10968         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10969
10970         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10971         types.
10972
10973         * reflection.c (reflection_methodbuilder_to_mono_method): Save
10974         custom attributes to the method_aux struct. Also fix array indexes etc.
10975
10976         * loader.c (mono_method_get_param_names): Make dynamic case work again.
10977         
10978 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10979
10980         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10981         (both static and runtime) and reduce startup time.
10982
10983 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
10984
10985         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10986         AsAny marshalling conversion instead of crashing.
10987
10988         * marshal.c: Fix warnings.
10989
10990 2004-02-09  Martin Baulig  <martin@ximian.com>
10991
10992         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10993
10994         * reflection.h (MonoReflectionInflatedMethod): Removed the
10995         `declaring' field, it's now in the unmanaged MonoGenericMethod.
10996
10997         * reflection.c (method_encode_methodspec): Removed the `method'
10998         argument; we get it from `gmethod->declaring'.
10999         (inflated_method_get_object): Removed the `declaring' argument.
11000
11001 2004-02-09  Martin Baulig  <martin@ximian.com>
11002
11003         * class.h (MonoGenericMethod): New type.
11004         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11005         `generic_method'.
11006
11007         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11008         a `MonoGenericMethod *gen_method' one.
11009
11010         * class.c (mono_class_inflate_generic_type): Take an additional
11011         `MonoGenericMethod * argument.  This is only non-NULL if we're
11012         inflating types for a generic method.   
11013         (mono_class_inflate_generic_signature): Renamed to
11014         inflate_generic_signature() and made static; take a
11015         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11016         (inflate_generic_header): Take a `MonoGenericMethod *' argument
11017         instead of a `MonoGenericInst *' one.
11018         (mono_class_inflate_generic_method): Likewise.
11019
11020         * reflection.c (encode_generic_method_sig): Take a
11021         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11022         (method_encode_methodspec): Likewise.
11023         (inflated_method_get_object): Likewise. 
11024
11025         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11026         field with a `MonoGenericMethod *gmethod' one.  
11027
11028 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
11029
11030         * class.h (mono_class_has_parent): add parens to expansion
11031         so you can ! this.
11032
11033 2004-02-08  Martin Baulig  <martin@ximian.com>
11034
11035         * image.h (MonoImage): Removed `generics_cache'.
11036
11037         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11038         instead of a `MonoType *' argument; removed the `inflate_methods'
11039         argument.  Don't inflate methods here.
11040
11041         * loader.c (find_method): If it's a generic instance, call
11042         mono_class_init() on the `sclass->generic_inst->generic_type'.
11043
11044         * metadata.c (mono_type_size): Make this work on uninitialized
11045         generic instances; call it on the `ginst->generic_type's class.
11046
11047         * reflection.c (mono_reflection_bind_generic_parameters): Call
11048         mono_class_from_generic() to create the `ginst->klass'.
11049
11050 2004-02-08  Martin Baulig  <martin@ximian.com>
11051
11052         * class.h (MonoClass): Changed type of `generic_inst' from
11053         `MonoType *' to `MonoGenericInst *'.
11054
11055 2004-02-08  Martin Baulig  <martin@ximian.com>
11056
11057         * icall.c (ves_icall_Type_BindGenericParameters): Just call
11058         mono_type_get_object(), this is now creating a `MonoGenericInst'
11059         for MONO_TYPE_GENERICINST.
11060         (ves_icall_MonoGenericInst_GetParentType): Likewise.
11061         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11062
11063         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11064         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11065         (inflated_method_get_object): Added `MonoClass *refclass' argument.
11066         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11067         and reflected type.
11068
11069         * reflection.h (MonoReflectionInflatedMethod): Removed
11070         `declaring_type' and `reflected_type'.
11071
11072 2004-02-08  Martin Baulig  <martin@ximian.com>
11073
11074         * class.h (MonoGenericInst): Added `MonoType *parent' and
11075         `MonoType **ifaces'.
11076
11077         * reflection.h (MonoReflectionGenericInst): Removed `klass',
11078         `parent' and `interfaces'.
11079
11080         * reflection.c (mono_reflection_bind_generic_parameters): Take a
11081         `MonoType *' argument and return a `MonoType *'.
11082
11083         * icall.c
11084         (ves_icall_MonoGenericInst_GetParentType): New interncall.
11085         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
11086
11087 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11088
11089         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11090         valuetype marshalling.
11091
11092 2004-02-06  Martin Baulig  <martin@ximian.com>
11093
11094         * class.c
11095         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11096         (my_mono_class_from_generic_parameter): Likewise.
11097
11098 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11099
11100         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11101         contents of the symbol files lazily.
11102
11103         * object.h (MonoThread): Add 'name' and 'name_len' fields.
11104
11105         * threads.h threads.c icall.c: New icalls for getting and setting the
11106         threads name.
11107
11108 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
11109
11110         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
11111         Raise an exception when the domain is not found.
11112
11113 2004-02-03  Martin Baulig  <martin@ximian.com>
11114
11115         * reflection.c (mono_image_get_methodspec_token): Use the
11116         uninflated signature; fixes gen-33.
11117
11118 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11119
11120         * gc.c threads.c: Make the finalizer thread a normal managed thread so
11121         the finalizer code can use thread functionality.
11122
11123         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
11124         the finalizer thread.
11125
11126         * threads.c: Make some functions more robust.
11127
11128         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11129
11130         * metadata.h: Add new marshalling conventions.
11131
11132         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11133         stringbuilder marshalling. Fixes #53700.
11134
11135         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11136
11137         * reflection.c (mono_image_get_type_info): Save declarative security
11138         info.
11139
11140         * reflection.c (mono_image_get_field_info): Handle uninitialized 
11141         unmanaged fields as well.
11142
11143         * appdomain.c: Bump corlib version.
11144
11145 2004-02-01  Martin Baulig  <martin@ximian.com>
11146
11147         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11148         method type arguments.  
11149
11150 2004-01-30  Duncan Mak  <duncan@ximian.com>
11151
11152         * marshal.h: Add prototype for
11153         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11154         and
11155         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11156         fix the build.
11157
11158 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
11159
11160         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11161         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11162
11163 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11164
11165         * marshal.c (mono_marshal_get_native_wrapper): Add support for
11166         custom marshalling of valuetypes.
11167
11168         * marshal.c: Fix some warnings.
11169
11170 2004-01-29  Martin Baulig  <martin@ximian.com>
11171
11172         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11173         for generic method parameters.
11174
11175         * reflection.c (method_encode_methodspec): Write the uninflated
11176         signature into the methodspec table.
11177         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11178         is always the uninflated method.
11179         (reflection_methodbuilder_to_mono_method): Copy the generic
11180         parameters from the MethodBuilder into `header->gen_params'.
11181
11182 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11183
11184         * class.c (mono_class_from_generic_parameter): Fix warning.
11185
11186 2004-01-27  Martin Baulig  <martin@ximian.com>
11187
11188         * class.c (mono_class_from_generic_parameter): Don't create
11189         `klass->methods' here.  
11190
11191 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
11192
11193         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11194         extension since it does not work with libraries named lib<FOO>.dll.so.
11195
11196 2004-01-25  Martin Baulig  <martin@ximian.com>
11197
11198         * class.c (mono_class_inflate_generic_type): Added support for
11199         MONO_TYPE_GENERICINST.
11200
11201         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11202         inflate methods on open constructed types.      
11203
11204 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11205
11206         * object.c: fire ProcessExit event in the root AppDomain after running
11207         Main. Fixes bug #53299.
11208
11209 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11210
11211         * socket-io.c: include the new socket-wrappers.h header.
11212         Use the wrappers instead of the unix socket functions to make the code
11213         more clear.
11214
11215 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11216
11217         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11218
11219         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11220         Fixes #22532.
11221
11222 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
11223
11224         * reflection.c (mono_image_create_pefile): Handle the case when the
11225         entry point is not a MethodBuilder.
11226
11227         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11228         field to ReflectionMethod since it is not allways a builder.
11229
11230         * reflection.c (type_get_fully_qualified_name): New helper function to
11231         return the fully qualified name of a type.
11232
11233         * reflection.c (encode_marshal_blob): Always emit the fully qualified
11234         type name for custom marshallers.
11235
11236         * reflection.c (mono_marshal_spec_from_builder): Ditto.
11237
11238         * class.c (mono_class_setup_vtable): If a parent class already 
11239         implements an interface, use the implementing methods from that class.
11240         Fixes #53148.
11241
11242 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11243
11244         * threadpool.c: just return instead of ExitThread to allow for thread
11245         clean up earlier.
11246
11247 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
11248
11249         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11250         when closing resource modules.
11251
11252         * reflection.c (mono_image_create_pefile): Handle the case when the
11253         entry point is not a MethodBuilder.
11254
11255         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11256         field to ReflectionMethod since it is not allways a builder.
11257
11258 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
11259
11260         * marshal.c (mono_marshal_get_managed_wrapper): 
11261         mono_marshal_alloc takes native int so CONV_I
11262         the arg for 64bits.
11263
11264 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
11265
11266         * reflection.c (fixup_cattrs): New function to fixup the methoddef
11267         tokens in the cattr table. Fixes #53108.
11268
11269 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11270
11271         * loader.c: don't trim ".dll" before looking up in the config file.
11272         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11273
11274 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11275
11276         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
11277         Return the module which contains the resource as well.
11278         (ves_icall_System_Reflection_Module_Close): New icall.
11279
11280         * appdomain.c: Bump corlib version number.
11281
11282         * image.c (mono_image_addref): New public function.
11283
11284         * assembly.c: Call mono_image_addref.
11285
11286         * reflection.c (mono_module_get_object): Increase reference count of 
11287         the image.
11288
11289         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11290         Fixes #22532.
11291
11292         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11293         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
11294         proper exceptions on DllImport problems.
11295
11296 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11297
11298         * class.c, metadata.c: eliminate CSIZE macro.
11299
11300 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
11301
11302         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11303         * object.h: Added async_callback field in MonoAsyncResult.
11304         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11305         * verify.c: Added async_callback in MonoAsyncResult layout.
11306
11307 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
11308
11309         * reflection.c (mono_reflection_get_custom_attrs): Add support
11310         for Modules.
11311
11312 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11313
11314         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
11315         marshalling.
11316         (mono_marshal_method_from_wrapper): Add null pointer check.
11317
11318 2004-01-16  Martin Baulig  <martin@ximian.com>
11319
11320         * debug-mono-symfile.h: Set version number to 36 and reflect
11321         latest symbol writer changes.
11322
11323 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11324
11325         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11326         multi-dimensional arrays.
11327         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11328         (mono_class_from_mono_type): Use bounded_array_class_get.
11329         
11330         * class.c (mono_bounded_array_class_get): New function which takes
11331         a 'bounded' bool argument to distinguish vectors from one dimensional
11332         arrays.
11333
11334         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
11335         bounded_array_class_get if the array has bounds.
11336
11337         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11338         Search modules loaded using AssemblyBuilder:AddModule as well.
11339
11340 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11341
11342         * appdomain.c: increased corlib version.
11343         * filewatcher.c: removed g_print.
11344         * icall.c:
11345         (get_property_info): only allocate what is actually requested.
11346         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11347
11348 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11349
11350         * Makefile.am: added filewatcher.[ch]
11351         * filewatcher.[ch]: FileSystemWatcher runtime support.
11352         * icall.c: added new FSW icalls.
11353
11354 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11355
11356         * string-icalls.c: fix stringbuilder regression as suggested by
11357         Iain McCoy <iain@mccoy.id.au>.
11358
11359 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11360
11361         * process.c (process_read_stringtable_block): Recognize '007f' as
11362         a language neutral stringtable block.
11363
11364 2004-01-12  Patrik Torstensson
11365
11366         * object.h (MonoStringBuilder) : Changed layout to support our
11367         new stringbuilder class.
11368         * marshal.c: Change marshalling to support the new layout of 
11369         string builder.
11370         * appdomain.c: increased version number because new layout of
11371         string builder.
11372
11373 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
11374
11375         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11376         assembly name as an string instead of an AssemblyName, since it is
11377         easier to extract info from it.
11378
11379         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11380         the culture subdirectories too. Fixes #52231.
11381
11382 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11383
11384         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11385         It takes 2 new parameters with an optional name for the method to look
11386         for and case ignoring info.
11387
11388         * threadpool.c: removed unused variable.
11389
11390 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11391
11392         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11393         It takes 2 new parameters with an optional name for the property to look
11394         for and case ignoring info.
11395         Fixes bug #52753.
11396
11397 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11398
11399         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11400         Fix #52451.
11401
11402 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11403
11404         * appdomain.c:
11405         * assembly.c: escape the uri before passing it to g_filename_from_uri.
11406         Fixes bug #52630.
11407
11408 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
11409
11410         * reflection.c: Add support for more than one unmanaged resource.
11411
11412         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11413         in field->def_value, as done in all other cases.
11414
11415         * reflection.c (mono_reflection_get_custom_attrs): Add support for
11416         TypeBuilders.
11417
11418         * reflection.c (mono_reflection_create_runtime_class): Remove 
11419         errorneous assignment to klass->element_class, since it is already
11420         done in mono_reflection_setup_internal_class.
11421
11422 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11423
11424         * gc.c: added missing LeaveCriticalSection.
11425         * icall.c: indented a couple of lines.
11426         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11427         if we call EndInvoke inside a callback. Fixes bug #52601.
11428
11429 2004-01-07  Martin Baulig  <martin@ximian.com>
11430
11431         * mono-debug-debugger.h
11432         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11433
11434 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
11435
11436         * appdomain.c: Use messages in NotImplementedException.
11437
11438         * exception.c (mono_get_exception_not_implemented): Now this takes
11439         a message argument.
11440
11441         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11442         exception instead of g_asserting an aborting when something is not
11443         implemented.
11444
11445         Add some inline docs.
11446
11447 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
11448
11449         * reflection.h: Update after changes to object layout.
11450
11451         * reflection.c: Implement saving of unmanaged aka win32 resources.
11452
11453         * appdomain.c: Bump version number.
11454
11455         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
11456         Handle missing domains gracefully.
11457
11458 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
11459
11460         * file-io.c : On Windows, there are much more invalid_path_chars.
11461
11462 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11463
11464         * class.h, object.c: prepare for GetType () speedup.
11465
11466 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
11467
11468         * profiler.c: workaround for --profile null reference exception on
11469           cygwin. Patch by Patrik Torstensson.
11470
11471 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
11472
11473         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11474         make work for unaligned access.
11475
11476 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11477
11478         * class.c: small cleanup (class->fields [i] -> field).
11479         * image.c: check address of metadata is valid.
11480
11481 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
11482
11483         * assembly.h assembly.c (mono_assembly_loaded): New public function to
11484         search the list of loaded assemblies.
11485
11486         * reflection.c (mono_reflection_type_from_name): Use 
11487         mono_assembly_loaded instead of mono_image_loaded.
11488
11489         * reflection.c: Fix warnings.
11490
11491 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
11492
11493         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
11494         is dynamic. This is needed since an assembly can contain both dynamic and
11495         non-dynamic images.
11496
11497         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
11498         assembly->dynamic.
11499
11500         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11501
11502         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11503         to store modules loaded using AddModule.
11504
11505         * reflection.c (mono_image_fill_file_table): Generalize this so it works
11506         on Modules.
11507
11508         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11509
11510         * reflection.c (mono_image_fill_export_table_from_module): New function to
11511         fill out the EXPORTEDTYPES table from a module.
11512
11513         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11514         into a separate function. Also handle loaded non-dynamic modules.
11515
11516         * reflection.c (mono_image_basic_init): Fix memory allocation.
11517
11518         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11519
11520         * assembly.c (mono_assembly_load_references): Make this public.
11521
11522 2003-12-19  Martin Baulig  <martin@ximian.com>
11523
11524         * class.c (mono_class_initialize_generic): Made this static, take
11525         a `MonoGenericInst *' instead of a `MonoClass *'.
11526         (mono_class_from_generic): Call mono_class_initialize_generic()
11527         unless we're already initialized or being called from
11528         do_mono_metadata_parse_generic_inst().
11529
11530         * class.h (MonoGenericInst): Added `initialized' and
11531         `init_pending' flags.
11532
11533         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11534         `mono_class_init (gklass)' or mono_class_initialize_generic()
11535         here; set `generic_inst->init_pending' while parsing the
11536         `type_argv'.
11537
11538 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
11539
11540         * locales.c: include string.h for memxxx prototypes
11541
11542 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11543
11544         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11545         constructor when accessing literal fields.
11546
11547 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
11548
11549         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11550
11551         * reflection.c (assembly_add_resource_manifest): New function to fill
11552         the MANIFESTRESOURCE table.
11553
11554         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11555
11556         * reflection.h: Update to changes in class layout.
11557
11558         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
11559         Reenable call to mono_runtime_is_shutting_down ().
11560
11561         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11562         determine if the runtime is shutting down.
11563
11564 2003-12-16  Jackson Harper <jackson@ximian.com>
11565
11566         * icall.c: comment out call to mono_runtime_is_shutting_down to
11567         fix build.
11568         
11569 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
11570
11571         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11572         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11573
11574 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
11575
11576         * reflection.c: move definition of swap_with_size
11577         to before its first call
11578
11579 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
11580
11581         * appdomain.c (mono_runtime_is_shutting_down): New public function.
11582
11583         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11584         icall.
11585
11586         * object.c: Fix warnings.
11587
11588         * icall.c (ves_icall_Type_Get...): Only consider inherited static
11589         members if FlattenHierarchy is set.
11590
11591         * reflection.c (mono_image_add_decl_security): New function to emit
11592         declarative security.
11593
11594         * reflection.h reflection.c: Add support for declarative security.
11595
11596         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11597         
11598 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11599
11600         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11601         
11602         * appdomain.c verify.c: Moved corlib version checking into its own
11603         function in appdomain.c since it needs to create vtables etc.
11604
11605 2003-12-13  Patrik Torstensson <p@rxc.se>
11606
11607         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
11608         instead of unwrapped server.
11609
11610 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
11611
11612         * verify.c (check_corlib): Fix field index.
11613
11614 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
11615
11616         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11617         GetGacPath icall.
11618
11619 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
11620
11621         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11622         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11623         cope with sizeof(size_t) != sizeof(guint32).
11624
11625 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11626
11627         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11628         in case of failure.
11629
11630 2003-12-10  Mark Crichton <crichton@gimp.org>
11631
11632         * icall.c: removed the GetNonZeroBytes.  We now handle this case
11633         in managed code.
11634
11635         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
11636
11637 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11638
11639         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11640         marked as deleted.
11641
11642 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11643
11644         * verify.c (check_corlib): Handle the case when the version field is 
11645         initialized by a static constructor.
11646
11647 2003-12-08  Patrik Torstensson  <p@rxc.se>
11648
11649     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11650
11651 2003-12-08  Martin Baulig  <martin@ximian.com>
11652
11653         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11654         a MonoReflectionGenericParameter, also take the parameter index
11655         and name as arguments.
11656         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11657         (ves_icall_MonoGenericParam_initialize): New interncall.
11658         (ves_icall_Type_make_byref_type): New interncall.
11659
11660         * reflection.h (MonoReflectionGenericParam): Derive from
11661         MonoReflectionType, not just from MonoObject.  Added `refobj' and
11662         `index' fields.
11663
11664         * reflection.c (mono_reflection_define_generic_parameter): Create
11665         and return a new MonoReflectionGenericParam; don't initialize the
11666         constraints here.
11667         (mono_reflection_initialize_generic_parameter): New public method;
11668         initializes the constraints and creates the `param->pklass'.
11669
11670 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11671
11672         * reflection.h reflection.c: Use the new fields 'num_types', 
11673         'num_fields' and 'num_methods' to track the number of types etc.
11674
11675         * verify.c (check_corlib): Check corlib version number.
11676
11677 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
11678
11679         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11680         function works on all methods.
11681
11682 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11683
11684         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11685         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11686         the custom_type_info flag of the transparent proxy.
11687         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11688         objects that supports IRemotingTypeInfo.
11689         * object.h: Added custom_type_info field in transparent proxy.
11690
11691 2003-12-06  Martin Baulig  <martin@ximian.com>
11692
11693         * class.c (mono_class_create_from_generic): Removed.
11694         (mono_class_from_generic): Check `ginst->klass' before doing
11695         anything else.  This is important to fully support "recursive"
11696         generic types.
11697
11698         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11699         empty `generic_inst->klass' before doing anything else.
11700
11701 2003-12-06  Dick Porter  <dick@ximian.com>
11702
11703         * verify.c: 
11704         * object.h:
11705         * icall.c:
11706         * locales.c: Use C structs to access class fields.  Don't do a
11707         conversion between MonoString and UChar because both are
11708         platform-endian UTF-16.  Compare now takes startindex and count
11709         parameters.  Add a char overload for IndexOf.  Speed up the
11710         invariant string IndexOf.
11711
11712 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
11713
11714         * Makefile.am (monosn_LDADD): Fix parallel build.
11715
11716 2003-12-04  Martin Baulig  <martin@ximian.com>
11717
11718         * icall.c
11719         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11720         (ves_icall_Type_make_array_type): New interncall.       
11721
11722 2003-12-04  Martin Baulig  <martin@ximian.com>
11723
11724         * locales.c: also change it in the !HAVE_ICU case.
11725
11726 2003-12-04  Dick Porter  <dick@ximian.com>
11727
11728         * icall.c:
11729         * locales.c: construct_compareinfo is now in CompareInfo, not
11730         CultureInfo.
11731
11732 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11733
11734         * image.c (mono_image_load_file_for_image): Cache loaded images in the
11735         image->files array.
11736
11737         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11738         table as well.
11739
11740         * assembly.c (mono_assembly_load_references): Only load references
11741         once.
11742
11743         * class.c (mono_class_from_name): Avoid linear search of the 
11744         EXPORTEDTYPE table.
11745
11746         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11747
11748 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11749
11750         * image.h (MonoImage): Add 'field_cache' field.
11751
11752         * loader.c (mono_field_from_token): Cache field lookups.
11753         
11754         * reflection.c (mono_module_get_object): Fix name property.
11755
11756         * icall.c (ves_icall_get_enum_info): Update after changes to 
11757         mono_metadata_get_constant_index ().
11758
11759         * icall.c: Get rid of get_type_info icall, use a separate icall for
11760         each type property to avoid needless memory allocations. Fixes #51514.
11761
11762         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11763         to avoid needless binary searches.
11764
11765         * class.c (class_compute_field_layout): Move the initialization of
11766         field->def_value to mono_class_vtable ().
11767
11768         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11769         non-corlib types.
11770
11771         * object.c (mono_object_allocate): Make it inline.
11772
11773         * object.c (mono_object_allocate_spec): Make it inline.
11774         
11775 2003-12-02  Dick Porter  <dick@ximian.com>
11776
11777         * locales.c (create_NumberFormat): NumberFormatInfo construction.
11778         Patch by Mohammad DAMT (mdamt@cdl2000.com).
11779
11780 2003-12-01  Dick Porter  <dick@ximian.com>
11781
11782         * threads.c: Fix signature and call in CreateMutex and
11783         CreateEvent.
11784
11785 2003-12-01  Dick Porter  <dick@ximian.com>
11786
11787         * icall.c: 
11788         * locales.c: Implement string compares and searching
11789
11790         * object.h: Add extra Thread field
11791
11792 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
11793
11794         * reflection.c (fixup_method): Add support for MonoCMethod.
11795
11796 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
11797
11798         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11799
11800         * reflection.c (assembly_name_to_aname): Allow extra characters in
11801         assembly names. Fixes #51468.
11802
11803 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11804
11805         * exception.c (mono_exception_from_name_domain): New helper function.
11806
11807         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11808         exception object in the correct domain.
11809
11810         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
11811         formatting + make a copy a the input data.
11812
11813         * loader.c (mono_get_method_from_token): Methods which contain
11814         native code do not have entries in the ImplMap.
11815
11816         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11817         Thanks to Gonzalo for spotting this.
11818         
11819         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11820         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11821
11822         * assembly.h (mono_assembly_load_from): Split the second part of 
11823         assembly loading into a new public function.
11824
11825         * exception.h (mono_get_exception_bad_image_format): New function.
11826
11827 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
11828
11829         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11830         Enumerate all modules inside a dynamic assembly. Fixes #51293.
11831         
11832         * icall.c: Add new icall for creating dynamic methods.
11833
11834         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11835
11836         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11837
11838         * reflection.c (mono_reflection_create_dynamic_method): New icall to
11839         create a dynamic method.
11840
11841         * reflection.c (resolve_object): New helper function.
11842
11843         * reflection.c: Generalize ReflectionMethodBuilder and the functions
11844         which manipulate it so they can also work on dynamic methods.
11845
11846         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
11847         creating the MonoReflectionMethodAux structure if it is not needed.
11848         
11849         * reflection.h verify.c: Update after changes to object layout.
11850
11851         * reflection.c (method_builder_encode_signature): Fix compilation on
11852         gcc 2.95.x.
11853
11854 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
11855
11856         * appdomain.h: Added support for context static fields. Added static_data
11857           field to MonoAppContext and renamed thread_static_fields to a more
11858           generic special_static_fields in MonoAppDomain, since it can now contain
11859           context static fields.
11860         * domain.c: Updated hashtable name.
11861         * object.c: Replaced field_is_thread_static() for a more generic
11862           field_is_special_static() which also checks for context static attribute.
11863           In mono_class_vtable(), added support for static context fields.
11864         * threads.c: Changed methods that manage thread static fields to more
11865           generic methods so they can be reused both for thread and context static
11866           data.
11867         * threads.h: Declared some new methods.
11868
11869 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
11870
11871         * reflection.h: Update after changes to the managed types.
11872
11873         * reflection.c (encode_custom_modifiers): New helper function.
11874
11875         * reflection.c (method_encode_signature): Emit custom modifiers.
11876
11877         * reflection.c (field_encode_signature): Emit custom modifiers.
11878
11879 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11880
11881         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11882
11883         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
11884         implementation.
11885
11886         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
11887         icall.
11888
11889         * object.c (mono_field_get_value_object): New function.
11890
11891         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11892         specific.
11893
11894 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
11895
11896         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11897         return a preallocated out-of-memory exception instance.
11898
11899         * object.c (out_of_memory): Use the new function.
11900
11901         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11902         flag is before the custom modifiers. Fixes #49802.
11903
11904 2003-11-16  Martin Baulig  <martin@ximian.com>
11905
11906         * class.c (mono_class_is_open_constructed_type): Implemented the
11907         MONO_TYPE_GENERICINST case.
11908
11909 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
11910
11911         * assembly.c (mono_assembly_fill_assembly_name): New function to
11912         fill out the MonoAssemblyName structure.
11913         (mono_assembly_open): Use the new function.
11914
11915         * icall.c (fill_reflection_assembly_name): New helper function.
11916
11917         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11918         new function.
11919
11920         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11921
11922 2003-11-15  Martin Baulig  <martin@ximian.com>
11923
11924         * class.c (mono_class_is_open_constructed_type): New public
11925         function; checks whether a type is an open constructed type,
11926         ie. whether it still contains type parameters.
11927         (mono_class_inflate_generic_type): If we're a type parameter and
11928         the inflated type is also a MONO_TYPE_(M)VAR, return the original
11929         type.
11930
11931         * class.h (MonoGenericInst): Added `guint32 is_open'.
11932
11933         * loader.c (method_from_methodspec): Check whether we're an open
11934         or closed constructed type and set `ginst->is_open'.
11935
11936         * reflection.c (mono_reflection_bind_generic_parameters): Check
11937         whether we're an open or closed constructed type and set
11938         `ginst->is_open'.
11939         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11940         from open constructed types.
11941
11942 2003-11-15  Martin Baulig  <martin@ximian.com>
11943
11944         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11945         a generic instance (instead of a generic type declaration) with
11946         unbound generic parameters, bind them to our actual types.
11947
11948 2003-11-14  Martin Baulig  <martin@ximian.com>
11949
11950         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11951
11952         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11953         an interface type, populate `res->interfaces' with instantiated
11954         versions of all the interfaces we inherit.
11955
11956 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
11957
11958         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11959         when MONO_PATH is set but doesn't contain the install dir.
11960
11961 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11962
11963         * icall.c:
11964         (ves_icall_Type_GetInterfaces): don't return an interface twice when
11965         it's also implemented in base classes. Fixes bug #50927.
11966
11967 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
11968
11969         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11970         if this method is called from a finalizer. Fixes #50913.
11971
11972 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
11973
11974         * threads.c: Implement VolatileRead/VolatileWrite
11975
11976         * icall.c: Add new icalls for VolatileRead/VolatileWrite
11977
11978 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11979
11980         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
11981         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11982         2.95.3.
11983
11984         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
11985         from Peter Ross (pro@missioncriticalit.com).
11986         
11987 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
11988
11989         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11990
11991 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11992
11993         * assembly.c (mono_assembly_load_references): Disable check because it
11994         triggers on older corlibs which lots of people have.
11995
11996 2003-11-12  Jackson Harper  <jackson@ximian.com>
11997
11998         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11999         load corlib.dll if mscorlib.dll is not found.
12000         * assembly.h: Remove corlib name define.
12001         * class.c:
12002         * domain.c:
12003         * image.c: Change corlib name to mscorlib.
12004         
12005 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12006
12007         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12008
12009 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
12010
12011         * appdomain.h: Added loader_optimization here to sync with the C#
12012         code, and add disallow_binding_redirects field.
12013
12014 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12015
12016         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
12017
12018         * reflection.c (mono_image_build_metadata): Fix crash on modules
12019         with no types.
12020
12021         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12022
12023         * icall.c (ves_icall_get_method_info): Return callingConvention as
12024         well.
12025
12026         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
12027         namespaces from the EXPORTEDTYPE table as well.
12028
12029         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12030         from all modules inside the assembly.
12031         
12032 2003-11-11  Martin Baulig  <martin@ximian.com>
12033
12034         * reflection.c (mono_reflection_bind_generic_parameters): Make
12035         this work for interfaces.
12036
12037 2003-11-11  Martin Baulig  <martin@ximian.com>
12038
12039         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12040
12041 2003-11-11  Martin Baulig  <martin@ximian.com>
12042
12043         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12044         "MonoInflatedMethod" and "MonoInflatedCtor".
12045
12046 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12047
12048         * reflection.c (resolution_scope_from_image): Use the assembly table
12049         from the manifest module, since other modules don't have it.
12050
12051         * debug-helpers.c (mono_type_full_name): New helper function.
12052
12053         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12054
12055         * image.c (mono_image_load_file_for_image): New public function which
12056         is a replacement for the load_file_for_image in class.c.
12057
12058         * assembly.c (mono_assembly_load_module): A wrapper for the function
12059         above which does assembly association and reference loading too.
12060
12061         * class.c (mono_class_from_name): Call mono_assembly_load_module.
12062
12063 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12064
12065         * appdomain.c: not all of the attributes for the full assembly name
12066         are required and the order doesn't matter. Fixes bug #50787.
12067
12068 2003-11-10  Dick Porter  <dick@ximian.com>
12069
12070         * locales.c: Use platform-endian UTF16
12071
12072 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12073
12074         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12075         
12076 2003-11-10  Martin Baulig  <martin@ximian.com>
12077
12078         * metadata.c
12079         (mono_metadata_load_generic_params): Make this actually work.
12080
12081         * reflection.c (mono_reflection_bind_generic_parameters): If our
12082         parent is a generic instance, pass all the `types' to it, no
12083         matter whether it has the same number of type parameters or not.
12084
12085 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12086
12087         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12088
12089         * assembly.c (mono_assembly_load_references): Move the image<->assembly
12090         assignment code to this function so it gets called recursively for all
12091         modules.
12092
12093         * image.c (load_modules): Remove the assembly assignment since it is
12094         now done by mono_assembly_load_references.
12095         
12096         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12097         Add 'module' argument.
12098         (mono_module_get_types): New helper function.
12099         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12100
12101 2003-11-08  Martin Baulig  <martin@ximian.com>
12102
12103         * class.c (mono_class_inflate_generic_method): Interface method
12104         don't have a header.
12105
12106         * reflection.c (mono_image_get_methodspec_token): Take an
12107         additional `MonoGenericInst *' argument instead of reading it from
12108         the header; this is necessary to support interfaces.
12109         (mono_image_create_token): Pass the `MonoGenericInst *' from the
12110         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12111         (inflated_method_get_object): Take an additional `MonoGenericInst *'
12112         argument.
12113
12114         * reflection.h (MonoReflectionInflatedMethod): Added
12115         `MonoGenericInst *ginst'.
12116
12117 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
12118
12119         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12120
12121 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
12122
12123         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12124
12125 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12126
12127         * reflection.c 
12128         (reflection_methodbuilder_from_method_builder):
12129         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
12130         initialize a ReflectionMethodBuilder structure.
12131         (mono_image_get_methodbuilder_token):
12132         (mono_image_get_ctorbuilder_token): New functions to emit memberref
12133         tokens which point to types in another module inside the same assembly.
12134
12135         * reflection.c: Use the new helper functions.
12136         
12137         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12138
12139         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
12140         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12141
12142         * reflection.c (resolution_scope_from_image): Emit a moduleref if
12143         neccesary.
12144
12145         * reflection.c (mono_image_build_metadata): Emit metadata only for the
12146         current module. Emit the manifest only for the main module.
12147
12148         * reflection.c (mono_image_create_token): Add assertion when a 
12149         memberref needs to be created.
12150
12151         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12152
12153         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
12154         larger buffer for the custom attribute blob. Fixes #50637.
12155         
12156 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12157
12158         * threadpool.c: notify listener on async processing handles after
12159         invoking the async callback. Thanks to Zoltan.
12160
12161 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12162
12163         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
12164         avoid code duplication.
12165
12166         * reflection.h (MonoDynamicImage): New type which is currently unused,
12167         but will be used through the ref.emit code in place of 
12168         MonoDynamicAssembly.
12169
12170         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12171         object layout.
12172
12173         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12174         a MonoDynamicImage instead of just a MonoImage.
12175         
12176         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12177         icalls to ModuleBuilder but keep their semantics, so they will work
12178         with moduleb->assemblyb. This will change later.
12179         
12180 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12181
12182         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12183         object layout.
12184
12185         * reflection.c (mono_image_build_metadata): Avoid creation of a default
12186         main module, since it is now done by the managed code.
12187
12188 2003-11-03  Martin Baulig  <martin@ximian.com>
12189
12190         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12191         `ginst->klass' here.
12192         (method_encode_methodspec): Don't use the `ginst->generic_method's
12193         klass if it's a generic instance, use `ginst->klass' in this case.
12194
12195 2003-11-03  Martin Baulig  <martin@ximian.com>
12196
12197         * reflection.c (mono_image_get_generic_method_param_info):
12198         Removed, use mono_image_get_generic_param_info() instead.
12199         (mono_image_get_type_info): Write the GenericParam table before
12200         the Method table.  This is neccessary because in the GenericParam
12201         table, type parameters of the class (ie. '!0' etc.) must come
12202         before the ones from its generic methods (ie. '!!0' etc).
12203
12204 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12205
12206         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12207
12208 2003-11-02  Martin Baulig  <martin@ximian.com>
12209
12210         * reflection.c (create_generic_typespec): Take a
12211         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12212         the generic parameters from it.
12213
12214 2003-11-02  Martin Baulig  <martin@ximian.com>
12215
12216         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12217         instead of a `MonoClassField *' since we just need the type.
12218         (create_generic_typespec): New static function.  Creates a
12219         TypeSpec token for a generic type declaration.
12220         (mono_image_get_generic_field_token): New static function.
12221         (mono_image_create_token): If we're a FieldBuilder in a generic
12222         type declaration, call mono_image_get_generic_field_token() to get
12223         the token.
12224
12225 2003-11-02  Martin Baulig  <martin@ximian.com>
12226
12227         * reflection.h
12228         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12229         `MonoReflectionGenericInst *declaring_type' and
12230         `MonoReflectionGenericInst *reflected_type' fields.
12231
12232         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12233         `MonoReflectionGenericInst *declaring_type' and a
12234         `MonoReflectionGenericInst *reflected_type' argument instead of a
12235         single `MonoReflectionGenericInst *type' one.  Set
12236         `res->declaring_type' and `res->reflected_type' from them.
12237         (mono_reflection_inflate_field): Likewise.      
12238
12239 2003-11-02  Martin Baulig  <martin@ximian.com>
12240
12241         * class.c (mono_class_setup_vtable): Don't store generic methods
12242         in the vtable.  
12243
12244 2003-11-02  Martin Baulig  <martin@ximian.com>
12245
12246         * reflection.h (MonoReflectionGenericInst): Added
12247         `MonoReflectionType *declaring_type'.
12248
12249         * reflection.c (mono_reflection_bind_generic_parameters): Use
12250         `if (tb->parent)' instead of `klass->parent'.
12251
12252 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
12253
12254         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12255         with an empty ASSEMBLY table.
12256
12257         * reflection.c (mono_image_build_metadata): Avoid using the same loop
12258         variable in the inner and outer loops.
12259
12260 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12261
12262         * metadata.h (mono_metadata_make_token): Put parentheses around macro
12263         argument.
12264
12265         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12266         
12267         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
12268         icalls. Instead, do everything in managed code. This is needed since
12269         it is hard to restore the original domain etc. in unmanaged code in the
12270         presence of undeniable exceptions.
12271
12272         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
12273         New icalls to push and pop appdomain refs.
12274
12275 2003-10-31  Martin Baulig  <martin@ximian.com>
12276
12277         * class.c (inflate_generic_type): Renamed to
12278         mono_class_inflate_generic_type() and made it public.
12279
12280         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12281         New interncall.
12282
12283         * loader.c (mono_field_from_memberref): Also set the retklass for
12284         typespecs.
12285
12286         * fielder.c (mono_image_get_inflated_field_token): New static
12287         method; creates a metadata token for an inflated field.
12288         (mono_image_create_token, fixup_method): Added support for
12289         "MonoInflatedField".
12290         (fieldbuilder_to_mono_class_field): New static function.
12291         (mono_reflection_inflate_field): New public function.
12292
12293         * reflection.h
12294         (MonoReflectionGenericInst): Added `MonoArray *fields'.
12295         (MonoReflectionInflatedField): New typedef.     
12296
12297 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
12298
12299         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12300         for Solaris and other platforms without s6_addr16
12301
12302 2003-10-30  Martin Baulig  <martin@ximian.com>
12303
12304         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12305         argument instead of two.
12306         (mono_class_inflate_generic_signature): Likewise.
12307         (inflate_generic_header): Likewise.
12308         (mono_class_inflate_generic_method): Likewise.  In addition, if
12309         `ginst->klass' is set, it becomes the new `method->klass'.
12310
12311         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12312         field.
12313
12314         * reflection.c (encode_generic_method_sig): Write a 0xa as the
12315         first byte. [FIXME]
12316         (method_encode_methodspec): If we have generic parameters, create
12317         a MethodSpec instead of a MethodRef.
12318         (fixup_method): Added support for "MonoInflatedMethod" and
12319         "MonoInflatedCtor".
12320         (mono_image_create_token): Added support for "MonoInflatedMethod"
12321         and "MonoInflatedCtor".
12322         (inflated_method_get_object): New static function; returns a
12323         managed "System.Reflection.MonoInflatedMethod" object.
12324         (mono_reflection_bind_generic_method_parameters): Return a
12325         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12326         (mono_reflection_inflate_method_or_ctor): Likewise.
12327         (mono_image_get_generic_method_param_info): Initialize unused
12328         fields to zero.
12329         (mono_image_get_generic_param_info): Likewise.
12330
12331         * reflection.h (MonoReflectionInflatedMethod): New public
12332         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
12333         "S.R.MonoInflatedCtor" classes.
12334
12335         * loader.c (method_from_memberref): If we're a TypeSpec and it
12336         resolves to a generic instance, inflate the method.
12337
12338 2003-10-28  Dick Porter  <dick@ximian.com>
12339
12340         * object.c (mono_runtime_run_main): Convert command-line arguments
12341         into utf8, falling back to the user's locale encoding to do so.
12342
12343 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12344
12345         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12346         at this time.
12347
12348         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12349
12350         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12351         up icalls at method definition time. Partially fixes #33569.
12352
12353 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
12354
12355         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12356         marshalling of arrays. Fixes #50116.
12357
12358         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12359
12360         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12361         points to a vtable in the dying appdomain.
12362
12363         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12364         listeners into unmanaged code inside the lock.
12365
12366         * object.c (mono_class_vtable): Turn off typed allocation in non-root
12367         domains and add some comments.
12368
12369 2003-10-25  Martin Baulig  <martin@ximian.com>
12370
12371         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12372
12373         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12374
12375         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12376         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12377         currently parsing.  Create the generic class and store it in
12378         `generic_inst->klass' before parsing the type arguments.  This is
12379         required to support "recursive" definitions; see mcs/tests/gen-23.cs
12380         for an example.
12381         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12382         to support recursive typespec entries.
12383
12384         * class.c (mono_class_setup_parent): If our parent is a generic
12385         instance, we may get called before it has its name set.
12386         (mono_class_from_generic): Splitted into
12387         mono_class_create_from_generic() and mono_class_initialize_generic().
12388
12389 2003-10-25  Martin Baulig  <martin@ximian.com>
12390
12391         * icall.c (ves_icall_Type_BindGenericParameters): Return a
12392         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12393         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12394         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12395
12396         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12397         (create_typespec): Likewise.
12398         (mono_reflection_bind_generic_parameters): Return a
12399         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12400         (mono_reflection_inflate_method_or_ctor): New public function.
12401
12402         * reflection.h (MonoReflectionGenericInst): New typedef.        
12403
12404 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12405
12406         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12407         inside the domain lock. Fixes #49993.
12408         
12409         * object.c (mono_class_vtable): When typed allocation is used, 
12410         allocate vtables in the GC heap instead of in the mempool, since the
12411         vtables contain GC descriptors which are used by the collector even
12412         after the domain owning the mempool is unloaded.
12413
12414         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12415
12416         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12417         reflect what it does. Also invalidate mempools instead of freeing
12418         them if a define is set.
12419
12420         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12421         of the appdomain.
12422         
12423         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12424         hold the finalizable objects in this domain.
12425
12426         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12427         appdomain.
12428
12429         * appdomain.c (mono_domain_set): New function to set the current
12430         appdomain, but only if it is not being unloaded.
12431
12432         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12433         appdomain which is being unloaded.
12434         
12435         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12436         unloading of the root appdomain.
12437
12438         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12439         icall to execute a method in another appdomain. Intended as a 
12440         replacement for InternalSetDomain, which can confuse the code 
12441         generation in the JIT.
12442
12443         * appdomain.c (mono_domain_is_unloading): New function to determine
12444         whenever an appdomain is unloading.
12445
12446         * appdomain.c (mono_domain_unload): New function to correctly unload
12447         an appdomain.
12448
12449         * assembly.c (mono_assembly_load_references): Check that an assembly
12450         does not references itself.
12451
12452         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12453         domain manually, it asks the finalizer thread to do it, then waits for
12454         the result. Also added a timeout.
12455
12456         * icall.c: Register the new icalls.
12457
12458         * threads.h threads.c: Export the mono_gc_stop_world and 
12459         mono_gc_start_world functions.
12460         
12461         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
12462         function to fill out the mempool with 0x2a.
12463
12464 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
12465
12466         * reflection.h (MonoReflectionMethodAux): New structure to store
12467         information which is rarely used, thus is not in the MonoMethod
12468         structure.
12469
12470         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12471         store the aux info.
12472
12473         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12474         and marshalling info into the aux structure.
12475
12476         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12477         from the aux structure.
12478
12479         * loader.c (mono_method_get_param_names): Retrieve the param names from
12480         the aux structure.
12481         
12482 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
12483
12484         * exception.h exception.c: Add AppDomainUnloadedException && fix 
12485         warning.
12486
12487 2003-10-21  Dick Porter  <dick@ximian.com>
12488
12489         * socket-io.c
12490         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12491         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12492
12493 2003-10-21  Martin Baulig  <martin@ximian.com>
12494
12495         * reflection.c (mono_reflection_bind_generic_parameters):
12496         `klass->parent' is NULL for interfaces.
12497
12498 2003-10-21  Martin Baulig  <martin@ximian.com>
12499
12500         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12501
12502 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
12503
12504         * exception.c (mono_exception_from_name_msg): New helper function for
12505         creating exceptions and initializing their message field.
12506
12507         * exception.c: Simplify functions using the new helper.
12508
12509         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12510         New function.
12511
12512         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12513         mono_raise_exception, since otherwise gcc doesn't generate the function
12514         epilog for raise_exception, confusing the stack unwinding in the JIT.
12515         Fixes #45043.
12516
12517         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12518         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12519         Fixes #49499.
12520
12521 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12522
12523         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12524         utf8.
12525
12526 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
12527
12528         * icall.c: Removed GetUninitializedObject method because
12529           AllocateUninitializedClassInstance does the same.
12530
12531 2003-10-18  Martin Baulig  <martin@ximian.com>
12532
12533         * class.c (inflate_generic_signature): Renamed to
12534         mono_class_inflate_generic_signature() and made it public.
12535         (my_mono_class_from_generic_parameter): New static function; if we
12536         don't already have the generic parameter's MonoClass, create a
12537         very simple one which is just used internally in the runtime and
12538         not passed back to managed code.
12539
12540         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12541
12542         * metadata.h (MonoMethodSignature): Moved the
12543         `MonoGenericParam *gen_params' to the MonoMethodHeader.
12544         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12545
12546         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12547         ves_icall_MonoMethod_GetGenericArguments(); this is now an
12548         interncall on the MonoMethod class, not on MethodInfo.
12549         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12550         calling mono_reflection_bind_generic_method_parameters() directly.
12551
12552         * loader.c (mono_method_get_signature): If this is a MethodSpec;
12553         return the already computed `method->signature'.
12554         (method_from_methodspec): New static function to load a method
12555         from a MethodSpec entry.
12556         (mono_get_method_from_token): Call the new method_from_methodspec()
12557         for MethodSpec tokens.  
12558         (mono_get_method_from_token): If we're a generic method, load the
12559         type parameters.
12560
12561         * reflection.c (mono_image_get_memberref_token): Allow
12562         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12563         table.
12564         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12565         (mono_image_create_token): First check whether it's a generic
12566         method (so we'd need to create a MethodSpec), then do the other
12567         two alternatives.
12568         (mono_reflection_bind_generic_method_parameters): Return a
12569         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12570         called directly from the interncall.
12571
12572 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
12573
12574         * reflection.c (load_public_key): Move loading of the public key
12575         into managed code.
12576
12577         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12578
12579         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12580         fields.
12581
12582         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12583         culture, hash_alg and public_key. Fixes #49555.
12584
12585 2003-10-17  Martin Baulig  <martin@ximian.com>
12586
12587         * class.h (MonoGenericInst): Moved this declaration here and added
12588         `MonoMethod *generic_method'.
12589
12590         * icall.c
12591         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12592         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12593
12594         * metadata.c (mono_metadata_type_equal): Two types of
12595         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12596         index; ie. don't compare the address of the `MonoGenericParam'
12597         structure.
12598         (mono_metadata_load_generic_params): Removed the `MonoMethod
12599         *method' argument.
12600
12601         * metadata.h (MonoGenericInst): Moved declaration to class.h.
12602         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12603
12604         * reflection.c (method_encode_signature): Encode the number of
12605         generic parameters.
12606         (encode_generic_method_sig): New static function.
12607         (method_encode_methodspec): New static function; creates an entry
12608         in the MethodSpec table for a generic method.
12609         (mono_image_get_methodspec_token): New static function.
12610         (mono_image_create_token): Call mono_image_get_methodspec_token()
12611         for generic methods.
12612         (mono_reflection_bind_generic_method_parameters): New public
12613         function.  Instantiates a generic method.
12614
12615 2003-10-16  Martin Baulig  <martin@ximian.com>
12616
12617         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12618         *gen_params' here from MonoMethodHeader.
12619
12620         * metadata.c (mono_metadata_parse_method_signature): If we have
12621         generic parameters, initialize `method->gen_params' and then set
12622         the correct `type->data.generic_param' in all the parameters.
12623
12624 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12625
12626         * threads.c (mono_threads_get_default_stacksize): New function to 
12627         return the default stacksize.
12628
12629         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12630         termination of the finalizer thread, since the previous method had
12631         race conditions. Fixes #49628.
12632
12633         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12634         as for the other managed threads.
12635
12636 2003-10-16  Martin Baulig  <martin@ximian.com>
12637
12638         * class.c (inflate_generic_signature): Copy `generic_param_count'
12639         and `gen_params'.
12640
12641         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12642         New interncall.
12643
12644         * metadata.c (mono_metadata_parse_method_signature): Actually set
12645         the `method->generic_param_count' here.
12646         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12647
12648 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12649
12650         * object.h: Add a new field to TypedRef to simplify the implementation
12651         of the REFANY opcodes in the JIT.
12652
12653         * icall.c: Make use of the new field.
12654
12655         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12656         dynamically.
12657
12658 2003-10-15  Martin Baulig  <martin@ximian.com>
12659
12660         * class.c (mono_class_from_gen_param): Renamed to
12661         mono_class_from_generic_parameter() and moved most of the
12662         functionality from mono_reflection_define_generic_parameter()
12663         here; ie. we create a "real" class here.
12664         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12665         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12666         previously been called.
12667
12668         * class.h (MonoGenericParam): Moved the declaration of this struct
12669         here from metadata.h and added `MonoMethod *method'.
12670
12671         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12672         interncall.
12673
12674         * loader.c (mono_get_method_from_token): If we have any generic
12675         parameters, call mono_metadata_load_generic_params() to read them
12676         from the MONO_TABLE_GENERICPAR.
12677
12678         * metadata.c (mono_metadata_load_generic_params): Added
12679         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12680
12681         * metadata.h (MonoMethodSignature): Replaced
12682         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12683         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12684
12685         * reflection.c (mono_reflection_define_generic_parameter): Moved
12686         most of the functionality into the new
12687         mono_class_from_generic_parameter(); set the `method' field if
12688         we're a method parameter.       
12689
12690 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
12691
12692         * marshal.c (emit_struct_conv): if native size is 0
12693         emit no code.
12694
12695 2003-10-14  Martin Baulig  <martin@ximian.com>
12696
12697         * icall.c: The generics API has changed in the spec since it was
12698         added to System.Type; these modifications make it match the spec
12699         again.
12700         (ves_icall_Type_GetGenericParameters): Renamed to
12701         `ves_icall_Type_GetGenericArguments'.
12702         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12703         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12704         `ves_icall_MonoType_get_HasGenericArguments'.
12705         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12706         `ves_icall_MonoType_get_IsGenericParameter'.
12707         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12708         this is no interncall anymore.
12709         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12710         `ves_icall_TypeBuilder_get_IsGenericParameter'.
12711
12712 2003-10-14  Martin Baulig  <martin@ximian.com>
12713
12714         * reflection.c (mono_reflection_bind_generic_parameters): Also
12715         inflate generic methods if we're reading the class from IL.
12716
12717 2003-10-13  Martin Baulig  <martin@ximian.com>
12718
12719         * reflection.c (mono_reflection_define_generic_parameter): This
12720         method isn't called directly from the icall anymore; take a
12721         `MonoReflectionAssemblyBuilder *' so we can use this for type and
12722         method generic parameters.
12723         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12724         (method_builder_encode_signature): Encode generic parameters.
12725         (mono_image_get_method_info): Write generic params to the
12726         MONO_TABLE_GENERICPARAM table.
12727
12728         * reflection.h (MonoReflectionMethodBuilder): Added
12729         `MonoArray *generic_params'.
12730
12731         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12732
12733         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12734         wrapper for mono_reflection_define_generic_parameter().
12735         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
12736
12737 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
12738
12739         * marshal.h: Add missing function to fix build.
12740
12741         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
12742         the SetLastError pinvoke attribute.
12743
12744         * marshal.c (mono_marshal_set_last_error): New helper function called
12745         by the generated code.
12746         
12747         * marshal.c (mono_mb_emit_branch): New helper function.
12748
12749         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12750
12751         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12752         classes as parameters and return values of delegates. Fixes #29256. 
12753
12754 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
12755
12756         * locales.c: use gint32 in non HAVE_ICU case
12757
12758 2003-10-11  Martin Baulig  <martin@ximian.com>
12759
12760         * mono-debug.c (mono_debug_add_method): Added a workaround for
12761         bug #48591.
12762
12763 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12764
12765         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12766         delegates passed to native code must use the STDCALL calling 
12767         convention. Fixes #35987.
12768
12769 2003-10-10  Martin Baulig  <martin@ximian.com>
12770
12771         * class.c (inflate_generic_type): If we're inflating for a generic
12772         type instance (and not for a generic method), return
12773         MONO_TYPE_MVAR unchanged.
12774
12775 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12776
12777         * string-icalls.c: Join ignores null strings in the source array.
12778         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12779         * threads.c: GetAvailableTheads is slightly more accurate.
12780
12781 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
12782
12783         * threads.h threads.c : add mono_threads_set_default_stacksize
12784         and pass default to CreateThread calls.
12785
12786 2003-10-09  Dick Porter  <dick@ximian.com>
12787
12788         * icall.c:
12789         * locales.h:
12790         * locales.c: Internal calls for constructing CultureInfo and
12791         related objects from libicu (if its available.)
12792
12793 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12794
12795         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12796
12797 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12798
12799         * threadpool.c: added an argument to async_invoke_thread that is the
12800         item to process, pass the MonoAsyncResult to the thread start function
12801         when creating a new thread. This way we don't need to acquire any lock
12802         when we're creating a new thread. Readded a semaphore for faster
12803         response times (instead of that Sleep i added).
12804
12805 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
12806
12807         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12808         get daylight change dates better on Windows, fix handling
12809         of platforms without tm_gmtoff.
12810
12811 2003-10-06  Martin Baulig  <martin@ximian.com>
12812
12813         * class.c (inflate_generic_method): Renamed to
12814         mono_class_inflate_generic_method() and made public.
12815         (mono_class_init): Don't inflate the generic methods here.
12816         (mono_class_from_generic): Added `gboolean inflate_methods'
12817         argument.  Inflate the methods here.
12818
12819         * loader.c (mono_method_get_param_names): Ignore instances of
12820         generic types for the moment.
12821
12822         * reflection.c (fixup_method): Added support for inflated methods.
12823         (mono_image_create_token): Use mono_image_get_methodref_token()
12824         for inflated methods.
12825         (mono_custom_attrs_from_param): Ignore instances of generic types
12826         for the moment.
12827         (mono_reflection_bind_generic_parameters): New public function.
12828         Moved all the functionality from
12829         ves_icall_Type_BindGenericParameters() here and added support for
12830         dynamic types.
12831         (mono_reflection_define_generic_parameter): Initialize
12832         `klass->methods' here.
12833
12834         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12835         functionality into mono_reflection_define_generic_parameter().
12836         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12837         TypeBuilder, return that TypeBuilder.
12838
12839 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12840
12841         * appdomain.c: removed mono_delegate_semaphore.
12842
12843         * threadpool.c:
12844         (mono_thread_pool_add): moved hash table creation inside and the thread 
12845         creation outside of the critical region.
12846         (mono_thread_pool_finish): removed obsolete code.
12847         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12848         continue or exit the thread depending on the queue.
12849
12850 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
12851
12852         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12853         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12854         handle more bool marshalling options
12855
12856 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
12857
12858         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12859         arrays of structs. Also add a more descriptive error message when
12860         a structure member is marshalled as LPArray.
12861
12862 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12863
12864         * marshal.c (mono_marshal_get_native_wrapper): Add support for
12865         marshalling arrays of complex types. Fixes #29098. Also remove an
12866         usused and incomplete function.
12867
12868 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12869
12870         * gc.c: report heap_size - free_bytes as total memory allocated
12871         (bug#49362).
12872
12873 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12874
12875         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
12876         fix timezone handling problems on Windows.
12877         
12878         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12879         asserts when the year is outside the range handled by ms the functions.
12880
12881         * class.c (setup_interface_offsets): If the class is an interface,
12882         fill out its interface_offsets slot.
12883
12884 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12885
12886         * threadpool.c: mark threadpool threads as background.
12887
12888 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
12889
12890         * decimal.c - define DECINLINE to nothing if not using GCC
12891
12892 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12893
12894         * assembly.c: More refcount fixes.
12895
12896 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12897
12898         * string-icalls.c: if we're not trimming, return the same string.
12899         When not splitting, don't create a new string.
12900
12901 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12902
12903         * image.c:
12904         (mono_image_open): increment the ref_count inside the critical section.
12905
12906 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
12907
12908         * image.c (mono_image_open): Fix reference counting bug.
12909
12910 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
12911
12912         * marshal.c (mono_marshal_type_size) struct alignment changed for 
12913         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
12914         64bits. Avoid leak in mono_marshal_get_native_wrapper when
12915         mono_lookup_pinvoke_call throws.        
12916
12917 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12918
12919         * reflection.c (mono_reflection_parse_type): Fix #49114.
12920
12921         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12922         temporary workaround for cygwin header problem.
12923
12924         * object.c (mono_object_isinst): Synchronize this with the code
12925         generated by the JIT for casts.
12926
12927 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12928
12929         * reflection.c (encode_type): Fix #38332.
12930
12931 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12932
12933         * marshal.c (mono_marshal_method_from_wrapper): New function to return
12934         the original method from the wrapper method.
12935
12936 2003-09-25  Martin Baulig  <martin@ximian.com>
12937
12938         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12939         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12940         (ves_icall_Type_get_IsGenericInstance): New interncall.
12941
12942 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12943
12944         * object.c: fix cast warning in big endian code.
12945
12946 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12947
12948         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12949         
12950 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12951
12952         * assembly.c: don't call check_env from mono_assembly_load. It's
12953         already done once in mono_assemblies_init and may cause headaches when
12954         multiple threads are loading assemblies.
12955
12956 2003-09-19  Martin Baulig  <martin@ximian.com>
12957
12958         * reflection.c (mono_reflection_define_generic_parameter): Don't
12959         allocate `klass->methods', set `klass->flags' to
12960         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12961
12962 2003-09-18  Martin Baulig  <martin@ximian.com>
12963
12964         * class.c (mono_class_init): Don't create `class->methods' if it's
12965         already initialized.
12966
12967         * metadata.c (mono_metadata_load_generic_params): Make this
12968         actually work.
12969
12970         * reflection.c (mono_reflection_define_generic_parameter): Set
12971         parent class and interfaces from the constraints.
12972
12973         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12974         to keep this struct in sync with the declaration in TypeBuilder.cs.
12975
12976 2003-09-17  Martin Baulig  <martin@ximian.com>
12977
12978         * metadata.h (MonoType): Replaced the data's `int type_param'
12979         field with `MonoGenericParam *generic_param'.
12980         (MonoGenericParam): Added `MonoClass *klass'.
12981
12982         * class.c (mono_class_from_gen_param): Removed the
12983         `MonoImage *image' and `int type_num' arguments.
12984
12985         * metadata.c (mono_metadata_parse_generic_param): New static
12986         method; creates a MonoGenericParam which just contains the index.
12987         (do_mono_metadata_parse_type): Call
12988         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12989         MONO_TYPE_MVAR.
12990
12991         * reflection.c (mono_image_typedef_or_ref): Generic type
12992         parameters may be in the same assembly, but never use a typedef
12993         for them.
12994         (mono_reflection_define_generic_parameter): We're now creating a
12995         "real" class for the type parameter; it's now safe to call
12996         mono_class_from_mono_type() on the class'es type, it'll do the
12997         right thing.
12998
12999 2003-09-16  Martin Baulig  <martin@ximian.com>
13000
13001         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13002         `symfile->range_entry_size' and `symfile->class_entry_size' here;
13003         the `symfile' data structure must be fully initialized before it
13004         gets added to the table.
13005
13006 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13007
13008         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13009
13010         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13011         class init trampolines.
13012
13013 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13014
13015         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
13016         to the built-in profiler to turn off time and allocation profiling
13017         respectively.
13018
13019 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
13020
13021         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13022         g_direct_equal.
13023
13024         * debug-helpers.c (mono_method_full_name): Print the wrapper type
13025         in human readable form.
13026
13027 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13028
13029         * reflection.c icall.c: Fixed warnings.
13030
13031         * image.c (load_class_names): Use a temporary hash table to hold the
13032         namespaces in order to avoid doing many string comparisons.
13033
13034         * image.h: Fix typo.
13035
13036         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13037         Pass NULL instead of g_direct_equal to the GHashTable constructor 
13038         since the NULL case is short-circuited inside g_hash_table_lookup, 
13039         leading to better performance.  
13040
13041         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13042         obtain the first custom attribute for a given index. Depends on the
13043         CustomAttribute table being sorted by the parent field.
13044
13045         * reflection.c (mono_custom_attrs_from_index): Use the new function 
13046         for better performance.
13047
13048 2003-09-07  Martin Baulig  <martin@ximian.com>
13049
13050         * class.c (mono_class_init): If we're a generic instance, inflate
13051         all our methods instead of loading them from the image.
13052         (mono_class_from_generic): Set `class->methods = gklass->methods'.
13053
13054 2003-09-07  Martin Baulig  <martin@ximian.com>
13055
13056         * mono-debug-debugger.c: Added support for constructors.
13057
13058 2003-09-06  Martin Baulig  <martin@ximian.com>
13059
13060         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13061         New interncall.
13062
13063         * reflection.c (mono_reflection_setup_generic_class): Call
13064         ensure_runtime_vtable() to create the vtable.
13065
13066 2003-09-05  Martin Baulig  <martin@ximian.com>
13067
13068         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13069         MONO_TYPE_MVAR.
13070
13071 2003-09-04  Martin Baulig  <martin@ximian.com>
13072
13073         * reflection.c (mono_reflection_define_generic_parameter): Generic
13074         parameters start with zero.
13075
13076 2003-09-04  Martin Baulig  <martin@ximian.com>
13077
13078         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13079
13080         * reflection.h (MonoReflectionGenericParam): New typedef.
13081         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13082         the generic parameters from the managed TypeBuilder.
13083
13084         * reflection.c (mono_reflection_define_generic_parameter): New function.
13085         (mono_reflection_create_runtime_class): Encode generic parameters.
13086         (mono_reflection_setup_generic_class): New function; this is
13087         called after adding adding all generic params to the TypeBuilder.
13088         (encode_type): Added MONO_TYPE_VAR.
13089
13090 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13091
13092         * class.h class.c (mono_class_needs_cctor_run): Moved this method
13093         here from the JIT.
13094
13095         * assembly.h assembly.c: Moved the AOT loading code into an assembly
13096         load hook.
13097
13098 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
13099
13100         * reflection.h reflection.c class.h class.c: Delete duplicate 
13101         definition of mono_type_get_name () from reflection.c and export the
13102         one in class.c.
13103
13104         * class.c: Class loading fixes from Bernie Solomon 
13105         (bernard@ugsolutions.com).
13106
13107         * reflection.c: Endianness fixes from Bernie Solomon 
13108         (bernard@ugsolutions.com).
13109         
13110 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
13111
13112         * assembly.h assembly.c: Define a file format version for AOT
13113         libraries.
13114         
13115         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13116
13117         * appdomain.h (MonoJitInfo): New field to determine whenever the
13118         code is domain neutral.
13119         
13120 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
13121
13122         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13123
13124 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
13125
13126         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
13127         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13128         Avoid caching the result since strings must be domain specific. Fixes
13129         #48050.
13130
13131 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
13132
13133         * marshal.c (mono_marshal_init): Make this callable multiple times
13134         since it is hard to find a correct place to call it.
13135
13136         * object.c (mono_runtime_class_init): Execute static constructors in
13137         the correct appdomain.
13138
13139         * image.c (build_guid_table): Handle the case when multiple images have
13140         the same GUID.
13141
13142 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13143
13144         * icall.c: added a couple of icalls for System.Web.
13145
13146 2003-08-28  Martin Baulig  <martin@ximian.com>
13147
13148         * icall.c (ves_icall_Type_BindGenericParameters): Use
13149         `klass->generic_inst' instead of `&klass->byval_arg' in the
13150         mono_type_get_object() call.  The returned type must be
13151         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13152
13153 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
13154
13155         * NOTES: New file.
13156
13157         * object.c (mono_class_proxy_vtable): Make it thread safe.
13158
13159         * pedump.c: Fix warning.
13160
13161         * object.c appdomain.h: Get rid of metadata_section. 
13162         It is no longer needed and it was causing deadlocks with domain->lock.
13163
13164         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13165
13166 2003-08-26  Martin Baulig  <martin@ximian.com>
13167
13168         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13169
13170 2003-08-26  Martin Baulig  <martin@ximian.com>
13171
13172         * pedump.c (main): Call mono_metadata_init(),
13173         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13174         and mono_loader_init().
13175
13176 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
13177
13178         * loader.h: Add missing include to fix build.
13179
13180         * image.h: mono_image_load_references is no more.
13181
13182         * assembly.c: Reworked assembly loading to make it really thread safe.
13183         After these changes, the assembly returned by mono_assembly_open is
13184         fully initialized, i.e. all its references assemblies are loaded.
13185
13186         * assembly.c (mono_image_load_references): Renamed to 
13187         mono_assembly_load_references, and made private, since clients no
13188         longer need to call it.
13189
13190         * class.c: Removed calls to mono_assembly_load_references, since it was
13191         a source of deadlocks.
13192
13193         * loader.h loader.c class.h class.c: Protect data structures using a 
13194         new lock, the loader lock.
13195
13196         * class.c (mono_class_setup_vtable): Create temporary hash tables and
13197         GPtrArrays only when needed.
13198
13199         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
13200         into empty structures by mcs. Fixes pinvoke7.cs.
13201         
13202         * domain.c (mono_init): Call a new initialization function.
13203
13204         * appdomain.c (mono_runtime_init): Call the new initializer function
13205         of the marshal module.
13206
13207         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13208         inserted into empty structures by mcs. Fixes pinvoke7.cs.
13209
13210         * marshal.h marshal.c: Added locks around the wrapper caches to make
13211         this module thread safe.
13212
13213         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13214         this argument. Fixes pinvoke1.exe.
13215
13216 2003-08-25  Lluis Sanchez <lluis@ximian.com>
13217
13218         * object.h: Added call_type field to MonoMethodMessage and the corresponding
13219         enumeration of values. Removed fields to store remote call output values in
13220         MonoAsyncResult. Not needed any more.
13221         * object.c: Initialize call_type and async_result fields in mono_message_init.
13222         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13223         dispatching the message.
13224         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13225         async call to finish. To do it use a message with EndInvoke call type.
13226
13227 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
13228
13229         * loader.h loader.c (mono_method_hash_marhal_info): New function which
13230         determines whenever a method has marshalling info.
13231
13232 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13233
13234         * assembly.c: fix the build on windows.
13235
13236 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13237
13238         * object.cs: Fixed bug #47785.
13239
13240 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13241
13242         * string-icalls.c (StringReplace): If their are no occurances of
13243         the old string found return a reference to the supplied
13244         string. This saves some memory and matches MS behavoir.
13245         
13246 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13247
13248         * socket-io.c: fixed compilation for systems that define AF_INET6
13249         and don't define SOL_IP/SOL_IPV6.
13250
13251 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
13252
13253         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13254         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13255
13256         * rawbuffer.c rawbuffer.h: Make this module thread safe.
13257
13258         * domain.c: Make this module thread safe.
13259
13260         * domain.c (mono_init): Call new initialization function.
13261
13262         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13263         reference types too. Fixes #38812.
13264
13265         * image.c (mono_image_init): Fixed warnings.
13266
13267         * class.c (mono_class_from_typeref): Handle assembly load failure
13268         correctly.
13269
13270         * appdomain.c (add_assemblies_to_domain): Handle the case when
13271         the references of an assembly are not yet loaded.
13272
13273         * metadata.c image.c assembly.c: Moved initialization of global
13274         variables to a separate function called at startup since lazy 
13275         initialization of these variables is not thread safe.
13276         
13277         * image.c assembly.c: Made this module thread safe by adding locks in 
13278         the appropriate places.
13279
13280         * domain.c (mono_init): Call the new initialization functions of the
13281         three modules.
13282
13283 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
13284
13285         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13286           make a direct call. It is proxy's work to make the call asynchronous.
13287           mono_delegate_end_invoke(): If the targe is a proxy, just collect
13288           the return values.
13289         * object.cs: mono_method_call_message_new(): read AsyncResult and
13290           state object from parameters list, if this info is requested.
13291         * object.h: Added fields to store remote call output values in
13292           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13293
13294 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13295
13296         * object.h: add needed fields to MonoThread.
13297         * threads.c, threads.h: allow registering a function to cleanup data
13298         allocated per thread by the JIT.
13299
13300 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13301
13302         * loader.h: portability fix by Bernie Solomon
13303         * <bernard@ugsolutions.com>.
13304
13305 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
13306
13307         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
13308         return a MonoArray. This simplifies the code and also ensures that
13309         the cache allways contains an object reference as a value.
13310
13311         * icall.c (ves_icall_get_parameter_info): Simplified using the new
13312         function.
13313
13314 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13315
13316         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13317         fixes a problem with byte ordering when getting the address family for
13318         a socket.
13319
13320 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
13321
13322         * .cvsignore: Added monosn.
13323
13324         * reflection.h reflection.c loader.c: Added support for parameter
13325         marshalling to dynamically created types. Fixes #47295.
13326
13327 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13328
13329         * rand.c: remove useless warnings.
13330
13331 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13332
13333         * class.c: implemented ldtoken for methods and fieldrefs.
13334
13335 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13336
13337         * threadpool.c: when mono_async_invoke was called, no one took care of
13338         monitoring the queue. So if the method invoked took some time and we
13339         got new async invoke requests after 500 ms (the thread created waited
13340         that long in WaitForSingleObject), the new async invoke was not called
13341         until the previous one finished.
13342
13343         This is fixed now. Thanks to Totte for helping with it.
13344
13345 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13346
13347         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13348
13349 2003-08-11  Martin Baulig  <martin@ximian.com>
13350
13351         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13352
13353 2003-08-06  Martin Baulig  <martin@ximian.com>
13354
13355         * mono-debug-debugger.c: Added support for static fields,
13356         properties and methods.
13357
13358 2003-08-06  Martin Baulig  <martin@ximian.com>
13359
13360         * mono-debug-debugger.c: Don't store the MonoString's vtable to
13361         make this work for applications with multiple application domains.
13362
13363 2003-08-04  Martin Baulig  <martin@ximian.com>
13364
13365         * mono-debug-debugger.c: Completely reworked the type support; the
13366         most important thing is that we're now just using one single
13367         `MonoType' instance per type.
13368
13369 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13370
13371         * mono-endian.h, mono-endian.c, icall.c: Added icall
13372         ves_icall_System_Double_AssertEndianity to assert double word endianity
13373         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13374
13375 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13376
13377         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13378         support, icalls and fixes.
13379
13380 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
13381
13382         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13383         classes that are a punctuation character in .NET is not the same a
13384         g_unichar_ispunct.
13385
13386 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13387
13388         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13389
13390 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
13391
13392         * icall.c: Add new MemCopy internalcall.
13393         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13394         Simplified code; It is not necessary to handle all the cases here,
13395         as the C# code takes care of it.  Only handle the case of the name
13396         resource embedded into the assembly.
13397
13398         Changed signature to return the data pointer and the size of the
13399         data. 
13400
13401 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
13402
13403         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13404         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13405
13406 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13407
13408         * socket-io.c: ignore EINTR error in select.
13409
13410 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13411
13412         * class.h, class.c: removed unused subclasses field in MonoClass.
13413
13414 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13415
13416         * icall.c: improve fix of get_base_definition(). If the parent class
13417           doesn't have the mehod, look at the parent of the parent.
13418         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13419           to check if a parameter is an in or out parameter
13420           (PARAM_ATTRIBUTE_IN is not set by default).
13421           mono_method_return_message_restore(): Use mono_class_value_size to
13422           get the size of a value type. mono_type_stack_size (parameterType)
13423           does not return the correct value if parameterType is byRef.
13424           mono_load_remote_field(), mono_load_remote_field_new(),
13425           mono_store_remote_field(), mono_store_remote_field_new():
13426           raise exception if the remote call returns an exception.
13427
13428 2003-07-28  Martin Baulig  <martin@ximian.com>
13429
13430         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13431         method.  This is a wrapper around mono_runtime_invoke() which
13432         boxes the instance object if neccessary.
13433
13434 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13435
13436         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13437         metadata.h, row-indexes.h, verify.c: first cut of generics support.
13438
13439 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13440
13441         * icall.c: disable mcs bug workaround.
13442
13443 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13444
13445         * object.c (mono_runtime_class_init): Take the metadata_section
13446         mutex before obtaining the domain mutex.
13447
13448         * appdomain.h: Added definition of metadata_section mutex here. 
13449
13450         * object.c: define metadata_mutex here.
13451
13452 2003-07-24  Ravi Pratap  <ravi@ximian.com>
13453
13454         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13455         fixed.
13456
13457 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
13458
13459         * reflection.c: Fix bug #46669
13460
13461 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13462
13463         * exception.c:
13464         * exception.h:
13465         * icall.c:
13466         * object.h: fill in the type name for TypeLoadException.
13467
13468 2003-07-23  Ravi Pratap  <ravi@ximian.com>
13469
13470         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13471         relationship between TypeBuilders while compiling corlib) and bug
13472         45993 (Array types returned from the runtime while compiling
13473         corlib were from the loaded corlib).
13474
13475 2003-07-22  Martin Baulig  <martin@ximian.com>
13476
13477         * mono-debug-debugger.c: Reworked the type support a bit more;
13478         distinguish between types and classes.
13479
13480 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13481
13482         * icall.c: add IsArrayImpl icall.
13483
13484 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
13485
13486         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13487         initializing real_size only once. Also fix bug #46602.
13488
13489 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
13490
13491         * object.c: Renamed mono_metadata_section to metadata_section.
13492
13493 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
13494
13495         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13496           empty array if the type is an array. Fixed.
13497           ves_icall_MonoMethod_get_base_definition: if the base method
13498           is abstract, get the MethodInfo from the list of methods of
13499           the class.
13500         * reflection.c: ParameterInfo.PositionImpl should be zero-based
13501           and it was 1-based. Fixed in mono_param_get_objects.
13502
13503 2003-07-20  Martin Baulig  <martin@ximian.com>
13504
13505         * mono-debug.h: Set version number to 31.
13506         (mono_debug_init): Added `MonoDomain *' argument.
13507
13508         * mono-debug-debugger.c: Reworked the type support; explicitly
13509         tell the debugger about builtin types; pass the `klass' address to
13510         the debugger.
13511
13512 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13513
13514         * image.c: Allow new metadata tables to be loaded without a
13515         warning. Also update the warning message to give the new constant value.
13516                 
13517 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13518
13519         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13520         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
13521         array type representation changes.
13522
13523 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13524
13525         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13526         on Environment.Exit () call.
13527
13528 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13529
13530         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13531         requires a matching corlib.
13532
13533 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13534
13535         * Changelog: My editor decided to add a CR to each line. Sorry about that.
13536           Committed again without the CRs.
13537         
13538 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13539
13540         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13541           getting it from the "this" socket instance. Did not work
13542           if the socket is a subclass of Socket.
13543           Also fixed bug #35371.
13544
13545 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13546
13547         * metadata.c: fixed size for TypedByRef.
13548         * loader.c: when searching for a method, consider the vararg amrker.
13549         * unicode.c, decimal.c: constify some arrays.
13550
13551 2003-07-15  Dick Porter  <dick@ximian.com>
13552
13553         * socket-io.c: Fixed compilation for gcc < 3.2.
13554
13555         Fixed compilation for machines that don't have AF_INET6 (thanks to
13556         Bernie Solomon <bernard@ugsolutions.com> for that part.)
13557
13558         Fixed compile warnings.
13559         
13560         Fixed formatting and line endings.
13561
13562 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
13563
13564         * socket-io.h:
13565         * socket-io.c: Added IPv6 support.
13566
13567 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
13568
13569         * class.c (mono_class_is_assignable_from): New function to implement
13570         the is_assignable_from logic. Used by mono_object_isinst, 
13571         Type::IsAssignableFrom () and the interpreter.
13572
13573         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13574         Object, even interfaces.
13575         
13576         * object.c (mono_object_isinst): Implement in terms of 
13577         is_assignable_from.
13578
13579         * icall.c (ves_icall_type_is_assignable_from): New icall.
13580
13581 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
13582
13583         * domain.c (foreach_domain): fix compiler warning.
13584
13585 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
13586
13587         * image.c (load_metadata_ptrs): use g_strndup because strndup is
13588         not available on all plattforms
13589
13590 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
13591
13592         * image.h image.c: Store the metadata version string in MonoImage.
13593         * icall.c: New icall to retrieve the image version.
13594         * reflection.c (create_dynamic_image): Fill in the image version field
13595         * reflection.c (build_compressed_metadata): Use the image version
13596         from the image structure.
13597
13598 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13599
13600         * appdomain.c: modified comment.
13601         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13602         That will be its last iteration when mono_gc_cleanup is called from
13603         mono_runtime_cleanup and before the domain is unloaded.
13604
13605         Fixes bug #45962.
13606
13607 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
13608
13609         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13610         attributes.
13611
13612 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13613
13614         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13615         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13616         Bernie Solomon <bernard@ugsolutions.com>.
13617
13618 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13619
13620         * object.c, object.h: provide mono_object_new_fast() for faster
13621         allocation in some special cases.
13622
13623 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13624
13625         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13626         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13627
13628 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13629
13630         * threadpool.c: fix leaks.
13631
13632 2003-07-01  Dick Porter  <dick@ximian.com>
13633
13634         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13635         using MonoGHashTables.  Fixes threadpool bug posted to list.
13636
13637 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13638
13639         * image.h, image.c: added support to load an assembly from a byte array.
13640         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
13641         assembly bundle support.
13642
13643 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
13644
13645         * threadpool.c (mono_thread_pool_add): keep a reference to the
13646         AsyncResult to prevent GC
13647
13648 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13649
13650         * class.c: leak fix.
13651
13652 2003-06-25  Dick Porter  <dick@ximian.com>
13653
13654         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13655         for the async object, the WaitHandle object will close the handle.
13656         Fixes bug 45321.
13657
13658 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13659
13660         * class.c: in mono_array_class_get (), lookup from the hash with the
13661         same type we insert: this works around a bug in
13662         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13663         lluis. The real fix will have to wait for after the release.
13664
13665 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13666
13667         * icall.c: fix memory leak when getting type members.
13668
13669 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13670
13671         * reflection.c: added more pubtoken special cases.
13672
13673 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13674
13675         * class.c: handle field offset correctly when class size
13676         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13677
13678 2003-06-20  Martin Baulig  <martin@ximian.com>
13679
13680         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13681         *image' field.
13682
13683 2003-06-20  Martin Baulig  <martin@ximian.com>
13684
13685         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13686
13687 2003-06-20  Martin Baulig  <martin@ximian.com>
13688
13689         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
13690         just distinguish between variables in registers and variables at
13691         an offset relative to a register.
13692
13693 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13694
13695         * icall.c: #ifdef out latest changes until mcs is fixed.
13696
13697 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13698
13699         * icall.c: return members in metadata order.
13700
13701 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13702
13703         * icall.c: avoid infinite loop in GetTimeZoneData.
13704
13705 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13706
13707         * icall.c: added Marshal.Prelink/All icalls.
13708
13709 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13710
13711         * object.c, object.h: fix warnings and do some overflow checking
13712         when creating arrays.
13713
13714 2003-06-17  Dick Porter  <dick@ximian.com>
13715
13716         * file-io.h:
13717         * file-io.c: File attributes need to be tweaked slightly when
13718         passed from the managed to the w32 world.
13719
13720 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13721         * profiler.h profiler-private.h profiler.c: Rework last patch
13722         based on suggestion by Paolo.
13723         
13724 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13725
13726         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
13727         instruction level coverage data collection.
13728         * profiler.h profiler.c (: Added new callback function which can be
13729         used by the profiler to limit which functions should have coverage
13730         instrumentation.
13731         * profiler.c (mono_profiler_load): Call g_module_build_path to
13732         generate the file name of the profiler library.
13733
13734 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13735
13736         * profiler.c, profiler.h, profiler-private.h: added basic block 
13737         coverage profiling API.
13738
13739 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
13740
13741         * reflection.c (mono_reflection_create_runtime_class): Add support
13742         for events in dynamically generated code.
13743
13744         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13745         not allocated.
13746
13747 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13748
13749         * icall.c: when getting timezone info, return reasonable values if we
13750         can't get the actual data.
13751
13752 2003-06-14  Dick Porter  <dick@ximian.com>
13753
13754         * threads.c (start_wrapper): Remove the reference to the thread
13755         object in the TLS data, so the thread object can be finalized.
13756         This won't be reached if the thread threw an uncaught exception,
13757         so those thread handles will stay referenced :-( (This is due to
13758         missing support for scanning thread-specific data in the Boehm GC
13759         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13760
13761 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13762
13763         * reflection.c: ensure streams and tables are first allocated with
13764         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13765
13766 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13767
13768         * icall.c: fixed GetElementType for byrefs (bug# 44792).
13769
13770 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
13771
13772         * reflection.c (mono_reflection_create_runtime_class): Add support for
13773         properties to dynamically created classes.
13774         * reflection.c: Fix a few places where non-MonoObjects were inserted
13775         into the tokens hashtable.
13776
13777 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13778
13779         * object.c: some support to handle out of memory exceptions.
13780
13781 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
13782
13783         * marshal.c (mono_marshal_get_native_wrapper): support reference
13784         return types
13785
13786 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13787
13788         * object.h, object.c: more portability stuff from Bernie Solomon.
13789         Unexport mono_object_allocate(). Added mono_object_unbox ().
13790         Set exitcode when an unhandled exception is thrown.
13791
13792 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
13793
13794         * marshal.c (mono_marshal_get_native_wrapper): use custom
13795         marshaler for return types.
13796
13797 2003-06-10  Dick Porter  <dick@ximian.com>
13798
13799         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13800         ip_mreq is available
13801
13802 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13803
13804         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13805         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13806         by Bernie Solomon <bernard@ugsolutions.com>.
13807
13808 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
13809
13810         * gc.c (mono_gc_init): Avoid error message on shutdown when
13811         GC_DONT_GC=1 is used.
13812
13813         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
13814         New icall to return the GUID of a module.
13815
13816 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13817
13818         * class.c: ensure instance size always includes the parent's size
13819         even whem class size is set explicitly (fixes bug#44294).
13820
13821 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13822
13823         * profiler.h, profiler.c: made the simple profiler thread-safe,
13824         get more accurate timing info. Allow the loading of an
13825         externally-developed profiler module.
13826
13827 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
13828
13829         * marshal.c (mono_marshal_get_native_wrapper): improved
13830         class/byref arguments.
13831         (mono_marshal_get_native_wrapper): better string marshaling support.
13832
13833 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13834
13835         * class.c: ensure .pack and .size are handled correctly and
13836         simplified layout of static fields.
13837
13838 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13839
13840         * appdomain.c
13841         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13842
13843         * loader.c (mono_lookup_pinvoke_call): look for modules in the
13844         current directory (fix bug 44008)
13845
13846 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
13847
13848         * marshal.c (mono_marshal_get_native_wrapper): started support for
13849         custom marshalers.
13850         (mono_delegate_to_ftnptr): consider marshalling specifications
13851
13852 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13853
13854         * reflection.c, reflection.h: emit custom marshal info.
13855
13856 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13857
13858         * object.c: free the GError.
13859         * icall.c: added CloseEvent_internal.
13860         * threads.[ch]:
13861         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13862         call.
13863
13864 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
13865
13866         * loader.c (mono_method_get_signature): Add support for dynamic
13867         assemblies.
13868
13869 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13870
13871         * reflection.c: fixed bug #43905.
13872
13873 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13874
13875         * class.c, domain.c, icall.c, metadata.h, object.h: support for
13876         handling TypedReference and ArgIterator.
13877         * loader.c, loader.h: added function to get signature at call site.
13878
13879 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13880
13881         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
13882         data readonly. Buglets and warning fixes. Some MethodSpec support.
13883
13884 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13885
13886         * class.h, class.c, object.c: remove relative numbering support.
13887
13888 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
13889
13890         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13891         free the string, until we get a chance to fix Gtk#
13892
13893 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13894
13895         * marshal.c: revert last patch.
13896
13897 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13898
13899         * icall.c: updates for new mono_class_vtable() not calling
13900         the type constructor anymore.
13901
13902 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13903
13904         * object.h, object.c: separate vtable creation from type
13905         initialization. Make running the .cctor thread safe.
13906
13907 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13908
13909         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13910
13911 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13912
13913         * loader.c (mono_get_method): consider calling convention
13914
13915 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
13916
13917         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13918         to return the invisible global type for a module.
13919
13920         * reflection.c (mono_image_build_metadata): Emit global fields too.
13921
13922 2003-05-20  Peter Williams  <peterw@ximian.com>
13923
13924         * loader.c (mono_lookup_internal_call): Add a few newlines.
13925
13926 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
13927
13928         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13929         literal strings.
13930
13931         * appdomain.c (set_domain_search_path): Recalculate search path when
13932         AppDomainSetup.PrivateBinPath changes.
13933
13934         * object.c (mono_class_compute_gc_descriptor): It turns out some
13935         parts of the class libs (like System.Thread) holds pointers to
13936         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13937         to treat native int a pointer type here.
13938         
13939 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13940
13941         * appdomain.h, domain.c: add hashtable for jump target resolution.
13942
13943 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
13944
13945         * reflection.h reflection.c icall.c: Added new icalls 
13946         GetManifestResourceInfoInternal, GetModulesInternal and support
13947         infrastructure.
13948
13949 2003-05-16  Dick Porter  <dick@ximian.com>
13950
13951         * icall.c:
13952         * file-io.h:
13953         * file-io.c: Implement System.IO.MonoIO::GetTempPath
13954
13955 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
13956
13957         * object.c: mono_store_remote_field: little fix to previous patch.
13958
13959 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13960
13961         * class.c: add constructors to array classes.
13962         * icall.c: special case array construction for InternalInvoke (),
13963
13964 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
13965
13966         * class.h class.c reflection.c object.c: Added support for field
13967         defaults in dynamically generated classes.
13968
13969 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13970
13971         * reflection.c: properly encode charset for ddlimport.
13972
13973 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13974
13975         * threads.c: allow compiling without GC.
13976
13977 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13978
13979         * appdomain.h, object.c, object.h, threads.c, threads.h: added
13980         handling of thread static data.
13981
13982 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13983
13984         * reflection.h, reflection.c: added mono_custom_attrs_free ().
13985
13986 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13987
13988         * class.c (mono_array_class_get): always set the serializable flags
13989         (mono_array_class_get): always set the SEALED attribute for array types
13990
13991 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
13992
13993         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13994         attributes (fix for bug 42021).
13995
13996 2003-05-12  Dick Porter  <dick@ximian.com>
13997
13998         * gc.c: Don't run finalizers when the finalizer thread is
13999         finishing up, because the default domain has already been
14000         destroyed.
14001
14002 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
14003
14004         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14005         value is null, we should throw an exception.   This is slightly
14006         different than the other conventions used for the constructor.
14007
14008 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14009
14010         * socket-io.c: fixed windows build.
14011
14012 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14013
14014         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14015
14016 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
14017
14018         * object.c (mono_string_new_wrapper): Compatibility fix for MS
14019         compilers.
14020
14021 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
14022
14023         * class.c (mono_class_layout_fields): Add experimental GC aware
14024         auto layout facility. Requires class library changes to work correctly.
14025
14026         (mono_class_setup_vtable): Avoid overriding explicit interface
14027         method implementations. Fixes iface3.exe test.
14028
14029         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14030         object reference.
14031         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14032         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14033
14034         * metadata.h: Add new type classification macro which determines
14035         whenever the type holds an object reference.
14036
14037 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14038
14039         * marshal.c (mono_marshal_get_native_wrapper): cleanups
14040
14041 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
14042
14043         * gc.c (finalizer_thread): Work around a GC bug.
14044
14045 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
14046
14047         * marshal.c (emit_struct_conv): allow unions
14048
14049         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14050
14051 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
14052
14053         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14054
14055 2003-05-06  Martin Baulig  <martin@ximian.com>
14056
14057         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14058
14059 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14060
14061         * socket-io.c:
14062         (Select_internal): allow NULLs, don't create arrays if not needed.
14063         Coupled with Socket.cs changes.
14064
14065         * threadpool.c:
14066         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14067         register a finalizer for it that will close the semaphore handle. This
14068         fixes the leak and make Lupus' test run with > 4080 loops.
14069
14070 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14071
14072         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14073         Jerome Laban (bug #42287)
14074
14075 2003-05-02  Martin Baulig  <martin@ximian.com>
14076
14077         * debug-mono-symfile.h
14078         (MonoSymbolFile): Moved declaration into mono-debug.h.
14079         (MonoDebugMethodJitInfo): Likewise.
14080         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14081         argument.
14082         (_mono_debug_address_from_il_offset): Take a
14083         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14084
14085         * mono-debug.h
14086         (MonoDebugDomainData): New struct.
14087         (mono_debug_get_domain_data): New function.
14088         (mono_debug_add_method): Take an additional `MonoDomain *'
14089         argument.
14090         (mono_debug_source_location_from_address): Likewise.
14091         (mono_debug_il_offset_from_address): Likewise.
14092         (mono_debug_address_from_il_offset): Likewise.
14093
14094 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14095
14096         * reflection.c: one more check for null type in custom attrs.
14097
14098 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14099
14100         * reflection.c: avoid warning (comparison is always false due to limited
14101         range of data type).
14102
14103 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14104
14105         * icall.c: throw an exception in Type.GetField if the argument 'name'
14106         is NULL.
14107
14108 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14109
14110         * reflection.c: fixed handling of enums in named arguments to custom
14111         attributes (bug #42123).
14112
14113 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14114
14115         * reflection.c: use the right array element type and handle
14116         a null for a Type argument, too.
14117
14118 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14119
14120         * reflection.c: handle arrays as arguments to custom attributes.
14121
14122 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14123
14124         * reflection.c: handle a string value in a custom attr
14125         ctor that takes an object.
14126
14127 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14128
14129         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14130         (fix bug #42063)
14131
14132 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14133
14134         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14135
14136 2003-04-27  Martin Baulig  <martin@ximian.com>
14137
14138         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14139         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14140         MONO_DEBUGGER_EVENT_BREAKPOINT.
14141         (mono_breakpoint_trampoline_code): Removed.
14142         (mono_debugger_event_handler): The last argument is now a
14143         `guint32'.
14144         (mono_debugger_insert_breakpoint_full): Removed the
14145         `use_trampoline' argument.
14146         (mono_debugger_method_has_breakpoint): Likewise.
14147         (mono_debugger_trampoline_breakpoint_callback): Renamed to
14148         mono_debugger_breakpoint_callback(); take the method and
14149         breakpoint number as arguments.
14150
14151 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14152
14153         * metadata.c: fix off by one when loading parameters attributes.
14154
14155 2003-04-24  Martin Baulig  <martin@ximian.com>
14156
14157         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14158
14159 2003-04-24  Martin Baulig  <martin@ximian.com>
14160
14161         * mono-debug-debugger.c: Moved all code which interacts with the
14162         Mono Debugger here.
14163
14164         * debug-mono-symfile.c: This code now just deals with the symbol
14165         file itself, the debugger code is now in mono-debug-debugger.c.
14166
14167 2003-04-23  Martin Baulig  <martin@ximian.com>
14168
14169         * mono-debug.c (mono_debug_source_location_from_il_offset):
14170         New method; like mono_debug_source_location_from_address(), but
14171         takes an IL offset instead of a machine address.
14172
14173 2003-04-23  Martin Baulig  <martin@ximian.com>
14174
14175         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14176         `line' field; this is now computed by the debugger.
14177
14178 2003-04-23  Martin Baulig  <martin@ximian.com>
14179
14180         * mono-debug.[ch]: New files.  This is the new debugging interface.
14181
14182         * mono-debug-debugger.[ch]: New files.  Moved all code which
14183         interacts with the Mono Debugger here.
14184
14185 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14186
14187         * domain.c (mono_init): initialize mono_defaults.monitor_class
14188
14189 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
14190
14191         * reflection.c (method_encode_code): Add a spicy exception to help
14192         future compiler authors.
14193
14194 2003-04-21  Martin Baulig  <martin@ximian.com>
14195
14196         * icall.c
14197         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14198         Make this work with relative pathnames; g_filename_to_uri() needs
14199         an absolute filename.
14200
14201 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
14202
14203         * icall.c: Track name changes in Object and ValueType.
14204
14205 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
14206
14207         * metadata.c (mono_type_stack_size): size should be a multiple of
14208         sizeof (gpointer)
14209
14210 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14211
14212         * gc.c:
14213         (internal_domain_finalize): moved into mono_domain_finalize. No need
14214         to create another thread because the finalizers will be run in the
14215         finalizer thread.
14216         
14217         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14218         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14219         to be run (MS does this too).
14220
14221 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14222
14223         * object.c (mono_class_compute_gc_descriptor): Update comment.
14224
14225         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14226
14227         * image.h: Add synchronized wrapper cache.
14228
14229         * image.c (do_mono_image_open): Initialize cache.
14230
14231         * reflection.c (create_dynamic_mono_image): Initialize cache.
14232
14233 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14234
14235         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14236         ves_icall_System_Buffer_ByteLengthInternal.
14237
14238 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14239
14240         * reflection.c: setup klass->nested_in earlier. Allow
14241         a dash in the assembly name.
14242
14243 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
14244
14245         * metadata.c (mono_type_to_unmanaged): dont access
14246         type->data.klass for MONO_TYPE_OBJECT
14247         (mono_type_to_unmanaged): consider System.Delegate class
14248
14249 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14250
14251         * class.c: just setup supertypes in the proper place instead of
14252         initializing the full element class for arrays.
14253
14254 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14255
14256         * class.c: ensure the element class of arrays is initialized.
14257         Setup the supertype info for array classes, too.
14258
14259 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
14260
14261         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14262
14263 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14264
14265         * Makefile.am: re-added -m option when running cygpath. This way,
14266         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14267         separator.
14268         * mono-config.c: same codepath for locating mono config file for WIN32
14269         and the rest.
14270         * assembly.c: if mono_assembly_setrootdir is called, don't override
14271         the value set.
14272
14273 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14274
14275         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14276         MONO_ASSEMBLIES variable.
14277
14278 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14279
14280         * icall.c: added Assembly::GetNamespaces() icall.
14281
14282 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14283
14284         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14285
14286 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
14287
14288         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14289         * object.c: fixed bug in the construction of vtable for proxies
14290
14291 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14292
14293         * object.c (mono_array_new): Mark mono_array_new as an icall.
14294
14295 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14296
14297         * class.c: fixed test for public method when overriding interfaces.
14298         Closes bug #40970.
14299
14300 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14301
14302         * appdomain.h, domain.c: added mono_domain_foreach() to
14303         be able to access the currently loaded appdomains.
14304         * object.c: make string interning work across sppdomains.
14305         Mark some functions for use as icalls.
14306
14307 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14308
14309         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14310
14311         * reflection.h reflection.c: Allocate long living data using 
14312         GC_MALLOC_ATOMIC so the collector does not need to scan it.
14313
14314         * reflection.c: Double the allocation size in streams instead of
14315         increasing it, to prevent unneccesary copying on large assemblies.
14316         
14317         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14318         creation if the assembly does not have the Run flag set.
14319
14320 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14321
14322         * class.h: avoid the C++ keywords in header files (Jerome Laban
14323         spotted and fixed this).
14324
14325 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14326
14327         * object.c:
14328         (mono_unhandled_exception): fill in the arguments for the
14329         UnhandledException event. Only trigger that event for the default
14330         domain (as MS does).
14331
14332 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
14333
14334         * object.c: Improve typed allocation stuff based on suggestions from
14335         Paolo. Also turn it on if the GC library supports it.
14336
14337 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14338
14339         * object.c object.h class.h: Added experimental typed allocation
14340         facility using the interfaces in gc_gcj.h.
14341
14342         * os/gc_wrapper.h: Added new include files.
14343         
14344 2003-04-03  Martin Baulig  <martin@ximian.com>
14345
14346         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14347         which is not yet enabled by default.
14348
14349         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14350         functions.
14351         (mono_gc_lock, mono_gc_unlock): New static functions.
14352
14353         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14354         functions; stop/start the world for the garbage collector.  This
14355         is using the windows API; we need to complete the SuspendThread()/
14356         ResumeThread() implementation in the io-layer to make this work on Unix.
14357         (mono_gc_push_all_stacks): New public function; tells the garbage
14358         collector about the stack pointers from all managed threads.
14359
14360 2003-04-03  Martin Baulig  <martin@ximian.com>
14361
14362         * object.h (MonoThread): Added `gpointer stack_ptr'.
14363
14364         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14365
14366 2003-04-03  Martin Baulig  <martin@ximian.com>
14367
14368         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14369
14370 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14371
14372         * reflection.c (typebuilder_setup_fields): Initialize field.first and
14373         field.last.
14374
14375 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
14376
14377         * loader.c (mono_lookup_internal_call): Report the corlib that is
14378         out of sync.
14379
14380 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
14381
14382         * icall.c (ves_icall_type_GetTypeCode): fixed check for
14383         System.DBNull (it's class not valuetype).
14384
14385 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14386
14387         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
14388         if the array method was already assigned a token (fixes bug#40646).
14389
14390 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
14391
14392         * reflection.c (mono_reflection_get_type): Attempt type resolve even
14393         if no assembly is given.
14394
14395 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
14396
14397         * metadata.h: Added the new tables.
14398
14399         * row-indexes.h: Added definitions for new tables.
14400
14401         * metadata.c: Add schemas for new tables, and add support for
14402         computing the sizes of them.
14403
14404         * class.c: Update for handling the new type cases.
14405
14406 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
14407
14408         * metadata.h (MONO_TYPE_IS_VOID): new macro
14409
14410 2003-03-31  Martin Baulig  <martin@ximian.com>
14411
14412         * threads.h (MonoThreadCallbacks): Added `thread_created'.
14413
14414         * threads.c (mono_thread_new_init): Call `thread_created' in the
14415         mono_thread_callbacks.
14416
14417 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
14418
14419         * loader.h: added marshalbyrefobject_class to mono_defaults
14420         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
14421         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14422           generation of output parameters.
14423           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14424         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14425           contextbound and the target object belongs to the context of the caller.
14426         * object.h: added context and unwrapped_server variables in MonoRealProxy.
14427         * object.c: Implemented support for interfaces and abstract classes
14428           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14429           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14430
14431 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
14432
14433         * class.h class.c (mono_class_is_subclass_of): New function.
14434         
14435         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14436         routines for most common case (calls from ArrayList::ToArray).
14437
14438         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
14439         routine so programs which call Environment::Exit() can be profiled.
14440
14441         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
14442         Added MONO_ARCH_SAVE_REGS.
14443
14444         * icall.c (ves_icall_type_is_subtype_of): Use new function.
14445
14446 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
14447
14448         * blob.h: Add a couple of new MonoType types definitions.
14449
14450         * tabledefs.h: Add a couple of new call convs.
14451
14452 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
14453
14454         * reflection.h (MonoReflectionDynamicAssembly): track changes in
14455         the layout of the class.
14456
14457         * reflection.c (alloc_table): double the size on overflow to avoid
14458         unnecessary copying.
14459
14460         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14461         avoid filling out metadata tables and blobs. Also set mb->ilgen to
14462         null so it can be garbage collected.
14463         
14464 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
14465
14466         * reflection.c (mono_reflection_get_type): Return the resolved type
14467         only if it is in the assembly we searched.
14468
14469         * reflection.c (ensure_runtime_vtable): Initialize method slots.
14470
14471         * class.c (mono_class_setup_vtable): Set the slot of the overriding
14472         method.
14473
14474 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14475
14476         * appdomain.c:
14477         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14478         the right one is 'file:///blah', but MS allows it.
14479         * assembly.c:
14480         (mono_assembly_open): allow 'file://blah'
14481
14482         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14483
14484 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
14485
14486         * socket-io.c: fixes bug #40310.
14487
14488 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
14489
14490         * reflection.c (mono_reflection_parse_type): handle deeply nested
14491         types correctly.
14492
14493         * reflection.c (mono_image_create_token): Use unique token values
14494         since they will be put into a hash table.
14495
14496         * class.c (mono_class_setup_vtable): If a method occurs in more than
14497         one place in the vtable, and it gets overriden, then change the
14498         other occurances too.
14499
14500         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14501         object as return type.
14502
14503 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14504
14505         * icall.c: Deleted "ToString" implementation for double and float
14506         because they are full implemented in managed code.
14507
14508 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14509
14510         * reflection.c, reflection.h: implemented and exported functions
14511         to retrieve info about custom attributes.
14512
14513 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14514
14515         * appdomain.c: moved Uri handling to assembly.c
14516         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14517         work when using a file Uri in *nix and windows.
14518
14519         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14520         GetReferencedAssemblies.
14521
14522 2003-03-18  Dick Porter  <dick@ximian.com>
14523
14524         * icall.c: Rename a couple of internal calls
14525
14526         * threads.c: Set the thread state to Stopped when a thread exits.
14527         Fixes bug 39377.
14528
14529 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
14530
14531         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14532         New icall.
14533
14534         * object.c (mono_class_vtable): fix warning.
14535
14536 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
14537
14538         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14539
14540         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14541         memory.
14542         (method_encode_clauses): Create exception info structures in the right
14543         order.
14544         (mono_reflection_setup_internal_class): Initialize supertypes field.
14545
14546         * class.c object.c: Handle interfaces which implement other interfaces 
14547         correctly.
14548
14549         * class.h class.c: Move the supertypes array initialization code into 
14550         a separate function so it can be used for dynamic types too. Also call
14551         it earlier, in mono_class_init(), since it can be used before the
14552         type is initialized.
14553
14554 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14555
14556         * Makefile.am:
14557         * assembly.c:
14558         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14559
14560         * appdomain.c:
14561         * appdomain.h:
14562         * marshal.c:
14563         * object.c: remove warnings.
14564
14565 2003-03-13  Martin Baulig  <martin@ximian.com>
14566
14567         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14568         (MonoDebugLexicalBlockEntry): New types.
14569
14570         * debug-mono-symfile.c
14571         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14572
14573 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14574
14575         * process.c: ret can be any non-zero value accroding to MS doc.
14576
14577 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
14578
14579         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
14580         fixing a warning for a miss-used prototype, would have cause
14581         random memory corruption.
14582
14583 2003-03-07  Martin Baulig  <martin@ximian.com>
14584
14585         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14586         getting really annoying ....
14587
14588 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
14589
14590         * reflection.c (fixup_method): added support for array methods.
14591
14592 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14593
14594         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
14595         (pointed out by Michael Adams).
14596
14597 2003-03-04  Dick Porter  <dick@ximian.com>
14598
14599         * icall.c: Temporarily reverted the Double and Single ToString()
14600         change, because it broke nunit.
14601
14602 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14603
14604         * object.h, threads.h: make include files compatible with C++
14605         (patch by Jerome Laban <jlaban@wanadoo.fr>).
14606
14607 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14608
14609         * icall.c: Erased ToString helper functions for Double and Single.
14610         Now, that implementations ar all in managed code (Double and Single
14611         Formatters).
14612
14613 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
14614
14615         * appdomain.c: Added method for initializing the default context of
14616         a domain. Added internal call for getting the default context.
14617         * appdomain.h: Added context variable in MonoDomain struct.
14618         * domain.c: mono_domain_set also sets the default context of the domain
14619         * icall.c: Mapped internal method InternalGetDefaultContext.
14620         * object.c: mono_object_get_virtual_method returns always a remoting
14621         wrapper if the object is a transparent proxy.
14622         mono_runtime_invoke_array: when creating an object by calling the
14623         constructor, if the created object is a proxy, then the constructor should
14624         be called using the a remoting wrapper.
14625
14626 2003-03-03  Dick Porter  <dick@ximian.com>
14627
14628         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14629         variable so it compiles on solaris.  Problem spotted by
14630         Christopher Taylor <ct@cs.clemson.edu>
14631
14632 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14633
14634         * appdomain.c:
14635         (get_info_from_assembly_name): don't leak value.
14636
14637         * icall.c:
14638         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14639         result.
14640
14641 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14642
14643         * assembly.c: export mono_image_load_references ().
14644         * class.c: handle function pointers. mono_class_from_name() now
14645         supports nested type names directly.
14646
14647 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
14648
14649         * reflection.h reflection.c: Encode already created dynamic methods 
14650         and fields correctly as a DEF instead of a REF.
14651
14652         * reflection.c: Get rid of the force_ref argument to 
14653         mono_image_typedef_or_ref since it was wrong in the first place.
14654
14655         * string-icalls.c: add error checking to string constructors according
14656         to the MSDN docs.
14657
14658         * reflection.c: Emit types in the order their TypeBuilders were 
14659         created. Previously, a new table index was assigned to each type before
14660         the tables were emitted. This was wrong because the signature blob
14661         might already refer to a type by its original table index.
14662
14663 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
14664
14665         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14666         change.
14667         
14668 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14669
14670         * Makefile.am: make assemblies dir have \ instead of / on windows.
14671
14672 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
14673
14674         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14675         iterate over the NESTEDCLASS table using a linear search since the
14676         table is not guaranteed to be sorted by the secondary key.
14677
14678         * class.c (mono_class_create_from_typedef): fixed up call to
14679         mono_metadata_nesting_typedef.
14680         
14681 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
14682
14683         * marshal.c (mono_string_to_byvalstr): clear the memory as
14684         suggested by Jerome Laban <jlaban@wanadoo.fr>
14685
14686 2003-02-26  Dick Porter  <dick@ximian.com>
14687
14688         * process.c: Cope with padding in .rsrc blocks
14689
14690 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14691
14692         * metadata.h: reverted the filter_len change, it breaks reflection
14693         
14694 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14695
14696         * metadata.h: added a new field to store the filter_len
14697         
14698
14699 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14700
14701         * reflection.c: handle custom attributes for types and members
14702         created with Reflection.Emit (bug#38422).
14703
14704 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
14705
14706         * reflection.c: define RTSpecialName automatically for constructors for
14707         compatibility with MS.NET.
14708
14709         * reflection.c (mono_reflection_create_runtime_class): initialize
14710         nested_in field of dynamically created classes.
14711
14712 2003-02-22  Martin Baulig  <martin@ximian.com>
14713
14714         * debug-mono-symfile.h: Incremented version number.
14715
14716 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14717
14718         * object.h icall.c process.c: fix warnings.
14719
14720 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14721
14722         * appdomain.h appdomain.c:
14723         (mono_domain_try_type_resolve): split the 
14724         name_or_tb argument into a name and a tb argument.
14725         (mono_domain_has_type_resolve): new function to check whenever the
14726         application has registered a TypeResolve event handler.
14727         
14728         * icall.c reflection.h reflection.c: move the type resolve logic into
14729         mono_reflection_get_type () so it will be invoked when 
14730         Assembly::GetType () is called.
14731
14732         * reflection.c:
14733         (mono_reflection_get_type): renamed to get_type_internal.
14734         (mono_reflection_get_type): fixed type name generation so it works 
14735         for nested types too.
14736         (mono_reflection_get_type): call has_type_resolve () to avoid the 
14737         costly type name generation if there is no resolve event handler.
14738
14739 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14740
14741         * class.c, image.c: load exported types from file references.
14742
14743 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
14744
14745         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14746           used to cache the managed methods used to create proxies and make 
14747           remote invocation of methods.
14748         * class.h: Added in MonoVTable a flag to indicate that a class needs 
14749           to be remotely created.
14750         * object.c: Modified the method mono_class_vtable(). It now initializes 
14751           the remote flag of the vtable. Modified mono_object_new_specific(), 
14752           so now it checks the remote flag.
14753         * icall.c: Added a couple of internal methods, one for enabling instance 
14754           creation interception for a type, and one for creating objects bypassing
14755           the remote check.
14756
14757 2003-02-18  Martin Baulig  <martin@ximian.com>
14758
14759         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14760         New interncall to get a method's metadata token.
14761
14762         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14763         New interncall for the debugger.
14764
14765 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
14766
14767         * class.c (mono_class_setup_vtable): allocate supertype array
14768
14769 2003-02-18  Martin Baulig  <martin@ximian.com>
14770
14771         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14772
14773 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14774
14775         * reflection.c:
14776         (assembly_name_to_aname): jump over unknown properties (i've found
14777         something like: 'type, assembly, version=xxx, custom=null, public...',
14778         so now will ignore custom=null and still get the rest of the values).
14779
14780 2003-02-17  Dick Porter  <dick@ximian.com>
14781
14782         * threads.c: Have Thread.Start() wait for a semaphore to signal
14783         that the thread has set up all its local data.  This fixes bug
14784         34323, where Abort() raced the new thread's TLS data.
14785
14786         Also removes the handle_store() call from start_wrapper, because
14787         threads are now always created suspended and there is no longer a
14788         race between the parent and child threads to store the info.
14789
14790 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14791
14792         * image.c: explain the #- heap issue in a message, hopefully
14793         avoiding FAQs on mono-list.
14794
14795 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14796
14797         * icall.c:
14798         (GetEntryAssembly): if the domain has not invoked
14799         AppDomain.ExecuteAssembly yet, return the assembly of the default
14800         AppDomain.
14801
14802 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
14803
14804         * class.c (mono_ldtoken): make it work in dynamic assemblies.
14805
14806 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14807
14808         * metadata.c, reflection.c: simple speedup to type hash
14809         and equals code.
14810
14811 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14812
14813         * image.c, image.h, class.c, assembly.c: move module loading
14814         to MonoImage. When loading metadata, consider alignemnet from
14815         the start of metadata, not from the metadata address in memory.
14816
14817 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
14818
14819         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
14820         AssemblyBuilder objects. Factored out custom attribute creation into
14821         a separate function.
14822         (create_custom_attr): new function to create custom attributes.
14823
14824 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
14825
14826         * Makefile.am: Got tired of typing the full pathname to pedump.
14827         Until there is another option, am installing this.
14828
14829 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
14830
14831         * class.c (class_compute_field_layout): always set field->parent 
14832         (mono_ldtoken): use mono_defaults.fieldhandle_class;
14833
14834 2003-02-11  Dick Porter  <dick@ximian.com>
14835
14836         * threads-types.h:
14837         * monitor.c: Rewrote Monitor, making lock much faster and
14838         Pulse/Wait work as specified.  Also uses much fewer handles, and only
14839         creates them as needed.
14840
14841         * exception.c: Added SynchronizationLockException
14842
14843         * threads.c: Deleted old Monitor implementation.  The new one is
14844         in a new file.
14845
14846 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14847
14848         * class.c: handled TypedReference type code. Set the correct size for
14849         class data. Setup interface_offsets for interface classes, too.
14850
14851 2003-02-09  Martin Baulig  <martin@ximian.com>
14852
14853         * debug-mono-symfile.h: Reflect latest symbol writer changes.
14854
14855 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14856
14857         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14858         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14859         * object.c: fixed mono_object_get_virtual_method () for interfaces.
14860         * verify.c: check for code that runs after the end of the method.
14861
14862 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14863
14864         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14865         "System.Math::Round2".
14866         * sysmath.h: Added Floor, Round and Round2 definitions.
14867         * sysmath.c: Modified certain functions that were not 100% compliant
14868         with MS.NET (math precision) and added the implementation of Floor,
14869         Round and Round2.
14870
14871 2003-02-07  Martin Baulig  <martin@ximian.com>
14872
14873         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14874
14875 2003-02-07  Martin Baulig  <martin@ximian.com>
14876
14877         * debug-mono-symfile.c: Reflected latest symwriter changes.
14878         (mono_debug_create_mono_symbol_file): Removed.
14879         (mono_debug_open_mono_symbol_file): Take an argument which
14880         specifies whether to create a dynamic symbol file.
14881
14882 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
14883
14884         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14885
14886 2003-02-05  Martin Baulig  <martin@ximian.com>
14887
14888         * reflection.c (mono_image_build_metadata): Make this public,
14889         protect it against being called multiple times, don't create
14890         resources and don't build the compressed metadata here.
14891         (mono_image_create_pefile): Do this here.
14892
14893         * icall.c
14894         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14895
14896 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14897
14898         * socket-io.c: fixed bug #36322.
14899
14900 2003-02-06  Piers Haken <piersh@friskit.com>
14901
14902         * appdomain.[ch]:
14903         * class.h:
14904         * debug-mono-symfile.c:
14905         * icall.c:
14906         * loader.c:
14907         * mono-config.c:
14908         * monosn.c:
14909         * reflection.c:
14910         * socket-io.c: warning cleanups
14911
14912 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
14913
14914         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14915         function. works like remoting invoke, but does a check for the Proxy first.
14916
14917 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
14918
14919         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14920
14921 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
14922
14923         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14924         array of pointers.
14925         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14926         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14927
14928         * object.c (mono_store_remote_field_new): used by the new jit
14929         instead of mono_store_remote_field
14930         (mono_load_remote_field_new): used by the new jit
14931         instead of mono_load_remote_field
14932
14933 2003-02-05  Patrik Torstensson
14934
14935         * appdomain.c: changed unload to take the domain id instead
14936         of domain
14937         
14938         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14939
14940
14941 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14942
14943         * appdomain.c: don't look for assemblies in ApplicationBase if
14944         PrivateBinPathProbe is set.
14945
14946 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14947
14948         * object.c: make the first argument in main_args contain the absolute
14949         path to the assembly. Fixes bug #37511.
14950
14951 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14952
14953         * icall.c: get correct UTC offset for countries not using daylight
14954         time saving. Fixes bug #30030.
14955
14956 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14957
14958         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14959         and 1 are the family).
14960
14961 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
14962
14963         * icall.c (ves_icall_InternalExecute): removed wrong assertion
14964
14965         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14966
14967 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
14968
14969         * reflection.c: added support for SignatureHelper tokens, which is
14970         needed by the Calli opcode.
14971
14972         * reflection.h: track changes to SignatureHelper class.
14973
14974         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14975
14976 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14977
14978         * appdomain.c: fixed loading assemblies from PrivateBinPath.
14979
14980 2003-02-03  Patrik Torstensson
14981         * appdomain.[c|h], domain.c : 
14982          - Added support for getting a domain via domain id
14983          - Support for setting and getting domain from System.AppDomain 
14984            (used in cross appdomain channel)
14985          - Added support for get/set for a MonoAppContext on a thread 
14986            (Context class in System.Runtime.Remoting.Contexts),
14987          - Removed hack in Get/SetData and ExecuteAssembly.
14988         
14989         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14990         the managed world to get control when a proxy is created.
14991
14992         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14993         
14994 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
14995
14996         * icall.c
14997         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14998         Populate the codebase field as well.
14999
15000 2003-02-02  Martin Baulig  <martin@ximian.com>
15001
15002         * debug-mono-symfile.c
15003         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15004         (mono_debug_symfile_add_method): Allow interncalls.
15005
15006 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15007
15008         * icall.c: throw parse exception if strtod fails or the string is empty.
15009
15010 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15011
15012         * marshal.c: handle object type separately from defined
15013         class types.
15014
15015 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
15016
15017         * marshal.c: handle NATIVE_LPSTR for strings when it's
15018         explicitly specified.
15019
15020 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15021
15022         * reflection.c, reflection.h, icall.c: setup the reflection
15023         handle cache for ModuleBuilders and AssemblyBuilders.
15024
15025 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
15026
15027         * reflection.c (reflection_methodbuilder_to_mono_method): set
15028         pinvoke flag
15029
15030 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15031
15032         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15033
15034 2003-01-29  Dick Porter  <dick@ximian.com>
15035
15036         * threads.c: No need for the fake_thread kludge now that Thread
15037         doesn't run a class constructor
15038         
15039 2003-01-29  Dick Porter  <dick@ximian.com>
15040
15041         * threads.c: Use g_direct_hash instead of the rather bogus
15042         g_int_hash
15043
15044 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
15045
15046         * marshal.c (mono_marshal_get_native_wrapper): add check for null
15047         (fix pinvoke12.exe)
15048         (mono_marshal_get_struct_to_ptr): generate valid IL code
15049         (mono_marshal_get_ptr_to_struct): generate valid IL code
15050         (*): correctly set sig->pinvoke, we need to memdup the signature
15051         to do that
15052
15053 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15054
15055         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15056         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15057
15058 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15059
15060         * profiler.c: provide more callers information.
15061
15062 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
15063
15064         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15065
15066         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15067
15068         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15069
15070 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15071
15072         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15073         exception instead of going into an infinite loop on dates which it 
15074         can't yet handle.
15075
15076         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
15077         out-of-range exception if needed.
15078
15079         * class.c (mono_class_setup_vtable): allow a virtual method to provide
15080         an implementation for an interface method and to override an inherited
15081         method at the same time. 
15082         Imagine a scenario when a virtual method is used to override a
15083         virtual abstract method in a parent class, and this same method 
15084         provides an implementation for an method inherited from an interface. 
15085         In this case, the interface resolution code will set im->slot, which 
15086         means that the virtual method override pass will skip this method 
15087         which means a pointer to the abstract method inherited from the parent
15088         will remain in the vtable of this non-abstract class.
15089
15090         * class.c: (mono_class_setup_vtable): continue search for a real 
15091         method if only an abstract method is found.     
15092
15093 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15094
15095         * reflection.c: add size to encoding for ByValStr and ByValArray
15096         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15097
15098 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15099
15100         * class.c (mono_class_setup_vtable): pass the override info as an
15101         argument.
15102
15103         * class.c (mono_class_setup_vtable): set the slot of overriding methods
15104         correctly.
15105         
15106         * reflection.c (ensure_runtime_vtable); add support for method 
15107         overrides.
15108         
15109 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15110
15111         * reflection.c (resolution_scope_from_image): Hack to work to work with
15112         dynamic assemblies.
15113
15114         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
15115         added a 'force_ref' argument to force this function to allways return 
15116         a TypeRef. This is needed by mono_image_get_memberref_token ().
15117         
15118 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15119
15120         * reflection.c (mono_image_get_type_info): interfaces really don't have
15121         a parent.
15122
15123         * reflection.c (mono_image_basic_init): fill out missing fields of
15124         image structure.
15125
15126         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
15127         dynamic assemblies. This is required so dynamic assemblies show up in
15128         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15129         Type::GetType() etc. This is consistent with MS behaviour.
15130
15131         * image.c image.h reflection.c: add newly created classes to the name 
15132         cache so mono_class_get () will find them.      
15133
15134 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15135
15136         First part of changes to get IKVM.NET running under mono.
15137         
15138         * appdomain.h, appdomain.c: added new function 
15139         mono_domain_try_type_resolve() which will emit TypeResolve events. 
15140         This function will call AppDomain::DoTypeResolve to do the actual work.
15141
15142         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
15143         moved existing code dealing with dynamic tokens to a new function 
15144         called mono_reflection_lookup_dynamic_token (). This function will 
15145         raise TypeResolve events when appropriate. Since reflection.c is not 
15146         part of libmetadata, a new hook function called 
15147         mono_lookup_dynamic_token() is added to class.c which will call this.
15148
15149         * assembly.h assembly.c: make the invoke_load_hook function public,
15150         so it can be called for dynamic assemblies.
15151
15152         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15153
15154         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
15155         type isn't found.
15156
15157         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
15158         MonoGHashTable, since it contains pointers to objects which the GC 
15159         needs to track.
15160
15161         * assembly.c (search_loaded): remove unused variable.
15162         
15163 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15164
15165         * object.c: fixed issue exposed by gcc-generated IL programs
15166         that use RVA data for pointers.
15167
15168 2003-01-25  Martin Baulig  <martin@ximian.com>
15169
15170         * threads.c (start_wrapper): Moved the initialization of
15171         `start_func' above the mono_new_thread_init() call to which we
15172         pass it as argument.
15173
15174 2003-01-24  Martin Baulig  <martin@ximian.com>
15175
15176         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15177         the MonoThread pointer.
15178
15179 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
15180
15181         * icall.c: Rename `PowImpl' to Pow.
15182
15183 2003-01-23  Dick Porter  <dick@ximian.com>
15184
15185         * threads.c (start_wrapper): Create a Thread object if needed, so
15186         the Main() thread can do the class initialisation in a subthread
15187         that has been set up to allow managed code execution.
15188
15189         Pass the thread ID instead of the MonoThread pointer to the thread
15190         start and attach callbacks.  This change is required, because the
15191         jit thread start callback must be called _before_ the Thread
15192         object can be created.
15193         
15194         (mono_thread_init): Removed much object creation code that is no
15195         longer needed.  No managed code is called from here now.
15196
15197         * object.c (mono_runtime_exec_managed_code): Create a subthread
15198         for Main, and call back to the runtime to use it.
15199         Set the exit code when Main exits.
15200
15201         * gc.c: Make sure domain finalisation happens in a subthread.
15202         Re-enable threaded GC, fixing bug 31333 (again).
15203
15204         * environment.c: System.Environment internall calls (so far just
15205         ExitCode is here, the others are still in icall.c)
15206
15207         * appdomain.c (mono_runtime_cleanup): All threads running managed
15208         code should have finished before mono_runtime_cleanup() is
15209         reached, so no need to clean up threads.
15210
15211 2003-01-22  Martin Baulig  <martin@ximian.com>
15212
15213         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15214         `gpointer func' arguments.      
15215         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15216         but added `MonoThread *thread' argument.
15217         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15218
15219         * threads.c (mono_new_thread_init): Added `gpointer func' argument
15220         and pass it to the mono_thread_start_cb callback.
15221         (mono_install_thread_callbacks): New public function to install a
15222         set of callbacks which are set by the debugger.
15223         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15224
15225 2003-01-22  Martin Baulig  <martin@ximian.com>
15226
15227         * Makefile.am: Install debug-mono-symfile.h.
15228
15229 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
15230
15231         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15232
15233 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
15234
15235         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15236         * class.c (mono_ptr_class_get): correctly set access levels of pointers
15237         (mono_array_class_get): correctly set access levels of arrays
15238
15239 2003-01-20      Patrik Torstensson
15240         * image.h (MonoAssemblyName): changed major, minor, build, revision
15241         from signed to unsigned.
15242
15243 2003-01-20  sean kasun <skasun@azstarnet.com>
15244
15245         * reflection.c (load_cattr_value): Now this handles
15246         MONO_TYPE_SZARRAY.  Fixes bug #35629
15247
15248 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
15249
15250         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15251         integer value
15252
15253 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15254
15255         * decimal.c: fixed bug #26056.
15256
15257 2003-01-17  Martin Baulig  <martin@ximian.com>
15258
15259         * gc.c: Raise an ExecutionEngineException instead of using g_error().
15260
15261 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15262
15263         * exception.[ch]:
15264         (mono_get_exception_type_initialization): new function.
15265
15266         * object.c: throw a TypeInitializationException when an exception is
15267         thrown invoking the class constructor.
15268
15269 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15270
15271         * reflection.c: fixed attribute reading.
15272
15273 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15274
15275         * icall.c:
15276         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15277         provided, look for the type in the calling assembly and then in
15278         mscorlib; if the assembly name is provided, only try that one.
15279
15280 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15281
15282         * object.c: register the vtable before there is a chance it's
15283         queried again recursively.
15284
15285 2003-01-13  Duncan Mak  <duncan@ximian.com>
15286
15287         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15288         gc-internal.h. 
15289         
15290 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
15291
15292         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15293
15294 2003-01-11  Martin Baulig  <martin@ximian.com>
15295
15296         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15297         this to 20 for the release.
15298
15299 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
15300
15301         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15302
15303         * loader.c (mono_method_get_marshal_info): bug fix
15304
15305         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15306         structures with explicit layout
15307
15308 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15309
15310         * profiler.c: made the output more readable (and sorted). 
15311         Added caller information for the allocation profiler.
15312
15313 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
15314
15315         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15316
15317 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15318
15319         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15320         to get value types.
15321         
15322 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15323
15324         * object.c, profiler.h, profiler.c, profiler-private.h:
15325         Added object allocation profiler.
15326
15327 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15328
15329         * reflection.h, reflection.c: handle global methods.
15330         Compress blob entries.
15331
15332 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15333
15334         * marshal.c: fix compilation.
15335
15336 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
15337
15338         * loader.c (mono_method_get_marshal_info): impl.
15339
15340         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15341
15342 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15343
15344         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15345         for reference types.
15346
15347 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15348
15349         * loader.c: fixed off by one error in loaded parameter names.
15350
15351 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
15352
15353         * marshal.c (mono_marshal_get_icall_wrapper): like
15354         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15355         instead of a MonoMethod.
15356
15357 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15358
15359         * decimal.c: fixed bug #36537.
15360
15361 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15362
15363         * marshal.c: throw a missing method exception if a
15364         P/Invoke method is not found.
15365
15366 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15367
15368         * icall.c: allow a null this for constructors.
15369
15370 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15371
15372         * icall.c: raise the proper exceptions if the arguments to the
15373         internal Invoke are incorrect.
15374
15375 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
15376
15377         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15378
15379 2003-01-03  Martin Baulig  <martin@ximian.com>
15380
15381         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15382
15383 2002-12-31  Martin Baulig  <martin@ximian.com>
15384
15385         * debug-mono-symfile.c: Completely rewrote the type section.
15386         Instead of using individual malloc()ed fields, we use one big
15387         continuous memory area and offsets into this area.
15388         See the comments in the source code for details.
15389
15390 2002-12-30  Martin Baulig  <martin@ximian.com>
15391
15392         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15393
15394 2002-12-30  Martin Baulig  <martin@ximian.com>
15395
15396         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15397         line number table in this data blob instead of using an external
15398         pointer.
15399
15400 2002-12-28  Martin Baulig  <martin@ximian.com>
15401
15402         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15403
15404 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
15405
15406         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15407         as a boxed return type.
15408
15409 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
15410
15411         * appdomain.c
15412         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15413         g_build_filename to properly get separators on the filename created.
15414
15415         * object.h: Small change, introduce MonoMarshalByRefObject to
15416         track the layout of that structure in the C# universe as we make
15417         changes there.
15418
15419 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15420
15421         * object.c: removed assert to allow static fields on interfaces.
15422         * loader.c: a TypeSpec may be used for any type, not just arrays.
15423
15424 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15425
15426         * class.c, class.h: added mono_class_array_element_size ().
15427         Ignore static methods in interfaces.
15428
15429 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15430
15431         * threads.c: fixed the build under cygwin.
15432
15433 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15434
15435         * reflection.c: handle nullref constants. Allocate keys for
15436         reflection handles with the GC.
15437
15438 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15439
15440         * threads.c, threads.h: added mono_thread_get_abort_signal()
15441         to get a suitable signal for thread abort.
15442
15443 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15444
15445         * metadata.c: fix handling of ExportedType table.
15446
15447 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15448
15449         * icall.c: added WriteWindowsDebugString internal call.
15450
15451 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15452
15453         * reflection.h: added fields to match C# implementation.
15454
15455 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15456
15457         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15458
15459 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
15460
15461         * gc.h, gc-internal.h: Rename header for GC internal calls to
15462         gc-internal.h from gc.h as to not clash with Boehm GC having its
15463         header installed as <gc.h> in outside include paths.
15464         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15465         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15466
15467 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15468
15469         * icall.c: assign minor, build and revision in FillName.
15470
15471 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
15472
15473         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15474         Added support for running code generated by Reflection.Emit.
15475
15476 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15477
15478         * appdomain.c: check for NULL argument in LoadFrom.
15479
15480 2002-12-10  Dick Porter  <dick@ximian.com>
15481
15482         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15483
15484 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15485
15486         * appdomain.c: fix buglet when building exe file name.  Handle full
15487         assembly name (needed after latest changes to AssemblyName).
15488         * image.c:
15489         (mono_image_close): free some hashtables.
15490
15491 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
15492
15493         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
15494         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
15495         on some systems (redhat 7.3) 
15496
15497 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
15498
15499         * threads.c: delete the critical section of a sync block,
15500         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15501
15502 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15503
15504         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15505
15506 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15507
15508         * appdomain.[ch]: handle the assembly preload event to try loading the
15509         assemblies using the paths we have in the current domain.
15510
15511         * assembly.[ch]: created an assembly preload hook that is called to try
15512         loading the assembly by other means that the ones provided here.
15513
15514         * domain.c: initialize the domain search path.
15515
15516         From now on, assemblies (TODO: except corlib and System) are loaded
15517         according to these rules when using mono_assembly_load ():
15518
15519                 1. It tries to load the assembly from the ApplicationBase
15520                 of the current domain appending .dll and .exe (TODO: have to
15521                 try loading from name/name.dll and name/name.exe).
15522
15523                 2. It tries the search path specified in PrivateBinPath for the
15524                 current domain (if any).
15525
15526                 3. Previous behavior.
15527
15528 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15529
15530         * icall.c: implemented GetInterfaceMap() related icall.
15531         * domain.c, loader.h: load MethodInfo in mono_defaults.
15532
15533 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15534
15535         * gc.c: disable the finalizer thread for now, untill all the issues
15536         with it are resolved.
15537
15538 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15539
15540         * string-icalls.c: handle embedded nulls in string ctor when the
15541         length is specified.
15542
15543 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15544
15545         * class.c: look for explicit interface implementation in parent
15546         classes, too.
15547
15548 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
15549
15550         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
15551
15552 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15553
15554         * gc.c: protect handles with a critical section.
15555
15556 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15557
15558         * icall.c:
15559         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15560         parameters. If no assembly specified, try getting the type from all
15561         the assemblies in the current domain, else, load the assembly and get
15562         the type from it.
15563
15564 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15565
15566         * marshal.c: applied patch from Aleksey Demakov that fixes
15567         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15568
15569 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15570
15571         * icall.c: fixed get_location.
15572
15573 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
15574
15575         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15576         declarations to make it work with older gcc. 
15577
15578         * loader.c (mono_get_method): set signature->pinvoke for native calls
15579
15580 2002-11-20  Dick Porter  <dick@ximian.com>
15581
15582         * threads.c (mono_thread_init): Set the main thread's handle
15583
15584 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15585
15586         * gc.c: allow compilation without GC support. Changed to match the
15587         mono coding style.
15588
15589 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15590
15591         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15592
15593 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15594
15595         * reflection.c: set a public key token on the core assemblies.
15596
15597 2002-11-18  Dick Porter  <dick@ximian.com>
15598
15599         * threads.c: Split out some thread initialisation so that other
15600         files can set the start callback function.
15601
15602         * gc.c: Run finalisers in a separate thread, to avoid stack
15603         overflow.  Fixes bug 31333.
15604
15605         * appdomain.c: Set up GC finalisation thread.
15606
15607         * reflection.c: 
15608         * object.c: 
15609         * domain.c: Use gc.h macros for GC_malloc
15610         
15611 2002-11-15  Dick Porter  <dick@ximian.com>
15612
15613         * threadpool.c: 
15614         * threads.c:
15615         * appdomain.c: Removed mono_runtime_init_with_attach(),
15616         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15617         merging the extra parameter with the existing function.  Removed
15618         unneeded code in mono_thread_attach().
15619
15620 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
15621
15622         * image.c (mono_image_loaded_by_guid): a method to get loaded
15623         images by guid. 
15624         (load_metadata_ptrs): we store the guid as string.
15625
15626 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
15627
15628         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15629
15630         * metadata.c (mono_guid_to_string): imported method form Zoltan
15631         Varga (slightly modified)
15632
15633         * assembly.c (mono_assembly_open): load precompiled code
15634
15635         * loader.h (MonoMethod): we store the method token for use in the
15636         aot compiler. 
15637
15638 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15639
15640         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15641         the hook function called when an assembly is loaded.
15642         
15643         * domain.c: Modified file.
15644         (mono_domain_assembly_load): removed hash table insertion of assemblies.
15645
15646         Fixes bug #33196.
15647
15648 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
15649
15650         * reflection.c: Map PEFileKind to the value expected by the WinNT
15651         image loader. 
15652
15653 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15654
15655         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15656         Read until the buffer is filled completely.
15657
15658 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15659
15660         * icall.c: implemented MonoType.InternalGetEvent ().
15661
15662 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15663
15664         * appdomain.c: implemented InitAppDomainSetup. Delayed
15665         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15666         the entry_assembly.
15667
15668         * assembly.c: base_dir is now an absolute path ending with
15669         G_DIR_SEPARATOR.
15670
15671         * icall.c: modified get_location according to the above changes.
15672
15673         * object.c: init AppDomain.SetupInformation for the default domain after
15674         we have the entry assembly.
15675
15676         * domain.c: when unloading a domain, setup = NULL.
15677
15678 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
15679
15680         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15681
15682 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15683
15684         * object.h, object.c: introduced mono_object_get_virtual_method ()
15685         to lookup the method invoked on an object when a callvirt is done on
15686         a method.
15687         * icall.c: make MethodInfo::Invoke() always do a virtual call.
15688
15689 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15690
15691         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15692         current domain when loaded an assembly and failed to load it.
15693
15694         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15695
15696 2002-10-31  Dick Porter  <dick@ximian.com>
15697
15698         * icall.c: 
15699         * file-io.h: 
15700         * file-io.c: Return the error status in a parameter, as the
15701         GetLastError() value has long since been blown away if we try and
15702         look it up in a subsequent internal call invocation.  Delete the
15703         GetLastError() internal call, because it's useless.
15704
15705 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
15706
15707         * class.[ch]: added cast_class to fix bug 29517
15708
15709 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15710
15711         * marshal.c: create valid IL code in the filter clause:
15712         the new JIT is less forgiving:-)
15713
15714 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15715
15716         * icall.c: removed get_property internal call.
15717
15718 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
15719
15720         * appdomain.h domain.c: Added an ID to appdomains.
15721         
15722         * threads.c threads.h icall.c: Implement icall
15723         Thread:GetDomainID(), and remove unused icall 
15724         CurrentThreadDomain_internal.
15725
15726 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15727
15728         * icall.c: Don't recurse through the base types in GetConstructor.
15729         Fixes bug #32063. 
15730
15731 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15732
15733         * mempool.h, mempool.c: added mono_mempool_empty() and
15734         mono_mempool_stats().
15735
15736 2002-10-23  Dick Porter  <dick@ximian.com>
15737
15738         * file-io.c: 
15739         * file-io.h: 
15740         * icall.c: Added MonoIO.GetFileType internal call
15741
15742 2002-10-17  Dick Porter  <dick@ximian.com>
15743
15744         * appdomain.c (mono_runtime_cleanup): Don't signal the async
15745         delegate semaphore before waiting for all threads to finish,
15746         because new threads can also call async delegates.  Fixes bug
15747         32004.
15748
15749         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15750         of 3 seconds, in case another async job is queued.  (This part is
15751         needed because the bug fix reintroduced the 3s exit lag.)  This
15752         makes the mono_runtime_shutdown flag superfluous.
15753
15754 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15755
15756         * reflection.c: include ehader size in method section headers.
15757         Really check for suplicated modules entries.
15758
15759 2002-10-17  Martin Baulig  <martin@gnome.org>
15760
15761         * debug-mono-symfile.c: Added back support for locals.
15762
15763 2002-10-14  Martin Baulig  <martin@gnome.org>
15764
15765         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15766         MONO_TYPE_VOID.
15767
15768 2002-10-14  Martin Baulig  <martin@gnome.org>
15769
15770         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15771         mono_class_get() instead of looking in the class cache. 
15772
15773 2002-10-13  Martin Baulig  <martin@gnome.org>
15774
15775         * debug-mono-symfile.c: Set version number to 28, include the
15776         signature in method names.
15777
15778 2002-10-13  Martin Baulig  <martin@gnome.org>
15779
15780         * debug-mono-symfile.h: Set version number to 27.
15781
15782 2002-10-11  Martin Baulig  <martin@gnome.org>
15783
15784         * gc.c: Don't register/unregister NULL pointers as disappearing links.
15785
15786 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15787
15788         * metadata.c, metadata.h: added helper function to allocate signatures.
15789
15790 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15791
15792         * icall.c: added internal call to get the location of machine.config.
15793
15794 2002-10-08  Martin Baulig  <martin@gnome.org>
15795
15796         * debug-mono-symfile.c: Ignore classes with a pending init for the
15797         moment.
15798
15799 2002-10-03  Dick Porter  <dick@ximian.com>
15800
15801         * threads.c: Freebsd pthread_t is a pointer
15802
15803 2002-10-03  Dick Porter  <dick@ximian.com>
15804
15805         * socket-io.c: Implemented GetHostName_internal
15806
15807 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15808
15809         * mono-config.c:
15810         (mono_config_parse_file): don't leak the text.
15811
15812 2002-10-02  Martin Baulig  <martin@gnome.org>
15813
15814         * debug-mono-symfile.c: Added support for methods.
15815
15816 2002-10-01  Martin Baulig  <martin@gnome.org>
15817
15818         * debug-mono-symfile.c: Don't emit methods and line numbers for
15819         the dynamic symbol file, just write the type table.  We can easily
15820         have an external helper program which creates a symbol file for an
15821         IL file.        
15822
15823 2002-10-01  Dick Porter  <dick@ximian.com>
15824
15825         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15826         Only add the handle to the cleanup array when we're about to
15827         launch the thread.  Bug 31425 deadlocked when the test was run on
15828         mono under w32.
15829
15830 2002-10-01  Martin Baulig  <martin@gnome.org>
15831
15832         * debug-mono-symfile.c: Added support for properties.
15833
15834 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15835
15836         * reflection.c: unaligned store fix from Mark Crichton
15837         <crichton@gimp.org>.
15838
15839 2002-09-27  Martin Baulig  <martin@gnome.org>
15840
15841         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15842         New interncall.
15843
15844 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15845
15846         * assembly.h, assembly.c: use a sane API to hook into the assembly
15847         loading process instead of a useless special-purpouse hack
15848         (ngen needs a hook, too, for example).
15849
15850 2002-09-27  Dick Porter  <dick@ximian.com>
15851
15852         * threads.c (mono_thread_init): Call GetCurrentProcess() so
15853         io-layer can set up some process handle info.  Not needed on w32,
15854         but doesn't hurt either.
15855
15856         * process.c: Pass the program name in the second parameter to
15857         CreateProcess, so the path is searched.  Include the working
15858         directory. Implemented process name, process enumeration, and some
15859         process detail internal calls.
15860         
15861         * icall.c: Added internal calls for process lookup, and some
15862         process details
15863
15864 2002-09-26  Martin Baulig  <martin@gnome.org>
15865
15866         * assembly.c (mono_install_open_assembly_hook): New global
15867         function to install a function to be invoked each time a new
15868         assembly is loaded.
15869         (mono_assembly_open): Run this callback function if set.
15870
15871         * debug-mono-symfile.c: Put back line numbers for the dynamic
15872         symbol file and also record the .il file as source file.  This
15873         allows us to install the temporary symbol file as `file.dbg' just
15874         like a compiler-generated one.
15875
15876 2002-09-26  Nick Zigarovich <nick@chemlab.org>
15877
15878         * Corrected typo in gc.c (BOHEM vs BOEHM).
15879
15880 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15881
15882         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15883         GetProperties. Also avoid calling g_slist_length in GetProperties and
15884         GetMethods.
15885
15886 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15887
15888         * reflection.c: avoid unaligned stores (bug spotted by
15889         Mark Crichton  <crichton@gimp.org>).
15890
15891 2002-09-25  Martin Baulig  <martin@gnome.org>
15892
15893         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15894         instead of guint64 for addresses and added prologue/epilogue info.
15895
15896 2002-09-25  Martin Baulig  <martin@gnome.org>
15897
15898         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15899         store line number info.  For the dynamic symbol file, we only need
15900         to provide the JIT generated dynamic line number info for the dynamic
15901         symbol file.
15902
15903 2002-09-25  Martin Baulig  <martin@gnome.org>
15904
15905         * debug-mono-symfile.h: Incremented version number.
15906
15907 2002-09-24  Martin Baulig  <martin@gnome.org>
15908
15909         * class.c (mono_debugger_class_init_func): New global function
15910         pointer variable.
15911         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15912         call it.
15913
15914         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15915         function.  This is called via the mono_debugger_class_init_func
15916         hook to add all types to the dynamic type table.
15917         (ves_icall_MonoDebugger_GetType): New interncall to get a class
15918         from its metadata token.
15919
15920         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15921         New interncall for the debugger.
15922
15923 2002-09-24  Nick Drochak <ndrochak@gol.com>
15924
15925         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15926         before using it in case it is null.
15927         
15928 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15929
15930         * metadata.c: allow custom modifiers in local var signatures
15931         (bug spotted by Zoltan Varga).
15932
15933 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15934
15935         * class.c: deal with the <Module> class that may have a NULL vtable.
15936         Eliminate warnings.
15937
15938 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15939
15940         * image.c, image.h: more strong name helpers.
15941         * monosn.c: more work: convert pem keys to cryptoapi format.
15942
15943 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15944
15945         * string-icalls.c: speedup IndexOf.
15946
15947 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15948
15949         * icall.c: updates from Zoltan.2.Varga@nokia.com.
15950
15951 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15952
15953         * icall.c: cleanup: use mono_object_domain ().
15954
15955 2002-09-23  Martin Baulig  <martin@gnome.org>
15956
15957         * debug-mono-symfile.c: Improved type support.
15958
15959 2002-09-22  Martin Baulig  <martin@gnome.org>
15960
15961         * debug-mono-symfile.c: Added support for reference types and strings.
15962
15963 2002-09-22  Martin Baulig  <martin@gnome.org>
15964
15965         * debug-mono-symfile.c: Started to work on the type table.
15966
15967 2002-09-21  Martin Baulig  <martin@gnome.org>
15968
15969         * debug-mono-symfile.c: Largely reworked the symbol table format.
15970         The symbol table is now incrementally updated each time a new
15971         method is added.  We're now also using our own magic and version
15972         so that you don't need to recompile all your classes if the
15973         dynamic table changes.
15974         (mono_debug_update_mono_symbol_file): Removed.
15975         (mono_debug_symfile_add_method): New function to add a method.
15976
15977 2002-09-21  Martin Baulig  <martin@gnome.org>
15978
15979         * icall.c
15980         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15981         New interncall.
15982
15983         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15984         New interncall to get a method from its metadata token.
15985
15986 2002-09-21  Martin Baulig  <martin@gnome.org>
15987
15988         * debug-mono-symfile.c: Create type table.
15989
15990 2002-09-20  Martin Baulig  <martin@gnome.org>
15991
15992         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15993
15994 2002-09-20  Martin Baulig  <martin@gnome.org>
15995
15996         * debug-mono-symfile.c: Provide information about params and locals.
15997
15998 2002-09-20  Martin Baulig  <martin@gnome.org>
15999
16000         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16001         New interncall.
16002
16003         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16004         interncall to get a method from its metadata token.
16005
16006 2002-09-20  Martin Baulig  <martin@gnome.org>
16007
16008         * debug-mono-symfile.c: Added a few checks for method->header
16009         being non-NULL.  This should never happen, but for the moment
16010         let's use a g_warning() rather than a g_assert().
16011
16012 2002-09-19  Mark Crichton  <crichton@gimp.org>
16013
16014         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16015         even if support for it isn't present.  Added an #ifdef to fix this.
16016
16017         * socket-io.c: Added checks back for Solaris support.
16018
16019 2002-09-19  Martin Baulig  <martin@gnome.org>
16020
16021         * debug-mono-symfile.c (read_string, write_string): Reflect latest
16022         changes in the symbol file format.
16023
16024 2002-09-18  Martin Baulig  <martin@gnome.org>
16025
16026         * debug-mono-symfile.c: Set version number to 21.
16027
16028 2002-09-18  Dick Porter  <dick@ximian.com>
16029
16030         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16031         on netbsd.  Fixes bug 30051.
16032
16033 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16034
16035         * reflection.c:
16036         (set_version_from_string): little fix.
16037
16038 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16039
16040         * monosn.c, Makefile.am: added strong name utility.
16041         * reflection.h, reflection.c: implemented delayed signing,
16042         locale, version and hash id assembly attributes.
16043
16044 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16045
16046         * loader.c, metadata.c: load param attributes in signatures.
16047
16048 2002-09-16  Martin Baulig  <martin@gnome.org>
16049
16050         * debug-mono-symfile.c: Added string table with all method names.
16051
16052 2002-09-14  Martin Baulig  <martin@gnome.org>
16053
16054         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16055         fast method lookup.
16056
16057 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16058
16059         * reflection.c: record the public key token of referenced assemblies.
16060
16061 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16062
16063         * image.c, image.h: added functions to get the strong name and the
16064         public key of an assembly.
16065         * pedump.c: use them.
16066
16067 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
16068
16069         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16070
16071 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
16072
16073         * marshal.c (mono_marshal_get_managed_wrapper): Added
16074         MONO_TYPE_BOOLEAN 
16075
16076 2002-09-11  Martin Baulig  <martin@gnome.org>
16077
16078         * gc.c: Call GC_unregister_disappearing_link() on all links when
16079         finalizing them, this is necessary to aviod a crash in boehm's
16080         finalize handler.
16081
16082 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16083
16084         * gc.c: handle GetTarget for finalized objects spotted and fixed by
16085         nick@chemlab.org.
16086
16087 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16088
16089         * icall.c: implemented MonoType::Module.
16090         * reflection.c, reflection.h: mono_module_get_object () from
16091         Tomi Pakarinen <tomi.pakarinen@welho.com>.
16092
16093 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16094
16095         * icall.c: ignore overridden methods in GetMethods ().
16096         Fix for FieldInfo::SetValue().
16097         * object.c: handle float/double in runtime invoke.
16098
16099 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16100
16101         * object.c: allow a constructor to be called again on an object.
16102
16103 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16104
16105         * class.h, class.c: move field layout code to it's own function and
16106         export it. Get an interface id earlier. Move fields in MonoClass
16107         so they are more cache friendly and align the bitfields.
16108         * loader.c: temporary handle get_param_names() for a runtime method.
16109         * reflection.c, reflection.h: more code to handle runtime creation of
16110         types.
16111
16112 2002-09-09  Martin Baulig  <martin@gnome.org>
16113
16114         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16115         signature with the pinvoke field being set for the actual call.
16116
16117 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16118
16119         * icall.c: removed some unused icalls. Start of map of glib charsets
16120         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16121
16122 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16123
16124         * debug-helpers.c: break infinite loop (found and fixed by
16125         Holger Arnold <harnold@gmx.de>).
16126
16127 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16128
16129         * icall.c: target may be null in create_delegate.
16130
16131 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16132
16133         * marshal.c: handle a boolean return type.
16134
16135 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16136
16137         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16138
16139 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16140
16141         * gc.c: fix weakreferences.
16142
16143 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16144
16145         * icall.c: added icall to get default codepage.
16146
16147 2002-09-03  Dick Porter  <dick@ximian.com>
16148
16149         * threads.h: 
16150         * threads.c: Use MonoThread instead of MonoObject where
16151         apropriate.
16152
16153         Store running thread objects in a hash table, so that we have all
16154         the info to hand when waiting for them to finish
16155         (means we don't need OpenThread() any more, so mingw builds should
16156         be fully functional again.)
16157
16158         * verify.c:
16159         * object.h: Added thread ID to MonoThread
16160
16161 2002-09-03  Martin Baulig  <martin@gnome.org>
16162
16163         * icall.c (System.Reflection.Assembly::get_location): New interncall.
16164
16165 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16166
16167         * icall.c: fixed leak in get_temp_path. Thanks lupus.
16168
16169 2002-09-03  Martin Baulig  <martin@gnome.org>
16170
16171         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16172         argument to store the end address of the disassembled instruction.
16173
16174         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16175         here from debug-symfile.h.
16176         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16177         JIT into this struct.
16178         (MonoSymbolFile): Added `char *image_file' field.
16179         (MonoDebugGetMethodFunc): Removed.
16180         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16181         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16182         (mono_debug_find_method): New method.
16183
16184         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16185         create a full symbol file.
16186         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16187         and static symbol files.
16188         (mono_debug_find_method): The symbol file keeps an internal method hash,
16189         call this to get a MonoDebugMethodInfo from a MonoMethod.
16190
16191         * debug-symfile.[ch]: Removed.
16192
16193 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
16194
16195         * image.c (do_mono_image_open): Remove linker version check.
16196
16197 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
16198
16199         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16200         wrappers for instance methods.
16201         
16202 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16203
16204         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16205
16206 2002-08-28  Dick Porter  <dick@ximian.com>
16207
16208         * Makefile.am: Export HOST_CC for w32 builds
16209
16210 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16211
16212         * file-io.c process.c: MonoString are null terminated, no
16213         need for mono_string_to_utf16() anymore.
16214
16215 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16216
16217         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16218
16219 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16220
16221         * icall.c, reflection.h: speedup System.MonoType.
16222
16223 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16224
16225         * reflection.c: allow null as the value of a string argument in
16226         custom attributes constructors.
16227
16228 2002-08-27  Martin Baulig  <martin@gnome.org>
16229
16230         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16231         `trampoline_address' field.
16232
16233 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
16234
16235         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16236         check (fixes bug #29486) 
16237
16238 2002-08-27  Martin Baulig  <martin@gnome.org>
16239
16240         * debug-mono-symfile.c: Changed the file format in a way that allows us
16241         open it read-only and to use a specially malloced area for all the
16242         dynamic data.  We can now also generate a symbol file on-the-fly if we're
16243         debugging IL code and there is no MCS generated symbol file for it.
16244
16245 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16246
16247         * object.c: added a define for a good string and array
16248         creation speedup (not enabled by default because we need to deal with
16249         the synch stuff).
16250
16251 2002-08-26  Martin Baulig  <martin@gnome.org>
16252
16253         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16254         function to create a dynamic symbol file.  This is used by the
16255         debugger to create a symbol file for IL code on-the-fly.
16256
16257 2002-08-26  Martin Baulig  <martin@gnome.org>
16258
16259         * loader.c (mono_lookup_pinvoke_call): Include the error message
16260         from g_module_error() in the error message.
16261
16262 2002-08-24  Martin Baulig  <martin@gnome.org>
16263
16264         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16265         function to update the symbol file.  The symbol file is mmap()ed
16266         writable, but private.  This allows us to install the symbol file
16267         together with the assembly.
16268
16269 2002-08-24  Martin Baulig  <martin@gnome.org>
16270
16271         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
16272         but they can read the new symbol file format which mcs is now creating.
16273
16274         * debug-symfile.c (mono_debug_find_source_location): Moved to
16275         debug-mono-symfile.c; this is now operating on the new symbol file.
16276
16277 2002-08-23  Martin Baulig  <martin@gnome.org>
16278
16279         * debug-helpers.c (mono_method_desc_from_method): New function to get
16280         a MonoMethodDesc from a MonoMethod.
16281
16282 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16283
16284         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16285         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16286
16287 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16288
16289         * string-icalls.[ch]: make helper methods static.
16290
16291 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16292
16293         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16294         types to it and to SetValueInternal.
16295
16296         * object.c: Moved handle_enum label to its proper place. This was the
16297         f... bug! ;-)
16298
16299         This time i compiled mcs and gtk-sharp and they both work.
16300
16301 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16302
16303         * icall.c: reverted partially my previous patch until 
16304         object.c:set_value handles enums correcly.
16305
16306 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16307
16308         * icall.c:
16309         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16310         (ves_icall_System_Environment_get_MachineName): removed warning when
16311         compiling under cygwin.
16312
16313 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16314
16315         * object.c: fixed field_get_value() for reference types.
16316
16317 2002-08-22  Dick Porter  <dick@ximian.com>
16318
16319         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16320         Don't free a buffer while it's still needed.  Patch from Jonathan
16321         Liger <Jonathan.liger@wanadoo.fr>
16322
16323 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
16324
16325         * icall.c (ves_icall_System_Environment_get_Platform): Add new
16326         internal call.
16327
16328 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
16329
16330         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16331         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16332
16333         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16334         we call unmanaged code which throws exceptions.
16335
16336 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16337
16338         * appdomain.h: added per-domain entry_assembly.
16339         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16340         arguments.
16341         * icall.c: Assembly::GetEntryAssembly icall.
16342         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16343         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16344
16345 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16346
16347         * appdomain.h, gc.c: added mono_domain_finalize ().
16348
16349 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16350
16351         * object.c:
16352         (mono_print_unhandled_exception): changed g_warning by g_printerr
16353         because g_log has a 1024 characters limit (yeah, i got a big stack
16354         trace). Don't print exception name, that should be in ToString 
16355         returned string.
16356
16357 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16358
16359         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16360         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16361
16362 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16363
16364         * object.c:
16365         (mono_print_unhandled_exception): after previous commit, i realized
16366         that MS calls ToString on the exception. I changed this function to
16367         do that. This way we get stack_trace for free.
16368
16369 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16370
16371         * object.c:
16372         (mono_print_unhandled_exception): invoke Message property instead of
16373         getting 'message' field from Exception. Don't allocate memory for
16374         'trace' and 'message' if not needed.
16375
16376 2002-08-18  Dick Porter  <dick@ximian.com>
16377
16378         * unicode.c: Fix asserts to match Encoder.cs checks
16379
16380 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16381
16382         * marshal.c: fix unaligned store issue and a few wrong
16383         opcode argument types.
16384
16385 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16386
16387         * icall.c: added GetUninitializedObjectInternal internal call.
16388
16389 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
16390
16391         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16392         to the right domain.
16393
16394 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
16395
16396         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16397
16398         * class.c (class_compute_field_layout): set blittable to false for Strings
16399
16400         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16401
16402 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16403
16404         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16405         first chunk of code to create types at runtime. Code to
16406         handle ReflectedType/DeclaringType. Make reflection handles
16407         domain specific.
16408
16409 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16410
16411         * class.c: set correct name in arrays.
16412
16413 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
16414
16415         * appdomain.c (mono_domain_transfer_object): make it work with
16416         valuetypes. bug fixes.
16417
16418 2002-08-12  Dick Porter  <dick@ximian.com>
16419
16420         * object.h: Rename some parameters to avoid c++ keywords (Patch
16421         from Joseph Wenninger <kde@jowenn.at>)
16422
16423 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16424
16425         * icall.c: added icall to implement Assembly.GetFile*.
16426
16427 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16428
16429         * reflection.h, reflection.c: code to embed managed resources.
16430
16431 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16432
16433         * class.c: move all the type size stuff into
16434         class_compute_field_layout().
16435
16436 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16437
16438         * class.c: ensure enums have always the correct instance size.
16439         * unicode.c: remove wrong assert.
16440
16441 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16442
16443         * assembly.c: fix mem corruption issue.
16444         * image.h, image.c: added mono_image_get_resource () to access
16445         managed resources.
16446         * icall.c: implemented Assembly.EntryPoint property and some
16447         Managed Resources related internalcalls.
16448
16449
16450 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16451
16452         * image.c, image.h: impemented mono_image_get_entry_point ().
16453         * appdomain.c: use mono_image_get_entry_point.
16454
16455 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16456
16457         * reflection.c: support the object type argument when loading
16458         custom attributes.
16459
16460 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
16461
16462         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16463         String as return type.
16464
16465 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16466
16467         * reflection.c: fix encoding of named args for custom attrs to match
16468         the ms implementation. Read them back when instantiating custom
16469         attributes.
16470
16471 2002-08-02  Radek Doulik  <rodo@ximian.com>
16472
16473         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16474         by Dietmar as quick fix
16475         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16476         16 as stack size, used on more places as quick fix before Dietmar
16477         will fix it properly
16478
16479 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16480
16481         * object.h, object.c: added accessors for fields and properties.
16482
16483 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16484
16485         * class.c, class.h: made mono_class_get_field_from_name ()
16486         loop on parent types.
16487         Added mono_class_get_property_from_name ().
16488
16489 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16490
16491         * class.c, class.h: move the code to setup the type vtable in its own
16492         function so that it can be reused also for types created at runtime.
16493         Eliminate the "class" identifier from the header file.
16494         * reflection.c: setup the vtable for enums so that we can create
16495         objects for use in SetConstant ().
16496
16497 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
16498
16499         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16500         instead of the delegate itself as this pointer (bug #28383)
16501
16502 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
16503
16504         * marshal.c (mono_marshal_get_managed_wrapper): added return type
16505         conversions.
16506
16507 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16508
16509         * loader.c: don't set the pinvoke bit on icalls.
16510
16511 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
16512
16513         * debug-helpers.c (mono_method_full_name): only print a number to
16514         indicate wrapper type (so that the output is more readable in traces).
16515
16516 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
16517
16518         * class.c (mono_class_init): include method override patch from Paolo
16519
16520 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16521
16522         * icall.c: fixed GetTypeCode().
16523
16524 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
16525
16526         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16527         use real delegate invoke function to make it work with multicast
16528         delegates (fix bug# 28291).
16529
16530 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16531
16532         * object.c: load constant strings.
16533
16534 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16535
16536         * reflection.c: no magic numbers.
16537         * tabledefs.h: security action enum.
16538
16539 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16540
16541         * assembly.c: fix possible memory corruption.
16542
16543 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16544
16545         * reflection.h, reflection.c: added support for linking resources.
16546         * verify.c: check we have an updated corlib.
16547
16548 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
16549
16550         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16551         string arrays.
16552         (mono_marshal_string_array): null terminate unmanaged string arrays.
16553         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16554
16555 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16556
16557         * icall.c: Type.GetType () can now return also types from the
16558         calling assembly.
16559
16560 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16561
16562         * loader.h, loader.c: stack walking support.
16563         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16564         GetCallingAssembly.
16565
16566 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
16567
16568         * marshal.c: added optimisations for blittable types 
16569
16570         * class.c (mono_array_class_get): do not set blittable attribute on arrays
16571         (mono_class_setup_mono_type): set blittable attribute for single
16572         and double.
16573
16574         * marshal.c (mono_string_utf8_to_builder): impl.
16575         (mono_string_builder_to_utf8): impl.
16576         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16577
16578 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
16579
16580         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16581         (mono_marshal_get_managed_wrapper): impl. byref types
16582
16583 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16584
16585         * icall.c:
16586         (search_method): don't display debug message. 
16587
16588 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16589
16590         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16591
16592 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16593
16594         * appdomain.c: set the missing filename when throwing exception.
16595
16596 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16597
16598         * metadata.c (mono_type_size): code cleanup
16599         (mono_type_stack_size): removed some test code
16600
16601 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
16602
16603         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16604         mono_get_exception_file_not_found now.
16605
16606         * exception.c (mono_exception_from_name_two_strings): New version
16607         that will call a constructor with two string arguments. 
16608         (mono_get_exception_file_not_found): New helper routine, used to
16609         report file-not-found errors.
16610
16611 2002-07-20  Dick Porter  <dick@ximian.com>
16612
16613         * process.h:
16614         * process.c: Pass file handles to CreateProcess
16615         
16616         * icall.c:
16617         * file-io.h:
16618         * file-io.c: Implemented CreatePipe
16619
16620 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16621
16622         * metadata.c (mono_get_param_info): set alignment for value types
16623
16624 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16625
16626         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16627         Constify mono_domain_assembly_open().
16628         * loader.c: handle null namespace in icalls.
16629
16630 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16631
16632         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16633         (emit_str_to_ptr_conv): marshal object as structs
16634
16635         * metadata.c (mono_type_to_unmanaged): marshal object as structs
16636
16637         * marshal.c (mono_marshal_get_runtime_invoke): support value types
16638
16639 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
16640
16641         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16642         (mono_marshal_get_native_wrapper): we an now return value types
16643
16644 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16645
16646         * verify.c: more checks implemented.
16647
16648 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
16649
16650         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16651         (fix bug #27695)
16652         (mono_marshal_get_native_wrapper): allow byref arguments
16653         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16654         impl. PtrToStringXXX methods
16655         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16656         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16657         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16658         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16659         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16660
16661 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16662
16663         * reflection.c: fix buglet in parsing an assembly name.
16664
16665 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16666
16667         * marshal.c (emit_ptr_to_str_conv): first impl.
16668
16669 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16670
16671         * object.c, class.h: cache the vtable in the class as suggested by
16672         vargaz@freemail.hu (Zoltan Varga).
16673
16674 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16675
16676         * class.h, loader.c: added mono_field_from_token().
16677         * verify.c: first cut of type checking code.
16678
16679 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16680
16681         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16682
16683 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
16684
16685         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16686         (fix bug #27782)
16687         (mono_marshal_get_remoting_invoke): impl.
16688         (mono_delegate_begin_invoke): impl.
16689         (mono_mb_emit_save_args): impl.
16690         (mono_delegate_end_invoke): impl.
16691         (mono_marshal_get_delegate_begin_invoke):
16692         (mono_marshal_get_delegate_end_invoke):
16693         (mono_marshal_get_delegate_invoke): generate a special name for
16694         those methods (including the signature) and associate them whith
16695         the delegate class. 
16696
16697 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16698
16699         * reflection.[ch]: 
16700         (mono_reflection_type_from_name): now it has a MonoImage parameter
16701         which is used as the default image to search the type in. If the image
16702         is NULL or getting the type from it fails, it defaults to corlib.
16703
16704         * icall.c: changed 1 call to mono_reflection_type_from_name to match
16705         new parameter.
16706
16707 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16708
16709         * reflection.c: update the parameter table index.
16710
16711 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16712
16713         * domain.c: don't include the mark byte in the string hash.
16714
16715 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16716
16717         * icall.cs: icall for Type.GetTypeCode ().
16718         * verify: a couple of fixes and disabled local initialization checks.
16719
16720 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
16721
16722         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16723
16724         * debug-helpers.c (mono_method_full_name): print the type of the
16725         runtime wrapper
16726
16727         * metadata.c (mono_signature_hash): a hash function for signatures
16728         (mono_signature_hash): better hash algorithm
16729
16730         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16731
16732         * debug-helpers.c (mono_method_full_name): this can now generate
16733         method names with signatures
16734
16735         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16736         method dont have this pointers.
16737
16738 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16739
16740         * reflection.c: fixup typebuilder tokens.
16741         * image.c: fix buglet.
16742         * marshal.h: remove whitespace.
16743         * metadata.h, metadata.c: reinstate code that was removed.
16744         * verify.c: handle catch directives and fix another couple of bugs.
16745
16746 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
16747
16748         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16749         (mono_marshal_get_native_wrapper): make it comp. with the old code
16750         (mono_marshal_get_native_wrapper): support boolean
16751         (mono_marshal_get_managed_wrapper): support more types
16752
16753 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
16754
16755         * class.c (class_compute_field_layout): compute class->blittable attribute.
16756
16757 2002-07-09  Dick Porter  <dick@ximian.com>
16758
16759         * threads.c: Make the thread cleaning up cope with threads that
16760         call ExitThread()
16761
16762 2002-07-08  Radek Doulik  <rodo@ximian.com>
16763
16764         * reflection.c (method_encode_code): use non-translated values to
16765         compute finally_start, this fixes exception handling on ppc, yay!
16766
16767         * decimal.h (struct signscale): fix endianess
16768
16769 2002-07-07  Radek Doulik  <rodo@ximian.com>
16770
16771         * reflection.c: swap box_val and not val
16772
16773 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16774
16775         * reflection.c, reflection.h: handle full assembly info in type name.
16776         Handle Type arguments when loading custom attributes.
16777         * icall.c: updated to use new mono_reflection_type_from_name () method.
16778
16779 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16780
16781         * loader.c:
16782         (method_from_memberref): also print assembly name when method not found.
16783
16784 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16785
16786         * icall.c:
16787         (ves_icall_TypeGetProperties): fixed bug #27473. 
16788
16789 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16790
16791         * reflection.c: display image name and token when cannot find the
16792         .ctor for an attribute.
16793
16794 2002-07-05  Martin Baulig  <martin@gnome.org>
16795
16796         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16797
16798 2002-07-04  Dick Porter  <dick@ximian.com>
16799
16800         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16801         compile on mingw.  This will cause mingw builds to not wait for
16802         subthreads to terminate after the main thread does.  I've lodged a
16803         bug with the mingw developers for them to wrap OpenThread().
16804
16805 2002-07-03  Dick Porter  <dick@ximian.com>
16806
16807         * threads.c: Store thread IDs instead of handles, because
16808         GetCurrentThread() returns a pseudohandle and therefore stores
16809         useless values.  mono_thread_cleanup() continues checking the
16810         array of threads until it is empty, to cope with subthreads
16811         spawning new threads after the main thread has finished.
16812
16813         * profiler.h:
16814         * profiler.c:
16815         * profiler-private.h: Pass the thread ID to thread profiler
16816         functions, instead of a handle
16817
16818 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16819
16820         * verify.c: fixes to make it more usable.
16821         * pedump.c: added --verify code to verify IL code in an assembly.
16822
16823 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16824
16825         * reflection.c: turn errors into warnings to allow compiling corlib.
16826
16827 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16828
16829         * reflection.c: add special cases to compile corlib.
16830
16831 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16832
16833         * reflection.c: handle properties with only a set method.
16834
16835 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16836
16837         * opcodes.h: add enum with opcodes in opval order.
16838
16839 2002-07-01  Dick Porter  <dick@ximian.com>
16840         
16841         * object.h:
16842         * object.c (mono_runtime_run_main): Removed unneeded argument
16843
16844 2002-06-28  Martin Baulig  <martin@gnome.org>
16845
16846         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16847
16848 2002-06-27  Dick Porter  <dick@ximian.com>
16849
16850         * threads.c: Store the handle in both the parent thread and in the
16851         subthread, to minimise the time between starting a new thread and
16852         storing its ID.
16853
16854 2002-06-26  Dick Porter  <dick@ximian.com>
16855
16856         * appdomain.c (mono_runtime_cleanup): Close the socket library
16857         after all the threads have finished, not before
16858
16859 2002-06-26  Martin Baulig  <martin@gnome.org>
16860
16861         * debug-symfile.c (mono_debug_find_source_location): Added
16862         `guint32 *line_number' argument.  If it's not NULL, store the line number
16863         there and return the file name without the line number.
16864
16865 2002-06-25  Dick Porter  <dick@ximian.com>
16866
16867         * icall.c:
16868         * process.h:
16869         * process.c: Process forking and other support functions
16870
16871 2002-06-25  Dick Porter  <dick@ximian.com>
16872
16873         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16874         things dont happen when the image is closed.
16875         (mono_image_lookup_resource): Walk the resource section looking
16876         for a particular entry
16877
16878         * cil-coff.h: PE resource section decoding
16879
16880 2002-06-25  Dick Porter  <dick@ximian.com>
16881         
16882         * assembly.h:
16883         * assembly.c: 
16884         (mono_assembly_foreach): Accessor functions to walk the list of
16885         loaded assemblies
16886         (mono_assembly_set_main):
16887         (mono_assembly_get_main): Process methods need to know which
16888         assembly is the "main" one
16889
16890         * object.c (mono_runtime_run_main): Record the main assembly
16891
16892         * debug-helpers.c: Fix typo
16893
16894 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
16895
16896         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16897         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16898
16899 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16900
16901         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16902
16903 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
16904
16905         * image.c (do_mono_image_open): Initialize reference count,
16906         otherwise we leak the MonoImage.
16907
16908 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16909
16910         * reflection.c: small tweak to handle self-hosting.
16911
16912 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16913
16914         * reflection.c: fix type name parse code.
16915
16916 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16917
16918         * reflection.c: break out of the loop.
16919         * image.c: special case corlib.
16920
16921 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16922
16923         * reflection.c: add all the custom attrs at the end to ensure the
16924         ctors have been properly initialized when the attributes are defined
16925         in the current assembly.
16926
16927 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16928
16929         * reflection.c: handle correctly multiple-nested types.
16930
16931 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16932
16933         * row-indexes.h: fix typos.
16934         * reflection.c: adjust for typos and fix method_def_or_ref
16935         encoding in MethodImpl table.
16936
16937 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16938
16939         * reflection.c: fix entry point patching (thanks Serge!).
16940
16941 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
16942
16943         * verify.c: add check for System.Exception
16944
16945 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16946
16947         * image.c, class.c: minifix for code just c&p'ed.
16948         * reflection.c: warning fix.
16949         * object.h, loader.h, domain.c: load also StringBuilder.
16950
16951 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16952
16953         * marshal.h, marshal.c: some support code to handle complex marshaling.
16954
16955 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16956
16957         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16958         Better signatures with vtable error dump.
16959
16960 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16961
16962         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16963
16964 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
16965
16966         * icall.c (ves_icall_Type_GetField): impl.
16967
16968 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16969
16970         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16971         to retrieve a marshal description blob for a field or param.
16972
16973 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16974
16975         * reflection.h, reflection.c: change order of nested type emission
16976         to avoid table corruption. The NestedTypes table is sorted.
16977         * icall.c: change order of GetConstructor results to workaround mcs bug.
16978
16979 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16980
16981         * reflection.h, reflection.c: handle field and param marshal
16982         information.
16983
16984 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16985
16986         * icall.c, marshal.c marshal.h: more Marshal class implementation.
16987
16988 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16989
16990         * reflection.c: fix call convention.
16991
16992 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16993
16994         * reflection.h, reflection.c: mono_image_get_memberref_token()
16995         takes a type instead of a class, now. Added
16996         mono_image_get_array_token() to create tokens for the special
16997         multi-dim array methods.
16998
16999 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17000
17001         * assembly.c: handle modules (no assembly table). Split
17002         loading references in its own function.
17003         * class.c: handle moduleref resolution scope.
17004         * image.c, image.h: cache module name in image.
17005
17006 2002-06-07  Martin Baulig  <martin@gnome.org>
17007
17008         * reflection.c (mono_image_get_type_info): Only add a class layout entry
17009         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17010
17011 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17012
17013         * icall.c: more signature fixes that used uint instead of int.
17014
17015 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17016
17017         * reflection.c: fixed signature of field refs.
17018
17019 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17020
17021         * class.c, reflection.c: handle typerefs of nested types
17022         (both on read and when writing files).
17023
17024 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17025
17026         * icall.c: fix method signatures that tried to workaround the previous
17027         typo, d'oh!
17028
17029 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17030
17031         * debug-helpers.c: fix typo.
17032
17033 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17034
17035         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17036         rewrote the PE/COFF writing code (our programs are understood by the
17037         ms runtime, now).
17038
17039 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17040
17041         * gc.c, gc.h, icall.c: weakreference support.
17042
17043 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17044
17045         * Makefile.am, mono-config.c: use $(sysconfdir).
17046
17047 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17048
17049         * icall.c: changed default precision of Double.ToString() to 15.
17050         Fixed memory leak. Unified with Single.ToString.
17051
17052 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17053
17054         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17055
17056 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17057
17058         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17059         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17060         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17061         and myself.
17062
17063 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17064
17065         * debug-symfile.c, sysmath.c: yet more compilation fixes.
17066
17067 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17068
17069         * reflection.c, socket-io.c: more compilation fixes.
17070
17071 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17072
17073         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17074         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17075         unicode.c: warning and compiler compatibility fixes.
17076
17077 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17078
17079         * class.h, metadata.c: fixed warnings/compilation errors.
17080
17081 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17082
17083         * Makefile.am, mono-config.c, mono-config.h: configuration file
17084         support routines.
17085         * loader.c, loader.h: make Dll mapping configurable at runtime in the
17086         config file. Export methods to insert and lookup mappings.
17087
17088 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17089
17090         * reflection.c: handle types and boxed objects in custom attr
17091         constructors.
17092
17093 2002-05-30  Martin Baulig  <martin@gnome.org>
17094
17095         * debug-symfile.c
17096         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17097
17098 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17099
17100         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17101         to lookup the implmap row for a P/Invoke method.
17102         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17103         P/Invoke method from the runtime on an as needed basis.
17104
17105 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
17106
17107         * metadata.c (mono_metadata_parse_signature): impl.
17108
17109 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17110
17111         * class.c: handle .pack directive.
17112
17113 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17114
17115         * object.c: initialize static fields with RVA data.
17116
17117 2002-05-25  Martin Baulig  <martin@gnome.org>
17118
17119         * debug-symfile.c
17120         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17121
17122 2002-05-24  Martin Baulig  <martin@gnome.org>
17123
17124         * debug-symfile.c
17125         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17126         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17127         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17128
17129 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17130
17131         * object.c: special case string ctros in invoke.
17132         * gc.c: silly whitespace changes.
17133
17134 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
17135
17136         * threadpool.[ch]: impl. a threadpool that can
17137         be used by mint and mono.
17138
17139 2002-05-22  Martin Baulig  <martin@gnome.org>
17140
17141         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17142         The first argument is now a `MonoReflectionModuleBuilder *', the return
17143         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
17144         `methods' field to get the method builder.  The `token' argument is the
17145         unfixed token.
17146
17147         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17148         invalid characters instead of g_assert_not_reached()ing.  This seems
17149         to be the behaviour of mscorlib.
17150
17151 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
17152
17153         * object.c (mono_runtime_invoke_array): applied patch from Rachel
17154         Hestilow to fix bug #25104
17155
17156 2002-05-21  Martin Baulig  <martin@gnome.org>
17157
17158         * debug-symfile.c (mono_debug_find_source_location): New function.
17159         Looks up an IL offset in the line number table and returns the source
17160         location as a string.
17161
17162 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17163
17164         * icall.c:
17165         (mono_double_ToStringImpl): changed %f by %g until we have something
17166         better.
17167
17168 2002-05-21  Nick Drochak  <ndrochak@gol.com>
17169
17170         * icall.c : Use different name for Math.Pow's icall.  Needed to check
17171         parameters first in C#.
17172
17173 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17174
17175         * icall.c, reflection.h: added icall to get info about an event.
17176
17177 2002-05-20  Radek Doulik  <rodo@ximian.com>
17178
17179         * object.c (mono_value_box): don't use memcpy for boxing on BIG
17180         endian
17181         (mono_value_box): don't use memcpy for small sizes on
17182         architectures with unaligned access
17183
17184 2002-05-20  Martin Baulig  <martin@gnome.org>
17185
17186         * reflection.c (mono_reflection_setup_internal_class): Don't crash
17187         if `tb->parent == NULL'.
17188         (mono_reflection_create_internal_class): New function.  This is
17189         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17190         for enum types.
17191
17192         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17193         New interncall.
17194
17195 2002-05-19  Martin Baulig  <martin@gnome.org>
17196
17197         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17198         argument to get the length, don't default to the array length.
17199
17200 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
17201
17202         * assembly.c (mono_assembly_setrootdir): New function used to
17203         override the MONO_ASSEMBLIES directory.
17204
17205 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17206
17207         * icall.c: ValueType_GetHashCode() initialize local var.
17208
17209 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17210
17211         * reflection.c: sort custom attributes table.
17212
17213 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17214
17215         * reflection.c: support named args in custom attributes (write support).
17216
17217 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17218
17219         * reflection.c: fix finally position calculation.
17220
17221 2002-05-15  Radek Doulik  <rodo@ximian.com>
17222
17223         * reflection.c: fixed endianess at many places
17224
17225         * icall.c (ves_icall_InitializeArray): comment out debug msg
17226
17227 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
17228
17229         * object.c (mono_unhandled_exception): new function to handle
17230         unhandled exceptions.
17231         (mono_unhandled_exception): call the UnhandledException event.
17232         (mono_runtime_delegate_invoke): impl.
17233
17234 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17235
17236         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17237         returns the RVA, not the direct pointer to the data. Handle the case
17238         when the class size is fixed.
17239
17240 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17241
17242         * reflection.c: fix some endianess issues.
17243
17244 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
17245
17246         * object.c (mono_runtime_invoke): is now able to catch exceptions.
17247
17248         * threads.c (mono_thread_init): added a callback which is invoked
17249         at thread start.
17250
17251 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17252         
17253         * icall.c: make GetHashCode return non-negative values.
17254
17255 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17256
17257         * object.c, icall.c, gc.c: revert to address-based hashcode.
17258
17259 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
17260
17261         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17262
17263 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17264
17265         * icall.c, class.c: special case <Module>.
17266
17267 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
17268
17269         * icall.c: fix bug in GetNow().
17270
17271 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
17272
17273         * object.c (mono_runtime_class_init): make sure that we call all
17274         static class constructors.
17275
17276 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17277
17278         * reflection.c: sort methodsemantics table.
17279
17280 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17281
17282         * reflection.h, reflection.c: honour init locals setting.
17283
17284 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17285
17286         * icall.c: copied Double ToStringImpl for Single ToStringImpl
17287
17288 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17289
17290         * reflection.c: support ContructorBuilders in attribute blob creation.
17291
17292 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17293
17294         * reflection.c: some changes to build a binary that can be run
17295         directly in windows.
17296
17297 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17298
17299         * loader.c: print a big message when an icall can't be found.
17300
17301 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17302
17303         * string-icalls.c: fix bug 24248.
17304
17305 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17306
17307         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17308         icall.c, reflection.h: separate assembly loading by pathname and by
17309         assembly name. Use the MONO_PATH env var to search for assemblies.
17310
17311 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17312
17313         * assembly.c, image.h: add some support for assemblies
17314         with multiple modules.
17315         * class.c, class.h: export mono_class_from_typeref().
17316         * loader.c: remove duplicated code and use mono_class_from_typeref(),
17317         instead.
17318
17319 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17320
17321         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17322         documentation says (the ECMA one is correct).
17323
17324 2002-05-02  Dick Porter  <dick@ximian.com>
17325
17326         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17327         Don't name the synchronisation mutex.
17328
17329 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
17330
17331         * rand.c
17332         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17333         Make the prototypes match.
17334         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17335         Same.
17336
17337         * icall.c
17338         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17339         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17340         all systems have tm.tm_zone, so use strftime() with %Z to print
17341         the timezone abreviation into a temp string.
17342
17343         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17344         rather than mono_array_addr() on a MonoString on Big Endian
17345         machines.
17346
17347 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
17348
17349         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17350         fix bug 24041
17351
17352 2002-04-30  Dick Porter  <dick@ximian.com>
17353
17354         * socket-io.c: Cope with SOCKET being an integer rather than a
17355         pointer now.
17356
17357         * threads.c: Added Thread_free_internal, to deal with thread
17358         handle cleanup.  Moved calls to handle_store() and handle_remove()
17359         to start_wrapper(), so each can only be called once.  Allocate
17360         synchronisation blocks with GC_malloc(), and use GC finalisation
17361         to close the handles.
17362
17363         * icall.c: added System.Threading.Thread::Thread_free_internal
17364
17365 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17366
17367         * icall.c: support Environment.Exit, CommandLineArgs().
17368
17369 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17370
17371         * object.c, object.h: added mono_runtime_run_main () and
17372         mono_runtime_get_main_args () for use in System.Environment.
17373
17374 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17375
17376         * gc.c: fix thinko, enable actual finalization since the jit is now
17377         fixed.
17378
17379 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17380
17381         * gc.c, object.c: take into account that an object may be offset wrt the address
17382         returned by GC_malloc().
17383
17384 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17385
17386         * image.c: handle files without entries in the assembly table (modules).
17387
17388 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17389
17390         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
17391         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17392         allowed to be null when it's System.Object class setup.
17393
17394 2002-04-27  Martin Baulig  <martin@gnome.org>
17395
17396         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17397         if `tb->parent == NULL' rather than crashing.
17398
17399 2002-04-28  Nick Drochak  <ndrochak@gol.com>
17400
17401         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
17402         calling acos() where asin() should have been called.
17403
17404 2002-04-26  Martin Baulig  <martin@gnome.org>
17405
17406         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17407         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17408         there's a subdirectory called `System', but we don't want to read that
17409         subdirectory as an assembly.
17410
17411 2002-04-25  Martin Baulig  <martin@gnome.org>
17412
17413         * debug-symfile.c: Reflect latest MonoString changes.
17414
17415 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17416
17417         * rand.c, rand.h: instance method icalls need to have an explicit
17418         this pointer as first argument in the C implementation.
17419
17420 2002-04-25  Nick Drochak <ndrochak@gol.com>
17421
17422         * icall.c: Fix typo in map for GetNonZeroBytes
17423
17424 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17425
17426         * string-icalls.c : String does now passes unit tests without any 
17427         errors, the following changes has been made:
17428         
17429         Implemented replace methods.
17430         Renaming of methods to (try) follow the standard.
17431         Fixed compare ordinal
17432         Made all memory allocated directly to function instead of via icall function.
17433         Small performance fix in is_in_array function
17434                         
17435  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17436
17437         c (mono_string_Internal_ctor_charp_int_int):
17438         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
17439         sindex < 0, throw ArgumentOutOfRangeException instead of
17440         ArgumentNullException.
17441
17442         Added new check for length == 0, however
17443         I need to make it return String.Empty from the C code.
17444         
17445         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17446         that calculate the length for us here.
17447         
17448         (mono_string_Internal_ctor_sbytep_int_int): Replaced
17449         mono_string_new_utf16 with mono_string_new, since value is utf8.
17450
17451 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17452
17453         * object.c: register the object for finalization if needed.
17454         Allocate one more char in the string for the terminating 0 char.
17455
17456 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17457
17458         * class.c, class.h, image.c: check if a type implemenst a destructor.
17459         Use the proper key for array class lookups.
17460         * icall.c: register the icalls in the System.GC class.
17461         * gc.c, gc.h: GC-related functions and icalls.
17462
17463 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17464
17465         * icall.c:
17466         * socket-io.c:
17467         * unicode.c: free some strings gotten from mono_string_to_utf8 and
17468         changed a couple of free () by g_free ().
17469
17470         * decimal.c: one-liner in the comments for decimal2string ().
17471
17472 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17473
17474         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17475
17476 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17477
17478         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17479         * object.c (mono_runtime_invoke_array) : handle null in params
17480
17481 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17482
17483         * string-icalls.c: fixed bug in split (one off bug)
17484
17485 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17486
17487         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17488         * icalls.c: added String::Equals as internal method
17489
17490 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17491
17492         * threads.c: fixed bug in the double interlocked functions
17493
17494 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
17495
17496         * threads.c: implemented all of the new interlocked icalls.
17497         * string-icalls.c: fix a bug in insert.
17498         * icalls.c: added the icalls for interlocked, removed old string functions.
17499         
17500 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17501
17502         * loader.c: fix off-by-one error when reading argument names.
17503
17504 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17505
17506         * profiler.c: win32 counter implementation (untested).
17507         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17508         (the latter needs testing and more complete impl. from win32 folks).
17509
17510 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
17511
17512         * object.c: mono_array_new_full workaround mono_array_class_get
17513         problem.
17514
17515 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17516
17517         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17518         * object.h (mono_string_chars): Changed casting type.
17519
17520 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17521
17522         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17523                            method signatures to use gunichar2 instead of gint16.
17524
17525 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
17526
17527         * object.h, object.c: domain-specific versions of mono_object_new and
17528         mono_array_new.
17529
17530 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
17531
17532         * object.c: changed String layout
17533
17534         * string-icalls.c (mono_string_Internal_ctor_chara): added
17535         internal string constructors.
17536
17537 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17538
17539         * threads.c: pass 'this' to the thread start routine.
17540
17541 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17542
17543         * string-icalls.c: fix IndexOf and LastIndexOf. Now
17544         InternalCompareStr don't call twice mono_string_cmp_char for the last
17545         character. Improved performance in mono_string_cmp_char.
17546
17547 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17548
17549         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17550         code into its own library: libmonoruntime.
17551
17552 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
17553
17554         * object.h, object.c: changed array format so that szarrays do not
17555         require a bounds structure.
17556         * icall.c, appdomain.c: support for new szarray format.
17557
17558 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17559
17560         * metadata.c: compare also the retuns type when comparing signatures:
17561         we didn't do this as an optimization since really overloaded methods
17562         must differ also in the arguments, but this doesn't work with
17563         low-level IL code (or when using explicit conversion operators: see
17564         bug#23498 for an example).
17565
17566 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17567
17568         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17569
17570 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17571
17572         * icall.c: make MonoType::GetElementType its own icall.
17573
17574 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17575
17576         * icall.c: remove MonoMethod_get_Name().
17577         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17578         object.
17579
17580 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17581
17582         * string-icalls.c: optimized a few methods.
17583
17584 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17585
17586         * icall.c: added all new string internal calls
17587         * string-icalls.c: added, new string internal call implementation.
17588         * object.c: added mono_string_new_size for allocating a string a size
17589
17590 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
17591
17592         * object.c (mono_object_isinst): use the same code as in the
17593         optimized x86 version.
17594
17595 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17596
17597         * profiler.c: TSC-based timer code (faster and more accurate).
17598         Not hooked up in configure, yet (set USE_X86TSC to 1).
17599
17600 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17601
17602         * profiler.c, profiler.h: track time spent compiling methods.
17603         * threads.c: track thread creation/destruction.
17604
17605 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17606
17607         * profiler.c, profiler.h, profiler-private.h: profiling interface
17608         and sample implementation. Moved here so that it can be used also by
17609         the jit.
17610
17611 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17612
17613         * reflection.c, reflection.h: keep types and other handles separate in
17614         the hash tables for referred tokens. Add guid for modules.
17615
17616 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17617
17618         * assembly.c: fix bugs found with valgrind.
17619         * metadata.h, metadata.c: added mono_metadata_guid_heap().
17620
17621 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
17622
17623         * threads: added icall support for getting current domain for
17624                    the thread.
17625  
17626 2002-04-13  Martin Baulig  <martin@gnome.org>
17627
17628         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17629         (MonoDebugVarInfo): Added `index' field for register based addresses.
17630         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17631         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17632         `MonoDebugVarInfo *params' and `guint32 this_offset' with
17633         `MonoDebugVarInfo *this_var'.
17634
17635         * debug-symfile.c (relocate_variable): New static function to write
17636         a location description for a local variable or method parameter.
17637
17638 2002-04-12  Martin Baulig  <martin@gnome.org>
17639
17640         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17641         stack offset and begin/end scope address of a local variable.
17642         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17643         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17644         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17645
17646         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17647         Added new relocation types for start/end scope of a local variable.
17648
17649 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17650
17651         * object.h: add mono_object_domain() macro.
17652         * reflection.c: handle typespecs.
17653         * icall.c: MonoMethod::get_Name() implementation.
17654
17655 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17656
17657         * icall.c: String::GetHashCode() icall implementation.
17658
17659 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17660
17661         * icall.c: String::IndexOfAny icall.
17662         * object.c, object.h: make array->max_length more useful.
17663         Intrduced mono_object_class() and mono_string_length() macros.
17664
17665 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17666
17667         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17668         instead of g_unichar_isdigit.
17669
17670 2002-04-11  Nick Drochak  <ndrochak@gol.com>
17671
17672         * icall.c: Implement a simple Double.ToString().
17673
17674 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17675
17676         * appdomain.h: only io-layer.h is supposed to be included.
17677         * icall.c: explicitly import environ. Fix warning.
17678
17679 2002-04-10  Nick Drochak  <ndrochak@gol.com>
17680
17681         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17682                 return true even if it's not Daylight Savings time.
17683                 Only return false for the case where the function isn't
17684                 implemented for a plaform (read Windows).
17685
17686 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17687
17688         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17689         data with a mutex.
17690
17691 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
17692
17693         * mempool.c (mono_mempool_alloc): only use g_malloc when
17694         absolutely necessary.
17695
17696 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17697
17698         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17699
17700         * class.c (mono_class_vtable): use domain mempool to allocate vtable
17701         (mono_class_proxy_vtable): use domain mempool
17702
17703 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17704
17705         * appdomain.h, appdomain.c: split initialization that requires the
17706         execution engine support into mono_runtime_init().
17707
17708 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17709
17710         * class.c (mono_class_init): don't include vtable inside MonoClass
17711         to save some memory, gather some statistics.
17712         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17713
17714 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17715
17716         * icall.c: internalcall implementation for ValueType.Equals().
17717
17718 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
17719
17720         * object.c (mono_message_init): moved 
17721         (mono_runtime_exec_main): new arch. independent impl.
17722         (mono_runtime_invoke_array): new method - like
17723         mono_runtime_invoke, but you can pass an array of objects.
17724         (mono_remoting_invoke): new arch. independent impl.
17725         (mono_message_invoke): new arch. independent impl.
17726         (mono_runtime_class_init): new arch. independent impl.
17727         (mono_runtime_object_init): new arch. independent impl.
17728
17729 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17730
17731         * metadata.c, object.c, reflection.c: documented the exported
17732         functions.
17733
17734 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17735
17736         * icall.c: simpler code to pass the assembly builder data to corlib.
17737         Implement GetNestedTypes() internalcall.
17738
17739 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17740
17741         * class.c: warn if a type can't be loaded.
17742
17743 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
17744
17745         * image.h: typedef MonoImageOpenStatus
17746         * types.h: removed unused file
17747         
17748 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
17749
17750         * icall.c: Enum_ToObject accepts enum value arguments.
17751
17752 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17753
17754         * class.c: move initialization of properties, events and nested
17755         classes, so that they happen for interfaces, too.
17756
17757 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17758
17759         * icall.c: cleanup some ugly casts in Array_SetValue*.
17760
17761 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17762
17763         * icall.c: the values array fro enums is of the correct type, now.
17764         Implement (correctly) getFullName instead of assQualifiedName for
17765         MonoType.
17766         * reflection.h, reflection.c: added mono_type_get_name ().
17767
17768 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17769
17770         * assembly.c, image.h: for each MonoImage, record from wich assembly
17771         it was loaded.
17772         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17773         Make Type.Assembly work.
17774
17775 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
17776
17777         * debug-symfile.h: use char* instead of gpointer to avoid
17778         unnecessary casts.
17779
17780         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17781
17782         * icall.c (ves_icall_InternalExecute): impl. FielSetter
17783         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17784
17785 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
17786
17787         * icall.c (mono_message_init): impl. (code cleanup)
17788         (ves_icall_InternalExecute): impl. FieldGetter
17789
17790         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17791         defined we call all (non-static)methods through the vtable. 
17792
17793 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17794
17795         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17796         finalizer even though the memory is still referenced (and the chunk of
17797         memory is not freed).
17798
17799 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17800
17801         * assembly.c: fix brokeness.
17802
17803 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17804
17805         * class.c: kill some warnings. Check explicit interface method
17806         implementation also without considering the namespace.
17807         Load also literal strings in static class data.
17808
17809 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
17810
17811         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
17812         (default_assembly_name_resolver): Make the resolver take the
17813         "base" directory where the assembly was originally defined, so we
17814         can load DLLs that are in the same directory as the assembly that
17815         is being referenced.
17816
17817 2002-03-28  Dick Porter  <dick@ximian.com>
17818
17819         * file-io.h: 
17820         * file-io.c:
17821         * socket-io.c: 
17822         * unicode.h: 
17823         * unicode.c: Warning cleanups
17824
17825 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17826
17827         * object.h, reflection.h: use the correct type instead of MonoObject.
17828
17829 2002-03-28  Martin Baulig  <martin@gnome.org>
17830
17831         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17832         (mono_debug_update_symbol_file): Initialize classes if necessary.
17833
17834 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17835
17836         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17837         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17838
17839 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17840
17841         * assembly.h: fix function prototype.
17842         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17843         * mono-endian.h: use const cast.
17844
17845 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17846
17847         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17848
17849 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17850
17851         * loader.c: don't assert when a typeref can't be loaded, give
17852         a chance to the runtime to trow an exception instead.
17853         * loader.h: fix warning.
17854
17855 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17856
17857         * class.c (mono_class_proxy_vtable): added proxy support
17858
17859 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
17860
17861         * icall.c: removed last of PAL calls, added System.Environment
17862         * file-io.h, file-io.c: MonoIO implementation
17863         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17864
17865 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17866
17867         * appdomain.c: do not use the byte marker in ldstr table lookup.
17868         * debug-helpers.c: allow two ':' to separate class and method name.
17869         * object.c: allocate arrays bounds with the GC, too.
17870         * verify: add a few more checks.
17871
17872 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17873
17874         * reflection.c: output also literal strings. Allocate parameter data
17875         with GC_malloc() (thanks, Martin, for catching this!).
17876
17877 2002-03-26  Martin Baulig  <martin@gnome.org>
17878
17879         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17880         include the `this' offset in the `param_offsets'.
17881
17882 2002-03-25  Martin Baulig  <martin@gnome.org>
17883
17884         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17885         mono_debug_get_class() function to get the classes. Added new
17886         relocation types for arrays and strings.
17887         (mono_debug_get_class): New static function to search in all
17888         referenced assemblies for a metadata token.
17889
17890         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17891
17892 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17893
17894         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17895         hold gc-allocated objects. Make the string heap a stream like the
17896         others. Removed duplicated code when writing stream info.
17897         Added asserts to catch possible buffer overflows. Set the sorted map
17898         for tables that need sorting. Added some documentation.
17899
17900 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17901
17902         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
17903         for interned strings and vtables.
17904
17905 2002-03-24  Martin Baulig  <martin@gnome.org>
17906
17907         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17908         it in the array since it was created with g_slist_prepend().
17909
17910 2002-03-24  Martin Baulig  <martin@gnome.org>
17911
17912         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17913         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17914         (mono_debug_method_from_token): Renamed to
17915         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17916         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17917
17918         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17919         relocation types.
17920
17921         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17922
17923 2002-03-24  Martin Baulig  <martin@gnome.org>
17924
17925         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17926         (mono_debug_method_from_token): New func.
17927
17928         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17929         New interncall, calls mono_debug_local_type_from_signature().
17930         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17931         calls mono_debug_method_from_token().
17932
17933 2002-03-23  Martin Baulig  <martin@gnome.org>
17934
17935         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17936         specifies the number of bytes to be converted, not the array size.
17937         Return the number of chars, not the number of bytes.
17938         (ves_icall_iconv_get_chars): The `byteCount' argument
17939         specifies the number of bytes to be converted, not the array size.
17940
17941 2002-03-23  Martin Baulig  <martin@gnome.org>
17942
17943         * reflection.h (MonoReflectionSigHelper): New type.
17944
17945         * reflection.c (mono_reflection_sighelper_get_signature_local),
17946         (mono_reflection_sighelper_get_signature_local): New functions.
17947
17948         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17949         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17950         interncalls.
17951
17952 2002-03-23  Martin Baulig  <martin@gnome.org>
17953
17954         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17955         is_writeable is set.
17956         (mono_raw_buffer_update): New function to write the modified map
17957         back to disk.
17958
17959         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17960
17961         * debug-symfile.c (mono_debug_update_symbol_file): Call
17962         mono_raw_buffer_update() when done writing.
17963
17964 2002-03-23  Martin Baulig  <martin@gnome.org>
17965
17966         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17967
17968         * debug-symfile.c: Added support for arguments and local variables.
17969
17970 2002-03-23  Dick Porter  <dick@ximian.com>
17971
17972         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17973         protected by ifdefs, hence breaking the w32 build.
17974
17975 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17976
17977         * object.c: implement is_interned() the right way.
17978
17979 2002-03-21  Martin Baulig  <martin@gnome.org>
17980
17981         * debug-symfile.[ch]: New files to handle debugging information
17982         files. There's also support to dynamically update these symbol
17983         files to include machine dependent information.
17984
17985 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
17986
17987         * threads.c (mono_thread_create): new function to create thread
17988         from C
17989
17990 2002-03-20  Martin Baulig  <martin@gnome.org>
17991
17992         * icall.c (ves_icall_InternalInvoke): Create a new object if the
17993         method is a constructor.
17994         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17995         points to ves_icall_InternalInvoke().
17996
17997 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
17998
17999         * file-io.c: Flush shouldn't throw exceptions.
18000
18001 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
18002
18003         * file-io.c: FileStream flush support; FileSetLength now
18004         restores file pointer.
18005
18006 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18007
18008         * class.c: set image for pointer classes.
18009
18010 2002/03/19  Nick Drochak <ndrochak@gol.com>
18011
18012         * sysmath.c: Forgot one.
18013
18014 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
18015
18016         * sysmath.c: Avoid redefining existing names.
18017
18018 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
18019
18020         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18021         handled by runtime as icall rather than dllimport from libm.so
18022         * file-io.c, file-io.h: fixed handle argument type.
18023
18024 2002-03-18  Dick Porter  <dick@ximian.com>
18025
18026         * reflection.c (mono_image_get_type_info): rename interface to
18027         iface, because of "#define interface struct" on windows.
18028
18029 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18030
18031         * class.c, class.h: rename and export mono_ptr_class_get().
18032         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18033         * reflection.c, reflection.h, icall.c: better/saner type name
18034         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18035         method signatures.
18036
18037 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
18038
18039         * class.c (mono_class_init): removed hardcoded GHC_SLOT
18040
18041         * icall.c (ves_icall_InternalInvoke): impl.
18042
18043 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18044
18045         * reflection.c: output the interface map table, too.
18046
18047 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18048
18049         * class.c (class_compute_field_layout): separate computation of 
18050         static field layout
18051
18052 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
18053
18054         * icall.c: added System.Buffer support.
18055         * file-io.c: moved file icalls from PAL to FileStream.
18056
18057 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18058
18059         * icall.c (ves_icall_System_Object_GetHashCode): impl.
18060
18061 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
18062
18063         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18064
18065 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18066
18067         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18068
18069 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18070
18071         * debug-helpers.{c,h}: moved here from monograph some useful functions
18072         to locate a method by name/signature in a class or image. Included
18073         also a small and flexible IL disassembler.
18074
18075 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18076
18077         * reflection.c: fixup tokens in methods with small header size, too.
18078
18079 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
18080
18081         * object.c (mono_string_to_utf8): remove assert(!error), instead
18082         print a warning. 
18083
18084 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18085
18086         * icall.c: update to the new mono_Array_class_get interface.
18087
18088 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18089
18090         * appdomain.c, object.c: Boehm-GC enable.
18091         * icall.c: make get_data_chunk() support split data requests.
18092         Ensure a class is initialized in more cases. Return only the first
18093         property found in GetProperties() or the compiler gets confused. 
18094         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18095         * reflection.h, reflection.c: add fixup mechanism for field and method
18096         tokens. Initialize assembly->typeref in a single place. Output
18097         properties after events. Support custom attributes for events, too.
18098         Typo fix for paramter custom attrs.
18099
18100 2002-03-07  Martin Baulig  <martin@gnome.org>
18101
18102         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18103
18104 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
18105
18106         * class.c (mono_array_class_get): fix. for multi. dim. arrays
18107
18108 2002-03-06  Martin Baulig  <martin@gnome.org>
18109
18110         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18111         non-zero lower bounds. See testcases #F10-#F13.
18112
18113 2002-03-05  Martin Baulig  <martin@gnome.org>
18114
18115         * exception.c (mono_get_exception_argument_out_of_range): New exception.
18116
18117         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18118         ves_icall_System_Array_GetValue(), only calculate the absolute array position
18119         here.
18120         (ves_icall_System_Array_SetValue): Likewise.
18121         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18122         as argument and does the actual work. This function is used when copying a
18123         multi-dimensional array.
18124         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18125         now do all the widening conversions of value types.
18126         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18127
18128 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18129
18130         * class.c: remove some magic numbers and use the smbolic names,
18131         instead. Added init_events() to load event info at class init time.
18132         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18133         and mono_metadata_methods_from_event().
18134         * reflection.h, reflection.c: added support for writing out the evnets
18135         related information.
18136
18137 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18138
18139         * reflection.h, icall.c: use a different method (GetInterfaces)
18140         to gather interface info and add isbyref, isprimitive and
18141         ispointer to the ves_icall_get_type_info() return value.
18142
18143 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18144
18145         * class.h: stared adding support for events.
18146         * icall.c: split find_members implementation. Added debug icall to get
18147         the address of an object.
18148         * reflection.c: handle TypeBuilders in mono_type_get_object().
18149
18150 2002-03-01  Martin Baulig  <martin@gnome.org>
18151
18152         * icall.c (ves_icall_System_Array_GetLength): This must throw an
18153         ArgumentOutOfRangeException(), not an ArgumentException().
18154         (ves_icall_System_Array_GetLowerBound): Likewise.
18155         (ves_icall_System_Array_GetValue): Improved argument checking.
18156         (ves_icall_System_Array_SetValue): Improved argument checking.
18157
18158 2002-03-01  Martin Baulig  <martin@gnome.org>
18159
18160         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18161         called with invalid arguments rather than just dying with g_assert().
18162         (ves_icall_System_Array_SetValue): Likewise.
18163         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18164         raise a NotImplementedException instead.
18165         (ves_icall_System_Array_GetLength): Added argument checking.
18166         (ves_icall_System_Array_GetLowerBound): Added argument checking.
18167
18168 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
18169
18170         * object.h (mono_assert): new macros mono_assert and
18171         mono_assert_not_reached
18172
18173 2002-02-28  Martin Baulig  <martin@gnome.org>
18174
18175         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18176         and "System::String::IsInterned" to "System::String::_IsInterned".
18177
18178 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18179
18180         * icall.c: remove hacks for typebuilder. Added icall to create a
18181         modified type from a tybebuilder.
18182         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18183         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18184         to create a backing MonoClass for a TypeBuilder.
18185
18186 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18187
18188         * class.c, class.h: more refactoring of class init.
18189         Export mono_class_setup_mono_type() and mono_class_setup_parent().
18190
18191 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18192
18193         * marshal.c, marshal.h: start of marshaling interface.
18194
18195 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18196
18197         * icall.c: fix order in assembly qualified name icall.
18198
18199 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18200
18201         * class.c: do not free str, since we store it in the hash table.
18202         * reflection.h: add label field to MonoILExceptionInfo.
18203         * reflection.c: handle references to more than one assembly. Handle
18204         case when there isn't a module created in the assembly.
18205
18206 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18207
18208         * class.c: Fix typo. Start refactoring of class init code.
18209
18210 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18211
18212         * appdomain.c: exit with 1 on error.
18213         * class.c: we already have the name in MonoClassField.
18214         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18215         MonoStreamHeader instead of an offset of image->raw_metadata.
18216
18217 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
18218
18219         * appdomain.c (mono_init): Be even more descriptive about the error.
18220
18221 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18222
18223         * appdomain.c: give the user an informative message when corlib can't
18224         be loaded.
18225
18226 2002-02-26  Martin Baulig  <martin@gnome.org>
18227
18228         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18229         New icall to get the time zone data.
18230
18231 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18232
18233         * reflection.c: set virtual and raw size of section correctly.
18234         * threads.c: transfer domain information to newly created threads.
18235
18236 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18237
18238         * class.c: when instancing a class in a domain, load the default
18239         vaules for static fields from the constant table. Fix System.Enum to
18240         not be an enum.
18241         * icall.c: implement Object::GetType() internalcall. Implemented
18242         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18243         Fixed checking of binding flags in find_members().
18244         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18245         * reflection.c: handle enumerations when writing to the constant
18246         table. Use a different object cache for types.
18247
18248
18249 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
18250
18251         * object.c (mono_object_isinst): fix for arrays
18252
18253         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18254
18255 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18256
18257         * object.c: don't use mprotect ()  and fix intern pool hash table
18258         lookup for big endian systems.
18259
18260 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18261
18262         * icall.c: change type_is_subtype_of () signature.
18263
18264 2002-02-21  Mark Crichton  <crichton@gimp.org>
18265
18266         * rand.c, rand.h: Added random number generator for
18267         System.Security.Cryptography classes.
18268
18269         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18270
18271         * icall.c: Added System.Security.Cryptography calls.
18272
18273 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18274
18275         * class.c, icall.c, metadata.c: better support for pointer types.
18276         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18277         * reflection.c: Add support for getting custom attrs for properties
18278         and simplify some code.
18279
18280 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18281
18282         * icall.c: change getToken () and add custom attribute GetBlob()helper
18283         method.
18284         * reflection.h: add custom attrs array to the reflection builder structures.
18285         * reflection.c: encode and emit custom attributes for all the relevant
18286         reflection objects. Cache fieldref and methodref tokens. Change
18287         mono_image_create_token() interface to take a MonoDynamicAssembly.
18288         More complete custom attributes decoder. Load custom attributes for
18289         Assembly, Field, Method and Constructor objects, too. Make the
18290         returned array an Attribute[] one, not object[]. Added
18291         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18292         custom attribute constructor.
18293
18294 2002-02-20  Dick Porter  <dick@ximian.com>
18295
18296         * icall.c:
18297         * rawbuffer.c:
18298         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18299         problem code out for now).
18300
18301 2002-02-19  Radek Doulik  <rodo@ximian.com>
18302
18303         * object.c (mono_ldstr): use hash table to avoid multiple swapping
18304
18305 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18306
18307         * icall.c: register the GetCustomAttributes method.
18308         * object.c, object.h: add mono_string_new_len ().
18309         * reflection.h, reflection.c: added mono_runtime_invoke(),
18310         mono_install_runtime_invoke(). Added
18311         mono_reflection_get_custom_attrs () to load custom attributes and
18312         create the attribute objects.
18313
18314 2002-02-19  Dick Porter  <dick@ximian.com>
18315         * threads-dummy-types.c:
18316         * threads-dummy-types.h:
18317         * threads-dummy.c:
18318         * threads-dummy.h:
18319         * threads-pthread-types.c:
18320         * threads-pthread-types.h:
18321         * threads-pthread.c:
18322         * threads-pthread.h:  Deleted obsolete files
18323
18324 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
18325
18326         * class.c (mono_class_vtable): runtime init the class when we
18327         allocate static class data.
18328
18329         * icall.c (ves_icall_System_Array_SetValue): check for null values.
18330
18331         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18332         and String - but we will need generic marshalling support in the
18333         future. 
18334         (mono_init): set the domain name in a ms compatible way
18335
18336         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18337         String[].
18338
18339 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
18340
18341         * object.c (mono_array_clone): use alloca() instead of g_malloc  
18342         for sizes
18343
18344         * appdomain.c (mono_domain_unload): impl.
18345
18346 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18347
18348         * appdomain.c, object.c: fix intern pool implementation.
18349         * class.c: fix alignment code.
18350
18351 2002-02-16  Radek Doulik  <rodo@ximian.com>
18352
18353         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18354         and s2 > s1, just copy lower bytes to be compatible with little
18355         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18356         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18357
18358         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18359         force big_endian to be 1 for big endian machines 
18360         (ves_icall_iconv_new_decoder): ditto
18361
18362 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
18363
18364         * socket-io.c (convert_sockopt_level_and_name): If the system
18365         doesn't define SOL_IP or SOL_TCP, get them by hand using
18366         getprotobyname() and caching the values (because this could be a
18367         slow operation).
18368         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18369         Use the appropriate struct when the system does support it. Ie,
18370         not all systems have struct ip_mreqn so use struct ip_mreq when
18371         appropriate.
18372
18373 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18374
18375         * reflection.c: handle finally clauses.
18376
18377 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18378
18379         * socket-io.c: use g_snprintf() instead of snprintf.
18380
18381 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18382
18383         * reflection.c (mono_param_get_objects): Cast second argument to
18384         mono_method_get_param_names to a const char** to silence the
18385         compiler warning.
18386
18387         * appdomain.c (mono_domain_assembly_open): Put parens around the
18388         truth statement in the for-loop.
18389
18390         * unicode.c (iconv_convert): Got rid of a compiler warning about
18391         int i being unused when the system has a new iconv.
18392         (iconv_get_length): Same.
18393
18394         * image.c (load_class_names): Cast the second argument to
18395         g_hash_table_insert() to char* to hush compiler warnings about the
18396         arg being a const.
18397         (mono_image_open): Same here.
18398
18399         * socket-io.c: Don't conditionally include sys/filio.h or
18400         sys/sockio.h here anymore since we now get them from
18401         io-layer/io-layer.h
18402         (inet_pton): If the system doesn't support inet_aton, implement
18403         using inet_addr and also #define INADDR_NONE if it isn't defined
18404         by the system.
18405
18406 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18407
18408         * metadata.c, metadata.h: added function to get packing and size info
18409         of a typedef.
18410         * reflection.h, reflection.c: handle field RVA data. Save info about
18411         the table layout if needed. Assign typedef indexes to all the types
18412         before dumping the info about them to avoid forward reference problems.
18413
18414 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
18415
18416         * socket-io.c (convert_sockopt_level_and_name): ifdef
18417         SO_ACCEPTCONN because it is not defined on my system (old debian)
18418
18419 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18420
18421         * opcode.c: use stddef.h to get NULL.
18422
18423 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18424
18425         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18426         for FIONBIO, FIONREAD and SIOCATMARK.
18427         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18428         define INADDR_NONE and besides, inet_addr() is deprecated and
18429         should not be used. Use inet_pton() instead - it also has the
18430         added bonus that it can easily handle IPv6 addresses as well.
18431         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18432
18433 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18434
18435         * decimal.c: remove _MSC_VER conditional.
18436
18437 2002-02-13  Dick Porter  <dick@ximian.com>
18438
18439         * socket-io.c: 
18440         * icall.c: Internal calls for Blocking, Select, Shutdown,
18441         GetSocketOption and SetSocketOption
18442
18443 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18444
18445         * assembly.cs: better resolver: use it instead of some kludgy
18446         code.
18447
18448 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18449
18450         * reflection.c: the best way to speed-up the compiler is to avoid
18451         infinite loops.
18452
18453 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
18454
18455         * class.c (mono_class_vtable): changed the object layout
18456         (obj->vtable->class). 
18457         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18458
18459 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18460
18461         * assembly.c: look for assemblies in the assembly dir, too.
18462
18463 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18464
18465         * class.c: fix thinko in mono_class_from_type().
18466
18467 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18468
18469         * exception.h, exception.c: added TypeLoadException.
18470         * object.h, object.c: added mono_array_clone ().
18471         * icall.c: handle throwOnError in AssemblyGetType().
18472         Added Array.Clone().
18473         * opcode.h, opcode.c: use a single value for the opcode val.
18474         Compile fix for non-gcc compilers.
18475
18476 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18477
18478         * opcodes.c, opcodes.h: export interesting info about opcodes.
18479
18480 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
18481
18482         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18483         icalls. 
18484
18485         * class.c (class_compute_field_layout): set element_class for enums
18486         (mono_class_create_from_typedef): set element_class for normal classes
18487
18488         * icall.c (ves_icall_System_Enum_get_value): impl.
18489
18490         * class.c (mono_class_create_from_typedef): do not set valuetype
18491         flag for System.ValueType and System.Enum
18492
18493 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
18494
18495         * unicode.c (iconv_convert): fix big endian problem.
18496
18497 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18498
18499         * class.c: add asserts if we are ever going to scribble over memory.
18500         * socket-io.c: not all systems have AF_IRDA defined.
18501
18502 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
18503
18504         * class.c (class_compute_field_layout): do not consider static
18505         fields to compute alignment
18506
18507 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
18508
18509         * appdomain.c (mono_appdomain_get): impl.
18510         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18511
18512 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18513
18514         * icall.c: ignore "file://" prefix when loading an assembly.
18515
18516 2002-01-23  Dick Porter  <dick@ximian.com>
18517
18518         * socket-io.c:
18519         * icall.c:
18520         * Makefile.am: Added socket support
18521
18522 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18523
18524         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18525         code back.  This should return the assemblies that are loaded by
18526         the runtime on behalf of an application domain. 
18527
18528         The current implementation is still broken, it just returns every
18529         assembly loaded, but until we get real applications domain this
18530         will do.
18531
18532 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
18533
18534         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18535         AppDomain object.
18536
18537 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18538
18539         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18540         the mono_class_from_name lookup.
18541         (ves_icall_get_parameter_info): ditto.
18542         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18543         method.
18544         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18545
18546 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18547
18548         * class.c: load also nested classes on class init.
18549         System.ValueType instance methods gets passed boxed
18550         values, unless methods in derived classed that get a pointer to the
18551         data.
18552         * icall.c: use better name parsing code in GetType().
18553         * image.c, image.h: add mono_image_loaded ().
18554         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18555         * reflection.c, reflection.h: added mono_reflection_parse_type().
18556
18557 2002-01-22  Veronica De Santis <veron78@interfree.it>
18558
18559         * icall.c : Added mapping of internal calls for Manual and Auto reset events
18560         * threads.c : Added the implementation of internal calls for events
18561         * threads.h : Added prototypes of internal calls for events
18562         
18563 2002-01-21  Radek Doulik  <rodo@ximian.com>
18564
18565         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18566
18567 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
18568
18569         * class.c (mono_class_init): set min_align to 1 (instead of 0)
18570         (mono_class_value_size): use min_align
18571
18572 2002-01-20  Dick Porter  <dick@ximian.com>
18573
18574         * threads.h:
18575         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18576         so it compiles on w32.
18577
18578 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
18579
18580         * metadata.c (mono_type_stack_size): impl.
18581
18582         * class.c (mono_class_get_field): impl. memberref token
18583
18584 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18585
18586         * icall.h : Added the internal calls mapping for CreateMutex_internal
18587                     and ReleaseMutex_internal.
18588         * threads.h : Added the prototype of mutexes internal calls.
18589         * threads.c : Added the implementations of mutexes internal calls.
18590
18591 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18592
18593         * metaparse.h: removed unused file.
18594         * reflection.c, reflection.h: added stream_data_align () function 
18595         to align data in streams and keep stream aligned. Add support for
18596         exception support in method headers.
18597
18598 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18599
18600         * unicode.c: make iconv_convert () return the number of bytess written
18601         in the output buffer.
18602
18603 2002-01-15  Dick Porter  <dick@ximian.com>
18604         * threads.c: Make the runtime's idea of infinite timeouts coincide
18605         with the class library's
18606
18607         Fix a particularly egregious bug in mono_thread_cleanup(). That
18608         code was so utterly bogus it must have been written on a Monday.
18609
18610 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18611
18612         * reflection.h: add subtypes field to TypeBuilder.
18613         * reflection.c: encode constants for literal fields.
18614         Handle subtypes. Fix user string token (and add a zero byte)
18615         at the end.
18616         
18617 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
18618
18619         * class.c (mono_class_init): bug fix: assign slot numbers for
18620         abstract methods.
18621
18622 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18623
18624         * reflection.c: don't try to output a code RVA for abstract methods.
18625         Small fixes for method header format. Output parameter info to the
18626         ParamDef table. Save method overriding info to MethodImpl table.
18627         Fix property support. Allow typedef.extends to be a type in the
18628         building assembly.
18629         * verify.c: fix off-by-one error.
18630
18631 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18632
18633         * class.c: fix mono_class_from_mono_type () for szarray types.
18634         Remove unused cache check in mono_class_from_type_spec().
18635         * icall.c: *type_from_name () functions handle simple arrays and byref.
18636         * reflection.c: handle byref and szarray types. Handle methods without
18637         body (gets P/Invoke compilation working). Handle types and fields in
18638         get_token ().
18639         * reflection.h: add rank to MonoTypeInfo.
18640
18641 2002-01-10  Dick Porter  <dick@ximian.com>
18642
18643         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18644         internal calls
18645
18646 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18647
18648         * icall.c: initialize class in type_from_handle ().
18649         Loop also in parent classes for get_method ().
18650         * reflection.c: properly encode class and valuetype types.
18651         Start on encoding TypeBuilder types. Handle fieldrefs.
18652         Use correct length when registering a user string.
18653         Handle ConstructorBuilder and MonoMethod in get_token ().
18654         Make mono_type_get_object () aware of cached types.
18655         * object.c: back out change to mono_string_new ().
18656
18657 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18658         * object.c: mono_string_new should return a NULL when the string 
18659         passed in is NULL -- not try to deference it.
18660         
18661 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18662
18663         * icall.c: hack to make IsSubType work for TypeBuilders.
18664         * reflection.c: emit constructors before methods.
18665         Retrieve param names in mono_param_get_objects().
18666
18667 2002/01/05  Nick Drochak  <ndrochak@gol.com>
18668
18669         * Makefile.am: fix list of headers and sources so automake 1.5
18670         doesn't complain. Removed \# at end of list.
18671
18672 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18673
18674         * reflection.c: get token for a method ref. Set return type of
18675         constructor to void.
18676         * loader.c: debug message.
18677         * class.c: typo fix.
18678
18679 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18680
18681         * icall.c: fix array init with rank > 1. FindMembers
18682         loops in parent class as well.
18683         * image.c: do not insert nested types in name cache.
18684         * reflection.c: warning fix.
18685         * reflection.h: add override method (for interface impl).
18686
18687 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18688
18689         * metadata.c: fix customattr decoding.
18690
18691 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
18692
18693         * rawbuffer.cs: Added native Win32 implementation, avoids using
18694         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18695
18696 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18697
18698         * class.c: make the low-level routines handle the cache.
18699
18700 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18701
18702         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18703
18704 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18705
18706         * class.c: fix mono_array_element_size() for objects.
18707         * class.h, class.c: add properties to MonoClass and load them
18708         at init time.
18709         * icall.c: check with isinst() when assigning a value to an array
18710         instead of requiring the classes to match exactly.
18711         Implemented icall for System.Type::GetType().
18712         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18713         enums. Handle bindingflags when looking for methods and fields.
18714         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18715         and mono_metadata_methods_from_property().
18716         * reflection.h, reflection.c: added structures for propreties,
18717         parameters and enums. Implemented mono_property_get_object() and
18718         mono_param_get_objects().
18719
18720 2001-12-18  Dick Porter  <dick@ximian.com>
18721
18722         * file-io.c: Use mono_string_to_utf16() instead of
18723         mono_string_chars()
18724
18725         * object.c: Added mono_string_to_utf16(), which copies the non
18726         NULL-terminated MonoString into a new double-null-terminated
18727         buffer.
18728
18729 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
18730
18731         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18732
18733 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
18734
18735         * file-io.c: raise exceptions if handle is invalid.
18736
18737 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18738
18739         * assembly.c: yet another check for mscorlib.
18740         * class.c, class.h: load nesting info for classes.
18741         * icall.c: many new functions to support the Reflection classes.
18742         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18743         * reflection.h, reflection.c: mono_image_create_token(),
18744         mono_assembly_get_object(), mono_type_get_object(),
18745         mono_method_get_object(), mono_field_get_object(): methods to return
18746         objects that parallel the C representation of assemblies, types,
18747         methods, fields.
18748
18749 2001-12-11  Dick Porter  <dick@ximian.com>
18750
18751         * icall.c:
18752         * file-io.c: Internal calls for file IO.
18753
18754 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18755
18756         * tabledefs.h: missing FileAttributes.
18757         * verify.h, verify.c: use is_valid_string () to simplify and check for
18758         valid strings more correctly. Fix warnings and speeling.
18759         Check more tables: Filed, File, ModuleRef, StandAloneSig.
18760         Check code: branches, maxstack, method calls.
18761
18762 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
18763
18764         * object.c (mono_object_allocate): removed static, so that the jit
18765         can allocate value types.
18766
18767         * icall.c (ves_icall_System_DateTime_GetNow): impl.
18768
18769 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18770
18771         * class.c: init enum types right away and register the
18772         token->MonoClass map in mono_class_create_from_typedef ().
18773         * verify.h, verify.c: first cut of the verifier.
18774         * pedump.c: add --verify switch to verify metadata tables.
18775         * tabledefs.h: add some missing enums.
18776
18777 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
18778
18779         * class.c (mono_install_runtime_class_init): impl.
18780         (mono_class_init): renamed mono_class_metadata_init to
18781         mono_class_init, also removed the metadata_inited flag
18782
18783         * object.c (mono_object_isinst): use faster algorithm
18784
18785 2001-11-30  Radek Doulik  <rodo@ximian.com>
18786
18787         * mono-endian.h: reverted last change
18788         added function prototypes
18789
18790         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18791         add mono-endian.c back
18792
18793         * mono-endian.c: returned back, as Paolo pointed out, it's needed
18794         for unaligned access, I've mistaked it with endianess. I am
18795         sorry.
18796         (mono_read16): fix reverted endianess
18797         (mono_read64): ditto
18798         (mono_read32): ditto
18799
18800 2001-11-30  Dick Porter  <dick@ximian.com>
18801
18802         * exception.c: Implement mono_exception_from_name()
18803
18804 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18805
18806         * metadata.h, metadata.c: remove params_size and locals_size and their
18807         calculation from the metadata code: they are only usefult to the
18808         interp.
18809
18810 2001-11-29  Radek Doulik  <rodo@ximian.com>
18811
18812         * object.c (mono_ldstr): swap bytes here, it's probably not the
18813         best place, but works for me now, I'll redo it once I know mono
18814         better, also note that I add PROT_WRITE and don't reset back, also
18815         note that it's only affects big endians, so x86 should be OK
18816
18817         * mono-endian.h (read16): use just glib macros for both endians
18818
18819         * mono-endian.c: removed as glib macros are used in in
18820         mono-endian.h so we don't need to care about endianess for read
18821         macros as glib does that for us already
18822
18823 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18824
18825         * class.h, class.h: take minimum alignment into consideration so
18826         that the fields of a class remain aligned also when in an array.
18827
18828 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18829
18830         * loader.h, loader.c: add mono_method_get_param_names().
18831         * class.c: 0-init class fields.
18832
18833 2001-11-26  Dick Porter  <dick@ximian.com>
18834
18835         * icall.c:
18836         * threads-types.h:
18837         * threads.c: New file that handles System.Threading on all platforms
18838
18839         * object.c: 
18840         * object.h: Remove the synchronisation struct from MonoObject,
18841         replace it with a pointer that gets initialised on demand
18842
18843         * Makefile.am: Replace all the system-specific threading code with
18844         a single file that uses the new wrapper library
18845
18846 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18847
18848         * class.c, class.h: add mono_install_trampoline() so that the runtime
18849         can register a function to create a trampoline: removes the ugly
18850         requirement that a runtime needed to export arch_create_jit_trampoline.
18851         * object.h, object.c: added mono_install_handler() so that the runtime
18852         can install an handler for exceptions generated in C code (with
18853         mono_raise_exception()). Added C struct for System.Delegate.
18854         * pedump.c: removed arch_create_jit_trampoline.
18855         * reflection.c: some cleanups to allow registering user strings and
18856         later getting a token for methodrefs and fieldrefs before the assembly
18857         is built.
18858         * row-indexes.h: updates and fixes from the new ECMA specs.
18859
18860 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18861
18862         * class.h, class.c: add enum_basetype field to MonoClass.
18863         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18864         to get index in the constant table reated to a field, param or
18865         property.
18866         * reflection.h, reflection.c: handle constructors. Set public-key and
18867         version number of the built assembly to 0.
18868         * row-indexes.h: update from new ECMA spec.
18869
18870 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18871
18872         * class.h, class.c: add a max_interface_id to MonoClass.
18873         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18874         since it's used to do that. Added mono_type_type_from_obj().
18875         Make GetType() return NULL instead of segfaulting if the type was not
18876         found. Handle simple arrays in assQualifiedName.
18877         * object.h: add a struct to represent an Exception.
18878         * reflection.c: output call convention in method signature.
18879         Add code to support P/Invoke methods and fixed offsets for fields.
18880
18881 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18882
18883         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18884         the value.
18885         * icall.c: use mono_array_addr instead of array->vector: fixes the
18886         reflection image writing.
18887         * reflection.c: init call convention byte to 0 in method signature.
18888         Encode the property signature. Don't output property-related methods
18889         twice. Really process the properties for a type (don't cast a field to
18890         a property, my mom always told me that).
18891         Fix 64 bit issues in pointer alignment in a different and more
18892         readable way.
18893
18894 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
18895
18896         * loader.h: Removed type class from MonoDefaults, added monotype
18897
18898         * loader.c: Loaded MonoType, removed loading of Type
18899
18900         * icall.c (my_mono_new_object): Now returns a System.MonoType,
18901         and fills in System.Type._impl with a RuntimeTypeHandle rather
18902         than the actual MonoClass *
18903
18904         (ves_icall_type_from_handle): change from type_class to
18905         monotype_class
18906
18907         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18908         implemented
18909
18910         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18911         implemented
18912
18913         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18914
18915         (ves_icall_System_Reflection_Assembly_GetType): implemented
18916
18917         (ves_icall_System_MonoType_assQualifiedName): implemented
18918
18919         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18920
18921 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
18922
18923         * assembly.c (mono_assembly_open): Implement a cache for the
18924         assemblies. 
18925
18926         (mono_assembly_close): only destroy the assembly when the last
18927         reference is gone.
18928         
18929 2001-11-09  Dick Porter  <dick@ximian.com>
18930
18931         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18932
18933 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
18934
18935         * class.c (mono_class_metadata_init): bug fix: compute the right slot
18936
18937 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18938
18939         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18940         from Martin Weindel.
18941         * object.h: add mono_string_chars ().
18942
18943 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
18944
18945         * reflection.c (build_compressed_metadata): Eliminates warnings
18946         and uses 64-bit clean code.
18947
18948         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18949         (mono_type_equal): Change signature to eliminate warnings.
18950
18951 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18952
18953         * icall.c, loader.c: remove the internalcall array constructors.
18954         Changes to match the new MonoArray structure.
18955         * object.h, object.c: an array object doesn't allocate an extra
18956         vector. Add mono_array_new_full () to create jagged arrays easily.
18957
18958 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18959
18960         * metadata.h, metadata.c: add mono_metadata_field_info () to
18961         retreive all the info about a field from vairous tables.
18962         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18963         * class.h, class.c: augment MonoClassField with more info.
18964         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18965         policy and load a field's RVA if needed.
18966
18967 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
18968
18969         * class.c (mono_class_metadata_init): create a trampoline for all
18970         virtual functions instead of actually compiling them.
18971
18972 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18973
18974         * class.h, class.c: include name in MonoClassField.
18975         * class.c: fix fundamental type of System.Object and System.String.
18976         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18977         tokens in ldtoken.
18978         * icall.c: remove internalcalls for the Reflection stuff that is now
18979         done in C# code.
18980         * loader.c: mono_field_from_memberref () implementation.
18981         * mono-endian.c: thinko (s/struct/union/g).
18982         * object.c, object.h: make the mono_string_* prototypes actually use
18983         MonoString instead of MonoObject.
18984         * reflection.c, reflection.h: updates for changes in the reflection
18985         code in corlib: we use C structures that map to the actual C# classes.
18986         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18987         fat method header if needed and use the info from the ILGenerator for
18988         methods. Handle fields in types. Misc fixes.
18989
18990 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
18991
18992         * class.c (mono_class_metadata_init): bug fix: always allocate
18993         space for static class data
18994
18995 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
18996
18997         * class.c (mono_compute_relative_numbering): use relative
18998         numbering to support fast runtime type checks.
18999
19000 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
19001
19002         * class.c (mono_class_create_from_typeref): added debugging output
19003         to print class name when MonoDummy is returned instead of real class
19004
19005 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
19006
19007         * class.c (mono_class_metadata_init): interface offset table now
19008         contains pointers into the vtable - this is more efficient for the jit
19009
19010 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
19011
19012         * class.c (mono_class_metadata_init): use a temporary vtable (the
19013         old algorithm only worked for the interpreter, but not for the jit)
19014
19015 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
19016
19017         * loader.c (method_from_memberref): use mono_class_get to get the
19018         class of an array instead of using System.Array directly.
19019         (mono_get_method): also add MEMBERREF methods to the method cache
19020         which usefull for arrays.
19021
19022 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
19023
19024         * pedump.c (arch_compile_method): added to compute vtable entry
19025
19026         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19027         number of interfaces.
19028         
19029         * class.h: merged MonoArrayClass into MonoClass
19030
19031         * class.c (mono_class_create_from_typedef): compute the vtable size and
19032         allocate space to include the vtable inside MonoClass
19033         (mono_class_metadata_init): initialize the vtable
19034
19035 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19036
19037         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19038         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19039         * image.c: endian fixes by Laurent Rioux.
19040         * object.h, object.c: rename MonoStringObject to MonoString and
19041         MonoArrayObject to MonoArray. Change some function names to conform to
19042         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19043         guint16* as first argument, so don't use char*.
19044         Provide macros to do the interesting things on arrays in a portable way.
19045         * threads-pthread.c: updates for the API changes and #include <sched.h>
19046         (required for sched_yield()).
19047         * icall.c: updates for the API changes above.
19048         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19049         platforms that need them.
19050
19051 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19052
19053         * class.c: set the correct type for all the fundamental
19054         type when loading the class.
19055
19056 2001-10-05  Dick Porter  <dick@ximian.com>
19057
19058         * threads-pthread.c (pthread_mutex_timedlock): Simple
19059         compatibility version for C libraries that lack this call.
19060
19061 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19062
19063         * class.c: MonoTypes stored in MonoClass are stored as
19064         fundamental MonoTypes when the class represents a
19065         fundamental type (System.Int32, ...).
19066         The TypeHandle return by ldtoken is a MonoType*.
19067         * icall.c: ves_icall_get_data_chunk () write out all the
19068         PE/COFF stuff. Implement ves_icall_define_method (),
19069         ves_icall_set_method_body (), ves_icall_type_from_handle ().
19070         * image.c: properly skip unknown streams.
19071         * loader.h, loader.c: add type_class to mono_defaults.
19072         * metadata.c, metadata.h: export compute_size () as
19073         mono_metadata_compute_size () with a better interface.
19074         Typo and C&P fixes.
19075         * pedump.c: don't try to print the entry point RVA if there is no entry point.
19076         * reflection.c, reflection.h: many cleanups, fixes, output method
19077         signatures and headers, typedef and typeref info, compress the metadata
19078         tables, output all the heap streams, cli header etc.
19079         * row-indexes.h: typo fixes.
19080
19081 2001-10-04  Dick Porter  <dick@ximian.com>
19082
19083         * object.h: Add a synchronisation mutex struct to MonoObject
19084
19085         * object.c (mono_new_object): Initialise the object
19086         synchronisation mutexes
19087
19088         * icall.c: System.Threading.Monitor internal calls
19089         
19090         * threads-pthread.h:
19091         * threads-pthread.c: System.Threading.Monitor internal calls
19092
19093         * threads-types.h: New file, includes the system-specific thread
19094         structures
19095         
19096         * threads-pthread-types.h:
19097         * threads-pthread-types.c: New files, handle pthread-specific
19098         synchronisation types
19099
19100         * threads-dummy-types.h: 
19101         * threads-dummy-types.c: New files of dummy support for
19102         thread-specific types
19103
19104         * metadata.c:
19105         * image.c:
19106         * pedump.c: include mono-endian.h not endian.h
19107         
19108         * Makefile.am: More threads files.
19109         Name mono-endian.h not endian.h
19110
19111 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19112
19113         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
19114         stuff and implement a few more bits.
19115         * icall.c: a field needs to be dereferenced twice. Do not use the same
19116         name for two variables in the same scope.
19117         * image.c, image.h: cleanups.
19118
19119 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
19120
19121         * class.c (mono_class_metadata_init): bug fix: compute the right size
19122
19123 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19124
19125         * icall.c: implemented some of the Reflection internalcalls.
19126         * image.c, image.h: start writing out the PE/COFF image.
19127         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19128         that does the reverse than decode_blob_size ().
19129         * object.c: use mono_metadata_encode_value (). Move here
19130         temporary implementation of mono_string_to_utf8 ().
19131         * rawbuffer.c: make malloc_map static.
19132
19133 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19134
19135         * metadata.c: fix type comparison for arrays.
19136         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19137         Added a couple of new classes to monodefaults.
19138         * icall.c: added a couple of Reflection-related internalcalls.
19139         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19140         Added a byval_arg MonoType to MonoClass.
19141
19142 2001-09-28  Dick Porter  <dick@ximian.com>
19143
19144         * icall.c:
19145         * threads-pthread.h: 
19146         * threads-pthread.c: Implemented internal calls for
19147         LocalDataStoreSlot operations.  Applied mutexes around all shared
19148         data.  Reworked the thread creation and Start() operations to
19149         avoid a race condition.
19150         
19151         * threads-dummy.h:
19152         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19153
19154 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19155
19156         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19157
19158 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19159
19160         * class.c, loader.c: warn and return NULL instead of erroring out.
19161         * icall.c: added System.AppDomain::getCurDomain().
19162         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19163
19164 2001-09-25  Dick Porter  <dick@ximian.com>
19165
19166         * threads-pthread.h:
19167         * threads-pthread.c: Implemented timed thread joining and added
19168         System.Threading.Thread::Join_internal internal call
19169
19170         * icall.c: Added System.Threading.Thread::Join_internal internal call
19171
19172         * threads-dummy.h:
19173         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19174
19175 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19176
19177         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19178         mono_string_intern () to implement the semantics of the ldstr opcode
19179         and the interning of System.Strings.
19180         * icall.c: provide hooks to make String::IsIntern and String::Intern
19181         internalcalls.
19182
19183 2001-09-23  Dick Porter  <dick@ximian.com>
19184
19185         * threads-dummy.c: 
19186         * threads-dummy.h: New files of dummy threading routines
19187
19188         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19189         support code based on system specifics
19190
19191         Rename PTHREAD_LIBS to THREAD_LIBS
19192         
19193 2001-09-23  Dick Porter  <dick@ximian.com>
19194
19195         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19196         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19197         internal calls.
19198         (mono_thread_init): Set up a Thread object instance to return when
19199         the main thread calls Thread.CurrentThread
19200         (mono_thread_cleanup): Wait for all subthreads to exit
19201
19202         * icall.c: New internal calls for System.Threading.Thread::Sleep
19203         (including Schedule) and CurrentThread
19204
19205         * threads.h: New file, to insulate thread-specific stuff from the
19206         rest of the code
19207
19208 2001-09-21  Dick Porter  <dick@ximian.com>
19209
19210         * threads-pthread.h: 
19211         * threads-pthread.c: New file, for handling pthreads-style
19212         threading support.  Start() now starts a new thread and executes
19213         the ThreadStart delegate instance.
19214
19215         * icall.c: Added the internalcall for
19216         System.Threading.Thread::Start_internal
19217
19218         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19219
19220 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19221
19222         * loader.c: work around the different signatures for delegates
19223         constructors csc generates in compiled code vs the ones compiled in mscorlib.
19224
19225 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19226
19227         * class.h, class.c: add mono_class_get_field_from_name ().
19228         * *: Fix C comments and other ANSI C issues.
19229
19230 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19231
19232         * endian.h, assembly.c: fix some endianness issues.
19233
19234 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19235
19236         * loader.h, load.c: add delegate_class to mono_defaults.
19237         Handle runtime provided methods in mono_get_method ().
19238
19239 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
19240
19241         * loader.c (mono_get_method): use pinvoke for internal call
19242
19243         * icall.c: use pinvoke for internal call
19244
19245         * loader.c (method_from_memberref): set the method name
19246
19247 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19248
19249         * metadata.c: help the compiler generate better code for
19250         mono_class_from_mono_type ().
19251
19252 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
19253
19254         * class.c (mono_class_metadata_init): delayed computing of the
19255         class size to mono_class_metadata_init ()
19256
19257 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19258
19259         * class.c, class.h: add an interfaces member to MonoClass.
19260         * image.c, image.h: add assembly_name field to MonoImage
19261         from the assembly table.
19262         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19263
19264 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19265
19266         * class.c: Handle Array in mono_class_from_mono_type ().
19267         * metadata.c, pedump.c: some endian fixes.
19268
19269 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19270
19271         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19272         * metadata.c: fix small problem introduced with the latest commit.
19273
19274 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19275
19276         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19277         We don't need a MonoMetadata pointer anymore to compare signatures in
19278         mono_metadata_signature_equal (), update callers.
19279         Reduced memory usage an number of allocations for MonoMethodHeader and
19280         MonoMethodSignature.
19281
19282 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19283
19284         * metadata.c: added compare for szarray.
19285
19286 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19287
19288         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19289         and add a couple more types to it and mono_defaults. Give an hint on
19290         classes that need implementing in our corlib and are referenced
19291         in mscorlib.
19292
19293 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19294
19295         * class.h, class.c: keep track if a class is also an Enum.
19296         * loader.c: Implement a couple more types for use in libffi
19297         marshalling. Gives better diagnostics when failing to dlopen
19298         a library. Set method->klass for P/Invoke methods, too.
19299
19300 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19301
19302         * class.c, class.h: add a MonoType this_arg to MonoClass that
19303         represents a pointer to an object of the class' type that
19304         can be used by the interpreter and later the type cache.
19305         Add best guess alignment info for valuetype objects.
19306
19307 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19308
19309         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19310         into MonoType: one less level of indirection and allocation and
19311         simplifies quite a bit of code. Added cache for MonoTypes that are
19312         used frequently, so that we don't need to allocate them all the time.
19313
19314 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
19315
19316         * class.c (mono_class_create_from_typedef): System.Enum is also a
19317         value type, although it does not derive from System.ValueType
19318         (maybe a bug in the ms compiler?)
19319
19320         * metadata.c (mono_type_size): return the right size for value types
19321
19322         * loader.c (mono_get_method): only initialize method header if not abstract
19323
19324         * class.c (mono_class_from_mono_type): use mono_default values. 
19325
19326 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
19327
19328         * *: use MonoClass pointers instead of <type_tokens>
19329         
19330         * class.h: new flag: metadata_inited.
19331
19332         * class.c (mono_class_metadata_init): impl.
19333         (mono_class_instance_size): impl.
19334         (mono_class_data_size): impl.
19335
19336 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19337
19338         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19339         MonoClass now has the name and name_space fields. 
19340         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19341         mono_get_method () takes and optional MonoClass as argument.
19342         Removed mono_typedef_from_name() and added mono_class_token_from_name()
19343         instead that takes advantage of a map from class names to typedef
19344         tokens in MonoImage.
19345
19346 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19347
19348         * metadata.c: zero is not a valid alignment boundary.
19349         Merge MONO_TYPE_VOID in default decoding code.
19350
19351 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
19352
19353         * image.h: merged MonoMetadata into MonoImage
19354
19355         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19356         identify the type of elements.
19357
19358 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19359
19360         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19361         * cil-coff.h: split MonoMSDOSHeader and add size info.
19362         * image.c: add some consistency checks.
19363         * metadata.c: fix row size computation: one programmer
19364         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19365         add explanation for the locator routine.
19366         Fix decoding of size in method header.
19367         
19368 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
19369
19370         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
19371         (g_concat_dir_and_file): Bring g_concat_dir_and_file
19372         function from gnome-libs.  This uses the right path separator
19373         based on the OS, and also works around a bug in some systems where
19374         a double slash is not allowed. 
19375         (default_assembly_name_resolver): Use g_concat_dir_and_file
19376         (mono_assembly_open): ditto.
19377
19378 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
19379
19380         * metadata.c (mono_metadata_signature_equal): impl.
19381
19382         * *: void is now a realy MonoType (instead of using NULL)
19383         
19384         * metadata.c (do_mono_metadata_parse_type): use
19385         mono_metadata_parse_type to parse void value.
19386
19387 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19388
19389         * metadata.c, metadata.h: in the signature and method header store
19390         only the space required for holding the loca vars and incoming arguments.
19391
19392 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
19393
19394         * metadata.c (do_mono_metadata_parse_type): treat void like any
19395         other type (instead of assigning NULL);
19396
19397 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
19398
19399         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19400
19401 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
19402
19403         * image.c (do_mono_image_open): added a cache for arrays.
19404
19405 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19406
19407         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19408         decode a single column from a row in a metadata table and changes
19409         to take advantage of it in the typedef locator (gives a nice speed up).
19410         Store offset info for function params.
19411
19412 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
19413
19414         * image.h (MONO_IMAGE_IS_CORLIB): removed 
19415
19416 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19417
19418         * assembly.c: how could mono_assembly_close () had ever worked?
19419         * metadata.c, metadata.h: provide offset info for local vars.
19420         Implement mono_type_size () to take care of alignment as well
19421         as size (it was mono_field_type_size in cli/class.c before).
19422
19423 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
19424
19425         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19426
19427         * assembly.h (CORLIB_NAME): set to corlib.dll
19428
19429         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19430
19431 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19432
19433         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19434         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19435         tokentype.h: massive namespace cleanup.
19436
19437 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19438
19439         * metadata.h, metadata.c: decode exception clauses when parsing method header.
19440
19441 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
19442
19443         * metadata.c (mono_metadata_free_type): added check for type !=
19444         NULL (void) before calling mono_metadata_free_type()
19445
19446 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19447
19448         * metadata.h, row_indexes.h: added header with enumerations to use
19449         to index in the columns from tables in metadata and to decode coded
19450         tokens: we should start using this instead of embedding magic numbers
19451         all over the code.
19452
19453 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19454
19455         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19456         Move metadata_t info from cli_image_info_t to MonoImage, where
19457         it's easily accessible. Changed all the uses accordingly.
19458         Added the method and class caches to MonoImage.
19459         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19460         and mono_metadata_decode_value () signature to be more consistent
19461         with the other parse functions (and simplify code). Taken advantage
19462         of zero-length array allocation with GCC. Removed reduntant (and
19463         wrong) MonoFieldType struct and use MonoParam instead. Changed
19464         mono_metadata_parse_field_type () to use common code for parsing.
19465         Added mono_metadata_typedef_from_field () and
19466         mono_metadata_typedef_from_method () to lookup a typedef index from a
19467         field or method token.
19468         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19469
19470 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
19471
19472         * metadata.c (mono_metadata_parse_field_type): Implement. 
19473         (do_mono_metadata_parse_type): Split engine from
19474         mono_metadata_parse_type, so that we can create smaller structures
19475         for things that just have one pointer to the MonoType (look at
19476         the MonoFieldType)
19477
19478 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
19479
19480         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19481         as Jan Gray found out, it is incorrect. 
19482
19483 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
19484
19485         * assembly.c: Implement asssembly loading.  This loads an image
19486         and loads all the referenced assemblies.  Come to think of it, we
19487         could always do lazy loading of the assemblies. 
19488
19489         * image.c (mono_image_open): Keep loaded images in a hashtable.
19490
19491         * image.h (MonoImage): Add reference count.
19492
19493 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
19494
19495         * assembly.c (mono_assembly_open): Keep track of the file name in
19496         case the assembly has no ASSEMBLY table.
19497
19498         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
19499         from get.c here.
19500
19501 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19502
19503         * metadata.c, metadata.h: decode local vars in method header
19504         parse function. Change callers accordingly.
19505
19506 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19507
19508         * metadata.h, cil-coff.h: protect against multiple inclusion.
19509         Added some new structures to hold information decoded from metadata:
19510         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19511         and relevant decoding/free functions.
19512         * metadata.c: implement decoding functions. Add warning for out of bounds
19513         index in mono_metadata_locate(). Implement mono_get_method () to retreive
19514         all the info about a method signature and invocation. Remove check on
19515         uninitialized local var in parse_mh() and fix memory leak.
19516
19517 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
19518
19519         * metadata.h: More macros.
19520
19521         * tokentype.h: New file.
19522
19523 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19524
19525         * assembly.c: added a consistency check and initialize
19526         some structures with g_new0().
19527         * metadata.c: fixed a couple more bugs in table size computation
19528         and add other checks for out-of bound access to metadata.
19529
19530 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19531
19532         * metatada.c: fix bugs computing table sizes. Spew a
19533         warning when index in string heap is out of bounds.
19534
19535 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
19536
19537         * metadata.h: Add a couple of macros to manipulate tokens. 
19538
19539 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19540
19541         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19542         cli_section_tables).
19543
19544 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
19545
19546         * metadata.c (mono_metadata_user_string): New function, provides
19547         access to the UserString heap. 
19548
19549 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
19550
19551         * metadata.c: Add inline documentation.
19552
19553 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
19554
19555         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19556         files. 
19557
19558 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
19559
19560         * typeattr.h: New file, TypeAttribute flags. 
19561
19562 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
19563
19564         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19565         mono_assembly_ensure_section): Section loading code.
19566         (load_section_tables): Load the sections.
19567
19568         * mono/metadata/metadata.c (mono_metadata_locate_token,
19569         mono_metadata_locate): Functions to locate the information
19570         definition given a token or a table and an index.
19571         (mono_metadata_compute_table_bases): New.
19572         (compute_size): New function to compute the sizes of the various
19573         tables.
19574
19575         * mono/metadata/metadata.h: Finish listing the different index
19576         types. 
19577
19578         * mono/metadata/pedump.c: Improve to dump new information.
19579
19580 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
19581
19582         * mono/metadata/metadata.c: Entered all the tables matching
19583         Beta2. 
19584
19585         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
19586
19587
19588