2006-09-10 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
2
3         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
4         args is not set. Fixes #78926.
5
6 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7
8         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
9
10         * image.c (load_class_names): Move this to class.c, and rename it to 
11         'mono_image_init_name_cache'.
12         (load_modules): Fix a warning.
13
14         * class.c icall.c image.c: Initialize image->name_cache lazily.
15
16         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
17         on its name using information in the AOT file.
18
19         * class.c (mono_class_from_name): Use the new hook function.
20
21 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
22
23         * reflection.c (mono_param_get_objects): Handle enum default parameter values
24         correctly.
25
26         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
27         Fixes #79289.
28         
29 2006-09-06  Martin Baulig  <martin@ximian.com>
30
31         * icall.c (mono_lookup_internal_call): Small fix.
32
33 2006-09-05  Raja R Harinath  <rharinath@novell.com>
34
35         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
36         double g_free.
37
38 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
39
40         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
41         when --debug is specified.
42
43 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
44
45         * class.c (setup_generic_array_ifaces): Fix a warning.
46
47 2006-09-04  Miguel de Icaza  <miguel@novell.com>
48
49         * Temporarily remove the patch to assemly.c that checks the
50         assembly versions as it breaks our gacutil.
51
52 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
53
54         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
55
56         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
57         a net 1.0 runtime.
58
59         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
60         created using the default ctor. Fixes #79152.
61         (mono_string_builder_to_utf16): Ditto.
62
63 2006-09-01  Martin Baulig  <martin@ximian.com>
64
65         Fix handling of the generic array interfaces.
66
67         * class-internals.h
68         (MonoDefaults): Removed `generic_array_class' and added
69         `generic_ilist' class.
70
71         * class.c
72         (mono_bounded_array_class_get): Add the new generic array interfaces.
73         (setup_generic_array_ifaces): New static method; create vtable
74         entries for each method in the generic array interfaces.
75
76         * metadata.c
77         (select_container): Allow "parent-less" generic methods.
78
79         * marshal.c
80         (mono_marshal_get_generic_array_helper): New public method.
81
82         * icall.c
83         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
84         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
85         moved the interncall into System.Array.
86
87 2006-09-01  Raja R Harinath  <rharinath@novell.com>
88
89         A few more cases of avoiding work on types with ->byref set.
90         Has the real fix for #79238
91         * icall.c (is_generic_parameter): New helper.
92         (ves_icall_Type_GetGenericParameterPosition): Use it.
93         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
94         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
95         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
96         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
97         reference types.
98         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
99         reference types.
100         (ves_icall_Type_get_IsGenericInstance): Likewise.
101         (ves_icall_Type_get_IsGenericType): Likewise.
102
103 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
104
105         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
106         class if possible.
107
108         * mempool.h (mono_mempool_get_allocated): New helper function.
109
110         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
111         change.
112
113         * mempool.c: Fix warnings and the calculation of stats.
114
115         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
116
117         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
118
119         * loader.c (mono_get_method_from_token): Update method_count stat.
120
121         * class-internals.h (MonoStats): Add some stats.
122
123 2006-08-31 Robert Jordan  <robertj@gmx.net>
124
125         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
126         with managed variants.
127         All code is contributed under the MIT/X11 license.
128         
129 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
130
131         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
132         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
133
134         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
135
136         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
137         with cycles in classes.
138
139         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
140
141         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
142         missing a [MarshalAs] directive. Fixes #79203.
143
144         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
145         klass->marshal_info. Fixes #79217.
146
147 2006-08-30  Martin Baulig  <martin@ximian.com>
148
149         Committing a patch from Joachim Ante <joe@otee.dk>:
150         Add support for binary data symbol stores.
151
152         * debug-mono-symfile.c
153         (mono_debug_open_mono_symbol_file): Renamed into
154         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
155         arguments.
156
157         * mono-debug.c
158         (mono_debug_open_image): Added `raw_contents' and `size' args.
159         (mono_debug_init_2_memory): New public function.
160
161 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
162
163         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
164
165 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
166
167         * appdomain.c: implement support for ShadowCopyFiles.
168
169 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
170
171         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
172         when value is NULL (and should remove CID #51).
173
174 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
175
176         * image.c: moved 2 functions to ../utils.
177
178 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
179
180         * gc.c: cope with the target object of a GC handle being NULL
181         (bug #78877).
182
183 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
184
185         * class.c: recursively check parent's explicit implementations
186         of interface methods (fixes bug #79125).
187
188 2006-08-19  Miguel de Icaza  <miguel@novell.com>
189
190         * filewatcher.c: Avoid warnings when building, do not redefine
191         constants that are defined.
192
193         Remove warnings.
194
195 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
196
197         * image.c: don't fail when the link points to an absolute path.
198
199 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
200
201         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
202         Fix CID #3.
203
204 2006-08-17  Miguel de Icaza  <miguel@novell.com>
205
206         * image.c (full_path): A new method used to obtain the actual path
207         of an assembly even in the presence of symbolic links.  
208
209         This is necessary for the case where we are running a binary that
210         has been GACed, but we are using the "published" path name
211         ($prefix/mono/1.0/blah.exe) which happens to point to the real
212         file in the GAC.
213
214         This was the source of the failure for the `xsp' command with the
215         recent AppDomain changes, as far as the runtime was concerned,
216         there were two different assemblies: $prefix/mono/1.0/blah.exe and
217         $prefix/mono/gac/blah/version/blah.exe.
218
219         (do_mono_image_open): use full path
220
221 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
222
223         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
224
225 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
226
227         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
228         domain_id is supplied. Fix CID #241 and corlib's unit tests.
229
230 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
231
232         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
233         small structures. Fixes #78990.
234
235 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
236
237         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
238
239         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
240
241 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
242
243         * appdomain.c:
244         * marshal.c: don't load all the assemblies from a domain into newly
245         created ones. The new domains might have different rules and load
246         assemblies from different locations. Fixes bug #76757.
247
248         Patch by Lluis. Conflicts resolved by Brian Crowell.
249
250 2006-08-16  Alp Toker  <alp@atoker.com>
251
252         * socket-io.c: First half of the fix for #79084.
253         Set sa_size to the length of the content, not that of the struct.
254         Don't add NULL suffix to the content, this should be done in
255         managed code if needed.
256
257 2006-08-14  Raja R Harinath  <rharinath@novell.com>
258
259         Fix part of #79012
260         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
261         mono_metadata_parse_type returns NULL.
262
263 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
264
265         * normalization-tables.h : new file for string normalization data.
266         * locales.c, locales.h, icall.c :
267           added load_normalization_resource() for string normalization,
268           and icall as well.
269         * Makefile.am : added normalization-tables.h to the sources.
270
271 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
272
273         * marshal.c: Add more helper functions to reduce code duplication and use them
274         everywhere.
275
276 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
277
278         * marshal.c: Fix non-x86 stdcall warnings.
279         
280         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
281         them everywhere.
282
283 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
284
285         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
286         type check on multi-dimensional arrays. Fixes #79000.
287
288 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
289
290         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
291         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
292         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
293         * class-internals.h: add is_com_object to class structure.
294         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
295         null checks to COM object marshalling. Fix .ctor call on RCW.
296         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
297         
298         All code is contributed under the MIT/X11 license.
299
300 2006-08-09  Dick Porter  <dick@ximian.com>
301
302         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
303         racing mono_monitor_allocator_lock() somewhere, so don't delete
304         the critical section for now.  Found by running and exiting
305         monodevelop.
306
307 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
308
309         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
310         (ves_icall_System_ComObject_FindInterface): Ditto.
311         (ves_icall_System_ComObject_CacheInterface): Ditto.
312
313         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
314         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
315
316 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
317
318         * threadpool.c: treat pipes from process asynchronous reads as sockets
319         when reading from them, so we get select/poll or epoll to wait for
320         data.
321
322 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
323
324         * loader.c: Fix a typo (CID #233) in the null check.
325
326 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
327
328         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
329         Hopefully fixes #78949.
330         
331         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
332         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
333         bytes. Fixes #78972.
334
335 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
336
337         * filewatcher.c: we need to set errno here.
338
339 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
340
341         * filewatcher.c: let Win32Exception get the error value.
342
343 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
344
345         * filewatcher.c: translate errno into win32 errors for Win32Exception
346         to know what happened.
347
348 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
349
350         * threadpool.c: Fix more warnings.
351
352         * assembly.c (search_loaded): Fix warnings.
353
354         * threadpool.c (mono_thread_pool_finish): Fix warnings.
355         (mono_async_invoke): Ditto.
356
357 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
358
359         * object.c (mono_remote_class_vtable): Need to create proxy vtable
360         entries for __ComObject type in addition to ComImport types.
361         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
362         about hash table.
363         
364         All code is contributed under the MIT/X11 license.
365
366 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
367
368         * image.c: avoid tentative loading of modulerefs that contain
369         no metadata (P/Invoke library names).
370
371 2006-07-28  Dick Porter  <dick@ximian.com>
372
373         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
374         mono_loader_lock() somewhere, so don't delete the critical section
375         for now.  Found by running and exiting monodevelop.
376
377 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
378
379         * filewatcher.c: define the inotify syscalls when we're building on
380         linux and have sys/syscall.h. The build system might not have support
381         for inotify but the target system might have it.
382
383 2006-07-26  Miguel de Icaza  <miguel@novell.com>
384
385         * domain.c: Documentation updates.
386
387         * loader.c (mono_free_method): Do not release the method
388         information if we are being profiled, as profilers will use this
389         information at shut down to present some data to the user.
390
391         This is needed so that the profiler does not crash, as the
392         profiler tends to keep MonoMethods around, and they might become
393         invalid if we free these.
394
395         (mono_get_method_constrained): Return the original CIL stream
396         method as well, so verification can be performed against it.
397
398 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
399
400         * filewatcher.[ch]: support for inotify file system watcher.
401         * icall.c: add new internal calls for the inotify file system watcher.
402
403 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
404
405         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
406         #78888.
407
408 2006-07-20  Dick Porter  <dick@ximian.com>
409
410         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
411         warning.
412
413 2006-07-20  Dick Porter  <dick@ximian.com>
414
415         * threads.c (start_wrapper): Do the thread cleanup while we still
416         hold a reference to its object.  Fixes bug 78123.
417
418 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
419
420         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
421         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
422           "managed-to-managed".
423         * icall.c: Redirect string constructors that take sbyte* to
424           ves_icall_System_String_ctor_RedirectToCreateString.
425         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
426           to CreateString () methods with matching signature.
427         * reflection.c: Use original security informations for
428           MONO_WRAPPER_MANAGED_TO_MANAGED.
429         * security-manager.c: Use original security informations for
430           MONO_WRAPPER_MANAGED_TO_MANAGED.
431         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
432           that is a placeholder and only its address should be used.
433         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
434           that is a placeholder and only its address should be used.
435
436 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
437
438         Begin implementing COM Interop.
439         * appdomain.c: Increment corlib version.
440         * class.c: Set ComImport classes' parent to __ComObject.
441         * loader.c: Mark cominterop methods as such.
442         * domain.c: Add __ComObject class to MonoDefaults structure.
443         * image.c: Add 2 hashtables to the image for COM Interop related methods
444         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
445         using the mempool allocator
446         
447         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
448         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
449         declaration for mono_metadata_type_dup_mp.
450         
451         * debug-helpers.c: Added strings for two additional wrapper types
452         * object.c: Create proxy objects for ComImport classes
453         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
454         and added __ComObject class to MonoDefaults structure.
455         
456         * object-internals.h: Finish MonoRealProxy definition, and add definition of
457         MonoComInteropProxy and MonoComObject.
458         
459         * marshal.c: Added support for COM Interop
460         (signature_cominterop): Converts managed signature to corresponding
461         unmanaged COM signature.
462         (cominterop_get_function_pointer): gets unmanaged function pointer via
463         COM object vtable
464         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
465         (cominterop_get_method_interface): returns interface type that method is defined on
466         (mono_mb_emit_cominterop_call): emits native call to function pointer
467         gotten from vtable
468         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
469         that matches signature of unmanaged function.
470         (cominterop_get_native_wrapper): wrapper around adjusted method call.
471         (cominterop_get_invoke): forwards call from proxy to __ComObject
472         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
473         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
474         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
475         
476         * marshal.h: Added Marshal icall declarations.
477         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
478         so we can access them in finalizer
479         
480 2006-07-14  Dick Porter  <dick@ximian.com>
481
482         * object.c (mono_type_initialization_cleanup): Fix a race
483         condition by temporarily commenting out the critical section
484         deletion.
485
486 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
487
488         * reflection.c (create_custom_attr): Fix some warnings.
489         (create_custom_attr_data): Ditto.
490         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
491         types. Fixes #78855.
492
493 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
494
495         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
496
497         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
498
499 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
500
501         * reflection.c (resolve_object): Add support for DynamicMethod.
502
503         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
504         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
505
506 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
507
508         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
509         don't leak GPtrArray's pdata has we have no use (nor free) for it.
510
511 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
512
513         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
514         Fixes #77888.
515
516 2006-06-30  Raja R Harinath  <rharinath@novell.com>
517
518         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
519         slightly: remove a shadow local variable.
520
521 2006-06-29  Raja R Harinath  <rharinath@novell.com>
522
523         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
524         definition that introduces the virtual function slot.
525         Also fix Coverity #105.
526
527 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
528
529         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
530         for dynamic assemblies. Fixes #78724.
531
532 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
533
534         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
535         Fixes #78722.
536
537 2006-06-21  Martin Baulig  <martin@ximian.com>
538
539         * reflection.c
540         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
541         fixes #76484.
542
543 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
544
545         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
546
547 2006-06-20  Raja R Harinath  <rharinath@novell.com>
548
549         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
550         nor TYPEREFs.
551         * class.c (mono_class_create_from_typespec): Add 'context' argument.
552         Inflate result if necessary.
553         (mono_class_get_full): Remove old version.  Rename from
554         'mono_class_get' and add 'context' argument.  Pass it to
555         ..._create_from_typespec.
556         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
557         (mono_ldtoken): Revert change below.
558
559 2006-06-20  Martin Baulig  <martin@ximian.com>
560
561         * class.c (mono_ldtoken): Don't pass the generic context to
562         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
563
564 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
565
566         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
567         and later freeing it. Fixes #78638.
568
569 2006-06-15  Miguel de Icaza  <miguel@novell.com>
570
571         * icall.c (mono_class_get_throw): Revert over-zealous error
572         throwing, the caller for mono_class_get_throw will cope with
573         errors when classes are not properly initialized already.
574
575         The code still copes with loader exceptions though.
576
577         Fixes the regression in reftype1 and reftype3 from the CAS tests.
578         
579 2006-06-14  Miguel de Icaza  <miguel@novell.com>
580
581         Fixes the `make run1' version of RuntimeAbort (to be commited,
582         source is in Bugzilla).
583         
584         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
585         FALSE on class loading failure instead of returning true.
586
587         * class.c (mono_class_create_from_typedef): It is possible for
588         mono_metadata_interfaces_from_typedef_full to fail if a class is
589         not found, cope with this.
590         
591
592 2006-06-14  Dick Porter  <dick@ximian.com>
593
594         * socket-io.c: 
595         * process.c: Fix a bunch of signed/unsigned warnings from gcc
596         4.1.1
597
598 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
599
600         * culture-info-table.h : oops, forgot to make it nsync with r61548.
601
602 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
603
604         * icall.c: Another fix for building mono in Visual Studio.
605
606 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
607
608         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
609         
610 2006-06-09  Martin Baulig  <martin@ximian.com>
611
612         * debug-mono-symfile.c: Put this back and really fix it this
613         time. Sorry for all the trouble.
614
615 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
616
617         * icall.c (mono_class_get_throw): Fix a warning.
618         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
619         ReflectionTypeLoadException if needed. Fixes #78606.
620
621         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
622         (mono_class_init): Ditto.
623
624         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
625         ref_only exceptions.
626         (mono_loader_clear_error): Make this work even if there is no error.
627
628 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
629
630         * object-internals.h marshal.c marshal.h icall.c: Implement method 
631         Marshal.GetComSlotForMethodInfo using internal call.
632
633 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
634
635         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
636         a function for signalling it.
637
638         * class.c (mono_class_from_typeref): Use the new kind of loader error when
639         a referenced assembly is not found.
640
641         * loader.c (mono_loader_error_prepare_exception): Add support for 
642         LOADER_ERROR_ASSEMBLY. Fix formatting.
643
644 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
645
646         * domain.c appdomain.c class-internals.h marshal.c: Add support 
647         for VARIANT marshalling on windows and increment corlib version
648         since Variant struct was added.
649
650 2006-06-03  Miguel de Icaza  <miguel@novell.com>
651
652         * debug-mono-symfile.c: Revert Martin's previous patch which broke
653         stack trace line information:
654
655         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
656         (Martin) when looking up B which is between A and C, return A not C.
657
658         Bug is #78573.
659
660         Thanks to Alexander Olk for tracking this down.
661
662 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
663
664         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
665         
666         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
667         avoid clobbering its value.
668         (mono_string_to_lpstr): Fix a warning on windows.
669
670 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
671
672         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
673
674         * reflection.c loader.c: Removed references to 'dummy' flag.
675
676         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
677
678         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
679         it gets GC tracking.
680
681         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
682         GC tracking.
683         
684         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
685
686         * marshal.c threadpool.c: Update callers of mono_async_result_new.
687
688         * appdomain.c: Bump corlib version.
689
690 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
691
692         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
693         CEE_STIND_REF when working with object references.
694
695 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
696
697         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
698         Fixes #78539.
699
700 2006-05-30  Miguel de Icaza  <miguel@novell.com>
701
702         * loader.c (method_from_memberref): Fix argument value for
703         mono_loader_set_error_method_load (I was passing the MonoClass
704         instead of the class name char *).
705
706 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
707
708         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
709         CEE_STIND_REF when working with object references.
710
711 2006-05-30  Martin Baulig  <martin@ximian.com>
712
713         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
714         mono_method_full_name() change and replace the ':' with a '.'
715         here.
716
717 2006-05-30  Martin Baulig  <martin@ximian.com>
718
719         * debug-mono-symfile.c
720         (mono_debug_symfile_lookup_location): Fix the algorithm:
721         when looking up B which is between A and C, return A not C.
722
723 2006-05-29  Martin Baulig  <martin@ximian.com>
724
725         * mono-debug.h
726         (MonoDebugMethodInfo): Make the typedef public.
727         (MonoDebugSourceLocation): New public struct.
728
729         * mono-debug.c
730         (mono_debug_source_location_from_address): Removed.
731         (mono_debug_source_location_from_il_offset): Removed.
732         (mono_debug_il_offset_from_address): Removed.
733         (mono_debug_address_from_il_offset): Removed.
734         (mono_debug_lookup_method): New public function.
735         (mono_debug_lookup_source_location): New public function; replaces
736         the old mono_debug_source_location_from_*() functions; see the
737         inline documentation.
738         (mono_debug_free_source_location): New public function.
739         (mono_debug_print_stack_frame): New public function; see the
740         inline documentation.
741
742         * debug-mono-symfile.c
743         (mono_debug_find_source_location): Renamed into
744         mono_debug_symfile_lookup_location(); only take a
745         `MonoDebugMethodInfo *' and an `offset' argument; added inline
746         documentation.
747         (mono_debug_find_method): Renamed into
748         mono_debug_symfile_lookup_method().
749
750 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
751
752         * assembly.c (mono_assembly_open_full): Dont overwrite the status
753         returned by mono_image_open_full ().
754
755         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
756         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
757         #78517.
758
759         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
760         #78518.
761
762 2006-05-27  Miguel de Icaza  <miguel@novell.com>
763
764         * class.c (mono_class_from_typeref): handle missing images
765         earlier, deals with bug #78418.   Refactor code; 
766
767         Fix a warning introduced in my previous commit (some stale code
768         from before I revisited my patch).
769
770         * class.c (mono_class_create_from_typedef): On failure, remove the
771         class from the MonoImage->class_cache as the class is not
772         initialized;   Fixes the leak pointed out by Paolo.
773
774 2006-05-25  Dick Porter  <dick@ximian.com>
775
776         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
777         DeleteCriticalSections until I figure out which one may still be
778         sometimes locked when mono_thread_cleanup is called.
779
780 2006-05-24  Dick Porter  <dick@ximian.com>
781
782         * threads.c (mono_thread_cleanup): Move the threading cleanup out
783         of mono_thread_manage and back into its own function, so it can be
784         called after the finalizer thread has finished.
785
786         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
787
788 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
789
790         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
791         Fixes #78495.
792
793         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
794         with non-blittable elements.
795         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
796
797 2006-05-24  Martin Baulig  <martin@ximian.com>
798
799         * mono-debug-debugger.h (MonoDebuggerEvent): Added
800         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
801
802         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
803         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
804         `mono_debugger_event_handler' to NULL.
805
806 2006-05-24  Martin Baulig  <martin@ximian.com>
807
808         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
809
810 2006-05-24  Martin Baulig  <martin@ximian.com>
811
812         * mono-debug-debugger.h
813         (mono_debugger_create_notification_function): Added
814         `MonoCodeManager *' argument.
815
816 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
817
818         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
819
820 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
821
822         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
823         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
824         implementation.
825
826 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
827
828         * icall.c: precise GC support: objects can't be stored in unmanaged
829         memory anymore, even if they are kept alive by other references: since
830         they can move the GC needs to be able to always find them.
831
832 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
833
834         * object.c: precise GC support for static fields. Support
835         for moving GCs: write barriers and pinned allocation for interned
836         strings.
837
838 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
839
840         * domain.c, domain-internals.h: precise GC support for the MonoDomain
841         structure.
842
843 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
844
845         * class.c, gc.c: sgen and precise GC updates.
846
847 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
848
849         * marshal.h, marshal.c: added write barrier wrapper and precise type
850         fixes.
851
852 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
853
854         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
855         support.
856
857 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
858
859         * reflection.c: precise and sgen GC updates.
860
861 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
862
863         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
864
865 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
866
867         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
868
869 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
870
871         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
872         MONO_TYPE_OBJECT. Fixes #78462.
873
874 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
875
876         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
877         and blittable types.
878
879 2006-05-17  Miguel de Icaza  <miguel@novell.com>
880
881         * class.c (mono_class_get_exception_for_failure): Implement parts
882         of a TODO: if the loader error is set (instead of the class
883         error), we return a Loader exception that can be properly thrown
884         elsewhere.
885
886         This was exposed by some Winforms 2.0 code that I tried to run
887         (Atsushi pointed me to it).
888
889 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
890
891         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
892         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
893         
894         * marshal.c (emit_marshal_vtype): Add limited support for 
895         UnmanagedType.LPStruct. Fixes #78427.
896
897         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
898         Applied a patch from kangaroo to fix #77523.
899
900 2006-05-17  Martin Baulig  <martin@ximian.com>
901
902         * threads.c
903         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
904         (debugger_thread_created): Removed.
905         (debugger_thread_exited): Removed.
906
907 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
908
909         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
910
911         * object-internals.h (MonoReflectionResource): Sync with managed version.
912
913 2006-05-12  Wade Berrier <wberrier@novell.com>
914
915         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
916
917 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
918
919         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
920         functions try to allocate from the image mempool.
921
922 2006-05-12  Dick Porter  <dick@ximian.com>
923
924         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
925
926 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
927
928         * object.c: The FieldGetter and FieldSetter methods require the full
929         name of the class, not only the name. Fixes bug #78277.
930
931 2006-05-11  Miguel de Icaza  <miguel@novell.com>
932
933         * loader.c (method_from_memberref): Do not pass the NULL klass to
934         mono_loader_set_error_() methods.  Pass the non-NULL value
935         (class). 
936
937 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
938
939         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
940         (mono_assembly_close): Null out assembly->image->references after freeing it.
941
942         * image.c (mono_image_close): Free image->references.
943         
944         * reflection.c (mono_image_basic_init): Fix a small memory leak.
945
946 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
947
948         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
949         before checking if it's NULL (g_assert).
950
951 2006-05-10  Martin Baulig  <martin@ximian.com>
952
953         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
954         I thought I already killed that two months ago, but now it somehow reappeared.
955
956 2006-05-10  Martin Baulig  <martin@ximian.com>
957
958         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
959
960 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
961
962         * reflection.c: Allocate memory for dynamically created methods in the image
963         mempools.
964
965 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
966
967         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
968         don't use the ad pointer before checking if it's NULL (g_assert).
969
970 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
971
972         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
973         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
974
975         * marshal.c: Allocate all signatures from mempools.
976
977         * marshal.c: Allocate some more signatures from mempools.
978
979 2006-05-09  Miguel de Icaza  <miguel@novell.com>
980
981         * object.c (mono_load_remote_field): The code used to provide a
982         temporary variable for returning results if the user did not
983         provide a result pointer.  But our temporary variable was allocted
984         on the satck.
985
986         Fix calling code to always pass a result area.   Coverity ID 103.
987
988 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
989
990         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
991         value, not the old. Fixes #78312.
992         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
993
994         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
995         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
996         per-image cache.
997
998         * assembly.c (mono_assembly_close): Free image->references.
999
1000         * assembly.c (mono_assembly_names_equal): Fix a warning.
1001         (mono_assemblies_cleanup): Cleanup more global data.
1002
1003         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1004
1005         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1006         ptr_cache and image->modules.
1007
1008         * image.c (mono_image_init): Allocate array_cache lazily.
1009         
1010 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1011
1012         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1013         behavior was changed recently and has bad side effects.
1014
1015 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
1016
1017         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1018         
1019         * assembly.c (mono_assembly_close): Remove a debug printf.
1020
1021         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1022
1023         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1024         to also allow for temporary references between mono_image_open ()/close ().
1025
1026         * domain.c (get_runtimes_from_exe): Add a FIXME.        
1027
1028 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
1029
1030         * marshal.c: Fix support for dynamic methods.
1031
1032         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1033
1034         * marshal.c (mono_marshal_cleanup): New cleanup function.
1035
1036         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
1037         image mempools.
1038
1039         * class.c (mono_class_init): Fix leaking class->nested_classes.
1040
1041         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1042
1043         * image.c (mono_image_init): Initialize the new cashes.
1044
1045         * image.c (mono_image_close): Destroy the new cashes.
1046
1047         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1048
1049         * mempool.c (mono_mempool_strdup): New helper function.
1050
1051         * class-internals.h: Add prototype for mono_loader_unlock ().
1052
1053         * domain.c (mono_jit_info_table_find): Fix a warning.
1054         (mono_debugger_check_runtime_version): Ditto.
1055
1056         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
1057         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1058         functions to these modules.
1059
1060         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1061         metadata modules.
1062         
1063         * marshal.c (mono_free_bstr): Fix a warning.
1064
1065         * assembly.c (mono_assembly_open_full): Fix another small leak.
1066
1067         * object.c: Fix some unload leaks in the remoting code.
1068
1069         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1070         function.
1071
1072         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1073
1074         * reflection.c: Fix some unload leaks in dynamic assemblies.
1075
1076 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
1077
1078         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1079         * marshal.h: Add BSTR support on Win32
1080         * icall.c: Add BSTR icalls
1081         * metadata.h: Add BSTR enums
1082
1083 2006-04-28  Miguel de Icaza  <miguel@novell.com>
1084
1085         Work to catch the crash from #76795 and turn it into an
1086         exception.   As I stubbed out pieces of the VisualBasic support,
1087         I found a number of places where the code was failing and I added
1088         checks to those places. 
1089         
1090         * metadata.c (do_mono_metadata_parse_generic_class): Make this
1091         function return a status code.  If we fail to parse the signature
1092         from mono_metadata_parse_generic_inst, return FALSE.
1093
1094         * loader.c (mono_get_method_from_token): If we fail to load the
1095         method (mono_class_get) return NULL.   
1096
1097         * (method_from_memberref): Return NULL if we are unable to parse
1098         the method signature
1099
1100         (mono_loader_error_prepare_exception): Since we now use the
1101         loader_error flag internally to stop processing, and obtaining
1102         exceptions that might be thrown will walk this code path the
1103         proper way of going from a MonoLoaderError into a
1104         MonoException was convoluted.   This new routine encapsulates the
1105         process of turning the error into an exception and *clearing* the
1106         error afterwards.
1107         
1108 2006-04-27  Miguel de Icaza  <miguel@novell.com>
1109
1110         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1111         with missing assemblies), and to cope with:
1112
1113                 * Missing fieldref from a non-existing assembly.
1114                 * Missing methodref from a non-existing assembly.
1115
1116         The first batch of work to address *some* of the issues from 76661.
1117         
1118         * object.c (mono_class_create_runtime_vtable): If we fail to
1119         initialize the class raise the exception here. 
1120
1121         * metadata.c (mono_class_get_overrides_full): If any methods fail
1122         to load return the failure to the caller.
1123
1124         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1125         flagging assemblies that failed to load.   
1126
1127         Do not crash if we are unable to load the assembly.
1128
1129         (mono_assembly_close): Do nothing with REFERENCE_MISSING
1130         assemblies. 
1131
1132         * loader.c (mono_loader_set_error_type_load): Change the
1133         convention to always pass unallocated strings, so we make our own
1134         copies (I know our own code had duplicated strings before, but
1135         this keeps the normal conventions).
1136         (method_from_memberref): Call mono_loader_set_error_method_load
1137         for all possible failures of loading the class. 
1138         Remove assert, turn into a loader error.
1139
1140         (mono_loader_error_to_exception): Move this routine from mini
1141         (mini_loader_error_to_exception) there was no need to have that in
1142         mini. 
1143
1144         * class.c (mono_class_from_typeref): If we were not able to load
1145         the assembly with mono_assembly_load_reference, call the
1146         mono_loader_set_error_type_load to register the problem.
1147
1148         (mono_class_setup_fields): If we fail to load the type from
1149         mono_metadata_parse_type_full, call mono_class_set_failure and
1150         break from the loop.
1151
1152         If class->exception_type is set, we do not layout the fields as
1153         that might crash the runtime, and instead return (from breaking
1154         from the previous loop).
1155
1156         (mono_class_setup_vtable): This now returns a boolean indicating
1157         whether the table was properly setup.   The decision is driven by
1158         mono_class_get_overrides_full which might run into non-existing
1159         methods. 
1160         
1161         (mono_class_init): Returns TRUE on success or FALSE if there was a
1162         problem in loading the type (incorrect assemblies, missing
1163         assemblies, methods, etc).
1164
1165         When we call mono_class_setup_fields we also check for a potential
1166         error inside this call (either a class exception or a general
1167         loader exception).
1168
1169         (mono_class_create_from_typedef): If the parent fails to load
1170         (calling mono_class_get_full) return NULL.
1171         
1172         ** Important **
1173
1174         calls to mono_metadata_parse_type_full should be checked
1175         everywhere and set the mono_class_set_failure
1176         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1177
1178         The current patch checks the places where my manually constructed
1179         tests show the errors are showing up, but we should do it
1180         everywhere. 
1181
1182         ** Important2 **
1183
1184         mono_class_init return values should be tested everywhere, like
1185         the previous case this is something that we should audit
1186         everywhere and not only on the cases exposed by the tests I
1187         created. 
1188
1189 2006-04-26  Miguel de Icaza  <miguel@novell.com>
1190
1191         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1192         boolean parameter and instead pass the information on `options'
1193         parameter (FileOptions).
1194
1195         * icall.c: Register the new signature for MonoIO.Open.
1196
1197         * debug-helpers.c (dis_one): Trying to understand how coverity
1198         works.  Fix Run 5, item 78.
1199
1200 2006-04-26  Dick Porter  <dick@ximian.com>
1201
1202         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1203         dereference.
1204
1205 2006-04-25  Martin Baulig  <martin@ximian.com>
1206
1207         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1208
1209         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1210         debugger_thread_created().
1211         (debugger_gc_push_all_stacks): Don't handle the main thread in any
1212         special way.
1213         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1214         (mono_debugger_finalize_threads): New function; undo the effects
1215         of mono_debugger_init_threads().
1216         (mono_debugger_create_all_threads): Removed.
1217
1218 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
1219
1220         * image.c (mono_image_close): Tidy up trace messages.
1221
1222         * assembly.c (mono_assembly_close): Ditto.
1223
1224         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1225         no longer references an already freed assembly. Fixes #78168.
1226
1227 2006-04-21  Dick Porter  <dick@ximian.com>
1228
1229         * threads.c (mono_thread_detach): Fix reference counting when
1230         detaching threads.
1231
1232 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
1233
1234         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1235         #78155.
1236
1237 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
1238
1239         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1240         (mono_type_to_stind): Ditto.
1241
1242         * marshal.c: Use the new helper functions to simplify code.
1243
1244         * image.c (mono_image_close): Add some code for help debug assembly unloading
1245         problems.
1246
1247         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1248         image mempool.
1249
1250         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1251         assembly was already loaded in another appdomain. Fixes #78083.
1252
1253 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
1254
1255         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1256         referenced assemblies.
1257         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1258
1259         * domain.c (mono_domain_free): Add a trace message.
1260
1261         * appdomain.c (add_assemblies_to_domain): Ditto.        
1262
1263         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1264         field.  
1265
1266 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1267
1268         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1269
1270 2006-04-12  Martin Baulig  <martin@ximian.com>
1271
1272         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1273         `USE_INCLUDED_LIBGC'.   
1274
1275 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1276
1277         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1278         the patch contains ../ and a small directory name later. Hopefully fixes
1279         #78035.
1280
1281 2006-04-10  Martin Baulig  <martin@ximian.com>
1282
1283         Clean up the debugger's thread-handling code.
1284
1285         The debugger's thread-handling code has been moved from
1286         ../mini/debug-debugger.c to threads.c.  We now iterate directly
1287         over the `threads' hash, keep track of exiting threads and also
1288         use proper locking.
1289
1290         We can now debug XSP and XSP based applications with the debugger.
1291
1292         * object-internals.h (MonoThread): Added `gpointer end_stack'.
1293
1294         * threads.h
1295         (MonoThreadCallbacks): Removed; this was only used by the debugger.
1296         (mono_install_thread_callbacks): Likewise.      
1297
1298         * threads.c (mono_thread_callbacks): Removed.
1299         (debugger_thread_created, debugger_thread_exited): New static functions.
1300         (start_wrapper): Call debugger_thread_created().
1301         (thread_cleanup): Call debugger_thread_exited().
1302         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1303         (mono_debugger_init_threads): New public function.
1304         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1305         iterate directly over the `threads' hash and also use proper locking.
1306
1307         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1308
1309         * mono-debug-debugger.h
1310         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1311
1312 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
1315         argument type=array. Fixes #78057.
1316
1317 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
1318
1319         * culture-info-table.h : regenerated. Fixed bug #69652.
1320
1321 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
1322
1323         * loader.c metadata.c: Reapply a variant r59116.
1324         
1325         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1326
1327         * class.c (mono_class_setup_interface_offsets): New internal function.
1328
1329         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1330         interfaces too. Fixes #77398.
1331
1332         * reflection.c (encode_cattr_value): Add support for 
1333         parameter type=object, argument type=array.
1334         (load_cattr_value): Ditto. Fixes #77916.
1335
1336         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1337         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1338
1339         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1340         a byval char array and CharSet is Ansi.
1341
1342         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1343
1344 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
1345
1346         * metadata.c: Add some locking comments.
1347         
1348         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1349         mempool.
1350         (mono_metadata_free_method_signature): Don't free the signature itself.
1351
1352         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
1353
1354         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1355         reference the same MonoImage.
1356         (mono_assembly_load_from_full): Add an assert.
1357
1358 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
1359
1360         * image.c (mono_image_close): Don't put the image we are about to free into the
1361         loaded_images_guid_hash.
1362
1363         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1364         to reduce code duplication.
1365
1366         * marshal.c: Register the native functions called by this module as icalls, to
1367         somewhat centralize the creation of MonoMethodSignature's.
1368
1369         * loader.c (mono_method_signature): Add a cache for method signatures.
1370
1371         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1372         the parameter attributes of a method.
1373         (mono_metadata_parse_method_signature_full): Refactored the computation of
1374         parameter attributes into a separate function. Also avoid one allocation in
1375         most cases.
1376
1377         * assembly.c (mono_assembly_close): Ditto.
1378
1379         * image.c (mono_image_close): Log trace messages with INFO level.
1380
1381         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1382
1383         * image.c reflection.c: Correct reference counting of image modules.
1384         
1385         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1386         of this function from the image mempool.
1387         
1388         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1389         to allow more cached types to be used.
1390
1391         * mono-debug.c (mono_debug_add_method): Appled patch from
1392         David S. Miller  <davem@sunset.davemloft.net>: Access 
1393         minfo->lexical_blocks[] entry elements using read32().
1394
1395 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
1396
1397         * loader.c (mono_free_method): No longer free the method header for non-dynamic
1398         methods as it is allocated from the mempool.
1399
1400         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1401         image mempool.
1402
1403         * metadata-internals.h: Add comments describing the reference counting scheme
1404         used for MonoImage and MonoAssembly.
1405
1406         * image.c assembly.c reflection.c: Rework reference counting of images and 
1407         assemblies so they are freed when the runtime is shut down. Free some 
1408         additional memory structures when an image is unloaded.
1409         
1410 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
1411
1412         * class.c loader.c reflection.c: Allocate more data structures in
1413         the image mempool.
1414
1415 2006-03-31  Miguel de Icaza  <miguel@novell.com>
1416
1417         * icall.c
1418         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1419         build on pre glib 2.4 systems.
1420
1421 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
1422
1423         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1424
1425         * icall.c: Fix some warnings.
1426
1427 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
1428
1429         * culture-info-table.h : regenerated.
1430
1431 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1432
1433         * threads.c, object-internals.h, verify.c: changed the culture caching
1434         code to use a normal MonoArray for storage so the GC can keep track of
1435         them easily. Fixed bits of the cache logic, too and simplified the
1436         code.
1437
1438 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1439
1440         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1441         thread for non-Boehm GCs.
1442
1443 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1444
1445         * domain.c, object.c, domain-internals.h: reduce the amount of memory
1446         needed to keep track of the data for static fields.
1447
1448 2006-03-29  Raja R Harinath  <rharinath@novell.com>
1449
1450         Fix #75172
1451         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1452         for interface classes.  Use 'num_methods' instead.
1453         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
1454         before using '->vtable_size' field.
1455
1456 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1457
1458         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1459         doesn't contain managed pointers, so use a normal hashtable.
1460
1461 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1462
1463         * reflection.c, class-internals.h, domain.c: fixed handling of types
1464         used as values for objects in custom attributes (bug #77915):
1465
1466 2006-03-24  Martin Baulig  <martin@ximian.com>
1467
1468         * class.c (mono_class_setup_fields): Added support for generic
1469         instances; fixes #77580.
1470
1471 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1472
1473         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1474
1475 2006-03-24  Dick Porter  <dick@ximian.com>
1476
1477         * file-io.c (get_file_attributes): More stat macro breakage.
1478         Fixes bug 77759.
1479
1480 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1481
1482         * profiler.c: added the file=filename option in the default profiler
1483         to output the profile data to filename.
1484
1485 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1486
1487         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1488         bug #77877.
1489
1490 2006-03-22  Martin Baulig  <martin@ximian.com>
1491
1492         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1493         allocated `MonoClassField *' in `fb->handle'.
1494
1495 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1496
1497         * class.c, image.c, metadata-internals.h: implemented new mechanism to
1498         allocate interface ID to save memory and allow better ID reuse on
1499         appdomain unload. setup_generic_vtable () removal from Martin.
1500
1501 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1502
1503         * object.h, appdomain.c, domain.c, exception.c, icall.c,
1504         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1505         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1506         write barriers for reference stores with managed objects accessed with
1507         C structures in the runtime and in embedding programs.
1508
1509 2006-03-20  Raja R Harinath  <rharinath@novell.com>
1510
1511         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1512         'interface_id' and 'max_interface_id' fields of MonoClasses
1513         representing open generic types.
1514
1515 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1516
1517         * object.h, object.c, icall.c: added functions to deal with
1518         storing valuetypes that contain references in managed objects.
1519         * reflection.c, string-icalls.c, threads.c, marshal.c: small
1520         fixes and comments around uses of mono_array_addr ().
1521
1522 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1523
1524         * object.h, icall.c, monitor.c: object.GetHashCode ()
1525         implementation that supports the moving garbage collector.
1526
1527 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1528
1529         * icall.c, threads-types.h, threads.c: implemented finalizer for
1530         LocalDataStoreSlot.
1531
1532 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
1533
1534         * metadata.c (mono_type_size): Add a fixme.
1535         (mono_type_stack_size): Ditto.
1536
1537         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
1538         'type_forwarders' field.
1539
1540         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1541         attribute from net 2.0.
1542
1543         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1544         from class.c.
1545
1546         * class.c (mono_class_setup_fields): Fix a warning.
1547         
1548         * class.c (mono_class_from_name): Add support for assemblyref entries
1549         in the EXPORTEDTYPE table.
1550
1551         * reflection.c: Add support for handling type forwarders under net 2.0.
1552
1553         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
1554         
1555 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
1556
1557         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1558         overwriting entries in ModuleBuild->types, also clean up the code
1559         a little. Fixes #77774.
1560
1561 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1562
1563         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1564         load friend assembly info when present.
1565
1566 2006-03-14  Raja R Harinath  <rharinath@novell.com>
1567
1568         Fix crasher on gtest-158.cs.
1569         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1570         the return value if the MonoClass we want is yet in an
1571         inconsistent state.
1572         * class.c (mono_class_create_from_typedef): Add an comment
1573         explaining an order dependency between mono_class_setup_parent and
1574         mono_class_setup_mono_type.
1575
1576 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1577
1578         * class.c: documentation updates and events bug fix.
1579
1580 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1581
1582         * class.c: some cleanup, locking fixes.
1583
1584 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1585
1586         * class.c: fix the generics code to setup nested
1587         type info to the instantiated type (bug #77770).
1588
1589 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1590
1591         * marshal.c: fixed a few type correctness issues.
1592
1593 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1594
1595         * loader.c: the Set/Get/Addrtess array methods should be public.
1596
1597 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
1598
1599         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1600         
1601         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1602         info->wrapper.
1603
1604 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
1605
1606         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1607
1608         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1609
1610         * mempool.c (mono_mempool_alloc): Speed this up a bit.
1611         (mono_mempool_alloc0): Ditto.
1612
1613 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1614
1615         * socket-io.c:
1616         (create_object_from_sockaddr): it was allocating 4 extra bytes
1617         for the AF_UNIX data. Fixes bug #77747.
1618
1619 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
1620
1621         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1622
1623 2006-03-09  Dick Porter  <dick@ximian.com>
1624
1625         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1626         Fixes bug 76966 again.
1627
1628 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
1629
1630         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1631         names from r57532
1632         * appdomain.c: Bumped corlib version to 48 (due to r57532)
1633
1634 2006-03-07  Martin Baulig  <martin@ximian.com>
1635
1636         * object.c
1637         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1638
1639 2006-03-07  Martin Baulig  <martin@ximian.com>
1640
1641         * class.c
1642         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1643         regression introduced in r56970; see gtest-252.cs.
1644
1645         * loader.c (mono_get_method_constrained): Correctly handle generic
1646         methods; see gtest-253.cs.
1647
1648 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
1649
1650         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1651
1652 2006-03-04  Martin Baulig  <martin@ximian.com>
1653
1654         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1655         compute the parent type at runtime, just like we're already doing
1656         it for interfaces.
1657
1658         * reflection.c
1659         (mono_reflection_bind_generic_parameters): Don't compute the
1660         parent type anymore.
1661
1662         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1663
1664 2006-03-04  Martin Baulig  <martin@ximian.com>
1665
1666         * mono-debug-debugger.h
1667         (mono_debugger_create_notification_function): Allocate memory at
1668         runtime and return a pointer to it.
1669
1670 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
1671
1672         * assembly.c: Fix windows build.
1673         
1674         * assembly.c: Fix build.
1675
1676         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
1677
1678         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1679         
1680 2006-03-03  Dick Porter  <dick@ximian.com>
1681
1682         * process.c
1683         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1684         Check parameters before dereferencing them.  Fixes Aaron's part of
1685         bug 77393.
1686
1687 2006-03-03  Raja R Harinath  <rharinath@novell.com>
1688
1689         Fix performance regression.
1690         * loader.c (find_method_in_class): Add 'from_class' argument.
1691         Rename 'klass' argument to 'in_class'.  The signature is compared
1692         against the method in 'in_class', and the corresponding method is
1693         returned from 'from_class'.
1694         (find_method): Walk both 'in_class' and 'from_class' in parallel.
1695         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1696         type definition and generic instantiation in parallel.
1697         (mono_get_method_constrained): Update to changes.
1698
1699 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1700
1701         * threads.c: make sure the domain is correct, too when doing
1702         mono_thread_attach ().
1703
1704 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
1705
1706         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1707         windows. Fixes #77683.
1708
1709 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1710
1711         * object.h, *: introduced specific way to set elements of an array
1712         of references to be used as write barrier. Still need to audit the
1713         uses of mono_array_addr.
1714
1715 2006-03-01  Miguel de Icaza  <miguel@novell.com>
1716
1717         * object-internals.h: New field to cache the assmebly name, patch
1718         from Tambet Ingo (tambet@ximian.com)
1719
1720 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1721
1722         * decimal.h, class-internals.h, metadata-internals.h,
1723         file-io.h: mark a few function declarations as internal, to
1724         reduce the number of PLT entries.
1725
1726 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1727
1728         * file-io.c: fix typo in warning message.
1729
1730 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1731
1732         * loader.c: on unix, lookup the "*A" version of a function
1733         if charset is auto as a second option before failing.
1734
1735 2006-02-28  Raja R Harinath  <rharinath@novell.com>
1736
1737         * class.h (mono_class_inflate_generic_method): Revert to two
1738         argument version.
1739         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1740         (mono_class_inflate_generic_method_full): Add.
1741         * class.c (mono_class_inflate_generic_method_full): Rename from
1742         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
1743         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
1744         * loader.c, reflection.c: Update to changes.
1745
1746 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1747
1748         * icall.c: const fixes and small improvements.
1749
1750 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1751
1752         * threadpool.c: for asynchronous connect(), enable the same workaround
1753         for BSD 6 as for the Mac. Fixes bug #77637.
1754
1755 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
1756
1757         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1758         formatted classes. Fixes #77524.
1759
1760 2006-02-24  Raja R Harinath  <rharinath@novell.com>
1761
1762         * class.c (inflate_generic_type): Add a couple more
1763         micro-optimizations.
1764         (inflate_generic_context): Don't use the 'gmethod' from
1765         'inflate_with'.
1766         (mono_class_inflate_generic_method): If the method has generic
1767         parameters, but the passed-in context doesn't have a 'gmethod',
1768         create one.  Use the possibly simplified generic instantiation
1769         from the declaring class instead of the one passed in.
1770
1771 2006-02-24  Raja R Harinath  <harinath@gmail.com>
1772
1773         Make generic method signature and method header handling lazy.
1774         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1775         (inflate_generic_header): Likewise.
1776         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
1777         parameter to avoid inflating types.
1778         (mono_get_inflated_method): Empty out.
1779         * class.h (mono_class_inflate_generic_method): Update to changes.
1780         * loader.c (mono_get_method_from_token): Don't parse signature for
1781         generic methods, nor methods of generic classes.
1782         (mono_method_signature): Rename from 'mono_method_signature'.
1783         Inflate signature on demand.
1784         (mono_method_get_header): Inflate method header on demand.
1785         * reflection.c: Update to changes.
1786
1787 2006-02-23  Raja R Harinath  <rharinath@novell.com>
1788
1789         * metadata.c (mono_metadata_inflate_generic_inst): If the
1790         instantiation is closed, don't bother expanding it in the new
1791         context.
1792         * class.c (inflate_generic_class): If the generic instantiation
1793         doesn't change after inflation, return the argument itself.
1794         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1795         Add bounds checks.
1796         (inflate_generic_context): If neither the generic class nor the
1797         generic method instantiations change, return the original context.
1798         * reflection.c (mono_method_get_object): Do
1799         'mono_get_inflated_method' before accessing the ->klass field.
1800         (inflate_mono_method): Don't create a MonoGenericMethod unless
1801         necessary.
1802         (inflate_method): Don't pass a constructed type as the declaring
1803         type of a methodbuilder.
1804
1805 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1806
1807         * object.c: fix memory overwrite.
1808
1809 2006-02-22  Dick Porter  <dick@ximian.com>
1810
1811         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1812         it doesn't work any more.
1813         (mono_threads_request_thread_dump): Fix unused variable warnings.
1814
1815 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1816
1817         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1818         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1819         the public header file.
1820
1821 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
1822
1823         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1824
1825 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1826
1827         * class-internals.h, object.c: reduce the size of MonoVTable
1828         and store the interface_offsets array at negative offsets.
1829
1830 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1831
1832         * metadata.c: tweak table descriptors data structures to reduce
1833         size and runtime relocations.
1834
1835 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1836
1837         * marshal.c: fix some types and opcodes to be type-safe
1838         in marshaling wrappers.
1839
1840 2006-02-21  Ankit Jain  <jankit@novell.com>
1841
1842         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1843
1844 2006-02-21  Raja R Harinath  <rharinath@novell.com>
1845
1846         * metadata.c (get_constraints): Relax debugging checks for monodis.
1847
1848 2006-02-21  Ankit Jain  <jankit@novell.com>
1849
1850         * metadata.c (mono_metadata_load_generic_params): Move the code
1851         checking for ambiguous generic params from here to mono/dis/get.c
1852         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1853
1854 2006-02-21  Raja R Harinath  <harinath@gmail.com>
1855
1856         Fix assertion triggered when compiling nemerle.
1857         * class.c (mono_get_shared_generic_inst): Rename from
1858         get_shared_inst and make non-static.
1859         * loader.c (mono_get_shared_generic_method): New.  Used to create
1860         the MonoGenericContext-equivalent of a MonoGenericContainer.
1861         (mono_get_method_from_token): Initialize the 'context' field of
1862         the created MonoGenericContainer.
1863         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1864         * metadata.c (get_constraints): Add sanity check.
1865         * class-internals.h: Add new internal methods.
1866
1867         * reflection.c (verify_safe_for_managed_space): New sanity check.
1868         Currently checks that owner-less generic parameters aren't allowed
1869         in managed space.
1870         (mono_type_get_object): Use it.
1871         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1872         that are now in mono_type_get_object.
1873         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1874
1875 2006-02-19  Raja R Harinath  <harinath@gmail.com>
1876
1877         * metadata.c (mono_type_create_from_typespec): Rename from
1878         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
1879         argument and caching of types in the generic container.
1880         (unwrap_arrays, find_generic_param): Remove.
1881         * metadata-internals.h: Update.
1882         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1883
1884 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
1885
1886         * class.c (mono_class_get_exception_for_failure): Fix a warning.
1887
1888         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1889         return values. Fixes #77581.
1890
1891         * class.c (mono_fnptr_class_get): Switch name and name_space.
1892
1893         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1894         classes and add support for [In, Out] attributes.
1895         (mono_marshal_free_asany): Ditto. Fixes #77524.
1896
1897 2006-02-18  Raja R Harinath  <harinath@gmail.com>
1898
1899         * class.c (mono_class_from_generic_parameter): Make more robust to
1900         incomplete MonoGenericContainers from monodis.
1901
1902 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1903
1904         * class-internals.h: added some more exception types.
1905         * class.c, metadata.c: added a few checks to handle missing
1906         types.
1907
1908 2006-02-17  Raja R Harinath  <rharinath@novell.com>
1909
1910         Use owner-less generic-params some more.
1911         * class.c (my_mono_class_from_generic_parameter): Remove.
1912         (mono_class_from_generic_parameter): Handle null image,
1913         param->name and param->owner.
1914         (mono_class_from_mono_type): Update.
1915         (mono_class_create_from_typespec): Remove 'container' parameter.
1916         If that parameter is non-null, the result is always inflated by
1917         'mono_class_get_full' anyway.
1918         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
1919         parameter.
1920         (mono_class_get_full): Update.
1921
1922         * class.c (inflate_generic_type) [GENERICINST]: If the generic
1923         instance is not open, don't bother inflating.
1924         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
1925         parse metadata for inflated classes.
1926         (_mono_class_get): Change GenericContext* parameter to
1927         GenericContainer*.
1928         (mono_class_create_from_typespec): Likewise.  Simplify, and
1929         implement trivially.  All the cases are handled in
1930         mono_class_from_mono_type.  Don't inflate returned class.
1931         (mono_class_get_full): Delegate GENERICINST optimization to
1932         inflate_generic_type.
1933         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1934
1935 2006-02-16  Dick Porter  <dick@ximian.com>
1936
1937         * socket-io.c (create_object_from_sockaddr): Fix typo.
1938         (create_sockaddr_from_object): Check array lengths before
1939         potentially accessing items off the end.
1940         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1941         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1942         (ves_icall_System_Net_Sockets_Socket_Send_internal)
1943         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1944         length checks to avoid wraparound overflows.
1945         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1946         contents of the array of sockets
1947         (hostent_to_IPHostEntry2)
1948         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1949         Check return value of inet_ntop ().
1950         (addrinfo_to_IPHostEntry): Fix typo
1951
1952 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1953
1954         Type metadata parsing doesn't use generic-instantiation information.
1955         * metadata.c (mono_metadata_parse_array_full): Change
1956         MonoGenericContext* parameter to MonoGenericContainer*.
1957         (mono_metadata_parse_type_full): Likewise.
1958         (mono_type_create_from_typespec_full): Likewise.
1959         (mono_metadata_parse_mh_full): Likewise.
1960         (mono_metadata_parse_generic_inst): Likewise.
1961         (do_mono_metadata_parse_generic_class): Likewise.
1962         (do_mono_metadata_parse_type): Likewise.
1963         * metadata-internals.h: Update to changes.
1964         * class.c (mono_class_find_enum_basetype): Likewise.
1965         (mono_class_setup_fields): Likewise.
1966         (mono_class_create_from_typespec): Likewise.
1967         * loader.c (method_from_methodspec): Likewise.
1968         (mono_get_method_from_token): Likewise.
1969         (mono_method_get_header): Likewise.
1970
1971 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1972
1973         * marshal.c: handle additional GENERICINST case (patch from
1974         Thong Nguyen <tum@veridicus.com>).
1975         Fix a few cases where LDIND_I/STIND_I was used for references.
1976
1977 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1978
1979         * reflection.c (mono_reflection_get_token): Remove unused variable.
1980
1981 2006-02-16  Martin Baulig  <martin@ximian.com>
1982
1983         * reflection.c (mono_reflection_get_token): Add support for fields
1984         in instantiated generic types.
1985
1986         * icall.c
1987         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
1988
1989 2006-02-15  Martin Baulig  <martin@ximian.com>
1990
1991         * icall.c
1992         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
1993         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
1994         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
1995         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
1996
1997 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1998
1999         * class.c, metadata.c, metadata.h, object.c, icall.c,
2000         marshal.c: changed mono_type_get_underlying_type () to do
2001         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2002         Fixed handling of instantiated generic valuetypes (bug #75479).
2003
2004 2006-02-15  Raja R Harinath  <rharinath@novell.com>
2005
2006         * metadata.c (mono_metadata_decode_signed_value): Simplify.
2007         Delegate to mono_metadata_decode_value, and work on the returned value.
2008
2009         * icall.c (ves_icall_MonoType_GetGenericArguments):
2010         Add consistency check here too.
2011         
2012 2006-02-15  Ankit Jain  <jankit@novell.com>
2013
2014         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2015         char/short etc.
2016
2017 2006-02-15  Ankit Jain  <jankit@novell.com>
2018
2019         * metadata.c (mono_metadata_decode_signed_value): New function to decode
2020         signed values, used only for representing lower bounds of arrays.
2021         (mono_metadata_parse_array_full): Use new
2022         mono_metadata_decode_signed_value to decode lower bounds.
2023
2024 2006-02-14  Martin Baulig  <martin@ximian.com>
2025
2026         * reflection.c
2027         (mono_reflection_get_token): Support "MonoGenericMethod" and
2028         "MonoGenericCMethod" and allow generic instances / methods.
2029
2030 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
2031
2032         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2033         to obtain the terminal size using an ioctl.
2034
2035         * object.c (mono_nullable_init): Revert this as nullable reference
2036         types are not valid.
2037         (mono_nullable_box): Ditto.
2038
2039 2006-02-09  Dick Porter  <dick@ximian.com>
2040
2041         * threads.c (mono_thread_detach): Drop a reference to the thread
2042         we're detaching.
2043
2044 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
2045
2046         * object.c (mono_nullable_init): Handle nullable reference types.
2047         (mono_nullable_box): Ditto. Fixes #77446.
2048
2049 2006-02-07  Martin Baulig  <martin@ximian.com>
2050
2051         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2052
2053 2006-02-07  Ankit Jain  <jankit@novell.com>
2054
2055         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2056         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2057         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2058         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2059         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2060         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2061
2062 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
2063
2064         * class.c (mono_class_create_generic): Set type_token as well.
2065
2066         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2067         compatible with MS.
2068
2069 2006-02-02  Martin Baulig  <martin@ximian.com>
2070
2071         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2072         has never been used so far.
2073
2074 2006-02-02  Martin Baulig  <martin@ximian.com>
2075
2076         * mono-debug-debugger.h: Changed comment at the top of this file;
2077         the header is not installed, but it's safe to #include it from
2078         within the JIT.
2079
2080         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2081         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2082
2083 2006-02-02  Martin Baulig  <martin@ximian.com>
2084
2085         * mono-debug.h
2086         (MonoSymbolTable): Removed the `metadata_info' field.
2087
2088         * mono-debug.c
2089         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2090
2091         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2092         (mono_debugger_add_builtin_types): Removed.
2093         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2094         (mono_debugger_create_notification_function): We now operate on a
2095         pre-allocated area; take a `gpointer' and return `void'.
2096
2097         * mono-debug-debugger.c
2098         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2099         (mono_debugger_add_builtin_types): Removed.
2100
2101 2006-02-02  Martin Baulig  <martin@ximian.com>
2102
2103         * threads.c (mono_debugger_create_all_threads): New public method.
2104
2105 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2106
2107         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2108         breaks on several platforms.
2109
2110 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
2111
2112         * assembly.c: the VS.NET build doesn't supply default values for
2113         MONO_ASSEMBLIES and MONO_CFG_DIR.
2114
2115 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
2116
2117         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2118         helper function.
2119
2120         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2121
2122         * loader.c (method_from_memberref): Fix a warning.
2123
2124         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2125
2126         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2127         with explicit layout. Fixes #77433.
2128
2129 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
2130
2131         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
2132         max_interface_id is initialized before using it. Fixes #77398.
2133         (ves_icall_Type_GetInterfaces): Ditto.
2134
2135 2006-01-30  Raja R Harinath  <rharinath@novell.com>
2136
2137         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2138         allocate memory for parameter attributes when parsing memberref
2139         signatures.
2140         * loader.c (mono_loader_set_error_method_load): Don't warn.
2141         (method_from_memberref): Ensure MissingMethodException gets thrown
2142         if method is not found.  Make warning more informative.
2143
2144 2006-01-29  Raja R Harinath  <harinath@gmail.com>
2145
2146         Fix #77397
2147         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2148         return true if is byref.
2149         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2150         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2151         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2152
2153 2006-01-27  Raja R Harinath  <rharinath@novell.com>
2154
2155         Fix tests/find-method.2.il
2156         * loader.c (find_method, find_method_in_class): Remove is_inflated
2157         argument.  Revert 2006-01-18 change.
2158         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2159         is generic, search for method in its generic definition.
2160         * class.c (mono_class_setup_vtable_general): Print generic
2161         arguments of generic types in debugging printf.
2162
2163 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
2164
2165         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2166
2167         * threads.c (mono_threads_request_thread_dump): New helper function.
2168
2169 2006-01-25  Raja R Harinath  <rharinath@novell.com>
2170
2171         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2172
2173 2006-01-25  Ankit Jain  <jankit@novell.com>
2174
2175         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2176         move definition to ..
2177         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2178         
2179 2006-01-25  Ankit Jain  <jankit@novell.com>
2180             Raja R Harinath  <rharinath@novell.com>
2181
2182         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2183         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2184         as necessary.
2185
2186 2006-01-25  Martin Baulig  <martin@ximian.com>
2187
2188         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2189         `MonoDebuggerThread' into debug-debugger.c.
2190
2191 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2192
2193         * profiler.c: fix printing of data.
2194
2195 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
2196
2197         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2198           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2199
2200 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2201
2202         * object.c: fix deadlock related to string interning.
2203
2204 2006-01-23  Martin Baulig  <martin@ximian.com>
2205
2206         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2207
2208         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2209
2210 2006-01-23  Martin Baulig  <martin@ximian.com>
2211
2212         * mono-debug.h: Moved the prototypes of some functions which are
2213         used by the JIT here from mono-debug-debugger.h.
2214
2215 2006-01-21  Martin Baulig  <martin@ximian.com>
2216
2217         * Makefile.am: Don't install mono-debug-debugger.h.
2218
2219 2006-01-21  Martin Baulig  <martin@ximian.com>
2220
2221         * mono-debug-debugger.h: Enforce the private status of this header
2222         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2223         Moved some stuff from mono-debugger-jit-wrapper.h here.
2224
2225 2006-01-20  Raja R Harinath  <rharinath@novell.com>
2226
2227         * class.c (mono_class_from_typeref): Add a sanity test to help
2228         catch lack of assembly load/search hooks.
2229
2230 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
2231
2232         * marshal.c (emit_struct_conv): Relax the fields with same offset
2233         check even more. Fixes #77230.
2234
2235 2006-01-18  Martin Baulig  <martin@ximian.com>
2236
2237         * loader.c (find_method_in_class): Added `gboolean is_inflated'
2238         argument; if false, we compare the uninstantiated signatures.
2239         (method_from_memberref): Compare the uninstantiated signatures;
2240         fixes #76417.
2241
2242 2006-01-18  Robert Jordan  <robertj@gmx.net>
2243
2244         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2245         Clear the weak link. Fixes bug #77170.
2246
2247         * gc.c (mono_gchandle_free):
2248         Reflect *-gc.c changes (tiny optimization).
2249
2250 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
2251
2252         * metadata.c (mono_metadata_signature_dup): Applied patch from
2253         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2254         Fixes #77288.
2255
2256 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
2257
2258         * marshal.c (emit_struct_conv): Allow fields with the same offset when
2259         marshalling from native to managed code. Fixes #77230.
2260
2261 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2262
2263         * threadpool.c: fix problem (Mac only) when more than one asynchronous
2264         connect. Fixes bug #77020.
2265
2266 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2267
2268         * class.c: fixed id assignement for nested interfaces (bug #77275).
2269         Added also better info for --print-vtable debugging.
2270
2271 2006-01-12  Martin Baulig  <martin@ximian.com>
2272
2273         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2274         interfaces on-the-fly; fixes #76625.
2275
2276         * class-internals.h
2277         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2278         don't need that anymore.
2279
2280 2006-01-12  Miguel de Icaza  <miguel@novell.com>
2281
2282         * socket-io.c
2283         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2284         To avoid initing the nested_classes when not needed I turned the
2285         PeerCredData as a toplevel internal class, as it has to be shared
2286         anyways. 
2287
2288         Fixes the CASA issue.
2289
2290 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
2291
2292         * domain.c: Accessors for MonoJitInfo
2293
2294         * profiler-private.h: Add jitinfo to the end jit hook
2295
2296         * profiler.[ch]: Define new hooks, called after jitting which give
2297         the MonoJitInfo that was compiled
2298
2299 2006-01-10  Martin Baulig  <martin@ximian.com>
2300
2301         * class.c (mono_class_setup_events): Add support for generic
2302         classes; fixes #76440.
2303
2304 2006-01-06  Raja R Harinath  <rharinath@novell.com>
2305
2306         Fix #77160.
2307         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2308         on passed-in method.
2309
2310 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2311
2312         * object.c (mono_runtime_invoke_array): Add Nullable support.
2313
2314         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2315
2316 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
2317
2318         * file-io.c: Don't consider sockets as directory and avoid an endless
2319         loop. Fix bug #76966.
2320
2321 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2322
2323         * object.c (mono_nullable_init): New helper function.
2324         (mono_nullable_box): Ditto.
2325
2326         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2327
2328         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2329
2330         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2331         
2332 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
2333
2334         * class.c (mono_class_is_assignable_from): Make T assignable to 
2335         Nullable<T>.
2336
2337 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
2338
2339         * appdomain.c: Bump corlib version to 46.
2340         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2341         serialization purpose) and changed ves_icall_System_Reflection_
2342         Assembly_get_code_base signature to accept a boolean (to escape, or 
2343         not, the assembly code base).
2344
2345 2005-12-23  Dick Porter  <dick@ximian.com>
2346
2347         * icall.c: 
2348         * threads-types.h: 
2349         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2350         CreateEvent icall now returns "created" boolean parameter.
2351
2352 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
2353
2354         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2355         #76967.
2356
2357         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
2358         when attr_klass is an interface. Fixes #77045.
2359
2360 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
2361
2362         * marshal.c (emit_struct_conv): Fix previous patch.
2363         
2364         * marshal.c (emit_struct_conv): Add a check for fields with the same
2365         offset.
2366
2367 2005-12-20  Raja R Harinath  <rharinath@novell.com>
2368
2369         Fix regression in Mono.C5.
2370         * class.c (mono_class_create_generic): If 'klass' is an interface
2371         set up the interface offsets.
2372         (mono_class_is_assignable_from): Don't throw away generic arguments.
2373
2374 2005-12-19  Raja R Harinath  <rharinath@novell.com>
2375
2376         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2377         type parameters.
2378
2379 2005-12-15  Raja R Harinath  <rharinath@novell.com>
2380
2381         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2382         dead store.
2383         (do_mono_metadata_parse_generic_class): Don't pass the current
2384         generic context when parsing the type being instantiated: it
2385         cannot use it, anyway.
2386
2387         * loader.c (method_from_memberref): Don't inflate a signature if
2388         it doesn't contain any type parameters.
2389
2390 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
2391
2392         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2393
2394 2005-12-14  Martin Baulig  <martin@ximian.com>
2395
2396         * class.c
2397         (mono_type_get_name_recurse): Don't return null for type
2398         parameters and open generic classes.
2399         (mono_class_setup_methods): Don't exclude generic instances.
2400         (mono_get_unique_iid): Use different IDs for different
2401         instantiations of the same generic type.
2402         (mono_class_setup_vtable): Only use setup_generic_vtable() for
2403         open generic instances; create a normal vtable for closed generic
2404         instances.
2405         (mono_class_setup_vtable_general): We're now also called for
2406         closed generic instances.
2407
2408         * reflection.c
2409         (mono_reflection_bind_generic_parameters): Correctly use
2410         mono_metadata_lookup_generic_inst() everywhere.
2411
2412 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
2413
2414         * object.c (mono_class_create_runtime_vtable): Call 
2415         mono_class_setup_vtable ().
2416
2417         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2418         function.
2419         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2420         #76959.
2421
2422         * loader.c (mono_loader_set_error_type_load): Print the type load
2423         warnings to the console so they are more visible to the user.
2424         (mono_loader_set_error_method_load): Ditto.
2425
2426         * reflection.c (ensure_runtime_vtable): Revert the last change as it
2427         is still broken.
2428         
2429         * reflection.c (ensure_runtime_vtable): Fix build.
2430
2431         * reflection.c (ensure_runtime_vtable): Disable an optimization which
2432         doesn't work in all cases.
2433
2434 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
2435
2436         * object.c (mono_array_new_full): Treat a single dimensional array
2437         with 0 lower bounds as an szarray. Fixes #76973.
2438
2439         * reflection.c (custom_attr_visible): Really fix this.
2440
2441 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
2442
2443         * reflection.c (custom_attr_visible): Allow nested public attributes
2444         as well.
2445
2446         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2447         interface check.
2448
2449 2005-12-12  Raja R Harinath  <harinath@gmail.com>
2450
2451         * class.c (set_generic_param_owner): Delete.
2452         (mono_class_create_from_typedef): Don't set ->owner field of
2453         generic parameters to "param containers" of enclosing classes.
2454         * reflection.c (mono_reflection_initialize_generic_parameter):
2455         Likewise.
2456
2457 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
2458
2459         * reflection.c (custom_attr_visible): Fix build.
2460
2461 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
2462
2463         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2464         private attributes.
2465         
2466         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2467         handling of null parameter defaults.
2468
2469 2005-12-09  Raja R Harinath  <rharinath@novell.com>
2470
2471         * class.c (mono_class_from_generic_parameter): Don't set
2472         klass->generic_container.
2473         (my_mono_class_from_generic_parameter): Likewise.
2474
2475 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
2476
2477         * reflection.c (load_public_key): Fix a warning.
2478         (method_encode_code): Fix unaligned accesses.
2479
2480 2005-12-07  Martin Baulig  <martin@ximian.com>
2481
2482         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2483
2484         * reflection.c
2485         (write_generic_param_entry): Encode our custom attrs.
2486
2487         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2488
2489 2005-12-07  Martin Baulig  <martin@ximian.com>
2490
2491         * reflection.c (encode_new_constraint): Removed; we don't use the
2492         `NewConstraintAttribute' anymore.
2493
2494 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
2495
2496         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2497         not fire a TypeResolve event when Assembly.GetType () is called.
2498
2499 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
2500
2501         Beginning of support for nullable types in the runtime. Parts of
2502         this patch are from Martin.
2503
2504         * appdomain.c (MONO_CORLIB_VERSION): Bump
2505
2506         * domain.c (mono_init_internal): get the nullable type
2507
2508         * class.c (mono_class_is_nullable): New method
2509         (mono_class_get_nullable_param): New mehod
2510         (mono_class_create_generic): In types T? set cast_class to T
2511
2512         * class-internals.h (MonoDefaults): new nullable default class
2513         (mono_class_get_nullable_param, mono_class_get_nullable_param):
2514         new methods.
2515
2516 2005-12-05  Raja R Harinath  <rharinath@novell.com>
2517
2518         * metadata.c (select_container): New.  Refactor code to select the
2519         appropriate GenericContainer given the type of generic parameter
2520         we are looking for.
2521         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2522         not a MonoGenericContext.  Use select_container.  Update parameters.
2523         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2524         and MONO_TYPE_MVAR.
2525         (unwrap_arrays): Remove duplicate tests.
2526         (find_generic_param): Rename from 'has_same_context'.  Now walks a
2527         generic instantiated class to find any arguments that are generic
2528         parameters.
2529         (mono_type_create_from_typespec_full): Use find_generic_param to
2530         avoid evicting some generic instantiations from the typespec
2531         cache.
2532
2533 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2534
2535         * reflection.c: fixed writing of doubles on ARM FPA.
2536
2537 2005-12-02  Robert Jordan  <robertj@gmx.net>
2538
2539         * icall.c: Fixed EventInfo.ReflectedType (#76829).
2540
2541 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2542
2543         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2544         least on SUSE 10 they are not the same (on debian, they are just the
2545         same thing).
2546
2547 2005-12-01  Raja R Harinath  <rharinath@novell.com>
2548
2549         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2550         DeclaringType for VARs and MVARs.
2551         * class.c (set_generic_param_owner): Fix initialization of owner
2552         fields.
2553
2554 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2555
2556         * icall.c: fixed Enum.ToObject() to correctly convert the values.
2557
2558 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2559
2560         * threadpool.c: workaround for a bug that shows up on the Mac:
2561         select()+connect() on a blocking socket is not like it should
2562         be, so we proceed to connect() in that case, wasting the I/O
2563         threadpool thread until connect succeedes. Fixes bug #75436.
2564
2565 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2566
2567         * threadpool.c: fix typo when setting file descriptor states.
2568
2569 2005-11-28  Raja R Harinath  <rharinath@novell.com>
2570
2571         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
2572         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2573         create a temporary signature container.
2574         (mono_metadata_parse_generic_param): Update to changes.
2575         (mono_type_create_from_typespec_full): Update to changes.
2576         * loader.c (method_from_memberref): Don't use a
2577         MonoGenericContainer while parsing a memberref signature.
2578         (method_from_methodspec): Remove dead-store of the 'container'
2579         variable.  It's overwritten before use.
2580
2581         * metadata.c (mono_type_create_from_typespec_full): Make debugging
2582         checks tighter.
2583         (mono_metadata_parse_generic_param): Likewise.
2584         * loader.c (find_method_in_class): Does not need a
2585         MonoGenericContainer.  Use 'mono_method_signature' rather than
2586         'mono_method_signature_full'.
2587         (find_method, mono_get_method_constrained, method_from_memberref):
2588         Update to changes.
2589
2590         * metadata.c (mono_type_create_from_typespec_full): Ensure that
2591         owner-less generic-parameters are never evicted from the typespec
2592         cache.
2593
2594         * loader.c (method_from_memberref): Don't use the current context
2595         when parsing signatures.
2596         (method_from_methodspec, mono_get_method_from_token): Update to changes.
2597
2598         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2599         side-effects in g_assert.
2600         * loader.c (mono_get_method_from_token): Resolve klass earlier so
2601         that we don't potentially lose information.
2602
2603 2005-11-26  Dick Porter  <dick@ximian.com>
2604
2605         * icall.c:
2606         * threads.c: icalls to implement basic (ie, not named)
2607         System.Threading.Semaphore.
2608
2609 2005-11-24  Dick Porter  <dick@ximian.com>
2610
2611         * process.c
2612         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2613         Use GetProcessId() if it's available.
2614
2615 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
2616
2617         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2618
2619 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2620             Ankit Jain  <jankit@novell.com>
2621
2622         * loader.c (mono_get_method_from_token): Initialize 'method' field
2623         of all generic parameters before parsing the signature.  Remove
2624         code that "fixed"-up MVAR references.
2625
2626 2005-11-23  Ankit Jain  <jankit@novell.com>
2627
2628         * metadata.c (mono_metadata_has_generic_params):
2629         (mono_metadata_load_generic_param_constraints):
2630         (mono_metadata_load_generic_params): Move duplicate code ...
2631         (mono_metadata_get_generic_param_row): ... here. Returns the
2632         first row-id in GenericParam table for a given owner (token).
2633         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2634         prototype.
2635
2636 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2637             Ankit Jain  <jankit@novell.com>
2638
2639         * metadata.c (mono_metadata_class_equal): Pass signature_only when
2640         comparing VARs too.
2641         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
2642         type->data.generic_param only if the type is an MVAR.
2643         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2644         leak owner-less VARs and MVARs into managed space.
2645
2646 2005-11-21  Martin Baulig  <martin@ximian.com>
2647
2648         * class-internals.h
2649         (MonoMethod): Moved the `generic_container' here from
2650         `MonoMethodNormal' since we now also need it for
2651         `MonoMethodPInvoke';
2652         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2653         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2654         an union containing both `MonoMethodNormal' and
2655         `MonoMethodPInvoke'.
2656
2657         * loader.c
2658         (mono_get_method_from_token): Allow implementing generic methods
2659         as interncalls.
2660
2661         * threads.c
2662         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2663         icall.
2664
2665 2005-11-17  Dick Porter  <dick@ximian.com>
2666
2667         * icall.c: 
2668         * process.h: 
2669         * process.c: Split the Process Start_internal icall into
2670         ShellExecuteEx_internal and CreateProcess_internal, which are
2671         called depending on whether UseShellExecute is true.  Fixes bug
2672         76670.
2673
2674         * appdomain.c (MONO_CORLIB_VERSION): Incremented
2675
2676 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
2677
2678         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2679         'msize' parameters, use the information in 'mspec' instead.
2680         (emit_object_to_ptr_conv): Ditto.
2681
2682         * marshal.c (emit_struct_conv): Handle explicit layout structs with
2683         fields out of order. Fixes #76733.
2684
2685 2005-11-17  Ankit Jain  <jankit@novell.com>
2686
2687         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2688
2689 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
2690
2691         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2692           bug #76575.
2693
2694 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2695
2696         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2697         for types with non-auto layout. Fixes #76717.
2698
2699 2005-11-16  Ankit Jain  <jankit@novell.com>
2700
2701         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2702         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
2703         if generic_context is null.
2704           (mono_metadata_generic_param_equal): param->owner can be null.
2705           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2706         null.
2707
2708 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2709
2710         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2711         the correct value.
2712
2713 2005-11-15  Martin Baulig  <martin@ximian.com>
2714
2715         * object.c (set_value): Use mono_class_from_mono_type() instead of
2716         the hack for generic instances; fixes #76136.
2717
2718 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
2719
2720         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2721         fields.
2722
2723         * image.c (load_metadata_ptrs): Initialize the new fields.
2724
2725         * reflection.c (create_dynamic_mono_image): Ditto.
2726
2727         * reflection.c (build_compressed_metadata): Use the new fields.
2728
2729         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2730         icall.
2731
2732         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2733         icall.
2734         
2735 2005-11-15  Ankit Jain  <jankit@novell.com>
2736             Raja R Harinath  <harinath@gmail.com>
2737
2738         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2739         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2740         new per-generic_container cache if the cached MonoType's context matches
2741         the current context.
2742           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2743         to the expected context.
2744           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2745
2746 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2747
2748         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2749         we changed the signature of an icall.
2750         * icall.c: Modify to mono_double_ParseImpl return true/false 
2751         depending on the success, instead of throwing the exception. This will
2752         help us in Double.TryParse methods.
2753         
2754 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
2755
2756         * marshal.c (emit_marshal_object): Throw an exception when
2757         marshalling 'object' instead of crashing. Fixes #76696.
2758
2759 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2760
2761         * class-internals.h: Add prototype for mono_type_get_full_name ().
2762
2763 2005-11-11  Dick Porter  <dick@ximian.com>
2764
2765         * threads.c (mono_thread_manage): Make sure the main thread has
2766         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
2767
2768 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2769
2770         * loader.c (mono_loader_set_error_type_load): Log a warning to the
2771         console about the missing type.
2772         (mono_loader_set_error_method_load): Ditto.
2773
2774 2005-11-09  Miguel de Icaza  <miguel@novell.com>
2775
2776         * mono-config.c (mono_get_config_dir): Set the system defaults if
2777         none is specified.
2778
2779         * assembly.c (mono_set_dirs): New API entry point to set the
2780         assembly and the config directory in one call
2781
2782 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
2783
2784         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2785         the ftnptr was created from a delegate in a domain other than the
2786         current domain. Fixes #75377.
2787
2788         * exception.h exception.c: Add mono_get_exception_not_supported ().
2789
2790 2005-11-08  Martin Baulig  <martin@ximian.com>
2791
2792         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2793
2794 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
2795
2796         * security-manager.h: Added definitions to deal with strongname key 
2797         pairs bigger (and smaller) than 1024 bits.
2798         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
2799         adjust wrt the public key length being used.
2800
2801 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
2802
2803         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2804           Windows build (r51396-51397).
2805
2806 2005-11-03  Martin Baulig  <martin@ximian.com>
2807
2808         * class.c (mono_class_setup_vtable_general): Also add generic
2809         methods to the vtable; fixes #76581.
2810
2811 2005-11-01  Miguel de Icaza  <miguel@novell.com>
2812
2813         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2814         sure that we lookup GetString method from the System.Text.Encoding
2815         class, not the derived class or we get an empty method.
2816
2817         Fixed class #76612.
2818
2819 2005-10-25  Miguel de Icaza  <miguel@novell.com>
2820
2821         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2822         if it has been previously set (embedders). 
2823
2824         Make mono_set_rootdir available also on Unix.
2825
2826 005-10-24  Robert Jordan  <robertj@gmx.net>
2827
2828         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2829
2830 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
2831
2832         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2833         only calls which are made to native code use this flag.
2834
2835         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2836
2837 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
2838
2839         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2840         Add support for FieldBuilders.
2841
2842 2005-10-29  Martin Baulig  <martin@ximian.com>
2843
2844         * mono-debug.c
2845         (mono_debug_using_mono_debugger): New public method; returns
2846         whether we're running inside the debugger.
2847
2848 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
2849
2850         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2851         for Method/Constructor/FieldBuilders.
2852
2853 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
2854
2855         * reflection.c (module_add_cattrs): Save custom attributes for global methods
2856         and fields as well.
2857
2858 2005-10-26  Martin Baulig  <martin@ximian.com>
2859
2860         * mono-debug-debugger.c
2861         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2862
2863 2005-10-24  Raja R Harinath  <harinath@gmail.com>
2864
2865         * icall.c (base64_to_byte_array): Don't pass an out-of-range
2866         integer to isspace.
2867
2868 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
2869
2870         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2871         when passing valuetypes byref. Fixes #76502.
2872
2873 2005-10-19  Jackson Harper  <jackson@ximian.com>
2874
2875         * profiler.c: Don't put a . in front of types that are not in a
2876         namespace.
2877
2878 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
2879
2880         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2881
2882 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
2883
2884         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2885         #76436.
2886         (mono_marshal_get_ldflda_wrapper): Fix a warning.
2887
2888 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2889
2890         * assembly.c metadata-internals.h icall.c: Define an additional
2891         parameter for mono_assembly_name_parse_full, so we can avoid creating
2892         S.R.AssemblyName.Version when no version info wasn't passed.
2893         
2894 2005-10-09  Miguel de Icaza  <miguel@novell.com>
2895
2896         * class.c (mono_type_get_full_name): Reimplement method that was
2897         removed. 
2898
2899         * image.c: Some docs
2900
2901 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
2902
2903         * profiler.c (output_newobj_profile): Fix printing of Total memory
2904         on x86.
2905
2906 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2907
2908         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2909
2910 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
2911
2912         * threads.c: remove debug output.
2913
2914 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2915
2916         * threads.c (mono_thread_manage): Fix crashes if more than 64
2917         threads need to be aborted. Hopefully fixes #75899.
2918
2919         * assembly.c (mono_stringify_assembly_name): New helper function.
2920
2921         * class.c: Use mono_stringify_assembly_name instead of the similar
2922         static function.
2923
2924         * assembly.h assembly.c: Add support for calling a postload search 
2925         hook if an assembly cannot be loaded.
2926
2927         * appdomain.c: Register new search hooks which call the AssemblyResolve
2928         events in AppDomain. Fixes #75231
2929
2930 2005-10-07  Martin Baulig  <martin@ximian.com>
2931
2932         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2933         methods without debug info.
2934
2935 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
2936
2937         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2938         wrappers.
2939
2940 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2941
2942         * file-io.c: now that we return symlinks, use lstat and, when the file
2943         is a symbolic link, stat, to get the file attributes. Also avoid the
2944         conversion to/from utf16/external.
2945
2946 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * class.c (mono_class_layout_fields): Compute klass->has_references
2949         correctly if an embedded valuetype is not yet initialized. Fixes
2950         #76331.
2951
2952 2005-10-04  Martin Baulig  <martin@ximian.com>
2953
2954         * metadata.c
2955         (mono_metadata_load_generic_param_constraints): New public
2956         function; splitted the constraints loading out from
2957         mono_metadata_load_generic_params().
2958
2959         * class.c (mono_class_create_from_typedef): Call
2960         mono_metadata_load_generic_param_constraints() after setting up
2961         the type and creating our parent; fixes #75329.
2962
2963 2005-10-04  Martin Baulig  <martin@ximian.com>
2964
2965         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2966         non-dynamic parent classes.
2967
2968 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
2969
2970         * file-io.c : win32 build fix (ETXTBSY seems not found).
2971
2972 2005-10-04  Martin Baulig  <martin@ximian.com>
2973
2974         * reflection.c
2975         (mono_image_get_methodspec_token): Make the cache actually work;
2976         fixes #75974.
2977
2978 2005-10-04  Martin Baulig  <martin@ximian.com>
2979
2980         * class.c (mono_class_name_from_token): Removed the unneccessary
2981         `MonoGenericContext *' argument.
2982
2983 2005-10-04  Martin Baulig  <martin@ximian.com>
2984
2985         * loader.c
2986         (method_from_methodspec): Make the caching work again; fixes the
2987         performance regression from #76262.
2988
2989 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2990
2991         * file-io.c:
2992         * file-io.h:
2993         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
2994         GetFileSystemEntries that performs the same work but without going
2995         into io-layer, locking, etc.
2996
2997 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
2998
2999         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
3000         ThreadState_Stopped as well. Fixes #76047.
3001
3002 2005-09-29  Martin Baulig  <martin@ximian.com>
3003
3004         * class.c
3005         (inflate_generic_context): If the new context has a `gmethod', set
3006         its `container' that that gmethod's `container'.
3007
3008         * metadata.c
3009         (mono_metadata_parse_generic_param): Simplify things;
3010         `generic_container = generic_context->container;' is just fine.
3011
3012         * loader.c (method_from_methodspec): Code cleanups.
3013
3014 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3015
3016         * decimal.c: fix warning (and let gcc generate correct
3017         code on ARM with optimizations).
3018
3019 2005-09-28  Martin Baulig  <martin@ximian.com>
3020
3021         * loader.c
3022         (method_from_memberref): Added `MonoGenericContext *class_context'
3023         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3024         (method_from_methodspec): If we're a memberref, use the enclosing
3025         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
3026
3027 2005-09-28  Martin Baulig  <martin@ximian.com>
3028
3029         * object.c (mono_runtime_invoke_array): Added support for
3030         MONO_TYPE_GENERICINST; fixes #75917.
3031
3032 2005-09-27  Martin Baulig  <martin@ximian.com>
3033
3034         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3035         `k->byval_arg.type' to determine the actual type.
3036
3037         * loader.c (method_from_methodspec): Removed some hacks.
3038
3039 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
3040
3041         * class-internals.h (mono_field_is_deleted): Do the test for
3042         rtspecialname before we check the actual name of the field. This
3043         prevents us from dereferencing a pointer into the string table,
3044         saving us from accessing a few pages
3045
3046         * *.c: Replace the use of {Enter,Leave}CriticalSection with
3047         macros. This will allow a deadlock debugger to easily be plugged
3048         in.
3049
3050 2005-09-27  Martin Baulig  <martin@ximian.com>
3051
3052         * loader.c (method_from_methodspec): Create a "signature"
3053         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
3054
3055 2005-09-27  Martin Baulig  <martin@ximian.com>
3056
3057         * class.c
3058         (inflate_generic_class): Correctly set the new context's
3059         container.
3060
3061         * loader.c
3062         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3063         instead of a `MonoGenericContext *'.
3064         (mono_method_signature_full): Take a `MonoGenericContainer *'
3065         instead of a `MonoGenericContext *'.
3066
3067         * metadata.c
3068         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3069         instead of a `MonoGenericContext *'.
3070         (mono_metadata_parse_method_signature_full): Likewise.
3071
3072 2005-09-26  Martin Baulig  <martin@ximian.com>
3073
3074         * class.c
3075         (mono_class_from_generic_parameter): Set `klass->generic_container'
3076         (mono_class_from_generic_parameter): Likewise.
3077         (mono_bounded_array_class_get): We inherit the generic container
3078         from the element class.
3079
3080         * loader.c
3081         (find_method, find_method_in_class): Take a `MonoGenericContext *'
3082         argument rather than computing it here.
3083         (method_from_memberref): Correctly set the generic context before
3084         parsing the signature.  Fixes #75681.
3085
3086 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
3087
3088         * object.c (mono_class_has_special_static_fields): Fix warnings.
3089
3090 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3091
3092         * assembly.c: Add parse_public_key function, to
3093         par the public keys. Also added mono_assembly_name_parse_full,
3094         to define it the parsed key should be freed or not.
3095         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3096         to parse a long format assembly name.
3097         * metadata-internals.h: Keep mono_assembly_name_parse_full as
3098         private, since calling it to preserve the key requires
3099         freeing it manually.
3100         
3101 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
3102
3103         * locales.c : removed HAVE_ICU part.
3104
3105 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3106
3107         * object.c (mono_class_create_runtime_vtable): Avoid calling 
3108         field_is_special_static if the klass has no special static fields.
3109
3110         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3111         (MonoCachedClassInfo): Likewise.
3112
3113         * object.c (mono_class_has_special_static_fields): New helper function.
3114
3115 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3116
3117         * class.c (mono_class_create_from_typedef): Don't call 
3118         interfaces_from_typedef_full for enums.
3119         (mono_class_create_from_typedef): Compute the base types of enums directly
3120         without calling mono_class_setup_fields ().
3121         (mono_class_find_enum_basetype): New helper function.
3122
3123         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3124         one place inside the string heap.
3125         
3126 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3127
3128         * class.c: locking fixes, code cleanups, some docs added.
3129         Allocate some data structures in the image mempool.
3130
3131 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3132
3133         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3134         the example code.
3135         
3136 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3137
3138         * class-internals.h, class.c, reflection.c: reduce memory taken by
3139         MonoClass.
3140
3141 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3142
3143         * metadata.c, metadata.h, loader.h: documentation updates, code and
3144         API cleanups.
3145
3146 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3147
3148         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3149         the example code.
3150
3151         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3152         page faults caused by the runtime while reading metadata.
3153
3154 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3155
3156         * socket-io.c: the field names were changed 3 months ago and no one
3157         realized until bug #76077 got filed!
3158
3159 2005-09-20  Martin Baulig  <martin@ximian.com>
3160
3161         * icall.c (assembly_icalls): Removed some unused debugger icalls.
3162
3163 2005-09-20  Martin Baulig  <martin@ximian.com>
3164
3165         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3166         write the rank into the class entry.
3167
3168 2005-09-20  Martin Baulig  <martin@ximian.com>
3169
3170         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3171
3172 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
3173
3174         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3175
3176         * icall.c (custom_attrs_defined_internal): New icall.
3177
3178         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3179         function.
3180         (mono_custom_attrs_construct_by_type): New helper function.
3181
3182 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
3183
3184         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3185         terminate the resulting string. Fixes #76123.
3186
3187 2005-09-16  Martin Baulig  <martin@ximian.com>
3188
3189         * mono-debug.c
3190         (mono_debug_add_method): Ignore inflated methods for the moment.
3191
3192 2005-09-14  Martin Baulig  <martin@ximian.com>
3193
3194         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3195
3196 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
3197
3198         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3199         return a success/failure indication.
3200         (mono_metadata_interfaces_from_typedef_full): Ditto.
3201         (get_constraints): Ditto.
3202
3203 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
3204
3205         * marshal.c (emit_marshal_array): Fix handling of null arrays.
3206         
3207         * marshal.c (emit_marshal_array): Add support for returning string
3208         arrays from delegates. Fixes #76063.
3209
3210         * marshal.c: Use the emit_ldloc/stloc macros where possible.
3211
3212 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
3213
3214         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3215         icall.
3216
3217 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
3218
3219         * reflection.c icall.c: Fix after mono_get_exception_type_load
3220         signature change.
3221
3222         * assembly.c (mono_assembly_get_assemblyref): New helper function.
3223         (mono_assembly_load_reference): Use the new helper.
3224
3225         * class-internals.h (MonoLoaderError): New structure containing 
3226         information about type loading errors.
3227
3228         * class-internals.h loader.c: Add APIs to store per-thread loader
3229         error information.
3230
3231         * loader.c class.c: Set the loader error if needed.
3232
3233         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3234
3235 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3236
3237         * decimal.c: fixed to handle the broken ARM fp format.
3238
3239 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3240
3241         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3242         broken.
3243
3244 2005-09-06  Martin Baulig  <martin@ximian.com>
3245
3246         * domain.c (supported_runtimes): Added v2.0.50727.
3247
3248 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3249
3250         * culture-info.h: reduce the size of some structures.
3251
3252 2005-09-05  Martin Baulig  <martin@ximian.com>
3253
3254         Reflect latest API changes in the August CTP.
3255
3256         * icall.c
3257         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3258         ("MonoType.HasGenericArguments"): Removed.
3259         ("MonoMethod.BindGenericParameters"): Renamed to
3260         "MakeGenericMethod".
3261         ("MethodBuilder.BindGenericParameters"): Renamed to
3262         "MakeGenericMethod".    
3263
3264 2005-09-05  Martin Baulig  <martin@ximian.com>
3265
3266         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3267
3268 2005-09-05  Martin Baulig  <martin@ximian.com>
3269
3270         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3271
3272         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3273         generic_container is non-NULL.
3274
3275 2005-09-05  Martin Baulig  <martin@ximian.com>
3276
3277         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3278
3279         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3280
3281 2005-08-29  Michal Moskal  <malekith@nemerle.org>
3282
3283         * reflection.c (encode_locals,
3284         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3285         for large generic types.
3286
3287 2005-09-05  Martin Baulig  <martin@ximian.com>
3288
3289         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3290
3291         * class.c (mono_dup_array_type): New public method.
3292         (mono_metadata_signature_deep_dup): New public method.
3293         (dup_type): Correctly duplicate array and function types.
3294
3295 2005-09-05  Martin Baulig  <martin@ximian.com>
3296
3297         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3298
3299         * reflection.c (get_default_param_value_blobs): Handle generic types
3300         and generic methods.
3301
3302 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
3303
3304         * class.c: Fixed error reporting (method/class were inversed) for 
3305         inheritance demands.
3306         * security-manager.c|h: Added the AppDomain when calling the managed
3307         System.Security.SecurityManager.InheritanceDemand method.
3308
3309 2005-09-01  Raja R Harinath  <rharinath@novell.com>
3310
3311         * reflection.c (encode_marshal_blob): 'marshaltype' and
3312         'marshaltyperef' are alternate sources for the custom marshaler
3313         name.
3314
3315 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3316
3317         * class.c: fix creation of array classes with rank == 1
3318         (patch by Ankit Jain <jankit@novell.com>).
3319
3320 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3321
3322         * object.c: fix check for creating the bound data for arrays vs
3323         szarrays.
3324
3325 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3326
3327         * object.c: configuration file name is now based on the executable name,
3328         not the image name. Fixes bug #75931.
3329
3330 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
3331
3332         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3333         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3334
3335 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
3336
3337         * rand.c: Use wincrypt.h instead of WinCrypt.h.
3338
3339 2005-08-24  Ankit Jain  <jankit@novell.com>
3340             Raja R Harinath  <rharinath@novell.com>
3341
3342         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3343           called by it recursively.
3344           (mono_class_init): Remove special case in pending_init handling, since it's
3345           superseded by the fix to mono_class_from_typeref.
3346
3347 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
3348
3349         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
3350         BROKEN_THREAD_START stuff.
3351
3352 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
3353
3354         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
3355         trampoline.
3356
3357         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3358         
3359         * object.c (mono_delegate_ctor): Replace the original function address with
3360         a delegate trampoline.
3361
3362 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3363
3364         * icall.c: add boolean argument to base64_to_byte_array and 
3365         InternalFromBase64String to control whether a whitespace-only string
3366         is allowed (or should casue a FormatException to be thrown). We need
3367         this as the behavior has changed between MS.NET 1.x and 2.0, and we
3368         to match the MS behaviour in both profiles.
3369         * appdomain.c: Bump corlib version.
3370
3371 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3372
3373         This patch implements a big portion of publisher policy
3374         support, used to bind assembly versions and redirect
3375         one assembly from version A to version B.
3376
3377         * assembly.c:
3378         New GSList loaded_assembly_bindings, for storing the cached
3379         assembly bindings.
3380         (assembly_binding_maps_name): New static function for checking if a 
3381         assembly binding information maps an assembly name.
3382         (mono_assembly_binding_info_free): New function for freeing
3383         assembly binding information resources.
3384         (get_publisher_policy_info): New static function for retrieving 
3385         assembly binding information from a MonoImage.
3386         (compare_versions): New static function for comparing an assembly
3387         binding information data and the version of an assembly name.
3388         (check_policy_versions): New static function for checking if an
3389         assembly binding info mapping an assembly name is valid for it.
3390         (mono_assembly_load_publisher_policy): New static function for
3391         loading the 'policy.major.minor.MyAssembly' image for an assembly
3392         with an assembly name 'aname'.
3393         (mono_assembly_bind_version): New static function for updating
3394         assembly redirection.
3395         (mono_assembly_apply_binding): New static function for applying
3396         assembly binding.
3397         (search_binding_loaded): New static function for searching 
3398         loaded assembly binding infos in the cache domain.
3399         (mono_assembly_load_full): Don't apply assembly binding for
3400         reflection only assemblies.
3401
3402         * metadata-internals.h: Add MonoAssemblyBindingInfo,
3403         which contains information about assembly binding. Also
3404         declare signature for mono_config_parse_publisher_policy ()
3405         function, used to retrieve pub policy info.
3406         
3407         * mono-config.c:
3408         (publisher_policy_start): New static function used to parse publisher 
3409         policy config files.
3410         (publisher_policy_parser): New static MonoParseHandler containing 
3411         the functions used when parsing config files.
3412         (mono_config_parse_publisher_policy): New function for parsing
3413         publisher policy files.
3414         
3415 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
3416
3417         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3418
3419         * marshal.c (mono_delegate_free_ftnptr): Ditto.
3420
3421         * object.c (mono_get_addr_from_ftnptr): New helper function.
3422
3423         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3424
3425         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3426
3427 2005-08-19  Dick Porter  <dick@ximian.com>
3428
3429         * threads.c, threads.h, appdomain.c, appdomain.h,
3430         profiler-private.h, monitor.c, object.c, object-internals.h,
3431         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3432         store the thread ID, so it can hold a 64 bit value if needed.
3433
3434 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
3435
3436         * reflection.c (mono_reflection_create_dynamic_method): Store the
3437         handle class into the method references as well so ldtoken works in
3438         dynamic methods.
3439
3440         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3441         types.
3442
3443 2005-08-19  Ankit Jain <jankit@novell.com>
3444
3445         Fix #75847.
3446         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
3447           here rather than using the method signature of a arbitrary function
3448           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
3449           two arguments.
3450           Hack done with Harinath.
3451
3452 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3453
3454         * threadpool.c: disable printing stack traces when we get a exception
3455         in a threadpool thread. I need to do more testing to figure out which
3456         cases actually print this. Fixes bug #75828.
3457
3458 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3459
3460         * icall.c: there might be ignored whitespace after the last '='. This
3461         fixes length computation and bug #75840.
3462
3463 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
3464
3465         * assembly.c (mono_assembly_load_full): Consider .exe extension as
3466         well. Fixes #75809.
3467
3468         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3469         #75784.
3470         
3471         * reflection.c (create_custom_attr_data): Ditto.
3472
3473 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
3474
3475         * locales.c, culture-info.h : removed RegionLCIDMap.
3476         * culture-info-tables.h : regenerated.
3477
3478 2005-08-16  Martin Baulig  <martin@ximian.com>
3479
3480         * class.c (mono_type_get_name_recurse): Small fix.
3481
3482 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
3483
3484         * locales.c : indentation fixie.
3485
3486 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
3487
3488         * object-internals.h,
3489           locales.h,
3490           locales.c,
3491           culture-info.h,
3492           icall.c : added RegionInfo table support.
3493         * culture-info-table.h : regenerated for region support.
3494
3495 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
3496
3497         * reflection.c (resolve_object): handle all kinds of MonoMethod
3498         including generic ones
3499
3500 2005-08-12  Ankit Jain <jankit@novell.com>
3501
3502         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3503           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
3504
3505 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
3506
3507         * process.c: Don't close a thread handle when it's NULL. This is a
3508         workaround for bug #75733.
3509
3510 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
3511
3512         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3513
3514 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
3515
3516         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3517
3518 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3519
3520         * threadpool.c: if a work item in the thread pool has a callback that
3521         catches a exception, don't propagate it after invoking the callback.
3522         Fixes bug #75336.
3523
3524 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
3525
3526         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3527
3528         * class-internals.h (MonoCachedClassInfo): Add some new fields.
3529
3530         * class.c (mono_class_init): Load field info lazily in the AOT case.    
3531
3532         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3533
3534 2005-08-03  Ankit Jain  <jankit@novell.com>
3535
3536         Fix #75683.
3537         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3538           PInvoke calling convention is 0.
3539
3540 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
3541
3542         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
3543         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3544
3545 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3546
3547         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3548         to handle threads not started by the GC (patch by Michael Meeks
3549         <michael.meeks@novell.com>).
3550
3551 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
3552
3553         * reflection.c: Make buffer used in emitting types larger for some
3554         big generic types (patch by Michal Moskal).
3555
3556 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
3557
3558         * mono-debug.c: Fix some (not all) alignment problems.
3559
3560 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3561
3562         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3563         Invoke mono_image_load_from_data_full passing the refonly
3564         parameter.
3565
3566         * assembly.c
3567         (mono_assembly_open_from_bundle): Add the refonly argument, 
3568         in order to pass it to other methods it calls to.
3569         (do_mono_assembly_open): Add the refonly argument, in order 
3570         to pass it to other methods it calls to.
3571         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3572         the refonly parameter to it.
3573
3574         * image.c: Add loaded_images_refonly_hash and
3575         loaded_images_refonly_guid_hash to cache the reflection
3576         only loaded images.
3577         (mono_images_init): Initialize the hash tables used for
3578         caching the reflection only images.
3579         (load_modules): Invoke mono_image_open_full passing the refonly
3580         parameter to load the modules the correct way.
3581         (build_guid_table): Add the refonly argument, to re-build the 
3582         correct hash table.
3583         (do_mono_image_open): Added the refonly argument, in order to
3584         define it for the loaded image.
3585         (mono_image_loaded_full): New function, which receives an
3586         additional parameter to look for the image in the refonly or
3587         non-refonly section.
3588         (mono_image_loaded): Updated, using mono_image_loaded_full.
3589         (mono_image_loaded_by_guid_full): The same case that happens
3590         with mono_image_loaded_full.
3591         (mono_image_loaded_by_guid): Likewise.
3592         (register_image): Use the ref_only variable inside MonoImage
3593         to decide in which hash table store the current image.
3594         (mono_image_open_from_data_full): Rename
3595         mono_image_open_from_data to mono_image_open_from_data_full,
3596         adding the refonly argument, to define the ref_only variable 
3597         inside MonoImage.
3598         (mono_image_open_from_data): Return 
3599         mono_image_open_from_data_full.
3600         (mono_image_open_full): Rename mono_image_open to
3601         mono_image_open_full, receiving the new refonly argument,
3602         to pass it to inner methods.
3603         (mono_pe_file_open): Update this function, to open
3604         a MonoImage as a non-refonly image.
3605         (mono_image_close): Use the refonly variable inside
3606         MonoImage to remove the image from the correct caches.
3607
3608         * image.h: Add the signatures of mono_image_open_full,
3609         mono_image_open_from_data_full, mono_image_loaded_full,
3610         mono_image_loaded_by_guid_full.
3611
3612         * metadata-internals.h: Add the ref_only field to 
3613         MonoImage.
3614         
3615 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3616
3617         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3618         Fix the last behavior, which used to load the assemblies and
3619         extract MonoReflectionAssemblyName information, instead of
3620         extract it from the metadata tables. Needed for Reflection
3621         Only assemblies.
3622         
3623 2005-07-29  Martin Baulig  <martin@ximian.com>
3624
3625         * mono-debug-debugger.c
3626         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3627         not initialized.
3628
3629         * mono-debug.c
3630         (mono_debug_address_from_il_offset): Check whether we have
3631         debugging support before attempting to take the lock.
3632         (mono_debug_source_location_from_address): Likewise.
3633         (mono_debug_source_location_from_il_offset): Likewise.
3634         (mono_debug_il_offset_from_address): Likewise.
3635         (mono_debug_address_from_il_offset): Likewise.
3636
3637 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
3638
3639         * class.c (mono_class_from_name_case): Add support for dynamic images.
3640         Fixes #75650.
3641
3642         * object.c (mono_class_compute_gc_descriptor): Add a workaround
3643         for #75479.
3644
3645 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3646         
3647         * reflection.c (mono_method_get_object): Fix warning.
3648
3649 2005-07-28  Martin Baulig  <martin@ximian.com>
3650
3651         * mono-debug.c
3652         (mono_debug_add_wrapper): Also write the wrapper type.
3653
3654 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3655
3656         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3657         
3658         * class.c (mono_class_init): Avoid reading nested classes if the AOT
3659         data indicates the class has none.
3660
3661 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
3662
3663         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3664         loader lock with the debugger lock. Prevents deadlocks for beagle.
3665
3666         Beagle can now run on an smp box for a weekend without any
3667         issues. Woohoo!
3668
3669 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
3670
3671         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3672         in a module. Fixes #75629.
3673
3674 2005-07-26  Martin Baulig  <martin@ximian.com>
3675
3676         * mono-debug.c (mono_debug_add_wrapper): New static method.
3677         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3678         interncall or a wrapper.
3679
3680         * mono-debug.h (MonoDebugWrapperData): New public typedef.
3681         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3682         (MONO_DEBUGGER_VERSION): Bump to 51.
3683
3684         * mono-debug-debugger.c
3685         (mono_debugger_add_type): Removed this empty function.
3686         (mono_debugger_add_method): Likewise.
3687
3688 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
3689
3690         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
3691         before accessing method->slot.
3692
3693 2005-07-21  Jb Evain  <jbevain@gmail.com>
3694
3695         * reflection.c (method_encode_clauses/class): Handle filters clauses.
3696         Fixes #75010.
3697
3698 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
3699
3700         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3701         #75587.
3702
3703 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3704
3705         * image.h image.c: Add mono_image_get_guid () API function.
3706
3707 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
3708
3709         There were issues when multiple threads tried to load
3710         assemblies. A deadlock was created between assemblies_mutex and
3711         mono_domain_assemblies_lock. This fixes the issue by making the
3712         assembly ref counting be lock free. See bug 75586.
3713         
3714         * image.c (mono_image_close): The add ref function here was using
3715         Interlocked operations while the unref was using a mutex and a
3716         --. I don't think this was ever a bug that would be exposed in a
3717         non-pendantic way (ie, by an embedder doing a ref on one thread
3718         and an unref on another), but for the sake of correctness, this is
3719         now Interlocked.
3720
3721         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3722         (mono_assembly_load_reference): Call mono_assembly_addref rather
3723         than touching the refcount ourselves.
3724         (mono_assembly_close): Use InterlockedDecrement to unref the
3725         assembly. Don't acquire the lock unless it is actually needed.
3726
3727 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3728
3729         * class.c (mono_class_layout_fields): Fix calculation of has_references
3730         for generic types.
3731
3732 2005-07-12  Martin Baulig  <martin@ximian.com>
3733
3734         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3735
3736         * metadata.c
3737         (mono_type_hash): Provide better hashing for generic instances.
3738         (mono_generic_inst_hash): Improve hashing.
3739         (mono_generic_class_hash): Likewise.
3740
3741         * reflection.c (mymono_metadata_type_hash): Improve hashing for
3742         generic instances.
3743
3744 2005-07-12  Martin Baulig  <martin@ximian.com>
3745
3746         * reflection.c (mono_reflection_create_runtime_class): Remove the
3747         hack for generic type definitions and non-`Run' assemblies.
3748         (mono_reflection_bind_generic_parameters): Also use
3749         `klass->wastypebuilder' to check for TypeBuilders.
3750
3751 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3752
3753         * class.c (mono_class_layout_fields): Fix calculation of has_references
3754         for generic types.
3755
3756         * class.c (inflate_generic_class): Fix a leak.
3757         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3758         for generic types.
3759
3760 2005-07-11  Martin Baulig  <martin@ximian.com>
3761
3762         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3763         on error.
3764
3765 2005-07-11  Martin Baulig  <martin@ximian.com>
3766
3767         * loader.c (find_method): Also lookup in
3768         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3769
3770 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3771
3772         * appdomain.c (mono_domain_unload): Don't free the error message
3773         before passing it to mono_get_exception_...
3774
3775         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3776         
3777 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3778
3779         * threads.c: try to better guess an available RT signal (bug #75387).
3780
3781 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3782
3783         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3784         and CACHE_OBJECT.
3785
3786 2005-07-07  Martin Baulig  <martin@ximian.com>
3787
3788         * class.c (mono_type_get_name_full): Return NULL for
3789         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3790         fixes #75408.
3791
3792 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3793
3794         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3795         exit the appdomain as well being aborted.
3796
3797         * threadpool.c: Create all threadpool threads inside the root appdomain, and
3798         change back to the root domain after calling managed code. This enables
3799         appdomains using threadpools to be unloaded.
3800
3801 2005-07-07  Martin Baulig  <martin@ximian.com>
3802
3803         * class-internals.h
3804         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3805         into `MonoDynamicGenericClass' since we only need it for dynamic
3806         types.
3807
3808         * reflection.c (mono_class_bind_generic_parameters): We don't need
3809         to compute the `parent' here.
3810
3811 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
3812
3813         * culture-info-table.h : regenerated.
3814
3815 2005-07-06  Martin Baulig  <martin@ximian.com>
3816
3817         * icall.c
3818         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3819
3820         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3821
3822 2005-07-06  Martin Baulig  <martin@ximian.com>
3823
3824         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3825         we're doing a signature-only comparision; fixes #74945.
3826
3827 2005-07-06  Martin Baulig  <martin@ximian.com>
3828
3829         * class-internals.h (MonoGenericClass): Moved some things out into
3830         a new `MonoInflatedGenericClass' type.  
3831         (MonoInflatedGenericClass): New type; the `klass' of a
3832         `MonoGenericClass' is now computed lazyly in
3833         mono_get_inflated_generic_class().      
3834
3835         * class.c (mono_get_inflated_generic_class): New public function.
3836         (mono_class_inflate_generic_method): Removed the unused
3837         `MonoClass *' argument.
3838         (setup_generic_vtable): Don't call mono_get_inflated_method() on
3839         all the methods.
3840         (mono_class_create_generic): Make this static and merge it with
3841         mono_class_create_generic_2(); we're now called automatically from
3842         mono_get_inflated_generic_class().
3843
3844         * loader.c (mono_method_signature): Call
3845         mono_get_inflated_method() here.
3846
3847 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
3848
3849         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3850         type of fields with RVA.
3851
3852         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3853         for this pseudo class.
3854         (my_mono_class_from_generic_parameter): Likewise.
3855         (mono_class_init): Allow interfaces to have cctors.
3856
3857 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3858
3859         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3860         lazily for AOT methods.
3861
3862 2005-07-05  Martin Baulig  <martin@ximian.com>
3863
3864         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3865         returns FALSE for a successful match, not TRUE.
3866
3867 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3868
3869         * loader.c (mono_method_get_index): Optimize this a bit.
3870
3871 2005-07-04  Martin Baulig  <martin@ximian.com>
3872
3873         * class.c
3874         (class_compute_field_layout): Move the check for generic type
3875         definitions into mono_class_layout_fields().  Fixes #74684.
3876         (mono_class_from_generic_parameter): Correctly compute
3877         `klass->parent'; fixes #75457.
3878
3879         * reflection.c (register_assembly, register_module): Make sure
3880         `domain->rejobject_hash' is already created.
3881
3882 2005-07-02  Martin Baulig  <martin@ximian.com>
3883
3884         * class-internals.h
3885         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3886         `MonoDynamicGenericClass'.      
3887
3888 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
3889
3890         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3891         returned by a field getter is null, since null is a valid value.
3892
3893 2005-07-01  Martin Baulig  <martin@ximian.com>
3894
3895         * reflection.c (mono_reflection_generic_class_initialize): Update
3896         the `dgclass->fields [i].parent' to the correct class.
3897         (mono_image_get_fieldref_token): Use the declaring type, not the
3898         reflected type.
3899
3900 2005-07-01  Martin Baulig  <martin@ximian.com>
3901
3902         * loader.c (find_method): Also look in the interfaces; fixes #75429.
3903
3904 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
3905
3906         * threads.c (thread_cleanup): assert that thread != NULL
3907         (wait_for_tids_or_state_change): We were using the wrong variable
3908         when accessing wait->threads. `i' was always out of the bounds of
3909         the array.
3910
3911 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3912
3913         * loader.c: map user32 and kernel32 to libMonoSupportW
3914
3915 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
3916
3917         * appdomain.c (unload_thread_main): Mark this as WINAPI.
3918
3919 2005-06-28  Martin Baulig  <martin@ximian.com>
3920
3921         * loader.c (method_from_methodspec): Fix #75334.
3922
3923 2005-06-28  Martin Baulig  <martin@ximian.com>
3924
3925         Fix #74953 - Arrays now implement the generic IList<T> interface
3926         on the 2.0 platform.
3927
3928         * class-internals.h (MonoDefaults): Added `generic_array_class'.
3929
3930         * reflection.c (mono_class_bind_generic_parameters): New public
3931         function; similar to mono_reflection_bind_generic_parameters(),
3932         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3933
3934         * domain.c (mono_init_internal): Try to initialize.
3935         `mono_defaults.generic_array_class' here; this'll only succeed if
3936         we're using the 2.0 corlib.
3937
3938         * icall.c
3939         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3940         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3941         (mono_lookup_internal_call): Added support for nested classes.
3942
3943         * loader.c
3944         (mono_get_method_from_token): Set `result->signature->pinvoke' if
3945         we're an interncall and have generic arguments.
3946
3947         * class.c
3948         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3949         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3950         instance of System.Array.InternalArray<T> for arrays, so they
3951         implement the generic IList<T> interface.
3952
3953 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
3954
3955         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3956         (chastamar@yahoo.com). Fixes #75374.    
3957
3958 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
3959
3960         * culture-info-table.h: regenerated.
3961
3962 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3963
3964         * icall.c: handle spaces correctly for base64 strings.
3965
3966 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
3967
3968         * *.c: Kill some warnings.
3969
3970 2005-06-23  Duncan Mak  <duncan@novell.com>
3971
3972         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3973         that this builds on Solaris 10 (x86).
3974
3975 2005-06-23  Martin Baulig  <martin@ximian.com>
3976
3977         * class.c
3978         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
3979         generic type definitions.
3980
3981 2005-06-23  Martin Baulig  <martin@ximian.com>
3982
3983         Fix #75331.
3984
3985         * metadata.c (mono_class_get_overrides): Renamed to
3986         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
3987         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
3988         pass it to mono_get_method_full().
3989
3990 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
3991
3992         * reflection.c (mono_reflection_create_runtime_class): take the
3993         mono_domain_lock in this method. Prevents deadlocks
3994
3995 2005-06-22  Martin Baulig  <martin@ximian.com>
3996
3997         * loader.c (method_from_methodspec): Fix #75330.
3998
3999 2005-06-22  Martin Baulig  <martin@ximian.com>
4000
4001         * reflection.c (type_get_qualified_name): Use
4002         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4003         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4004         argument; use it if we don't have an assembly name.
4005
4006 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
4007
4008         * object.c: In mono_message_init, set "copy out" flag for in
4009         parameters with the [Out] flag.
4010
4011 2005-06-21  Martin Baulig  <martin@ximian.com>
4012
4013         * class.c
4014         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4015         and MONO_TYPE_PTR.
4016
4017 2005-06-21  Martin Baulig  <martin@ximian.com>
4018
4019         * class.c (mono_class_init): Don't initialize `class->fields' for
4020         generic instances since they're initialized again in
4021         compute_field_layout(). 
4022         (compute_field_layout): Set the field's `generic_info' here; fix
4023         #75320. 
4024
4025 2005-06-21  Martin Baulig  <martin@ximian.com>
4026
4027         * class-internals.h
4028         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4029
4030         * metadata.c (mono_metadata_generic_method_equal): Also
4031         distinguish the `generic_class'; fixes #75334.
4032
4033 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4034
4035         * domain.c:
4036         * appdomain.c:
4037         * domain-internals.h:
4038         * reflection.c: 'domain_assemblies' field is now protected by its own
4039         lock. Don't call into managed code to run the AssemblyLoad event if we
4040         now there are no registered delegates for it.
4041
4042 2005-06-20  Martin Baulig  <martin@ximian.com>
4043
4044         * class.c (mono_class_is_assignable_from): Use a custom version of
4045         mono_class_has_parent() to make things work for generic instances;
4046         fix #75300.
4047
4048 2005-06-20  Martin Baulig  <martin@ximian.com>
4049
4050         * loader.c (method_from_methodspec): Apply a patch from
4051         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4052
4053 2005-06-20  Martin Baulig  <martin@ximian.com>
4054
4055         * class.c (mono_class_init): Reverted Zoltan's last change; it
4056         breaks generics.
4057
4058 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
4059
4060         * threads.c (wait_for_tids_or_state_change): Add missing locking.
4061
4062 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4063
4064         * socket-io.c: fix the index in the socket array for writable/error
4065         sockets. Fixes bug #75306.
4066
4067 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
4068
4069         * class.c (mono_class_init): Allow interfaces to have static ctors.
4070
4071 2005-06-17  Martin Baulig  <martin@ximian.com>
4072
4073         * loader.c (method_from_methodspec): Use `context->container' when
4074         parsing the `gmethod->inst'.
4075
4076 2005-06-17  Martin Baulig  <martin@ximian.com>
4077
4078         * class.c (mono_type_get_name_recurse): Don't add the assembly
4079         name for type arguments.
4080
4081 2005-06-15  Martin Baulig  <martin@ximian.com>
4082
4083         * reflection.c (mono_image_get_inflated_method_token): Encode
4084         correct klass; fixes #75260.
4085
4086 2005-06-13 Michal Moskal <malekith@nemerle.org>
4087
4088         * icall.c: Make GetCorrespondingMethod/Constructor take
4089         MonoReflectionMethod method not MonoMethod. Removed
4090         MonoType.GetCorrespondingField, and make
4091         MonoGenericType.GetCorrespondingField take name not
4092         MonoClassField.
4093
4094 2005-06-13  Michal Moskal <malekith@nemerle.org>
4095
4096         * reflection.c (field_encode_signature, encode_locals):
4097          Make sizes of buffers for types larger (for big generic types).
4098          (create_generic_typespec,
4099          mono_reflection_sighelper_get_signature_local,
4100          mono_reflection_sighelper_get_signature_field):
4101          Add asserts for too small buffers.
4102
4103 2005-06-15  Martin Baulig  <martin@ximian.com>
4104
4105         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4106         if our parent is not a dynamic type.
4107
4108 2005-06-15  Martin Baulig  <martin@ximian.com>
4109
4110         * class-internals.h (MonoTypeNameFormat): New enum.
4111
4112         * class.c
4113         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4114         (mono_type_get_full_name): Removed.
4115         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4116         argument instead of the boolean's.
4117
4118         * icall.c (ves_icall_System_MonoType_getFullName):
4119         Added `gboolean assembly_qualified'.    
4120
4121         * reflection.h
4122         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4123
4124         * reflection.c (mono_reflection_parse_type): Parse the new type
4125         name format.
4126
4127 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4128
4129         * icall.c: no need to convert from utf16 to utf8 and then back again
4130         after the call to GetLogicalDrives.
4131
4132 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4133
4134         * icall.c: frombase64. Fix problems exposed by new tests.
4135
4136 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4137
4138         * icall.c: added internal calls for converting char [] and strings in
4139         base64 into byte [].
4140
4141 2005-06-10  Martin Baulig  <martin@ximian.com>
4142
4143         * class.c (mono_class_create_generic_2): Read the nested classes
4144         from the metadata rather than from `gklass->nested_classes' since
4145         `gklass' might not be initialized yet.
4146
4147 2005-06-09  Duncan Mak  <duncan@novell.com>
4148
4149         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4150         all public headers. Fixes #74919.
4151
4152 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
4153
4154         * domain.c: The key for proxy_vtable_hash is now a pointer
4155         array. Added new GHashFunc and GCompareFunc functions for this.
4156
4157         * class.h: The list of interfaces in MonoRemoteClass is known in
4158         advance and can't grow (we create a new MonoRemoteClass if needed),
4159         so now the interface array can be allocated together with
4160         MonoRemoteClass.
4161         
4162         * object.c: Added a new method create_remote_class_key.
4163         Fixed mono_remote_class so it does not depend on
4164         mono_upgrade_remote_class.
4165         Removed extend_interface_array.
4166         Added new method clone_remote_class(), which makes a copy of a remote
4167         class and adds a new interface or class to it.
4168         mono_upgrade_remote_class() now creates a new remote class (or gets
4169         it from the cache) if an vtable upgrade is needed. In this way
4170         we make sure that other objects sharing the same remote class
4171         don't get the new vtable with unwanted interfaces.
4172         
4173         * object-internals.h:
4174         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4175         
4176         * marshal.c: Track changes in mono_upgrade_remote_class().
4177
4178 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
4179         * icall.c: Add runtime methods for obtaining members of inflated
4180         class, which were created from supplied non-inflated members. It
4181         is used in internal Get{Method,Constructor,Field} methods in
4182         System.Type
4183
4184 2005-06-09  Martin Baulig  <martin@ximian.com>
4185
4186         * reflection.c
4187         (mono_reflection_bind_generic_method_parameters): Fix #75169.
4188
4189 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4190         * reflection.c (mono_image_basic_init): Define
4191         Version in MonoDynamicAssembly. 
4192         
4193 2005-06-08  Martin Baulig  <martin@ximian.com>
4194
4195         Fix #75136.
4196
4197         * loader.c
4198         (mono_method_signature_full): New public method; takes a
4199         `MonoGenericContext *'.
4200         (find_method): Use mono_method_signature_full() and pass the
4201         klass'es context to it.
4202
4203         * class.c (mono_class_is_inflated_method): Use
4204         mono_method_signature_full() and pass the context to it.
4205
4206 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4207
4208         * object.c: add proper locking in mono_remote_class_vtable(),
4209         fixes possible memory corruption.
4210
4211 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
4212
4213         * marshal.c (mono_remoting_marshal_init): set
4214         initialized after initialization.
4215
4216 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
4217
4218         * locales.c : hush.
4219
4220 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
4221
4222         * object.c (extend_interface_array): fix really silly
4223         memory corrupting / comparison bug.
4224
4225 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4226
4227         * reflection.c: Functions added to support the creation
4228         of CustomAttributeData, which includes Attribute data
4229         used by ReflectionOnly methods.
4230
4231         * reflection.h:  mono_reflection_get_custom_attrs_data and
4232          mono_custom_attrs_data_construct added (functions exposed).
4233
4234          * icall.c: Added mono_reflection_get_custom_attrs_data
4235          as icall.
4236         
4237 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
4238
4239         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4240         lupus's request.
4241
4242 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
4243
4244         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4245
4246         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4247         dynamic DllImportAttribute.
4248
4249         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
4250         dynamic DllImportAttribute.
4251
4252         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4253         Fixes #75162.
4254
4255 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4256
4257         * threads.c: avoid segfault when an unstarted thread is aborted.
4258
4259 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
4260
4261         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4262         Returns the name and version of the runtime for reporting.
4263
4264 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4265
4266         * appdomain.c: bump corlib version.
4267         * object-internals.h: new field in MonoReflectionAssembly.
4268
4269 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4270
4271         * object-internals.h: Carlos forgot to add this field.
4272
4273 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4274
4275         * icall.c: Added create_version to create instances
4276         of Version of MonoReflectionAssemblyName. This change helps
4277         the AssemblyName tests to keep running fine.
4278         
4279 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
4280   
4281         * object.c (mono_method_return_message_restore): A somehow less
4282         intrusive fix for #75138.
4283
4284 2005-06-03  Raja R Harinath  <rharinath@novell.com>
4285
4286         * object.c (mono_method_return_message_restore): Fix computation
4287         of expected number of out args.
4288
4289 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4290
4291         * reflection.c (mono_image_get_method_info): Fix the case when the
4292         charset is empty.
4293
4294 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
4295
4296         * object.c: Added missing null check in
4297           mono_method_return_message_restore.
4298
4299 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4300
4301         * reflection.c (mono_image_get_method_info): Handle the case when
4302         dllentry is empty.
4303
4304 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
4305
4306         * object.c: When creating the vtable for a proxy, take into account
4307         all inherited interfaces, not only the ones registered in
4308         iclass->interfaces. This fixs bug #74996.
4309         Also, in mono_method_return_message_restore, verify that the array
4310         of out args has the expected lengh.
4311
4312 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4313
4314         * socket-io.c: update the timeout in Poll when the call is interrupte.
4315
4316 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4317
4318         * socket-io.c: support abort/suspend in Select_internal after last
4319         change.
4320
4321 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4322
4323         * threadpool.c: remove warning.
4324
4325 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4326
4327         * icall.c:
4328         * socket-io.[ch]: Select_internal uses poll() now when available, thus
4329         removing the 1024 limit from select(). Runtime part of the fix for
4330         bug #71203.
4331
4332 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4333
4334         * socket-io.c: when resolving the addresses for the same
4335         host returned by gethostname(), get the local IPs from the interface
4336         list. Loopback addresses are discarded if the are interfaces up with
4337         non-loopback ones. Fixes bug #63265.
4338
4339 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
4340
4341         * appdomain.c, verify.c, object-internals.h, reflection.c:
4342         bumped corlib number to 36, and added new extra_flags field
4343         to ReflectionMethodBuilder and friends.  Fixes #75060.
4344
4345 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4346
4347         * gc.c: register a new weak link only if the object is non-null
4348         (fixes bug#75047).
4349
4350 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4351
4352         * culture-info.h : short time pattern too.
4353
4354 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4355
4356         * culture-info.h : expand long time pattern string length.
4357
4358 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4359
4360         * culture-info-table.h : update (more French date format; #72788).
4361
4362 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
4363
4364         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4365         the method is static. Fixes #75029.
4366
4367 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
4368
4369         * reflection.c: Update the table_idx field of method builders after
4370         saving the module, since it can change. This is a workaround for
4371         bug #74914. 
4372
4373 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4374
4375         * culture-info-table.h : update (additional French date format).
4376
4377 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
4378
4379         * icall.c (ves_icall_type_Equals): Revert last change.
4380         
4381         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4382
4383         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4384
4385 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
4386
4387         * class-internals.h: Added executioncontext_class field to 
4388         MonoDefaults structure.
4389         * domain.c: Cache System.Threading.ExecutionContext class in 
4390         mono_defaults.
4391         * object.c: Capture the ExecutionContext for asynchroneous calls in
4392          mono_async_result_new.
4393         * object-internals.h: Added execution_context and original_context 
4394         fields to MonoAsyncResult. Added execution_context to MonoThread.
4395         * security-manager.c|.h: Added mono_get_context_capture_method to 
4396         return the capture method (if required by the security manager or by
4397         the framework version used).
4398         * threadpool.c: Apply capture (if present) ExecutionContext in 
4399         mono_async_invoke and revert to original context after it completes.
4400
4401 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
4402
4403         * culture-info-table.h : updated (real hacky solution for zh-CHT).
4404
4405 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
4406
4407         * culture-info-table.h : zh-CHT related workaround.
4408
4409 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4410
4411         * marshal.c (emit_marshal_custom): Add some error checking and call the
4412         methods in the ICustomMarshaler interface. Fixes #74875.
4413         
4414         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4415         native->managed wrappers.
4416
4417 2005-05-12  Martin Baulig  <martin@ximian.com>
4418
4419         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4420         here and use the loader lock.
4421
4422         * mono-debug.c: Properly lock when the debugger is not attached.
4423         (mono_debug_init): Release the initial lock if we're not running
4424         in the debugger.
4425
4426 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4427
4428         * marshal.c (emit_marshal_custom): Pass through NULL values without
4429         calling the custom marshalling routines.
4430
4431         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4432         conversion in structures. Fixes #74882.
4433
4434 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
4435
4436         * culture-info-table.h : zh-* cultures were missing.
4437
4438 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
4439
4440         * threads.c: Added a new event background_change_event which is signaled
4441         when a thread changes its background mode.
4442         Moved here several checks previously done in managed code. The checks
4443         require the thread lock, and using the thread lock in managed code
4444         can result in deadlocks.
4445         Merged Start_internal and Thread_internal into a single method. Now 
4446         Thread_internal does all work of creating and starting a thread.
4447         Added icalls for setting and getting the state of the object. Moved from
4448         managed code to avoid locking there.
4449         Added wait_for_tids_or_state_change() which is called instad of
4450         wait_for_tids when waiting for non-backround threads to end. This method
4451         will return if one of the threads ends or the background_change_event
4452         is signaled.
4453         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4454         the background mode. This method signals the background_change_event
4455         event.
4456         * icall.c:
4457         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4458         removed Start_internal.
4459         
4460 2005-05-11  Martin Baulig  <martin@ximian.com>
4461
4462         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4463         to order of some fields to get proper alignment on 64-bit machines.
4464
4465 2005-05-11  Martin Baulig  <martin@ximian.com>
4466
4467         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4468         changes as they're broken and completely fuck up the debugger.
4469
4470         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4471
4472 2005-05-10  Martin Baulig  <martin@ximian.com>
4473
4474         * reflection.c (mono_reflection_generic_class_initialize): Don't
4475         call mono_class_setup_parent() here.
4476
4477 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4478
4479         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4480         send/receive timeout use an integer in milliseconds. We were using a
4481         struct timeval.
4482
4483 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4484
4485         * locales.c:
4486         (internal_get_cultures): reserve the first slot of the array for the
4487         InvariantCulture, which will be filled in managed code.
4488
4489 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
4490
4491         * reflection.c (mono_image_fill_module_table): Initialize the
4492         GENERATION field as well.
4493
4494 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4495
4496         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4497         Monitor.Enter on the object.
4498
4499 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
4500
4501         * threads.c: Enable the wait for running threads when exiting.
4502         * icall.c: Suspend all threads before exiting.
4503
4504 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
4505
4506         * assembly.c (mono_assembly_load_reference): Fix warning.
4507
4508 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4509
4510         * threadpool.c: changed the default number of threads per cpu. From now
4511         on, the default will be 20 + (5 * number of cpus) instead of 50.
4512
4513 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
4514
4515         * loader.c (mono_method_get_signature_full): Add locking here.
4516
4517 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
4518
4519         * appdomain.c: Moved methods for parsing and freeing assembly
4520         names to assembly.c.
4521         * assembly.c, domain-internals.h: Created public methods for parsing
4522         assembly names. Fixed mono_assembly_load_with_partial_name:
4523         it now finds the best match, taking into account the version,
4524         token and culture specified in the partial name. Also return
4525         the latest version if no version information is specified.
4526
4527 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4528
4529         * threadpool.c: replace check for SocketAsyncCall class.
4530
4531 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4532
4533         * threadpool-internals.h:
4534         * Makefile.am: added threadpool-internals.h
4535
4536         * threadpool.c: call mono_unhandled_exception on exceptions not handled
4537         that happen in threadpool threads (tested on MS).
4538         (mono_thread_pool_remove_socket): new function that dispatch any pending
4539         AIO call on a socket that is closing. By now only epoll really needs it,
4540         as select/poll wake up when the socket closes.
4541
4542
4543         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4544
4545 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
4546
4547         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4548
4549 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
4550
4551         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4552
4553 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
4554
4555         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4556         has an abort request, convert it into a suspend request.
4557
4558 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
4559
4560         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4561         warning for the usage of `UnmanagedFunctionPointerAttribute' which
4562         is not supported yet.
4563
4564 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4565
4566         * image.c: register assemblies loaded from data (bundles) in the loaded
4567         assemblies hash. Fixes bug #74772.
4568
4569 2005-04-29  Martin Baulig  <martin@ximian.com>
4570
4571         * class.c (mono_type_get_name_recurse): Update to the new naming
4572         schema from the latest .NET 2.x beta2.
4573         (mono_class_setup_vtable_general): If we're a generic instance,
4574         copy the vtable from our generic type definition and inflate all
4575         the methods in it.
4576
4577         * loader.c (find_method): Update to the new naming schema from the
4578         latest .NET 2.x beta2.
4579
4580 2005-04-29  Raja R Harinath  <harinath@gmail.com>
4581
4582         * class.c (mono_class_init): Add a mono_loader_unlock to the
4583         #74734 fix.
4584
4585 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4586
4587         * icall.c (ves_icall_System_Environment_Exit): Remove the 
4588         suspend_all_other_threads () call for the time being, since it can hang.
4589
4590         * threads.c (mono_thread_manage): Similarly, disable the waiting for
4591         the background threads to exit, since it can also hang.
4592
4593         * class.c (mono_class_init): Applied patch from Ankit Jain 
4594         (radical@gmail.com). Avoid pending init errors when a field refers
4595         to a nested class using a typeref. Fixes #74734.
4596
4597         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4598         this for dynamic modules.
4599
4600 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4601
4602         * threads.c: don't wait for threads that are in the process of aborting
4603         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4604         and waiting for background threads to finish. This makes xsp and
4605         mod-mono-server exit without random length delays and/or hangs.
4606
4607 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4608
4609         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4610
4611 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
4612
4613         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4614         dynamic types to prevent infinite loops. Fixes #74727.
4615
4616         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4617         ..._is_assignable_to.
4618
4619 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
4620
4621         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4622
4623 2005-04-25  Martin Baulig  <martin@ximian.com>
4624
4625         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4626
4627         * domain.c
4628         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4629
4630         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4631
4632         * reflection.c (build_compressed_metadata): Set metadata header
4633         version to 2.0.
4634
4635 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4636
4637         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4638         number into an integral and a decimal part. Fixes #70473.
4639
4640         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4641
4642 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
4643
4644         * culture-info-table.h : reflected the latest locale-builder output.
4645
4646 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4647
4648         * threadpool.c: check for SuspendRequested too when deciding if
4649         mono_thread_interruption_checkpoint should be called.
4650
4651 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4652
4653         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4654         * threads.c: remove interruption_mutex and use Interlocked instead. When
4655         suspending all the threads, wait for all the suspended events at once.
4656         If we're shutting down and get an APC that is going to be queued,
4657         call mono_thread_execute_interruption immediately, as the thread might
4658         be sleeping on a pthread condition or mutex.
4659
4660         * icall.c: call mono_runtime_set_shutting_down before suspending the
4661         threads.
4662
4663         Fixes bug #74693. And now xsp is happier when exiting.
4664
4665 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4666
4667         * loader.c (mono_stack_walk): Fix #74690.
4668
4669 2005-04-22  Martin Baulig  <martin@ximian.com>
4670
4671         * mono-debug.h (MonoDebugMethodJitInfo): Added
4672         `MonoDebugMethodJitInfo *jit'.
4673
4674         * mono-debug.c (mono_debug_read_method): Cache the
4675         MonoDebugMethodJitInfo in `address->jit'.
4676         (mono_debug_free_method_jit_info): New public method.
4677
4678 2005-04-22  Martin Baulig  <martin@ximian.com>
4679
4680         * class.c (mono_class_is_assignable_from): Disallow
4681         type parameter -> interface.
4682
4683 2005-04-21  Dick Porter  <dick@ximian.com>
4684
4685         * threads.c (mono_thread_create): Turn an assertion into an error.
4686
4687 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4688
4689         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4690         
4691         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
4692         Fix some gcc 4.0 warnings.
4693
4694 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4695
4696         * file-io.c: fix alt dir separator char on unix systems
4697         and cleanup (fixes bug #71214).
4698
4699 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
4700
4701         * marshal.c: Use CALLVIRT instead of CALL when dispatching
4702         a call to a remote domain, since the method may be an
4703         interface method in the client domain. This fixes bug #74192.
4704
4705 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4706
4707         * threadpool.c: recv/send are now performed before going back to managed
4708         code to save one transition.
4709
4710 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4711
4712         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4713
4714         * metadata/threadpool.c: removed hack to workaround the bug above.
4715
4716         Fixes bug #74618.
4717
4718 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4719
4720         * reflection.c reflection.h: Fix handling of parameter defaults in
4721         dynamic methods. Also fixes handling of parameter attributes.
4722         Fixes #74609.
4723
4724         * mono-debug.c (mono_debug_close_image): Fix warning.
4725
4726 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4727
4728         * socket-io.h: replaced old unused field with new 'blocking'.
4729         * threadpool.c: restore socket blocking state on windows(tm).
4730
4731 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
4732
4733         * icall.c: don't return the codebase in the AssemblyName[] returned by
4734         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4735         * object-internals.h: Removed FIXME (fields were presents) and fixed
4736         versioncompat declaration.
4737
4738 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4739
4740         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4741         not closed, so don't cleanup when it happens.
4742
4743 2005-04-13  Chris Toshok  <toshok@ximian.com>
4744
4745         * mono-debug-debugger.h: change prototype for
4746         mono_debugger_lookup_type.
4747
4748         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4749         this function, although it should probably be named
4750         mono_debugger_init_type.
4751
4752 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4753
4754         * threadpool.c: fix non-AIO case.
4755
4756 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4757
4758         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4759         the built-in profiler to measure just JIT compilation times.
4760
4761 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4762
4763         * threadpool.c: the epollfd might be closed by another thread at
4764         any time, so ignore EBADF at treat it as a "we're closing" sign.
4765
4766 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4767
4768         * threadpool.c: release the semaphores with a count equals to the number
4769         of working threads in both IO and regular pools. Fixed typo that messed
4770         up the count of IO pool threads. Don't initialize the pipe handles if
4771         we're using epoll.
4772
4773 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4774
4775         * threadpool.c: some systems don't like a NULL when deleting the socket
4776         from epoll.
4777
4778 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4779
4780         * threadpool.c: fix semaphore allocation.
4781
4782 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4783
4784         * threadpool.c: added epoll() based implementation for asynchronous IO
4785         that is used instead of the default poll() when available.
4786         It can be disabled by setting MONO_DISABLE_AIO.
4787
4788 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4789
4790         * threadpool.c: windows needs 'closesocket' and instead of returning
4791         0 when the stream is closed while in select, it returns -1. Fixes bug
4792         #74573.
4793
4794 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
4795
4796         * class.c (class_compute_field_layout): Fix the regression caused by
4797         the previous try.
4798
4799 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4800
4801         * threadpool.c: separate pool for socket async. IO.
4802         * threadpool.h: mono_max_worker_threads is not a global any more.
4803
4804 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
4805
4806         * class.c (class_compute_field_layout): Fix #74549.
4807
4808 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4809
4810         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4811         use 2 connected sockets instead.
4812
4813 2005-04-08  Miguel de Icaza  <miguel@novell.com>
4814
4815         * mono-config.c: Add new entry point for mkbundle
4816         mono_config_parse_memory. 
4817
4818 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4819
4820         * threadpool.c: removed another unused function.
4821
4822 2005-04-08  Ankit Jain  <radical@corewars.org>
4823
4824         * reflection.c (get_default_param_value_blobs): Add 'types'
4825         parameter to get the types encoded in the constant table.
4826         (mono_param_get_objects): Use the type from the constant table,
4827         not the type of the parameter, when creating default values.
4828         Handle null default values correctly.
4829
4830 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4831
4832         * file-io.c:
4833         * file-io.h:
4834         * threadpool.c:
4835         * threadpool.h:
4836         * icall.c:
4837         * socket-io.c: removed dead code for async IO.
4838
4839 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4840
4841         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4842
4843         * threadpool.c: intercept socket async. calls and pass them to a thread
4844         that is polling and dispatching the job items to the threadpool as
4845         socket become ready. Fixes bugs #71217, #71933.
4846
4847         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4848         between char and short/ushort arrays.
4849
4850         * socket-io.c: remove dead code.
4851
4852 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4853
4854         * locales.c,
4855           icall.c : removed InternalToUpper_Comp() and
4856           InternalToLower_Comp().
4857
4858 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4859
4860         * char-conversions.h : The tables were incorrectly generated. Should
4861           be generated against invariant culture.
4862
4863 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
4864
4865         * object.c (mono_runtime_invoke_array): Fix return value when 
4866         passing pre-created valuetype objects to ctors.
4867
4868         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
4869         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4870         Fixes #74338.
4871
4872 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
4873
4874         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
4875         only used with --security and hides the wrong corlib version error.
4876
4877 2005-03-30  Joshua Tauberer  <tauberer@for.net>
4878
4879         * class.c: Changed mono_class_name_from_token so that types
4880         outside of a namespace don't have an initial period.  Improved
4881         the g_warning message used in _mono_class_get when loading
4882         fails.
4883         * assembly.c: In mono_assembly_load_reference, when an assembly
4884         can't be found, "No such file or directory" is misleading and
4885         unhelpful because a few paths were checked for the presence of
4886         the assembly.  When that happens (ENOENT), display a nicer
4887         message indicating the directories that were searched.  In all
4888         cases, the warning is made easier to read for non-hackers.
4889
4890 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
4891
4892         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4893         project/solution.
4894         * appdomain.h|domain.c: Removed inline from functions.
4895         * appdomain.c: Reduced warnings when compiling on windows.
4896         * icall.c: Fixed output_debug declaration to gunichar2*.
4897         * mono-config.c: Reduced warnings when compiling on windows.
4898         * rand.c: Added missing "windows.h". Added missing return value.
4899         * rawbuffer.c: Added missing winsock2.h for windows.
4900         * sysmath.h: Added mono-compiler.h header to allow/ease 
4901         compilation with non-GCC compilers.
4902         * threads.c: Fixed declarations to compile with VS.NET C compiler.
4903         Removed cast warnings.
4904
4905         Adapted from the work of J Lothian (for VC6).
4906
4907 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
4908
4909         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4910         from default_path.
4911
4912 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
4913
4914         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4915         the 2.0 profile.
4916
4917 2005-03-27  Raja R Harinath  <harinath@gmail.com>
4918
4919         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
4920         has to be in $(exec_prefix).  $(prefix) is for arch-independent
4921         stuff, and it would probably use $(prefix)/share rather than
4922         $(prefix)/lib.
4923
4924 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4925
4926         * console-io.c: added 2 includes that might be missing.
4927
4928 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
4929
4930         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4931         profile.
4932
4933         * reflection.c (create_custom_attr): Allocate the params array using
4934         alloca so it gets GC tracking.
4935
4936 2005-03-23  Chris Toshok  <toshok@ximian.com>
4937
4938         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4939         out some spew.
4940
4941 2005-03-24  Raja R Harinath  <rharinath@novell.com>
4942
4943         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4944         changes to pick up any changes in prefix, etc.
4945
4946 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4947
4948         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4949         
4950         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4951         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4952
4953 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4954
4955         * class-internals.h object-internals.h class.c reflection.c: Extend the
4956         mono_lookup_dynamic_token () function to return the class of the
4957         token as well. 
4958
4959         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4960         well. Fixes #73848.
4961
4962 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
4963
4964         * security-manager.c: Skip inheritance checks for intra-corlib
4965         class inheritance and method overrides. This skips a lot of checks
4966         and (anyway) permissions cannot work until corlib is loaded.
4967
4968 2005-03-23  Martin Baulig  <martin@ximian.com>
4969
4970         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4971         MONO_TYPE_GENERICINST.  
4972
4973 2005-03-23  Martin Baulig  <martin@ximian.com>
4974
4975         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4976
4977 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4978
4979         * class.c: added locking comments to some functions.
4980         Cache the interface offsets arrays (saves about 20 KB
4981         of runtime memory in a typical app).
4982         Reduce the time overhead in mono_class_setup_supertypes ().
4983
4984 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
4985
4986         * icall.c: speedup and fix leaks in GetMethodsByName and
4987         GetPropertiesByName.
4988
4989 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4990
4991         * reflection.c: some locking fixes.
4992
4993 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4994
4995         * metadata.c: added missing break in case statement.
4996
4997 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
4998
4999         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5000         typedbyref return values. Fixes #73941.
5001
5002 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5003
5004         * security-manager.c|h: Added demandunmanaged method and 
5005         suppressunmanagedcodesecurity class to MonoSecurityManager.
5006         Renamed aptc class to allowpartiallytrustedcallers.
5007
5008 2005-03-17  Martin Baulig  <martin@ximian.com>
5009
5010         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5011
5012 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5013
5014         * file-io.c: disabled file async. IO using aio_*. It uses the
5015         threadpool now. Workaround for bug #73718.
5016
5017 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5018
5019         * assembly.h, mono-config.c: added code to deal with bundled configs
5020         for bundled assemblies.
5021
5022 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5023
5024         * *.c, private.h: cleanup, removing old private.h header file.
5025
5026 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5027
5028         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5029         and throw_on_unmappable_char attributes.
5030
5031 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
5032
5033         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5034         _ProcessName_internal.
5035
5036 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
5037
5038         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5039         #73631.
5040
5041         * icall.c threads.c threads-types.h: Remove slothash icalls as they
5042         are no longer used.
5043
5044 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
5045
5046         * object.c (compute_class_bitmap): Add support for generics. Fixes
5047         #73527.
5048
5049 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5050
5051         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5052
5053 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5054
5055         * filewatcher.c: commented out the code for windows watcher, as we don't
5056         use it (we use the managed implementation instead).
5057
5058 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5059
5060         * object-internals.h (MonoThread): Remove 'unused1' field.
5061
5062         * appdomain.c: Bump corlib version.
5063
5064         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5065
5066         * reflection.c (mono_reflection_create_runtime_class): Remove the
5067         AssemblyBuilder.Save optimization since it causes too many problems.
5068
5069 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
5070
5071         * exception.c|h: Added mono_get_exception_reflection_type_load to
5072         create a ReflectionTypeLoadException object.
5073         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5074         to return NULL is a InheritanceDemand fails during reflection. Updated
5075         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
5076         ReflectionTypeLoadException if an InheritanceDemand fails during 
5077         reflection. Added icall mapping for GetLinkDemandSecurity.
5078         * security-manager.c|h: Added ves_icall_System_Security_
5079         SecurityManager_GetLinkDemandSecurity internal call to return the
5080         class and methods permissions set for a LinkDemand. Removed unused
5081         fields in MonoSecurityManager.
5082
5083 2005-03-10  Martin Baulig  <martin@ximian.com>
5084
5085         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5086         it's a generic instance.
5087
5088 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
5089
5090         * reflection.c (mono_get_object_from_blob): Applied patch from
5091         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5092
5093         * class.c (mono_class_is_assignable_from): Another try at fixing 
5094         #73469 without breaking anything.
5095
5096 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
5097
5098         * class.c: (mono_class_is_assignable_from): Revert the last changes
5099         since they don't work with generics.
5100         
5101         * class.c (mono_class_is_assignable_from): Fix build bustage.
5102
5103         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5104         the managed IsAssignableFrom method. Fixes #73469.
5105
5106         * reflection.c (mono_reflection_call_is_assignable_from): New helper
5107         function.
5108
5109 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
5110
5111         * object.c (mono_load_remote_field_new): Fix returning uninitialized
5112         memory when the remoting callback does not sets the out arguments.
5113         Fixes #73007.
5114
5115         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5116         by mistake.
5117
5118         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5119
5120         * object-internals.h (MonoStackFrame): Sync with managed object layout.
5121
5122         * appdomain.c: Bump corlib version.
5123
5124 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
5125
5126         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5127         function.
5128
5129         * threads.c (mono_thread_attach): Detect threads which are not started
5130         by the GC pthread wrappers.
5131
5132 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
5133
5134         * icall.c: Added new icall for RNG.
5135         * rand.c|h: Added new icall to open the RNG. This allows to share a 
5136         single handle on Linux to access /dev/urandom and fix #73183.
5137
5138 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5139
5140         * object.c: setting the new vtable in a transparent proxy object must
5141         not change the GC descriptor.
5142
5143 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5144
5145         * object.c: fixed compilation without GCJ support.
5146         * reflection.c: for runtime-created types ensure klass->has_references
5147         is correct (bug #73215).
5148
5149 2005-03-02  Martin Baulig  <martin@ximian.com>
5150
5151         * class.c (mono_class_is_assignable_from): Make this work if
5152         `oklass' is a generic instance; fixes #72831.
5153
5154 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5155
5156         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5157         with hasthis set.
5158         
5159         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5160
5161         * marshal.c: Reorganize native->managed marshalling code to also use
5162         the emit_marshal_... functions.
5163
5164 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5165
5166         * object.c: typed allocs have issues with bitmap sizes > 30,
5167         so check for max_set >= 30.
5168
5169 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5170
5171         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5172         managed code. Fixes #73012.
5173
5174         * metadata.h (MonoMarshalSpec): Add elem_mult field.
5175
5176         * metadata.c reflection.c: Load/Emit elem_mult as well.
5177         
5178         * metadata.h (MonoMarshalSpec): Add comment.
5179
5180         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5181
5182         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5183         num_elem to -1 if not given.
5184
5185         * object-internals.h (MonoReflectionMarshal): Add has_size field.
5186
5187         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5188         given values.
5189
5190 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
5191
5192         * null-gc.c (mono_gc_free_fixed): Was not compilable.
5193
5194 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
5195
5196         * reflection.c (encode_marshal_blob): Encode param_num field as well.
5197
5198         * object-internals.h (MonoReflectionMarshal): Add param_num field.
5199
5200 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5201
5202         * object.c: generalized the reference bitmap creation
5203         and added hooks for the new GC.
5204         * class-internals.c: removed the gc_bitmap field from MonoClass.
5205
5206 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5207
5208         * domain.c: help the compiler to produce better code
5209         in mono_jit_info_table_find ().
5210
5211 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5212
5213         * object.c: make all allocations look typed.
5214
5215 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5216
5217         * socket-io.c: load Mono.Posix if it's not loaded already
5218         (fixes bug#73033).
5219
5220 2005-02-24  Martin Baulig  <martin@ximian.com>
5221
5222         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5223         * reflection.c (dup_type): Likewise.
5224
5225 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
5226
5227         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5228         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5229
5230 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5231
5232         * domain.c, threads.c, object-internals.h: make the critical thread
5233         local vars use the fast access mode (even when we're compiled in
5234         a lib). Provide accessors to be used by the jit during codegen.
5235
5236 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5237
5238         * appdomain.c: Changed hook functios behavior to include
5239         support for the reflection only assemblies. Some icalls were changed
5240         to support the mentioned assemblies too. Signatures of static methods
5241         try_assembly_resolve and real_load now have an additional parameter:
5242         refonly.
5243
5244         * assembly.c: General changes to mono_assembly_ methods to support
5245         reflection only api. Functions mono_assembly_open, mono_assembly_load,
5246         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5247         suffix, to support an additional gbool parameter to specify whether
5248         the assembli is reflection only or not. Created some new hook functions 
5249         to add support for reflection only assemblies. Signatures of static 
5250         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
5251         have now an additional parameter: refonly.
5252
5253         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5254         indicating whether the assembly is reflection only or not.
5255
5256         * exception.c: Add mono_get_exception_invalid_operation.
5257
5258         * icall.c: Throw an InvalidOperationException when trying to invoke
5259         a property/method/event, or trying to set/get the value of a field.
5260         Also add an icall to retrieve the ref_only flag to the
5261         MonoReflectionAssembly.
5262
5263 2005-02-23  Chris Toshok  <toshok@ximian.com>
5264
5265         Part of fix for #72827.
5266         * mono-debug.c (mono_debug_add_method): add lexical block data to
5267         the info we write.  Kind of a hack at the moment - we copy the
5268         lexical block info from the MonoDebugMethodInfo to the
5269         MonoDebugMethodJitInfo here, before writing it.
5270         (mono_debug_read_method): read the lexical block info.
5271
5272         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5273
5274         * debug-mono-symfile.h: add lexical block support.
5275
5276         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5277         support.
5278
5279 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5280
5281         * loader.c (mono_lookup_pinvoke_call): Fix warning.
5282
5283         * object.c (mono_runtime_free_method): Call mono_free_method () and
5284         put the TODOs there.
5285
5286         * loader.c (mono_free_method): Free up most memory allocated for 
5287         dynamic methods.
5288
5289 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5290
5291         * reflection.c: properly flag a Type argument to a
5292         named custom attr value (bug #72248).
5293
5294 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5295
5296         * reflection.c: reduce code duplication in named custom
5297         attribute encoding.
5298
5299 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5300
5301         * reflection.c: properly encode custom attrs of type object
5302         (bug #72649).
5303
5304 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5305
5306         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5307
5308 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5309
5310         * socket-io.c: load System.dll if it's not loaded already
5311         (bug #72850 and #70477).
5312
5313 2005-02-21  Martin Baulig  <martin@ximian.com>
5314
5315         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5316         generic instances.
5317
5318 2005-02-21  Martin Baulig  <martin@ximian.com>
5319
5320         * reflection.c (mono_image_build_metadata): We also need to
5321         "fixup" the MethodImpl table after we computed the final method
5322         indices.  Call fixup_methodimpl() to do that.
5323         (fixup_methodimpl): New private method.
5324
5325 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5326
5327         * assembly.c: special case mscorlib.dll (bug#72536),
5328         patch from Carlos Alberto Cortez.
5329
5330 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
5331
5332         * threads-types.h threads.c: Fix build bustage.
5333
5334         * threads.c: Use a union for long<->double conversions.
5335
5336         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5337         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5338
5339         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
5340         containing the checkpoint call with NOT_TAKEN.
5341         
5342         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
5343         checkpoint before pushing the arguments, so they won't have to be
5344         spilled to stack.
5345
5346 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5347
5348         * domain.c, assembly.c, domain-internals.h: make some data
5349         const and relocation-free.
5350
5351 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5352
5353         * object.c, appdomain.c, class-internals.h: introduce the
5354         MonoClassRuntimeInfo structure to hold the info needed to
5355         use a class at runtime. Made mono_class_vtable() lock-free
5356         for all the appdomains.
5357
5358 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5359
5360         * metadata-internals.h, image.c: introduce a per-image mempool to
5361         be used for memory that has the same lifetime as the image.
5362
5363 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
5364
5365         * domain.c: In mono_init_internal(), instead of selecting the first
5366         runtime version supported by an executable, get a list of all
5367         supported versions and select the one for which an mscorlib exists
5368         (since even if the runtime supports a given version, it doesn't mean
5369         that the framework for that version is installed).
5370         Modified get_runtimes_from_exe to support this behavior.
5371         In supported_runtimes, added information about additional system
5372         assembly versions.
5373         
5374         * assembly.c: Added support for more than one system assembly version
5375         per runtime version. Updated the assembly list.
5376         In mono_assembly_remap_version, removed the initial version check,
5377         since we don't know to which version we need to compare until we
5378         get the version set on which the assembly is based.
5379         Moved the code for loading corlib into the new method
5380         mono_assembly_load_corlib(), so it can be used by the initialization
5381         code.
5382         
5383         * domain-internals.h: Updated data structures and added declaration
5384         for mono_assembly_load_corlib.
5385
5386 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5387
5388         * reflection.c (resolve_object): Fix the creation of the signature in 
5389         the SignatureHelper case.
5390
5391         * assembly.c (mono_assembly_remap_version): Fix binary search.
5392         
5393 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
5394  
5395         * class.c: Added inheritance check when a method is overloaded (from a
5396         virtual method or when implementing an interface) and when a class is
5397         inherited. Added functions to set a failure for a class and to 
5398         retreive the exception from a failure.
5399         * class-internals.h: Added fields to MonoClass to keep the exception
5400         information status for inheritance (or other exceptions) to be thrown
5401         later (i.e. not at load time).
5402         * object.c: Throw the inheritance SecurityException when a type is to 
5403         be created with either class or method inheritance violations.
5404         * reflection.c|h: Fix when getting declsec from a class. Removed 
5405         unrequired code for class. Improved sanity in parameter naming.
5406         * security-manager.c|h: Added functions to check for class and method
5407         inheritance.
5408
5409 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5410
5411         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5412         and has_finalize in dynamic types as well.
5413
5414 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
5415
5416         * culture-info-table.h : fixed currency format for en-GB (and so on).
5417
5418 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5419
5420         * gc.c: ensure the GC handles never have 0 as a value.
5421
5422 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5423
5424         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5425         a pointer to a struct to unmanaged code. Fixes #72625.
5426
5427 2005-02-16  Martin Baulig  <martin@ximian.com>
5428
5429         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5430
5431 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5432
5433         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5434
5435 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5436
5437         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5438
5439         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
5440         UnmanagedFunctionPointerAttribute, use it for determining calling convention
5441         etc. Fixes #71471.
5442
5443         * reflection.c (mono_custom_attrs_get_attr): New helper function.
5444
5445         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5446
5447 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5448
5449         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5450         changes to make the current context a field in MonoThread.
5451
5452 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5453
5454         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5455         the last change.
5456         
5457         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5458         extracted from mono_marshal_get_native_wrapper.
5459
5460         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5461         to create wrappers around native functions.
5462
5463         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
5464         delegates for arbitrary function pointers. Fixes #71472.
5465
5466 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5467
5468         * threads.c: cleaned up the code a little.
5469
5470 2005-02-15  Martin Baulig  <martin@ximian.com>
5471
5472         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5473         the data table.
5474
5475         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5476         allocate larger chunks if needed.
5477
5478 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5479
5480         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5481         in by mistake.
5482
5483 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5484
5485         * domain.c: keep the domains in an array and ensure the domain ids
5486         are kept small, so they can be used as indexes to domain-specific data
5487         with a small memory overhead.
5488
5489 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5490
5491         * icall.c: Handle byref types in Type icalls. Fixes #72544.
5492
5493 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5494
5495         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5496
5497 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
5498
5499         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5500
5501         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5502         values.
5503
5504         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5505         
5506 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
5507
5508         * domain-internals.h: add the hashtable here.
5509
5510         * class-internals.h: Remove `info' from MonoMethod
5511
5512         * domain.c: Add a new hashtable, jit_trampoline_hash
5513
5514 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5515
5516         * object.c: don't set the value of static fields
5517         (fixes bug#72494).
5518
5519 2005-02-11  Martin Baulig  <martin@ximian.com>
5520
5521         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5522         (mono_debug_add_method): Silently ignore the method if it's too big.
5523         (mono_debug_add_type): Likewise.
5524
5525 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5526
5527         * threads.c, appdomain.c: remove #ifdefs from the code.
5528
5529 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
5530
5531         * metadata-internals.h: Added flags to MonoAssembly to cache the most
5532         common security informations. This allows us to stay in unmanaged code
5533         when doing LinkDemand and it's special cases (except for the first 
5534         time for initialization). The flags a very much used with --security.
5535         * reflection.c|h: Added code to get declarative security attributes 
5536         for LinkDemand and InheritanceDemand. This required to refactor the
5537         existing code for Demand.
5538         * security-manager.c|h: Added new method fields for the special cases
5539         of LinkDemand.
5540
5541 2005-02-10  Martin Baulig  <martin@ximian.com>
5542
5543         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5544         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5545
5546 2005-02-10  Martin Baulig  <martin@ximian.com>
5547
5548         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5549         debugging code; this is almost a complete rewrite.
5550
5551         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5552
5553 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5554
5555         * domain.c, object.h: expose mono_string_equal () and 
5556         mono_string_hash ().
5557         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5558         it's implemented in managed code.
5559
5560 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5561
5562         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5563         lo leak objects between appdomains.
5564
5565 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5566
5567         * assembly.c: old compilers compilation fix from 
5568         robertj@gmx.net (Robert Jordan).
5569
5570 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
5571
5572         * class-internals.h: Little reminder for the future.
5573
5574         * debug-helpers.c: Fix up wrapper_type_names
5575
5576 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5577
5578         * image.c, metadata-internals.h: when loading an image from a file,
5579         mmap all of it and use the same codepaths as when using a
5580         in-memory image: the code is simpler and we use less memory
5581         (both writable and readonly).
5582
5583 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5584
5585         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5586         API to alloc runtime data structures that need to be tracked by the
5587         GC and contain pointers.
5588         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5589         make the code more readable and eventually use a different GC.
5590
5591 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
5592
5593         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5594         for out arguments.
5595         
5596 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
5597
5598         * object.c: In release_type_locks(), don't release the cctor lock
5599         if it has already been released. This fixes a crash in the
5600         thread5 test.
5601
5602 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5603
5604         * gc.c, marshal.c, icall.c: register a delegate for finalization
5605         only when the native function pointer has been allocated for it.
5606
5607 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5608
5609         * object.c: cleaned up some code, allocate objects that are
5610         pointer free with the atomic malloc variant. Allocate memory
5611         for static data from the mempool if it's pointer-free.
5612         Allocate the bounds array at the end of the array data, when needed.
5613         * object-internals.h, object.h: move a private function in a private
5614         header.
5615         * class.c: handle missing case in tracking references in fields.
5616
5617 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5618
5619         * class.c, class-internals.h: keep track if a type has
5620         reference fields in either the instance or static fields.
5621
5622 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
5623
5624         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5625         and renamed to MonoRuntimeInfo. Added fields to store the expected
5626         framework assembly version. Changed mono_get_framework_version and
5627         mono_get_runtime_version for a single mono_get_runtime_info method.
5628         
5629         * assembly.c: Added method to remap system assembly versions to the
5630         current executing runtime version. Removed old mapping code.
5631         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5632         
5633         * icall.c, reflection.c: Track api changes.
5634
5635 2005-02-06  Miguel de Icaza  <miguel@novell.com>
5636
5637         * loader.c (method_from_memberref): Improve error reporting,
5638         produce the class name instead of the typeref/typedef index. 
5639
5640 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
5641
5642         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5643
5644 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5645
5646         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5647         stdcall and charset name mangling.  Reorganize the code and add
5648         some tracing stuff.
5649
5650 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5651
5652         * monodiet.c: More iters!
5653
5654         * marshal.c: Iter usage.
5655
5656         * icall.c: Iter usage.
5657
5658         * object.c: Use iters.
5659
5660         * debug-helpers.c: More iters
5661
5662 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5663
5664         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5665         under win32.
5666
5667 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5668
5669         * mono-debug-debugger.c: use iters
5670
5671         * class.c, class-internals.h: mono_class_setup_events is static
5672         now
5673
5674         * All callers: use iters
5675
5676 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5677
5678         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5679         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5680
5681 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5682
5683         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5684
5685         * marshal.h: Add prototypes for ldfld/stfld_remote.
5686
5687         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5688         this is called during startup.
5689         
5690 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5691
5692         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5693         MonoThreadsSync struct private in monitor.c. Changed the way
5694         MonoThreadsSync is allocated so it's faster and there is no
5695         need to keep track of it with a finalizer and it uses less memory.
5696         This also finally allows us to allocate mono objects as ptrfree when
5697         there are no reference fields.
5698
5699 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5700
5701         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5702         disappearing link to the GC interface and use them to simplify
5703         the gchandles code.
5704
5705 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5706
5707         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5708         stfld_remote which call mono_load/store_field_new. This allows methods
5709         calling ldfld/stfld wrappers to be AOTed.
5710
5711         * console-io.c: Include sys/filio.h under solaris.
5712         
5713         * console-io.c: Include curses.h if needed correctly.
5714
5715 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5716         
5717         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5718         method->klass as well.
5719
5720         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5721
5722         * class.c (mono_class_init): Switch on lazy initialization of 
5723         methods.
5724
5725         * class.c (mono_class_get_finalizer): Handle the case when the 
5726         finalizer is inherited.
5727
5728 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5729
5730         * console-io.c: <curses.h> is needed by term.h on solaris.
5731
5732 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
5733
5734         * icall.c, class-internals.h, monodiet.c, class.c: Remove
5735         mono_class_setup_properties where possible. Remove this ftn from
5736         the header file, and make it static.
5737
5738 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5739
5740         * loader.c: Add missing setup_... call.
5741
5742         * class.c: Add missing setup_... calls.
5743
5744         * class.c (mono_class_init): Switch on lazy initialization of 
5745         the generic vtable.
5746         
5747         * class.c (mono_class_init): Fix generics broken by the recent changes.
5748
5749         * monodiet.c (handle_type): Add missing setup_... calls.
5750
5751         * class.c: Back out garbage in previous patch.
5752         
5753         * class.c: Add missing setup_... calls.
5754
5755         * class.c (mono_class_get_method_from_name_flags): Avoid calling
5756         mono_class_setup_methods () if possible.
5757
5758         * class-internals.h (MonoClass): Add 'has_cctor' flag.
5759
5760         * class-internals.h (MonoCachedClassInfo): New structure.
5761
5762         * class.c: Initialize properties and events fields of MonoClass lazily.
5763
5764         * class.c: Add infrastructure for lazily initializing the methods and
5765         vtable fields of MonoClass. Not yet used.
5766
5767         * class.c (mono_class_get_finalizer): New helper function.
5768
5769         * class.c: Add infrastructure for loading some class related data from
5770         an AOT file.
5771
5772         * object.c: Add infrastructure for initializing the vtable from data
5773         in the AOT file.
5774
5775         * gc.c (run_finalize): Use mono_class_get_finalizer ().
5776
5777         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5778         appropriate initialization function before accessing parts of the
5779         MonoClass structure.
5780
5781         * marshal.c: Fix warnings.
5782         
5783         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5784
5785         * mono-debug-debugger.c (get_exception_message): Use 
5786         mono_class_get_method_from_name_flags ().
5787
5788 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
5789
5790         * reflection.c, appdomain.c: Replace a few manual searches that
5791         Zoltan missed. (Paolo approved this part of my initial patch).
5792
5793 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5794
5795         * profiler.c: disable recording statistical events at report time.
5796
5797 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5798
5799         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5800         to byteswap arrays of enum values, too (bug #72080).
5801
5802 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
5803
5804         * appdomain.c (set_domain_search_path): Allow this to be called if
5805         domain->setup is not yet set.
5806
5807         * loader.c (mono_method_get_index): New helper function.
5808
5809         * loader.c reflection.c: Use mono_method_get_index ().
5810
5811         * class.c (mono_class_get_method_from_name_flags): New helper method.
5812
5813         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5814         this.
5815
5816         * class.c (mono_class_get_cctor): New helper method.
5817
5818         * string-icalls.c object.c class.c marshal.c reflection.c: Use
5819         mono_class_get_method () to look up methods.
5820
5821 2005-02-01  Miguel de Icaza  <miguel@novell.com>
5822
5823         * console-io.c: Fix the build, this should work on Windows.
5824
5825 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
5826
5827         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5828         be set to null to keep things valid
5829
5830 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5831
5832         * icall.c: added Console 2.0 icalls.
5833         * Makefile.am: added console-io.[ch]
5834         * console-io.[ch]: internal calls for Console 2.0 API.
5835
5836 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5837
5838         * class.c: make sure we consider all the interfaces
5839         when calculating max_interface_id (bug found by
5840         Jeroen Frijters running ikvm).
5841
5842 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
5843
5844         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5845         valuetype fields to null.
5846
5847         * object.c (set_value): Ditto. Fixes #71669.    
5848
5849 2005-01-31  Martin Baulig  <martin@ximian.com>
5850
5851         * metadata.c (mono_metadata_has_generic_params): New public
5852         function; checks whether something is a generic method.
5853
5854 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5855
5856         * appdomain.c: fix infinite recursion when adding assemblies.
5857
5858 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
5859
5860         * object.c: Fix small typo to return all items for Environment.
5861         GetCommandLineArgs.
5862
5863 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5864
5865         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5866         reflection.c: more domain and assembly-unload related fixes
5867         and memory leaks plugs.
5868
5869 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
5870
5871         * 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.
5872
5873 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
5874
5875         * loader.c (mono_method_signature): Make this method lazy
5876         (mono_get_method_from_token): Don't computate the signature here.
5877
5878         Doing this saves quite a bit of memory. I got 90 kb on starting up
5879         monodoc. It should also save some disk reads on startup.
5880
5881         * *: MonoMethod->signature might be NULL now. You *MUST* use
5882         mono_method_signature.
5883
5884 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
5885
5886         * object.c (mono_runtime_get_main_args): Return an array from the
5887         current domain here. Fixes #71938.
5888
5889 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5890
5891         * monitor.c: formatting changes to comply with the
5892         mono coding style and remove #ifdefs from the code.
5893
5894 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5895
5896         * metadata.c, private.h: remove some unneeded data
5897         and use a more compact representation for table schemas.
5898
5899 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5900
5901         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5902         to get a better distribution in hash tables.
5903         * *.c: use mono_aligned_addr_hash() where appropriate.
5904         * assembly.c: make var static.
5905
5906 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
5907
5908         * domain-internals.h: Put MonoJitInfo on a diet.
5909
5910         * domain.c: Fix a warning.
5911
5912 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5913
5914         * gc.c: rework the gc handles code to reuse handles
5915         when freed.
5916
5917 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5918
5919         * domain.c: fixed long standing bug in mono_string_equal() which
5920         was brought to light with the ldstr changes.
5921
5922 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
5923
5924         * reflection.c: Remove warning by adding missing include for marshal.h
5925
5926 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5927
5928         * domain.c, object.c: change the ldstr_table to hold
5929         MonoString* as keys: makes the runtime isinterned lookup
5930         faster and simplifies memory management.
5931
5932 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
5933  
5934         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5935         possible to add imperative security checks before calling the icall.
5936         * reflection.c: Return security attributes on the original MonoMethod
5937         (and not the wrapped one). This fix permissions on icalls.
5938
5939 2005-01-25  Dick Porter  <dick@ximian.com>
5940
5941         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5942         the check for mktime() support actually test the mktime() return
5943         value.  "Fixes" bug 71682, though the output is still different to
5944         MS.
5945
5946 2005-01-25  Martin Baulig  <martin@ximian.com>
5947
5948         * class.c (mono_class_is_assignable_from): Make this work for
5949         generic instances.
5950
5951 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
5952
5953         * marshal.c (mono_string_utf8_to_builder)
5954         (mono_string_builder_to_utf16): We might not have ownership of the
5955         string. In thise case, we need to create a new buffer.
5956
5957         * object-internals.h (mono_stringbuilder_capacity): sb->str might
5958         be null, in which case, use the default capacity.
5959
5960 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5961
5962         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5963         GC events to the profiler.
5964
5965 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5966
5967         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5968         if you don't want the GC to run.
5969
5970 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5971
5972         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5973         start providing a GC API and keeping different implementations in
5974         their own file.
5975         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5976
5977 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
5978
5979         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
5980         mmap rather than allocating a huge buffer.
5981         (mono_debug_close_mono_symbol_file): Free the buffer allocated
5982         above.
5983
5984 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
5985
5986         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
5987         and CheckExecutionRights.
5988         * reflection.c|h: Keep the index of the declarative security to be 
5989         used, instead of the pointer, when AOT compiler is used. Also add 
5990         class initialization when requesting demands.
5991         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
5992         CheckExecutionRights. Both properties are now FALSE by default, and
5993         unmodifiable, unless the --security option is used.
5994
5995 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5996
5997         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
5998         reflection.c: properly refcount images and assemblies, many leaks fixed.
5999
6000 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6001
6002         * threadpool.c: increase the timeout for threads in the thread pool to
6003         10s.  Fixes bug #67159.
6004
6005 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
6006
6007         * class-internals.h: Sun's compiler insists on explicit
6008         signed on bit fields to handle then correctly.
6009
6010 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
6011
6012         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6013         Make the size of the array fit only the number of invalid path
6014         chars that we have.
6015
6016         * class.c (_mono_class_get): Improve the error reporting when a
6017         class referenced is not found, to assist debugging. 
6018
6019 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6020
6021         * threads.c: fix off-by-one error.
6022         * domain.c: free data allocated in the domain.
6023
6024 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6025
6026         * reflection.c (mono_method_body_get_object): Fill out exception info
6027         as well.
6028
6029         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
6030         structure.
6031         
6032 2005-01-19  Martin Baulig  <martin@ximian.com>
6033
6034         * loader.c (mono_get_method_constrained): Make this work again.
6035
6036 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6037
6038         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
6039         guint16 to match the managed side.
6040
6041         * reflection.c (mono_reflection_body_get_object): Fill out local
6042         variables array.
6043
6044         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6045         as well.
6046
6047         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6048         'local_var_sig_token'.
6049
6050 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
6051
6052         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
6053         System.Drawing.
6054
6055         * reflection.c (mono_method_body_get_object): Handle abstract and
6056         runtime methods.
6057
6058 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6059
6060         * marshal.c, loader.c, class-internals.h, reflection.c:
6061         store the emthod data for a wrapper in an array instead of a list.
6062
6063 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6064
6065         * marshal.c: change the code to allocate memory more
6066         conservatively for method wrappers.
6067
6068 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6069
6070         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6071         fields from MonoClass to the marshal info structure where they belong.
6072
6073 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6074
6075         * class.c, object.c, class-internals.h, marshal.c: rearrange
6076         some fields and tweak some types to lower memory usage.
6077
6078 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
6079
6080         * threads.c (signal_thread_state_change): Handle the case when the
6081         target thread is the current thread.
6082
6083         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6084
6085         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
6086         emit_ptr_to_object_conv. 
6087
6088         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6089         marshalling. Fixes #71352.
6090
6091 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6092
6093         * metadata.h, blob.h: move table enum to blob.h so it can be included
6094         in any header.
6095         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6096         cut the size of MonoImage/MonoDynamicImage.
6097
6098 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
6099
6100         * profiler.c (mono_profiler_install_simple): Fix default arguments.
6101
6102 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6103
6104         * reflection.c, reflection.h, icall.c: add a function to check
6105         if an attribute type is defined for a metadata object.
6106
6107 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
6108
6109         * object-internals.h: Added some needed fields from StringBuilder class.
6110         * marshal.c: Set the maxCapacity when creating a StringBuilder.
6111
6112 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
6113
6114         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6115         threads before shutting down the runtime.
6116
6117         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6118
6119 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6120
6121         * object-internal.h, threads.c: implement stacksize and 
6122         parameterized thread start functionality (requires
6123         matching corlib). Marked broken code for later removal.
6124
6125 2005-01-12  Martin Baulig  <martin@ximian.com>
6126
6127         * class-internals.h (MonoGenericClass): Moved the `initialized'
6128         flag to MonoDynamicGenericClass, removed `init_pending'.
6129         (MonoGenericInst): Added `is_reference' flag.
6130
6131 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
6132
6133         * reflection.c (mono_image_create_pefile): Only set the pe_offset
6134         inside the MSDOS header. Fixes #71201.
6135
6136         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6137         gc thread.
6138         (mono_domain_finalize): Ditto.
6139
6140 2005-01-12  Martin Baulig  <martin@ximian.com>
6141
6142         * class.c (mono_get_shared_generic_class): Use the cache for
6143         non-dynamic generic classes.
6144
6145         * class-internals.h (mono_class_create_generic_2): Removed
6146         function prototype, this function is now static inside class.c.
6147
6148         * class.c (mono_class_create_generic_2): Made this static, only
6149         call it from mono_class_init() and mono_class_setup_parent().
6150         (collect_implemented_interfaces_aux): Call mono_class_init() on
6151         the interfaces we collect.
6152         (mono_class_setup_vtable): Call mono_class_init (class->parent).
6153
6154 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6155
6156         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6157         it a real thread handle.
6158
6159         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
6160         MonoJitExceptionInfo, since each catch clause needs its own variable.
6161         
6162 2005-01-11  Dick Porter  <dick@ximian.com>
6163
6164         * image.c (mono_pe_file_open): New variant on mono_image_open()
6165         that does not set up the CLI metadata; used for FileVersionInfo so
6166         it can get the data for windows binaries too.
6167         
6168         * process.c (process_read_string_block): Don't read off the end of
6169         the StringTable block.
6170
6171         These both fix bug 70766.
6172
6173 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6174
6175         * gc.c: set some fields to NULL at GC cleanup time.
6176         * threads.c: if we quit the main thread, call exit ().
6177
6178 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6179
6180         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6181
6182 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6183
6184         * threads.h, threads.c, object.c: added accessor and settor for
6185         main_thread. Handle it specially when exiting from it: wait
6186         for other foreground threads to exit.
6187
6188 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6189
6190         * process.c, verify.c: remove some bloat.
6191
6192 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
6193
6194         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6195         the calling convention to cdecl under win32.
6196
6197 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
6198
6199         * object.c (mono_object_get_size): New function to get the size of
6200         an object instance.
6201
6202         * profiler.c (simple_allocation): Use above.
6203
6204 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
6205
6206         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6207         ves_icall_System_AppDomain_getRootDomain (as it's not required to
6208         get an appdomain by it's id and we can't assume the root's id is 0).
6209         * domain-internals.h: Change the function prototype to match.
6210         * icall.c: Change the icall table for AppDomain.
6211
6212 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
6213
6214         * locales.c (string_invariant_compare_char): Only compute
6215         GUnicodeTypes in the case where we need them.  Test for ordinality
6216         first and return if so.
6217
6218         From the commit:
6219
6220                 /*
6221                  * FIXME: here we must use the information from c1type and c2type
6222                  * to find out the proper collation, even on the InvariantCulture, the
6223                  * sorting is not done by computing the unicode values, but their
6224                  * actual sort order.
6225                  */
6226
6227 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6228
6229         * loader.c: for P/Invoke methods, allow the "Internal" shared
6230         library name to refer to the calling process symbol namespace.
6231
6232 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
6233
6234         * Makefile.am: Add the security manager to the build.
6235         * security-manager.c|h: New. Initialization of the security manager.
6236
6237 2005-01-07  Dick Porter  <dick@ximian.com>
6238
6239         * threads.c: 
6240         * monitor.c: Update thread state during Monitor and WaitHandle
6241         waits.  Fixes bug 71031.
6242
6243 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
6244
6245         * reflection.c (property_encode_signature): Correctly handle when the
6246         property has no methods.
6247
6248 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
6249
6250         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6251         
6252         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6253         fields from mb, not rmb. Fixes #71017.
6254
6255         * marshal.c (emit_ptr_to_str_conv): Add support for 
6256         ByValTStr -> string conversion. Fixes #71015.
6257
6258         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6259
6260         * mempool.c (mono_mempool_contains_addr): New helper function.
6261
6262 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6263
6264         * metadata.c (mono_metadata_compute_size): Fix size calculation of
6265         HasSematics encoded fields.
6266         
6267         * metadata.c (mono_type_to_unmanaged): Improve error message for 
6268         invalid string marshalling.
6269
6270         * metadata.c: Fix warnings.
6271         
6272 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6273
6274         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6275         profiler support.
6276
6277 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6278
6279         * domain.c object.c domain-internals.h: Revert part of r38077 since the
6280         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6281         tests.
6282
6283 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
6284
6285         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6286         so methods containing these can be AOTed.
6287
6288 2005-01-03  Martin Baulig  <martin@ximian.com>
6289
6290         * loader.c (find_method): Removed the hack for generic instances.
6291         (method_from_memberref): If our parent is a generic instance, pass
6292         its generic type definition to find_method() and then inflate the
6293         method.
6294         (mono_get_method_constrained): Pass the generic type definition to
6295         find_method() and inflate the method later.
6296
6297         * class-internals.h (MonoStats): Added `generic_class_count'.
6298
6299         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6300         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6301
6302         * reflection.c (mono_custom_attrs_from_params): Don't ignore
6303         generic type definitions.
6304
6305 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
6306
6307         * loader.c icall.c: Fix warnings.
6308
6309 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
6310
6311         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6312         blittable types. Fixes #70864.
6313
6314 2004-12-29  Martin Baulig  <martin@ximian.com>
6315
6316         * icall.c
6317         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6318
6319         * reflection.c (mono_method_get_object): Create a
6320         "System.Reflection.MonoGenericMethod" for inflated methods; don't
6321         call mono_get_inflated_method().
6322
6323         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6324
6325 2004-12-27  Martin Baulig  <martin@ximian.com>
6326
6327         * class-internals.h (MonoMethod): Added `is_inflated' flag.
6328         (MonoMethodInflated): Added `inflated' field.
6329
6330         * class.c (mono_class_inflate_generic_method): Don't really
6331         inflate the method here; just set the `is_inflated' flag in the
6332         MonoMethod.
6333         (mono_class_get_inflated_method): Actually inflate the method here
6334         if it's not already inflated; we use the MonoMethodInflated's new
6335         `inflated' field as a cache.
6336
6337 2004-12-26  Martin Baulig  <martin@ximian.com>
6338
6339         * class.c
6340         (inflate_generic_class): Moved some code out of inflate_generic_type().
6341         (mono_class_inflate_generic_method): If we're already inflated,
6342         inflate the context and use the declaring method; ie. make sure
6343         the declaring method of an inflated method is always the generic
6344         method definition.
6345         (mono_class_create_from_typedef): Create
6346         `class->generic_container->context->gclass'.
6347
6348 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
6349
6350         * metadata-internals.h, marshal.c, reflection.c: More
6351         MonoGHashTable->GHashTable.
6352
6353         * domain-internals.h, class.c: Change MonoGHashTable's into
6354         GHashTables for some cases where no gc stuff is used
6355
6356         All users: update apis
6357
6358 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
6359
6360         * metadata.c (builtin_types): Make this `const'. Makes this get
6361         put into the shareable section.
6362         (mono_metadata_init): Casts to make gcc happy.
6363
6364 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
6365
6366         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6367
6368 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
6369
6370         * icall.c: Added an internal call to retrieve the position and length
6371         of assembly-level declarative security attributes (RequestMinimum, 
6372         RequestOptional and RequestRefuse). This is used by the Assembly class
6373         to re-create the corresponding permission sets.
6374
6375 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6376
6377         * marshal.c: fix the stelemref wrapper to be type correct
6378         (and faster).
6379
6380 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6381
6382         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6383         to do key & 0x7fffffff. Hashtable already does this. It just
6384         results in longer code.
6385
6386 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
6387
6388         * appdomain.c: Bump corlib version.
6389         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6390         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6391         * reflection.c|h: Add functions to get declarative security infos
6392         (blob position and length) for assemblies, classes and methods.
6393
6394 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6395
6396         * reflection.c: sort the constant table (bug #70693).
6397
6398 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6399
6400         * object-internals.h, threads.c, domain.c: add accessors for
6401         the MonoThread and MonoDomain tls keys.
6402
6403 2004-12-18  Martin Baulig  <martin@ximian.com>
6404
6405         * class.c (inflate_generic_type): If we're inflating a generic
6406         instance, set `ngclass->context->container = context->container';
6407         ie. the container we inflated into.
6408
6409         * metadata.c (mono_metadata_parse_generic_param): Reflect above
6410         inflate_generic_type() changes.
6411
6412 2004-12-17  Martin Baulig  <martin@ximian.com>
6413
6414         * class-internals.h
6415         (MonoGenericClass): Replaced `MonoType *generic_type' with
6416         `MonoClass *generic_class'.  Removed `dynamic_info'; if
6417         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6418         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6419
6420 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
6421
6422         * exception.c (mono_exception_from_token): New helper function.
6423
6424 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
6425
6426         * assembly.c (mono_assembly_load_with_partial_name): Call 
6427         mono_assembly_loaded before invoking the preload hooks. Fixes
6428         #70564.
6429
6430         * object-internals.h (MonoThread): Change culture_info and 
6431         ui_culture_info into an array.
6432
6433         * threads.c: Cache culture info objects from more than one appdomain.
6434
6435         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
6436         current UI culture.
6437
6438 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
6439
6440         * threads.h threads.c appdomain.c: Clear the culture_info field of
6441         all threads during unloading if they point to an object in the dying
6442         appdomain.
6443
6444 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
6445
6446         * culture-info.h (TextInfoEntry): New struct
6447         * object-internals.h: sync with managed
6448         * locales.c: fill the `text_info_data' field
6449         * culture-info-tables.h: update
6450
6451 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6452
6453         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6454         collector.
6455
6456 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
6457
6458         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6459         (ves_icall_ModuleBuilder_getMethodToken): Ditto
6460
6461 2004-12-12  Martin Baulig  <martin@ximian.com>
6462
6463         * mono-debug-debugger.c (write_type): If we're an enum and the
6464         builtin types have already been initialized, call mono_class_init().
6465
6466 2004-12-11  Martin Baulig  <martin@ximian.com>
6467
6468         * metadata.c (mono_metadata_load_generic_params): Added
6469         `MonoGenericContainer *parent_container' argument; automatically
6470         compute `container->is_method'; pass the correct owner to
6471         get_constraints().      
6472
6473         * reflection.c (compare_genericparam): Sort the GenericParam table
6474         according to increasing owners. 
6475
6476 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6477
6478         * profiler.c: allow disabling the default profiler.
6479
6480 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6481
6482         * decimal.c, icall.c: allow disabling System.Decimal support.
6483
6484 2004-12-09  Marek Safar <marek.safar@seznam.cz>
6485
6486         * reflection.c: Add support for null attribute arguments.
6487
6488 2004-12-09  Martin Baulig  <martin@ximian.com>
6489
6490         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6491         names to get rid of compiler warnings.
6492
6493 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6494
6495         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
6496         mono_marshal_load_type_info (). Fixes #69625.
6497         (mono_marshal_get_ptr_to_struct): Likewise.
6498
6499 2004-12-08  Martin Baulig  <martin@ximian.com>
6500
6501         * mono-debug.h: Bumped version number to 47.
6502
6503         * mono-debug-debugger.c
6504         (mono_debugger_event_handler, mono_debugger_event): Take two
6505         guint64 arguments insteed of a gpointer and a guint32.  
6506
6507 2004-12-08  Martin Baulig  <martin@ximian.com>
6508
6509         * debug-mono-symfile.h
6510         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6511         `address' to `native_offset'.
6512
6513 2004-12-08  Martin Baulig  <martin@ximian.com>
6514
6515         * class.c (mono_class_create_from_typespec): Only inflate if we
6516         either have `context->gclass' or `context->gmethod'.
6517
6518 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6519
6520         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6521
6522         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6523
6524         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6525
6526         * reflection.c (mono_assembly_get_object): Remove the workaround put
6527         in for the release.
6528         
6529         * appdomain.c: Use the corlib_internal field from MonoAssembly.
6530
6531         * appdomain.c: Bump corlib version.
6532
6533         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6534         be visible in other appdomains.
6535
6536 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
6537
6538         * threads.c: Interlocked inc and dec for longs were messed up,
6539         use a KISS based impl for this. Fixes 70234
6540
6541 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
6542
6543         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6544
6545 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6546
6547         * icall.c: fix to follow policy not to allow struct
6548         arguments in icalls.
6549
6550 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6551
6552         * process.c: make the patch that handles spaces in file paths work
6553         on mono/windows too.
6554
6555 2004-12-06  Martin Baulig  <martin@ximian.com>
6556
6557         * class.c (mono_class_create_generic): Call
6558         mono_class_setup_supertypes() if we're dynamic.
6559         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6560
6561 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
6562
6563         * object-internals.h: Add new fields to MonoThread.
6564
6565         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6566
6567         * icall.c threads-types.h threads.c: Add new icalls.
6568
6569         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6570
6571         * object-internals.h (MonoReflectionAssembly): Sync object layout with
6572         managed side.
6573
6574         * appdomain.c: Bump corlib version.
6575
6576         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6577         internal assemblies. Fixes #69181.
6578
6579 2004-12-05  Martin Baulig  <martin@ximian.com>
6580
6581         * class.c (mono_class_inflate_generic_signature): Make this a
6582         no-op if `context' is NULL or we don't have any type parameters;
6583         also copy `sentinelpos'.        
6584
6585 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
6586
6587         * image.c: Add unbox_wrapper_cache.
6588
6589         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6590
6591         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6592         function generator.
6593         
6594         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6595         Fixes #70173.
6596
6597         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6598         
6599 2004-12-04  Martin Baulig  <martin@ximian.com>
6600
6601         * loader.c (mono_method_get_signature_full): New public function;
6602         like mono_method_get_signature(), but with an additional
6603         `MonoGenericContext *' argument.
6604
6605         * class.c (mono_class_inflate_generic_signature): Formerly known
6606         as inflate_generic_signature(); make this public.
6607
6608 2004-12-04  Martin Baulig  <martin@ximian.com>
6609
6610         * metadata.c
6611         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6612         instead of a `MonoGenericContainer *'.  
6613         (mono_metadata_parse_array_full): Likewise.
6614         (mono_metadata_parse_signature_full): Likewise.
6615         (mono_metadata_parse_method_signature_full): Likewise.
6616         (mono_metadata_parse_generic_inst): Likewise.
6617         (mono_metadata_parse_generic_param): Likewise.
6618         (mono_metadata_parse_mh_full): Likewise.
6619         (mono_type_create_from_typespec_full): Likewise.
6620
6621 2004-12-03  Martin Baulig  <martin@ximian.com>
6622
6623         * class-internals.h (MonoGenericContainer): Replaced the
6624         `MonoGenericContext * pointer with a `MonoGenericContext'
6625         structure and made it the first element.
6626
6627 2004-12-03  Martin Baulig  <martin@ximian.com>
6628
6629         * class.c
6630         (inflate_generic_type): Set the `context->container' when creating
6631         a new MonoGenericContext.
6632         (mono_class_inflate_generic_method): Likewise.
6633         (mono_class_create_from_typespec): Just use `context->container'
6634         to get the container.
6635
6636         * loader.c (method_from_methodspec): Set `context->parent' from
6637         `context->container' - and if that's a method container, use its
6638         parent.  Also set the `context->container' when creating a new
6639         MonoGenericContext.
6640         (mono_get_method_from_token): Use just `context->container' to get
6641         the container.
6642
6643         * metadata.c (do_mono_metadata_parse_generic_class): Also set
6644         `gclass->context->container'.
6645
6646         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6647         the `context->container' when creating a new MonoGenericContext.
6648
6649 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
6650
6651         * reflection.c (compare_genericparam): Sort params with identical
6652         owner by their number. Fixes gen-111 on sparc.
6653
6654 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6655
6656         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6657         around the domain changes.
6658
6659         * appdomain.c (mono_domain_unload): Handle the case when the thread
6660         calling Unload is itself being aborted during unloading. Fixes #70022.
6661
6662         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6663
6664         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
6665         checkpoint_func as an icall so it gets a wrapper.
6666         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6667         in the cross-appdomain wrappers too.
6668
6669         * threads.c (mono_thread_has_appdomain_ref): Make this public.
6670
6671         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6672
6673         * reflection.c: Fix some memory leaks.
6674         
6675 2004-12-02  Martin Baulig  <martin@ximian.com>
6676
6677         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6678
6679         * metadata.c (generic_class_cache): New static hashtable.
6680         (mono_metadata_lookup_generic_class): New public method.
6681
6682 2004-12-02  Martin Baulig  <martin@ximian.com>
6683
6684         * class.c (mono_class_create_from_typedef): Call
6685         mono_class_setup_parent() and mono_class_create_mono_type() before
6686         parsing the interfaces.
6687
6688 2004-12-02  Martin Baulig  <martin@ximian.com>
6689
6690         * metadata.c (generic_inst_cache): New static hashtable.
6691         (mono_metadata_lookup_generic_inst): New public function.
6692         (mono_metadata_inflate_generic_inst): New public function.
6693         (mono_metadata_parse_generic_inst): New public function.
6694         (do_mono_metadata_parse_generic_class): Use the new
6695         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6696         since this'll also use the cache.
6697
6698         * reflection.c (mono_reflection_bind_generic_method_parameters):
6699         Use mono_metadata_lookup_generic_inst() to use the new cache.
6700
6701         * class.c (inflate_mono_type): Use
6702         mono_metadata_inflate_generic_inst() to inflate a generic
6703         instance; this'll also use the new cache.
6704
6705         * loader.c (method_from_methodspec): Use
6706         mono_metadata_parse_generic_inst() and
6707         mono_metadata_inflate_generic_inst() rather than parsing it
6708         manually, so we can use the new cache.
6709
6710 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6711
6712         * threads.c (wait_for_tids): Do not incorrectly free threads when 
6713         the wait times out.
6714
6715 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6716
6717         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6718         iter->args based on whether parameters are passed in registers (i.e.
6719         MONO_ARCH_REGPARMS is defined)
6720
6721 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
6722
6723         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6724         the exception message. Fixes #70070.
6725         (method_from_methodspec): Fix warnings.
6726
6727 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6728
6729         * process.c: (complete_path) return the path quoted
6730
6731 2004-12-01  Martin Baulig  <martin@ximian.com>
6732
6733         * class-internals.h (MonoGenericInst): New structure.
6734         (MonoGenericClass): Replaced `type_argc', `type_argv' and
6735         `is_open' with `MonoGenericInst *inst'.
6736         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6737         `is_open' with `MonoGenericInst *inst'.
6738
6739 2004-11-30  Martin Baulig  <martin@ximian.com>
6740
6741         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6742
6743         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6744         to `generic_class_cache'.
6745
6746         * metadata.c
6747         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6748         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6749         (mono_generic_inst_is_valuetype): Renamed to
6750         mono_generic_class_is_valuetype().
6751
6752         * class-internals.h
6753         (MonoGenericInst): Renamed to MonoGenericClass.
6754         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6755         (MonoClass): Renamed `generic_inst' to `generic_class'.
6756         (MonoGenericContext): Renamed `ginst' to `gclass'.
6757
6758         * object-internals.h
6759         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6760
6761         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6762         mono_reflection_generic_class_initialize().
6763
6764         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6765         now known as "System.Reflection.MonoGenericClass".
6766         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6767
6768 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
6769
6770         * class-internals.h: Added a flag field to MonoClass to cache the
6771         declarative security attributes actions associated with the class.
6772         * domain-internals.h: Added booleans to MonoJitInfo to cache the
6773         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6774         applicable to the JITted method.
6775         * reflection.c|h: Added functions to extract (as flags) which security
6776         actions are available (declaratively) for a method, class or assembly.
6777         * metadata.c|h: Added functions to search the declarative security
6778         table in the metadata.
6779         
6780 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
6781
6782         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6783         EXPORTEDTYPES are already in the class name cache, so there is no
6784         need to add extra code here to look at them. Just removes a bit of
6785         cruft.
6786
6787         (ves_icall_System_Environment_get_TickCount): No need for #if
6788         WINDOWS. We already have the code in io-layer.
6789
6790 2004-11-28  Martin Baulig  <martin@ximian.com>
6791
6792         * loader.c
6793         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6794         Fixes gen-112.cs.
6795
6796 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
6797
6798         * assembly.c (do_mono_assembly_open): Instead of having a
6799         conditional WITH_BUNDLE, incorporate support for bundles here, by
6800         having a global `bundles' variable holding a pointer to the actual
6801         bundles. 
6802
6803         (mono_register_bundled_assemblies): New API call used by the
6804         bundle code. 
6805
6806         See mkbundle.1 for details.
6807         
6808 2004-11-27  Martin Baulig  <martin@ximian.com>
6809
6810         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6811         the vtable for generic methods.
6812
6813 2004-11-26  Martin Baulig  <martin@ximian.com>
6814
6815         * metadata.c
6816         (mono_metadata_generic_method_hash): New public function.
6817         (mono_metadata_generic_method_equal): Likewise.
6818
6819         * class-internals.h
6820         (MonoGenericContainer): Added `GHashTable *method_hash'.
6821
6822         * reflection.c (ReflectionMethodBuilder): Added
6823         `MonoGenericContainer *generic_container'.
6824         (reflection_methodbuilder_to_mono_method): Don't create a new
6825         MonoGenericContainer each time we're called.
6826         (mono_reflection_bind_generic_method_parameters): Use
6827         `container->method_hash' to cache the results so we don't create a
6828         different method if we're called several times with the same
6829         arguments.
6830
6831         * loader.c (method_from_methodspec): Use the new
6832         `container->method_hash' here, too.
6833
6834 2004-11-26  Martin Baulig  <martin@ximian.com>
6835
6836         * class.c (inflate_generic_signature): Correctly compute
6837         `res->has_type_parameters'.
6838         (mono_class_vtable): Use the `has_type_parameters' flag to
6839         determine whether we're a generic method.
6840
6841         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6842
6843 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
6844
6845         * object.c (mono_runtime_run_main): Fix a small memory leak.
6846
6847 2004-11-25  Martin Baulig  <martin@ximian.com>
6848
6849         * class.c (set_generic_param_owner): Fixed the loop.
6850
6851 2004-11-25  Martin Baulig  <martin@ximian.com>
6852
6853         * object.c (mono_class_vtable): Don't create any JIT wrappers for
6854         generic methods.
6855
6856 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
6857
6858         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6859         names. Fixes #69787.
6860
6861 2004-11-24  Martin Baulig  <martin@ximian.com>
6862
6863         * class.c (mono_class_create_generic_2): If we don't have a
6864         `ginst->parent', inflate `gklass->parent' to get our parent.
6865
6866 2004-11-24  Martin Baulig  <martin@ximian.com>
6867
6868         * reflection.c (compare_genericparam): Correctly sort the
6869         GenericParam table; fixes #69779.
6870
6871 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
6872
6873         * reflection.c: When writing a PE file, don't create a huge
6874         buffer in memory. Just write the arrays we have to the file.
6875         This reduces memory usage.
6876
6877         * metadata-internals.h: MonoDynamicStream pefile is no longer used
6878         globally.
6879
6880 2004-11-17  Martin Baulig  <martin@ximian.com>
6881
6882         * class.c (mono_class_init): Don't setup `class->parent' for
6883         dynamic instances; moved this to mono_class_generic_2().
6884         (mono_class_create_generic): Also set `klass->inited' for dynamic
6885         generic instances.
6886         (mono_class_create_generic_2): Don't do anything for dynamic
6887         generic instances.  Set `klass->parent' here and also call
6888         mono_class_setup_parent() here. 
6889
6890         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6891         `MonoType *parent' argument; set `ginst->parent' before calling
6892         mono_class_create_generic_2(), so we set the correct parent.
6893
6894 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6895
6896         * reflection.c: allow getting attributes from ModuleBuilder
6897         (used by ikvm).
6898
6899 2004-11-17  Martin Baulig  <martin@ximian.com>
6900
6901         * class.c (mono_class_create_from_typedef): If a type parameter is
6902         inherited from an outer class, set its owner to that class.
6903
6904 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
6905
6906         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6907           for (int*) written size. This fixes bug #69592.
6908
6909 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
6910
6911         * icall.c: Added IsAuthenticodePresnet internal call.
6912         * image.c|h: New function that check a MonoImage for an Authenticode
6913         signature in the certificate PE data directory.
6914         * security.c|h: New internal call to ask the runtime if an 
6915         Authenticode signature seems referenced in the PE header.
6916
6917 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
6918
6919         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6920
6921         * reflection.c (mono_image_create_pefile): Free the assembly streams
6922         after writing out the assembly file.
6923
6924         * object.c (mono_runtime_run_main): Fix small memory leak.
6925
6926         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6927         property access modifiers. Fixes #69389.
6928
6929 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6930
6931         * domain.c, object.c, object-internals.h, domain-internals.h,
6932         object.h, marshal.c: keep dynamic code info per domain.
6933
6934 2004-11-15  Martin Baulig  <martin@ximian.com>
6935
6936         * class.c (mono_type_get_name_recurse): Put type arguments in
6937         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
6938         see bug #68387.
6939
6940 2004-11-15  Martin Baulig  <martin@ximian.com>
6941
6942         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6943         (mono_class_setup_vtable): When computing `the_cname' for a
6944         generic instance, don't include the namespace since we'd otherwise
6945         add it twice.
6946
6947 2004-11-15  Martin Baulig  <martin@ximian.com>
6948
6949         * class.c (mono_class_create_generic): Changed return type to void.
6950         (mono_class_create_generic_2): New public function; setup
6951         `class->method', `class->field' and `class->interfaces' here
6952         instead of in mono_class_init().
6953
6954         * class.h (mono_class_create_generic): Moved to class-internals.h.
6955
6956 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
6957
6958         * reflection.c (mono_image_create_pefile): take a file HANDLE.
6959         rather than writing to memory, write to this file. Right now,
6960         we are just writting into a buffer, and copying that. However
6961         we can avoid the buffer later.
6962
6963         (mono_dynamic_stream_reset): new function
6964
6965         * icall.c, object-internals.h: update for the above.
6966
6967 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
6968
6969         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6970         have been using gc'd memory. First it is slower, unlikely
6971         the comment in the source code said, secondly, it increases
6972         our footprint to do it in the gc.
6973
6974         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6975         the method so that it does not have to copy to managed code.
6976
6977 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
6978
6979         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
6980
6981 2004-11-12  Martin Baulig  <martin@localhost>
6982
6983         * reflection.c (mono_image_create_token): Allow generic method
6984         definitions here, since they may appear in an `.override'; see
6985         gen-98/gen-99 for an example.
6986
6987 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
6988
6989         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
6990         #69365.
6991
6992         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
6993         descriptive.
6994
6995 2004-11-11  Martin Baulig  <martin@ximian.com>
6996
6997         * class.c (mono_class_setup_vtable): In an explicit interface
6998         implementation, the method name now includes the arity.
6999
7000 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
7001
7002         * object.c (mono_array_full_copy): Fix warning.
7003
7004 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
7005
7006         * appdomain.c: Removed look_for_method_by_name(). Use the new method
7007         mono_class_get_method_from_name() instead.
7008         
7009         * class-internals.h: Added two new types of wrappers. 
7010         Added MonoRemotingTarget enum. Added new trampoline function type, which
7011         takes an additional MonoRemotingTarget value as parameter, so it is
7012         possible to request a trampoline for a specific target.
7013         
7014         * class.c: Added new mono_class_get_method_from_name() method.
7015         
7016         * class.h: In MonoRemoteClass, we can have now to vtables, one for
7017         general remoting sinks and one specific for cross domain calls.
7018         
7019         * debug-helpers.c: Added new wrapper names.
7020         
7021         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7022         of a remote class.
7023         
7024         * image.c: Porperly delete value objects form the remoting invoke hashtable.
7025         
7026         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7027         with several other methods (mono_marshal_get_xappdomain_dispatch,
7028         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7029         and others) can generate a fast remoting wrapper for cross domain calls.
7030         More information can be found in docs/remoting.
7031         Other changes: Removed mono_find_method_by_name, and used
7032         mono_class_get_method_from_name instead.
7033         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7034         is stored in the remoting invoke hashtable.
7035         
7036         * marshal.h: published the new method for getting the xdomain wrapper,
7037         and also added a method for getting the adequate wrapper for a given
7038         method and target.
7039         
7040         * object-internals.h, object.c: Added a couple of methods for capying and
7041         cloning arrays.
7042         Modified mono_install_remoting_trampoline, which takes the new remoting
7043         trampoline that has a remoting target as parameter.
7044         mono_class_proxy_vtable now also takes a remoting target as parameter, and
7045         will return the most suitable vtable for the target.
7046         Added mono_remote_class_vtable, which returns the vtable of a remote class
7047         (which can be the normal remoting vtable or the xdomain vtable).
7048         
7049         * threads.c: the xdomain invoke and dispatch wrappers must also be
7050         protected against interruptions.
7051
7052 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7053
7054         * icall.c: use memmove in BlockCopyInternal when the source and
7055         destination arrays are the same.
7056
7057 2004-11-09  Martin Baulig  <martin@ximian.com>
7058
7059         * class-internals.h (MonoGenericContainer): Removed `method' and
7060         `signature', replaced them with `is_method' and `is_signature'
7061         flags.  Added `context'.
7062
7063         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7064         instead of a `MonoGenericContainer *'.
7065
7066         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7067         for dynamic type parameters.
7068         (mono_metadata_load_generic_params): Setup `container->context'.
7069
7070         * reflection.c (mono_reflection_setup_generic_class): Setup
7071         `tb->generic_container->context'.
7072         (do_mono_reflection_bind_generic_parameters): Use
7073         mono_class_inflate_generic_type() to correctly inflate types,
7074         rather than using our own hack just for MONO_TYPE_VAR.
7075
7076 2004-11-09  Martin Baulig  <martin@ximian.com>
7077
7078         * class.c (mono_class_inflate_generic_method): Small fix; don't
7079         crash here.
7080
7081         * icall.c
7082         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7083         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7084         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7085         (ves_icall_Type_BindGenericParameters): Likewise.
7086         (ves_icall_Type_get_IsGenericInstance): Likewise.
7087         (ves_icall_Type_GetGenericParameterPosition): Likewise.
7088         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7089         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7090         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7091
7092 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
7093
7094         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7095         assembly versions and public key tokens. Fixes #69113.
7096
7097 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7098
7099         * metadata.c: fix bug introduced with the type cache changes
7100         on 2004-11-06.
7101
7102 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7103
7104         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7105         the MonoClass pointer instead of the token in exception clauses.
7106         * reflection.c: updates for the above and make the code not depend
7107         on the structure of MonoExceptionClause.
7108
7109 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
7110
7111         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7112         Add support for dynamic assemblies. Fixes #69114.
7113
7114         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7115
7116 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
7117
7118         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7119         since most only those methods use it. the code member of
7120         MonoMethodPInvoke was dead, so that can be removed too. Also,
7121         remove inline_count (again, not used), and move slot so that it
7122         can share bits with some other flags. This saves 8 bytes in the
7123         structure and gives us about 50 kb back for mcs helloworld.cs
7124
7125         * *.[ch]: Do naming changes for the above.
7126
7127         * loader.c (mono_method_get_header): Lazily init the header
7128         on first access.
7129         (mono_get_method_from_token): don't init the header here
7130         (mono_free_method): the header may never be allocated
7131
7132         Overall, this saves 150 kb of unmanaged allocations
7133         for mcs helloworld.cs. That accounts for 10% of the unmanaged
7134         memory at runtime.
7135         
7136         * loader.c, loader.h (mono_method_get_header): new accessor.
7137
7138         * *.[ch]: use the above method. Prepares us to lazily load
7139         the header.
7140
7141         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7142         three warnings, which are actual bugs (see 69206).
7143
7144         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7145         unused. Saves a cool 4 bytes / method.
7146
7147 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
7148
7149         * metadata.c (builtin_types): Add types for System.Object here.
7150         (mono_metadata_parse_type_full): Cache MonoType*'s that are
7151         for a class or valuetype from klass->this_arg or klass->byval_arg.
7152
7153         On mcs for a hello world, this gets us down from 21836 MonoType's
7154         to 14560.
7155
7156         (mono_metadata_free_type): Account for the above change.
7157
7158 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
7159
7160         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
7161         exception instead of asserting if name is null.
7162         (ves_icall_System_AppDomain_GetData): Ditto.
7163
7164 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
7165
7166         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7167         EnumBuilder.
7168
7169         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
7170         Return NULL when the domain does not have entry_assembly set.
7171
7172         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
7173         Add a 'resource_modules' argument.
7174         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7175
7176         * reflection.c (mono_reflection_create_runtime_class): Move setting
7177         of wastypebuilder here, so mono_get_type_object () returns a MonoType
7178         for enums too.
7179
7180         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7181         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7182         Throw an ArgumentNullException if 'ptr' is null.
7183
7184         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7185         assemblies here. Fixes #69020.
7186
7187 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
7188
7189         * reflection.c (build_compressed_metadata): Fix the previous patch for
7190         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
7191         the stack.
7192
7193 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
7194
7195         * assembly.c (mono_assembly_names_equal): Allow a match if one of
7196         the cultures is false. Fixes #69090.
7197
7198         * reflection.c (build_compressed_metadata): Fix invalid memory read 
7199         detected by valgrind.
7200         
7201         * reflection.c (mono_reflection_get_type): Avoid triggering a 
7202         TypeResolve multiple times for the same type. Fixes #65577.
7203
7204 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
7205
7206         * marshal.c: Avoid using ldftn to call managed functions. It is
7207         much slower than just a call.
7208
7209         * reflection.c (mono_module_get_object): free the basename we
7210         allocate here from glib.
7211         
7212         * reflection.c (ensure_runtime_vtable): make sure to free
7213         overrides.  Also, we were allocating an array of MonoMethod not an
7214         array of MonoMethod*.
7215
7216         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7217
7218         * image.c (mono_image_close): free image->guid here.
7219
7220 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
7221
7222         * reflection.c: Fix some spec conformance issues with the PE file
7223         structures so mcs compiled apps run on the Net 2.0 beta.
7224
7225 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
7226
7227         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
7228         Implement this. Fixes #67264.
7229
7230         * debug-helpers.h debug-helpers.c marshal.c: Move 
7231         mono_find_method_by_name to debug-helpers.c.
7232
7233 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
7234
7235         * object.c (mono_release_type_locks): type_initialization_hash is
7236         a GHashTable.
7237
7238         * reflection.c object.c object-internals.h: Fix warnings.
7239
7240         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7241         without accessors. Fixes #61561.
7242
7243         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7244         application base from the root domain if not set. Fixes #65641.
7245         (mono_runtime_init): Fix warning.
7246
7247 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7248
7249         * appdomain.c: call mono_thread_pool_init.
7250         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7251         of worker threads based on the number of CPUs and the environment
7252         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7253         for non-windows (windows) systems.
7254
7255 2004-10-27  Chris Toshok  <toshok@ximian.com>
7256
7257         * mono-debug-debugger.c (write_class): don't call mono_class_init
7258         here, as even with the check for (!klass->init_pending), we get
7259         into a situation where we're hitting cycles in class
7260         initialization.  Fixes #68816.
7261
7262 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
7263
7264         * image.c: Avoid overwriting values in the loaded_images_hash when an
7265         assembly is loaded multiple times. Fixes #61152.
7266
7267         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7268         so multiple satellite assemblies for the same name can be loaded.
7269         Fixes #68259.
7270
7271         * mono_domain_assembly_preload: Actually return the loaded assembly, 
7272         not NULL.
7273
7274         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7275         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7276
7277         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7278         pending finalizers are not invoked after the appdomain has been 
7279         unloaded. Fixes #67862.
7280
7281 2004-10-22  Martin Baulig  <martin@ximian.com>
7282
7283         * mono-debug-debugger.c
7284         (mono_debugger_runtime_invoke): Don't box valuetypes.
7285
7286 2004-10-22  Chris Toshok  <toshok@ximian.com>
7287
7288         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7289         don't hide private methods.
7290
7291 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
7292
7293         * icall.c: Allows the runtime to "share" (when known) the public key
7294         token of an assembly. This avoid the need to recalculate the token 
7295         (from the public key) in managed code.
7296
7297 2004-10-21  Chris Toshok  <toshok@ximian.com>
7298
7299         * debug-helpers.c (append_class_name): argh, revert last patch.
7300         
7301 2004-10-21  Chris Toshok  <toshok@ximian.com>
7302
7303         * debug-helpers.c (append_class_name): use '+' as the delimiter,
7304         not '/', so that it matches what the debugger uses to look up
7305         methods.
7306
7307 2004-10-21  Martin Baulig  <martin@ximian.com>
7308
7309         * mono-debug-debugger.c (mono_debugger_throw_exception): New
7310         public method; this is called each time an exception is thrown and
7311         allows the debugger to use exception catch points.
7312
7313 2004-10-21  Martin Baulig  <martin@ximian.com>
7314
7315         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7316         the stack pointer and the exception object in some struct and pass
7317         that to the debugger.
7318
7319 2004-10-21  Chris Toshok  <toshok@ximian.com>
7320
7321         * mono-debug-debugger.c (do_write_class): add instance/static
7322         event support.  We don't expose "raise" or "other" yet.
7323         (event_is_static): new method.
7324
7325 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
7326
7327         * mono-debug-debugger.c
7328         (mono_debugger_handle_exception): Remove
7329         bogus return value for fussy compilers.
7330
7331 2004-10-20  Martin Baulig  <martin@ximian.com>
7332
7333         * mono-debug-debugger.c
7334         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7335         (mono_debugger_handled_exception): Likewise.
7336
7337 2004-10-20  Martin Baulig  <martin@ximian.com>
7338
7339         * mono-debug-debugger.h (MonoDebuggerEvent): Added
7340         MONO_DEBUGGER_EVENT_EXCEPTION.
7341
7342         * mono-debug-debugger.c (mono_debugger_handle_exception): New
7343         public function to send the debugger a notification for an
7344         exception and inform it about a catch/finally clause.
7345
7346 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
7347
7348         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7349         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7350         fix 2.95 build. 
7351
7352         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7353
7354 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
7355
7356         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7357         marshalled as [In,Out]. Fixes #58325.
7358
7359 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
7360
7361         * reflection.c (mono_method_body_get_object): Implement some fields.
7362
7363 2004-10-12  Martin Baulig  <martin@ximian.com>
7364
7365         * reflection.c (mono_reflection_bind_generic_parameters): Small
7366         fix, correctly retrieve our parent from a generic instance.
7367
7368 2004-10-12  Martin Baulig  <martin@ximian.com>
7369
7370         * metadata.c (mono_metadata_generic_param_equal): We always have
7371         an owner.
7372
7373         * class.c
7374         (mono_class_from_generic_parameter): We need to have an owner.
7375         (my_mono_class_from_generic_parameter): Likewise.
7376
7377         * reflection.c (mono_reflection_setup_generic_class): Renamed to
7378         mono_reflection_create_generic_class() and added a new
7379         mono_reflection_setup_generic_class().  
7380         (mono_reflection_initialize_generic_param): If we're a nested
7381         generic type and inherited from the containing class, set our
7382         owner to the outer class.
7383
7384 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
7385
7386         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7387
7388         * reflection.c (mono_method_body_get_object): New function to create
7389         a MethodBody object.
7390
7391         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7392
7393 2004-10-11  Martin Baulig  <martin@ximian.com>
7394
7395         * metadata.c (_mono_metadata_type_equal): Renamed to
7396         do_mono_metadata_type_equal() and made static.
7397
7398 2004-10-11  Martin Baulig  <martin@ximian.com>
7399
7400         * appdomain.c: Bump corlib version number to 28.
7401
7402 2004-10-10  Martin Baulig  <martin@ximian.com>
7403
7404         * class-internals.h
7405         (MonoGenericInst): Added `MonoGenericContainer *container'.
7406         (MonoGenericMethod): Likewise.
7407         (MonoGenericContext): Likewise.
7408         (MonoGenericParam): Added `MonoGenericContainer *owner'.
7409
7410         * metadata.c
7411         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7412         (do_mono_metadata_parse_generic_inst): Likewise.
7413         (mono_metadata_parse_type_full): New public method.  This is the actual
7414         mono_metadata_parse_type() implementation - with an additional
7415         `MonoGenericContainer *' argument.
7416         (mono_metadata_parse_array_full): Likewise.
7417         (mono_metadata_parse_signature_full): Likewise.
7418         (mono_metadata_parse_method_signature_full): Likewise.
7419         (mono_metadata_parse_mh_full): Likewise.
7420         (mono_type_create_from_typespec): Likewise.
7421         (mono_metadata_interfaces_from_typedef_full): New public method;
7422         this is similar to the other _full() methods, but we take a
7423         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7424         (mono_metadata_parse_generic_param): Take an additional
7425         `MonoGenericContainer *' argument and lookup the MonoGenericParam
7426         from that container.
7427         (mono_metadata_generic_param_equal): New static method to compare
7428         two type parameters.
7429         (_mono_metadata_type_equal): New static method; takes an
7430         additional `gboolean signature_only' argument - if true, we don't
7431         compare the owners of generic parameters.
7432         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7433         with a TRUE argument - do a signature-only comparision.
7434
7435         * loader.c: Use the new _full() methods and pass the
7436         MonoGenericContainer to them.
7437
7438         * object-internals.h (MonoReflectionTypeBuilder): Added
7439         `MonoGenericContainer *generic_container' field.
7440         (MonoReflectionMethodBuilder): Likewise.
7441
7442 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
7443
7444         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7445         case initial images of dynamic assemblies.
7446
7447         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7448
7449         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7450
7451         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7452         length of event->other array.
7453         (typebuilder_setup_events): Ditto.
7454
7455         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7456         'assembly_by_name' and add an 'assemblies' list.
7457
7458         * assembly.h assembly.c: Add a new search hook for determining whenever
7459         an assembly is already loaded. Use this instead of searching in the
7460         loaded_assemblies list.
7461
7462         * domain.c appdomain.c: Implement the new search hook so loaded 
7463         assemblies are now scoped by appdomain. Fixes #67727.
7464
7465 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
7466
7467         * threads.c (mono_thread_attach): Initialize synch_lock field so
7468         mono_thread_detach works again.
7469
7470         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7471         'lib' too. Fixes #63130.
7472
7473 2004-10-06  Jackson Harper  <jackson@ximian.com>
7474
7475         * culture-info-tables.h: regenerated.
7476
7477 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
7478
7479         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
7480         implemented by other interfaces in the result. Fixes #65764.
7481         
7482         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7483         Handle unloadable modules without crashing.
7484
7485         * image.c (load_modules): Revert the previous patch since modules must
7486         have a fixed index inside the array.
7487         
7488         * image.c (load_modules): Don't include native modules in the modules
7489         array.
7490
7491 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
7492
7493         * reflection.h: Add param_defaults field.
7494
7495         * reflection.c: Add support for parameter defaults in dynamic methods.
7496         Fixes #64595.
7497
7498         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7499         an empty string when a type has no namespace. Fixes #64230.
7500
7501 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
7502
7503         * tabledefs.h: Added "internal" security actions to support non-CAS
7504         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
7505         Note: they do not seems to be used anymore in 2.0 (new metadata format)
7506
7507 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
7508
7509         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7510         constructor of abstract class. Fixes #61689.
7511
7512 2004-10-04  Martin Baulig  <martin@ximian.com>
7513
7514         * class-internals.h (MonoGenericContainer): New type.
7515         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7516         `MonoGenericContainer *generic_container'.
7517         (MonoClass): Replaced `gen_params' and `num_gen_params' with
7518         `MonoGenericContainer *generic_container'.
7519
7520         * metadata.c (mono_metadata_load_generic_params): Return a
7521         `MonoGenericContainer *' instead of a `MonoGenericParam *';
7522         removed the `num' argument.
7523
7524 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
7525
7526         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7527         for dynamic images.
7528
7529         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7530         machine fields.
7531
7532         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7533
7534         * reflection.c: Save pe_kind and machine values into the generated
7535         image file.
7536
7537         * appdomain.c: Bump corlib version number.
7538
7539         * object-internals.h: Reorganize layout of LocalBuilder.
7540
7541         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
7542         New helper function.
7543
7544         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7545         created MonoType for dynamic types. Fixes #66180.
7546
7547 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
7548
7549         * threadpool.c: the ares hashtable needs a critical section around it.
7550         this prevents some nasty segfaults
7551
7552 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
7553
7554         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7555         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7556         bug 67324).
7557         
7558 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7559
7560         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7561         
7562 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
7563
7564         * image.c: Always canonicalize image file names, to avoid loading
7565         the same assembly twice when referenced using a relative path.
7566
7567 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7568
7569         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7570
7571         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7572
7573         * marshal.c: Fix warnings.
7574
7575 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
7576
7577         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7578         attempting to marshal the delegate_trampoline as the method_addr.
7579         This patch has a static hashtable of marshalled delegates so that 
7580         we can map delegate_trampoline addresses back to delegates.  This
7581         allows a delegate passed to managed code to be passed back into native
7582         code.  Fixes #67039
7583
7584 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7585
7586         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7587
7588         * reflection.c (method_encode_code): Align method headers properly.
7589         Fixes #66025.
7590
7591 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7592
7593         * marshal.c: In the runtime invoke wrapper, reset the abort
7594         exception if it is cached. This avoids the automatic rethrowal of 
7595         the exception after the catch of the wrapper. Also check for pending
7596         interruptions before calling the managed method. This is done using
7597         the new method emit_thread_force_interrupt_checkpoint, since the
7598         normal checkpoint method is ignored when running the invoke wrapper.
7599         * object.c: If the abort exception is rethrown, set the abort_exc
7600         field of the thread, so it will be rethrown aftere every catch.
7601         * threadpool.c: Only run an interruption checkpoint if what has been
7602         requested is a stop of the thread (aborts will be ignored).
7603         * threads.c: By default, a thread will now never be interrumped while
7604         running the runtime invoke wrapper (this ensures that runtime_invoke
7605         will always return to the caller if an exception pointer is provided).
7606         There is a new special method mono_thread_force_interruption_checkpoint()
7607         to force an interruption checkpoint even if running a protected
7608         wrapper, which is used by the same runtime invoke wrapper to do a check
7609         at a safe point.
7610
7611 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7612
7613         * object.c, object-internals.h: Implemented mono_release_type_locks,
7614         which releases the cctor locks held by a thread.
7615         * threads.c, threads.h: In thread_cleanup, release cctor locks held
7616         by a thread. Added mono_thread_exit() method to be used to safely stop
7617         a thread.
7618
7619 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7620
7621         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7622         Move null check before dereference.  Avoid indexing beyond the end
7623         of the 'modules' array.
7624
7625 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7626
7627         * metadata-internals.h (MonoImage): Add module_count field.
7628         * image.c (load_modules): Set image->module_count.
7629         (mono_image_load_file_for_image): Use image->module_count.
7630         * reflection.c (mono_image_load_module): Append to image->modules array 
7631         of dynamic assembly.
7632         (mono_module_get_object): Fix loop to actually increment index.
7633         Use image->module_count.
7634         * assembly.c (mono_assembly_load_references): Use image->module_count.
7635         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7636         Likewise.
7637
7638 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7639
7640         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
7641         Avoid assert on generic types.
7642
7643 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
7644
7645         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7646
7647         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7648
7649         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
7650         function to convert a MarshalSpec structure to its managed counterpart.
7651
7652         * reflection.c: Fix warnings.
7653         
7654         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7655         field.
7656
7657         * icall.c (mono_create_icall_signature): Fix build.
7658
7659 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
7660
7661         * icall.c: Add MakePointType icall.
7662
7663         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7664         warnings.
7665
7666 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7667
7668         * threadpool.c: reuse allocated slots in the queue.
7669
7670 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
7671
7672         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7673
7674         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7675
7676         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7677         previous change.
7678
7679         * tabledefs.h: Add constants for pinvoke attributes BestFit and
7680         ThrowOnUnmappableChar.
7681
7682         * icall.c (ves_icall_Type_GetPacking): New icall.
7683
7684 2004-09-24  Martin Baulig  <martin@ximian.com>
7685
7686         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7687
7688 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7689
7690         * appdomain.c:
7691         (mono_domain_set): allow setting a domain that is being unloaded.
7692         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7693         being unloaded.
7694
7695 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7696
7697         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7698         the GetCustomAttributes icall.
7699
7700 2004-09-23  Martin Baulig  <martin@ximian.com>
7701
7702         * object-internals.h (MonoReflectionGenericParam): Replaced
7703         'has_ctor_constraint', `has_reference_type' and `has_value_type'
7704         with `guint32 attrs'.
7705
7706 2004-09-23  Martin Baulig  <martin@ximian.com>
7707
7708         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7709
7710 2004-09-23  Martin Baulig  <martin@ximian.com>
7711
7712         * object-internals.h (GenericParameterAttributes): New enum.
7713
7714 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7715
7716         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7717         
7718         * class.c (init_events): Fill out event->other field.
7719
7720         * class.c: Fix warnings.
7721
7722         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7723
7724 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7725
7726         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7727         walk which doesn't supply the IL offset.
7728
7729 2004-09-22  Martin Baulig  <martin@ximian.com>
7730
7731         * reflection.c (mono_reflection_setup_internal_class): If we're
7732         System.ValueType, System.Object or System.Enum, set
7733         `klass->instance_size' and create the vtable.
7734         (mono_reflection_create_internal_class): If we're an enum type,
7735         get the base class from our current corlib.
7736
7737 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
7738
7739         * reflection.h (MonoResolveTokenError): New type.
7740
7741         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7742         icall.
7743
7744         * icall.c: Add an 'error' argument to the ResolveToken icalls.
7745
7746 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
7747
7748         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7749         Support also calling constructors, but only for already allocated objects.
7750
7751 2004-09-17  Geoff Norton <gnorton@customerdna.com>
7752
7753         * reflection.c (type_get_qualified_name): If the klass is null
7754         return the typename to avoid a NullRefEx.
7755         (encode_cattr_value): Get the qualified name of the boxed type,
7756         not the underlying enumtype.  Fixes #62984.
7757
7758 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
7759
7760         * marshal.c: Fix problems with previous checkin.
7761
7762 2004-09-21    <vargaz@freemail.hu>
7763
7764         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7765         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7766
7767         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7768
7769 2004-09-21  Geoff Norton <gnorton@customerdna.com>
7770
7771         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7772         should only return a type for pointers, arrays, and passbyref types.
7773         Fixes bug #63841.
7774
7775 2004-09-21  Martin Baulig  <martin@ximian.com>
7776
7777         * domain.c (mono_debugger_check_runtime_version): New public
7778         function.
7779
7780         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
7781
7782 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
7783
7784         * reflection.c: Added missing sort to the declarative security 
7785         attributes table. MS implementation stops seeing the attributes if the
7786         token number regress in the table (as shown by ildasm and permview).
7787
7788 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
7789
7790         * object-internals.h (MonoReflectionModule): Add 'token' field.
7791         
7792         * reflection.c (mono_reflection_get_token): Add support for Module
7793         and Assembly.
7794         (mono_module_get_object): Set 'token' field.
7795         (mono_module_file_get_object): Set 'token' field.
7796
7797         * icall.c: Add new Assembly and Module icalls.
7798
7799         * appdomain.c: Bump corlib version.
7800
7801 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
7802
7803         * loader.h loader.c class.h class.c: Add helper functions for obtaining
7804         tokens of metadata objects.
7805
7806         * reflection.h reflection.c (mono_reflection_get_token): New function
7807         to obtain the token of a metadata object.
7808
7809         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7810
7811 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
7812
7813         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7814         
7815         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7816
7817 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
7818
7819         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7820         * object-internals.h: Added 3 MonoArray* members to MonoReflection
7821         AssemblyBuilder to access the permissions set in the class lib.
7822         * reflection.c: Added security attributes encoding step in 
7823         mono_image_build_metadata.
7824         * tabledefs.h: Added new security actions defined in 2.0:
7825         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7826
7827 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7828
7829         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7830         macro parameter.
7831
7832 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7833  
7834         * locales.c: nullify the ICU_collator member of CompareInfo when it is
7835           finalized. There where random SIGSEVs at program termination, when
7836           an object being finalized was trying to do a string comparison and
7837           the current culture was already finalized.
7838  
7839 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7840
7841         * threads.c: call thread_cleanup before finishing the thread if we get
7842         there.
7843
7844 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
7845
7846         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7847         assemblies from the parent. Fixes #65665.
7848
7849 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
7850
7851         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7852         modifiers.
7853
7854 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
7855
7856         * reflection.h: add prototype for mono_get_dbnull_object
7857         * reflection.c: add prototypes for get_default_param_value_blobs 
7858         and mono_get_object_from_blob for fussier compilers
7859
7860 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
7861  
7862         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7863         false deadlock checks in class initialization.
7864  
7865 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
7866
7867         * image.c (mono_image_addref): Fix comment.
7868
7869         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7870         possible.
7871
7872 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
7873
7874         * reflection.c (mono_param_get_objects): Modified to return
7875         ParameterInfo.DefaultValue object.
7876
7877         (get_default_param_value_blobs):
7878         (mono_get_object_from_blob):
7879         (mono_get_dbnull_object): New helper routines. 
7880
7881         * object.c (mono_get_constant_value_from_blob): New helper routine
7882         carved out from get_default_field_value ()
7883
7884         * object-internals.h (mono_get_constant_value_from_blob): Added
7885         function declaration.
7886
7887 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7888
7889         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
7890         referenced assemblies. Fixes #62135.
7891
7892         * exception.h exception.c (mono_get_exception_file_not_found2): New
7893         helper function.
7894
7895 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
7896
7897         * class.h class.c: Add mono_type_get_underlying_type ().
7898
7899 2004-09-09  Geoff Norton <gnorton@customerndna.com>
7900
7901         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7902         Fix GetTypes() to support dynamically created assemblies.
7903
7904 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
7905
7906         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7907         
7908         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7909         previous patch.
7910
7911         * reflection.h reflection.c loader.c: Allow dynamic construction of
7912         pinvoke methods. Fixes #65571.
7913         
7914         * reflection.c (mono_reflection_get_type): Revert previous change since
7915         it causes regressions.
7916
7917 2004-09-08  Martin Baulig  <martin@ximian.com>
7918
7919         * class.c (class_compute_field_layout): Don't call
7920         mono_class_layout_fields() for open generic instances.
7921
7922 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7923         * threads.c appdomain.c: fix typo in GC macro
7924
7925 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7926
7927         * threads.c: don't call mono_thread_detach() in start_wrapper(),
7928         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7929
7930 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
7931
7932         * image.c (mono_image_close): Applied patch from 
7933         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7934         assembly is loaded multiple times from data.
7935         
7936         * image.c (mono_image_open): Fix warning.
7937
7938 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7939
7940         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7941         once. Fixes #58334.
7942         
7943         * reflection.c (mono_reflection_create_runtime_class): Initialize
7944         klass->nested_classes. Fixes #61224.
7945
7946 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7947
7948         * threads.c: sched_yield() on exit, to allow threads to quit.
7949
7950 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7951
7952         * object.c (mono_unhandled_exception): Remove leftover debug code.
7953
7954 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
7955
7956         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7957
7958 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7959
7960         * marshal.c (emit_marshal_array): Really null terminate string arrays.
7961         
7962         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7963
7964 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7965
7966         * marshal.c (emit_marshal_array): Null terminate string arrays.
7967         
7968         * marshal.c (raise_auto_layout_exception): Fix warning.
7969
7970         * reflection.c (mono_param_get_objects): Initialize the default value
7971         with DBNull.Value, not null. Fixes #62123.
7972
7973 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
7974
7975         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7976         throw an exception with a cute explanation.
7977
7978 2004-09-06  Dick Porter  <dick@ximian.com>
7979
7980         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
7981         Close the new process's thread handle, as we don't use it.  The
7982         handle stays around forever otherwise.
7983
7984 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7985
7986         * object.c (arith_overflow): Fix warning.
7987
7988         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
7989         calling conventions in method refs. Fixes #65352.
7990
7991         * reflection.c: Fix warnings.
7992
7993 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
7994
7995         * icall.c: Add a new icall for Array.Clear
7996
7997 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
7998
7999         * object.c: When allocating an array, we have to throw
8000         an overflow exception if any of the lengths are < 0.
8001
8002 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8003
8004         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8005         properly. Also move implementation of string array marshalling to 
8006         managed code. Fixes #42316.
8007
8008 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8009
8010         * assembly.c: provide more information when loading an assembly fails.
8011
8012 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8013
8014         * filewatcher.c: don't expect the development fam package to be
8015         installed.
8016
8017 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
8018
8019         * marshal.c: Make a copy of the signature cookie since it will be
8020         freed by the caller.
8021         
8022         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8023
8024         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8025
8026         * metadata.c (mono_metadata_free_marshal_spec): New function to free
8027         marshal specs.
8028
8029         * marshal.c: More refactoring.
8030         
8031         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8032         smaller functions.
8033
8034 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
8035
8036         * object.c: In mono_message_invoke, fill the output parameter array after
8037           calling the managed method (it was done before the call). This fixes
8038           bug #59299.
8039
8040 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8041
8042         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8043         as well.
8044
8045 2004-09-02  Martin Baulig  <martin@ximian.com>
8046
8047         * class.c (mono_class_instance_size): Don't allow generic type
8048         definitions or open generic instances.
8049         (mono_class_array_element_size): If we're a value type, call
8050         mono_class_instance_size() on the original class.
8051
8052         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8053         handle generic instances.
8054
8055         * mono-debug-debugger.c (write_type): Handle generic instances
8056         like classes.
8057
8058 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8059
8060         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8061         the allocation request fails. Fixes #65089.
8062
8063         * object.c (mono_runtime_free_method): Do not call mono_free_method.
8064         
8065         * object.c (mono_runtime_free_method): New function to free a dynamic
8066         method.
8067
8068         * marshal.c (mono_delegate_free_ftnptr): New function to free the
8069         delegate trampoline.
8070
8071         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8072         with hasthis as dynamic,
8073
8074         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8075
8076         * domain.c (mono_jit_info_table_remove): New function to remove an
8077         entry from the jit info table.
8078
8079         * class-internals.h (MonoMethod): Add 'dynamic' field.
8080
8081         * loader.c: Fix warnings.
8082
8083 2004-09-01  Martin Baulig  <martin@ximian.com>
8084
8085         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8086         instead of mono_debugger_lock() because the latter one is a no-op
8087         unless running in the debugger.
8088
8089 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8090
8091         * class.c (class_compute_field_layout): Classes with auto-layout or
8092         reference fields are not blittable.
8093         
8094 2004-09-01  Dick Porter  <dick@ximian.com>
8095
8096         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8097         mono_image_get_filename() to get the assembly location.
8098
8099         * icall.c:
8100         * metadata.h: Fix compile warnings
8101
8102 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8103
8104         * class.c (class_compute_field_layout): System.Object is blittable.
8105
8106         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8107         as in/out. Fixes #59909.
8108
8109 2004-09-01  Martin Baulig  <martin@ximian.com>
8110
8111         * metadata.h (MONO_TYPE_ISREFERENCE): Call
8112         mono_metadata_generic_inst_is_valuetype() if we're a generic
8113         instance to check whether our underlying type is a reference type.
8114
8115 2004-09-01  Martin Baulig  <martin@ximian.com>
8116
8117         * metadata.c (mono_type_size): If we're a generic instance, call
8118         mono_class_value_size() for value types.
8119
8120 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
8121
8122         * marshal.c: Implement more custom marshalling functionality. Fixes
8123         #64915.
8124
8125 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8126
8127         * mono-debug.c, debug-mono-symfile.c: add some locking love.
8128
8129 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
8130
8131         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8132
8133         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8134
8135         * icall.c: Fix some warnings.
8136
8137         * threads.c (abort_appdomain_thread): Fix unref errors.
8138         (mono_thread_current): Fix THREAD_DEBUG define.
8139
8140 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
8141
8142         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8143
8144         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8145
8146 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
8147
8148         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
8149         string arrays.
8150
8151 2004-08-28  Martin Baulig  <martin@ximian.com>
8152
8153         * metadata.c
8154         (mono_metadata_generic_inst_is_valuetype): New public function.
8155
8156         * metadata.h (MONO_TYPE_ISSTRUCT): Call
8157         mono_metadata_generic_inst_is_valuetype() if we're a generic
8158         instance to check whether our underlying type is a valuetype.
8159
8160 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
8161
8162         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8163         #63768.
8164
8165 2004-08-25  Martin Baulig  <martin@ximian.com>
8166
8167         * loader.c (mono_get_method_from_token): Abstract methods can also
8168         be generic and thus have type parameters.
8169
8170         * metadata-internals.h
8171         (MonoDynamicImage): Added `GPtrArray *gen_params'.
8172
8173         * reflection.c (mono_image_get_generic_param_info): Don't create a
8174         metadata row, just add an entry to the `gen_params' array.
8175         (build_compressed_metadata): Sort the `gen_params' array and then
8176         actually create the metadata.
8177
8178 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8179
8180         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8181
8182 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
8183
8184         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8185
8186 2004-08-24  Martin Baulig  <martin@ximian.com>
8187
8188         * class.cs (mono_class_is_subclass_of): Like an interface, a
8189         generic instance also derives from System.Object.
8190
8191 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
8192
8193         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8194         custom modifiers to be in any order. Fixes #61990.
8195
8196 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
8197
8198         * object.c: Register mono_object_new_fast icall.
8199         
8200         * object.c (mono_class_get_allocation_ftn): Return to calling
8201         mono_object_new_fast, since it seems faster to compute the object 
8202         size in unmanaged code than passing it as a parameter.
8203
8204         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8205
8206         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8207         this function with Boehm as the oom handler, so we don't have to check
8208         the result of GC_malloc.
8209
8210         * object.c: Remove checks for oom.
8211
8212         * object.h object.c (mono_class_get_allocation_ftn): New function to
8213         return the icall which can be used to allocate an instance of a given
8214         class. 
8215
8216         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8217
8218         * class-internals.h: Add 'enabled' field.
8219
8220 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
8221
8222         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8223
8224 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
8225         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8226         value 0x0010.
8227
8228 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
8229
8230         * appdomain.c: use the Tls function for appdomain too,
8231         at Zoltan's request. Actually return in mono_context_get
8232
8233         * appdomain.c, profiler.c, threads.c: use __thread
8234
8235 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
8236
8237         * appdomain.c threads.c: Call GC_CreateThread on windows.
8238
8239         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8240         multiple libraries since this don't work on windows.
8241
8242 2004-08-18  Martin Baulig  <martin@ximian.com>
8243
8244         * class-internals.h
8245         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8246         MonoMethodHeader.
8247
8248         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8249         MonoMethodNormal since we also need it for abstract and interface
8250         methods.
8251
8252         * reflection.c
8253         (build_compressed_metadata): Sort the GenericParam table.
8254         (mono_image_create_token): Added `gboolean create_methodspec'
8255         argument; this is false when generating a MethodImpl token.
8256         (reflection_methodbuilder_to_mono_method): Abstract and interface
8257         methods may also have generic parameters.
8258
8259 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8260
8261         * appdomain.c: thread local alloc
8262
8263 2004-08-17  Martin Baulig  <martin@ximian.com>
8264
8265         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8266
8267         * icall.c
8268         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8269         argument.
8270
8271         * class.c (mono_type_get_full_name): New public function.
8272         (mono_type_get_name): Don't include the type arguments.
8273
8274 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
8275
8276         * Makefile.am: Build static versions of libmetadata and libmonoruntime
8277         for inclusion into the mono executable.
8278
8279 2004-08-16  Martin Baulig  <martin@ximian.com>
8280
8281         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8282         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8283
8284 2004-08-14  Martin Baulig  <martin@ximian.com>
8285
8286         * class.c (dup_type): Also copy the `byref' field.
8287
8288 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
8289
8290         * reflection.c (create_dynamic_mono_image): Revert the last change 
8291         since it breaks bootstrap.
8292
8293 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
8294
8295         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8296
8297         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8298         not free them with g_free.
8299
8300 2004-08-11  Martin Baulig  <martin@ximian.com>
8301
8302         * reflection.c (mono_reflection_setup_internal_class): Also call
8303         mono_class_setup_mono_type() if we already have a `tb->type.type'.
8304
8305 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
8306
8307         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
8308         called during default (first) AppDomain creation. Keep track of
8309         Evidence when loading assemblies.
8310
8311 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8312
8313         * opcodes.c, opcodes.h: reduce runtime relocations.
8314
8315 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8316
8317         * culture-info.h, locales.c: fixes and chages to sue the new
8318         optimized format of the locale data.
8319         * culture-info-tables.h: regenerated.
8320
8321 2004-08-06  Geoff Norton <gnorton@customerdna.com>
8322         
8323         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8324
8325 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
8326
8327         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8328         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8329         * domain-internals.h: icall declaration.
8330         * icall.c: icall registration.
8331         * object-internals.h: New fields in MonoAssembly for CAS.
8332
8333 2004-08-05  Duncan Mak  <duncan@ximian.com>
8334
8335         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8336         CEE_LDELEM_ANY.
8337
8338 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8339
8340         * reflection.c: fix to deal with object[] arrays in custom ctors
8341         (bug #62550).
8342
8343 2004-08-05  Martin Baulig  <martin@ximian.com>
8344
8345         * class.c (mono_class_array_element_size): Added support for
8346         generic instances and correctly handle "recursive" types.
8347
8348 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
8349
8350         * assembly.c: Fix warnings.
8351
8352 2004-08-04  Martin Baulig  <martin@ximian.com>
8353
8354         * class.c
8355         (mono_type_get_name_recurse): Added `gboolean include_arity'
8356         argument specifying whether or not we should include the generic
8357         arity in the type name.
8358         (_mono_type_get_name): New static function.
8359         (mono_class_setup_vtable): If we're a generic instance, don't
8360         include the generic arity in the names of explicit method
8361         implementations.        
8362
8363 2004-08-03  Martin Baulig  <martin@ximian.com>
8364
8365         * class.c (mono_type_get_name_recurse): Enclose the generic type
8366         arguments in `<', '>'.
8367
8368 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8369
8370         * gc.c: make GC warning messages use the trace API, they are just
8371         noise to most of the users.
8372
8373 2004-08-03  Martin Baulig  <martin@ximian.com>
8374
8375         * debug-mono-symfile.c (read_string): Correctly read the string.
8376
8377 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
8378
8379         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8380         
8381         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8382         icalls.
8383         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8384
8385 2004-07-30  Martin Baulig  <martin@ximian.com>
8386
8387         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8388         Reflect latest symbol writer changes.   
8389
8390 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8391
8392         * object.c: always create an object if null is passed
8393         to Invoke() where a valuetype is expected.
8394
8395 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
8396
8397         * marshal.c (mono_marshal_init): make managed
8398         signatures match native ones better for 64bits.
8399
8400 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8401
8402         * appdomain.c: hack to build correctly the private bin path on windows.
8403         Fixes bug #61991.
8404
8405 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
8406
8407         * assembly.c: Load mscorlib from the correct framework directory
8408           (mono/<version>/mscorlib.dll).
8409         * appdomain.h: Added prototypes for new functions.
8410         * internals.h: Added some prototypes.
8411         * domain.c: When initializing the runtime, get from the executable and
8412           the configuration files the runtime version that the app supports.
8413           Added support methods for reading app.exe.config. Added list of versions
8414           supported by the JIT. Added two new methods: mono_init_from_assembly,
8415           which initializes the runtime and determines the required version from
8416           the provided exe file, and mono_init_version, which initializes
8417           the runtime using the provided version.
8418         * icall.c: Get machine.config from version-specific directory.
8419         * reflection.c: When generating an image, embed the version number
8420           of the current runtime.
8421
8422 2004-07-28  Dick Porter  <dick@ximian.com>
8423
8424         * socket-io.c
8425         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8426         returned sockaddr size before creating the remote address object.
8427         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8428         61608.
8429
8430 2004-07-28  Dick Porter  <dick@ximian.com>
8431
8432         * locales.c (string_invariant_compare_char): Fix invariant char
8433         compares between upper and lower cases.  Fixes bug 61458.
8434
8435 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
8436         
8437         * marshal.c: actually cache stelem.ref wrappers.
8438         
8439 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8440
8441         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
8442         sections and remove the mono_cli_rva_map () function.
8443
8444 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8445
8446         * debug-mono-symfile.c: fix one more endianess issue, from a patch
8447         by Geoff Norton (<gnorton@customerdna.com>).
8448
8449 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8450
8451         * class.c: fix class loads for pointer types (typeof(int) !=
8452         typeof(int*)).
8453
8454 2004-07-27  Martin Baulig  <martin@ximian.com>
8455
8456         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8457         reading the debugging information from an external ".mdb" file.
8458
8459 2004-07-24  Martin Baulig  <martin@ximian.com>
8460
8461         * reflection.c (mono_image_get_type_info): Only write a class
8462         layout entry if we actually have a size or a packing size.
8463
8464 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8465
8466         * reflection.c (type_get_fully_qualified_name): 
8467         insert cast to get type checking of ?: with non-gcc compilers
8468
8469 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8470
8471         * rand.c: use g_getenv for both lookups of
8472         MONO_EGD_SOCKET
8473
8474 2004-07-17  Martin Baulig  <martin@ximian.com>
8475
8476         * reflection.c (mono_reflection_bind_generic_method_parameters):
8477         Set `gmethod->reflection_info'.
8478
8479 2004-07-17  Martin Baulig  <martin@ximian.com>
8480
8481         * class.c (mono_class_create_from_typedef): Insert the newly
8482         created class into the hash table before computing the interfaces
8483         since we could be called recursively.
8484
8485 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
8486
8487         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8488         function to implement stelem.ref in managed code
8489         * class-internals.h, debug-helpers.c: a new wrapper type
8490         for the above.
8491
8492 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8493
8494         * gc.c: allow GC handles to work even when no GC is compiled in.
8495         Fix part of bug #61134 (GetAddrOfPinnedObject).
8496
8497 2004-07-13  Peter Williams  <peter@newton.cx>
8498  
8499         * process.c (complete_path): Make sure we don't attempt to execute
8500         directories.
8501  
8502 2004-07-12  Geoff Norton <gnorton@customerdna.com>
8503
8504         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
8505           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
8506           and will add/subtract the hour if needed
8507
8508 2004-07-12  Martin Baulig  <martin@ximian.com>
8509
8510         * reflection.c (mono_field_get_object): If we have
8511         `field->generic_info', take the attributes from
8512         `field->generic_info->generic_type'.    
8513
8514 2004-07-12  Martin Baulig  <martin@ximian.com>
8515
8516         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8517         This function must be called before initializing the runtime.
8518         (mono_debug_init_1): New function; call this after initializing
8519         the runtime, but before loading the assembly.  It tells the
8520         debugger to load corlib and the builtin types.
8521
8522         * mono-debug-debugger.c: Did some larger changes in the debugging
8523         code; support recursive class declarations, make sure we actually
8524         add all classes.
8525
8526 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8527
8528         * debug-helpers.c: undo my previous patch and fixed the real issue in
8529         ../mini/exceptions-x86.c
8530
8531 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8532
8533         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8534         when no HOME env. variable was set and a NullRef was thrown in a .cctor
8535         called from other .cctors.
8536
8537 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
8538
8539         * loader.c: Removed the mono_loader_wine_init hack now that we are
8540         doing a managed version of Windows.Forms.
8541
8542 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
8543
8544         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8545         threadpool.c, threads.c: remove static data from rootset.
8546
8547 2004-07-09  Dick Porter  <dick@ximian.com>
8548
8549         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8550         Don't do any more processing if the matched length was 0.  It was
8551         increasing the size of the string before.  Fixes bug 61167.
8552
8553 2004-07-09  Dick Porter  <dick@ximian.com>
8554
8555         * socket-io.h:
8556         * socket-io.c
8557         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8558         Add support for SO_PEERCRED if its available.
8559
8560 2004-07-09  Peter Bartok <pbartok@novell.com>
8561         * loader.c: winelib.exe.so error message is now only displayed if
8562         MONO_DEBUG is set. To help us avoid questions when people are trying
8563         out the new Managed.Windows.Forms.
8564
8565 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
8566
8567         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
8568         for isinst and castclass wrappers.
8569
8570         * class-internals.h icall.c: Move registration and lookup of JIT icalls
8571         to libmetadata from the JIT, so they could be used by the marshalling
8572         code and the interpreter.
8573
8574         * marshal.c: Register marshalling related JIT icalls here instead of
8575         in mini.c. Use CEE_MONO_ICALL instead of the family of 
8576         CEE_MONO_PROC<x> opcodes to call marshalling functions.
8577
8578         * metadata.h: Remove unneeded marshalling conversions.
8579
8580         * opcodes.c: Update for new opcodes.
8581         
8582 2004-07-08  Martin Baulig  <martin@ximian.com>
8583
8584         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8585         (mono_debug_get_domain_data): Make this function static.
8586
8587 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8588
8589         * gc.c, object.h: add nice GC handle API for embedders.
8590
8591 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
8592
8593         * reflection.c: more changes for the new api
8594
8595         * object.c: When we reflect on a field w/ a constant value, it
8596         will not have a memory location, so we must access metadata. Also,
8597         allow easier reading of strings so that we can read them from
8598         the constant data.
8599
8600         * class.c (mono_class_layout_fields): no need for literal fields here.
8601
8602         * class-internals.h: api changes for const fields
8603
8604         * icall.c (ves_icall_get_enum_info): use new apis for const fields
8605
8606 2004-07-06  Martin Baulig  <martin@ximian.com>
8607
8608         * mono-debug.h: Increment version number to 44.
8609
8610         * mono-debug.c (mono_debug_add_wrapper): The second argument is
8611         now a gpointer, rewrote this whole method.
8612
8613         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8614         function.  Add information about the wrapper in a new "misc table".
8615
8616         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8617         for the new misc table.
8618
8619 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
8620
8621         * metadata-internals.h image.c: Add a cache for helper signatures.
8622
8623         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8624
8625 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
8626
8627         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8628         delegates from a delegate. Fixes #61033.
8629         
8630         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8631         marshalling of stringbuilder arrays. Fixes #59900.
8632
8633 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8634
8635         * icall.c: Add EnumBuilder:setup_enum_type icall.
8636
8637 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
8638
8639         * icall.c: Added a new icall for the property version of
8640         OffsetOfStringData.
8641
8642 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8643
8644         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8645         it has a constant size across platforms.
8646
8647         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8648         stack trace.
8649
8650 2004-06-29  Martin Baulig  <martin@ximian.com>
8651
8652         * mono-debug.c (mono_debug_add_method): Protect the whole function
8653         in mono_debugger_lock(), not just parts of it.
8654
8655 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8656
8657         * reflection.c: make sure padding bytes in heaps are zeroed.
8658
8659 2004-06-24  David Waite  <mass@akuma.org>
8660
8661         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8662         image.c, loader.c, locales.c, marshal.c, metadata.c,
8663         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8664         string-icalls.c, threads.c: change to C90-style comments from C99 /
8665         C++ -style
8666
8667 2004-06-24  Dick Porter  <dick@ximian.com>
8668
8669         * threads.c
8670         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8671         return createdNew.  Fixes bug 60412.
8672
8673         * threads-types.h: 
8674         * icall.c: Add createdNew parameter to CreateMutex icall
8675
8676 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8677
8678         * reflection.c, object-internals.h: save default value in params.
8679
8680 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8681
8682         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8683         no need to build a new path combining that with the application base.
8684         Fixes bug #60442.
8685
8686 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8687
8688         * reflection.c: fixed minor standard compliance issues.
8689
8690 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8691
8692         * reflection.c: fixed issue with encoding some custom attributes
8693         (arrays in properties and fields, bug #60411).
8694
8695 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8696
8697         * reflection.c: fix start address when copying the public key token.
8698
8699 2004-06-23  Martin Baulig  <martin@ximian.com>
8700
8701         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8702         the `exc' object in a static object to put it into the GC's root set.
8703
8704 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8705
8706         * reflection.c: make mono_reflection_setup_internal_class ()
8707         callable a second time to setup a new parent class.
8708
8709 2004-06-23  Dick Porter  <dick@ximian.com>
8710
8711         * threads.c: Check for WAIT_IO_COMPLETION return values.
8712
8713 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
8714
8715         * appdomain.c: Removed the g_free on the public key token. Now copy 
8716         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8717         * assembly.c: Added public key token string value when loading 
8718         assemblies. Fix bug #60439.
8719         * icall.c: Added missing informations (like public key) in 
8720         GetReferencedAssemblies. Fix #60519.
8721         * image.h: Changed definition for public key token from const char*
8722         public_tok_value to guchar public_key_token [17];
8723         * reflection.c: Updated for changes to public key token.
8724
8725 2004-06-22  Lluis Sanchez Gual
8726
8727         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
8728         for the field in base classes.
8729
8730 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8731
8732         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8733         mark headers as not supported, they are installed only for use by the
8734         debugger.
8735
8736 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8737
8738         * *.c, *.h: avoid namespace pollution in public headers.
8739
8740 2004-06-21  Martin Baulig  <martin@ximian.com>
8741
8742         * exception.c (mono_get_exception_security): It's in
8743         "System.Security", not in "System".
8744
8745         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8746         the exception classes.
8747
8748 2004-06-21  Martin Baulig  <martin@ximian.com>
8749
8750         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8751         Protect the exception object from being finalized.
8752
8753 2004-06-21  Martin Baulig  <martin@ximian.com>
8754
8755         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8756         public function.
8757
8758 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
8759
8760         * reflection.c: Load the assembly in mono_reflection_type_from_name,
8761         if it was not loaded before. Fix parts of #60439.
8762
8763 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8764
8765         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8766         code that was broken since Ben's change: wrappers are now
8767         dependent on the method signature only again.
8768
8769 2004-06-21  Martin Baulig  <martin@ximian.com>
8770
8771         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8772         added interface support.
8773
8774 2004-06-21  Martin Baulig  <martin@ximian.com>
8775
8776         * class.c (mono_vtable_get_static_field_data): New public method.
8777
8778 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
8779
8780         * filewatcher.c : Windows build fix to be compliant with API changes.
8781
8782 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8783
8784         * class.h, class.c: more accessors.
8785         * metadata.h, metadata.c: prepare for hiding MonoType and
8786         MonoMethodSignature: people should use the accessors from now on
8787         outside of the tree.
8788
8789 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8790
8791         * *.c, *.h: more API cleanups.
8792
8793 2004-06-18  Jackson Harper  <jackson@ximian.com>
8794
8795         * assembly.c: Trace loading assemblies.
8796         * loader.c: Trace loading native libraries.
8797         * mono-config.c: Trace loading config files.
8798         
8799 2004-06-18  Dick Porter  <dick@ximian.com>
8800
8801         * locales.c: Tell ICU the lengths of strings, it can cope with
8802         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
8803
8804 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8805
8806         * image.c: swapped name/filename;
8807
8808 2004-06-18  Martin Baulig  <martin@ximian.com>
8809
8810         * mono-debug-debugger.c (write_class): Write the parent class at
8811         the end of the header.
8812
8813 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8814
8815         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8816
8817 2004-06-17  Raja R Harinath  <rharinath@novell.com>
8818
8819         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
8820         (bundle_obj): New conditional define.
8821         (BUILT_SOURCES): Remove.
8822         ($(bundle_srcs)): Make parallel-make safe.
8823         (libmonoruntime_la_LIBADD): Make unconditional.
8824         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
8825         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8826
8827 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
8828
8829         * culture-info-tables.h: It was inconsistent with the latest
8830           supp info files.
8831
8832 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
8833
8834         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8835         be loaded.
8836
8837         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8838         with gcc 2.95.
8839
8840 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8841
8842         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8843         cleaned up public header threads.h.
8844
8845 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8846
8847         * Makefile.am, *.c, *.h: more API cleanups.
8848
8849 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8850
8851         * Makefile.am: removed monosn from compilation.
8852         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8853         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8854         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8855         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8856         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8857         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8858
8859 2004-06-15  Jackson Harper  <jackson@ximian.com>
8860
8861         * assembly.c: Make locales lower case when searching the GAC for
8862         assemblies. gacutil will always make locales lowercase when
8863         installing so this effectively makes them case insensitive.
8864         
8865 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
8866
8867         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8868         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8869           parameter which allows to choose whether the wait can be interrupted or 
8870           not. Also added the method mono_monitor_enter(), which locks the monitor
8871           using an infinite wait and without allowing interruption.
8872           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8873           interrupted.
8874         * object.h: Added new fields in MonoThread. suspend_event holds the event
8875           used to susped/resume the thread. synch_lock is the lock object to use for
8876           modifying the thread state.
8877         * threads.c: Use the new synch_lock object for locking, instead of "this",
8878           which can generate deadlocks.
8879           Moved thread state change in Thread.Sleep and Thread.Join from managed
8880           to unmanaged code. This avoids a deadlock when the thread was suspended
8881           just after acquiring the thread lock.
8882           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8883           Implemented Thread.Suspend using an event instead of ThreadSuspend,
8884           which is not fully implemented in the io-layer.
8885         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8886
8887 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8888
8889         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8890         threads-types.h: more API cleanups.
8891
8892 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8893
8894         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8895         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8896         threadpool.c, threads.c: first pass at the exported API cleanup.
8897
8898 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8899
8900         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8901
8902 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8903
8904         * icall.c: added internalGetHome.
8905
8906 2004-06-14  Dick Porter  <dick@ximian.com>
8907
8908         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8909         possible to return successfully when '.' or '..' were the only
8910         entries in a directory, but were skipped.  The MonoIOStat was not
8911         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
8912         Fixes bug 59574.
8913
8914 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8915
8916         * reflection.c: make binaries run on .Net 1.1 by default.
8917
8918 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8919
8920         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8921
8922 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8923
8924         * marshal.c: keep track of struct size with explicit layout
8925         (bug #59979).
8926
8927 2004-06-12  Martin Baulig  <martin@ximian.com>
8928
8929         * mono-debug-debugger.c: Comment out a debugging g_message().
8930
8931 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8932
8933         * reflection.c, reflection.h: do not free custom attrs that are cached.
8934         * icall.c: use braces to make code clearer.
8935
8936 2004-06-11  Martin Baulig  <martin@ximian.com>
8937
8938         * class.h (MonoInflatedField): New type.
8939         (MonoClassField): Replaced `MonoType *generic_type' with
8940         `MonoInflatedField *generic_info'.
8941
8942         * icall.c
8943         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8944
8945 2004-06-11  Martin Baulig  <martin@ximian.com>
8946
8947         * reflection.c (mono_image_create_method_token): Correctly encode
8948         varargs methods.
8949
8950 2004-06-11  Martin Baulig  <martin@ximian.com>
8951
8952         * metadata.c (mono_metadata_parse_method_signature): When parsing
8953         a MethodDef which has VarArgs, also set sentinelpos if we don't
8954         have any parameters.
8955
8956 2004-06-11  Martin Baulig  <martin@ximian.com>
8957
8958         * verify.c (mono_method_verify): In CEE_CALL, use
8959         mono_method_get_signature() to get the method's signature, unless
8960         we're a PInvoke method.
8961
8962 2004-06-10  Jackson Harper  <jackson@ximian.com>
8963
8964         * assembly.c: Use <path>/lib/mono/gac for the extra paths
8965         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8966         logical name as the supplied path is just a prefix to the gac not
8967         the direct path to it.
8968         
8969 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8970
8971         * reflection.c: make the token for a created method match
8972         the token of the MethodBuilder it was created from
8973         (IKVM requires this behaviour now).
8974
8975 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8976
8977         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8978         reflection.c, socket-io.c: leak fixes.
8979
8980 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
8981
8982         * icall.c: handle sentinel pos in vararg methods in position different
8983         from 0.
8984
8985 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8986
8987         * culture-info-tables.h: freshly generated.
8988
8989 2004-06-09  Martin Baulig  <martin@ximian.com>
8990
8991         * loader.c (mono_get_method_constrained): Call `mono_class_init
8992         (constrained_class)'.   
8993
8994 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
8995
8996         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
8997         any methods. Fixes #59629.
8998
8999 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9000
9001         * culture-info-tables.h: reflecting locale-builder updates.
9002
9003 2004-06-08  Dick Porter  <dick@ximian.com>
9004
9005         * object.h:
9006         * locales.c: Fixed compile warnings, including a real bug in
9007         CompareInfo_internal_compare.
9008         
9009 2004-06-08  Dick Porter  <dick@ximian.com>
9010
9011         * locales.c
9012         (ves_icall_System_Globalization_CompareInfo_internal_index):
9013         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9014         Double-check the resuls of usearches, because ICU currently
9015         ignores most of the collator settings here.  Fixes bug 59720.
9016         
9017 2004-06-08  Dick Porter  <dick@ximian.com>
9018
9019         * locales.c
9020         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9021         Fix memory leak and segfault-causing typo.  No idea how this one
9022         lasted so long without being noticed.
9023
9024 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
9025
9026         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9027         any methods. Fixes #59629.
9028
9029 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9030
9031         * assembly.c:
9032         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9033         own the critical section before). Removed dead code (that's done
9034         in the preload hook).
9035
9036         (mono_assembly_load_with_partial_name): call the preload hook.
9037
9038 2004-06-08  Martin Baulig  <martin@ximian.com>
9039
9040         * metadata.c (mono_metadata_signature_alloc): Default
9041         `sentinelpos' to -1.
9042
9043         * reflection.c (mono_image_get_array_token): Likewise.
9044
9045 2004-06-08  Martin Baulig  <martin@ximian.com>
9046
9047         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9048
9049         * metadata.c (mono_metadata_parse_method_signature): When parsing
9050         a MethodDef which has VarArgs, set sentinelpos.
9051
9052         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9053         `gint16' since we're using -1 for non-varargs methods.
9054
9055         * reflection.c
9056         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9057         (method_encode_signature): Added varargs support.
9058         (method_builder_encode_signature): Likewise.
9059         (mono_image_get_varargs_method_token): New static method.
9060         (mono_image_create_method_token): New public method; this is
9061         called via an icall instead of mono_image_create_token() when
9062         calling a varargs method.       
9063
9064 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
9065
9066         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9067
9068 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9069
9070         * culture-info-tables.h : Reflecting the latest locale-builder that
9071           fixed empty array representation ({} to {0}).
9072
9073 2004-06-07  Jackson Harper  <jackson@ximian.com>
9074
9075         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9076         looking up extra gac paths. This allows MONO_GAC_PATH to act
9077         exactly like a prefix.
9078         
9079 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9080
9081         * reflection.c (mono_reflection_type_from_name): Make a copy of the
9082         type name before modifying it. Fixes #59405.
9083
9084 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9085
9086         * culture-info.h: added fields for "all datetime patterns".
9087         * locales.c: (  ves_icall_System_Globalization_CultureInfo
9088           _construct_datetime_format ()): fill xxx_patterns fields.
9089         * object.h: added fields for "all datetime patterns" to
9090           MonoDateTimeFormatInfo.
9091         * culture-info-tables.h: reflecting locale-builder updates.
9092
9093 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9094
9095         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9096         the event has no add and remove methods. Fixes #59629.
9097
9098 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
9099
9100         * object.c: Fixed possible integer overflow when allocating large
9101         strings.
9102
9103 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9104
9105         * culture-info-tables.h: reflecting locale-builder updates.
9106
9107 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9108
9109         * culture-info-tables.h: reflecting locale-builder updates.
9110
9111 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
9112
9113         * culture-info-tables.h: reflecting locale-builder updates.
9114
9115 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
9116
9117         * threads.c: Made Thread.Sleep abortable.
9118
9119 2004-06-02  Martin Baulig  <martin@ximian.com>
9120
9121         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9122
9123         * debug-mono-symfile.h: Bumped symbol file version number to 37.
9124
9125 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
9126
9127         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9128
9129 2004-05-30  Jackson Harper  <jackson@ximian.com>
9130
9131         * reflection.c: Do not hardcode assembly versions or public key
9132         tokens anymore. All of this except the corlib section was dead
9133         code anyways.
9134         
9135 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
9136
9137         * object.c (mono_runtime_invoke_array): Automatically create boxed
9138         objects for byref valuetypes if needed. Fixes #59300.
9139         
9140         * object.c (mono_method_return_message_restore): Handle 
9141         MONO_TYPE_OBJECT as well.
9142
9143 2004-05-28  Jackson Harper  <jackson@ximian.com>
9144
9145         * reflection.c: The modified type encoding was causing build
9146         problems. Reverted for now.
9147         
9148 2004-05-28  Jackson Harper  <jackson@ximian.com>
9149
9150         * reflection.c/h: Take an assembly ref so that we dont create
9151         fully qualified names when encoding types in the same assembly as
9152         the custom attribute being emitted.
9153         * appdomain.c: Increment version number.
9154         
9155 2004-05-26  Duncan Mak  <duncan@ximian.com>
9156
9157         * icall.c
9158         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9159         Set the full version number (major, minor, build, revision).
9160
9161 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
9162
9163         * marshal.c (emit_struct_conv): increment src/dst after blit
9164         (mono_marshal_get_managed_wrapper,
9165         mono_marshal_get_native_wrapper): make sure we have marshalling
9166         info before marshalling params (info computation affects
9167         blittable)
9168
9169         * class.c (class_compute_field_layout): correctly deal with
9170         blittable
9171         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9172         value types (as per what windows dows by default)
9173         (mono_class_setup_mono_type): System.ValueType is blittable
9174         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9175         blittable
9176
9177         * marshal.c (mono_marshal_load_type_info): flag types  as
9178         non-blittable if the native layout doesn't match the managed
9179         layout
9180
9181 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9182
9183         * appdomain.c: don't add stuff in the private search path that is
9184         above the application base. If application base is not set, there's
9185         no private search path.
9186
9187 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
9188
9189         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9190         byref struct arguments in native->managed marshalling.
9191
9192 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
9193
9194         * marshal.c (mono_marshal_get_runtime_invoke): correctly
9195         cache methods using signature (special case for methods
9196         that are value type or string class)
9197         
9198         * image.c (mono_image_close): clean up allocated GSList's
9199         in runtime_invoke_cache.
9200
9201 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9202
9203         * mono-config.c: set the correct path for mono_cfg_dir on windows when
9204         there's no MONO_CFG_DIR environment variable defined.
9205
9206 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9207
9208         * threads.c: windows version must be >= 0x0500 to include OpenThread.
9209
9210 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
9211
9212         * threadpool.c: Really wait for 500ms after the async call, even if the wait
9213           is interrumped.
9214         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9215           before waiting for it, and call CloseHandle after the wait to unref it.
9216           This will make sure that handles are not disposed too early.
9217
9218 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9219
9220         * appdomain.c:
9221         * appdomain.h:
9222         * icall.c: removed
9223         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9224         needed now.
9225
9226         * object.c: se the application_base only for the domain that runs
9227         Main. Fixes bug #59216,
9228
9229 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9230
9231         * appdomain.c:
9232         * object.c: only the domain in which Main is run have
9233         SetupInformation.ConfigurationFile set, so moved a few lines from
9234         appdomain.c to object.c.
9235
9236 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9237
9238         * appdomain.c: we tried to load [name].(dll|exe), but according
9239         to bug #57710, we must also try [culture]/[name].(dll|exe) and
9240         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9241         There's a test case attached to bug #58922.
9242
9243 2004-05-27  Dick Porter  <dick@ximian.com>
9244
9245         * icall.c:
9246         * file-io.c: Implemented icalls for locking and unlocking regions
9247         in a file.
9248         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9249         FALSE on error (fixes both compiler warning and real bug.)
9250
9251 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
9252
9253         * culture-info-tables.h: reflecting locale-builder updates.
9254
9255           (Added missing ChangeLog entry for 05/26)
9256
9257 2004-05-27  Jackson Harper  <jackson@ximian.com>
9258
9259         * locales.c: Fix some cut and paste errors.
9260         
9261 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9262
9263         * mono-config.c: set the correct path for config. directory on windows.
9264
9265 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9266
9267         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9268           on win32.
9269
9270 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9271
9272         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9273         from pinvoke functions.
9274         
9275         * marshal.c (mono_ftnptr_to_delegate): Implement this.
9276
9277 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9278
9279         * culture-info-tables.h: reflecting locale-builder updates.
9280
9281 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9282
9283         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9284         #59086.
9285
9286 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
9287
9288         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9289         * icall.c: Modified icalls for RNG.
9290         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
9291         Windows (CryptoAPI).
9292
9293 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9294
9295         * locales.c: Fix build.
9296
9297 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9298
9299         * culture-info-tables.h: reflecting locale-builder updates.
9300
9301 2004-05-25  Jackson Harper  <jackson@ximian.com>
9302
9303         * locales.c: When creating the current culture use the $LANGs
9304         specific culture. So DateTimeFormat and NumberFormat entries are created.
9305         
9306 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9307
9308         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9309         a char array as parameter.
9310
9311 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
9312
9313         * image.c: In mono_image_open(), always use an absolute path name to
9314           look for already loaded images.
9315
9316 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
9317
9318         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9319         missing in the windows build (like older cygwin include files).
9320
9321 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
9322
9323         * icall.c: Fixed check for possible integer overflow in Buffer_
9324         BlockCopy icall. Replaced comments style // by /* */.
9325
9326 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
9327
9328         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9329         
9330         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9331         check after MONO_VTADDR. Fixes pinvoke2.exe.
9332
9333         * marshal.h marshal.c metadata.h: Add beginnings of support for
9334         ftnptr -> delegate marshalling.
9335
9336 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
9337
9338         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9339         * threads.c: Fix warnings.
9340
9341 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
9342
9343         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9344         * icall.c: Registered icalls for Suspend and Resume.
9345         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9346           Thread.Abort.
9347         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9348         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9349         * process.c: Use WaitForSingleObjectEx.
9350         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
9351           checkpoints.
9352         * threads.c, threads.h: Make use of new Ex wait methods. Improved
9353           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9354           for Suspend and Resume. Added new mono_thread_stop, used for stoping
9355           background threads. Added basic support for Abort in Windows.
9356           Start new threads using a managed delegate invoke wrapper. This wrapper
9357           has an interruption checkpoint that is needed since an interruption
9358           can be requested before the thread leaves the unmanaged code that starts 
9359           the thread.
9360         * marshal.c: Added interruption checkpoint after every native call, and
9361           also before managed calls for wrappers called from unmanaged code to
9362           go into managed code.
9363         * object.h: Added new field in MonoThread to keep track of interruption
9364           requests.
9365
9366 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
9367
9368         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9369         calls.
9370
9371 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9372
9373         * appdomain.c:
9374         * assembly.c:
9375         * gc.c:
9376         * locales.c:
9377         * mono-config.c:
9378         * rand.c: getenv -> g_getenv (windows!)
9379
9380         * process.c: complete_path is also used on non-windows platforms.
9381
9382 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9383
9384         * icall.c: new signature for Process_Start.
9385
9386         * process.[ch]: new signature for Process_Start. If we're on windows
9387         and UseShellExecute is false, we have to search for the program by
9388         ourselves if we don't get a full path.
9389
9390 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9391
9392         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
9393         marshalling and call CleanUpNativeData if needed. Fixes #58646.
9394
9395 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9396
9397         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9398         Fixes bug #58373.
9399
9400 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9401
9402         * process.c: use double quotes to quote program name and arguments on
9403         windows. Fixes bug #58575.
9404
9405 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9406
9407         * file-io.c: don't return "." and ".." when using windows Find*File.
9408
9409 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
9410
9411         * marshal.c: Don't pass wrappers to message init because method 
9412         addressed used to lookup metadata. part of remoting[2|3] fix.
9413
9414 2004-05-15  Jackson Harper  <jackson@ximian.com>
9415
9416         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9417         path is essentially the same as MONO_PATH except that it points to
9418         GACs instead of lib directories.
9419         * loader.h: The user gac is gone so we dont need function to
9420         enable/disable it.
9421         * mono-config.c: user gac option is now gone.
9422         
9423 2004-05-15  Jackson Harper  <jackson@ximian.com>
9424
9425         * culture-info.h: Make defines more consistent, add calendar data
9426         to the culture info table.
9427         * culture-info-tables.h: Add basic calendar data. Basically
9428         everyone gets default gregorian until all the data is
9429         updated.
9430         * locales.c: Use the new consistent defines. Set calendar data for
9431         culture info objects.
9432         * object.h: add a field for calendar data to CultureInfo
9433         
9434 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
9435
9436         * image.c: image->runtime_invoke_cache is keyed on signatures now.
9437         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9438         a signature.
9439         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9440         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9441         an extra param that is the pointer of the method to invoke. The IL for
9442         the invoke method is no longer specific to the method, but to the
9443         signature of the method. Thus, we can share the same code for multiple
9444         methods. This reduces the number of methods that have to be compiled.
9445
9446 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
9447
9448         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9449
9450         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9451
9452         * icall.c: Optimize Buffer.BlockCopy.
9453
9454 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9455
9456         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9457         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9458         quote). Changed them to "MMMM yyyy".
9459
9460 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
9461
9462         * rand.c
9463         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
9464
9465 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
9466
9467         * reflection.h: Updated after changes to managed structures.
9468
9469         * appdomain.c: Bump corlib version.
9470
9471 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9472
9473         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9474         windows.
9475
9476 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9477
9478         * Makefile.am: link to ../os/libmonoos.la on windows.
9479
9480         * assembly.c:
9481                 -If MONO_DEBUG, warn about non-existing directories in
9482                 MONO_PATH.
9483                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9484                 compile time variable.
9485                 -Removed init_default_path and call mono_set_rootdir from
9486                 libmonoos.a instead (windows only).
9487
9488         * assembly.h: declare mono_assembly_getrootdir().
9489
9490         * domain.c:
9491         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9492
9493         * loader.c: s/getenv/g_getenv/
9494
9495 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
9496
9497         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9498
9499         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9500
9501         * metadata.h: Add new marshalling conversions.
9502
9503         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9504         function.
9505
9506         * reflection.c (mono_reflection_get_type): Lookup the type in all
9507         modules of a multi-module assembly. Fixes #58291.
9508
9509 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
9510
9511         * threads.c: Before aborting a background, set the StopRequested
9512         state.  This avoids throwing the Abort exception.
9513         In mono_thread_manage, don't continue with the shutdown until all
9514         aborted threads have actually stopped.
9515
9516 2004-05-10  Jackson Harper  <jackson@ximian.com>
9517
9518         * locales.c: Remove the modifier from culture names.
9519         
9520 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9521
9522         * Makefile.am: monosn is not installed any more. It has been deprecated
9523         in favor of sn.
9524
9525 2004-05-07  Jackson Harper  <jackson@ximian.com>
9526
9527         * locales.c
9528         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9529         Fix array construction, add bailout if the length is 0.
9530
9531 2004-05-07  Dick Porter  <dick@ximian.com>
9532
9533         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9534         machine doesn't have a DNS entry.  Patch by Urs Muff
9535         (umuff@quark.com), fixes bug 57928.
9536
9537 2004-05-06  Jackson Harper  <jackson@ximian.com>
9538
9539         * reflection.c: Handle null PublicTokens properly. alloc mem for
9540         assembly names culture so we dont crash when freeing it.
9541         
9542 2004-05-06  Jackson Harper  <jackson@ximian.com>
9543
9544         * assembly.c: Check the usergac when loading with partial names.
9545         
9546 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9547
9548         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
9549         does nothing for now (not required for Linux/Windows) but the class
9550         library can call it (and a newer or modified runtime could need it).
9551         * icall.c: Registred icall.
9552
9553 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9554
9555         * loader.c: prints a message on module loading error we set MONO_DEBUG
9556         environment variable.
9557
9558 2004-05-05  Jackson Harper  <jackson@ximian.com>
9559
9560         * appdomain.c: Handle PublicKeyToken=null properly.
9561         
9562 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9563
9564         * environment.c|h: Added icall ves_icall_System_Environment_
9565         GetOSVersionString to get the current OS version as a string.
9566         * icall.c: Registred icall.
9567
9568 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
9569
9570         * object.c: in mono_object_get_virtual_method(), take into account that
9571         non-virtual methods don't have a slot in the vtable. Check needed when
9572         the object is a proxy.
9573
9574 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
9575
9576         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9577         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9578
9579         * object.c (mono_class_compute_gc_descriptor): Fix warning.
9580
9581         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9582         passed when a valuetype is expected.
9583
9584         * object.c (mono_unhandled_exception): Only set the exit code if the
9585         exception happens in the main thread. Fixes thread5.exe.
9586
9587         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9588         invalid names. Fixes #58047.
9589
9590 2004-05-03  Jackson Harper  <jackson@ximian.com>
9591
9592         * assembly.c: This line was committed accidently and is unneeded.
9593         
9594 2004-05-03  Jackson Harper  <jackson@ximian.com>
9595
9596         * icall.c: Add new icall for Assembly::LoadWithPartialName
9597         * assembly.c/.h: new function that probes the GAC to load partial
9598         assembly names by Paolo Molaro.
9599         
9600 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9601
9602         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9603         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9604         (type_get_fully_qualified_name): Added PublicKeyToken when building a
9605         full type name.
9606
9607 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9608
9609         * appdomain.c: fixed check for 'neutral' culture and removed warning.
9610         * reflection.c: fix bug when parsing a full type name and Version is not
9611         the last thing in the string.
9612
9613 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
9614
9615         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9616         crashes when it is freed.
9617
9618 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9619
9620         * assembly.c: print the compat warning to stderr.
9621
9622 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
9623
9624         * assembly.c (mono_assembly_load_references): Add a compatibility
9625         hack to run old applications that might be still referencing the
9626         3300-based assemblies, only do this for System.xxx.
9627
9628 2004-05-01  Jackson Harper  <jackson@ximian.com>
9629
9630         * appdomain.c: If the culture is neutral we set it to "".
9631         
9632 2004-04-29  Jackson Harper  <jackson@ximian.com>
9633
9634         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9635
9636 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9637  
9638         * string-icalls.c: added low overhead function for copying chars
9639         * icall.c: added needed icall for the above function
9640  
9641 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9642
9643         * icall.c: fix return value of get_global_assembly_cache.  Implemented
9644         Environment.GetLogicalDrives.
9645
9646 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
9647
9648         * rand.c: try and talk to egd or prngd
9649         for random bytes if opening devices fail.
9650
9651 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
9652
9653         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9654         alignment for the type using the native alignment of its members 
9655         instead of using klass->min_align.
9656
9657         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9658
9659 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9660
9661         * file-io.c:
9662         * socket-io.c: added check for sys/aio.h.
9663
9664 2004-04-28  Dick Porter  <dick@ximian.com>
9665
9666         * threads.c: Don't abort a thread thats already aborting, when
9667         terminating everything.
9668
9669 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9670
9671         * icall.c: added 2 new async calls for Socket.
9672
9673         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9674         IO on *nix systems.
9675
9676         * threadpool.c: removed unused variable.
9677
9678 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
9679
9680         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9681
9682 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9683
9684         * locales.c: put back string_invariant_tolower () and
9685         string_invariant_toupper ().
9686
9687 2004-04-26 David Waite <mass@akuma.org>
9688
9689         * file-io.h:
9690         * socket-io.h:
9691         * threads.h:
9692         * unicode.h: remove comma from end of enumeration declarations
9693
9694 2004-04-26 David Waite <mass@akuma.org>
9695
9696         * debug-mono-symfile.h:
9697         * decimal.c:
9698         * mono_debug.h:
9699         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9700
9701
9702 2004-04-26  Jackson Harper  <jackson@ximian.com>
9703
9704         * appdomain.c: Increment version number.
9705         
9706 2004-04-26  Jackson Harper  <jackson@ximian.com>
9707
9708         * appdomain.c: Set assembly references public token value when
9709         PublicKeyToken is specified, not the hash_value. Free public token
9710         values when free assembly name data. Previously the public key
9711         token was hex decoded, however we are using hex encoded public key
9712         tokens, so this is not neccasary.
9713         * assembly.c: Lookup assemblies in the gac if their public token
9714         value is set. Add function to allow enabling user gac
9715         lookups. Specify whether or not the assembly was loaded from the
9716         GAC. Compare full assembly names when checking the cache for
9717         assemblies (Temporarily disabled see comment in code). Remove
9718         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9719         specifies trace-loader they get extra info to stdout on the
9720         loading of assemblies.
9721         * image.h: Add a field for an assembly references public token
9722         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9723         whether an assembly has been loaded from the GAC.
9724         * image.c: Remove a corlib -> mscorlib name mapping.
9725         * loader.h: Add function to enable/disable the user gac.
9726         * mono-config.c: Check if the usergac is enabled in the config
9727         file.
9728         * icall.c: New icall to determine whether or not an assembly has
9729         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9730         * tabldefs.h: Add constant for assemblyref flag that specifies a
9731         full public key is used instead of a public token.
9732         * reflection.c: Remove mscorlib -> corlib mappings. Set
9733         PublicTokenValue instead of hash value. This value is a hex
9734         string so it does not need to be expanded.
9735
9736 2004-04-26  Martin Baulig  <martin@ximian.com>
9737
9738         * mono-debug-debugger.c (mono_debugger_initialize): Set
9739         `mono_debugger_initialized' before calling mono_debug_lock().
9740
9741 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
9742
9743         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9744           InternalToUpper/InternalToLower.
9745         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9746           removed invariant culture shortcut.  This is now done in managed code.
9747         * locales.c: (string_invariant_toupper/tolower) removed.
9748
9749 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9750
9751         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9752         Added Poll internal call.
9753
9754         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9755         call for Poll. Select was too heavy for polling a single socket.
9756
9757         * threadpool.[ch]: added mono_threadpool_cleanup.
9758         * threads.c: use it. Don't use Thread_Abort on windows.
9759
9760 2004-04-23  Martin Baulig  <martin@ximian.com>
9761
9762         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9763
9764 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
9765
9766         * icall.c: Registred new icalls for key pair protection and added an
9767         icall for Environment.GetFolderPath on Windows.
9768         * security.c|h: Added new icalls for key pair protection.
9769
9770 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9771
9772         * socket-io.c: don't display the non-supported family warning for known
9773         families. Now this is not displayed on windows when checking support
9774         for IPv4/IPv6.
9775
9776 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9777
9778         * class.c: don't display the layout warning for static fields.
9779
9780 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
9781
9782         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9783         * locales.c, locales.h: Added new icalls for culture-specific
9784         Char.ToLower and Char.ToUpper.
9785
9786 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9787
9788         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9789         by David Waite.
9790
9791 2004-04-20  Martin Baulig  <martin@ximian.com>
9792
9793         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9794         of the type name before passing it to mono_reflection_type_from_name().
9795
9796 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9797
9798         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9799         encodings here. Fixes #56965.
9800
9801 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
9802
9803         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9804         fix test on strstr result not that I can see anything that
9805         relies on the result.
9806
9807 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
9808
9809         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9810         Fixes #57081.
9811
9812         * marshal.c (mono_marshal_get_string_encoding): New helper function.
9813
9814         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9815         function to determine which marshalling to use for strings. Fixes
9816         #56965.
9817
9818         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9819
9820         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9821
9822 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
9823
9824         * icall.c: #include mono-config.h
9825
9826 2004-04-15  Jackson Harper  <jackson@ximian.com>
9827
9828         * culture-info-tables.h: Fix date formats for en-US culture.
9829         
9830 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
9831
9832         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
9833         ThreadPool.SetMinThreads.
9834         * threadpool.c: Implemented ThreadPool.GetMinThreads and
9835         ThreadPool.SetMinThreads.
9836
9837 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9838
9839         * mono-config.c: also load the .config file in the directory
9840         where the assembly was found.
9841
9842 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9843
9844         * assembly.c: load per-assembly config files.
9845         * icall.c: decrapified code to get the config dir and moved to
9846         mono-config.c.
9847         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9848         per-assembly config files. When doing a dll map lookup give precedence
9849         to the per-assembly data.
9850
9851 2004-04-14  Martin Baulig  <martin@ximian.com>
9852
9853         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9854         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9855         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9856
9857         * mono-debugger-debugger.c: While the debugger is locked, remember
9858         whether the symbol tables have changes and send one single
9859         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9860
9861 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
9862
9863         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9864
9865         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
9866         function.
9867
9868         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9869         account when marshalling string arrays. Fixes #56965.
9870
9871 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
9872
9873         * icall.c: Add new icalls mapping for security.
9874         * security.c|h: Add internal calls for WindowsIdentity,
9875         WindowsImpersonationContext and WindowsPrincipal.
9876
9877 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
9878
9879         * class.c: Added comment to ensure the System.MonoDummy class
9880         is removed when no longer necessary
9881
9882 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
9883
9884         * appdomain.c: Pass arguments to the bootstraping exceptions to
9885         minimize JITed methods at boot
9886
9887         * metadata.c (mono_exception_from_name_two_strings): Allow for the
9888         second string to be null.
9889
9890         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9891         Change the protocol to minimize the JIT methods at startup.  Now
9892         it Returns the internal codepage, if the value of "int_code_page"
9893         is 1 at entry, and we can not compute a suitable code page
9894         number, returns the code page as a string.
9895
9896 2004-04-13  Jackson Harper  <jackson@ximian.com>
9897
9898         * culture-info-tables.h: Fix number of decimal digits for all
9899         english locales.
9900
9901 2004-04-13  Jackson Harper  <jackson@ximian.com>
9902
9903         * icall.c: Clairfy out of sync error message. It is not always
9904         your corlib that is out of sync.
9905
9906 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
9907
9908         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9909         properties when only the set accessor is overriden. Fixes #55874.
9910
9911 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
9912
9913         * assembly.c (mono_assembly_load_references): Make this thread safe.
9914         Fixes #56327.
9915
9916 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
9917
9918         * monosn.c: Add missing initialization calls.
9919
9920 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
9921
9922         * locales.c:
9923         ves_icall_System_Globalization_CultureInfo_construct_number_format
9924         Fix g_assert so it compiles on fussier compilers re int/ptr
9925         mismatch
9926
9927 2004-04-08  Dick Porter  <dick@ximian.com>
9928
9929         * socket-io.h:
9930         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
9931         53992.  Also rearrange the code so that the internal calls return
9932         an error value and exceptions are thrown from managed code.
9933
9934         * icall.c: Add type info to the socket icalls.
9935
9936 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9937
9938         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9939         owes me a beer.
9940
9941 2004-04-07  Martin Baulig  <martin@ximian.com>
9942
9943         * class.c (mono_class_from_generic_parameter): Don't default
9944         `klass->parent' to `mono_defaults.object_type'.
9945
9946 2004-04-07  Martin Baulig  <martin@ximian.com>
9947
9948         * reflection.c (mono_reflection_initialize_generic_parameter): Set
9949         `param->pklass->reflection_info'.       
9950
9951 2004-04-07  Jackson Harper  <jackson@ximian.com>
9952
9953         * culture-info-tables.h: Fix date separator symbol.
9954         
9955 2004-04-07  Martin Baulig  <martin@ximian.com>
9956
9957         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9958         from System.Type to System.MonoType.
9959
9960 2004-04-07  Martin Baulig  <martin@ximian.com>
9961
9962         * reflection.h
9963         (MonoReflectionGenericParam): Added `has_reference_type' and
9964         `has_value_type' fields.
9965
9966         * reflection.c (mono_image_get_generic_param_info): Encode the
9967         correct flags if we have the `class' or `struct' constraint.
9968
9969 2004-04-07  Martin Baulig  <martin@ximian.com>
9970
9971         * reflection.h
9972         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9973
9974 2004-04-07  Jackson Harper  <jackson@ximian.com>
9975
9976         * appdomain.c: Revert extra patches, just wanted to bump the
9977         version number.
9978         
9979 2004-04-07  Jackson Harper  <jackson@ximian.com>
9980
9981         * Makefile.am: Add culture-info private headers.
9982         * icall.c: Add new icalls for contructing locales.
9983         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
9984         * locales.h: Declare new culture info construction methods.
9985         * object.h: Add new fields used to avoid the CultureMap to
9986         MonoCultureInfo.
9987         * culture-info.h: Definition of structs used in the culture info
9988         tables.
9989         * culture-info-tables.h: Autogenerated tables that contain culture
9990         info data. This file was generated with the locale-builder tool.
9991         * appdomain.c: Incement corlib version number.
9992         
9993 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
9994
9995         * appdomain.c: (mono_runtime_init) move mono_thread_init
9996         to before mono_object_new calls so critical sections
9997         are initialized before use.
9998
9999 2004-04-07  Martin Baulig  <martin@ximian.com>
10000
10001         * icall.c
10002         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10003         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10004         (ves_icall_MonoGenericParam_initialize): Removed.
10005         (monogenericparam_icalls): Removed.
10006         (generictypeparambuilder_icalls): Added new table for
10007         System.Reflection.Emit.GenericTypeParameterBuilder.
10008
10009         * reflection.c
10010         (mono_reflection_define_generic_parameter): Removed.
10011         (mono_reflection_initialize_generic_parameter): This is now called
10012         from GenericTypeParameterBuilder's .ctor.
10013
10014 2004-04-06  Martin Baulig  <martin@ximian.com>
10015
10016         * class.c (mono_class_init): Don't inflate nested classes in a
10017         generic instance.
10018         (mono_type_get_name_recurse): Include the generic arguments for
10019         generic instances and generic type declarations.
10020         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10021         (_mono_class_get_instantiation_name): Removed.
10022         (mono_class_create_generic): Always use `gklass->name' as our name.
10023
10024         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10025
10026         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10027         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10028         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10029         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10030         closed generic methods here.
10031
10032         * reflection.c
10033         (mono_reflection_generic_inst_get_nested_types): Removed.
10034         (inflate_mono_method): Copy the generic parameters from the
10035         MonoMethodHeader into out MonoGenericMethod.
10036
10037 2004-04-06  Martin Baulig  <martin@ximian.com>
10038
10039         * row-indexes.h
10040         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10041
10042         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10043
10044         * reflection.c (build_compressed_metadata): If we have any entries
10045         in the GenericParam, MethodSpec or GenericParamConstraint tables,
10046         set the header version to 1.1.
10047
10048 2004-04-06  Martin Baulig  <martin@ximian.com>
10049
10050         * class.c (mono_class_init): If we're a generic instance,
10051         initialize our nested classes, too.
10052         (_mono_class_get_instantiation_name): Deal with the new `!%d'
10053         suffix. 
10054
10055 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10056
10057         * process.c: quote the argument passed to the shell on windows.
10058
10059 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10060
10061         * threads.c (mono_alloc_special_static_data): Allow this to be
10062         called during startup.
10063
10064 2004-04-02  Martin Baulig  <martin@ximian.com>
10065
10066         * icall.c
10067         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10068
10069 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
10070
10071         * icall.c: Fix build.
10072
10073 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
10074
10075         * Makefile.am: Added security.c|h.
10076         * icall.c: Added icall for get_UserName;
10077         * security.c: New file for security related icalls. Added function
10078         get_UserName for System.Environment (fix #56144).
10079         * security.h: New. Header file for security.c
10080
10081 2004-04-02  Dick Porter  <dick@ximian.com>
10082
10083         * icall.c: Deleted the icalls that were obsoleted some time ago
10084         by the ICU string code, and which were mixed into the icall
10085         rearranging.  Fixes bug 55969.
10086
10087         * string-icalls.h: 
10088         * string-icalls.c: Deleted the code that those icalls reference.
10089
10090 2004-04-01  Martin Baulig  <martin@ximian.com>
10091
10092         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10093
10094         * class.c (mono_class_from_generic_parameter): Don't set 
10095         TYPE_ATTRIBUTE_INTERFACE.
10096         (my_mono_class_from_generic_parameter): Likewise.
10097
10098 2004-04-01  Martin Baulig  <martin@ximian.com>
10099
10100         * loader.c (find_method): Added an optional `MonoClass *ic'
10101         argument to search in a specific interface.
10102         (mono_get_method_constrained): New public function.
10103
10104 2004-04-01  Martin Baulig  <martin@ximian.com>
10105
10106         * reflection.c (mono_image_get_generic_field_token): Use the
10107         `handleref' cache here.
10108
10109 2004-04-01  Martin Baulig  <martin@ximian.com>
10110
10111         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10112
10113         * reflection.c (create_generic_typespec): Use the `typespec' hash
10114         here, not the `typeref' one.    
10115
10116 2004-04-01  Martin Baulig  <martin@ximian.com>
10117
10118         * class.c (mono_class_inflate_generic_type): Moved the
10119         functionality into a new static inflate_generic_type() which
10120         returns NULL if it didn't do anything.  Only increment the
10121         `mono_stats.inflated_type_count' if we actually inflated
10122         something.
10123         (mono_class_get_full): Check the classes type to see whether we
10124         need to inflate it; also inflate MONO_TYPE_(M)VAR.
10125
10126 2004-04-01  Jackson Harper  <jackson@ximian.com>
10127
10128         * reflection.c: Set culture for assembly references.
10129         
10130 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
10131
10132         * reflection.[ch], icall.[ch], Fix support for pinning variables.
10133
10134 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10135
10136         * assembly.c:
10137         (do_mono_assembly_open): the critical section also covers
10138         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10139
10140 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10141
10142         * threads.c:
10143         (mono_manage_threads): abort the background threads when finishing.
10144         Fixes bug #47232.
10145
10146 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10147
10148         * gc.c: only close the done_event handle if there was no timeout.
10149         C-ified comments.
10150
10151 2004-03-30  Martin Baulig  <martin@ximian.com>
10152
10153         * icall.c (icall_entries): It's called "System.Activator", not
10154         "System.Activation".    
10155
10156 2004-03-30  Martin Baulig  <martin@ximian.com>
10157
10158         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10159         (mono_class_create_from_typespec): Likewise.
10160
10161 2004-03-30  Martin Baulig  <martin@ximian.com>
10162
10163         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10164         `has_ctor_constraint' and `initialized'.
10165
10166 2004-03-30  Martin Baulig  <martin@ximian.com>
10167
10168         * reflection.c (encode_new_constraint): New static function to add
10169         the constructor constraint attribute to a type parameter.
10170         (encode_constraints): Call encode_new_constraint() if necessary.
10171
10172         * reflection.h
10173         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10174
10175         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10176         
10177 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
10178
10179         * reflection.c, icall.c: add support for pinning variables. 
10180
10181 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
10182
10183         * marshal.c (mono_marshal_get_managed_wrapper):
10184         init bool local with zero rather than null.
10185
10186 2004-03-29  Martin Baulig  <martin@ximian.com>
10187
10188         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10189         the "official" behavior here.
10190         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10191
10192 2004-03-29  Martin Baulig  <martin@ximian.com>
10193
10194         * icall.c: Reflect latest API changes.
10195
10196 2004-03-29  Martin Baulig  <martin@ximian.com>
10197
10198         * loader.c (mono_get_method_from_token): Also call
10199         mono_metadata_load_generic_params () for abstract and interface
10200         methods; replace the type arguments in the method signature with
10201         the ones which are loaded from the metadata.
10202
10203 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
10204
10205         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10206         of the lock is not the current thread. MS.NET don't do it, in spite of
10207         what the documentation says. See bug #56157.
10208
10209 2004-03-28  Martin Baulig  <martin@ximian.com>
10210
10211         * class.c (mono_class_init): Don't call init_properties() and
10212         init_events() for generic instances; set `prop->parent' when
10213         inflating properties.
10214
10215         * reflection.c (mono_generic_inst_get_object): Call
10216         `mono_class_init (ginst->klass)'.
10217         (mono_type_get_object): Only create a MonoGenericInst if your
10218         generic type is a TypeBuilder.
10219         (do_mono_reflection_bind_generic_parameters): Only set
10220         `ginst->is_dynamic' if our generic type is a TypeBuilder.
10221
10222 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
10223
10224         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10225         Fixes #56091.
10226
10227 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10228
10229         * icall.c: added Kill_internal icall.
10230         * process.[ch]: added Kill_internal icall.
10231
10232 2004-03-25  Martin Baulig  <martin@ximian.com>
10233
10234         * class.h (MonoStats): Added `generic_instance_count',
10235         `inflated_method_count', `inflated_type_count' and
10236         `generics_metadata_size'.       
10237
10238 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10239
10240         * reflection.c: no warnings now.
10241
10242 2004-03-25  Martin Baulig  <martin@ximian.com>
10243
10244         * class.c (mono_class_get_full): New public function; does a
10245         mono_class_get(), but also takes a `MonoGenericContext *'.
10246
10247         * loader.c (mono_field_from_memberref): Renamed to
10248         `field_from_memberref', made static and added `MonoGenericContext *'
10249         argument.
10250         (mono_field_from_token): Added `MonoGenericInst *' argument.
10251         (method_from_memberef): Likewise.
10252         (mono_get_method_from_token): Likewise.
10253         (mono_get_method_full): New public function; does a
10254         mono_get_method(), but also takes a `MonoGenericContext *'.
10255
10256         * verify.c (mono_method_verify): Get the method's generic context
10257         and pass it to mono_field_from_token(), mono_get_method_full() and
10258         mono_class_get_full().
10259
10260 2004-03-25  Martin Baulig  <martin@ximian.com>
10261
10262         * class.c (mono_class_inflate_generic_type): Take a
10263         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10264         `MonoGenericMethod *'.
10265
10266 2004-03-25  Martin Baulig  <martin@ximian.com>
10267
10268         * loader.h (MonoMethodInflated): Store the MonoGenericContext
10269         instead of the MonoGenericMethod here.
10270
10271 2004-03-25  Martin Baulig  <martin@ximian.com>
10272
10273         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10274         each time we create a new MonoGenericInst, we also create a new
10275         context which points back to us.
10276
10277         * class.c (inflate_method): Use `ginst->context' instead of
10278         creating a new context.
10279
10280         * loader.c (method_from_memberref): Use
10281         `klass->generic_inst->context' instead of creating a new context.
10282
10283 2004-03-25  Martin Baulig  <martin@ximian.com>
10284
10285         * class.h (MonoGenericContext): New struct.
10286         (MonoGenericMethod): Removed `generic_inst'.
10287
10288         * class.c (mono_class_inflate_generic_method): Take a
10289         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10290
10291 2004-03-25  Martin Baulig  <martin@ximian.com>
10292
10293         * loader.h (MonoMethodInflated): New typedef.
10294
10295         * metadata.h (MonoMethodSignature): Removed `gen_method', make
10296         `generic_param_count' consume just 30 bits, added `is_inflated'
10297         and `has_type_parameters' flags (one bit each).
10298
10299         * class.c (mono_class_inflate_generic_method): Create a
10300         MonoMethodInflated instead of a MonoMethodNormal and set
10301         `is_inflated' in the method signature.
10302
10303         * class.h (MonoGenericMethod): Removed `generic_method'.
10304
10305 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
10306
10307         * image.c: Make sure the name of a MonoImage is always an absolute path.
10308           This fixes bug #54415.
10309
10310 2004-03-24  Martin Baulig  <martin@ximian.com>
10311
10312         * class.c (mono_class_setup_vtable): If we're a generic instance,
10313         use our generic type's vtable size.
10314
10315 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
10316
10317         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10318         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
10319         problems.
10320
10321 2004-03-23  Martin Baulig  <martin@ximian.com>
10322
10323         * class.h (MonoDynamicGenericInst): Added `int count_events' and
10324         `MonoEvent *events'.
10325
10326         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10327         (typebuilder_icalls): Added "get_event_info"; calls
10328         mono_reflection_event_builder_get_event_info(). 
10329
10330         * reflection.c (mono_reflection_generic_inst_initialize): Added
10331         `MonoArray *events'.
10332         (mono_reflection_event_builder_get_event_info): New function.
10333
10334 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
10335
10336         * object.h: add mono_type_initialization_init
10337
10338         * object.c (mono_runtime_class_init): 
10339         implement class constructor synchronization rules
10340         to cope with threading issues.  
10341         add mono_type_initialization_init
10342
10343         * appdomain.c (mono_runtime_init): call 
10344         mono_type_initialization_init
10345
10346         * class.h: removing initializing field from MonoVTable
10347
10348 2004-03-23  Martin Baulig  <martin@ximian.com>
10349
10350         * class.c (my_mono_class_from_generic_parameter): Use
10351         `param->name' if it's not NULL. 
10352
10353 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
10354
10355         * class.c: do not insert non-virtual methods in the vtable.
10356         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10357         that means the method is non-virtual. This never would have
10358         happened before.
10359
10360 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
10361
10362         * profiler.c: Added lock for accessing coverage_hash.
10363
10364 2004-03-22  Martin Baulig  <martin@ximian.com>
10365
10366         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10367         `method->method->signature->generic_param_count != 0' to make it
10368         work for interface methods.
10369
10370 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10371
10372         * process.c: quote the string passed to the shell using g_shell_quote.
10373
10374 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10375
10376         * threads.c:
10377         (mono_threads_manage): don't remove the finalizer thread and self
10378         from the threads hash table so that mono_thread_manage can be called
10379         more than once.
10380
10381 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10382
10383         * process.c: quote the arguments when UseShellExecute is true. Fixes
10384         bug #55790.
10385
10386 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10387
10388         * threads.c: set mono_thread_detach as a cleanup routine for every
10389         thread. This way it's always executed upon thread termination, either
10390         aborted or finished normally. No more xsp hangs!
10391
10392 2004-03-17  Martin Baulig  <martin@ximian.com>
10393
10394         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10395         `int count_nested' and a `MonoType **nested'.
10396
10397         * reflection.c (mono_reflection_bind_generic_parameters): Moved
10398         most of the functionality into a new static
10399         do_mono_reflection_bind_generic_parameters() and don't take a
10400         `MonoType *nested_in' argument any more.  Don't compute nested
10401         types here.
10402         (mono_reflection_generic_inst_get_nested_types): New public method
10403         to get nested types.
10404
10405         * class.c (mono_class_create_generic): Set `klass->nested_in' if
10406         we're a nested class.
10407
10408         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10409         mono_reflection_generic_inst_get_nested_types() to compute the
10410         nested types.
10411
10412 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10413
10414         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10415         descriptive error message under windows.
10416         
10417 2004-03-17  Martin Baulig  <martin@ximian.com>
10418
10419         * class.c (dup_type): Added `const MonoType *original' argument;
10420         copy the attrs from the original type.
10421
10422 2004-03-17  Martin Baulig  <martin@ximian.com>
10423
10424         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10425         `m->generic_inst_cache' here.
10426
10427 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10428
10429         * exception.h exception.c: Add stack_overflow_exception.
10430
10431 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10432
10433         * threadpool.c:
10434         (overlapped_callback): call SetEvent *after* invoking the callback.
10435         No need to call CloseHandle.
10436
10437 2004-03-16  Martin Baulig  <martin@ximian.com>
10438
10439         * reflection.c (mono_image_get_fieldref_token): Take a
10440         `MonoReflectionField *' instead of a `MonoClassField *' and a
10441         `MonoClass *'; store the `MonoReflectionField *' in the hash.
10442
10443 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10444
10445         * appdomain.c: don't add the culture to the filename we're looking for
10446         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10447
10448 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10449
10450         * locales.c: don't ignore symbols when doing case insensitive compares.
10451         Thanks Dick! Fixes bug #54046.
10452
10453         * threads.c: surround 'threads' usage with enter/leave in
10454         mono_thread_manage.
10455
10456 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
10457
10458         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
10459         implicitly marshalled as [Out]. Fixes #55450.
10460
10461         (mono_marshal_get_runtime_invoke): Zero out the result if there is
10462         an exception.
10463
10464 2004-03-16  Martin Baulig  <martin@ximian.com>
10465
10466         * class.c (mono_class_from_generic_parameter): Use the actual
10467         parameter name. 
10468
10469 2004-03-16  Martin Baulig  <martin@ximian.com>
10470
10471         * reflection.c (type_get_signature_size): New static function.
10472         Compues the size of the type in a method signature.
10473         (method_get_signature_size): New static function; calls
10474         type_get_signature_size() to compute the actual size of the
10475         method's signature.
10476         (method_encode_signature): Use method_get_signature_size() to get
10477         the signature's size rather than using `nparams * 10'.
10478
10479 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10480
10481         * file-io.h: define here WapiOverlapped on windows. I don't want the
10482         regular OVERLAPPED one.
10483
10484         * file-io.c:
10485         * threadpool.c: somehow, BindIoCompletionCallback is not found.
10486         Disabling AIO on windows.
10487
10488 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10489
10490         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10491         bug #55385.
10492
10493 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10494
10495         * appdomain.c: upgraded corlib version.
10496
10497         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10498         and BeginWrite. Allow opening files for asynchrnous operations.
10499
10500         * file-io.h: new struct that maps FileStreamAsyncResult.
10501         * icall.c: added new icalls.
10502         * process.[ch]: support setting child process environment variables
10503         and use the SHELL or COMSPEC when UseShellExecute is true.
10504
10505         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10506         callback for async. IO is here and also BindHandle.
10507
10508         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10509         from here.
10510
10511 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
10512
10513         * reflection.c (create_custom_attr): Allow len == 0.
10514
10515         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10516         computation on big-endian machines.
10517
10518 2004-03-13  Martin Baulig  <martin@ximian.com>
10519
10520         * class.h (MonoGenericInst): Added `int count_ifaces'.
10521
10522         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10523         `ginst->count_ifaces' instead `klass->interface_count' since we
10524         may get called before the vtable is created.
10525
10526         * loader.c (mono_method_get_param_names): If we're a generic
10527         instance, return and don't initialize the class.
10528
10529         * reflection.c (mono_reflection_setup_generic_class): Don't call
10530         ensure_runtime_vtable().
10531         (mono_reflection_bind_generic_parameters): Set
10532         `ginst->count_ifaces'.
10533
10534 2004-03-11  Jackson Harper <jackson@ximian.com>
10535
10536         * icall.c:
10537         * unicode.c:
10538         * unicode.h: Remove unused System.Char icalls.
10539         
10540 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
10541
10542         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10543         code when we P/Invoke the first library in Windows.Forms, instead
10544         of when we first open the assembly.
10545
10546         * assembly.c: Drop the lookup from here.
10547
10548 2004-03-10  Martin Baulig  <martin@ximian.com>
10549
10550         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10551         class for properties, fields and events.  Finally fixes #54945.
10552
10553 2004-03-10  Martin Baulig  <martin@ximian.com>
10554
10555         * metadata.c (mono_metadata_class_equal): New static function;
10556         checks whether two generic instances or two generic parameters are
10557         equal.
10558         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10559         compare classes.        
10560
10561 2004-03-10  Martin Baulig  <martin@ximian.com>
10562
10563         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10564
10565         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10566         argument and write it into the `reflection_info' field.
10567
10568         * icall.c
10569         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10570         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10571
10572 2004-03-09  Jackson Harper  <jackson@ximian.com>
10573
10574         * char-conversions.h: use 8 bits for numeric data its all we need
10575         * icall.c: numeric data is only 8 bits now.
10576
10577 2004-03-09  Martin Baulig  <martin@ximian.com>
10578
10579         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10580
10581         * class.c (init_properties, init_events): Initialize the new
10582         `parent' field.
10583
10584         * reflection.c (typebuilder_setup_properties): Likewise.
10585         (typebuilder_setup_events): Likewise.
10586
10587         * reflection.h (MonoEventInfo): Replaced `parent with
10588         `declaring_type' and `reflected_type'.
10589
10590         * icall.c (ves_icall_get_property_info): Distinguish between
10591         declaring and reflected type.
10592         (ves_icall_get_event_info): Likewise.
10593
10594 2004-03-09  Martin Baulig  <martin@ximian.com>
10595
10596         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10597         (ves_icall_Type_GetField): Correctly set field->klass.
10598
10599 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10600
10601         * loader.h: Fix warning.
10602
10603 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
10604
10605         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10606         library routine if present.  Notice that it will still continue
10607         executing even if its missing, for those working on the Gtk#
10608         edition of Windows.Forms.
10609
10610         * assembly.c (do_mono_assembly_open): If loading the
10611         System.Windows.Forms call mono_loader_wini_init.
10612
10613 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10614
10615         * class.h: Added MonoRemoteClass struct.
10616         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10617         function for MonoStrings.
10618         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10619         Added internal call for getting the proxy type.
10620         * marshal.c: Get the type of transparent proxies from its remote_class.
10621         Added methods that generate the IL for type checks and casts:
10622         mono_marshal_get_isinst, mono_marshal_get_castclass, 
10623         mono_marshal_get_proxy_cancast.
10624         * marshal.h: Declaration of the previous new methods.
10625         * object.c: Added new moethods for creating and updating MonoRemoteClass
10626         instances: mono_remote_class, mono_upgrade_remote_class, 
10627         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10628         * verify.c: FIx transparent_proxy_fields layout.
10629         * appdomain.c: Bump corlib version.
10630
10631 2004-03-04  Jackson Harper  <jackson@ximian.com>
10632
10633         * icall.c: Add icall to access char conversion tables.
10634         * char-conversions.h: Character conversion tables.
10635         * Makefile.am: Add char-conversions.h private header file.
10636         
10637 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
10638
10639         * appdomain.c (unload_thread_main): Increase unloading timeout to
10640         10 sec as a temporary workaround for Nant problems.
10641
10642 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
10643
10644         * gc.c: Add checks for GC_enable and GC_disable.
10645
10646         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10647         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
10648         (bug #54988).
10649         
10650 2004-02-27  Martin Baulig  <martin@ximian.com>
10651
10652         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10653         `MonoReflectionType *' instead of a `MonoType *'.
10654
10655 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10656
10657         * gc.c (run_finalize): Avoid finalizing the object representing the
10658         finalizer thread.
10659         (finalizer_thread): Fix warning.
10660
10661 2004-02-25  Martin Baulig  <martin@ximian.com>
10662
10663         * class.c (_mono_class_get_instantiation_name): Added `int offset'
10664         argument for nested types.
10665         (mono_class_create_generic): Added support for nested generictypes.
10666
10667         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10668         `GList *nested'.
10669
10670         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10671
10672         * reflection.c (method_encode_signature): Increase the minimum
10673         value of `size' from 10 to 11.
10674         (mono_reflection_bind_generic_parameters): Take `int type_argc'
10675         and `MonoType **types' arguments instead of the `MonoArray
10676         *types'; added `MonoType *nested_in'.  Recursively instantiate
10677         nested classes. 
10678
10679 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10680
10681         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
10682         stack_overflow_ex members which are used by exception handling.
10683
10684         * appdomain.c (mono_runtime_init): Initialize the new members.
10685
10686         * gc.c (mono_gc_enable): New helper function.
10687         * gc.c (mono_gc_disable): New helper function.
10688
10689 2004-02-23  Martin Baulig  <martin@ximian.com>
10690
10691         * icall.c: I must have been really stupid - make it actually work
10692         this time ;-)
10693
10694 2004-02-23  Martin Baulig  <martin@ximian.com>
10695
10696         * loader.c (method_from_memberref): Only inflate the method if
10697         it's in another klass.
10698
10699 2004-02-23  Martin Baulig  <martin@ximian.com>
10700
10701         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10702         (mono_class_init): If we're a generic instance and an interface,
10703         compute `class->interface_id'; also create `class->interfaces'
10704         here and inflate them.
10705
10706         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10707         `ginst->is_open'.
10708         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10709
10710         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10711
10712 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
10713
10714         * reflection.c (method_encode_code): Improved the error message
10715         generated by the exception.
10716
10717 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10718
10719         * icall.c: Martin did not do what he said in the ChangeLog for
10720         2004-02-18, but put back the changes for properties and events.
10721         Commenting those changes out again and adding comment to bug #54518.
10722         
10723         * process.c: removed warning.
10724
10725 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
10726
10727         * marshal.c (emit_struct_conv): Print an error message instead of
10728         asserting when a type does not have the StructLayout attribute.
10729
10730 2004-02-20  Martin Baulig  <martin@ximian.com>
10731
10732         * reflection.c (mono_type_get_object): Also use the cache for
10733         generic instances.
10734         (mono_reflection_bind_generic_parameters): Always compute
10735         `ginst->ifaces'.        
10736
10737 2004-02-20  Martin Baulig  <martin@ximian.com>
10738
10739         * class.h (MonoGenericMethod): Removed `klass'.
10740
10741         * class.c (mono_class_inflate_generic_method): Added `MonoClass
10742         *klass' argument.
10743
10744 2004-02-20  Martin Baulig  <martin@ximian.com>
10745
10746         * reflection.c (method_encode_methodspec): Actually use the
10747         uninflated signature for the memberref.
10748
10749 2004-02-20  Martin Baulig  <martin@ximian.com>
10750
10751         * class.h (MonoGenericMethod): Removed `declaring'.
10752
10753         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10754         is NULL, compute it here.
10755
10756 2004-02-20  Martin Baulig  <martin@ximian.com>
10757
10758         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10759
10760         * metadata.c (mono_metadata_generic_inst_hash): New method.
10761         (mono_metadata_generic_inst_equal): New method.
10762
10763         * reflection.c (mono_reflection_bind_generic_parameters): Use the
10764         `klass->image->generic_inst_cache' cache to avoid creating
10765         duplicate MonoGenericInst's.
10766
10767         * class.c (mono_class_inflate_generic_type): Use the cache.
10768
10769 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10770
10771         * object.c: fixed gc descriptor calculation for embedded valuetypes.
10772
10773 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10774
10775         * icall.c: added Socket.WSAIoctl icall.
10776
10777         * socket-io.[ch]: implemented
10778         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10779
10780 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
10781
10782         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10783
10784 2004-02-18  Urs C Muff  <umuff@quark.com>
10785
10786         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10787         this work on PPC and other big-endian architectures.
10788
10789         * debug-mono-symfile.h: Prepended the names of all the `guint32'
10790         fields with an underscore to make sure they're only accessed by
10791         the read32() macro.
10792
10793 2004-02-18  Martin Baulig  <martin@ximian.com>
10794
10795         * icall.c: Put the klass->refclass changes back for methods and
10796         fields, but not for properties and events.  We're currently not
10797         distinguishing between DeclaringType and ReflectedType for
10798         properties and events, that's what caused the regressions.
10799
10800 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10801
10802         * object.c:
10803         (mono_async_result_new): the handle can be NULL.
10804
10805         * threadpool.c: Use an event instead of a semaphore, don't initialize
10806         it until needed. This saves quite a few semaphores from being created
10807         when using the threadpool.
10808
10809 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
10810
10811         * object.c (mono_string_is_interned_lookup): Fix interning of long
10812         strings. Fixes #54473.
10813
10814         * domain.c (ldstr_equal): Optimize if the two strings are equal.
10815
10816         * icall.c: Revert the klass->refclass changes since they introduce
10817         regressions (bug #54518).
10818
10819 2004-02-18  Martin Baulig  <martin@ximian.com>
10820
10821         * class.c (mono_class_init): If we're a generic instance and don't
10822         come from a TypeBuilder, inflate our members here.
10823         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10824         (mono_class_create_generic): New public method.
10825         (mono_class_initialize_generic): Removed.
10826         (get_instantiation_name): Renamed to
10827         _mono_class_get_instantiation_name() and made it public.
10828
10829 2004-02-18  Martin Baulig  <martin@ximian.com>
10830
10831         * class.c (mono_class_inflate_generic_type): Clear the new
10832         instance's `nginst->klass' when inflating a generic instance.
10833         (mono_class_is_subclass_of): Added (basic) support for generic
10834         instances.
10835
10836 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10837
10838         * appdomain.h, domain.c: use a MonoCodeManager instead of a
10839         MonoMempool to hold compiled native code.
10840
10841 2004-02-17  Martin Baulig  <martin@ximian.com>
10842
10843         * class.h (MonoDynamicGenericInst): Added `count_properties' and
10844         `properties'.
10845
10846         * reflection.c (mono_reflection_generic_inst_initialize): Added
10847         `MonoArray *properties' argument.
10848
10849         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
10850
10851 2004-02-17  Martin Baulig  <martin@ximian.com>
10852
10853         * icall.c (ves_icall_Type_GetFields): Renamed to
10854         ves_icall_Type_GetFields_internal() and added a
10855         `MonoReflectionType *rtype' argument; pass it to
10856         mono_field_get_object() to set the field's "reflected" type.
10857         (ves_icall_Type_GetConstructors): Likewise.
10858         (ves_icall_Type_GetEvents): Likewise.
10859         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10860         argument; pass it to mono_method_get_object() to set the method's
10861         "reflected" type.       
10862
10863 2004-02-17  Martin Baulig  <martin@ximian.com>
10864
10865         * class.h (MonoDynamicGenericInst): New type.
10866         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10867
10868         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10869         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10870         (ves_icall_MonoGenericInst_GetFields): New interncall.
10871
10872         * class.c (mono_class_from_generic): Don't call
10873         mono_class_initialize_generic() if this is a dynamic instance;
10874         ie. it's being created from a TypeBuilder.
10875         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10876         `class->byval_arg.type'.
10877
10878         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10879         to `inflate_method' and made static.
10880         (mono_reflection_inflate_field): Removed.
10881         (mono_reflection_generic_inst_initialize): New public method.
10882
10883         * reflection.h (MonoReflectionGenericInst): Removed `methods',
10884         `ctors' and `fields'; added `initialized'.
10885
10886 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
10887
10888         * debug-helpers.c (mono_method_full_name): Fix output for empty
10889         namespaces.
10890
10891 2004-02-12  Martin Baulig  <martin@ximian.com>
10892
10893         * class.h (MonoClassField): Added `MonoType *generic_type'.
10894
10895         * reflection.c (mono_image_get_fieldref_token): Added support for
10896         instantiated generic types.
10897         (field_encode_inflated_field): Removed.
10898         (mono_image_get_inflated_field_token): Removed.
10899         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10900
10901         * reflection.h (MonoReflectionInflatedField): Removed.
10902
10903 2004-02-12  Martin Baulig  <martin@ximian.com>
10904
10905         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10906         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10907
10908         * reflection.c (mono_image_get_methodspec_token): Take a
10909         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10910         (mono_image_create_token): Check whether we have a
10911         `method->signature->gen_method' and call
10912         mono_image_get_methodspec_token() if appropriate.
10913         (inflated_method_get_object): Removed.
10914         (mono_reflection_bind_generic_method_parameters): Return a
10915         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10916         (mono_reflection_inflate_method_or_ctor): Likewise.
10917
10918         * reflection.h (MonoReflectionInflatedMethod): Removed.
10919
10920 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
10921
10922         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10923         for custom valuetype marshalling.
10924
10925         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10926
10927 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10928
10929         * icall.c: fixed WSAGetLastError_internal name.
10930
10931 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
10932
10933         * threads.c (mono_thread_attach): Allow this to be called multiple
10934         times for a thread.
10935         
10936         * threads.c (build_wait_tids): Do not wait for ourselves.
10937
10938         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
10939         appdomain list is empty.
10940
10941         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10942         memory returned by mono_string_builder_to_utf16, since it points into
10943         managed memory. Thanks to Bernie Solomon for noticing this.
10944
10945         * icall.c: Add AppDomainSetup icalls.
10946
10947         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10948
10949         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10950         types.
10951
10952         * reflection.c (reflection_methodbuilder_to_mono_method): Save
10953         custom attributes to the method_aux struct. Also fix array indexes etc.
10954
10955         * loader.c (mono_method_get_param_names): Make dynamic case work again.
10956         
10957 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10958
10959         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10960         (both static and runtime) and reduce startup time.
10961
10962 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
10963
10964         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10965         AsAny marshalling conversion instead of crashing.
10966
10967         * marshal.c: Fix warnings.
10968
10969 2004-02-09  Martin Baulig  <martin@ximian.com>
10970
10971         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10972
10973         * reflection.h (MonoReflectionInflatedMethod): Removed the
10974         `declaring' field, it's now in the unmanaged MonoGenericMethod.
10975
10976         * reflection.c (method_encode_methodspec): Removed the `method'
10977         argument; we get it from `gmethod->declaring'.
10978         (inflated_method_get_object): Removed the `declaring' argument.
10979
10980 2004-02-09  Martin Baulig  <martin@ximian.com>
10981
10982         * class.h (MonoGenericMethod): New type.
10983         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
10984         `generic_method'.
10985
10986         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
10987         a `MonoGenericMethod *gen_method' one.
10988
10989         * class.c (mono_class_inflate_generic_type): Take an additional
10990         `MonoGenericMethod * argument.  This is only non-NULL if we're
10991         inflating types for a generic method.   
10992         (mono_class_inflate_generic_signature): Renamed to
10993         inflate_generic_signature() and made static; take a
10994         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10995         (inflate_generic_header): Take a `MonoGenericMethod *' argument
10996         instead of a `MonoGenericInst *' one.
10997         (mono_class_inflate_generic_method): Likewise.
10998
10999         * reflection.c (encode_generic_method_sig): Take a
11000         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11001         (method_encode_methodspec): Likewise.
11002         (inflated_method_get_object): Likewise. 
11003
11004         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11005         field with a `MonoGenericMethod *gmethod' one.  
11006
11007 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
11008
11009         * class.h (mono_class_has_parent): add parens to expansion
11010         so you can ! this.
11011
11012 2004-02-08  Martin Baulig  <martin@ximian.com>
11013
11014         * image.h (MonoImage): Removed `generics_cache'.
11015
11016         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11017         instead of a `MonoType *' argument; removed the `inflate_methods'
11018         argument.  Don't inflate methods here.
11019
11020         * loader.c (find_method): If it's a generic instance, call
11021         mono_class_init() on the `sclass->generic_inst->generic_type'.
11022
11023         * metadata.c (mono_type_size): Make this work on uninitialized
11024         generic instances; call it on the `ginst->generic_type's class.
11025
11026         * reflection.c (mono_reflection_bind_generic_parameters): Call
11027         mono_class_from_generic() to create the `ginst->klass'.
11028
11029 2004-02-08  Martin Baulig  <martin@ximian.com>
11030
11031         * class.h (MonoClass): Changed type of `generic_inst' from
11032         `MonoType *' to `MonoGenericInst *'.
11033
11034 2004-02-08  Martin Baulig  <martin@ximian.com>
11035
11036         * icall.c (ves_icall_Type_BindGenericParameters): Just call
11037         mono_type_get_object(), this is now creating a `MonoGenericInst'
11038         for MONO_TYPE_GENERICINST.
11039         (ves_icall_MonoGenericInst_GetParentType): Likewise.
11040         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11041
11042         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11043         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11044         (inflated_method_get_object): Added `MonoClass *refclass' argument.
11045         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11046         and reflected type.
11047
11048         * reflection.h (MonoReflectionInflatedMethod): Removed
11049         `declaring_type' and `reflected_type'.
11050
11051 2004-02-08  Martin Baulig  <martin@ximian.com>
11052
11053         * class.h (MonoGenericInst): Added `MonoType *parent' and
11054         `MonoType **ifaces'.
11055
11056         * reflection.h (MonoReflectionGenericInst): Removed `klass',
11057         `parent' and `interfaces'.
11058
11059         * reflection.c (mono_reflection_bind_generic_parameters): Take a
11060         `MonoType *' argument and return a `MonoType *'.
11061
11062         * icall.c
11063         (ves_icall_MonoGenericInst_GetParentType): New interncall.
11064         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
11065
11066 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11067
11068         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11069         valuetype marshalling.
11070
11071 2004-02-06  Martin Baulig  <martin@ximian.com>
11072
11073         * class.c
11074         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11075         (my_mono_class_from_generic_parameter): Likewise.
11076
11077 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11078
11079         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11080         contents of the symbol files lazily.
11081
11082         * object.h (MonoThread): Add 'name' and 'name_len' fields.
11083
11084         * threads.h threads.c icall.c: New icalls for getting and setting the
11085         threads name.
11086
11087 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
11088
11089         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
11090         Raise an exception when the domain is not found.
11091
11092 2004-02-03  Martin Baulig  <martin@ximian.com>
11093
11094         * reflection.c (mono_image_get_methodspec_token): Use the
11095         uninflated signature; fixes gen-33.
11096
11097 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11098
11099         * gc.c threads.c: Make the finalizer thread a normal managed thread so
11100         the finalizer code can use thread functionality.
11101
11102         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
11103         the finalizer thread.
11104
11105         * threads.c: Make some functions more robust.
11106
11107         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11108
11109         * metadata.h: Add new marshalling conventions.
11110
11111         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11112         stringbuilder marshalling. Fixes #53700.
11113
11114         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11115
11116         * reflection.c (mono_image_get_type_info): Save declarative security
11117         info.
11118
11119         * reflection.c (mono_image_get_field_info): Handle uninitialized 
11120         unmanaged fields as well.
11121
11122         * appdomain.c: Bump corlib version.
11123
11124 2004-02-01  Martin Baulig  <martin@ximian.com>
11125
11126         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11127         method type arguments.  
11128
11129 2004-01-30  Duncan Mak  <duncan@ximian.com>
11130
11131         * marshal.h: Add prototype for
11132         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11133         and
11134         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11135         fix the build.
11136
11137 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
11138
11139         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11140         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11141
11142 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11143
11144         * marshal.c (mono_marshal_get_native_wrapper): Add support for
11145         custom marshalling of valuetypes.
11146
11147         * marshal.c: Fix some warnings.
11148
11149 2004-01-29  Martin Baulig  <martin@ximian.com>
11150
11151         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11152         for generic method parameters.
11153
11154         * reflection.c (method_encode_methodspec): Write the uninflated
11155         signature into the methodspec table.
11156         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11157         is always the uninflated method.
11158         (reflection_methodbuilder_to_mono_method): Copy the generic
11159         parameters from the MethodBuilder into `header->gen_params'.
11160
11161 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11162
11163         * class.c (mono_class_from_generic_parameter): Fix warning.
11164
11165 2004-01-27  Martin Baulig  <martin@ximian.com>
11166
11167         * class.c (mono_class_from_generic_parameter): Don't create
11168         `klass->methods' here.  
11169
11170 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
11171
11172         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11173         extension since it does not work with libraries named lib<FOO>.dll.so.
11174
11175 2004-01-25  Martin Baulig  <martin@ximian.com>
11176
11177         * class.c (mono_class_inflate_generic_type): Added support for
11178         MONO_TYPE_GENERICINST.
11179
11180         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11181         inflate methods on open constructed types.      
11182
11183 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11184
11185         * object.c: fire ProcessExit event in the root AppDomain after running
11186         Main. Fixes bug #53299.
11187
11188 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11189
11190         * socket-io.c: include the new socket-wrappers.h header.
11191         Use the wrappers instead of the unix socket functions to make the code
11192         more clear.
11193
11194 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11195
11196         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11197
11198         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11199         Fixes #22532.
11200
11201 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
11202
11203         * reflection.c (mono_image_create_pefile): Handle the case when the
11204         entry point is not a MethodBuilder.
11205
11206         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11207         field to ReflectionMethod since it is not allways a builder.
11208
11209         * reflection.c (type_get_fully_qualified_name): New helper function to
11210         return the fully qualified name of a type.
11211
11212         * reflection.c (encode_marshal_blob): Always emit the fully qualified
11213         type name for custom marshallers.
11214
11215         * reflection.c (mono_marshal_spec_from_builder): Ditto.
11216
11217         * class.c (mono_class_setup_vtable): If a parent class already 
11218         implements an interface, use the implementing methods from that class.
11219         Fixes #53148.
11220
11221 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11222
11223         * threadpool.c: just return instead of ExitThread to allow for thread
11224         clean up earlier.
11225
11226 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
11227
11228         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11229         when closing resource modules.
11230
11231         * reflection.c (mono_image_create_pefile): Handle the case when the
11232         entry point is not a MethodBuilder.
11233
11234         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11235         field to ReflectionMethod since it is not allways a builder.
11236
11237 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
11238
11239         * marshal.c (mono_marshal_get_managed_wrapper): 
11240         mono_marshal_alloc takes native int so CONV_I
11241         the arg for 64bits.
11242
11243 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
11244
11245         * reflection.c (fixup_cattrs): New function to fixup the methoddef
11246         tokens in the cattr table. Fixes #53108.
11247
11248 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11249
11250         * loader.c: don't trim ".dll" before looking up in the config file.
11251         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11252
11253 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11254
11255         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
11256         Return the module which contains the resource as well.
11257         (ves_icall_System_Reflection_Module_Close): New icall.
11258
11259         * appdomain.c: Bump corlib version number.
11260
11261         * image.c (mono_image_addref): New public function.
11262
11263         * assembly.c: Call mono_image_addref.
11264
11265         * reflection.c (mono_module_get_object): Increase reference count of 
11266         the image.
11267
11268         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11269         Fixes #22532.
11270
11271         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11272         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
11273         proper exceptions on DllImport problems.
11274
11275 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11276
11277         * class.c, metadata.c: eliminate CSIZE macro.
11278
11279 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
11280
11281         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11282         * object.h: Added async_callback field in MonoAsyncResult.
11283         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11284         * verify.c: Added async_callback in MonoAsyncResult layout.
11285
11286 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
11287
11288         * reflection.c (mono_reflection_get_custom_attrs): Add support
11289         for Modules.
11290
11291 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11292
11293         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
11294         marshalling.
11295         (mono_marshal_method_from_wrapper): Add null pointer check.
11296
11297 2004-01-16  Martin Baulig  <martin@ximian.com>
11298
11299         * debug-mono-symfile.h: Set version number to 36 and reflect
11300         latest symbol writer changes.
11301
11302 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11303
11304         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11305         multi-dimensional arrays.
11306         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11307         (mono_class_from_mono_type): Use bounded_array_class_get.
11308         
11309         * class.c (mono_bounded_array_class_get): New function which takes
11310         a 'bounded' bool argument to distinguish vectors from one dimensional
11311         arrays.
11312
11313         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
11314         bounded_array_class_get if the array has bounds.
11315
11316         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11317         Search modules loaded using AssemblyBuilder:AddModule as well.
11318
11319 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11320
11321         * appdomain.c: increased corlib version.
11322         * filewatcher.c: removed g_print.
11323         * icall.c:
11324         (get_property_info): only allocate what is actually requested.
11325         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11326
11327 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11328
11329         * Makefile.am: added filewatcher.[ch]
11330         * filewatcher.[ch]: FileSystemWatcher runtime support.
11331         * icall.c: added new FSW icalls.
11332
11333 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11334
11335         * string-icalls.c: fix stringbuilder regression as suggested by
11336         Iain McCoy <iain@mccoy.id.au>.
11337
11338 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11339
11340         * process.c (process_read_stringtable_block): Recognize '007f' as
11341         a language neutral stringtable block.
11342
11343 2004-01-12  Patrik Torstensson
11344
11345         * object.h (MonoStringBuilder) : Changed layout to support our
11346         new stringbuilder class.
11347         * marshal.c: Change marshalling to support the new layout of 
11348         string builder.
11349         * appdomain.c: increased version number because new layout of
11350         string builder.
11351
11352 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
11353
11354         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11355         assembly name as an string instead of an AssemblyName, since it is
11356         easier to extract info from it.
11357
11358         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11359         the culture subdirectories too. Fixes #52231.
11360
11361 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11362
11363         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11364         It takes 2 new parameters with an optional name for the method to look
11365         for and case ignoring info.
11366
11367         * threadpool.c: removed unused variable.
11368
11369 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11370
11371         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11372         It takes 2 new parameters with an optional name for the property to look
11373         for and case ignoring info.
11374         Fixes bug #52753.
11375
11376 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11377
11378         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11379         Fix #52451.
11380
11381 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11382
11383         * appdomain.c:
11384         * assembly.c: escape the uri before passing it to g_filename_from_uri.
11385         Fixes bug #52630.
11386
11387 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
11388
11389         * reflection.c: Add support for more than one unmanaged resource.
11390
11391         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11392         in field->def_value, as done in all other cases.
11393
11394         * reflection.c (mono_reflection_get_custom_attrs): Add support for
11395         TypeBuilders.
11396
11397         * reflection.c (mono_reflection_create_runtime_class): Remove 
11398         errorneous assignment to klass->element_class, since it is already
11399         done in mono_reflection_setup_internal_class.
11400
11401 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11402
11403         * gc.c: added missing LeaveCriticalSection.
11404         * icall.c: indented a couple of lines.
11405         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11406         if we call EndInvoke inside a callback. Fixes bug #52601.
11407
11408 2004-01-07  Martin Baulig  <martin@ximian.com>
11409
11410         * mono-debug-debugger.h
11411         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11412
11413 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
11414
11415         * appdomain.c: Use messages in NotImplementedException.
11416
11417         * exception.c (mono_get_exception_not_implemented): Now this takes
11418         a message argument.
11419
11420         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11421         exception instead of g_asserting an aborting when something is not
11422         implemented.
11423
11424         Add some inline docs.
11425
11426 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
11427
11428         * reflection.h: Update after changes to object layout.
11429
11430         * reflection.c: Implement saving of unmanaged aka win32 resources.
11431
11432         * appdomain.c: Bump version number.
11433
11434         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
11435         Handle missing domains gracefully.
11436
11437 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
11438
11439         * file-io.c : On Windows, there are much more invalid_path_chars.
11440
11441 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11442
11443         * class.h, object.c: prepare for GetType () speedup.
11444
11445 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
11446
11447         * profiler.c: workaround for --profile null reference exception on
11448           cygwin. Patch by Patrik Torstensson.
11449
11450 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
11451
11452         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11453         make work for unaligned access.
11454
11455 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11456
11457         * class.c: small cleanup (class->fields [i] -> field).
11458         * image.c: check address of metadata is valid.
11459
11460 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
11461
11462         * assembly.h assembly.c (mono_assembly_loaded): New public function to
11463         search the list of loaded assemblies.
11464
11465         * reflection.c (mono_reflection_type_from_name): Use 
11466         mono_assembly_loaded instead of mono_image_loaded.
11467
11468         * reflection.c: Fix warnings.
11469
11470 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
11471
11472         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
11473         is dynamic. This is needed since an assembly can contain both dynamic and
11474         non-dynamic images.
11475
11476         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
11477         assembly->dynamic.
11478
11479         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11480
11481         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11482         to store modules loaded using AddModule.
11483
11484         * reflection.c (mono_image_fill_file_table): Generalize this so it works
11485         on Modules.
11486
11487         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11488
11489         * reflection.c (mono_image_fill_export_table_from_module): New function to
11490         fill out the EXPORTEDTYPES table from a module.
11491
11492         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11493         into a separate function. Also handle loaded non-dynamic modules.
11494
11495         * reflection.c (mono_image_basic_init): Fix memory allocation.
11496
11497         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11498
11499         * assembly.c (mono_assembly_load_references): Make this public.
11500
11501 2003-12-19  Martin Baulig  <martin@ximian.com>
11502
11503         * class.c (mono_class_initialize_generic): Made this static, take
11504         a `MonoGenericInst *' instead of a `MonoClass *'.
11505         (mono_class_from_generic): Call mono_class_initialize_generic()
11506         unless we're already initialized or being called from
11507         do_mono_metadata_parse_generic_inst().
11508
11509         * class.h (MonoGenericInst): Added `initialized' and
11510         `init_pending' flags.
11511
11512         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11513         `mono_class_init (gklass)' or mono_class_initialize_generic()
11514         here; set `generic_inst->init_pending' while parsing the
11515         `type_argv'.
11516
11517 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
11518
11519         * locales.c: include string.h for memxxx prototypes
11520
11521 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11522
11523         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11524         constructor when accessing literal fields.
11525
11526 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
11527
11528         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11529
11530         * reflection.c (assembly_add_resource_manifest): New function to fill
11531         the MANIFESTRESOURCE table.
11532
11533         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11534
11535         * reflection.h: Update to changes in class layout.
11536
11537         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
11538         Reenable call to mono_runtime_is_shutting_down ().
11539
11540         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11541         determine if the runtime is shutting down.
11542
11543 2003-12-16  Jackson Harper <jackson@ximian.com>
11544
11545         * icall.c: comment out call to mono_runtime_is_shutting_down to
11546         fix build.
11547         
11548 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
11549
11550         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11551         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11552
11553 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
11554
11555         * reflection.c: move definition of swap_with_size
11556         to before its first call
11557
11558 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
11559
11560         * appdomain.c (mono_runtime_is_shutting_down): New public function.
11561
11562         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11563         icall.
11564
11565         * object.c: Fix warnings.
11566
11567         * icall.c (ves_icall_Type_Get...): Only consider inherited static
11568         members if FlattenHierarchy is set.
11569
11570         * reflection.c (mono_image_add_decl_security): New function to emit
11571         declarative security.
11572
11573         * reflection.h reflection.c: Add support for declarative security.
11574
11575         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11576         
11577 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11578
11579         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11580         
11581         * appdomain.c verify.c: Moved corlib version checking into its own
11582         function in appdomain.c since it needs to create vtables etc.
11583
11584 2003-12-13  Patrik Torstensson <p@rxc.se>
11585
11586         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
11587         instead of unwrapped server.
11588
11589 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
11590
11591         * verify.c (check_corlib): Fix field index.
11592
11593 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
11594
11595         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11596         GetGacPath icall.
11597
11598 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
11599
11600         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11601         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11602         cope with sizeof(size_t) != sizeof(guint32).
11603
11604 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11605
11606         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11607         in case of failure.
11608
11609 2003-12-10  Mark Crichton <crichton@gimp.org>
11610
11611         * icall.c: removed the GetNonZeroBytes.  We now handle this case
11612         in managed code.
11613
11614         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
11615
11616 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11617
11618         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11619         marked as deleted.
11620
11621 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11622
11623         * verify.c (check_corlib): Handle the case when the version field is 
11624         initialized by a static constructor.
11625
11626 2003-12-08  Patrik Torstensson  <p@rxc.se>
11627
11628     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11629
11630 2003-12-08  Martin Baulig  <martin@ximian.com>
11631
11632         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11633         a MonoReflectionGenericParameter, also take the parameter index
11634         and name as arguments.
11635         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11636         (ves_icall_MonoGenericParam_initialize): New interncall.
11637         (ves_icall_Type_make_byref_type): New interncall.
11638
11639         * reflection.h (MonoReflectionGenericParam): Derive from
11640         MonoReflectionType, not just from MonoObject.  Added `refobj' and
11641         `index' fields.
11642
11643         * reflection.c (mono_reflection_define_generic_parameter): Create
11644         and return a new MonoReflectionGenericParam; don't initialize the
11645         constraints here.
11646         (mono_reflection_initialize_generic_parameter): New public method;
11647         initializes the constraints and creates the `param->pklass'.
11648
11649 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11650
11651         * reflection.h reflection.c: Use the new fields 'num_types', 
11652         'num_fields' and 'num_methods' to track the number of types etc.
11653
11654         * verify.c (check_corlib): Check corlib version number.
11655
11656 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
11657
11658         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11659         function works on all methods.
11660
11661 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11662
11663         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11664         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11665         the custom_type_info flag of the transparent proxy.
11666         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11667         objects that supports IRemotingTypeInfo.
11668         * object.h: Added custom_type_info field in transparent proxy.
11669
11670 2003-12-06  Martin Baulig  <martin@ximian.com>
11671
11672         * class.c (mono_class_create_from_generic): Removed.
11673         (mono_class_from_generic): Check `ginst->klass' before doing
11674         anything else.  This is important to fully support "recursive"
11675         generic types.
11676
11677         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11678         empty `generic_inst->klass' before doing anything else.
11679
11680 2003-12-06  Dick Porter  <dick@ximian.com>
11681
11682         * verify.c: 
11683         * object.h:
11684         * icall.c:
11685         * locales.c: Use C structs to access class fields.  Don't do a
11686         conversion between MonoString and UChar because both are
11687         platform-endian UTF-16.  Compare now takes startindex and count
11688         parameters.  Add a char overload for IndexOf.  Speed up the
11689         invariant string IndexOf.
11690
11691 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
11692
11693         * Makefile.am (monosn_LDADD): Fix parallel build.
11694
11695 2003-12-04  Martin Baulig  <martin@ximian.com>
11696
11697         * icall.c
11698         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11699         (ves_icall_Type_make_array_type): New interncall.       
11700
11701 2003-12-04  Martin Baulig  <martin@ximian.com>
11702
11703         * locales.c: also change it in the !HAVE_ICU case.
11704
11705 2003-12-04  Dick Porter  <dick@ximian.com>
11706
11707         * icall.c:
11708         * locales.c: construct_compareinfo is now in CompareInfo, not
11709         CultureInfo.
11710
11711 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11712
11713         * image.c (mono_image_load_file_for_image): Cache loaded images in the
11714         image->files array.
11715
11716         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11717         table as well.
11718
11719         * assembly.c (mono_assembly_load_references): Only load references
11720         once.
11721
11722         * class.c (mono_class_from_name): Avoid linear search of the 
11723         EXPORTEDTYPE table.
11724
11725         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11726
11727 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11728
11729         * image.h (MonoImage): Add 'field_cache' field.
11730
11731         * loader.c (mono_field_from_token): Cache field lookups.
11732         
11733         * reflection.c (mono_module_get_object): Fix name property.
11734
11735         * icall.c (ves_icall_get_enum_info): Update after changes to 
11736         mono_metadata_get_constant_index ().
11737
11738         * icall.c: Get rid of get_type_info icall, use a separate icall for
11739         each type property to avoid needless memory allocations. Fixes #51514.
11740
11741         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11742         to avoid needless binary searches.
11743
11744         * class.c (class_compute_field_layout): Move the initialization of
11745         field->def_value to mono_class_vtable ().
11746
11747         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11748         non-corlib types.
11749
11750         * object.c (mono_object_allocate): Make it inline.
11751
11752         * object.c (mono_object_allocate_spec): Make it inline.
11753         
11754 2003-12-02  Dick Porter  <dick@ximian.com>
11755
11756         * locales.c (create_NumberFormat): NumberFormatInfo construction.
11757         Patch by Mohammad DAMT (mdamt@cdl2000.com).
11758
11759 2003-12-01  Dick Porter  <dick@ximian.com>
11760
11761         * threads.c: Fix signature and call in CreateMutex and
11762         CreateEvent.
11763
11764 2003-12-01  Dick Porter  <dick@ximian.com>
11765
11766         * icall.c: 
11767         * locales.c: Implement string compares and searching
11768
11769         * object.h: Add extra Thread field
11770
11771 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
11772
11773         * reflection.c (fixup_method): Add support for MonoCMethod.
11774
11775 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
11776
11777         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11778
11779         * reflection.c (assembly_name_to_aname): Allow extra characters in
11780         assembly names. Fixes #51468.
11781
11782 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11783
11784         * exception.c (mono_exception_from_name_domain): New helper function.
11785
11786         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11787         exception object in the correct domain.
11788
11789         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
11790         formatting + make a copy a the input data.
11791
11792         * loader.c (mono_get_method_from_token): Methods which contain
11793         native code do not have entries in the ImplMap.
11794
11795         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11796         Thanks to Gonzalo for spotting this.
11797         
11798         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11799         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11800
11801         * assembly.h (mono_assembly_load_from): Split the second part of 
11802         assembly loading into a new public function.
11803
11804         * exception.h (mono_get_exception_bad_image_format): New function.
11805
11806 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
11807
11808         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11809         Enumerate all modules inside a dynamic assembly. Fixes #51293.
11810         
11811         * icall.c: Add new icall for creating dynamic methods.
11812
11813         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11814
11815         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11816
11817         * reflection.c (mono_reflection_create_dynamic_method): New icall to
11818         create a dynamic method.
11819
11820         * reflection.c (resolve_object): New helper function.
11821
11822         * reflection.c: Generalize ReflectionMethodBuilder and the functions
11823         which manipulate it so they can also work on dynamic methods.
11824
11825         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
11826         creating the MonoReflectionMethodAux structure if it is not needed.
11827         
11828         * reflection.h verify.c: Update after changes to object layout.
11829
11830         * reflection.c (method_builder_encode_signature): Fix compilation on
11831         gcc 2.95.x.
11832
11833 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
11834
11835         * appdomain.h: Added support for context static fields. Added static_data
11836           field to MonoAppContext and renamed thread_static_fields to a more
11837           generic special_static_fields in MonoAppDomain, since it can now contain
11838           context static fields.
11839         * domain.c: Updated hashtable name.
11840         * object.c: Replaced field_is_thread_static() for a more generic
11841           field_is_special_static() which also checks for context static attribute.
11842           In mono_class_vtable(), added support for static context fields.
11843         * threads.c: Changed methods that manage thread static fields to more
11844           generic methods so they can be reused both for thread and context static
11845           data.
11846         * threads.h: Declared some new methods.
11847
11848 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
11849
11850         * reflection.h: Update after changes to the managed types.
11851
11852         * reflection.c (encode_custom_modifiers): New helper function.
11853
11854         * reflection.c (method_encode_signature): Emit custom modifiers.
11855
11856         * reflection.c (field_encode_signature): Emit custom modifiers.
11857
11858 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11859
11860         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11861
11862         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
11863         implementation.
11864
11865         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
11866         icall.
11867
11868         * object.c (mono_field_get_value_object): New function.
11869
11870         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11871         specific.
11872
11873 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
11874
11875         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11876         return a preallocated out-of-memory exception instance.
11877
11878         * object.c (out_of_memory): Use the new function.
11879
11880         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11881         flag is before the custom modifiers. Fixes #49802.
11882
11883 2003-11-16  Martin Baulig  <martin@ximian.com>
11884
11885         * class.c (mono_class_is_open_constructed_type): Implemented the
11886         MONO_TYPE_GENERICINST case.
11887
11888 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
11889
11890         * assembly.c (mono_assembly_fill_assembly_name): New function to
11891         fill out the MonoAssemblyName structure.
11892         (mono_assembly_open): Use the new function.
11893
11894         * icall.c (fill_reflection_assembly_name): New helper function.
11895
11896         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11897         new function.
11898
11899         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11900
11901 2003-11-15  Martin Baulig  <martin@ximian.com>
11902
11903         * class.c (mono_class_is_open_constructed_type): New public
11904         function; checks whether a type is an open constructed type,
11905         ie. whether it still contains type parameters.
11906         (mono_class_inflate_generic_type): If we're a type parameter and
11907         the inflated type is also a MONO_TYPE_(M)VAR, return the original
11908         type.
11909
11910         * class.h (MonoGenericInst): Added `guint32 is_open'.
11911
11912         * loader.c (method_from_methodspec): Check whether we're an open
11913         or closed constructed type and set `ginst->is_open'.
11914
11915         * reflection.c (mono_reflection_bind_generic_parameters): Check
11916         whether we're an open or closed constructed type and set
11917         `ginst->is_open'.
11918         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11919         from open constructed types.
11920
11921 2003-11-15  Martin Baulig  <martin@ximian.com>
11922
11923         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11924         a generic instance (instead of a generic type declaration) with
11925         unbound generic parameters, bind them to our actual types.
11926
11927 2003-11-14  Martin Baulig  <martin@ximian.com>
11928
11929         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11930
11931         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11932         an interface type, populate `res->interfaces' with instantiated
11933         versions of all the interfaces we inherit.
11934
11935 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
11936
11937         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11938         when MONO_PATH is set but doesn't contain the install dir.
11939
11940 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11941
11942         * icall.c:
11943         (ves_icall_Type_GetInterfaces): don't return an interface twice when
11944         it's also implemented in base classes. Fixes bug #50927.
11945
11946 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
11947
11948         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11949         if this method is called from a finalizer. Fixes #50913.
11950
11951 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
11952
11953         * threads.c: Implement VolatileRead/VolatileWrite
11954
11955         * icall.c: Add new icalls for VolatileRead/VolatileWrite
11956
11957 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11958
11959         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
11960         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11961         2.95.3.
11962
11963         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
11964         from Peter Ross (pro@missioncriticalit.com).
11965         
11966 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
11967
11968         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11969
11970 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11971
11972         * assembly.c (mono_assembly_load_references): Disable check because it
11973         triggers on older corlibs which lots of people have.
11974
11975 2003-11-12  Jackson Harper  <jackson@ximian.com>
11976
11977         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11978         load corlib.dll if mscorlib.dll is not found.
11979         * assembly.h: Remove corlib name define.
11980         * class.c:
11981         * domain.c:
11982         * image.c: Change corlib name to mscorlib.
11983         
11984 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11985
11986         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
11987
11988 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
11989
11990         * appdomain.h: Added loader_optimization here to sync with the C#
11991         code, and add disallow_binding_redirects field.
11992
11993 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
11994
11995         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
11996
11997         * reflection.c (mono_image_build_metadata): Fix crash on modules
11998         with no types.
11999
12000         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12001
12002         * icall.c (ves_icall_get_method_info): Return callingConvention as
12003         well.
12004
12005         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
12006         namespaces from the EXPORTEDTYPE table as well.
12007
12008         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12009         from all modules inside the assembly.
12010         
12011 2003-11-11  Martin Baulig  <martin@ximian.com>
12012
12013         * reflection.c (mono_reflection_bind_generic_parameters): Make
12014         this work for interfaces.
12015
12016 2003-11-11  Martin Baulig  <martin@ximian.com>
12017
12018         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12019
12020 2003-11-11  Martin Baulig  <martin@ximian.com>
12021
12022         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12023         "MonoInflatedMethod" and "MonoInflatedCtor".
12024
12025 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12026
12027         * reflection.c (resolution_scope_from_image): Use the assembly table
12028         from the manifest module, since other modules don't have it.
12029
12030         * debug-helpers.c (mono_type_full_name): New helper function.
12031
12032         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12033
12034         * image.c (mono_image_load_file_for_image): New public function which
12035         is a replacement for the load_file_for_image in class.c.
12036
12037         * assembly.c (mono_assembly_load_module): A wrapper for the function
12038         above which does assembly association and reference loading too.
12039
12040         * class.c (mono_class_from_name): Call mono_assembly_load_module.
12041
12042 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12043
12044         * appdomain.c: not all of the attributes for the full assembly name
12045         are required and the order doesn't matter. Fixes bug #50787.
12046
12047 2003-11-10  Dick Porter  <dick@ximian.com>
12048
12049         * locales.c: Use platform-endian UTF16
12050
12051 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12052
12053         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12054         
12055 2003-11-10  Martin Baulig  <martin@ximian.com>
12056
12057         * metadata.c
12058         (mono_metadata_load_generic_params): Make this actually work.
12059
12060         * reflection.c (mono_reflection_bind_generic_parameters): If our
12061         parent is a generic instance, pass all the `types' to it, no
12062         matter whether it has the same number of type parameters or not.
12063
12064 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12065
12066         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12067
12068         * assembly.c (mono_assembly_load_references): Move the image<->assembly
12069         assignment code to this function so it gets called recursively for all
12070         modules.
12071
12072         * image.c (load_modules): Remove the assembly assignment since it is
12073         now done by mono_assembly_load_references.
12074         
12075         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12076         Add 'module' argument.
12077         (mono_module_get_types): New helper function.
12078         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12079
12080 2003-11-08  Martin Baulig  <martin@ximian.com>
12081
12082         * class.c (mono_class_inflate_generic_method): Interface method
12083         don't have a header.
12084
12085         * reflection.c (mono_image_get_methodspec_token): Take an
12086         additional `MonoGenericInst *' argument instead of reading it from
12087         the header; this is necessary to support interfaces.
12088         (mono_image_create_token): Pass the `MonoGenericInst *' from the
12089         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12090         (inflated_method_get_object): Take an additional `MonoGenericInst *'
12091         argument.
12092
12093         * reflection.h (MonoReflectionInflatedMethod): Added
12094         `MonoGenericInst *ginst'.
12095
12096 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
12097
12098         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12099
12100 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
12101
12102         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12103
12104 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12105
12106         * reflection.c 
12107         (reflection_methodbuilder_from_method_builder):
12108         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
12109         initialize a ReflectionMethodBuilder structure.
12110         (mono_image_get_methodbuilder_token):
12111         (mono_image_get_ctorbuilder_token): New functions to emit memberref
12112         tokens which point to types in another module inside the same assembly.
12113
12114         * reflection.c: Use the new helper functions.
12115         
12116         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12117
12118         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
12119         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12120
12121         * reflection.c (resolution_scope_from_image): Emit a moduleref if
12122         neccesary.
12123
12124         * reflection.c (mono_image_build_metadata): Emit metadata only for the
12125         current module. Emit the manifest only for the main module.
12126
12127         * reflection.c (mono_image_create_token): Add assertion when a 
12128         memberref needs to be created.
12129
12130         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12131
12132         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
12133         larger buffer for the custom attribute blob. Fixes #50637.
12134         
12135 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12136
12137         * threadpool.c: notify listener on async processing handles after
12138         invoking the async callback. Thanks to Zoltan.
12139
12140 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12141
12142         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
12143         avoid code duplication.
12144
12145         * reflection.h (MonoDynamicImage): New type which is currently unused,
12146         but will be used through the ref.emit code in place of 
12147         MonoDynamicAssembly.
12148
12149         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12150         object layout.
12151
12152         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12153         a MonoDynamicImage instead of just a MonoImage.
12154         
12155         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12156         icalls to ModuleBuilder but keep their semantics, so they will work
12157         with moduleb->assemblyb. This will change later.
12158         
12159 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12160
12161         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12162         object layout.
12163
12164         * reflection.c (mono_image_build_metadata): Avoid creation of a default
12165         main module, since it is now done by the managed code.
12166
12167 2003-11-03  Martin Baulig  <martin@ximian.com>
12168
12169         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12170         `ginst->klass' here.
12171         (method_encode_methodspec): Don't use the `ginst->generic_method's
12172         klass if it's a generic instance, use `ginst->klass' in this case.
12173
12174 2003-11-03  Martin Baulig  <martin@ximian.com>
12175
12176         * reflection.c (mono_image_get_generic_method_param_info):
12177         Removed, use mono_image_get_generic_param_info() instead.
12178         (mono_image_get_type_info): Write the GenericParam table before
12179         the Method table.  This is neccessary because in the GenericParam
12180         table, type parameters of the class (ie. '!0' etc.) must come
12181         before the ones from its generic methods (ie. '!!0' etc).
12182
12183 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12184
12185         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12186
12187 2003-11-02  Martin Baulig  <martin@ximian.com>
12188
12189         * reflection.c (create_generic_typespec): Take a
12190         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12191         the generic parameters from it.
12192
12193 2003-11-02  Martin Baulig  <martin@ximian.com>
12194
12195         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12196         instead of a `MonoClassField *' since we just need the type.
12197         (create_generic_typespec): New static function.  Creates a
12198         TypeSpec token for a generic type declaration.
12199         (mono_image_get_generic_field_token): New static function.
12200         (mono_image_create_token): If we're a FieldBuilder in a generic
12201         type declaration, call mono_image_get_generic_field_token() to get
12202         the token.
12203
12204 2003-11-02  Martin Baulig  <martin@ximian.com>
12205
12206         * reflection.h
12207         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12208         `MonoReflectionGenericInst *declaring_type' and
12209         `MonoReflectionGenericInst *reflected_type' fields.
12210
12211         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12212         `MonoReflectionGenericInst *declaring_type' and a
12213         `MonoReflectionGenericInst *reflected_type' argument instead of a
12214         single `MonoReflectionGenericInst *type' one.  Set
12215         `res->declaring_type' and `res->reflected_type' from them.
12216         (mono_reflection_inflate_field): Likewise.      
12217
12218 2003-11-02  Martin Baulig  <martin@ximian.com>
12219
12220         * class.c (mono_class_setup_vtable): Don't store generic methods
12221         in the vtable.  
12222
12223 2003-11-02  Martin Baulig  <martin@ximian.com>
12224
12225         * reflection.h (MonoReflectionGenericInst): Added
12226         `MonoReflectionType *declaring_type'.
12227
12228         * reflection.c (mono_reflection_bind_generic_parameters): Use
12229         `if (tb->parent)' instead of `klass->parent'.
12230
12231 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12234         with an empty ASSEMBLY table.
12235
12236         * reflection.c (mono_image_build_metadata): Avoid using the same loop
12237         variable in the inner and outer loops.
12238
12239 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12240
12241         * metadata.h (mono_metadata_make_token): Put parentheses around macro
12242         argument.
12243
12244         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12245         
12246         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
12247         icalls. Instead, do everything in managed code. This is needed since
12248         it is hard to restore the original domain etc. in unmanaged code in the
12249         presence of undeniable exceptions.
12250
12251         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
12252         New icalls to push and pop appdomain refs.
12253
12254 2003-10-31  Martin Baulig  <martin@ximian.com>
12255
12256         * class.c (inflate_generic_type): Renamed to
12257         mono_class_inflate_generic_type() and made it public.
12258
12259         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12260         New interncall.
12261
12262         * loader.c (mono_field_from_memberref): Also set the retklass for
12263         typespecs.
12264
12265         * fielder.c (mono_image_get_inflated_field_token): New static
12266         method; creates a metadata token for an inflated field.
12267         (mono_image_create_token, fixup_method): Added support for
12268         "MonoInflatedField".
12269         (fieldbuilder_to_mono_class_field): New static function.
12270         (mono_reflection_inflate_field): New public function.
12271
12272         * reflection.h
12273         (MonoReflectionGenericInst): Added `MonoArray *fields'.
12274         (MonoReflectionInflatedField): New typedef.     
12275
12276 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
12277
12278         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12279         for Solaris and other platforms without s6_addr16
12280
12281 2003-10-30  Martin Baulig  <martin@ximian.com>
12282
12283         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12284         argument instead of two.
12285         (mono_class_inflate_generic_signature): Likewise.
12286         (inflate_generic_header): Likewise.
12287         (mono_class_inflate_generic_method): Likewise.  In addition, if
12288         `ginst->klass' is set, it becomes the new `method->klass'.
12289
12290         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12291         field.
12292
12293         * reflection.c (encode_generic_method_sig): Write a 0xa as the
12294         first byte. [FIXME]
12295         (method_encode_methodspec): If we have generic parameters, create
12296         a MethodSpec instead of a MethodRef.
12297         (fixup_method): Added support for "MonoInflatedMethod" and
12298         "MonoInflatedCtor".
12299         (mono_image_create_token): Added support for "MonoInflatedMethod"
12300         and "MonoInflatedCtor".
12301         (inflated_method_get_object): New static function; returns a
12302         managed "System.Reflection.MonoInflatedMethod" object.
12303         (mono_reflection_bind_generic_method_parameters): Return a
12304         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12305         (mono_reflection_inflate_method_or_ctor): Likewise.
12306         (mono_image_get_generic_method_param_info): Initialize unused
12307         fields to zero.
12308         (mono_image_get_generic_param_info): Likewise.
12309
12310         * reflection.h (MonoReflectionInflatedMethod): New public
12311         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
12312         "S.R.MonoInflatedCtor" classes.
12313
12314         * loader.c (method_from_memberref): If we're a TypeSpec and it
12315         resolves to a generic instance, inflate the method.
12316
12317 2003-10-28  Dick Porter  <dick@ximian.com>
12318
12319         * object.c (mono_runtime_run_main): Convert command-line arguments
12320         into utf8, falling back to the user's locale encoding to do so.
12321
12322 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12323
12324         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12325         at this time.
12326
12327         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12328
12329         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12330         up icalls at method definition time. Partially fixes #33569.
12331
12332 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
12333
12334         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12335         marshalling of arrays. Fixes #50116.
12336
12337         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12338
12339         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12340         points to a vtable in the dying appdomain.
12341
12342         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12343         listeners into unmanaged code inside the lock.
12344
12345         * object.c (mono_class_vtable): Turn off typed allocation in non-root
12346         domains and add some comments.
12347
12348 2003-10-25  Martin Baulig  <martin@ximian.com>
12349
12350         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12351
12352         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12353
12354         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12355         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12356         currently parsing.  Create the generic class and store it in
12357         `generic_inst->klass' before parsing the type arguments.  This is
12358         required to support "recursive" definitions; see mcs/tests/gen-23.cs
12359         for an example.
12360         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12361         to support recursive typespec entries.
12362
12363         * class.c (mono_class_setup_parent): If our parent is a generic
12364         instance, we may get called before it has its name set.
12365         (mono_class_from_generic): Splitted into
12366         mono_class_create_from_generic() and mono_class_initialize_generic().
12367
12368 2003-10-25  Martin Baulig  <martin@ximian.com>
12369
12370         * icall.c (ves_icall_Type_BindGenericParameters): Return a
12371         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12372         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12373         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12374
12375         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12376         (create_typespec): Likewise.
12377         (mono_reflection_bind_generic_parameters): Return a
12378         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12379         (mono_reflection_inflate_method_or_ctor): New public function.
12380
12381         * reflection.h (MonoReflectionGenericInst): New typedef.        
12382
12383 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12384
12385         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12386         inside the domain lock. Fixes #49993.
12387         
12388         * object.c (mono_class_vtable): When typed allocation is used, 
12389         allocate vtables in the GC heap instead of in the mempool, since the
12390         vtables contain GC descriptors which are used by the collector even
12391         after the domain owning the mempool is unloaded.
12392
12393         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12394
12395         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12396         reflect what it does. Also invalidate mempools instead of freeing
12397         them if a define is set.
12398
12399         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12400         of the appdomain.
12401         
12402         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12403         hold the finalizable objects in this domain.
12404
12405         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12406         appdomain.
12407
12408         * appdomain.c (mono_domain_set): New function to set the current
12409         appdomain, but only if it is not being unloaded.
12410
12411         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12412         appdomain which is being unloaded.
12413         
12414         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12415         unloading of the root appdomain.
12416
12417         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12418         icall to execute a method in another appdomain. Intended as a 
12419         replacement for InternalSetDomain, which can confuse the code 
12420         generation in the JIT.
12421
12422         * appdomain.c (mono_domain_is_unloading): New function to determine
12423         whenever an appdomain is unloading.
12424
12425         * appdomain.c (mono_domain_unload): New function to correctly unload
12426         an appdomain.
12427
12428         * assembly.c (mono_assembly_load_references): Check that an assembly
12429         does not references itself.
12430
12431         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12432         domain manually, it asks the finalizer thread to do it, then waits for
12433         the result. Also added a timeout.
12434
12435         * icall.c: Register the new icalls.
12436
12437         * threads.h threads.c: Export the mono_gc_stop_world and 
12438         mono_gc_start_world functions.
12439         
12440         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
12441         function to fill out the mempool with 0x2a.
12442
12443 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
12444
12445         * reflection.h (MonoReflectionMethodAux): New structure to store
12446         information which is rarely used, thus is not in the MonoMethod
12447         structure.
12448
12449         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12450         store the aux info.
12451
12452         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12453         and marshalling info into the aux structure.
12454
12455         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12456         from the aux structure.
12457
12458         * loader.c (mono_method_get_param_names): Retrieve the param names from
12459         the aux structure.
12460         
12461 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
12462
12463         * exception.h exception.c: Add AppDomainUnloadedException && fix 
12464         warning.
12465
12466 2003-10-21  Dick Porter  <dick@ximian.com>
12467
12468         * socket-io.c
12469         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12470         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12471
12472 2003-10-21  Martin Baulig  <martin@ximian.com>
12473
12474         * reflection.c (mono_reflection_bind_generic_parameters):
12475         `klass->parent' is NULL for interfaces.
12476
12477 2003-10-21  Martin Baulig  <martin@ximian.com>
12478
12479         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12480
12481 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
12482
12483         * exception.c (mono_exception_from_name_msg): New helper function for
12484         creating exceptions and initializing their message field.
12485
12486         * exception.c: Simplify functions using the new helper.
12487
12488         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12489         New function.
12490
12491         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12492         mono_raise_exception, since otherwise gcc doesn't generate the function
12493         epilog for raise_exception, confusing the stack unwinding in the JIT.
12494         Fixes #45043.
12495
12496         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12497         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12498         Fixes #49499.
12499
12500 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12501
12502         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12503         utf8.
12504
12505 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
12506
12507         * icall.c: Removed GetUninitializedObject method because
12508           AllocateUninitializedClassInstance does the same.
12509
12510 2003-10-18  Martin Baulig  <martin@ximian.com>
12511
12512         * class.c (inflate_generic_signature): Renamed to
12513         mono_class_inflate_generic_signature() and made it public.
12514         (my_mono_class_from_generic_parameter): New static function; if we
12515         don't already have the generic parameter's MonoClass, create a
12516         very simple one which is just used internally in the runtime and
12517         not passed back to managed code.
12518
12519         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12520
12521         * metadata.h (MonoMethodSignature): Moved the
12522         `MonoGenericParam *gen_params' to the MonoMethodHeader.
12523         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12524
12525         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12526         ves_icall_MonoMethod_GetGenericArguments(); this is now an
12527         interncall on the MonoMethod class, not on MethodInfo.
12528         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12529         calling mono_reflection_bind_generic_method_parameters() directly.
12530
12531         * loader.c (mono_method_get_signature): If this is a MethodSpec;
12532         return the already computed `method->signature'.
12533         (method_from_methodspec): New static function to load a method
12534         from a MethodSpec entry.
12535         (mono_get_method_from_token): Call the new method_from_methodspec()
12536         for MethodSpec tokens.  
12537         (mono_get_method_from_token): If we're a generic method, load the
12538         type parameters.
12539
12540         * reflection.c (mono_image_get_memberref_token): Allow
12541         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12542         table.
12543         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12544         (mono_image_create_token): First check whether it's a generic
12545         method (so we'd need to create a MethodSpec), then do the other
12546         two alternatives.
12547         (mono_reflection_bind_generic_method_parameters): Return a
12548         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12549         called directly from the interncall.
12550
12551 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
12552
12553         * reflection.c (load_public_key): Move loading of the public key
12554         into managed code.
12555
12556         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12557
12558         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12559         fields.
12560
12561         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12562         culture, hash_alg and public_key. Fixes #49555.
12563
12564 2003-10-17  Martin Baulig  <martin@ximian.com>
12565
12566         * class.h (MonoGenericInst): Moved this declaration here and added
12567         `MonoMethod *generic_method'.
12568
12569         * icall.c
12570         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12571         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12572
12573         * metadata.c (mono_metadata_type_equal): Two types of
12574         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12575         index; ie. don't compare the address of the `MonoGenericParam'
12576         structure.
12577         (mono_metadata_load_generic_params): Removed the `MonoMethod
12578         *method' argument.
12579
12580         * metadata.h (MonoGenericInst): Moved declaration to class.h.
12581         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12582
12583         * reflection.c (method_encode_signature): Encode the number of
12584         generic parameters.
12585         (encode_generic_method_sig): New static function.
12586         (method_encode_methodspec): New static function; creates an entry
12587         in the MethodSpec table for a generic method.
12588         (mono_image_get_methodspec_token): New static function.
12589         (mono_image_create_token): Call mono_image_get_methodspec_token()
12590         for generic methods.
12591         (mono_reflection_bind_generic_method_parameters): New public
12592         function.  Instantiates a generic method.
12593
12594 2003-10-16  Martin Baulig  <martin@ximian.com>
12595
12596         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12597         *gen_params' here from MonoMethodHeader.
12598
12599         * metadata.c (mono_metadata_parse_method_signature): If we have
12600         generic parameters, initialize `method->gen_params' and then set
12601         the correct `type->data.generic_param' in all the parameters.
12602
12603 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12604
12605         * threads.c (mono_threads_get_default_stacksize): New function to 
12606         return the default stacksize.
12607
12608         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12609         termination of the finalizer thread, since the previous method had
12610         race conditions. Fixes #49628.
12611
12612         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12613         as for the other managed threads.
12614
12615 2003-10-16  Martin Baulig  <martin@ximian.com>
12616
12617         * class.c (inflate_generic_signature): Copy `generic_param_count'
12618         and `gen_params'.
12619
12620         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12621         New interncall.
12622
12623         * metadata.c (mono_metadata_parse_method_signature): Actually set
12624         the `method->generic_param_count' here.
12625         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12626
12627 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12628
12629         * object.h: Add a new field to TypedRef to simplify the implementation
12630         of the REFANY opcodes in the JIT.
12631
12632         * icall.c: Make use of the new field.
12633
12634         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12635         dynamically.
12636
12637 2003-10-15  Martin Baulig  <martin@ximian.com>
12638
12639         * class.c (mono_class_from_gen_param): Renamed to
12640         mono_class_from_generic_parameter() and moved most of the
12641         functionality from mono_reflection_define_generic_parameter()
12642         here; ie. we create a "real" class here.
12643         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12644         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12645         previously been called.
12646
12647         * class.h (MonoGenericParam): Moved the declaration of this struct
12648         here from metadata.h and added `MonoMethod *method'.
12649
12650         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12651         interncall.
12652
12653         * loader.c (mono_get_method_from_token): If we have any generic
12654         parameters, call mono_metadata_load_generic_params() to read them
12655         from the MONO_TABLE_GENERICPAR.
12656
12657         * metadata.c (mono_metadata_load_generic_params): Added
12658         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12659
12660         * metadata.h (MonoMethodSignature): Replaced
12661         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12662         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12663
12664         * reflection.c (mono_reflection_define_generic_parameter): Moved
12665         most of the functionality into the new
12666         mono_class_from_generic_parameter(); set the `method' field if
12667         we're a method parameter.       
12668
12669 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
12670
12671         * marshal.c (emit_struct_conv): if native size is 0
12672         emit no code.
12673
12674 2003-10-14  Martin Baulig  <martin@ximian.com>
12675
12676         * icall.c: The generics API has changed in the spec since it was
12677         added to System.Type; these modifications make it match the spec
12678         again.
12679         (ves_icall_Type_GetGenericParameters): Renamed to
12680         `ves_icall_Type_GetGenericArguments'.
12681         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12682         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12683         `ves_icall_MonoType_get_HasGenericArguments'.
12684         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12685         `ves_icall_MonoType_get_IsGenericParameter'.
12686         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12687         this is no interncall anymore.
12688         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12689         `ves_icall_TypeBuilder_get_IsGenericParameter'.
12690
12691 2003-10-14  Martin Baulig  <martin@ximian.com>
12692
12693         * reflection.c (mono_reflection_bind_generic_parameters): Also
12694         inflate generic methods if we're reading the class from IL.
12695
12696 2003-10-13  Martin Baulig  <martin@ximian.com>
12697
12698         * reflection.c (mono_reflection_define_generic_parameter): This
12699         method isn't called directly from the icall anymore; take a
12700         `MonoReflectionAssemblyBuilder *' so we can use this for type and
12701         method generic parameters.
12702         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12703         (method_builder_encode_signature): Encode generic parameters.
12704         (mono_image_get_method_info): Write generic params to the
12705         MONO_TABLE_GENERICPARAM table.
12706
12707         * reflection.h (MonoReflectionMethodBuilder): Added
12708         `MonoArray *generic_params'.
12709
12710         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12711
12712         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12713         wrapper for mono_reflection_define_generic_parameter().
12714         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
12715
12716 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
12717
12718         * marshal.h: Add missing function to fix build.
12719
12720         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
12721         the SetLastError pinvoke attribute.
12722
12723         * marshal.c (mono_marshal_set_last_error): New helper function called
12724         by the generated code.
12725         
12726         * marshal.c (mono_mb_emit_branch): New helper function.
12727
12728         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12729
12730         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12731         classes as parameters and return values of delegates. Fixes #29256. 
12732
12733 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
12734
12735         * locales.c: use gint32 in non HAVE_ICU case
12736
12737 2003-10-11  Martin Baulig  <martin@ximian.com>
12738
12739         * mono-debug.c (mono_debug_add_method): Added a workaround for
12740         bug #48591.
12741
12742 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12743
12744         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12745         delegates passed to native code must use the STDCALL calling 
12746         convention. Fixes #35987.
12747
12748 2003-10-10  Martin Baulig  <martin@ximian.com>
12749
12750         * class.c (inflate_generic_type): If we're inflating for a generic
12751         type instance (and not for a generic method), return
12752         MONO_TYPE_MVAR unchanged.
12753
12754 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12755
12756         * string-icalls.c: Join ignores null strings in the source array.
12757         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12758         * threads.c: GetAvailableTheads is slightly more accurate.
12759
12760 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
12761
12762         * threads.h threads.c : add mono_threads_set_default_stacksize
12763         and pass default to CreateThread calls.
12764
12765 2003-10-09  Dick Porter  <dick@ximian.com>
12766
12767         * icall.c:
12768         * locales.h:
12769         * locales.c: Internal calls for constructing CultureInfo and
12770         related objects from libicu (if its available.)
12771
12772 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12773
12774         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12775
12776 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12777
12778         * threadpool.c: added an argument to async_invoke_thread that is the
12779         item to process, pass the MonoAsyncResult to the thread start function
12780         when creating a new thread. This way we don't need to acquire any lock
12781         when we're creating a new thread. Readded a semaphore for faster
12782         response times (instead of that Sleep i added).
12783
12784 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
12785
12786         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12787         get daylight change dates better on Windows, fix handling
12788         of platforms without tm_gmtoff.
12789
12790 2003-10-06  Martin Baulig  <martin@ximian.com>
12791
12792         * class.c (inflate_generic_method): Renamed to
12793         mono_class_inflate_generic_method() and made public.
12794         (mono_class_init): Don't inflate the generic methods here.
12795         (mono_class_from_generic): Added `gboolean inflate_methods'
12796         argument.  Inflate the methods here.
12797
12798         * loader.c (mono_method_get_param_names): Ignore instances of
12799         generic types for the moment.
12800
12801         * reflection.c (fixup_method): Added support for inflated methods.
12802         (mono_image_create_token): Use mono_image_get_methodref_token()
12803         for inflated methods.
12804         (mono_custom_attrs_from_param): Ignore instances of generic types
12805         for the moment.
12806         (mono_reflection_bind_generic_parameters): New public function.
12807         Moved all the functionality from
12808         ves_icall_Type_BindGenericParameters() here and added support for
12809         dynamic types.
12810         (mono_reflection_define_generic_parameter): Initialize
12811         `klass->methods' here.
12812
12813         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12814         functionality into mono_reflection_define_generic_parameter().
12815         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12816         TypeBuilder, return that TypeBuilder.
12817
12818 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12819
12820         * appdomain.c: removed mono_delegate_semaphore.
12821
12822         * threadpool.c:
12823         (mono_thread_pool_add): moved hash table creation inside and the thread 
12824         creation outside of the critical region.
12825         (mono_thread_pool_finish): removed obsolete code.
12826         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12827         continue or exit the thread depending on the queue.
12828
12829 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
12830
12831         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12832         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12833         handle more bool marshalling options
12834
12835 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
12836
12837         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12838         arrays of structs. Also add a more descriptive error message when
12839         a structure member is marshalled as LPArray.
12840
12841 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12842
12843         * marshal.c (mono_marshal_get_native_wrapper): Add support for
12844         marshalling arrays of complex types. Fixes #29098. Also remove an
12845         usused and incomplete function.
12846
12847 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12848
12849         * gc.c: report heap_size - free_bytes as total memory allocated
12850         (bug#49362).
12851
12852 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12853
12854         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
12855         fix timezone handling problems on Windows.
12856         
12857         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12858         asserts when the year is outside the range handled by ms the functions.
12859
12860         * class.c (setup_interface_offsets): If the class is an interface,
12861         fill out its interface_offsets slot.
12862
12863 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12864
12865         * threadpool.c: mark threadpool threads as background.
12866
12867 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
12868
12869         * decimal.c - define DECINLINE to nothing if not using GCC
12870
12871 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12872
12873         * assembly.c: More refcount fixes.
12874
12875 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12876
12877         * string-icalls.c: if we're not trimming, return the same string.
12878         When not splitting, don't create a new string.
12879
12880 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12881
12882         * image.c:
12883         (mono_image_open): increment the ref_count inside the critical section.
12884
12885 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
12886
12887         * image.c (mono_image_open): Fix reference counting bug.
12888
12889 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
12890
12891         * marshal.c (mono_marshal_type_size) struct alignment changed for 
12892         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
12893         64bits. Avoid leak in mono_marshal_get_native_wrapper when
12894         mono_lookup_pinvoke_call throws.        
12895
12896 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12897
12898         * reflection.c (mono_reflection_parse_type): Fix #49114.
12899
12900         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12901         temporary workaround for cygwin header problem.
12902
12903         * object.c (mono_object_isinst): Synchronize this with the code
12904         generated by the JIT for casts.
12905
12906 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12907
12908         * reflection.c (encode_type): Fix #38332.
12909
12910 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12911
12912         * marshal.c (mono_marshal_method_from_wrapper): New function to return
12913         the original method from the wrapper method.
12914
12915 2003-09-25  Martin Baulig  <martin@ximian.com>
12916
12917         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12918         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12919         (ves_icall_Type_get_IsGenericInstance): New interncall.
12920
12921 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12922
12923         * object.c: fix cast warning in big endian code.
12924
12925 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12926
12927         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12928         
12929 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12930
12931         * assembly.c: don't call check_env from mono_assembly_load. It's
12932         already done once in mono_assemblies_init and may cause headaches when
12933         multiple threads are loading assemblies.
12934
12935 2003-09-19  Martin Baulig  <martin@ximian.com>
12936
12937         * reflection.c (mono_reflection_define_generic_parameter): Don't
12938         allocate `klass->methods', set `klass->flags' to
12939         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12940
12941 2003-09-18  Martin Baulig  <martin@ximian.com>
12942
12943         * class.c (mono_class_init): Don't create `class->methods' if it's
12944         already initialized.
12945
12946         * metadata.c (mono_metadata_load_generic_params): Make this
12947         actually work.
12948
12949         * reflection.c (mono_reflection_define_generic_parameter): Set
12950         parent class and interfaces from the constraints.
12951
12952         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12953         to keep this struct in sync with the declaration in TypeBuilder.cs.
12954
12955 2003-09-17  Martin Baulig  <martin@ximian.com>
12956
12957         * metadata.h (MonoType): Replaced the data's `int type_param'
12958         field with `MonoGenericParam *generic_param'.
12959         (MonoGenericParam): Added `MonoClass *klass'.
12960
12961         * class.c (mono_class_from_gen_param): Removed the
12962         `MonoImage *image' and `int type_num' arguments.
12963
12964         * metadata.c (mono_metadata_parse_generic_param): New static
12965         method; creates a MonoGenericParam which just contains the index.
12966         (do_mono_metadata_parse_type): Call
12967         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12968         MONO_TYPE_MVAR.
12969
12970         * reflection.c (mono_image_typedef_or_ref): Generic type
12971         parameters may be in the same assembly, but never use a typedef
12972         for them.
12973         (mono_reflection_define_generic_parameter): We're now creating a
12974         "real" class for the type parameter; it's now safe to call
12975         mono_class_from_mono_type() on the class'es type, it'll do the
12976         right thing.
12977
12978 2003-09-16  Martin Baulig  <martin@ximian.com>
12979
12980         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
12981         `symfile->range_entry_size' and `symfile->class_entry_size' here;
12982         the `symfile' data structure must be fully initialized before it
12983         gets added to the table.
12984
12985 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12986
12987         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
12988
12989         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
12990         class init trampolines.
12991
12992 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12993
12994         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
12995         to the built-in profiler to turn off time and allocation profiling
12996         respectively.
12997
12998 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12999
13000         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13001         g_direct_equal.
13002
13003         * debug-helpers.c (mono_method_full_name): Print the wrapper type
13004         in human readable form.
13005
13006 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13007
13008         * reflection.c icall.c: Fixed warnings.
13009
13010         * image.c (load_class_names): Use a temporary hash table to hold the
13011         namespaces in order to avoid doing many string comparisons.
13012
13013         * image.h: Fix typo.
13014
13015         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13016         Pass NULL instead of g_direct_equal to the GHashTable constructor 
13017         since the NULL case is short-circuited inside g_hash_table_lookup, 
13018         leading to better performance.  
13019
13020         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13021         obtain the first custom attribute for a given index. Depends on the
13022         CustomAttribute table being sorted by the parent field.
13023
13024         * reflection.c (mono_custom_attrs_from_index): Use the new function 
13025         for better performance.
13026
13027 2003-09-07  Martin Baulig  <martin@ximian.com>
13028
13029         * class.c (mono_class_init): If we're a generic instance, inflate
13030         all our methods instead of loading them from the image.
13031         (mono_class_from_generic): Set `class->methods = gklass->methods'.
13032
13033 2003-09-07  Martin Baulig  <martin@ximian.com>
13034
13035         * mono-debug-debugger.c: Added support for constructors.
13036
13037 2003-09-06  Martin Baulig  <martin@ximian.com>
13038
13039         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13040         New interncall.
13041
13042         * reflection.c (mono_reflection_setup_generic_class): Call
13043         ensure_runtime_vtable() to create the vtable.
13044
13045 2003-09-05  Martin Baulig  <martin@ximian.com>
13046
13047         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13048         MONO_TYPE_MVAR.
13049
13050 2003-09-04  Martin Baulig  <martin@ximian.com>
13051
13052         * reflection.c (mono_reflection_define_generic_parameter): Generic
13053         parameters start with zero.
13054
13055 2003-09-04  Martin Baulig  <martin@ximian.com>
13056
13057         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13058
13059         * reflection.h (MonoReflectionGenericParam): New typedef.
13060         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13061         the generic parameters from the managed TypeBuilder.
13062
13063         * reflection.c (mono_reflection_define_generic_parameter): New function.
13064         (mono_reflection_create_runtime_class): Encode generic parameters.
13065         (mono_reflection_setup_generic_class): New function; this is
13066         called after adding adding all generic params to the TypeBuilder.
13067         (encode_type): Added MONO_TYPE_VAR.
13068
13069 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13070
13071         * class.h class.c (mono_class_needs_cctor_run): Moved this method
13072         here from the JIT.
13073
13074         * assembly.h assembly.c: Moved the AOT loading code into an assembly
13075         load hook.
13076
13077 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
13078
13079         * reflection.h reflection.c class.h class.c: Delete duplicate 
13080         definition of mono_type_get_name () from reflection.c and export the
13081         one in class.c.
13082
13083         * class.c: Class loading fixes from Bernie Solomon 
13084         (bernard@ugsolutions.com).
13085
13086         * reflection.c: Endianness fixes from Bernie Solomon 
13087         (bernard@ugsolutions.com).
13088         
13089 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
13090
13091         * assembly.h assembly.c: Define a file format version for AOT
13092         libraries.
13093         
13094         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13095
13096         * appdomain.h (MonoJitInfo): New field to determine whenever the
13097         code is domain neutral.
13098         
13099 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
13100
13101         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13102
13103 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
13104
13105         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
13106         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13107         Avoid caching the result since strings must be domain specific. Fixes
13108         #48050.
13109
13110 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
13111
13112         * marshal.c (mono_marshal_init): Make this callable multiple times
13113         since it is hard to find a correct place to call it.
13114
13115         * object.c (mono_runtime_class_init): Execute static constructors in
13116         the correct appdomain.
13117
13118         * image.c (build_guid_table): Handle the case when multiple images have
13119         the same GUID.
13120
13121 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13122
13123         * icall.c: added a couple of icalls for System.Web.
13124
13125 2003-08-28  Martin Baulig  <martin@ximian.com>
13126
13127         * icall.c (ves_icall_Type_BindGenericParameters): Use
13128         `klass->generic_inst' instead of `&klass->byval_arg' in the
13129         mono_type_get_object() call.  The returned type must be
13130         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13131
13132 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
13133
13134         * NOTES: New file.
13135
13136         * object.c (mono_class_proxy_vtable): Make it thread safe.
13137
13138         * pedump.c: Fix warning.
13139
13140         * object.c appdomain.h: Get rid of metadata_section. 
13141         It is no longer needed and it was causing deadlocks with domain->lock.
13142
13143         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13144
13145 2003-08-26  Martin Baulig  <martin@ximian.com>
13146
13147         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13148
13149 2003-08-26  Martin Baulig  <martin@ximian.com>
13150
13151         * pedump.c (main): Call mono_metadata_init(),
13152         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13153         and mono_loader_init().
13154
13155 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
13156
13157         * loader.h: Add missing include to fix build.
13158
13159         * image.h: mono_image_load_references is no more.
13160
13161         * assembly.c: Reworked assembly loading to make it really thread safe.
13162         After these changes, the assembly returned by mono_assembly_open is
13163         fully initialized, i.e. all its references assemblies are loaded.
13164
13165         * assembly.c (mono_image_load_references): Renamed to 
13166         mono_assembly_load_references, and made private, since clients no
13167         longer need to call it.
13168
13169         * class.c: Removed calls to mono_assembly_load_references, since it was
13170         a source of deadlocks.
13171
13172         * loader.h loader.c class.h class.c: Protect data structures using a 
13173         new lock, the loader lock.
13174
13175         * class.c (mono_class_setup_vtable): Create temporary hash tables and
13176         GPtrArrays only when needed.
13177
13178         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
13179         into empty structures by mcs. Fixes pinvoke7.cs.
13180         
13181         * domain.c (mono_init): Call a new initialization function.
13182
13183         * appdomain.c (mono_runtime_init): Call the new initializer function
13184         of the marshal module.
13185
13186         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13187         inserted into empty structures by mcs. Fixes pinvoke7.cs.
13188
13189         * marshal.h marshal.c: Added locks around the wrapper caches to make
13190         this module thread safe.
13191
13192         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13193         this argument. Fixes pinvoke1.exe.
13194
13195 2003-08-25  Lluis Sanchez <lluis@ximian.com>
13196
13197         * object.h: Added call_type field to MonoMethodMessage and the corresponding
13198         enumeration of values. Removed fields to store remote call output values in
13199         MonoAsyncResult. Not needed any more.
13200         * object.c: Initialize call_type and async_result fields in mono_message_init.
13201         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13202         dispatching the message.
13203         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13204         async call to finish. To do it use a message with EndInvoke call type.
13205
13206 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
13207
13208         * loader.h loader.c (mono_method_hash_marhal_info): New function which
13209         determines whenever a method has marshalling info.
13210
13211 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13212
13213         * assembly.c: fix the build on windows.
13214
13215 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13216
13217         * object.cs: Fixed bug #47785.
13218
13219 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13220
13221         * string-icalls.c (StringReplace): If their are no occurances of
13222         the old string found return a reference to the supplied
13223         string. This saves some memory and matches MS behavoir.
13224         
13225 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13226
13227         * socket-io.c: fixed compilation for systems that define AF_INET6
13228         and don't define SOL_IP/SOL_IPV6.
13229
13230 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
13231
13232         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13233         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13234
13235         * rawbuffer.c rawbuffer.h: Make this module thread safe.
13236
13237         * domain.c: Make this module thread safe.
13238
13239         * domain.c (mono_init): Call new initialization function.
13240
13241         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13242         reference types too. Fixes #38812.
13243
13244         * image.c (mono_image_init): Fixed warnings.
13245
13246         * class.c (mono_class_from_typeref): Handle assembly load failure
13247         correctly.
13248
13249         * appdomain.c (add_assemblies_to_domain): Handle the case when
13250         the references of an assembly are not yet loaded.
13251
13252         * metadata.c image.c assembly.c: Moved initialization of global
13253         variables to a separate function called at startup since lazy 
13254         initialization of these variables is not thread safe.
13255         
13256         * image.c assembly.c: Made this module thread safe by adding locks in 
13257         the appropriate places.
13258
13259         * domain.c (mono_init): Call the new initialization functions of the
13260         three modules.
13261
13262 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
13263
13264         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13265           make a direct call. It is proxy's work to make the call asynchronous.
13266           mono_delegate_end_invoke(): If the targe is a proxy, just collect
13267           the return values.
13268         * object.cs: mono_method_call_message_new(): read AsyncResult and
13269           state object from parameters list, if this info is requested.
13270         * object.h: Added fields to store remote call output values in
13271           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13272
13273 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13274
13275         * object.h: add needed fields to MonoThread.
13276         * threads.c, threads.h: allow registering a function to cleanup data
13277         allocated per thread by the JIT.
13278
13279 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13280
13281         * loader.h: portability fix by Bernie Solomon
13282         * <bernard@ugsolutions.com>.
13283
13284 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
13285
13286         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
13287         return a MonoArray. This simplifies the code and also ensures that
13288         the cache allways contains an object reference as a value.
13289
13290         * icall.c (ves_icall_get_parameter_info): Simplified using the new
13291         function.
13292
13293 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13294
13295         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13296         fixes a problem with byte ordering when getting the address family for
13297         a socket.
13298
13299 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
13300
13301         * .cvsignore: Added monosn.
13302
13303         * reflection.h reflection.c loader.c: Added support for parameter
13304         marshalling to dynamically created types. Fixes #47295.
13305
13306 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13307
13308         * rand.c: remove useless warnings.
13309
13310 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13311
13312         * class.c: implemented ldtoken for methods and fieldrefs.
13313
13314 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13315
13316         * threadpool.c: when mono_async_invoke was called, no one took care of
13317         monitoring the queue. So if the method invoked took some time and we
13318         got new async invoke requests after 500 ms (the thread created waited
13319         that long in WaitForSingleObject), the new async invoke was not called
13320         until the previous one finished.
13321
13322         This is fixed now. Thanks to Totte for helping with it.
13323
13324 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13325
13326         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13327
13328 2003-08-11  Martin Baulig  <martin@ximian.com>
13329
13330         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13331
13332 2003-08-06  Martin Baulig  <martin@ximian.com>
13333
13334         * mono-debug-debugger.c: Added support for static fields,
13335         properties and methods.
13336
13337 2003-08-06  Martin Baulig  <martin@ximian.com>
13338
13339         * mono-debug-debugger.c: Don't store the MonoString's vtable to
13340         make this work for applications with multiple application domains.
13341
13342 2003-08-04  Martin Baulig  <martin@ximian.com>
13343
13344         * mono-debug-debugger.c: Completely reworked the type support; the
13345         most important thing is that we're now just using one single
13346         `MonoType' instance per type.
13347
13348 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13349
13350         * mono-endian.h, mono-endian.c, icall.c: Added icall
13351         ves_icall_System_Double_AssertEndianity to assert double word endianity
13352         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13353
13354 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13355
13356         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13357         support, icalls and fixes.
13358
13359 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
13360
13361         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13362         classes that are a punctuation character in .NET is not the same a
13363         g_unichar_ispunct.
13364
13365 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13366
13367         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13368
13369 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
13370
13371         * icall.c: Add new MemCopy internalcall.
13372         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13373         Simplified code; It is not necessary to handle all the cases here,
13374         as the C# code takes care of it.  Only handle the case of the name
13375         resource embedded into the assembly.
13376
13377         Changed signature to return the data pointer and the size of the
13378         data. 
13379
13380 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
13381
13382         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13383         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13384
13385 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13386
13387         * socket-io.c: ignore EINTR error in select.
13388
13389 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13390
13391         * class.h, class.c: removed unused subclasses field in MonoClass.
13392
13393 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13394
13395         * icall.c: improve fix of get_base_definition(). If the parent class
13396           doesn't have the mehod, look at the parent of the parent.
13397         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13398           to check if a parameter is an in or out parameter
13399           (PARAM_ATTRIBUTE_IN is not set by default).
13400           mono_method_return_message_restore(): Use mono_class_value_size to
13401           get the size of a value type. mono_type_stack_size (parameterType)
13402           does not return the correct value if parameterType is byRef.
13403           mono_load_remote_field(), mono_load_remote_field_new(),
13404           mono_store_remote_field(), mono_store_remote_field_new():
13405           raise exception if the remote call returns an exception.
13406
13407 2003-07-28  Martin Baulig  <martin@ximian.com>
13408
13409         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13410         method.  This is a wrapper around mono_runtime_invoke() which
13411         boxes the instance object if neccessary.
13412
13413 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13414
13415         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13416         metadata.h, row-indexes.h, verify.c: first cut of generics support.
13417
13418 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13419
13420         * icall.c: disable mcs bug workaround.
13421
13422 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13423
13424         * object.c (mono_runtime_class_init): Take the metadata_section
13425         mutex before obtaining the domain mutex.
13426
13427         * appdomain.h: Added definition of metadata_section mutex here. 
13428
13429         * object.c: define metadata_mutex here.
13430
13431 2003-07-24  Ravi Pratap  <ravi@ximian.com>
13432
13433         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13434         fixed.
13435
13436 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
13437
13438         * reflection.c: Fix bug #46669
13439
13440 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13441
13442         * exception.c:
13443         * exception.h:
13444         * icall.c:
13445         * object.h: fill in the type name for TypeLoadException.
13446
13447 2003-07-23  Ravi Pratap  <ravi@ximian.com>
13448
13449         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13450         relationship between TypeBuilders while compiling corlib) and bug
13451         45993 (Array types returned from the runtime while compiling
13452         corlib were from the loaded corlib).
13453
13454 2003-07-22  Martin Baulig  <martin@ximian.com>
13455
13456         * mono-debug-debugger.c: Reworked the type support a bit more;
13457         distinguish between types and classes.
13458
13459 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13460
13461         * icall.c: add IsArrayImpl icall.
13462
13463 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
13464
13465         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13466         initializing real_size only once. Also fix bug #46602.
13467
13468 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
13469
13470         * object.c: Renamed mono_metadata_section to metadata_section.
13471
13472 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
13473
13474         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13475           empty array if the type is an array. Fixed.
13476           ves_icall_MonoMethod_get_base_definition: if the base method
13477           is abstract, get the MethodInfo from the list of methods of
13478           the class.
13479         * reflection.c: ParameterInfo.PositionImpl should be zero-based
13480           and it was 1-based. Fixed in mono_param_get_objects.
13481
13482 2003-07-20  Martin Baulig  <martin@ximian.com>
13483
13484         * mono-debug.h: Set version number to 31.
13485         (mono_debug_init): Added `MonoDomain *' argument.
13486
13487         * mono-debug-debugger.c: Reworked the type support; explicitly
13488         tell the debugger about builtin types; pass the `klass' address to
13489         the debugger.
13490
13491 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13492
13493         * image.c: Allow new metadata tables to be loaded without a
13494         warning. Also update the warning message to give the new constant value.
13495                 
13496 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13497
13498         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13499         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
13500         array type representation changes.
13501
13502 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13503
13504         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13505         on Environment.Exit () call.
13506
13507 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13508
13509         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13510         requires a matching corlib.
13511
13512 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13513
13514         * Changelog: My editor decided to add a CR to each line. Sorry about that.
13515           Committed again without the CRs.
13516         
13517 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13518
13519         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13520           getting it from the "this" socket instance. Did not work
13521           if the socket is a subclass of Socket.
13522           Also fixed bug #35371.
13523
13524 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13525
13526         * metadata.c: fixed size for TypedByRef.
13527         * loader.c: when searching for a method, consider the vararg amrker.
13528         * unicode.c, decimal.c: constify some arrays.
13529
13530 2003-07-15  Dick Porter  <dick@ximian.com>
13531
13532         * socket-io.c: Fixed compilation for gcc < 3.2.
13533
13534         Fixed compilation for machines that don't have AF_INET6 (thanks to
13535         Bernie Solomon <bernard@ugsolutions.com> for that part.)
13536
13537         Fixed compile warnings.
13538         
13539         Fixed formatting and line endings.
13540
13541 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
13542
13543         * socket-io.h:
13544         * socket-io.c: Added IPv6 support.
13545
13546 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
13547
13548         * class.c (mono_class_is_assignable_from): New function to implement
13549         the is_assignable_from logic. Used by mono_object_isinst, 
13550         Type::IsAssignableFrom () and the interpreter.
13551
13552         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13553         Object, even interfaces.
13554         
13555         * object.c (mono_object_isinst): Implement in terms of 
13556         is_assignable_from.
13557
13558         * icall.c (ves_icall_type_is_assignable_from): New icall.
13559
13560 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
13561
13562         * domain.c (foreach_domain): fix compiler warning.
13563
13564 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
13565
13566         * image.c (load_metadata_ptrs): use g_strndup because strndup is
13567         not available on all plattforms
13568
13569 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
13570
13571         * image.h image.c: Store the metadata version string in MonoImage.
13572         * icall.c: New icall to retrieve the image version.
13573         * reflection.c (create_dynamic_image): Fill in the image version field
13574         * reflection.c (build_compressed_metadata): Use the image version
13575         from the image structure.
13576
13577 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13578
13579         * appdomain.c: modified comment.
13580         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13581         That will be its last iteration when mono_gc_cleanup is called from
13582         mono_runtime_cleanup and before the domain is unloaded.
13583
13584         Fixes bug #45962.
13585
13586 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
13587
13588         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13589         attributes.
13590
13591 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13592
13593         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13594         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13595         Bernie Solomon <bernard@ugsolutions.com>.
13596
13597 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13598
13599         * object.c, object.h: provide mono_object_new_fast() for faster
13600         allocation in some special cases.
13601
13602 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13603
13604         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13605         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13606
13607 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13608
13609         * threadpool.c: fix leaks.
13610
13611 2003-07-01  Dick Porter  <dick@ximian.com>
13612
13613         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13614         using MonoGHashTables.  Fixes threadpool bug posted to list.
13615
13616 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13617
13618         * image.h, image.c: added support to load an assembly from a byte array.
13619         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
13620         assembly bundle support.
13621
13622 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
13623
13624         * threadpool.c (mono_thread_pool_add): keep a reference to the
13625         AsyncResult to prevent GC
13626
13627 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13628
13629         * class.c: leak fix.
13630
13631 2003-06-25  Dick Porter  <dick@ximian.com>
13632
13633         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13634         for the async object, the WaitHandle object will close the handle.
13635         Fixes bug 45321.
13636
13637 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13638
13639         * class.c: in mono_array_class_get (), lookup from the hash with the
13640         same type we insert: this works around a bug in
13641         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13642         lluis. The real fix will have to wait for after the release.
13643
13644 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13645
13646         * icall.c: fix memory leak when getting type members.
13647
13648 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13649
13650         * reflection.c: added more pubtoken special cases.
13651
13652 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13653
13654         * class.c: handle field offset correctly when class size
13655         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13656
13657 2003-06-20  Martin Baulig  <martin@ximian.com>
13658
13659         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13660         *image' field.
13661
13662 2003-06-20  Martin Baulig  <martin@ximian.com>
13663
13664         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13665
13666 2003-06-20  Martin Baulig  <martin@ximian.com>
13667
13668         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
13669         just distinguish between variables in registers and variables at
13670         an offset relative to a register.
13671
13672 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13673
13674         * icall.c: #ifdef out latest changes until mcs is fixed.
13675
13676 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13677
13678         * icall.c: return members in metadata order.
13679
13680 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13681
13682         * icall.c: avoid infinite loop in GetTimeZoneData.
13683
13684 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13685
13686         * icall.c: added Marshal.Prelink/All icalls.
13687
13688 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13689
13690         * object.c, object.h: fix warnings and do some overflow checking
13691         when creating arrays.
13692
13693 2003-06-17  Dick Porter  <dick@ximian.com>
13694
13695         * file-io.h:
13696         * file-io.c: File attributes need to be tweaked slightly when
13697         passed from the managed to the w32 world.
13698
13699 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13700         * profiler.h profiler-private.h profiler.c: Rework last patch
13701         based on suggestion by Paolo.
13702         
13703 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13704
13705         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
13706         instruction level coverage data collection.
13707         * profiler.h profiler.c (: Added new callback function which can be
13708         used by the profiler to limit which functions should have coverage
13709         instrumentation.
13710         * profiler.c (mono_profiler_load): Call g_module_build_path to
13711         generate the file name of the profiler library.
13712
13713 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13714
13715         * profiler.c, profiler.h, profiler-private.h: added basic block 
13716         coverage profiling API.
13717
13718 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
13719
13720         * reflection.c (mono_reflection_create_runtime_class): Add support
13721         for events in dynamically generated code.
13722
13723         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13724         not allocated.
13725
13726 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13727
13728         * icall.c: when getting timezone info, return reasonable values if we
13729         can't get the actual data.
13730
13731 2003-06-14  Dick Porter  <dick@ximian.com>
13732
13733         * threads.c (start_wrapper): Remove the reference to the thread
13734         object in the TLS data, so the thread object can be finalized.
13735         This won't be reached if the thread threw an uncaught exception,
13736         so those thread handles will stay referenced :-( (This is due to
13737         missing support for scanning thread-specific data in the Boehm GC
13738         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13739
13740 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13741
13742         * reflection.c: ensure streams and tables are first allocated with
13743         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13744
13745 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13746
13747         * icall.c: fixed GetElementType for byrefs (bug# 44792).
13748
13749 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
13750
13751         * reflection.c (mono_reflection_create_runtime_class): Add support for
13752         properties to dynamically created classes.
13753         * reflection.c: Fix a few places where non-MonoObjects were inserted
13754         into the tokens hashtable.
13755
13756 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13757
13758         * object.c: some support to handle out of memory exceptions.
13759
13760 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
13761
13762         * marshal.c (mono_marshal_get_native_wrapper): support reference
13763         return types
13764
13765 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13766
13767         * object.h, object.c: more portability stuff from Bernie Solomon.
13768         Unexport mono_object_allocate(). Added mono_object_unbox ().
13769         Set exitcode when an unhandled exception is thrown.
13770
13771 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
13772
13773         * marshal.c (mono_marshal_get_native_wrapper): use custom
13774         marshaler for return types.
13775
13776 2003-06-10  Dick Porter  <dick@ximian.com>
13777
13778         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13779         ip_mreq is available
13780
13781 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13782
13783         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13784         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13785         by Bernie Solomon <bernard@ugsolutions.com>.
13786
13787 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
13788
13789         * gc.c (mono_gc_init): Avoid error message on shutdown when
13790         GC_DONT_GC=1 is used.
13791
13792         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
13793         New icall to return the GUID of a module.
13794
13795 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13796
13797         * class.c: ensure instance size always includes the parent's size
13798         even whem class size is set explicitly (fixes bug#44294).
13799
13800 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13801
13802         * profiler.h, profiler.c: made the simple profiler thread-safe,
13803         get more accurate timing info. Allow the loading of an
13804         externally-developed profiler module.
13805
13806 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
13807
13808         * marshal.c (mono_marshal_get_native_wrapper): improved
13809         class/byref arguments.
13810         (mono_marshal_get_native_wrapper): better string marshaling support.
13811
13812 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13813
13814         * class.c: ensure .pack and .size are handled correctly and
13815         simplified layout of static fields.
13816
13817 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13818
13819         * appdomain.c
13820         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13821
13822         * loader.c (mono_lookup_pinvoke_call): look for modules in the
13823         current directory (fix bug 44008)
13824
13825 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
13826
13827         * marshal.c (mono_marshal_get_native_wrapper): started support for
13828         custom marshalers.
13829         (mono_delegate_to_ftnptr): consider marshalling specifications
13830
13831 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13832
13833         * reflection.c, reflection.h: emit custom marshal info.
13834
13835 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13836
13837         * object.c: free the GError.
13838         * icall.c: added CloseEvent_internal.
13839         * threads.[ch]:
13840         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13841         call.
13842
13843 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
13844
13845         * loader.c (mono_method_get_signature): Add support for dynamic
13846         assemblies.
13847
13848 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13849
13850         * reflection.c: fixed bug #43905.
13851
13852 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13853
13854         * class.c, domain.c, icall.c, metadata.h, object.h: support for
13855         handling TypedReference and ArgIterator.
13856         * loader.c, loader.h: added function to get signature at call site.
13857
13858 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13859
13860         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
13861         data readonly. Buglets and warning fixes. Some MethodSpec support.
13862
13863 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13864
13865         * class.h, class.c, object.c: remove relative numbering support.
13866
13867 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
13868
13869         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13870         free the string, until we get a chance to fix Gtk#
13871
13872 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13873
13874         * marshal.c: revert last patch.
13875
13876 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13877
13878         * icall.c: updates for new mono_class_vtable() not calling
13879         the type constructor anymore.
13880
13881 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13882
13883         * object.h, object.c: separate vtable creation from type
13884         initialization. Make running the .cctor thread safe.
13885
13886 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13887
13888         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13889
13890 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13891
13892         * loader.c (mono_get_method): consider calling convention
13893
13894 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
13895
13896         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13897         to return the invisible global type for a module.
13898
13899         * reflection.c (mono_image_build_metadata): Emit global fields too.
13900
13901 2003-05-20  Peter Williams  <peterw@ximian.com>
13902
13903         * loader.c (mono_lookup_internal_call): Add a few newlines.
13904
13905 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
13906
13907         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13908         literal strings.
13909
13910         * appdomain.c (set_domain_search_path): Recalculate search path when
13911         AppDomainSetup.PrivateBinPath changes.
13912
13913         * object.c (mono_class_compute_gc_descriptor): It turns out some
13914         parts of the class libs (like System.Thread) holds pointers to
13915         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13916         to treat native int a pointer type here.
13917         
13918 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13919
13920         * appdomain.h, domain.c: add hashtable for jump target resolution.
13921
13922 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
13923
13924         * reflection.h reflection.c icall.c: Added new icalls 
13925         GetManifestResourceInfoInternal, GetModulesInternal and support
13926         infrastructure.
13927
13928 2003-05-16  Dick Porter  <dick@ximian.com>
13929
13930         * icall.c:
13931         * file-io.h:
13932         * file-io.c: Implement System.IO.MonoIO::GetTempPath
13933
13934 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
13935
13936         * object.c: mono_store_remote_field: little fix to previous patch.
13937
13938 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13939
13940         * class.c: add constructors to array classes.
13941         * icall.c: special case array construction for InternalInvoke (),
13942
13943 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
13944
13945         * class.h class.c reflection.c object.c: Added support for field
13946         defaults in dynamically generated classes.
13947
13948 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13949
13950         * reflection.c: properly encode charset for ddlimport.
13951
13952 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13953
13954         * threads.c: allow compiling without GC.
13955
13956 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13957
13958         * appdomain.h, object.c, object.h, threads.c, threads.h: added
13959         handling of thread static data.
13960
13961 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13962
13963         * reflection.h, reflection.c: added mono_custom_attrs_free ().
13964
13965 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13966
13967         * class.c (mono_array_class_get): always set the serializable flags
13968         (mono_array_class_get): always set the SEALED attribute for array types
13969
13970 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
13971
13972         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13973         attributes (fix for bug 42021).
13974
13975 2003-05-12  Dick Porter  <dick@ximian.com>
13976
13977         * gc.c: Don't run finalizers when the finalizer thread is
13978         finishing up, because the default domain has already been
13979         destroyed.
13980
13981 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
13982
13983         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
13984         value is null, we should throw an exception.   This is slightly
13985         different than the other conventions used for the constructor.
13986
13987 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13988
13989         * socket-io.c: fixed windows build.
13990
13991 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13992
13993         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
13994
13995 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
13996
13997         * object.c (mono_string_new_wrapper): Compatibility fix for MS
13998         compilers.
13999
14000 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
14001
14002         * class.c (mono_class_layout_fields): Add experimental GC aware
14003         auto layout facility. Requires class library changes to work correctly.
14004
14005         (mono_class_setup_vtable): Avoid overriding explicit interface
14006         method implementations. Fixes iface3.exe test.
14007
14008         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14009         object reference.
14010         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14011         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14012
14013         * metadata.h: Add new type classification macro which determines
14014         whenever the type holds an object reference.
14015
14016 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14017
14018         * marshal.c (mono_marshal_get_native_wrapper): cleanups
14019
14020 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
14021
14022         * gc.c (finalizer_thread): Work around a GC bug.
14023
14024 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
14025
14026         * marshal.c (emit_struct_conv): allow unions
14027
14028         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14029
14030 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
14031
14032         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14033
14034 2003-05-06  Martin Baulig  <martin@ximian.com>
14035
14036         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14037
14038 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14039
14040         * socket-io.c:
14041         (Select_internal): allow NULLs, don't create arrays if not needed.
14042         Coupled with Socket.cs changes.
14043
14044         * threadpool.c:
14045         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14046         register a finalizer for it that will close the semaphore handle. This
14047         fixes the leak and make Lupus' test run with > 4080 loops.
14048
14049 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14050
14051         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14052         Jerome Laban (bug #42287)
14053
14054 2003-05-02  Martin Baulig  <martin@ximian.com>
14055
14056         * debug-mono-symfile.h
14057         (MonoSymbolFile): Moved declaration into mono-debug.h.
14058         (MonoDebugMethodJitInfo): Likewise.
14059         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14060         argument.
14061         (_mono_debug_address_from_il_offset): Take a
14062         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14063
14064         * mono-debug.h
14065         (MonoDebugDomainData): New struct.
14066         (mono_debug_get_domain_data): New function.
14067         (mono_debug_add_method): Take an additional `MonoDomain *'
14068         argument.
14069         (mono_debug_source_location_from_address): Likewise.
14070         (mono_debug_il_offset_from_address): Likewise.
14071         (mono_debug_address_from_il_offset): Likewise.
14072
14073 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14074
14075         * reflection.c: one more check for null type in custom attrs.
14076
14077 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14078
14079         * reflection.c: avoid warning (comparison is always false due to limited
14080         range of data type).
14081
14082 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14083
14084         * icall.c: throw an exception in Type.GetField if the argument 'name'
14085         is NULL.
14086
14087 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14088
14089         * reflection.c: fixed handling of enums in named arguments to custom
14090         attributes (bug #42123).
14091
14092 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14093
14094         * reflection.c: use the right array element type and handle
14095         a null for a Type argument, too.
14096
14097 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14098
14099         * reflection.c: handle arrays as arguments to custom attributes.
14100
14101 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14102
14103         * reflection.c: handle a string value in a custom attr
14104         ctor that takes an object.
14105
14106 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14107
14108         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14109         (fix bug #42063)
14110
14111 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14112
14113         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14114
14115 2003-04-27  Martin Baulig  <martin@ximian.com>
14116
14117         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14118         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14119         MONO_DEBUGGER_EVENT_BREAKPOINT.
14120         (mono_breakpoint_trampoline_code): Removed.
14121         (mono_debugger_event_handler): The last argument is now a
14122         `guint32'.
14123         (mono_debugger_insert_breakpoint_full): Removed the
14124         `use_trampoline' argument.
14125         (mono_debugger_method_has_breakpoint): Likewise.
14126         (mono_debugger_trampoline_breakpoint_callback): Renamed to
14127         mono_debugger_breakpoint_callback(); take the method and
14128         breakpoint number as arguments.
14129
14130 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14131
14132         * metadata.c: fix off by one when loading parameters attributes.
14133
14134 2003-04-24  Martin Baulig  <martin@ximian.com>
14135
14136         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14137
14138 2003-04-24  Martin Baulig  <martin@ximian.com>
14139
14140         * mono-debug-debugger.c: Moved all code which interacts with the
14141         Mono Debugger here.
14142
14143         * debug-mono-symfile.c: This code now just deals with the symbol
14144         file itself, the debugger code is now in mono-debug-debugger.c.
14145
14146 2003-04-23  Martin Baulig  <martin@ximian.com>
14147
14148         * mono-debug.c (mono_debug_source_location_from_il_offset):
14149         New method; like mono_debug_source_location_from_address(), but
14150         takes an IL offset instead of a machine address.
14151
14152 2003-04-23  Martin Baulig  <martin@ximian.com>
14153
14154         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14155         `line' field; this is now computed by the debugger.
14156
14157 2003-04-23  Martin Baulig  <martin@ximian.com>
14158
14159         * mono-debug.[ch]: New files.  This is the new debugging interface.
14160
14161         * mono-debug-debugger.[ch]: New files.  Moved all code which
14162         interacts with the Mono Debugger here.
14163
14164 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14165
14166         * domain.c (mono_init): initialize mono_defaults.monitor_class
14167
14168 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
14169
14170         * reflection.c (method_encode_code): Add a spicy exception to help
14171         future compiler authors.
14172
14173 2003-04-21  Martin Baulig  <martin@ximian.com>
14174
14175         * icall.c
14176         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14177         Make this work with relative pathnames; g_filename_to_uri() needs
14178         an absolute filename.
14179
14180 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
14181
14182         * icall.c: Track name changes in Object and ValueType.
14183
14184 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
14185
14186         * metadata.c (mono_type_stack_size): size should be a multiple of
14187         sizeof (gpointer)
14188
14189 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14190
14191         * gc.c:
14192         (internal_domain_finalize): moved into mono_domain_finalize. No need
14193         to create another thread because the finalizers will be run in the
14194         finalizer thread.
14195         
14196         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14197         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14198         to be run (MS does this too).
14199
14200 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14201
14202         * object.c (mono_class_compute_gc_descriptor): Update comment.
14203
14204         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14205
14206         * image.h: Add synchronized wrapper cache.
14207
14208         * image.c (do_mono_image_open): Initialize cache.
14209
14210         * reflection.c (create_dynamic_mono_image): Initialize cache.
14211
14212 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14213
14214         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14215         ves_icall_System_Buffer_ByteLengthInternal.
14216
14217 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14218
14219         * reflection.c: setup klass->nested_in earlier. Allow
14220         a dash in the assembly name.
14221
14222 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
14223
14224         * metadata.c (mono_type_to_unmanaged): dont access
14225         type->data.klass for MONO_TYPE_OBJECT
14226         (mono_type_to_unmanaged): consider System.Delegate class
14227
14228 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14229
14230         * class.c: just setup supertypes in the proper place instead of
14231         initializing the full element class for arrays.
14232
14233 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14234
14235         * class.c: ensure the element class of arrays is initialized.
14236         Setup the supertype info for array classes, too.
14237
14238 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
14239
14240         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14241
14242 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14243
14244         * Makefile.am: re-added -m option when running cygpath. This way,
14245         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14246         separator.
14247         * mono-config.c: same codepath for locating mono config file for WIN32
14248         and the rest.
14249         * assembly.c: if mono_assembly_setrootdir is called, don't override
14250         the value set.
14251
14252 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14253
14254         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14255         MONO_ASSEMBLIES variable.
14256
14257 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14258
14259         * icall.c: added Assembly::GetNamespaces() icall.
14260
14261 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14262
14263         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14264
14265 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
14266
14267         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14268         * object.c: fixed bug in the construction of vtable for proxies
14269
14270 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14271
14272         * object.c (mono_array_new): Mark mono_array_new as an icall.
14273
14274 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14275
14276         * class.c: fixed test for public method when overriding interfaces.
14277         Closes bug #40970.
14278
14279 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14280
14281         * appdomain.h, domain.c: added mono_domain_foreach() to
14282         be able to access the currently loaded appdomains.
14283         * object.c: make string interning work across sppdomains.
14284         Mark some functions for use as icalls.
14285
14286 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14287
14288         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14289
14290         * reflection.h reflection.c: Allocate long living data using 
14291         GC_MALLOC_ATOMIC so the collector does not need to scan it.
14292
14293         * reflection.c: Double the allocation size in streams instead of
14294         increasing it, to prevent unneccesary copying on large assemblies.
14295         
14296         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14297         creation if the assembly does not have the Run flag set.
14298
14299 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14300
14301         * class.h: avoid the C++ keywords in header files (Jerome Laban
14302         spotted and fixed this).
14303
14304 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14305
14306         * object.c:
14307         (mono_unhandled_exception): fill in the arguments for the
14308         UnhandledException event. Only trigger that event for the default
14309         domain (as MS does).
14310
14311 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
14312
14313         * object.c: Improve typed allocation stuff based on suggestions from
14314         Paolo. Also turn it on if the GC library supports it.
14315
14316 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14317
14318         * object.c object.h class.h: Added experimental typed allocation
14319         facility using the interfaces in gc_gcj.h.
14320
14321         * os/gc_wrapper.h: Added new include files.
14322         
14323 2003-04-03  Martin Baulig  <martin@ximian.com>
14324
14325         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14326         which is not yet enabled by default.
14327
14328         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14329         functions.
14330         (mono_gc_lock, mono_gc_unlock): New static functions.
14331
14332         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14333         functions; stop/start the world for the garbage collector.  This
14334         is using the windows API; we need to complete the SuspendThread()/
14335         ResumeThread() implementation in the io-layer to make this work on Unix.
14336         (mono_gc_push_all_stacks): New public function; tells the garbage
14337         collector about the stack pointers from all managed threads.
14338
14339 2003-04-03  Martin Baulig  <martin@ximian.com>
14340
14341         * object.h (MonoThread): Added `gpointer stack_ptr'.
14342
14343         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14344
14345 2003-04-03  Martin Baulig  <martin@ximian.com>
14346
14347         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14348
14349 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14350
14351         * reflection.c (typebuilder_setup_fields): Initialize field.first and
14352         field.last.
14353
14354 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
14355
14356         * loader.c (mono_lookup_internal_call): Report the corlib that is
14357         out of sync.
14358
14359 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
14360
14361         * icall.c (ves_icall_type_GetTypeCode): fixed check for
14362         System.DBNull (it's class not valuetype).
14363
14364 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14365
14366         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
14367         if the array method was already assigned a token (fixes bug#40646).
14368
14369 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
14370
14371         * reflection.c (mono_reflection_get_type): Attempt type resolve even
14372         if no assembly is given.
14373
14374 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
14375
14376         * metadata.h: Added the new tables.
14377
14378         * row-indexes.h: Added definitions for new tables.
14379
14380         * metadata.c: Add schemas for new tables, and add support for
14381         computing the sizes of them.
14382
14383         * class.c: Update for handling the new type cases.
14384
14385 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
14386
14387         * metadata.h (MONO_TYPE_IS_VOID): new macro
14388
14389 2003-03-31  Martin Baulig  <martin@ximian.com>
14390
14391         * threads.h (MonoThreadCallbacks): Added `thread_created'.
14392
14393         * threads.c (mono_thread_new_init): Call `thread_created' in the
14394         mono_thread_callbacks.
14395
14396 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
14397
14398         * loader.h: added marshalbyrefobject_class to mono_defaults
14399         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
14400         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14401           generation of output parameters.
14402           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14403         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14404           contextbound and the target object belongs to the context of the caller.
14405         * object.h: added context and unwrapped_server variables in MonoRealProxy.
14406         * object.c: Implemented support for interfaces and abstract classes
14407           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14408           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14409
14410 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
14411
14412         * class.h class.c (mono_class_is_subclass_of): New function.
14413         
14414         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14415         routines for most common case (calls from ArrayList::ToArray).
14416
14417         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
14418         routine so programs which call Environment::Exit() can be profiled.
14419
14420         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
14421         Added MONO_ARCH_SAVE_REGS.
14422
14423         * icall.c (ves_icall_type_is_subtype_of): Use new function.
14424
14425 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
14426
14427         * blob.h: Add a couple of new MonoType types definitions.
14428
14429         * tabledefs.h: Add a couple of new call convs.
14430
14431 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
14432
14433         * reflection.h (MonoReflectionDynamicAssembly): track changes in
14434         the layout of the class.
14435
14436         * reflection.c (alloc_table): double the size on overflow to avoid
14437         unnecessary copying.
14438
14439         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14440         avoid filling out metadata tables and blobs. Also set mb->ilgen to
14441         null so it can be garbage collected.
14442         
14443 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
14444
14445         * reflection.c (mono_reflection_get_type): Return the resolved type
14446         only if it is in the assembly we searched.
14447
14448         * reflection.c (ensure_runtime_vtable): Initialize method slots.
14449
14450         * class.c (mono_class_setup_vtable): Set the slot of the overriding
14451         method.
14452
14453 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14454
14455         * appdomain.c:
14456         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14457         the right one is 'file:///blah', but MS allows it.
14458         * assembly.c:
14459         (mono_assembly_open): allow 'file://blah'
14460
14461         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14462
14463 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
14464
14465         * socket-io.c: fixes bug #40310.
14466
14467 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
14468
14469         * reflection.c (mono_reflection_parse_type): handle deeply nested
14470         types correctly.
14471
14472         * reflection.c (mono_image_create_token): Use unique token values
14473         since they will be put into a hash table.
14474
14475         * class.c (mono_class_setup_vtable): If a method occurs in more than
14476         one place in the vtable, and it gets overriden, then change the
14477         other occurances too.
14478
14479         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14480         object as return type.
14481
14482 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14483
14484         * icall.c: Deleted "ToString" implementation for double and float
14485         because they are full implemented in managed code.
14486
14487 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14488
14489         * reflection.c, reflection.h: implemented and exported functions
14490         to retrieve info about custom attributes.
14491
14492 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14493
14494         * appdomain.c: moved Uri handling to assembly.c
14495         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14496         work when using a file Uri in *nix and windows.
14497
14498         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14499         GetReferencedAssemblies.
14500
14501 2003-03-18  Dick Porter  <dick@ximian.com>
14502
14503         * icall.c: Rename a couple of internal calls
14504
14505         * threads.c: Set the thread state to Stopped when a thread exits.
14506         Fixes bug 39377.
14507
14508 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
14509
14510         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14511         New icall.
14512
14513         * object.c (mono_class_vtable): fix warning.
14514
14515 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
14516
14517         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14518
14519         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14520         memory.
14521         (method_encode_clauses): Create exception info structures in the right
14522         order.
14523         (mono_reflection_setup_internal_class): Initialize supertypes field.
14524
14525         * class.c object.c: Handle interfaces which implement other interfaces 
14526         correctly.
14527
14528         * class.h class.c: Move the supertypes array initialization code into 
14529         a separate function so it can be used for dynamic types too. Also call
14530         it earlier, in mono_class_init(), since it can be used before the
14531         type is initialized.
14532
14533 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14534
14535         * Makefile.am:
14536         * assembly.c:
14537         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14538
14539         * appdomain.c:
14540         * appdomain.h:
14541         * marshal.c:
14542         * object.c: remove warnings.
14543
14544 2003-03-13  Martin Baulig  <martin@ximian.com>
14545
14546         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14547         (MonoDebugLexicalBlockEntry): New types.
14548
14549         * debug-mono-symfile.c
14550         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14551
14552 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14553
14554         * process.c: ret can be any non-zero value accroding to MS doc.
14555
14556 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
14557
14558         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
14559         fixing a warning for a miss-used prototype, would have cause
14560         random memory corruption.
14561
14562 2003-03-07  Martin Baulig  <martin@ximian.com>
14563
14564         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14565         getting really annoying ....
14566
14567 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
14568
14569         * reflection.c (fixup_method): added support for array methods.
14570
14571 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14572
14573         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
14574         (pointed out by Michael Adams).
14575
14576 2003-03-04  Dick Porter  <dick@ximian.com>
14577
14578         * icall.c: Temporarily reverted the Double and Single ToString()
14579         change, because it broke nunit.
14580
14581 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14582
14583         * object.h, threads.h: make include files compatible with C++
14584         (patch by Jerome Laban <jlaban@wanadoo.fr>).
14585
14586 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14587
14588         * icall.c: Erased ToString helper functions for Double and Single.
14589         Now, that implementations ar all in managed code (Double and Single
14590         Formatters).
14591
14592 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
14593
14594         * appdomain.c: Added method for initializing the default context of
14595         a domain. Added internal call for getting the default context.
14596         * appdomain.h: Added context variable in MonoDomain struct.
14597         * domain.c: mono_domain_set also sets the default context of the domain
14598         * icall.c: Mapped internal method InternalGetDefaultContext.
14599         * object.c: mono_object_get_virtual_method returns always a remoting
14600         wrapper if the object is a transparent proxy.
14601         mono_runtime_invoke_array: when creating an object by calling the
14602         constructor, if the created object is a proxy, then the constructor should
14603         be called using the a remoting wrapper.
14604
14605 2003-03-03  Dick Porter  <dick@ximian.com>
14606
14607         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14608         variable so it compiles on solaris.  Problem spotted by
14609         Christopher Taylor <ct@cs.clemson.edu>
14610
14611 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14612
14613         * appdomain.c:
14614         (get_info_from_assembly_name): don't leak value.
14615
14616         * icall.c:
14617         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14618         result.
14619
14620 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14621
14622         * assembly.c: export mono_image_load_references ().
14623         * class.c: handle function pointers. mono_class_from_name() now
14624         supports nested type names directly.
14625
14626 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
14627
14628         * reflection.h reflection.c: Encode already created dynamic methods 
14629         and fields correctly as a DEF instead of a REF.
14630
14631         * reflection.c: Get rid of the force_ref argument to 
14632         mono_image_typedef_or_ref since it was wrong in the first place.
14633
14634         * string-icalls.c: add error checking to string constructors according
14635         to the MSDN docs.
14636
14637         * reflection.c: Emit types in the order their TypeBuilders were 
14638         created. Previously, a new table index was assigned to each type before
14639         the tables were emitted. This was wrong because the signature blob
14640         might already refer to a type by its original table index.
14641
14642 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
14643
14644         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14645         change.
14646         
14647 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14648
14649         * Makefile.am: make assemblies dir have \ instead of / on windows.
14650
14651 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
14652
14653         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14654         iterate over the NESTEDCLASS table using a linear search since the
14655         table is not guaranteed to be sorted by the secondary key.
14656
14657         * class.c (mono_class_create_from_typedef): fixed up call to
14658         mono_metadata_nesting_typedef.
14659         
14660 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
14661
14662         * marshal.c (mono_string_to_byvalstr): clear the memory as
14663         suggested by Jerome Laban <jlaban@wanadoo.fr>
14664
14665 2003-02-26  Dick Porter  <dick@ximian.com>
14666
14667         * process.c: Cope with padding in .rsrc blocks
14668
14669 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14670
14671         * metadata.h: reverted the filter_len change, it breaks reflection
14672         
14673 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14674
14675         * metadata.h: added a new field to store the filter_len
14676         
14677
14678 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14679
14680         * reflection.c: handle custom attributes for types and members
14681         created with Reflection.Emit (bug#38422).
14682
14683 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
14684
14685         * reflection.c: define RTSpecialName automatically for constructors for
14686         compatibility with MS.NET.
14687
14688         * reflection.c (mono_reflection_create_runtime_class): initialize
14689         nested_in field of dynamically created classes.
14690
14691 2003-02-22  Martin Baulig  <martin@ximian.com>
14692
14693         * debug-mono-symfile.h: Incremented version number.
14694
14695 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14696
14697         * object.h icall.c process.c: fix warnings.
14698
14699 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14700
14701         * appdomain.h appdomain.c:
14702         (mono_domain_try_type_resolve): split the 
14703         name_or_tb argument into a name and a tb argument.
14704         (mono_domain_has_type_resolve): new function to check whenever the
14705         application has registered a TypeResolve event handler.
14706         
14707         * icall.c reflection.h reflection.c: move the type resolve logic into
14708         mono_reflection_get_type () so it will be invoked when 
14709         Assembly::GetType () is called.
14710
14711         * reflection.c:
14712         (mono_reflection_get_type): renamed to get_type_internal.
14713         (mono_reflection_get_type): fixed type name generation so it works 
14714         for nested types too.
14715         (mono_reflection_get_type): call has_type_resolve () to avoid the 
14716         costly type name generation if there is no resolve event handler.
14717
14718 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14719
14720         * class.c, image.c: load exported types from file references.
14721
14722 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
14723
14724         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14725           used to cache the managed methods used to create proxies and make 
14726           remote invocation of methods.
14727         * class.h: Added in MonoVTable a flag to indicate that a class needs 
14728           to be remotely created.
14729         * object.c: Modified the method mono_class_vtable(). It now initializes 
14730           the remote flag of the vtable. Modified mono_object_new_specific(), 
14731           so now it checks the remote flag.
14732         * icall.c: Added a couple of internal methods, one for enabling instance 
14733           creation interception for a type, and one for creating objects bypassing
14734           the remote check.
14735
14736 2003-02-18  Martin Baulig  <martin@ximian.com>
14737
14738         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14739         New interncall to get a method's metadata token.
14740
14741         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14742         New interncall for the debugger.
14743
14744 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
14745
14746         * class.c (mono_class_setup_vtable): allocate supertype array
14747
14748 2003-02-18  Martin Baulig  <martin@ximian.com>
14749
14750         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14751
14752 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14753
14754         * reflection.c:
14755         (assembly_name_to_aname): jump over unknown properties (i've found
14756         something like: 'type, assembly, version=xxx, custom=null, public...',
14757         so now will ignore custom=null and still get the rest of the values).
14758
14759 2003-02-17  Dick Porter  <dick@ximian.com>
14760
14761         * threads.c: Have Thread.Start() wait for a semaphore to signal
14762         that the thread has set up all its local data.  This fixes bug
14763         34323, where Abort() raced the new thread's TLS data.
14764
14765         Also removes the handle_store() call from start_wrapper, because
14766         threads are now always created suspended and there is no longer a
14767         race between the parent and child threads to store the info.
14768
14769 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14770
14771         * image.c: explain the #- heap issue in a message, hopefully
14772         avoiding FAQs on mono-list.
14773
14774 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14775
14776         * icall.c:
14777         (GetEntryAssembly): if the domain has not invoked
14778         AppDomain.ExecuteAssembly yet, return the assembly of the default
14779         AppDomain.
14780
14781 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
14782
14783         * class.c (mono_ldtoken): make it work in dynamic assemblies.
14784
14785 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14786
14787         * metadata.c, reflection.c: simple speedup to type hash
14788         and equals code.
14789
14790 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14791
14792         * image.c, image.h, class.c, assembly.c: move module loading
14793         to MonoImage. When loading metadata, consider alignemnet from
14794         the start of metadata, not from the metadata address in memory.
14795
14796 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
14797
14798         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
14799         AssemblyBuilder objects. Factored out custom attribute creation into
14800         a separate function.
14801         (create_custom_attr): new function to create custom attributes.
14802
14803 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
14804
14805         * Makefile.am: Got tired of typing the full pathname to pedump.
14806         Until there is another option, am installing this.
14807
14808 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
14809
14810         * class.c (class_compute_field_layout): always set field->parent 
14811         (mono_ldtoken): use mono_defaults.fieldhandle_class;
14812
14813 2003-02-11  Dick Porter  <dick@ximian.com>
14814
14815         * threads-types.h:
14816         * monitor.c: Rewrote Monitor, making lock much faster and
14817         Pulse/Wait work as specified.  Also uses much fewer handles, and only
14818         creates them as needed.
14819
14820         * exception.c: Added SynchronizationLockException
14821
14822         * threads.c: Deleted old Monitor implementation.  The new one is
14823         in a new file.
14824
14825 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14826
14827         * class.c: handled TypedReference type code. Set the correct size for
14828         class data. Setup interface_offsets for interface classes, too.
14829
14830 2003-02-09  Martin Baulig  <martin@ximian.com>
14831
14832         * debug-mono-symfile.h: Reflect latest symbol writer changes.
14833
14834 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14835
14836         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14837         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14838         * object.c: fixed mono_object_get_virtual_method () for interfaces.
14839         * verify.c: check for code that runs after the end of the method.
14840
14841 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14842
14843         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14844         "System.Math::Round2".
14845         * sysmath.h: Added Floor, Round and Round2 definitions.
14846         * sysmath.c: Modified certain functions that were not 100% compliant
14847         with MS.NET (math precision) and added the implementation of Floor,
14848         Round and Round2.
14849
14850 2003-02-07  Martin Baulig  <martin@ximian.com>
14851
14852         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14853
14854 2003-02-07  Martin Baulig  <martin@ximian.com>
14855
14856         * debug-mono-symfile.c: Reflected latest symwriter changes.
14857         (mono_debug_create_mono_symbol_file): Removed.
14858         (mono_debug_open_mono_symbol_file): Take an argument which
14859         specifies whether to create a dynamic symbol file.
14860
14861 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
14862
14863         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14864
14865 2003-02-05  Martin Baulig  <martin@ximian.com>
14866
14867         * reflection.c (mono_image_build_metadata): Make this public,
14868         protect it against being called multiple times, don't create
14869         resources and don't build the compressed metadata here.
14870         (mono_image_create_pefile): Do this here.
14871
14872         * icall.c
14873         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14874
14875 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14876
14877         * socket-io.c: fixed bug #36322.
14878
14879 2003-02-06  Piers Haken <piersh@friskit.com>
14880
14881         * appdomain.[ch]:
14882         * class.h:
14883         * debug-mono-symfile.c:
14884         * icall.c:
14885         * loader.c:
14886         * mono-config.c:
14887         * monosn.c:
14888         * reflection.c:
14889         * socket-io.c: warning cleanups
14890
14891 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
14892
14893         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14894         function. works like remoting invoke, but does a check for the Proxy first.
14895
14896 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
14897
14898         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14899
14900 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
14901
14902         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14903         array of pointers.
14904         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14905         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14906
14907         * object.c (mono_store_remote_field_new): used by the new jit
14908         instead of mono_store_remote_field
14909         (mono_load_remote_field_new): used by the new jit
14910         instead of mono_load_remote_field
14911
14912 2003-02-05  Patrik Torstensson
14913
14914         * appdomain.c: changed unload to take the domain id instead
14915         of domain
14916         
14917         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14918
14919
14920 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14921
14922         * appdomain.c: don't look for assemblies in ApplicationBase if
14923         PrivateBinPathProbe is set.
14924
14925 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14926
14927         * object.c: make the first argument in main_args contain the absolute
14928         path to the assembly. Fixes bug #37511.
14929
14930 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14931
14932         * icall.c: get correct UTC offset for countries not using daylight
14933         time saving. Fixes bug #30030.
14934
14935 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14936
14937         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14938         and 1 are the family).
14939
14940 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
14941
14942         * icall.c (ves_icall_InternalExecute): removed wrong assertion
14943
14944         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14945
14946 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
14947
14948         * reflection.c: added support for SignatureHelper tokens, which is
14949         needed by the Calli opcode.
14950
14951         * reflection.h: track changes to SignatureHelper class.
14952
14953         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14954
14955 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14956
14957         * appdomain.c: fixed loading assemblies from PrivateBinPath.
14958
14959 2003-02-03  Patrik Torstensson
14960         * appdomain.[c|h], domain.c : 
14961          - Added support for getting a domain via domain id
14962          - Support for setting and getting domain from System.AppDomain 
14963            (used in cross appdomain channel)
14964          - Added support for get/set for a MonoAppContext on a thread 
14965            (Context class in System.Runtime.Remoting.Contexts),
14966          - Removed hack in Get/SetData and ExecuteAssembly.
14967         
14968         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14969         the managed world to get control when a proxy is created.
14970
14971         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14972         
14973 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
14974
14975         * icall.c
14976         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14977         Populate the codebase field as well.
14978
14979 2003-02-02  Martin Baulig  <martin@ximian.com>
14980
14981         * debug-mono-symfile.c
14982         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
14983         (mono_debug_symfile_add_method): Allow interncalls.
14984
14985 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14986
14987         * icall.c: throw parse exception if strtod fails or the string is empty.
14988
14989 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
14990
14991         * marshal.c: handle object type separately from defined
14992         class types.
14993
14994 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
14995
14996         * marshal.c: handle NATIVE_LPSTR for strings when it's
14997         explicitly specified.
14998
14999 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15000
15001         * reflection.c, reflection.h, icall.c: setup the reflection
15002         handle cache for ModuleBuilders and AssemblyBuilders.
15003
15004 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
15005
15006         * reflection.c (reflection_methodbuilder_to_mono_method): set
15007         pinvoke flag
15008
15009 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15010
15011         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15012
15013 2003-01-29  Dick Porter  <dick@ximian.com>
15014
15015         * threads.c: No need for the fake_thread kludge now that Thread
15016         doesn't run a class constructor
15017         
15018 2003-01-29  Dick Porter  <dick@ximian.com>
15019
15020         * threads.c: Use g_direct_hash instead of the rather bogus
15021         g_int_hash
15022
15023 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
15024
15025         * marshal.c (mono_marshal_get_native_wrapper): add check for null
15026         (fix pinvoke12.exe)
15027         (mono_marshal_get_struct_to_ptr): generate valid IL code
15028         (mono_marshal_get_ptr_to_struct): generate valid IL code
15029         (*): correctly set sig->pinvoke, we need to memdup the signature
15030         to do that
15031
15032 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15033
15034         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15035         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15036
15037 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15038
15039         * profiler.c: provide more callers information.
15040
15041 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
15042
15043         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15044
15045         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15046
15047         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15048
15049 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15050
15051         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15052         exception instead of going into an infinite loop on dates which it 
15053         can't yet handle.
15054
15055         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
15056         out-of-range exception if needed.
15057
15058         * class.c (mono_class_setup_vtable): allow a virtual method to provide
15059         an implementation for an interface method and to override an inherited
15060         method at the same time. 
15061         Imagine a scenario when a virtual method is used to override a
15062         virtual abstract method in a parent class, and this same method 
15063         provides an implementation for an method inherited from an interface. 
15064         In this case, the interface resolution code will set im->slot, which 
15065         means that the virtual method override pass will skip this method 
15066         which means a pointer to the abstract method inherited from the parent
15067         will remain in the vtable of this non-abstract class.
15068
15069         * class.c: (mono_class_setup_vtable): continue search for a real 
15070         method if only an abstract method is found.     
15071
15072 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15073
15074         * reflection.c: add size to encoding for ByValStr and ByValArray
15075         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15076
15077 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15078
15079         * class.c (mono_class_setup_vtable): pass the override info as an
15080         argument.
15081
15082         * class.c (mono_class_setup_vtable): set the slot of overriding methods
15083         correctly.
15084         
15085         * reflection.c (ensure_runtime_vtable); add support for method 
15086         overrides.
15087         
15088 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15089
15090         * reflection.c (resolution_scope_from_image): Hack to work to work with
15091         dynamic assemblies.
15092
15093         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
15094         added a 'force_ref' argument to force this function to allways return 
15095         a TypeRef. This is needed by mono_image_get_memberref_token ().
15096         
15097 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15098
15099         * reflection.c (mono_image_get_type_info): interfaces really don't have
15100         a parent.
15101
15102         * reflection.c (mono_image_basic_init): fill out missing fields of
15103         image structure.
15104
15105         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
15106         dynamic assemblies. This is required so dynamic assemblies show up in
15107         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15108         Type::GetType() etc. This is consistent with MS behaviour.
15109
15110         * image.c image.h reflection.c: add newly created classes to the name 
15111         cache so mono_class_get () will find them.      
15112
15113 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15114
15115         First part of changes to get IKVM.NET running under mono.
15116         
15117         * appdomain.h, appdomain.c: added new function 
15118         mono_domain_try_type_resolve() which will emit TypeResolve events. 
15119         This function will call AppDomain::DoTypeResolve to do the actual work.
15120
15121         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
15122         moved existing code dealing with dynamic tokens to a new function 
15123         called mono_reflection_lookup_dynamic_token (). This function will 
15124         raise TypeResolve events when appropriate. Since reflection.c is not 
15125         part of libmetadata, a new hook function called 
15126         mono_lookup_dynamic_token() is added to class.c which will call this.
15127
15128         * assembly.h assembly.c: make the invoke_load_hook function public,
15129         so it can be called for dynamic assemblies.
15130
15131         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15132
15133         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
15134         type isn't found.
15135
15136         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
15137         MonoGHashTable, since it contains pointers to objects which the GC 
15138         needs to track.
15139
15140         * assembly.c (search_loaded): remove unused variable.
15141         
15142 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15143
15144         * object.c: fixed issue exposed by gcc-generated IL programs
15145         that use RVA data for pointers.
15146
15147 2003-01-25  Martin Baulig  <martin@ximian.com>
15148
15149         * threads.c (start_wrapper): Moved the initialization of
15150         `start_func' above the mono_new_thread_init() call to which we
15151         pass it as argument.
15152
15153 2003-01-24  Martin Baulig  <martin@ximian.com>
15154
15155         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15156         the MonoThread pointer.
15157
15158 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
15159
15160         * icall.c: Rename `PowImpl' to Pow.
15161
15162 2003-01-23  Dick Porter  <dick@ximian.com>
15163
15164         * threads.c (start_wrapper): Create a Thread object if needed, so
15165         the Main() thread can do the class initialisation in a subthread
15166         that has been set up to allow managed code execution.
15167
15168         Pass the thread ID instead of the MonoThread pointer to the thread
15169         start and attach callbacks.  This change is required, because the
15170         jit thread start callback must be called _before_ the Thread
15171         object can be created.
15172         
15173         (mono_thread_init): Removed much object creation code that is no
15174         longer needed.  No managed code is called from here now.
15175
15176         * object.c (mono_runtime_exec_managed_code): Create a subthread
15177         for Main, and call back to the runtime to use it.
15178         Set the exit code when Main exits.
15179
15180         * gc.c: Make sure domain finalisation happens in a subthread.
15181         Re-enable threaded GC, fixing bug 31333 (again).
15182
15183         * environment.c: System.Environment internall calls (so far just
15184         ExitCode is here, the others are still in icall.c)
15185
15186         * appdomain.c (mono_runtime_cleanup): All threads running managed
15187         code should have finished before mono_runtime_cleanup() is
15188         reached, so no need to clean up threads.
15189
15190 2003-01-22  Martin Baulig  <martin@ximian.com>
15191
15192         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15193         `gpointer func' arguments.      
15194         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15195         but added `MonoThread *thread' argument.
15196         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15197
15198         * threads.c (mono_new_thread_init): Added `gpointer func' argument
15199         and pass it to the mono_thread_start_cb callback.
15200         (mono_install_thread_callbacks): New public function to install a
15201         set of callbacks which are set by the debugger.
15202         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15203
15204 2003-01-22  Martin Baulig  <martin@ximian.com>
15205
15206         * Makefile.am: Install debug-mono-symfile.h.
15207
15208 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
15209
15210         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15211
15212 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
15213
15214         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15215         * class.c (mono_ptr_class_get): correctly set access levels of pointers
15216         (mono_array_class_get): correctly set access levels of arrays
15217
15218 2003-01-20      Patrik Torstensson
15219         * image.h (MonoAssemblyName): changed major, minor, build, revision
15220         from signed to unsigned.
15221
15222 2003-01-20  sean kasun <skasun@azstarnet.com>
15223
15224         * reflection.c (load_cattr_value): Now this handles
15225         MONO_TYPE_SZARRAY.  Fixes bug #35629
15226
15227 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
15228
15229         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15230         integer value
15231
15232 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15233
15234         * decimal.c: fixed bug #26056.
15235
15236 2003-01-17  Martin Baulig  <martin@ximian.com>
15237
15238         * gc.c: Raise an ExecutionEngineException instead of using g_error().
15239
15240 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15241
15242         * exception.[ch]:
15243         (mono_get_exception_type_initialization): new function.
15244
15245         * object.c: throw a TypeInitializationException when an exception is
15246         thrown invoking the class constructor.
15247
15248 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15249
15250         * reflection.c: fixed attribute reading.
15251
15252 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15253
15254         * icall.c:
15255         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15256         provided, look for the type in the calling assembly and then in
15257         mscorlib; if the assembly name is provided, only try that one.
15258
15259 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15260
15261         * object.c: register the vtable before there is a chance it's
15262         queried again recursively.
15263
15264 2003-01-13  Duncan Mak  <duncan@ximian.com>
15265
15266         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15267         gc-internal.h. 
15268         
15269 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
15270
15271         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15272
15273 2003-01-11  Martin Baulig  <martin@ximian.com>
15274
15275         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15276         this to 20 for the release.
15277
15278 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
15279
15280         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15281
15282         * loader.c (mono_method_get_marshal_info): bug fix
15283
15284         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15285         structures with explicit layout
15286
15287 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15288
15289         * profiler.c: made the output more readable (and sorted). 
15290         Added caller information for the allocation profiler.
15291
15292 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
15293
15294         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15295
15296 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15297
15298         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15299         to get value types.
15300         
15301 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15302
15303         * object.c, profiler.h, profiler.c, profiler-private.h:
15304         Added object allocation profiler.
15305
15306 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15307
15308         * reflection.h, reflection.c: handle global methods.
15309         Compress blob entries.
15310
15311 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15312
15313         * marshal.c: fix compilation.
15314
15315 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
15316
15317         * loader.c (mono_method_get_marshal_info): impl.
15318
15319         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15320
15321 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15322
15323         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15324         for reference types.
15325
15326 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15327
15328         * loader.c: fixed off by one error in loaded parameter names.
15329
15330 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
15331
15332         * marshal.c (mono_marshal_get_icall_wrapper): like
15333         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15334         instead of a MonoMethod.
15335
15336 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15337
15338         * decimal.c: fixed bug #36537.
15339
15340 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15341
15342         * marshal.c: throw a missing method exception if a
15343         P/Invoke method is not found.
15344
15345 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15346
15347         * icall.c: allow a null this for constructors.
15348
15349 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15350
15351         * icall.c: raise the proper exceptions if the arguments to the
15352         internal Invoke are incorrect.
15353
15354 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
15355
15356         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15357
15358 2003-01-03  Martin Baulig  <martin@ximian.com>
15359
15360         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15361
15362 2002-12-31  Martin Baulig  <martin@ximian.com>
15363
15364         * debug-mono-symfile.c: Completely rewrote the type section.
15365         Instead of using individual malloc()ed fields, we use one big
15366         continuous memory area and offsets into this area.
15367         See the comments in the source code for details.
15368
15369 2002-12-30  Martin Baulig  <martin@ximian.com>
15370
15371         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15372
15373 2002-12-30  Martin Baulig  <martin@ximian.com>
15374
15375         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15376         line number table in this data blob instead of using an external
15377         pointer.
15378
15379 2002-12-28  Martin Baulig  <martin@ximian.com>
15380
15381         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15382
15383 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
15384
15385         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15386         as a boxed return type.
15387
15388 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
15389
15390         * appdomain.c
15391         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15392         g_build_filename to properly get separators on the filename created.
15393
15394         * object.h: Small change, introduce MonoMarshalByRefObject to
15395         track the layout of that structure in the C# universe as we make
15396         changes there.
15397
15398 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15399
15400         * object.c: removed assert to allow static fields on interfaces.
15401         * loader.c: a TypeSpec may be used for any type, not just arrays.
15402
15403 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15404
15405         * class.c, class.h: added mono_class_array_element_size ().
15406         Ignore static methods in interfaces.
15407
15408 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15409
15410         * threads.c: fixed the build under cygwin.
15411
15412 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15413
15414         * reflection.c: handle nullref constants. Allocate keys for
15415         reflection handles with the GC.
15416
15417 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15418
15419         * threads.c, threads.h: added mono_thread_get_abort_signal()
15420         to get a suitable signal for thread abort.
15421
15422 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15423
15424         * metadata.c: fix handling of ExportedType table.
15425
15426 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15427
15428         * icall.c: added WriteWindowsDebugString internal call.
15429
15430 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15431
15432         * reflection.h: added fields to match C# implementation.
15433
15434 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15435
15436         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15437
15438 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
15439
15440         * gc.h, gc-internal.h: Rename header for GC internal calls to
15441         gc-internal.h from gc.h as to not clash with Boehm GC having its
15442         header installed as <gc.h> in outside include paths.
15443         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15444         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15445
15446 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15447
15448         * icall.c: assign minor, build and revision in FillName.
15449
15450 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
15451
15452         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15453         Added support for running code generated by Reflection.Emit.
15454
15455 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15456
15457         * appdomain.c: check for NULL argument in LoadFrom.
15458
15459 2002-12-10  Dick Porter  <dick@ximian.com>
15460
15461         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15462
15463 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15464
15465         * appdomain.c: fix buglet when building exe file name.  Handle full
15466         assembly name (needed after latest changes to AssemblyName).
15467         * image.c:
15468         (mono_image_close): free some hashtables.
15469
15470 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
15471
15472         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
15473         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
15474         on some systems (redhat 7.3) 
15475
15476 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
15477
15478         * threads.c: delete the critical section of a sync block,
15479         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15480
15481 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15482
15483         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15484
15485 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15486
15487         * appdomain.[ch]: handle the assembly preload event to try loading the
15488         assemblies using the paths we have in the current domain.
15489
15490         * assembly.[ch]: created an assembly preload hook that is called to try
15491         loading the assembly by other means that the ones provided here.
15492
15493         * domain.c: initialize the domain search path.
15494
15495         From now on, assemblies (TODO: except corlib and System) are loaded
15496         according to these rules when using mono_assembly_load ():
15497
15498                 1. It tries to load the assembly from the ApplicationBase
15499                 of the current domain appending .dll and .exe (TODO: have to
15500                 try loading from name/name.dll and name/name.exe).
15501
15502                 2. It tries the search path specified in PrivateBinPath for the
15503                 current domain (if any).
15504
15505                 3. Previous behavior.
15506
15507 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15508
15509         * icall.c: implemented GetInterfaceMap() related icall.
15510         * domain.c, loader.h: load MethodInfo in mono_defaults.
15511
15512 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15513
15514         * gc.c: disable the finalizer thread for now, untill all the issues
15515         with it are resolved.
15516
15517 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15518
15519         * string-icalls.c: handle embedded nulls in string ctor when the
15520         length is specified.
15521
15522 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15523
15524         * class.c: look for explicit interface implementation in parent
15525         classes, too.
15526
15527 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
15528
15529         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
15530
15531 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15532
15533         * gc.c: protect handles with a critical section.
15534
15535 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15536
15537         * icall.c:
15538         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15539         parameters. If no assembly specified, try getting the type from all
15540         the assemblies in the current domain, else, load the assembly and get
15541         the type from it.
15542
15543 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15544
15545         * marshal.c: applied patch from Aleksey Demakov that fixes
15546         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15547
15548 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15549
15550         * icall.c: fixed get_location.
15551
15552 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
15553
15554         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15555         declarations to make it work with older gcc. 
15556
15557         * loader.c (mono_get_method): set signature->pinvoke for native calls
15558
15559 2002-11-20  Dick Porter  <dick@ximian.com>
15560
15561         * threads.c (mono_thread_init): Set the main thread's handle
15562
15563 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15564
15565         * gc.c: allow compilation without GC support. Changed to match the
15566         mono coding style.
15567
15568 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15569
15570         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15571
15572 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15573
15574         * reflection.c: set a public key token on the core assemblies.
15575
15576 2002-11-18  Dick Porter  <dick@ximian.com>
15577
15578         * threads.c: Split out some thread initialisation so that other
15579         files can set the start callback function.
15580
15581         * gc.c: Run finalisers in a separate thread, to avoid stack
15582         overflow.  Fixes bug 31333.
15583
15584         * appdomain.c: Set up GC finalisation thread.
15585
15586         * reflection.c: 
15587         * object.c: 
15588         * domain.c: Use gc.h macros for GC_malloc
15589         
15590 2002-11-15  Dick Porter  <dick@ximian.com>
15591
15592         * threadpool.c: 
15593         * threads.c:
15594         * appdomain.c: Removed mono_runtime_init_with_attach(),
15595         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15596         merging the extra parameter with the existing function.  Removed
15597         unneeded code in mono_thread_attach().
15598
15599 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
15600
15601         * image.c (mono_image_loaded_by_guid): a method to get loaded
15602         images by guid. 
15603         (load_metadata_ptrs): we store the guid as string.
15604
15605 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
15606
15607         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15608
15609         * metadata.c (mono_guid_to_string): imported method form Zoltan
15610         Varga (slightly modified)
15611
15612         * assembly.c (mono_assembly_open): load precompiled code
15613
15614         * loader.h (MonoMethod): we store the method token for use in the
15615         aot compiler. 
15616
15617 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15618
15619         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15620         the hook function called when an assembly is loaded.
15621         
15622         * domain.c: Modified file.
15623         (mono_domain_assembly_load): removed hash table insertion of assemblies.
15624
15625         Fixes bug #33196.
15626
15627 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
15628
15629         * reflection.c: Map PEFileKind to the value expected by the WinNT
15630         image loader. 
15631
15632 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15633
15634         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15635         Read until the buffer is filled completely.
15636
15637 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15638
15639         * icall.c: implemented MonoType.InternalGetEvent ().
15640
15641 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15642
15643         * appdomain.c: implemented InitAppDomainSetup. Delayed
15644         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15645         the entry_assembly.
15646
15647         * assembly.c: base_dir is now an absolute path ending with
15648         G_DIR_SEPARATOR.
15649
15650         * icall.c: modified get_location according to the above changes.
15651
15652         * object.c: init AppDomain.SetupInformation for the default domain after
15653         we have the entry assembly.
15654
15655         * domain.c: when unloading a domain, setup = NULL.
15656
15657 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
15658
15659         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15660
15661 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15662
15663         * object.h, object.c: introduced mono_object_get_virtual_method ()
15664         to lookup the method invoked on an object when a callvirt is done on
15665         a method.
15666         * icall.c: make MethodInfo::Invoke() always do a virtual call.
15667
15668 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15669
15670         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15671         current domain when loaded an assembly and failed to load it.
15672
15673         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15674
15675 2002-10-31  Dick Porter  <dick@ximian.com>
15676
15677         * icall.c: 
15678         * file-io.h: 
15679         * file-io.c: Return the error status in a parameter, as the
15680         GetLastError() value has long since been blown away if we try and
15681         look it up in a subsequent internal call invocation.  Delete the
15682         GetLastError() internal call, because it's useless.
15683
15684 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
15685
15686         * class.[ch]: added cast_class to fix bug 29517
15687
15688 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15689
15690         * marshal.c: create valid IL code in the filter clause:
15691         the new JIT is less forgiving:-)
15692
15693 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15694
15695         * icall.c: removed get_property internal call.
15696
15697 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
15698
15699         * appdomain.h domain.c: Added an ID to appdomains.
15700         
15701         * threads.c threads.h icall.c: Implement icall
15702         Thread:GetDomainID(), and remove unused icall 
15703         CurrentThreadDomain_internal.
15704
15705 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15706
15707         * icall.c: Don't recurse through the base types in GetConstructor.
15708         Fixes bug #32063. 
15709
15710 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15711
15712         * mempool.h, mempool.c: added mono_mempool_empty() and
15713         mono_mempool_stats().
15714
15715 2002-10-23  Dick Porter  <dick@ximian.com>
15716
15717         * file-io.c: 
15718         * file-io.h: 
15719         * icall.c: Added MonoIO.GetFileType internal call
15720
15721 2002-10-17  Dick Porter  <dick@ximian.com>
15722
15723         * appdomain.c (mono_runtime_cleanup): Don't signal the async
15724         delegate semaphore before waiting for all threads to finish,
15725         because new threads can also call async delegates.  Fixes bug
15726         32004.
15727
15728         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15729         of 3 seconds, in case another async job is queued.  (This part is
15730         needed because the bug fix reintroduced the 3s exit lag.)  This
15731         makes the mono_runtime_shutdown flag superfluous.
15732
15733 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15734
15735         * reflection.c: include ehader size in method section headers.
15736         Really check for suplicated modules entries.
15737
15738 2002-10-17  Martin Baulig  <martin@gnome.org>
15739
15740         * debug-mono-symfile.c: Added back support for locals.
15741
15742 2002-10-14  Martin Baulig  <martin@gnome.org>
15743
15744         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15745         MONO_TYPE_VOID.
15746
15747 2002-10-14  Martin Baulig  <martin@gnome.org>
15748
15749         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15750         mono_class_get() instead of looking in the class cache. 
15751
15752 2002-10-13  Martin Baulig  <martin@gnome.org>
15753
15754         * debug-mono-symfile.c: Set version number to 28, include the
15755         signature in method names.
15756
15757 2002-10-13  Martin Baulig  <martin@gnome.org>
15758
15759         * debug-mono-symfile.h: Set version number to 27.
15760
15761 2002-10-11  Martin Baulig  <martin@gnome.org>
15762
15763         * gc.c: Don't register/unregister NULL pointers as disappearing links.
15764
15765 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15766
15767         * metadata.c, metadata.h: added helper function to allocate signatures.
15768
15769 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15770
15771         * icall.c: added internal call to get the location of machine.config.
15772
15773 2002-10-08  Martin Baulig  <martin@gnome.org>
15774
15775         * debug-mono-symfile.c: Ignore classes with a pending init for the
15776         moment.
15777
15778 2002-10-03  Dick Porter  <dick@ximian.com>
15779
15780         * threads.c: Freebsd pthread_t is a pointer
15781
15782 2002-10-03  Dick Porter  <dick@ximian.com>
15783
15784         * socket-io.c: Implemented GetHostName_internal
15785
15786 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15787
15788         * mono-config.c:
15789         (mono_config_parse_file): don't leak the text.
15790
15791 2002-10-02  Martin Baulig  <martin@gnome.org>
15792
15793         * debug-mono-symfile.c: Added support for methods.
15794
15795 2002-10-01  Martin Baulig  <martin@gnome.org>
15796
15797         * debug-mono-symfile.c: Don't emit methods and line numbers for
15798         the dynamic symbol file, just write the type table.  We can easily
15799         have an external helper program which creates a symbol file for an
15800         IL file.        
15801
15802 2002-10-01  Dick Porter  <dick@ximian.com>
15803
15804         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15805         Only add the handle to the cleanup array when we're about to
15806         launch the thread.  Bug 31425 deadlocked when the test was run on
15807         mono under w32.
15808
15809 2002-10-01  Martin Baulig  <martin@gnome.org>
15810
15811         * debug-mono-symfile.c: Added support for properties.
15812
15813 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15814
15815         * reflection.c: unaligned store fix from Mark Crichton
15816         <crichton@gimp.org>.
15817
15818 2002-09-27  Martin Baulig  <martin@gnome.org>
15819
15820         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15821         New interncall.
15822
15823 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15824
15825         * assembly.h, assembly.c: use a sane API to hook into the assembly
15826         loading process instead of a useless special-purpouse hack
15827         (ngen needs a hook, too, for example).
15828
15829 2002-09-27  Dick Porter  <dick@ximian.com>
15830
15831         * threads.c (mono_thread_init): Call GetCurrentProcess() so
15832         io-layer can set up some process handle info.  Not needed on w32,
15833         but doesn't hurt either.
15834
15835         * process.c: Pass the program name in the second parameter to
15836         CreateProcess, so the path is searched.  Include the working
15837         directory. Implemented process name, process enumeration, and some
15838         process detail internal calls.
15839         
15840         * icall.c: Added internal calls for process lookup, and some
15841         process details
15842
15843 2002-09-26  Martin Baulig  <martin@gnome.org>
15844
15845         * assembly.c (mono_install_open_assembly_hook): New global
15846         function to install a function to be invoked each time a new
15847         assembly is loaded.
15848         (mono_assembly_open): Run this callback function if set.
15849
15850         * debug-mono-symfile.c: Put back line numbers for the dynamic
15851         symbol file and also record the .il file as source file.  This
15852         allows us to install the temporary symbol file as `file.dbg' just
15853         like a compiler-generated one.
15854
15855 2002-09-26  Nick Zigarovich <nick@chemlab.org>
15856
15857         * Corrected typo in gc.c (BOHEM vs BOEHM).
15858
15859 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15860
15861         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15862         GetProperties. Also avoid calling g_slist_length in GetProperties and
15863         GetMethods.
15864
15865 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15866
15867         * reflection.c: avoid unaligned stores (bug spotted by
15868         Mark Crichton  <crichton@gimp.org>).
15869
15870 2002-09-25  Martin Baulig  <martin@gnome.org>
15871
15872         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15873         instead of guint64 for addresses and added prologue/epilogue info.
15874
15875 2002-09-25  Martin Baulig  <martin@gnome.org>
15876
15877         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15878         store line number info.  For the dynamic symbol file, we only need
15879         to provide the JIT generated dynamic line number info for the dynamic
15880         symbol file.
15881
15882 2002-09-25  Martin Baulig  <martin@gnome.org>
15883
15884         * debug-mono-symfile.h: Incremented version number.
15885
15886 2002-09-24  Martin Baulig  <martin@gnome.org>
15887
15888         * class.c (mono_debugger_class_init_func): New global function
15889         pointer variable.
15890         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15891         call it.
15892
15893         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15894         function.  This is called via the mono_debugger_class_init_func
15895         hook to add all types to the dynamic type table.
15896         (ves_icall_MonoDebugger_GetType): New interncall to get a class
15897         from its metadata token.
15898
15899         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15900         New interncall for the debugger.
15901
15902 2002-09-24  Nick Drochak <ndrochak@gol.com>
15903
15904         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15905         before using it in case it is null.
15906         
15907 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15908
15909         * metadata.c: allow custom modifiers in local var signatures
15910         (bug spotted by Zoltan Varga).
15911
15912 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15913
15914         * class.c: deal with the <Module> class that may have a NULL vtable.
15915         Eliminate warnings.
15916
15917 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15918
15919         * image.c, image.h: more strong name helpers.
15920         * monosn.c: more work: convert pem keys to cryptoapi format.
15921
15922 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15923
15924         * string-icalls.c: speedup IndexOf.
15925
15926 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15927
15928         * icall.c: updates from Zoltan.2.Varga@nokia.com.
15929
15930 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15931
15932         * icall.c: cleanup: use mono_object_domain ().
15933
15934 2002-09-23  Martin Baulig  <martin@gnome.org>
15935
15936         * debug-mono-symfile.c: Improved type support.
15937
15938 2002-09-22  Martin Baulig  <martin@gnome.org>
15939
15940         * debug-mono-symfile.c: Added support for reference types and strings.
15941
15942 2002-09-22  Martin Baulig  <martin@gnome.org>
15943
15944         * debug-mono-symfile.c: Started to work on the type table.
15945
15946 2002-09-21  Martin Baulig  <martin@gnome.org>
15947
15948         * debug-mono-symfile.c: Largely reworked the symbol table format.
15949         The symbol table is now incrementally updated each time a new
15950         method is added.  We're now also using our own magic and version
15951         so that you don't need to recompile all your classes if the
15952         dynamic table changes.
15953         (mono_debug_update_mono_symbol_file): Removed.
15954         (mono_debug_symfile_add_method): New function to add a method.
15955
15956 2002-09-21  Martin Baulig  <martin@gnome.org>
15957
15958         * icall.c
15959         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15960         New interncall.
15961
15962         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15963         New interncall to get a method from its metadata token.
15964
15965 2002-09-21  Martin Baulig  <martin@gnome.org>
15966
15967         * debug-mono-symfile.c: Create type table.
15968
15969 2002-09-20  Martin Baulig  <martin@gnome.org>
15970
15971         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15972
15973 2002-09-20  Martin Baulig  <martin@gnome.org>
15974
15975         * debug-mono-symfile.c: Provide information about params and locals.
15976
15977 2002-09-20  Martin Baulig  <martin@gnome.org>
15978
15979         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
15980         New interncall.
15981
15982         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
15983         interncall to get a method from its metadata token.
15984
15985 2002-09-20  Martin Baulig  <martin@gnome.org>
15986
15987         * debug-mono-symfile.c: Added a few checks for method->header
15988         being non-NULL.  This should never happen, but for the moment
15989         let's use a g_warning() rather than a g_assert().
15990
15991 2002-09-19  Mark Crichton  <crichton@gimp.org>
15992
15993         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
15994         even if support for it isn't present.  Added an #ifdef to fix this.
15995
15996         * socket-io.c: Added checks back for Solaris support.
15997
15998 2002-09-19  Martin Baulig  <martin@gnome.org>
15999
16000         * debug-mono-symfile.c (read_string, write_string): Reflect latest
16001         changes in the symbol file format.
16002
16003 2002-09-18  Martin Baulig  <martin@gnome.org>
16004
16005         * debug-mono-symfile.c: Set version number to 21.
16006
16007 2002-09-18  Dick Porter  <dick@ximian.com>
16008
16009         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16010         on netbsd.  Fixes bug 30051.
16011
16012 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16013
16014         * reflection.c:
16015         (set_version_from_string): little fix.
16016
16017 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16018
16019         * monosn.c, Makefile.am: added strong name utility.
16020         * reflection.h, reflection.c: implemented delayed signing,
16021         locale, version and hash id assembly attributes.
16022
16023 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16024
16025         * loader.c, metadata.c: load param attributes in signatures.
16026
16027 2002-09-16  Martin Baulig  <martin@gnome.org>
16028
16029         * debug-mono-symfile.c: Added string table with all method names.
16030
16031 2002-09-14  Martin Baulig  <martin@gnome.org>
16032
16033         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16034         fast method lookup.
16035
16036 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16037
16038         * reflection.c: record the public key token of referenced assemblies.
16039
16040 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16041
16042         * image.c, image.h: added functions to get the strong name and the
16043         public key of an assembly.
16044         * pedump.c: use them.
16045
16046 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
16047
16048         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16049
16050 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
16051
16052         * marshal.c (mono_marshal_get_managed_wrapper): Added
16053         MONO_TYPE_BOOLEAN 
16054
16055 2002-09-11  Martin Baulig  <martin@gnome.org>
16056
16057         * gc.c: Call GC_unregister_disappearing_link() on all links when
16058         finalizing them, this is necessary to aviod a crash in boehm's
16059         finalize handler.
16060
16061 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16062
16063         * gc.c: handle GetTarget for finalized objects spotted and fixed by
16064         nick@chemlab.org.
16065
16066 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16067
16068         * icall.c: implemented MonoType::Module.
16069         * reflection.c, reflection.h: mono_module_get_object () from
16070         Tomi Pakarinen <tomi.pakarinen@welho.com>.
16071
16072 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16073
16074         * icall.c: ignore overridden methods in GetMethods ().
16075         Fix for FieldInfo::SetValue().
16076         * object.c: handle float/double in runtime invoke.
16077
16078 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16079
16080         * object.c: allow a constructor to be called again on an object.
16081
16082 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16083
16084         * class.h, class.c: move field layout code to it's own function and
16085         export it. Get an interface id earlier. Move fields in MonoClass
16086         so they are more cache friendly and align the bitfields.
16087         * loader.c: temporary handle get_param_names() for a runtime method.
16088         * reflection.c, reflection.h: more code to handle runtime creation of
16089         types.
16090
16091 2002-09-09  Martin Baulig  <martin@gnome.org>
16092
16093         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16094         signature with the pinvoke field being set for the actual call.
16095
16096 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16097
16098         * icall.c: removed some unused icalls. Start of map of glib charsets
16099         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16100
16101 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16102
16103         * debug-helpers.c: break infinite loop (found and fixed by
16104         Holger Arnold <harnold@gmx.de>).
16105
16106 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16107
16108         * icall.c: target may be null in create_delegate.
16109
16110 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16111
16112         * marshal.c: handle a boolean return type.
16113
16114 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16115
16116         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16117
16118 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16119
16120         * gc.c: fix weakreferences.
16121
16122 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16123
16124         * icall.c: added icall to get default codepage.
16125
16126 2002-09-03  Dick Porter  <dick@ximian.com>
16127
16128         * threads.h: 
16129         * threads.c: Use MonoThread instead of MonoObject where
16130         apropriate.
16131
16132         Store running thread objects in a hash table, so that we have all
16133         the info to hand when waiting for them to finish
16134         (means we don't need OpenThread() any more, so mingw builds should
16135         be fully functional again.)
16136
16137         * verify.c:
16138         * object.h: Added thread ID to MonoThread
16139
16140 2002-09-03  Martin Baulig  <martin@gnome.org>
16141
16142         * icall.c (System.Reflection.Assembly::get_location): New interncall.
16143
16144 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16145
16146         * icall.c: fixed leak in get_temp_path. Thanks lupus.
16147
16148 2002-09-03  Martin Baulig  <martin@gnome.org>
16149
16150         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16151         argument to store the end address of the disassembled instruction.
16152
16153         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16154         here from debug-symfile.h.
16155         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16156         JIT into this struct.
16157         (MonoSymbolFile): Added `char *image_file' field.
16158         (MonoDebugGetMethodFunc): Removed.
16159         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16160         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16161         (mono_debug_find_method): New method.
16162
16163         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16164         create a full symbol file.
16165         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16166         and static symbol files.
16167         (mono_debug_find_method): The symbol file keeps an internal method hash,
16168         call this to get a MonoDebugMethodInfo from a MonoMethod.
16169
16170         * debug-symfile.[ch]: Removed.
16171
16172 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
16173
16174         * image.c (do_mono_image_open): Remove linker version check.
16175
16176 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
16177
16178         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16179         wrappers for instance methods.
16180         
16181 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16182
16183         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16184
16185 2002-08-28  Dick Porter  <dick@ximian.com>
16186
16187         * Makefile.am: Export HOST_CC for w32 builds
16188
16189 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16190
16191         * file-io.c process.c: MonoString are null terminated, no
16192         need for mono_string_to_utf16() anymore.
16193
16194 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16195
16196         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16197
16198 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16199
16200         * icall.c, reflection.h: speedup System.MonoType.
16201
16202 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16203
16204         * reflection.c: allow null as the value of a string argument in
16205         custom attributes constructors.
16206
16207 2002-08-27  Martin Baulig  <martin@gnome.org>
16208
16209         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16210         `trampoline_address' field.
16211
16212 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
16213
16214         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16215         check (fixes bug #29486) 
16216
16217 2002-08-27  Martin Baulig  <martin@gnome.org>
16218
16219         * debug-mono-symfile.c: Changed the file format in a way that allows us
16220         open it read-only and to use a specially malloced area for all the
16221         dynamic data.  We can now also generate a symbol file on-the-fly if we're
16222         debugging IL code and there is no MCS generated symbol file for it.
16223
16224 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16225
16226         * object.c: added a define for a good string and array
16227         creation speedup (not enabled by default because we need to deal with
16228         the synch stuff).
16229
16230 2002-08-26  Martin Baulig  <martin@gnome.org>
16231
16232         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16233         function to create a dynamic symbol file.  This is used by the
16234         debugger to create a symbol file for IL code on-the-fly.
16235
16236 2002-08-26  Martin Baulig  <martin@gnome.org>
16237
16238         * loader.c (mono_lookup_pinvoke_call): Include the error message
16239         from g_module_error() in the error message.
16240
16241 2002-08-24  Martin Baulig  <martin@gnome.org>
16242
16243         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16244         function to update the symbol file.  The symbol file is mmap()ed
16245         writable, but private.  This allows us to install the symbol file
16246         together with the assembly.
16247
16248 2002-08-24  Martin Baulig  <martin@gnome.org>
16249
16250         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
16251         but they can read the new symbol file format which mcs is now creating.
16252
16253         * debug-symfile.c (mono_debug_find_source_location): Moved to
16254         debug-mono-symfile.c; this is now operating on the new symbol file.
16255
16256 2002-08-23  Martin Baulig  <martin@gnome.org>
16257
16258         * debug-helpers.c (mono_method_desc_from_method): New function to get
16259         a MonoMethodDesc from a MonoMethod.
16260
16261 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16262
16263         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16264         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16265
16266 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16267
16268         * string-icalls.[ch]: make helper methods static.
16269
16270 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16271
16272         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16273         types to it and to SetValueInternal.
16274
16275         * object.c: Moved handle_enum label to its proper place. This was the
16276         f... bug! ;-)
16277
16278         This time i compiled mcs and gtk-sharp and they both work.
16279
16280 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16281
16282         * icall.c: reverted partially my previous patch until 
16283         object.c:set_value handles enums correcly.
16284
16285 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16286
16287         * icall.c:
16288         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16289         (ves_icall_System_Environment_get_MachineName): removed warning when
16290         compiling under cygwin.
16291
16292 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16293
16294         * object.c: fixed field_get_value() for reference types.
16295
16296 2002-08-22  Dick Porter  <dick@ximian.com>
16297
16298         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16299         Don't free a buffer while it's still needed.  Patch from Jonathan
16300         Liger <Jonathan.liger@wanadoo.fr>
16301
16302 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
16303
16304         * icall.c (ves_icall_System_Environment_get_Platform): Add new
16305         internal call.
16306
16307 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
16308
16309         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16310         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16311
16312         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16313         we call unmanaged code which throws exceptions.
16314
16315 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16316
16317         * appdomain.h: added per-domain entry_assembly.
16318         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16319         arguments.
16320         * icall.c: Assembly::GetEntryAssembly icall.
16321         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16322         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16323
16324 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16325
16326         * appdomain.h, gc.c: added mono_domain_finalize ().
16327
16328 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16329
16330         * object.c:
16331         (mono_print_unhandled_exception): changed g_warning by g_printerr
16332         because g_log has a 1024 characters limit (yeah, i got a big stack
16333         trace). Don't print exception name, that should be in ToString 
16334         returned string.
16335
16336 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16337
16338         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16339         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16340
16341 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16342
16343         * object.c:
16344         (mono_print_unhandled_exception): after previous commit, i realized
16345         that MS calls ToString on the exception. I changed this function to
16346         do that. This way we get stack_trace for free.
16347
16348 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16349
16350         * object.c:
16351         (mono_print_unhandled_exception): invoke Message property instead of
16352         getting 'message' field from Exception. Don't allocate memory for
16353         'trace' and 'message' if not needed.
16354
16355 2002-08-18  Dick Porter  <dick@ximian.com>
16356
16357         * unicode.c: Fix asserts to match Encoder.cs checks
16358
16359 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16360
16361         * marshal.c: fix unaligned store issue and a few wrong
16362         opcode argument types.
16363
16364 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16365
16366         * icall.c: added GetUninitializedObjectInternal internal call.
16367
16368 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
16369
16370         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16371         to the right domain.
16372
16373 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
16374
16375         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16376
16377         * class.c (class_compute_field_layout): set blittable to false for Strings
16378
16379         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16380
16381 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16382
16383         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16384         first chunk of code to create types at runtime. Code to
16385         handle ReflectedType/DeclaringType. Make reflection handles
16386         domain specific.
16387
16388 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16389
16390         * class.c: set correct name in arrays.
16391
16392 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
16393
16394         * appdomain.c (mono_domain_transfer_object): make it work with
16395         valuetypes. bug fixes.
16396
16397 2002-08-12  Dick Porter  <dick@ximian.com>
16398
16399         * object.h: Rename some parameters to avoid c++ keywords (Patch
16400         from Joseph Wenninger <kde@jowenn.at>)
16401
16402 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16403
16404         * icall.c: added icall to implement Assembly.GetFile*.
16405
16406 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16407
16408         * reflection.h, reflection.c: code to embed managed resources.
16409
16410 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16411
16412         * class.c: move all the type size stuff into
16413         class_compute_field_layout().
16414
16415 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16416
16417         * class.c: ensure enums have always the correct instance size.
16418         * unicode.c: remove wrong assert.
16419
16420 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16421
16422         * assembly.c: fix mem corruption issue.
16423         * image.h, image.c: added mono_image_get_resource () to access
16424         managed resources.
16425         * icall.c: implemented Assembly.EntryPoint property and some
16426         Managed Resources related internalcalls.
16427
16428
16429 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16430
16431         * image.c, image.h: impemented mono_image_get_entry_point ().
16432         * appdomain.c: use mono_image_get_entry_point.
16433
16434 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16435
16436         * reflection.c: support the object type argument when loading
16437         custom attributes.
16438
16439 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
16440
16441         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16442         String as return type.
16443
16444 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16445
16446         * reflection.c: fix encoding of named args for custom attrs to match
16447         the ms implementation. Read them back when instantiating custom
16448         attributes.
16449
16450 2002-08-02  Radek Doulik  <rodo@ximian.com>
16451
16452         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16453         by Dietmar as quick fix
16454         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16455         16 as stack size, used on more places as quick fix before Dietmar
16456         will fix it properly
16457
16458 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16459
16460         * object.h, object.c: added accessors for fields and properties.
16461
16462 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16463
16464         * class.c, class.h: made mono_class_get_field_from_name ()
16465         loop on parent types.
16466         Added mono_class_get_property_from_name ().
16467
16468 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16469
16470         * class.c, class.h: move the code to setup the type vtable in its own
16471         function so that it can be reused also for types created at runtime.
16472         Eliminate the "class" identifier from the header file.
16473         * reflection.c: setup the vtable for enums so that we can create
16474         objects for use in SetConstant ().
16475
16476 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
16477
16478         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16479         instead of the delegate itself as this pointer (bug #28383)
16480
16481 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
16482
16483         * marshal.c (mono_marshal_get_managed_wrapper): added return type
16484         conversions.
16485
16486 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16487
16488         * loader.c: don't set the pinvoke bit on icalls.
16489
16490 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
16491
16492         * debug-helpers.c (mono_method_full_name): only print a number to
16493         indicate wrapper type (so that the output is more readable in traces).
16494
16495 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
16496
16497         * class.c (mono_class_init): include method override patch from Paolo
16498
16499 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16500
16501         * icall.c: fixed GetTypeCode().
16502
16503 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
16504
16505         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16506         use real delegate invoke function to make it work with multicast
16507         delegates (fix bug# 28291).
16508
16509 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16510
16511         * object.c: load constant strings.
16512
16513 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16514
16515         * reflection.c: no magic numbers.
16516         * tabledefs.h: security action enum.
16517
16518 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16519
16520         * assembly.c: fix possible memory corruption.
16521
16522 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16523
16524         * reflection.h, reflection.c: added support for linking resources.
16525         * verify.c: check we have an updated corlib.
16526
16527 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
16528
16529         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16530         string arrays.
16531         (mono_marshal_string_array): null terminate unmanaged string arrays.
16532         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16533
16534 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16535
16536         * icall.c: Type.GetType () can now return also types from the
16537         calling assembly.
16538
16539 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16540
16541         * loader.h, loader.c: stack walking support.
16542         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16543         GetCallingAssembly.
16544
16545 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
16546
16547         * marshal.c: added optimisations for blittable types 
16548
16549         * class.c (mono_array_class_get): do not set blittable attribute on arrays
16550         (mono_class_setup_mono_type): set blittable attribute for single
16551         and double.
16552
16553         * marshal.c (mono_string_utf8_to_builder): impl.
16554         (mono_string_builder_to_utf8): impl.
16555         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16556
16557 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
16558
16559         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16560         (mono_marshal_get_managed_wrapper): impl. byref types
16561
16562 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16563
16564         * icall.c:
16565         (search_method): don't display debug message. 
16566
16567 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16568
16569         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16570
16571 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16572
16573         * appdomain.c: set the missing filename when throwing exception.
16574
16575 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16576
16577         * metadata.c (mono_type_size): code cleanup
16578         (mono_type_stack_size): removed some test code
16579
16580 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
16581
16582         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16583         mono_get_exception_file_not_found now.
16584
16585         * exception.c (mono_exception_from_name_two_strings): New version
16586         that will call a constructor with two string arguments. 
16587         (mono_get_exception_file_not_found): New helper routine, used to
16588         report file-not-found errors.
16589
16590 2002-07-20  Dick Porter  <dick@ximian.com>
16591
16592         * process.h:
16593         * process.c: Pass file handles to CreateProcess
16594         
16595         * icall.c:
16596         * file-io.h:
16597         * file-io.c: Implemented CreatePipe
16598
16599 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16600
16601         * metadata.c (mono_get_param_info): set alignment for value types
16602
16603 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16604
16605         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16606         Constify mono_domain_assembly_open().
16607         * loader.c: handle null namespace in icalls.
16608
16609 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16610
16611         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16612         (emit_str_to_ptr_conv): marshal object as structs
16613
16614         * metadata.c (mono_type_to_unmanaged): marshal object as structs
16615
16616         * marshal.c (mono_marshal_get_runtime_invoke): support value types
16617
16618 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
16619
16620         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16621         (mono_marshal_get_native_wrapper): we an now return value types
16622
16623 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16624
16625         * verify.c: more checks implemented.
16626
16627 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
16628
16629         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16630         (fix bug #27695)
16631         (mono_marshal_get_native_wrapper): allow byref arguments
16632         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16633         impl. PtrToStringXXX methods
16634         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16635         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16636         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16637         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16638         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16639
16640 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16641
16642         * reflection.c: fix buglet in parsing an assembly name.
16643
16644 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16645
16646         * marshal.c (emit_ptr_to_str_conv): first impl.
16647
16648 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16649
16650         * object.c, class.h: cache the vtable in the class as suggested by
16651         vargaz@freemail.hu (Zoltan Varga).
16652
16653 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16654
16655         * class.h, loader.c: added mono_field_from_token().
16656         * verify.c: first cut of type checking code.
16657
16658 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16659
16660         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16661
16662 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
16663
16664         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16665         (fix bug #27782)
16666         (mono_marshal_get_remoting_invoke): impl.
16667         (mono_delegate_begin_invoke): impl.
16668         (mono_mb_emit_save_args): impl.
16669         (mono_delegate_end_invoke): impl.
16670         (mono_marshal_get_delegate_begin_invoke):
16671         (mono_marshal_get_delegate_end_invoke):
16672         (mono_marshal_get_delegate_invoke): generate a special name for
16673         those methods (including the signature) and associate them whith
16674         the delegate class. 
16675
16676 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16677
16678         * reflection.[ch]: 
16679         (mono_reflection_type_from_name): now it has a MonoImage parameter
16680         which is used as the default image to search the type in. If the image
16681         is NULL or getting the type from it fails, it defaults to corlib.
16682
16683         * icall.c: changed 1 call to mono_reflection_type_from_name to match
16684         new parameter.
16685
16686 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16687
16688         * reflection.c: update the parameter table index.
16689
16690 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16691
16692         * domain.c: don't include the mark byte in the string hash.
16693
16694 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16695
16696         * icall.cs: icall for Type.GetTypeCode ().
16697         * verify: a couple of fixes and disabled local initialization checks.
16698
16699 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
16700
16701         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16702
16703         * debug-helpers.c (mono_method_full_name): print the type of the
16704         runtime wrapper
16705
16706         * metadata.c (mono_signature_hash): a hash function for signatures
16707         (mono_signature_hash): better hash algorithm
16708
16709         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16710
16711         * debug-helpers.c (mono_method_full_name): this can now generate
16712         method names with signatures
16713
16714         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16715         method dont have this pointers.
16716
16717 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16718
16719         * reflection.c: fixup typebuilder tokens.
16720         * image.c: fix buglet.
16721         * marshal.h: remove whitespace.
16722         * metadata.h, metadata.c: reinstate code that was removed.
16723         * verify.c: handle catch directives and fix another couple of bugs.
16724
16725 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
16726
16727         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16728         (mono_marshal_get_native_wrapper): make it comp. with the old code
16729         (mono_marshal_get_native_wrapper): support boolean
16730         (mono_marshal_get_managed_wrapper): support more types
16731
16732 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
16733
16734         * class.c (class_compute_field_layout): compute class->blittable attribute.
16735
16736 2002-07-09  Dick Porter  <dick@ximian.com>
16737
16738         * threads.c: Make the thread cleaning up cope with threads that
16739         call ExitThread()
16740
16741 2002-07-08  Radek Doulik  <rodo@ximian.com>
16742
16743         * reflection.c (method_encode_code): use non-translated values to
16744         compute finally_start, this fixes exception handling on ppc, yay!
16745
16746         * decimal.h (struct signscale): fix endianess
16747
16748 2002-07-07  Radek Doulik  <rodo@ximian.com>
16749
16750         * reflection.c: swap box_val and not val
16751
16752 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16753
16754         * reflection.c, reflection.h: handle full assembly info in type name.
16755         Handle Type arguments when loading custom attributes.
16756         * icall.c: updated to use new mono_reflection_type_from_name () method.
16757
16758 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16759
16760         * loader.c:
16761         (method_from_memberref): also print assembly name when method not found.
16762
16763 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16764
16765         * icall.c:
16766         (ves_icall_TypeGetProperties): fixed bug #27473. 
16767
16768 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16769
16770         * reflection.c: display image name and token when cannot find the
16771         .ctor for an attribute.
16772
16773 2002-07-05  Martin Baulig  <martin@gnome.org>
16774
16775         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16776
16777 2002-07-04  Dick Porter  <dick@ximian.com>
16778
16779         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16780         compile on mingw.  This will cause mingw builds to not wait for
16781         subthreads to terminate after the main thread does.  I've lodged a
16782         bug with the mingw developers for them to wrap OpenThread().
16783
16784 2002-07-03  Dick Porter  <dick@ximian.com>
16785
16786         * threads.c: Store thread IDs instead of handles, because
16787         GetCurrentThread() returns a pseudohandle and therefore stores
16788         useless values.  mono_thread_cleanup() continues checking the
16789         array of threads until it is empty, to cope with subthreads
16790         spawning new threads after the main thread has finished.
16791
16792         * profiler.h:
16793         * profiler.c:
16794         * profiler-private.h: Pass the thread ID to thread profiler
16795         functions, instead of a handle
16796
16797 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16798
16799         * verify.c: fixes to make it more usable.
16800         * pedump.c: added --verify code to verify IL code in an assembly.
16801
16802 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16803
16804         * reflection.c: turn errors into warnings to allow compiling corlib.
16805
16806 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16807
16808         * reflection.c: add special cases to compile corlib.
16809
16810 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16811
16812         * reflection.c: handle properties with only a set method.
16813
16814 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16815
16816         * opcodes.h: add enum with opcodes in opval order.
16817
16818 2002-07-01  Dick Porter  <dick@ximian.com>
16819         
16820         * object.h:
16821         * object.c (mono_runtime_run_main): Removed unneeded argument
16822
16823 2002-06-28  Martin Baulig  <martin@gnome.org>
16824
16825         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16826
16827 2002-06-27  Dick Porter  <dick@ximian.com>
16828
16829         * threads.c: Store the handle in both the parent thread and in the
16830         subthread, to minimise the time between starting a new thread and
16831         storing its ID.
16832
16833 2002-06-26  Dick Porter  <dick@ximian.com>
16834
16835         * appdomain.c (mono_runtime_cleanup): Close the socket library
16836         after all the threads have finished, not before
16837
16838 2002-06-26  Martin Baulig  <martin@gnome.org>
16839
16840         * debug-symfile.c (mono_debug_find_source_location): Added
16841         `guint32 *line_number' argument.  If it's not NULL, store the line number
16842         there and return the file name without the line number.
16843
16844 2002-06-25  Dick Porter  <dick@ximian.com>
16845
16846         * icall.c:
16847         * process.h:
16848         * process.c: Process forking and other support functions
16849
16850 2002-06-25  Dick Porter  <dick@ximian.com>
16851
16852         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16853         things dont happen when the image is closed.
16854         (mono_image_lookup_resource): Walk the resource section looking
16855         for a particular entry
16856
16857         * cil-coff.h: PE resource section decoding
16858
16859 2002-06-25  Dick Porter  <dick@ximian.com>
16860         
16861         * assembly.h:
16862         * assembly.c: 
16863         (mono_assembly_foreach): Accessor functions to walk the list of
16864         loaded assemblies
16865         (mono_assembly_set_main):
16866         (mono_assembly_get_main): Process methods need to know which
16867         assembly is the "main" one
16868
16869         * object.c (mono_runtime_run_main): Record the main assembly
16870
16871         * debug-helpers.c: Fix typo
16872
16873 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
16874
16875         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16876         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16877
16878 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16879
16880         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16881
16882 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
16883
16884         * image.c (do_mono_image_open): Initialize reference count,
16885         otherwise we leak the MonoImage.
16886
16887 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16888
16889         * reflection.c: small tweak to handle self-hosting.
16890
16891 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16892
16893         * reflection.c: fix type name parse code.
16894
16895 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16896
16897         * reflection.c: break out of the loop.
16898         * image.c: special case corlib.
16899
16900 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16901
16902         * reflection.c: add all the custom attrs at the end to ensure the
16903         ctors have been properly initialized when the attributes are defined
16904         in the current assembly.
16905
16906 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16907
16908         * reflection.c: handle correctly multiple-nested types.
16909
16910 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16911
16912         * row-indexes.h: fix typos.
16913         * reflection.c: adjust for typos and fix method_def_or_ref
16914         encoding in MethodImpl table.
16915
16916 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16917
16918         * reflection.c: fix entry point patching (thanks Serge!).
16919
16920 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
16921
16922         * verify.c: add check for System.Exception
16923
16924 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16925
16926         * image.c, class.c: minifix for code just c&p'ed.
16927         * reflection.c: warning fix.
16928         * object.h, loader.h, domain.c: load also StringBuilder.
16929
16930 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16931
16932         * marshal.h, marshal.c: some support code to handle complex marshaling.
16933
16934 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16935
16936         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16937         Better signatures with vtable error dump.
16938
16939 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16940
16941         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16942
16943 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
16944
16945         * icall.c (ves_icall_Type_GetField): impl.
16946
16947 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16948
16949         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16950         to retrieve a marshal description blob for a field or param.
16951
16952 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16953
16954         * reflection.h, reflection.c: change order of nested type emission
16955         to avoid table corruption. The NestedTypes table is sorted.
16956         * icall.c: change order of GetConstructor results to workaround mcs bug.
16957
16958 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16959
16960         * reflection.h, reflection.c: handle field and param marshal
16961         information.
16962
16963 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16964
16965         * icall.c, marshal.c marshal.h: more Marshal class implementation.
16966
16967 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16968
16969         * reflection.c: fix call convention.
16970
16971 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16972
16973         * reflection.h, reflection.c: mono_image_get_memberref_token()
16974         takes a type instead of a class, now. Added
16975         mono_image_get_array_token() to create tokens for the special
16976         multi-dim array methods.
16977
16978 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16979
16980         * assembly.c: handle modules (no assembly table). Split
16981         loading references in its own function.
16982         * class.c: handle moduleref resolution scope.
16983         * image.c, image.h: cache module name in image.
16984
16985 2002-06-07  Martin Baulig  <martin@gnome.org>
16986
16987         * reflection.c (mono_image_get_type_info): Only add a class layout entry
16988         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
16989
16990 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16991
16992         * icall.c: more signature fixes that used uint instead of int.
16993
16994 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16995
16996         * reflection.c: fixed signature of field refs.
16997
16998 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16999
17000         * class.c, reflection.c: handle typerefs of nested types
17001         (both on read and when writing files).
17002
17003 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17004
17005         * icall.c: fix method signatures that tried to workaround the previous
17006         typo, d'oh!
17007
17008 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17009
17010         * debug-helpers.c: fix typo.
17011
17012 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17013
17014         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17015         rewrote the PE/COFF writing code (our programs are understood by the
17016         ms runtime, now).
17017
17018 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17019
17020         * gc.c, gc.h, icall.c: weakreference support.
17021
17022 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17023
17024         * Makefile.am, mono-config.c: use $(sysconfdir).
17025
17026 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17027
17028         * icall.c: changed default precision of Double.ToString() to 15.
17029         Fixed memory leak. Unified with Single.ToString.
17030
17031 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17032
17033         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17034
17035 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17036
17037         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17038         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17039         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17040         and myself.
17041
17042 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17043
17044         * debug-symfile.c, sysmath.c: yet more compilation fixes.
17045
17046 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17047
17048         * reflection.c, socket-io.c: more compilation fixes.
17049
17050 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17051
17052         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17053         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17054         unicode.c: warning and compiler compatibility fixes.
17055
17056 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17057
17058         * class.h, metadata.c: fixed warnings/compilation errors.
17059
17060 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17061
17062         * Makefile.am, mono-config.c, mono-config.h: configuration file
17063         support routines.
17064         * loader.c, loader.h: make Dll mapping configurable at runtime in the
17065         config file. Export methods to insert and lookup mappings.
17066
17067 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17068
17069         * reflection.c: handle types and boxed objects in custom attr
17070         constructors.
17071
17072 2002-05-30  Martin Baulig  <martin@gnome.org>
17073
17074         * debug-symfile.c
17075         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17076
17077 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17078
17079         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17080         to lookup the implmap row for a P/Invoke method.
17081         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17082         P/Invoke method from the runtime on an as needed basis.
17083
17084 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
17085
17086         * metadata.c (mono_metadata_parse_signature): impl.
17087
17088 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17089
17090         * class.c: handle .pack directive.
17091
17092 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17093
17094         * object.c: initialize static fields with RVA data.
17095
17096 2002-05-25  Martin Baulig  <martin@gnome.org>
17097
17098         * debug-symfile.c
17099         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17100
17101 2002-05-24  Martin Baulig  <martin@gnome.org>
17102
17103         * debug-symfile.c
17104         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17105         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17106         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17107
17108 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17109
17110         * object.c: special case string ctros in invoke.
17111         * gc.c: silly whitespace changes.
17112
17113 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
17114
17115         * threadpool.[ch]: impl. a threadpool that can
17116         be used by mint and mono.
17117
17118 2002-05-22  Martin Baulig  <martin@gnome.org>
17119
17120         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17121         The first argument is now a `MonoReflectionModuleBuilder *', the return
17122         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
17123         `methods' field to get the method builder.  The `token' argument is the
17124         unfixed token.
17125
17126         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17127         invalid characters instead of g_assert_not_reached()ing.  This seems
17128         to be the behaviour of mscorlib.
17129
17130 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
17131
17132         * object.c (mono_runtime_invoke_array): applied patch from Rachel
17133         Hestilow to fix bug #25104
17134
17135 2002-05-21  Martin Baulig  <martin@gnome.org>
17136
17137         * debug-symfile.c (mono_debug_find_source_location): New function.
17138         Looks up an IL offset in the line number table and returns the source
17139         location as a string.
17140
17141 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17142
17143         * icall.c:
17144         (mono_double_ToStringImpl): changed %f by %g until we have something
17145         better.
17146
17147 2002-05-21  Nick Drochak  <ndrochak@gol.com>
17148
17149         * icall.c : Use different name for Math.Pow's icall.  Needed to check
17150         parameters first in C#.
17151
17152 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17153
17154         * icall.c, reflection.h: added icall to get info about an event.
17155
17156 2002-05-20  Radek Doulik  <rodo@ximian.com>
17157
17158         * object.c (mono_value_box): don't use memcpy for boxing on BIG
17159         endian
17160         (mono_value_box): don't use memcpy for small sizes on
17161         architectures with unaligned access
17162
17163 2002-05-20  Martin Baulig  <martin@gnome.org>
17164
17165         * reflection.c (mono_reflection_setup_internal_class): Don't crash
17166         if `tb->parent == NULL'.
17167         (mono_reflection_create_internal_class): New function.  This is
17168         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17169         for enum types.
17170
17171         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17172         New interncall.
17173
17174 2002-05-19  Martin Baulig  <martin@gnome.org>
17175
17176         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17177         argument to get the length, don't default to the array length.
17178
17179 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
17180
17181         * assembly.c (mono_assembly_setrootdir): New function used to
17182         override the MONO_ASSEMBLIES directory.
17183
17184 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17185
17186         * icall.c: ValueType_GetHashCode() initialize local var.
17187
17188 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17189
17190         * reflection.c: sort custom attributes table.
17191
17192 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17193
17194         * reflection.c: support named args in custom attributes (write support).
17195
17196 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17197
17198         * reflection.c: fix finally position calculation.
17199
17200 2002-05-15  Radek Doulik  <rodo@ximian.com>
17201
17202         * reflection.c: fixed endianess at many places
17203
17204         * icall.c (ves_icall_InitializeArray): comment out debug msg
17205
17206 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
17207
17208         * object.c (mono_unhandled_exception): new function to handle
17209         unhandled exceptions.
17210         (mono_unhandled_exception): call the UnhandledException event.
17211         (mono_runtime_delegate_invoke): impl.
17212
17213 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17214
17215         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17216         returns the RVA, not the direct pointer to the data. Handle the case
17217         when the class size is fixed.
17218
17219 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17220
17221         * reflection.c: fix some endianess issues.
17222
17223 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
17224
17225         * object.c (mono_runtime_invoke): is now able to catch exceptions.
17226
17227         * threads.c (mono_thread_init): added a callback which is invoked
17228         at thread start.
17229
17230 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17231         
17232         * icall.c: make GetHashCode return non-negative values.
17233
17234 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17235
17236         * object.c, icall.c, gc.c: revert to address-based hashcode.
17237
17238 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
17239
17240         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17241
17242 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17243
17244         * icall.c, class.c: special case <Module>.
17245
17246 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
17247
17248         * icall.c: fix bug in GetNow().
17249
17250 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
17251
17252         * object.c (mono_runtime_class_init): make sure that we call all
17253         static class constructors.
17254
17255 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17256
17257         * reflection.c: sort methodsemantics table.
17258
17259 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17260
17261         * reflection.h, reflection.c: honour init locals setting.
17262
17263 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17264
17265         * icall.c: copied Double ToStringImpl for Single ToStringImpl
17266
17267 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17268
17269         * reflection.c: support ContructorBuilders in attribute blob creation.
17270
17271 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17272
17273         * reflection.c: some changes to build a binary that can be run
17274         directly in windows.
17275
17276 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17277
17278         * loader.c: print a big message when an icall can't be found.
17279
17280 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17281
17282         * string-icalls.c: fix bug 24248.
17283
17284 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17285
17286         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17287         icall.c, reflection.h: separate assembly loading by pathname and by
17288         assembly name. Use the MONO_PATH env var to search for assemblies.
17289
17290 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17291
17292         * assembly.c, image.h: add some support for assemblies
17293         with multiple modules.
17294         * class.c, class.h: export mono_class_from_typeref().
17295         * loader.c: remove duplicated code and use mono_class_from_typeref(),
17296         instead.
17297
17298 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17299
17300         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17301         documentation says (the ECMA one is correct).
17302
17303 2002-05-02  Dick Porter  <dick@ximian.com>
17304
17305         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17306         Don't name the synchronisation mutex.
17307
17308 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
17309
17310         * rand.c
17311         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17312         Make the prototypes match.
17313         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17314         Same.
17315
17316         * icall.c
17317         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17318         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17319         all systems have tm.tm_zone, so use strftime() with %Z to print
17320         the timezone abreviation into a temp string.
17321
17322         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17323         rather than mono_array_addr() on a MonoString on Big Endian
17324         machines.
17325
17326 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
17327
17328         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17329         fix bug 24041
17330
17331 2002-04-30  Dick Porter  <dick@ximian.com>
17332
17333         * socket-io.c: Cope with SOCKET being an integer rather than a
17334         pointer now.
17335
17336         * threads.c: Added Thread_free_internal, to deal with thread
17337         handle cleanup.  Moved calls to handle_store() and handle_remove()
17338         to start_wrapper(), so each can only be called once.  Allocate
17339         synchronisation blocks with GC_malloc(), and use GC finalisation
17340         to close the handles.
17341
17342         * icall.c: added System.Threading.Thread::Thread_free_internal
17343
17344 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17345
17346         * icall.c: support Environment.Exit, CommandLineArgs().
17347
17348 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17349
17350         * object.c, object.h: added mono_runtime_run_main () and
17351         mono_runtime_get_main_args () for use in System.Environment.
17352
17353 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17354
17355         * gc.c: fix thinko, enable actual finalization since the jit is now
17356         fixed.
17357
17358 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17359
17360         * gc.c, object.c: take into account that an object may be offset wrt the address
17361         returned by GC_malloc().
17362
17363 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17364
17365         * image.c: handle files without entries in the assembly table (modules).
17366
17367 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17368
17369         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
17370         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17371         allowed to be null when it's System.Object class setup.
17372
17373 2002-04-27  Martin Baulig  <martin@gnome.org>
17374
17375         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17376         if `tb->parent == NULL' rather than crashing.
17377
17378 2002-04-28  Nick Drochak  <ndrochak@gol.com>
17379
17380         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
17381         calling acos() where asin() should have been called.
17382
17383 2002-04-26  Martin Baulig  <martin@gnome.org>
17384
17385         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17386         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17387         there's a subdirectory called `System', but we don't want to read that
17388         subdirectory as an assembly.
17389
17390 2002-04-25  Martin Baulig  <martin@gnome.org>
17391
17392         * debug-symfile.c: Reflect latest MonoString changes.
17393
17394 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17395
17396         * rand.c, rand.h: instance method icalls need to have an explicit
17397         this pointer as first argument in the C implementation.
17398
17399 2002-04-25  Nick Drochak <ndrochak@gol.com>
17400
17401         * icall.c: Fix typo in map for GetNonZeroBytes
17402
17403 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17404
17405         * string-icalls.c : String does now passes unit tests without any 
17406         errors, the following changes has been made:
17407         
17408         Implemented replace methods.
17409         Renaming of methods to (try) follow the standard.
17410         Fixed compare ordinal
17411         Made all memory allocated directly to function instead of via icall function.
17412         Small performance fix in is_in_array function
17413                         
17414  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17415
17416         c (mono_string_Internal_ctor_charp_int_int):
17417         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
17418         sindex < 0, throw ArgumentOutOfRangeException instead of
17419         ArgumentNullException.
17420
17421         Added new check for length == 0, however
17422         I need to make it return String.Empty from the C code.
17423         
17424         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17425         that calculate the length for us here.
17426         
17427         (mono_string_Internal_ctor_sbytep_int_int): Replaced
17428         mono_string_new_utf16 with mono_string_new, since value is utf8.
17429
17430 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17431
17432         * object.c: register the object for finalization if needed.
17433         Allocate one more char in the string for the terminating 0 char.
17434
17435 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17436
17437         * class.c, class.h, image.c: check if a type implemenst a destructor.
17438         Use the proper key for array class lookups.
17439         * icall.c: register the icalls in the System.GC class.
17440         * gc.c, gc.h: GC-related functions and icalls.
17441
17442 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17443
17444         * icall.c:
17445         * socket-io.c:
17446         * unicode.c: free some strings gotten from mono_string_to_utf8 and
17447         changed a couple of free () by g_free ().
17448
17449         * decimal.c: one-liner in the comments for decimal2string ().
17450
17451 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17452
17453         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17454
17455 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17456
17457         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17458         * object.c (mono_runtime_invoke_array) : handle null in params
17459
17460 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17461
17462         * string-icalls.c: fixed bug in split (one off bug)
17463
17464 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17465
17466         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17467         * icalls.c: added String::Equals as internal method
17468
17469 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17470
17471         * threads.c: fixed bug in the double interlocked functions
17472
17473 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
17474
17475         * threads.c: implemented all of the new interlocked icalls.
17476         * string-icalls.c: fix a bug in insert.
17477         * icalls.c: added the icalls for interlocked, removed old string functions.
17478         
17479 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17480
17481         * loader.c: fix off-by-one error when reading argument names.
17482
17483 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17484
17485         * profiler.c: win32 counter implementation (untested).
17486         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17487         (the latter needs testing and more complete impl. from win32 folks).
17488
17489 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
17490
17491         * object.c: mono_array_new_full workaround mono_array_class_get
17492         problem.
17493
17494 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17495
17496         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17497         * object.h (mono_string_chars): Changed casting type.
17498
17499 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17500
17501         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17502                            method signatures to use gunichar2 instead of gint16.
17503
17504 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
17505
17506         * object.h, object.c: domain-specific versions of mono_object_new and
17507         mono_array_new.
17508
17509 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
17510
17511         * object.c: changed String layout
17512
17513         * string-icalls.c (mono_string_Internal_ctor_chara): added
17514         internal string constructors.
17515
17516 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17517
17518         * threads.c: pass 'this' to the thread start routine.
17519
17520 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17521
17522         * string-icalls.c: fix IndexOf and LastIndexOf. Now
17523         InternalCompareStr don't call twice mono_string_cmp_char for the last
17524         character. Improved performance in mono_string_cmp_char.
17525
17526 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17527
17528         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17529         code into its own library: libmonoruntime.
17530
17531 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
17532
17533         * object.h, object.c: changed array format so that szarrays do not
17534         require a bounds structure.
17535         * icall.c, appdomain.c: support for new szarray format.
17536
17537 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17538
17539         * metadata.c: compare also the retuns type when comparing signatures:
17540         we didn't do this as an optimization since really overloaded methods
17541         must differ also in the arguments, but this doesn't work with
17542         low-level IL code (or when using explicit conversion operators: see
17543         bug#23498 for an example).
17544
17545 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17546
17547         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17548
17549 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17550
17551         * icall.c: make MonoType::GetElementType its own icall.
17552
17553 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17554
17555         * icall.c: remove MonoMethod_get_Name().
17556         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17557         object.
17558
17559 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17560
17561         * string-icalls.c: optimized a few methods.
17562
17563 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17564
17565         * icall.c: added all new string internal calls
17566         * string-icalls.c: added, new string internal call implementation.
17567         * object.c: added mono_string_new_size for allocating a string a size
17568
17569 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
17570
17571         * object.c (mono_object_isinst): use the same code as in the
17572         optimized x86 version.
17573
17574 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17575
17576         * profiler.c: TSC-based timer code (faster and more accurate).
17577         Not hooked up in configure, yet (set USE_X86TSC to 1).
17578
17579 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17580
17581         * profiler.c, profiler.h: track time spent compiling methods.
17582         * threads.c: track thread creation/destruction.
17583
17584 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17585
17586         * profiler.c, profiler.h, profiler-private.h: profiling interface
17587         and sample implementation. Moved here so that it can be used also by
17588         the jit.
17589
17590 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17591
17592         * reflection.c, reflection.h: keep types and other handles separate in
17593         the hash tables for referred tokens. Add guid for modules.
17594
17595 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17596
17597         * assembly.c: fix bugs found with valgrind.
17598         * metadata.h, metadata.c: added mono_metadata_guid_heap().
17599
17600 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
17601
17602         * threads: added icall support for getting current domain for
17603                    the thread.
17604  
17605 2002-04-13  Martin Baulig  <martin@gnome.org>
17606
17607         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17608         (MonoDebugVarInfo): Added `index' field for register based addresses.
17609         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17610         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17611         `MonoDebugVarInfo *params' and `guint32 this_offset' with
17612         `MonoDebugVarInfo *this_var'.
17613
17614         * debug-symfile.c (relocate_variable): New static function to write
17615         a location description for a local variable or method parameter.
17616
17617 2002-04-12  Martin Baulig  <martin@gnome.org>
17618
17619         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17620         stack offset and begin/end scope address of a local variable.
17621         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17622         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17623         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17624
17625         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17626         Added new relocation types for start/end scope of a local variable.
17627
17628 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17629
17630         * object.h: add mono_object_domain() macro.
17631         * reflection.c: handle typespecs.
17632         * icall.c: MonoMethod::get_Name() implementation.
17633
17634 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17635
17636         * icall.c: String::GetHashCode() icall implementation.
17637
17638 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17639
17640         * icall.c: String::IndexOfAny icall.
17641         * object.c, object.h: make array->max_length more useful.
17642         Intrduced mono_object_class() and mono_string_length() macros.
17643
17644 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17645
17646         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17647         instead of g_unichar_isdigit.
17648
17649 2002-04-11  Nick Drochak  <ndrochak@gol.com>
17650
17651         * icall.c: Implement a simple Double.ToString().
17652
17653 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17654
17655         * appdomain.h: only io-layer.h is supposed to be included.
17656         * icall.c: explicitly import environ. Fix warning.
17657
17658 2002-04-10  Nick Drochak  <ndrochak@gol.com>
17659
17660         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17661                 return true even if it's not Daylight Savings time.
17662                 Only return false for the case where the function isn't
17663                 implemented for a plaform (read Windows).
17664
17665 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17666
17667         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17668         data with a mutex.
17669
17670 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
17671
17672         * mempool.c (mono_mempool_alloc): only use g_malloc when
17673         absolutely necessary.
17674
17675 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17676
17677         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17678
17679         * class.c (mono_class_vtable): use domain mempool to allocate vtable
17680         (mono_class_proxy_vtable): use domain mempool
17681
17682 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17683
17684         * appdomain.h, appdomain.c: split initialization that requires the
17685         execution engine support into mono_runtime_init().
17686
17687 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17688
17689         * class.c (mono_class_init): don't include vtable inside MonoClass
17690         to save some memory, gather some statistics.
17691         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17692
17693 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17694
17695         * icall.c: internalcall implementation for ValueType.Equals().
17696
17697 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
17698
17699         * object.c (mono_message_init): moved 
17700         (mono_runtime_exec_main): new arch. independent impl.
17701         (mono_runtime_invoke_array): new method - like
17702         mono_runtime_invoke, but you can pass an array of objects.
17703         (mono_remoting_invoke): new arch. independent impl.
17704         (mono_message_invoke): new arch. independent impl.
17705         (mono_runtime_class_init): new arch. independent impl.
17706         (mono_runtime_object_init): new arch. independent impl.
17707
17708 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17709
17710         * metadata.c, object.c, reflection.c: documented the exported
17711         functions.
17712
17713 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17714
17715         * icall.c: simpler code to pass the assembly builder data to corlib.
17716         Implement GetNestedTypes() internalcall.
17717
17718 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17719
17720         * class.c: warn if a type can't be loaded.
17721
17722 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
17723
17724         * image.h: typedef MonoImageOpenStatus
17725         * types.h: removed unused file
17726         
17727 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
17728
17729         * icall.c: Enum_ToObject accepts enum value arguments.
17730
17731 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17732
17733         * class.c: move initialization of properties, events and nested
17734         classes, so that they happen for interfaces, too.
17735
17736 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17737
17738         * icall.c: cleanup some ugly casts in Array_SetValue*.
17739
17740 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17741
17742         * icall.c: the values array fro enums is of the correct type, now.
17743         Implement (correctly) getFullName instead of assQualifiedName for
17744         MonoType.
17745         * reflection.h, reflection.c: added mono_type_get_name ().
17746
17747 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17748
17749         * assembly.c, image.h: for each MonoImage, record from wich assembly
17750         it was loaded.
17751         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17752         Make Type.Assembly work.
17753
17754 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
17755
17756         * debug-symfile.h: use char* instead of gpointer to avoid
17757         unnecessary casts.
17758
17759         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17760
17761         * icall.c (ves_icall_InternalExecute): impl. FielSetter
17762         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17763
17764 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
17765
17766         * icall.c (mono_message_init): impl. (code cleanup)
17767         (ves_icall_InternalExecute): impl. FieldGetter
17768
17769         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17770         defined we call all (non-static)methods through the vtable. 
17771
17772 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17773
17774         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17775         finalizer even though the memory is still referenced (and the chunk of
17776         memory is not freed).
17777
17778 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17779
17780         * assembly.c: fix brokeness.
17781
17782 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17783
17784         * class.c: kill some warnings. Check explicit interface method
17785         implementation also without considering the namespace.
17786         Load also literal strings in static class data.
17787
17788 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
17789
17790         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
17791         (default_assembly_name_resolver): Make the resolver take the
17792         "base" directory where the assembly was originally defined, so we
17793         can load DLLs that are in the same directory as the assembly that
17794         is being referenced.
17795
17796 2002-03-28  Dick Porter  <dick@ximian.com>
17797
17798         * file-io.h: 
17799         * file-io.c:
17800         * socket-io.c: 
17801         * unicode.h: 
17802         * unicode.c: Warning cleanups
17803
17804 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17805
17806         * object.h, reflection.h: use the correct type instead of MonoObject.
17807
17808 2002-03-28  Martin Baulig  <martin@gnome.org>
17809
17810         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17811         (mono_debug_update_symbol_file): Initialize classes if necessary.
17812
17813 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17814
17815         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17816         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17817
17818 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17819
17820         * assembly.h: fix function prototype.
17821         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17822         * mono-endian.h: use const cast.
17823
17824 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17825
17826         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17827
17828 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17829
17830         * loader.c: don't assert when a typeref can't be loaded, give
17831         a chance to the runtime to trow an exception instead.
17832         * loader.h: fix warning.
17833
17834 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17835
17836         * class.c (mono_class_proxy_vtable): added proxy support
17837
17838 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
17839
17840         * icall.c: removed last of PAL calls, added System.Environment
17841         * file-io.h, file-io.c: MonoIO implementation
17842         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17843
17844 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17845
17846         * appdomain.c: do not use the byte marker in ldstr table lookup.
17847         * debug-helpers.c: allow two ':' to separate class and method name.
17848         * object.c: allocate arrays bounds with the GC, too.
17849         * verify: add a few more checks.
17850
17851 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17852
17853         * reflection.c: output also literal strings. Allocate parameter data
17854         with GC_malloc() (thanks, Martin, for catching this!).
17855
17856 2002-03-26  Martin Baulig  <martin@gnome.org>
17857
17858         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17859         include the `this' offset in the `param_offsets'.
17860
17861 2002-03-25  Martin Baulig  <martin@gnome.org>
17862
17863         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17864         mono_debug_get_class() function to get the classes. Added new
17865         relocation types for arrays and strings.
17866         (mono_debug_get_class): New static function to search in all
17867         referenced assemblies for a metadata token.
17868
17869         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17870
17871 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17872
17873         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17874         hold gc-allocated objects. Make the string heap a stream like the
17875         others. Removed duplicated code when writing stream info.
17876         Added asserts to catch possible buffer overflows. Set the sorted map
17877         for tables that need sorting. Added some documentation.
17878
17879 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17880
17881         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
17882         for interned strings and vtables.
17883
17884 2002-03-24  Martin Baulig  <martin@gnome.org>
17885
17886         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17887         it in the array since it was created with g_slist_prepend().
17888
17889 2002-03-24  Martin Baulig  <martin@gnome.org>
17890
17891         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17892         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17893         (mono_debug_method_from_token): Renamed to
17894         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17895         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17896
17897         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17898         relocation types.
17899
17900         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17901
17902 2002-03-24  Martin Baulig  <martin@gnome.org>
17903
17904         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17905         (mono_debug_method_from_token): New func.
17906
17907         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17908         New interncall, calls mono_debug_local_type_from_signature().
17909         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17910         calls mono_debug_method_from_token().
17911
17912 2002-03-23  Martin Baulig  <martin@gnome.org>
17913
17914         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17915         specifies the number of bytes to be converted, not the array size.
17916         Return the number of chars, not the number of bytes.
17917         (ves_icall_iconv_get_chars): The `byteCount' argument
17918         specifies the number of bytes to be converted, not the array size.
17919
17920 2002-03-23  Martin Baulig  <martin@gnome.org>
17921
17922         * reflection.h (MonoReflectionSigHelper): New type.
17923
17924         * reflection.c (mono_reflection_sighelper_get_signature_local),
17925         (mono_reflection_sighelper_get_signature_local): New functions.
17926
17927         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17928         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17929         interncalls.
17930
17931 2002-03-23  Martin Baulig  <martin@gnome.org>
17932
17933         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17934         is_writeable is set.
17935         (mono_raw_buffer_update): New function to write the modified map
17936         back to disk.
17937
17938         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17939
17940         * debug-symfile.c (mono_debug_update_symbol_file): Call
17941         mono_raw_buffer_update() when done writing.
17942
17943 2002-03-23  Martin Baulig  <martin@gnome.org>
17944
17945         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17946
17947         * debug-symfile.c: Added support for arguments and local variables.
17948
17949 2002-03-23  Dick Porter  <dick@ximian.com>
17950
17951         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17952         protected by ifdefs, hence breaking the w32 build.
17953
17954 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17955
17956         * object.c: implement is_interned() the right way.
17957
17958 2002-03-21  Martin Baulig  <martin@gnome.org>
17959
17960         * debug-symfile.[ch]: New files to handle debugging information
17961         files. There's also support to dynamically update these symbol
17962         files to include machine dependent information.
17963
17964 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
17965
17966         * threads.c (mono_thread_create): new function to create thread
17967         from C
17968
17969 2002-03-20  Martin Baulig  <martin@gnome.org>
17970
17971         * icall.c (ves_icall_InternalInvoke): Create a new object if the
17972         method is a constructor.
17973         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17974         points to ves_icall_InternalInvoke().
17975
17976 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
17977
17978         * file-io.c: Flush shouldn't throw exceptions.
17979
17980 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
17981
17982         * file-io.c: FileStream flush support; FileSetLength now
17983         restores file pointer.
17984
17985 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17986
17987         * class.c: set image for pointer classes.
17988
17989 2002/03/19  Nick Drochak <ndrochak@gol.com>
17990
17991         * sysmath.c: Forgot one.
17992
17993 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
17994
17995         * sysmath.c: Avoid redefining existing names.
17996
17997 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
17998
17999         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18000         handled by runtime as icall rather than dllimport from libm.so
18001         * file-io.c, file-io.h: fixed handle argument type.
18002
18003 2002-03-18  Dick Porter  <dick@ximian.com>
18004
18005         * reflection.c (mono_image_get_type_info): rename interface to
18006         iface, because of "#define interface struct" on windows.
18007
18008 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18009
18010         * class.c, class.h: rename and export mono_ptr_class_get().
18011         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18012         * reflection.c, reflection.h, icall.c: better/saner type name
18013         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18014         method signatures.
18015
18016 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
18017
18018         * class.c (mono_class_init): removed hardcoded GHC_SLOT
18019
18020         * icall.c (ves_icall_InternalInvoke): impl.
18021
18022 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18023
18024         * reflection.c: output the interface map table, too.
18025
18026 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18027
18028         * class.c (class_compute_field_layout): separate computation of 
18029         static field layout
18030
18031 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
18032
18033         * icall.c: added System.Buffer support.
18034         * file-io.c: moved file icalls from PAL to FileStream.
18035
18036 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18037
18038         * icall.c (ves_icall_System_Object_GetHashCode): impl.
18039
18040 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
18041
18042         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18043
18044 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18045
18046         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18047
18048 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18049
18050         * debug-helpers.{c,h}: moved here from monograph some useful functions
18051         to locate a method by name/signature in a class or image. Included
18052         also a small and flexible IL disassembler.
18053
18054 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18055
18056         * reflection.c: fixup tokens in methods with small header size, too.
18057
18058 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
18059
18060         * object.c (mono_string_to_utf8): remove assert(!error), instead
18061         print a warning. 
18062
18063 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18064
18065         * icall.c: update to the new mono_Array_class_get interface.
18066
18067 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18068
18069         * appdomain.c, object.c: Boehm-GC enable.
18070         * icall.c: make get_data_chunk() support split data requests.
18071         Ensure a class is initialized in more cases. Return only the first
18072         property found in GetProperties() or the compiler gets confused. 
18073         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18074         * reflection.h, reflection.c: add fixup mechanism for field and method
18075         tokens. Initialize assembly->typeref in a single place. Output
18076         properties after events. Support custom attributes for events, too.
18077         Typo fix for paramter custom attrs.
18078
18079 2002-03-07  Martin Baulig  <martin@gnome.org>
18080
18081         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18082
18083 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
18084
18085         * class.c (mono_array_class_get): fix. for multi. dim. arrays
18086
18087 2002-03-06  Martin Baulig  <martin@gnome.org>
18088
18089         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18090         non-zero lower bounds. See testcases #F10-#F13.
18091
18092 2002-03-05  Martin Baulig  <martin@gnome.org>
18093
18094         * exception.c (mono_get_exception_argument_out_of_range): New exception.
18095
18096         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18097         ves_icall_System_Array_GetValue(), only calculate the absolute array position
18098         here.
18099         (ves_icall_System_Array_SetValue): Likewise.
18100         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18101         as argument and does the actual work. This function is used when copying a
18102         multi-dimensional array.
18103         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18104         now do all the widening conversions of value types.
18105         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18106
18107 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18108
18109         * class.c: remove some magic numbers and use the smbolic names,
18110         instead. Added init_events() to load event info at class init time.
18111         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18112         and mono_metadata_methods_from_event().
18113         * reflection.h, reflection.c: added support for writing out the evnets
18114         related information.
18115
18116 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18117
18118         * reflection.h, icall.c: use a different method (GetInterfaces)
18119         to gather interface info and add isbyref, isprimitive and
18120         ispointer to the ves_icall_get_type_info() return value.
18121
18122 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18123
18124         * class.h: stared adding support for events.
18125         * icall.c: split find_members implementation. Added debug icall to get
18126         the address of an object.
18127         * reflection.c: handle TypeBuilders in mono_type_get_object().
18128
18129 2002-03-01  Martin Baulig  <martin@gnome.org>
18130
18131         * icall.c (ves_icall_System_Array_GetLength): This must throw an
18132         ArgumentOutOfRangeException(), not an ArgumentException().
18133         (ves_icall_System_Array_GetLowerBound): Likewise.
18134         (ves_icall_System_Array_GetValue): Improved argument checking.
18135         (ves_icall_System_Array_SetValue): Improved argument checking.
18136
18137 2002-03-01  Martin Baulig  <martin@gnome.org>
18138
18139         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18140         called with invalid arguments rather than just dying with g_assert().
18141         (ves_icall_System_Array_SetValue): Likewise.
18142         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18143         raise a NotImplementedException instead.
18144         (ves_icall_System_Array_GetLength): Added argument checking.
18145         (ves_icall_System_Array_GetLowerBound): Added argument checking.
18146
18147 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
18148
18149         * object.h (mono_assert): new macros mono_assert and
18150         mono_assert_not_reached
18151
18152 2002-02-28  Martin Baulig  <martin@gnome.org>
18153
18154         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18155         and "System::String::IsInterned" to "System::String::_IsInterned".
18156
18157 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18158
18159         * icall.c: remove hacks for typebuilder. Added icall to create a
18160         modified type from a tybebuilder.
18161         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18162         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18163         to create a backing MonoClass for a TypeBuilder.
18164
18165 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18166
18167         * class.c, class.h: more refactoring of class init.
18168         Export mono_class_setup_mono_type() and mono_class_setup_parent().
18169
18170 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18171
18172         * marshal.c, marshal.h: start of marshaling interface.
18173
18174 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18175
18176         * icall.c: fix order in assembly qualified name icall.
18177
18178 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18179
18180         * class.c: do not free str, since we store it in the hash table.
18181         * reflection.h: add label field to MonoILExceptionInfo.
18182         * reflection.c: handle references to more than one assembly. Handle
18183         case when there isn't a module created in the assembly.
18184
18185 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18186
18187         * class.c: Fix typo. Start refactoring of class init code.
18188
18189 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18190
18191         * appdomain.c: exit with 1 on error.
18192         * class.c: we already have the name in MonoClassField.
18193         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18194         MonoStreamHeader instead of an offset of image->raw_metadata.
18195
18196 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
18197
18198         * appdomain.c (mono_init): Be even more descriptive about the error.
18199
18200 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18201
18202         * appdomain.c: give the user an informative message when corlib can't
18203         be loaded.
18204
18205 2002-02-26  Martin Baulig  <martin@gnome.org>
18206
18207         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18208         New icall to get the time zone data.
18209
18210 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18211
18212         * reflection.c: set virtual and raw size of section correctly.
18213         * threads.c: transfer domain information to newly created threads.
18214
18215 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18216
18217         * class.c: when instancing a class in a domain, load the default
18218         vaules for static fields from the constant table. Fix System.Enum to
18219         not be an enum.
18220         * icall.c: implement Object::GetType() internalcall. Implemented
18221         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18222         Fixed checking of binding flags in find_members().
18223         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18224         * reflection.c: handle enumerations when writing to the constant
18225         table. Use a different object cache for types.
18226
18227
18228 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
18229
18230         * object.c (mono_object_isinst): fix for arrays
18231
18232         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18233
18234 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18235
18236         * object.c: don't use mprotect ()  and fix intern pool hash table
18237         lookup for big endian systems.
18238
18239 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18240
18241         * icall.c: change type_is_subtype_of () signature.
18242
18243 2002-02-21  Mark Crichton  <crichton@gimp.org>
18244
18245         * rand.c, rand.h: Added random number generator for
18246         System.Security.Cryptography classes.
18247
18248         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18249
18250         * icall.c: Added System.Security.Cryptography calls.
18251
18252 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18253
18254         * class.c, icall.c, metadata.c: better support for pointer types.
18255         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18256         * reflection.c: Add support for getting custom attrs for properties
18257         and simplify some code.
18258
18259 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18260
18261         * icall.c: change getToken () and add custom attribute GetBlob()helper
18262         method.
18263         * reflection.h: add custom attrs array to the reflection builder structures.
18264         * reflection.c: encode and emit custom attributes for all the relevant
18265         reflection objects. Cache fieldref and methodref tokens. Change
18266         mono_image_create_token() interface to take a MonoDynamicAssembly.
18267         More complete custom attributes decoder. Load custom attributes for
18268         Assembly, Field, Method and Constructor objects, too. Make the
18269         returned array an Attribute[] one, not object[]. Added
18270         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18271         custom attribute constructor.
18272
18273 2002-02-20  Dick Porter  <dick@ximian.com>
18274
18275         * icall.c:
18276         * rawbuffer.c:
18277         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18278         problem code out for now).
18279
18280 2002-02-19  Radek Doulik  <rodo@ximian.com>
18281
18282         * object.c (mono_ldstr): use hash table to avoid multiple swapping
18283
18284 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18285
18286         * icall.c: register the GetCustomAttributes method.
18287         * object.c, object.h: add mono_string_new_len ().
18288         * reflection.h, reflection.c: added mono_runtime_invoke(),
18289         mono_install_runtime_invoke(). Added
18290         mono_reflection_get_custom_attrs () to load custom attributes and
18291         create the attribute objects.
18292
18293 2002-02-19  Dick Porter  <dick@ximian.com>
18294         * threads-dummy-types.c:
18295         * threads-dummy-types.h:
18296         * threads-dummy.c:
18297         * threads-dummy.h:
18298         * threads-pthread-types.c:
18299         * threads-pthread-types.h:
18300         * threads-pthread.c:
18301         * threads-pthread.h:  Deleted obsolete files
18302
18303 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
18304
18305         * class.c (mono_class_vtable): runtime init the class when we
18306         allocate static class data.
18307
18308         * icall.c (ves_icall_System_Array_SetValue): check for null values.
18309
18310         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18311         and String - but we will need generic marshalling support in the
18312         future. 
18313         (mono_init): set the domain name in a ms compatible way
18314
18315         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18316         String[].
18317
18318 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
18319
18320         * object.c (mono_array_clone): use alloca() instead of g_malloc  
18321         for sizes
18322
18323         * appdomain.c (mono_domain_unload): impl.
18324
18325 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18326
18327         * appdomain.c, object.c: fix intern pool implementation.
18328         * class.c: fix alignment code.
18329
18330 2002-02-16  Radek Doulik  <rodo@ximian.com>
18331
18332         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18333         and s2 > s1, just copy lower bytes to be compatible with little
18334         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18335         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18336
18337         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18338         force big_endian to be 1 for big endian machines 
18339         (ves_icall_iconv_new_decoder): ditto
18340
18341 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
18342
18343         * socket-io.c (convert_sockopt_level_and_name): If the system
18344         doesn't define SOL_IP or SOL_TCP, get them by hand using
18345         getprotobyname() and caching the values (because this could be a
18346         slow operation).
18347         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18348         Use the appropriate struct when the system does support it. Ie,
18349         not all systems have struct ip_mreqn so use struct ip_mreq when
18350         appropriate.
18351
18352 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18353
18354         * reflection.c: handle finally clauses.
18355
18356 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18357
18358         * socket-io.c: use g_snprintf() instead of snprintf.
18359
18360 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18361
18362         * reflection.c (mono_param_get_objects): Cast second argument to
18363         mono_method_get_param_names to a const char** to silence the
18364         compiler warning.
18365
18366         * appdomain.c (mono_domain_assembly_open): Put parens around the
18367         truth statement in the for-loop.
18368
18369         * unicode.c (iconv_convert): Got rid of a compiler warning about
18370         int i being unused when the system has a new iconv.
18371         (iconv_get_length): Same.
18372
18373         * image.c (load_class_names): Cast the second argument to
18374         g_hash_table_insert() to char* to hush compiler warnings about the
18375         arg being a const.
18376         (mono_image_open): Same here.
18377
18378         * socket-io.c: Don't conditionally include sys/filio.h or
18379         sys/sockio.h here anymore since we now get them from
18380         io-layer/io-layer.h
18381         (inet_pton): If the system doesn't support inet_aton, implement
18382         using inet_addr and also #define INADDR_NONE if it isn't defined
18383         by the system.
18384
18385 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18386
18387         * metadata.c, metadata.h: added function to get packing and size info
18388         of a typedef.
18389         * reflection.h, reflection.c: handle field RVA data. Save info about
18390         the table layout if needed. Assign typedef indexes to all the types
18391         before dumping the info about them to avoid forward reference problems.
18392
18393 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
18394
18395         * socket-io.c (convert_sockopt_level_and_name): ifdef
18396         SO_ACCEPTCONN because it is not defined on my system (old debian)
18397
18398 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18399
18400         * opcode.c: use stddef.h to get NULL.
18401
18402 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18403
18404         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18405         for FIONBIO, FIONREAD and SIOCATMARK.
18406         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18407         define INADDR_NONE and besides, inet_addr() is deprecated and
18408         should not be used. Use inet_pton() instead - it also has the
18409         added bonus that it can easily handle IPv6 addresses as well.
18410         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18411
18412 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18413
18414         * decimal.c: remove _MSC_VER conditional.
18415
18416 2002-02-13  Dick Porter  <dick@ximian.com>
18417
18418         * socket-io.c: 
18419         * icall.c: Internal calls for Blocking, Select, Shutdown,
18420         GetSocketOption and SetSocketOption
18421
18422 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18423
18424         * assembly.cs: better resolver: use it instead of some kludgy
18425         code.
18426
18427 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18428
18429         * reflection.c: the best way to speed-up the compiler is to avoid
18430         infinite loops.
18431
18432 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
18433
18434         * class.c (mono_class_vtable): changed the object layout
18435         (obj->vtable->class). 
18436         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18437
18438 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18439
18440         * assembly.c: look for assemblies in the assembly dir, too.
18441
18442 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18443
18444         * class.c: fix thinko in mono_class_from_type().
18445
18446 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18447
18448         * exception.h, exception.c: added TypeLoadException.
18449         * object.h, object.c: added mono_array_clone ().
18450         * icall.c: handle throwOnError in AssemblyGetType().
18451         Added Array.Clone().
18452         * opcode.h, opcode.c: use a single value for the opcode val.
18453         Compile fix for non-gcc compilers.
18454
18455 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18456
18457         * opcodes.c, opcodes.h: export interesting info about opcodes.
18458
18459 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
18460
18461         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18462         icalls. 
18463
18464         * class.c (class_compute_field_layout): set element_class for enums
18465         (mono_class_create_from_typedef): set element_class for normal classes
18466
18467         * icall.c (ves_icall_System_Enum_get_value): impl.
18468
18469         * class.c (mono_class_create_from_typedef): do not set valuetype
18470         flag for System.ValueType and System.Enum
18471
18472 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
18473
18474         * unicode.c (iconv_convert): fix big endian problem.
18475
18476 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18477
18478         * class.c: add asserts if we are ever going to scribble over memory.
18479         * socket-io.c: not all systems have AF_IRDA defined.
18480
18481 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
18482
18483         * class.c (class_compute_field_layout): do not consider static
18484         fields to compute alignment
18485
18486 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
18487
18488         * appdomain.c (mono_appdomain_get): impl.
18489         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18490
18491 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18492
18493         * icall.c: ignore "file://" prefix when loading an assembly.
18494
18495 2002-01-23  Dick Porter  <dick@ximian.com>
18496
18497         * socket-io.c:
18498         * icall.c:
18499         * Makefile.am: Added socket support
18500
18501 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18502
18503         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18504         code back.  This should return the assemblies that are loaded by
18505         the runtime on behalf of an application domain. 
18506
18507         The current implementation is still broken, it just returns every
18508         assembly loaded, but until we get real applications domain this
18509         will do.
18510
18511 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
18512
18513         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18514         AppDomain object.
18515
18516 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18517
18518         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18519         the mono_class_from_name lookup.
18520         (ves_icall_get_parameter_info): ditto.
18521         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18522         method.
18523         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18524
18525 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18526
18527         * class.c: load also nested classes on class init.
18528         System.ValueType instance methods gets passed boxed
18529         values, unless methods in derived classed that get a pointer to the
18530         data.
18531         * icall.c: use better name parsing code in GetType().
18532         * image.c, image.h: add mono_image_loaded ().
18533         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18534         * reflection.c, reflection.h: added mono_reflection_parse_type().
18535
18536 2002-01-22  Veronica De Santis <veron78@interfree.it>
18537
18538         * icall.c : Added mapping of internal calls for Manual and Auto reset events
18539         * threads.c : Added the implementation of internal calls for events
18540         * threads.h : Added prototypes of internal calls for events
18541         
18542 2002-01-21  Radek Doulik  <rodo@ximian.com>
18543
18544         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18545
18546 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
18547
18548         * class.c (mono_class_init): set min_align to 1 (instead of 0)
18549         (mono_class_value_size): use min_align
18550
18551 2002-01-20  Dick Porter  <dick@ximian.com>
18552
18553         * threads.h:
18554         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18555         so it compiles on w32.
18556
18557 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
18558
18559         * metadata.c (mono_type_stack_size): impl.
18560
18561         * class.c (mono_class_get_field): impl. memberref token
18562
18563 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18564
18565         * icall.h : Added the internal calls mapping for CreateMutex_internal
18566                     and ReleaseMutex_internal.
18567         * threads.h : Added the prototype of mutexes internal calls.
18568         * threads.c : Added the implementations of mutexes internal calls.
18569
18570 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18571
18572         * metaparse.h: removed unused file.
18573         * reflection.c, reflection.h: added stream_data_align () function 
18574         to align data in streams and keep stream aligned. Add support for
18575         exception support in method headers.
18576
18577 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18578
18579         * unicode.c: make iconv_convert () return the number of bytess written
18580         in the output buffer.
18581
18582 2002-01-15  Dick Porter  <dick@ximian.com>
18583         * threads.c: Make the runtime's idea of infinite timeouts coincide
18584         with the class library's
18585
18586         Fix a particularly egregious bug in mono_thread_cleanup(). That
18587         code was so utterly bogus it must have been written on a Monday.
18588
18589 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18590
18591         * reflection.h: add subtypes field to TypeBuilder.
18592         * reflection.c: encode constants for literal fields.
18593         Handle subtypes. Fix user string token (and add a zero byte)
18594         at the end.
18595         
18596 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
18597
18598         * class.c (mono_class_init): bug fix: assign slot numbers for
18599         abstract methods.
18600
18601 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18602
18603         * reflection.c: don't try to output a code RVA for abstract methods.
18604         Small fixes for method header format. Output parameter info to the
18605         ParamDef table. Save method overriding info to MethodImpl table.
18606         Fix property support. Allow typedef.extends to be a type in the
18607         building assembly.
18608         * verify.c: fix off-by-one error.
18609
18610 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18611
18612         * class.c: fix mono_class_from_mono_type () for szarray types.
18613         Remove unused cache check in mono_class_from_type_spec().
18614         * icall.c: *type_from_name () functions handle simple arrays and byref.
18615         * reflection.c: handle byref and szarray types. Handle methods without
18616         body (gets P/Invoke compilation working). Handle types and fields in
18617         get_token ().
18618         * reflection.h: add rank to MonoTypeInfo.
18619
18620 2002-01-10  Dick Porter  <dick@ximian.com>
18621
18622         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18623         internal calls
18624
18625 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18626
18627         * icall.c: initialize class in type_from_handle ().
18628         Loop also in parent classes for get_method ().
18629         * reflection.c: properly encode class and valuetype types.
18630         Start on encoding TypeBuilder types. Handle fieldrefs.
18631         Use correct length when registering a user string.
18632         Handle ConstructorBuilder and MonoMethod in get_token ().
18633         Make mono_type_get_object () aware of cached types.
18634         * object.c: back out change to mono_string_new ().
18635
18636 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18637         * object.c: mono_string_new should return a NULL when the string 
18638         passed in is NULL -- not try to deference it.
18639         
18640 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18641
18642         * icall.c: hack to make IsSubType work for TypeBuilders.
18643         * reflection.c: emit constructors before methods.
18644         Retrieve param names in mono_param_get_objects().
18645
18646 2002/01/05  Nick Drochak  <ndrochak@gol.com>
18647
18648         * Makefile.am: fix list of headers and sources so automake 1.5
18649         doesn't complain. Removed \# at end of list.
18650
18651 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18652
18653         * reflection.c: get token for a method ref. Set return type of
18654         constructor to void.
18655         * loader.c: debug message.
18656         * class.c: typo fix.
18657
18658 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18659
18660         * icall.c: fix array init with rank > 1. FindMembers
18661         loops in parent class as well.
18662         * image.c: do not insert nested types in name cache.
18663         * reflection.c: warning fix.
18664         * reflection.h: add override method (for interface impl).
18665
18666 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18667
18668         * metadata.c: fix customattr decoding.
18669
18670 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
18671
18672         * rawbuffer.cs: Added native Win32 implementation, avoids using
18673         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18674
18675 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18676
18677         * class.c: make the low-level routines handle the cache.
18678
18679 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18680
18681         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18682
18683 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18684
18685         * class.c: fix mono_array_element_size() for objects.
18686         * class.h, class.c: add properties to MonoClass and load them
18687         at init time.
18688         * icall.c: check with isinst() when assigning a value to an array
18689         instead of requiring the classes to match exactly.
18690         Implemented icall for System.Type::GetType().
18691         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18692         enums. Handle bindingflags when looking for methods and fields.
18693         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18694         and mono_metadata_methods_from_property().
18695         * reflection.h, reflection.c: added structures for propreties,
18696         parameters and enums. Implemented mono_property_get_object() and
18697         mono_param_get_objects().
18698
18699 2001-12-18  Dick Porter  <dick@ximian.com>
18700
18701         * file-io.c: Use mono_string_to_utf16() instead of
18702         mono_string_chars()
18703
18704         * object.c: Added mono_string_to_utf16(), which copies the non
18705         NULL-terminated MonoString into a new double-null-terminated
18706         buffer.
18707
18708 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
18709
18710         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18711
18712 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
18713
18714         * file-io.c: raise exceptions if handle is invalid.
18715
18716 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18717
18718         * assembly.c: yet another check for mscorlib.
18719         * class.c, class.h: load nesting info for classes.
18720         * icall.c: many new functions to support the Reflection classes.
18721         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18722         * reflection.h, reflection.c: mono_image_create_token(),
18723         mono_assembly_get_object(), mono_type_get_object(),
18724         mono_method_get_object(), mono_field_get_object(): methods to return
18725         objects that parallel the C representation of assemblies, types,
18726         methods, fields.
18727
18728 2001-12-11  Dick Porter  <dick@ximian.com>
18729
18730         * icall.c:
18731         * file-io.c: Internal calls for file IO.
18732
18733 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18734
18735         * tabledefs.h: missing FileAttributes.
18736         * verify.h, verify.c: use is_valid_string () to simplify and check for
18737         valid strings more correctly. Fix warnings and speeling.
18738         Check more tables: Filed, File, ModuleRef, StandAloneSig.
18739         Check code: branches, maxstack, method calls.
18740
18741 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
18742
18743         * object.c (mono_object_allocate): removed static, so that the jit
18744         can allocate value types.
18745
18746         * icall.c (ves_icall_System_DateTime_GetNow): impl.
18747
18748 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18749
18750         * class.c: init enum types right away and register the
18751         token->MonoClass map in mono_class_create_from_typedef ().
18752         * verify.h, verify.c: first cut of the verifier.
18753         * pedump.c: add --verify switch to verify metadata tables.
18754         * tabledefs.h: add some missing enums.
18755
18756 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
18757
18758         * class.c (mono_install_runtime_class_init): impl.
18759         (mono_class_init): renamed mono_class_metadata_init to
18760         mono_class_init, also removed the metadata_inited flag
18761
18762         * object.c (mono_object_isinst): use faster algorithm
18763
18764 2001-11-30  Radek Doulik  <rodo@ximian.com>
18765
18766         * mono-endian.h: reverted last change
18767         added function prototypes
18768
18769         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18770         add mono-endian.c back
18771
18772         * mono-endian.c: returned back, as Paolo pointed out, it's needed
18773         for unaligned access, I've mistaked it with endianess. I am
18774         sorry.
18775         (mono_read16): fix reverted endianess
18776         (mono_read64): ditto
18777         (mono_read32): ditto
18778
18779 2001-11-30  Dick Porter  <dick@ximian.com>
18780
18781         * exception.c: Implement mono_exception_from_name()
18782
18783 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18784
18785         * metadata.h, metadata.c: remove params_size and locals_size and their
18786         calculation from the metadata code: they are only usefult to the
18787         interp.
18788
18789 2001-11-29  Radek Doulik  <rodo@ximian.com>
18790
18791         * object.c (mono_ldstr): swap bytes here, it's probably not the
18792         best place, but works for me now, I'll redo it once I know mono
18793         better, also note that I add PROT_WRITE and don't reset back, also
18794         note that it's only affects big endians, so x86 should be OK
18795
18796         * mono-endian.h (read16): use just glib macros for both endians
18797
18798         * mono-endian.c: removed as glib macros are used in in
18799         mono-endian.h so we don't need to care about endianess for read
18800         macros as glib does that for us already
18801
18802 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18803
18804         * class.h, class.h: take minimum alignment into consideration so
18805         that the fields of a class remain aligned also when in an array.
18806
18807 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18808
18809         * loader.h, loader.c: add mono_method_get_param_names().
18810         * class.c: 0-init class fields.
18811
18812 2001-11-26  Dick Porter  <dick@ximian.com>
18813
18814         * icall.c:
18815         * threads-types.h:
18816         * threads.c: New file that handles System.Threading on all platforms
18817
18818         * object.c: 
18819         * object.h: Remove the synchronisation struct from MonoObject,
18820         replace it with a pointer that gets initialised on demand
18821
18822         * Makefile.am: Replace all the system-specific threading code with
18823         a single file that uses the new wrapper library
18824
18825 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18826
18827         * class.c, class.h: add mono_install_trampoline() so that the runtime
18828         can register a function to create a trampoline: removes the ugly
18829         requirement that a runtime needed to export arch_create_jit_trampoline.
18830         * object.h, object.c: added mono_install_handler() so that the runtime
18831         can install an handler for exceptions generated in C code (with
18832         mono_raise_exception()). Added C struct for System.Delegate.
18833         * pedump.c: removed arch_create_jit_trampoline.
18834         * reflection.c: some cleanups to allow registering user strings and
18835         later getting a token for methodrefs and fieldrefs before the assembly
18836         is built.
18837         * row-indexes.h: updates and fixes from the new ECMA specs.
18838
18839 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18840
18841         * class.h, class.c: add enum_basetype field to MonoClass.
18842         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18843         to get index in the constant table reated to a field, param or
18844         property.
18845         * reflection.h, reflection.c: handle constructors. Set public-key and
18846         version number of the built assembly to 0.
18847         * row-indexes.h: update from new ECMA spec.
18848
18849 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18850
18851         * class.h, class.c: add a max_interface_id to MonoClass.
18852         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18853         since it's used to do that. Added mono_type_type_from_obj().
18854         Make GetType() return NULL instead of segfaulting if the type was not
18855         found. Handle simple arrays in assQualifiedName.
18856         * object.h: add a struct to represent an Exception.
18857         * reflection.c: output call convention in method signature.
18858         Add code to support P/Invoke methods and fixed offsets for fields.
18859
18860 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18861
18862         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18863         the value.
18864         * icall.c: use mono_array_addr instead of array->vector: fixes the
18865         reflection image writing.
18866         * reflection.c: init call convention byte to 0 in method signature.
18867         Encode the property signature. Don't output property-related methods
18868         twice. Really process the properties for a type (don't cast a field to
18869         a property, my mom always told me that).
18870         Fix 64 bit issues in pointer alignment in a different and more
18871         readable way.
18872
18873 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
18874
18875         * loader.h: Removed type class from MonoDefaults, added monotype
18876
18877         * loader.c: Loaded MonoType, removed loading of Type
18878
18879         * icall.c (my_mono_new_object): Now returns a System.MonoType,
18880         and fills in System.Type._impl with a RuntimeTypeHandle rather
18881         than the actual MonoClass *
18882
18883         (ves_icall_type_from_handle): change from type_class to
18884         monotype_class
18885
18886         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18887         implemented
18888
18889         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18890         implemented
18891
18892         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18893
18894         (ves_icall_System_Reflection_Assembly_GetType): implemented
18895
18896         (ves_icall_System_MonoType_assQualifiedName): implemented
18897
18898         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18899
18900 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
18901
18902         * assembly.c (mono_assembly_open): Implement a cache for the
18903         assemblies. 
18904
18905         (mono_assembly_close): only destroy the assembly when the last
18906         reference is gone.
18907         
18908 2001-11-09  Dick Porter  <dick@ximian.com>
18909
18910         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18911
18912 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
18913
18914         * class.c (mono_class_metadata_init): bug fix: compute the right slot
18915
18916 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18917
18918         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18919         from Martin Weindel.
18920         * object.h: add mono_string_chars ().
18921
18922 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
18923
18924         * reflection.c (build_compressed_metadata): Eliminates warnings
18925         and uses 64-bit clean code.
18926
18927         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18928         (mono_type_equal): Change signature to eliminate warnings.
18929
18930 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18931
18932         * icall.c, loader.c: remove the internalcall array constructors.
18933         Changes to match the new MonoArray structure.
18934         * object.h, object.c: an array object doesn't allocate an extra
18935         vector. Add mono_array_new_full () to create jagged arrays easily.
18936
18937 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18938
18939         * metadata.h, metadata.c: add mono_metadata_field_info () to
18940         retreive all the info about a field from vairous tables.
18941         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18942         * class.h, class.c: augment MonoClassField with more info.
18943         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18944         policy and load a field's RVA if needed.
18945
18946 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
18947
18948         * class.c (mono_class_metadata_init): create a trampoline for all
18949         virtual functions instead of actually compiling them.
18950
18951 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18952
18953         * class.h, class.c: include name in MonoClassField.
18954         * class.c: fix fundamental type of System.Object and System.String.
18955         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18956         tokens in ldtoken.
18957         * icall.c: remove internalcalls for the Reflection stuff that is now
18958         done in C# code.
18959         * loader.c: mono_field_from_memberref () implementation.
18960         * mono-endian.c: thinko (s/struct/union/g).
18961         * object.c, object.h: make the mono_string_* prototypes actually use
18962         MonoString instead of MonoObject.
18963         * reflection.c, reflection.h: updates for changes in the reflection
18964         code in corlib: we use C structures that map to the actual C# classes.
18965         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18966         fat method header if needed and use the info from the ILGenerator for
18967         methods. Handle fields in types. Misc fixes.
18968
18969 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
18970
18971         * class.c (mono_class_metadata_init): bug fix: always allocate
18972         space for static class data
18973
18974 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
18975
18976         * class.c (mono_compute_relative_numbering): use relative
18977         numbering to support fast runtime type checks.
18978
18979 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
18980
18981         * class.c (mono_class_create_from_typeref): added debugging output
18982         to print class name when MonoDummy is returned instead of real class
18983
18984 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
18985
18986         * class.c (mono_class_metadata_init): interface offset table now
18987         contains pointers into the vtable - this is more efficient for the jit
18988
18989 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
18990
18991         * class.c (mono_class_metadata_init): use a temporary vtable (the
18992         old algorithm only worked for the interpreter, but not for the jit)
18993
18994 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
18995
18996         * loader.c (method_from_memberref): use mono_class_get to get the
18997         class of an array instead of using System.Array directly.
18998         (mono_get_method): also add MEMBERREF methods to the method cache
18999         which usefull for arrays.
19000
19001 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
19002
19003         * pedump.c (arch_compile_method): added to compute vtable entry
19004
19005         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19006         number of interfaces.
19007         
19008         * class.h: merged MonoArrayClass into MonoClass
19009
19010         * class.c (mono_class_create_from_typedef): compute the vtable size and
19011         allocate space to include the vtable inside MonoClass
19012         (mono_class_metadata_init): initialize the vtable
19013
19014 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19015
19016         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19017         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19018         * image.c: endian fixes by Laurent Rioux.
19019         * object.h, object.c: rename MonoStringObject to MonoString and
19020         MonoArrayObject to MonoArray. Change some function names to conform to
19021         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19022         guint16* as first argument, so don't use char*.
19023         Provide macros to do the interesting things on arrays in a portable way.
19024         * threads-pthread.c: updates for the API changes and #include <sched.h>
19025         (required for sched_yield()).
19026         * icall.c: updates for the API changes above.
19027         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19028         platforms that need them.
19029
19030 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19031
19032         * class.c: set the correct type for all the fundamental
19033         type when loading the class.
19034
19035 2001-10-05  Dick Porter  <dick@ximian.com>
19036
19037         * threads-pthread.c (pthread_mutex_timedlock): Simple
19038         compatibility version for C libraries that lack this call.
19039
19040 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19041
19042         * class.c: MonoTypes stored in MonoClass are stored as
19043         fundamental MonoTypes when the class represents a
19044         fundamental type (System.Int32, ...).
19045         The TypeHandle return by ldtoken is a MonoType*.
19046         * icall.c: ves_icall_get_data_chunk () write out all the
19047         PE/COFF stuff. Implement ves_icall_define_method (),
19048         ves_icall_set_method_body (), ves_icall_type_from_handle ().
19049         * image.c: properly skip unknown streams.
19050         * loader.h, loader.c: add type_class to mono_defaults.
19051         * metadata.c, metadata.h: export compute_size () as
19052         mono_metadata_compute_size () with a better interface.
19053         Typo and C&P fixes.
19054         * pedump.c: don't try to print the entry point RVA if there is no entry point.
19055         * reflection.c, reflection.h: many cleanups, fixes, output method
19056         signatures and headers, typedef and typeref info, compress the metadata
19057         tables, output all the heap streams, cli header etc.
19058         * row-indexes.h: typo fixes.
19059
19060 2001-10-04  Dick Porter  <dick@ximian.com>
19061
19062         * object.h: Add a synchronisation mutex struct to MonoObject
19063
19064         * object.c (mono_new_object): Initialise the object
19065         synchronisation mutexes
19066
19067         * icall.c: System.Threading.Monitor internal calls
19068         
19069         * threads-pthread.h:
19070         * threads-pthread.c: System.Threading.Monitor internal calls
19071
19072         * threads-types.h: New file, includes the system-specific thread
19073         structures
19074         
19075         * threads-pthread-types.h:
19076         * threads-pthread-types.c: New files, handle pthread-specific
19077         synchronisation types
19078
19079         * threads-dummy-types.h: 
19080         * threads-dummy-types.c: New files of dummy support for
19081         thread-specific types
19082
19083         * metadata.c:
19084         * image.c:
19085         * pedump.c: include mono-endian.h not endian.h
19086         
19087         * Makefile.am: More threads files.
19088         Name mono-endian.h not endian.h
19089
19090 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19091
19092         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
19093         stuff and implement a few more bits.
19094         * icall.c: a field needs to be dereferenced twice. Do not use the same
19095         name for two variables in the same scope.
19096         * image.c, image.h: cleanups.
19097
19098 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
19099
19100         * class.c (mono_class_metadata_init): bug fix: compute the right size
19101
19102 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19103
19104         * icall.c: implemented some of the Reflection internalcalls.
19105         * image.c, image.h: start writing out the PE/COFF image.
19106         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19107         that does the reverse than decode_blob_size ().
19108         * object.c: use mono_metadata_encode_value (). Move here
19109         temporary implementation of mono_string_to_utf8 ().
19110         * rawbuffer.c: make malloc_map static.
19111
19112 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19113
19114         * metadata.c: fix type comparison for arrays.
19115         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19116         Added a couple of new classes to monodefaults.
19117         * icall.c: added a couple of Reflection-related internalcalls.
19118         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19119         Added a byval_arg MonoType to MonoClass.
19120
19121 2001-09-28  Dick Porter  <dick@ximian.com>
19122
19123         * icall.c:
19124         * threads-pthread.h: 
19125         * threads-pthread.c: Implemented internal calls for
19126         LocalDataStoreSlot operations.  Applied mutexes around all shared
19127         data.  Reworked the thread creation and Start() operations to
19128         avoid a race condition.
19129         
19130         * threads-dummy.h:
19131         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19132
19133 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19134
19135         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19136
19137 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19138
19139         * class.c, loader.c: warn and return NULL instead of erroring out.
19140         * icall.c: added System.AppDomain::getCurDomain().
19141         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19142
19143 2001-09-25  Dick Porter  <dick@ximian.com>
19144
19145         * threads-pthread.h:
19146         * threads-pthread.c: Implemented timed thread joining and added
19147         System.Threading.Thread::Join_internal internal call
19148
19149         * icall.c: Added System.Threading.Thread::Join_internal internal call
19150
19151         * threads-dummy.h:
19152         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19153
19154 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19155
19156         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19157         mono_string_intern () to implement the semantics of the ldstr opcode
19158         and the interning of System.Strings.
19159         * icall.c: provide hooks to make String::IsIntern and String::Intern
19160         internalcalls.
19161
19162 2001-09-23  Dick Porter  <dick@ximian.com>
19163
19164         * threads-dummy.c: 
19165         * threads-dummy.h: New files of dummy threading routines
19166
19167         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19168         support code based on system specifics
19169
19170         Rename PTHREAD_LIBS to THREAD_LIBS
19171         
19172 2001-09-23  Dick Porter  <dick@ximian.com>
19173
19174         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19175         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19176         internal calls.
19177         (mono_thread_init): Set up a Thread object instance to return when
19178         the main thread calls Thread.CurrentThread
19179         (mono_thread_cleanup): Wait for all subthreads to exit
19180
19181         * icall.c: New internal calls for System.Threading.Thread::Sleep
19182         (including Schedule) and CurrentThread
19183
19184         * threads.h: New file, to insulate thread-specific stuff from the
19185         rest of the code
19186
19187 2001-09-21  Dick Porter  <dick@ximian.com>
19188
19189         * threads-pthread.h: 
19190         * threads-pthread.c: New file, for handling pthreads-style
19191         threading support.  Start() now starts a new thread and executes
19192         the ThreadStart delegate instance.
19193
19194         * icall.c: Added the internalcall for
19195         System.Threading.Thread::Start_internal
19196
19197         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19198
19199 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19200
19201         * loader.c: work around the different signatures for delegates
19202         constructors csc generates in compiled code vs the ones compiled in mscorlib.
19203
19204 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19205
19206         * class.h, class.c: add mono_class_get_field_from_name ().
19207         * *: Fix C comments and other ANSI C issues.
19208
19209 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19210
19211         * endian.h, assembly.c: fix some endianness issues.
19212
19213 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19214
19215         * loader.h, load.c: add delegate_class to mono_defaults.
19216         Handle runtime provided methods in mono_get_method ().
19217
19218 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
19219
19220         * loader.c (mono_get_method): use pinvoke for internal call
19221
19222         * icall.c: use pinvoke for internal call
19223
19224         * loader.c (method_from_memberref): set the method name
19225
19226 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19227
19228         * metadata.c: help the compiler generate better code for
19229         mono_class_from_mono_type ().
19230
19231 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
19232
19233         * class.c (mono_class_metadata_init): delayed computing of the
19234         class size to mono_class_metadata_init ()
19235
19236 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19237
19238         * class.c, class.h: add an interfaces member to MonoClass.
19239         * image.c, image.h: add assembly_name field to MonoImage
19240         from the assembly table.
19241         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19242
19243 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19244
19245         * class.c: Handle Array in mono_class_from_mono_type ().
19246         * metadata.c, pedump.c: some endian fixes.
19247
19248 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19249
19250         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19251         * metadata.c: fix small problem introduced with the latest commit.
19252
19253 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19254
19255         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19256         We don't need a MonoMetadata pointer anymore to compare signatures in
19257         mono_metadata_signature_equal (), update callers.
19258         Reduced memory usage an number of allocations for MonoMethodHeader and
19259         MonoMethodSignature.
19260
19261 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19262
19263         * metadata.c: added compare for szarray.
19264
19265 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19266
19267         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19268         and add a couple more types to it and mono_defaults. Give an hint on
19269         classes that need implementing in our corlib and are referenced
19270         in mscorlib.
19271
19272 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19273
19274         * class.h, class.c: keep track if a class is also an Enum.
19275         * loader.c: Implement a couple more types for use in libffi
19276         marshalling. Gives better diagnostics when failing to dlopen
19277         a library. Set method->klass for P/Invoke methods, too.
19278
19279 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19280
19281         * class.c, class.h: add a MonoType this_arg to MonoClass that
19282         represents a pointer to an object of the class' type that
19283         can be used by the interpreter and later the type cache.
19284         Add best guess alignment info for valuetype objects.
19285
19286 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19287
19288         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19289         into MonoType: one less level of indirection and allocation and
19290         simplifies quite a bit of code. Added cache for MonoTypes that are
19291         used frequently, so that we don't need to allocate them all the time.
19292
19293 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
19294
19295         * class.c (mono_class_create_from_typedef): System.Enum is also a
19296         value type, although it does not derive from System.ValueType
19297         (maybe a bug in the ms compiler?)
19298
19299         * metadata.c (mono_type_size): return the right size for value types
19300
19301         * loader.c (mono_get_method): only initialize method header if not abstract
19302
19303         * class.c (mono_class_from_mono_type): use mono_default values. 
19304
19305 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
19306
19307         * *: use MonoClass pointers instead of <type_tokens>
19308         
19309         * class.h: new flag: metadata_inited.
19310
19311         * class.c (mono_class_metadata_init): impl.
19312         (mono_class_instance_size): impl.
19313         (mono_class_data_size): impl.
19314
19315 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19316
19317         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19318         MonoClass now has the name and name_space fields. 
19319         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19320         mono_get_method () takes and optional MonoClass as argument.
19321         Removed mono_typedef_from_name() and added mono_class_token_from_name()
19322         instead that takes advantage of a map from class names to typedef
19323         tokens in MonoImage.
19324
19325 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19326
19327         * metadata.c: zero is not a valid alignment boundary.
19328         Merge MONO_TYPE_VOID in default decoding code.
19329
19330 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
19331
19332         * image.h: merged MonoMetadata into MonoImage
19333
19334         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19335         identify the type of elements.
19336
19337 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19338
19339         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19340         * cil-coff.h: split MonoMSDOSHeader and add size info.
19341         * image.c: add some consistency checks.
19342         * metadata.c: fix row size computation: one programmer
19343         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19344         add explanation for the locator routine.
19345         Fix decoding of size in method header.
19346         
19347 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
19348
19349         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
19350         (g_concat_dir_and_file): Bring g_concat_dir_and_file
19351         function from gnome-libs.  This uses the right path separator
19352         based on the OS, and also works around a bug in some systems where
19353         a double slash is not allowed. 
19354         (default_assembly_name_resolver): Use g_concat_dir_and_file
19355         (mono_assembly_open): ditto.
19356
19357 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
19358
19359         * metadata.c (mono_metadata_signature_equal): impl.
19360
19361         * *: void is now a realy MonoType (instead of using NULL)
19362         
19363         * metadata.c (do_mono_metadata_parse_type): use
19364         mono_metadata_parse_type to parse void value.
19365
19366 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19367
19368         * metadata.c, metadata.h: in the signature and method header store
19369         only the space required for holding the loca vars and incoming arguments.
19370
19371 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
19372
19373         * metadata.c (do_mono_metadata_parse_type): treat void like any
19374         other type (instead of assigning NULL);
19375
19376 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
19377
19378         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19379
19380 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
19381
19382         * image.c (do_mono_image_open): added a cache for arrays.
19383
19384 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19385
19386         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19387         decode a single column from a row in a metadata table and changes
19388         to take advantage of it in the typedef locator (gives a nice speed up).
19389         Store offset info for function params.
19390
19391 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
19392
19393         * image.h (MONO_IMAGE_IS_CORLIB): removed 
19394
19395 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19396
19397         * assembly.c: how could mono_assembly_close () had ever worked?
19398         * metadata.c, metadata.h: provide offset info for local vars.
19399         Implement mono_type_size () to take care of alignment as well
19400         as size (it was mono_field_type_size in cli/class.c before).
19401
19402 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
19403
19404         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19405
19406         * assembly.h (CORLIB_NAME): set to corlib.dll
19407
19408         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19409
19410 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19411
19412         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19413         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19414         tokentype.h: massive namespace cleanup.
19415
19416 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19417
19418         * metadata.h, metadata.c: decode exception clauses when parsing method header.
19419
19420 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
19421
19422         * metadata.c (mono_metadata_free_type): added check for type !=
19423         NULL (void) before calling mono_metadata_free_type()
19424
19425 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19426
19427         * metadata.h, row_indexes.h: added header with enumerations to use
19428         to index in the columns from tables in metadata and to decode coded
19429         tokens: we should start using this instead of embedding magic numbers
19430         all over the code.
19431
19432 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19433
19434         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19435         Move metadata_t info from cli_image_info_t to MonoImage, where
19436         it's easily accessible. Changed all the uses accordingly.
19437         Added the method and class caches to MonoImage.
19438         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19439         and mono_metadata_decode_value () signature to be more consistent
19440         with the other parse functions (and simplify code). Taken advantage
19441         of zero-length array allocation with GCC. Removed reduntant (and
19442         wrong) MonoFieldType struct and use MonoParam instead. Changed
19443         mono_metadata_parse_field_type () to use common code for parsing.
19444         Added mono_metadata_typedef_from_field () and
19445         mono_metadata_typedef_from_method () to lookup a typedef index from a
19446         field or method token.
19447         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19448
19449 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
19450
19451         * metadata.c (mono_metadata_parse_field_type): Implement. 
19452         (do_mono_metadata_parse_type): Split engine from
19453         mono_metadata_parse_type, so that we can create smaller structures
19454         for things that just have one pointer to the MonoType (look at
19455         the MonoFieldType)
19456
19457 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
19458
19459         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19460         as Jan Gray found out, it is incorrect. 
19461
19462 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
19463
19464         * assembly.c: Implement asssembly loading.  This loads an image
19465         and loads all the referenced assemblies.  Come to think of it, we
19466         could always do lazy loading of the assemblies. 
19467
19468         * image.c (mono_image_open): Keep loaded images in a hashtable.
19469
19470         * image.h (MonoImage): Add reference count.
19471
19472 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
19473
19474         * assembly.c (mono_assembly_open): Keep track of the file name in
19475         case the assembly has no ASSEMBLY table.
19476
19477         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
19478         from get.c here.
19479
19480 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19481
19482         * metadata.c, metadata.h: decode local vars in method header
19483         parse function. Change callers accordingly.
19484
19485 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19486
19487         * metadata.h, cil-coff.h: protect against multiple inclusion.
19488         Added some new structures to hold information decoded from metadata:
19489         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19490         and relevant decoding/free functions.
19491         * metadata.c: implement decoding functions. Add warning for out of bounds
19492         index in mono_metadata_locate(). Implement mono_get_method () to retreive
19493         all the info about a method signature and invocation. Remove check on
19494         uninitialized local var in parse_mh() and fix memory leak.
19495
19496 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
19497
19498         * metadata.h: More macros.
19499
19500         * tokentype.h: New file.
19501
19502 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19503
19504         * assembly.c: added a consistency check and initialize
19505         some structures with g_new0().
19506         * metadata.c: fixed a couple more bugs in table size computation
19507         and add other checks for out-of bound access to metadata.
19508
19509 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19510
19511         * metatada.c: fix bugs computing table sizes. Spew a
19512         warning when index in string heap is out of bounds.
19513
19514 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
19515
19516         * metadata.h: Add a couple of macros to manipulate tokens. 
19517
19518 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19519
19520         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19521         cli_section_tables).
19522
19523 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
19524
19525         * metadata.c (mono_metadata_user_string): New function, provides
19526         access to the UserString heap. 
19527
19528 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
19529
19530         * metadata.c: Add inline documentation.
19531
19532 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
19533
19534         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19535         files. 
19536
19537 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
19538
19539         * typeattr.h: New file, TypeAttribute flags. 
19540
19541 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
19542
19543         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19544         mono_assembly_ensure_section): Section loading code.
19545         (load_section_tables): Load the sections.
19546
19547         * mono/metadata/metadata.c (mono_metadata_locate_token,
19548         mono_metadata_locate): Functions to locate the information
19549         definition given a token or a table and an index.
19550         (mono_metadata_compute_table_bases): New.
19551         (compute_size): New function to compute the sizes of the various
19552         tables.
19553
19554         * mono/metadata/metadata.h: Finish listing the different index
19555         types. 
19556
19557         * mono/metadata/pedump.c: Improve to dump new information.
19558
19559 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
19560
19561         * mono/metadata/metadata.c: Entered all the tables matching
19562         Beta2. 
19563
19564         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
19565
19566
19567