Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1
2 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
3
4         * icall.c: use the defining class vtable when accessing a
5         static field, not a pobblibly derived class.
6
7 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
8
9         * icall.c string-icalls.c: Remove references to unicode.h.
10
11         * unicode.h unicode.c Makefile.am: Remove these unused source files.
12
13         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
14
15         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
16         indicating the image where custom marshaller types should be looked up.
17         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
18         custom marshallers, instead of corlib. Fixes #79425.
19
20 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
21
22         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
23
24 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
25
26         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
27         Implement Environment.ProcessorCount.
28         
29         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
30         Implement Environment.ProcessorCount.
31         
32         * icall.c: 
33         Add Environment.ProcessorCount icall.
34         
35         Patch by Jason McFall.
36
37 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
38
39         * assembly.c: don't append .exe/.dll when the filename already contains
40         one of those extensions.
41
42 2006-09-12  Martin Baulig  <martin@ximian.com>
43
44         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
45         to array interfaces.
46
47 2006-09-11  Martin Baulig  <martin@ximian.com>
48
49         * reflection.c (mono_image_build_metadata): Create the
50         MethodImpl's after emitting all types and methods, so we don't
51         need another fixup pass for them.
52
53 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
54
55         * class.c (mono_class_from_name_case): Fix regression introduced by the last
56         change.
57
58 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
59
60         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
61         unload.
62
63 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
64
65         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
66         args is not set. Fixes #78926.
67
68 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
69
70         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
71
72         * image.c (load_class_names): Move this to class.c, and rename it to 
73         'mono_image_init_name_cache'.
74         (load_modules): Fix a warning.
75
76         * class.c icall.c image.c: Initialize image->name_cache lazily.
77
78         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
79         on its name using information in the AOT file.
80
81         * class.c (mono_class_from_name): Use the new hook function.
82
83 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
84
85         * reflection.c (mono_param_get_objects): Handle enum default parameter values
86         correctly.
87
88         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
89         Fixes #79289.
90         
91 2006-09-06  Martin Baulig  <martin@ximian.com>
92
93         * icall.c (mono_lookup_internal_call): Small fix.
94
95 2006-09-05  Raja R Harinath  <rharinath@novell.com>
96
97         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
98         double g_free.
99
100 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
101
102         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
103         when --debug is specified.
104
105 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
106
107         * class.c (setup_generic_array_ifaces): Fix a warning.
108
109 2006-09-04  Miguel de Icaza  <miguel@novell.com>
110
111         * Temporarily remove the patch to assemly.c that checks the
112         assembly versions as it breaks our gacutil.
113
114 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
115
116         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
117
118         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
119         a net 1.0 runtime.
120
121         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
122         created using the default ctor. Fixes #79152.
123         (mono_string_builder_to_utf16): Ditto.
124
125 2006-09-01  Martin Baulig  <martin@ximian.com>
126
127         Fix handling of the generic array interfaces.
128
129         * class-internals.h
130         (MonoDefaults): Removed `generic_array_class' and added
131         `generic_ilist' class.
132
133         * class.c
134         (mono_bounded_array_class_get): Add the new generic array interfaces.
135         (setup_generic_array_ifaces): New static method; create vtable
136         entries for each method in the generic array interfaces.
137
138         * metadata.c
139         (select_container): Allow "parent-less" generic methods.
140
141         * marshal.c
142         (mono_marshal_get_generic_array_helper): New public method.
143
144         * icall.c
145         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
146         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
147         moved the interncall into System.Array.
148
149 2006-09-01  Raja R Harinath  <rharinath@novell.com>
150
151         A few more cases of avoiding work on types with ->byref set.
152         Has the real fix for #79238
153         * icall.c (is_generic_parameter): New helper.
154         (ves_icall_Type_GetGenericParameterPosition): Use it.
155         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
156         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
157         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
158         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
159         reference types.
160         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
161         reference types.
162         (ves_icall_Type_get_IsGenericInstance): Likewise.
163         (ves_icall_Type_get_IsGenericType): Likewise.
164
165 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
166
167         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
168         class if possible.
169
170         * mempool.h (mono_mempool_get_allocated): New helper function.
171
172         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
173         change.
174
175         * mempool.c: Fix warnings and the calculation of stats.
176
177         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
178
179         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
180
181         * loader.c (mono_get_method_from_token): Update method_count stat.
182
183         * class-internals.h (MonoStats): Add some stats.
184
185 2006-08-31 Robert Jordan  <robertj@gmx.net>
186
187         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
188         with managed variants.
189         All code is contributed under the MIT/X11 license.
190         
191 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
192
193         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
194         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
195
196         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
197
198         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
199         with cycles in classes.
200
201         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
202
203         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
204         missing a [MarshalAs] directive. Fixes #79203.
205
206         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
207         klass->marshal_info. Fixes #79217.
208
209 2006-08-30  Martin Baulig  <martin@ximian.com>
210
211         Committing a patch from Joachim Ante <joe@otee.dk>:
212         Add support for binary data symbol stores.
213
214         * debug-mono-symfile.c
215         (mono_debug_open_mono_symbol_file): Renamed into
216         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
217         arguments.
218
219         * mono-debug.c
220         (mono_debug_open_image): Added `raw_contents' and `size' args.
221         (mono_debug_init_2_memory): New public function.
222
223 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
224
225         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
226
227 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
228
229         * appdomain.c: implement support for ShadowCopyFiles.
230
231 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
232
233         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
234         when value is NULL (and should remove CID #51).
235
236 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
237
238         * image.c: moved 2 functions to ../utils.
239
240 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
241
242         * gc.c: cope with the target object of a GC handle being NULL
243         (bug #78877).
244
245 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
246
247         * class.c: recursively check parent's explicit implementations
248         of interface methods (fixes bug #79125).
249
250 2006-08-19  Miguel de Icaza  <miguel@novell.com>
251
252         * filewatcher.c: Avoid warnings when building, do not redefine
253         constants that are defined.
254
255         Remove warnings.
256
257 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
258
259         * image.c: don't fail when the link points to an absolute path.
260
261 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
262
263         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
264         Fix CID #3.
265
266 2006-08-17  Miguel de Icaza  <miguel@novell.com>
267
268         * image.c (full_path): A new method used to obtain the actual path
269         of an assembly even in the presence of symbolic links.  
270
271         This is necessary for the case where we are running a binary that
272         has been GACed, but we are using the "published" path name
273         ($prefix/mono/1.0/blah.exe) which happens to point to the real
274         file in the GAC.
275
276         This was the source of the failure for the `xsp' command with the
277         recent AppDomain changes, as far as the runtime was concerned,
278         there were two different assemblies: $prefix/mono/1.0/blah.exe and
279         $prefix/mono/gac/blah/version/blah.exe.
280
281         (do_mono_image_open): use full path
282
283 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
284
285         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
286
287 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
288
289         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
290         domain_id is supplied. Fix CID #241 and corlib's unit tests.
291
292 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
293
294         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
295         small structures. Fixes #78990.
296
297 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
298
299         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
300
301         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
302
303 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
304
305         * appdomain.c:
306         * marshal.c: don't load all the assemblies from a domain into newly
307         created ones. The new domains might have different rules and load
308         assemblies from different locations. Fixes bug #76757.
309
310         Patch by Lluis. Conflicts resolved by Brian Crowell.
311
312 2006-08-16  Alp Toker  <alp@atoker.com>
313
314         * socket-io.c: First half of the fix for #79084.
315         Set sa_size to the length of the content, not that of the struct.
316         Don't add NULL suffix to the content, this should be done in
317         managed code if needed.
318
319 2006-08-14  Raja R Harinath  <rharinath@novell.com>
320
321         Fix part of #79012
322         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
323         mono_metadata_parse_type returns NULL.
324
325 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
326
327         * normalization-tables.h : new file for string normalization data.
328         * locales.c, locales.h, icall.c :
329           added load_normalization_resource() for string normalization,
330           and icall as well.
331         * Makefile.am : added normalization-tables.h to the sources.
332
333 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
334
335         * marshal.c: Add more helper functions to reduce code duplication and use them
336         everywhere.
337
338 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
339
340         * marshal.c: Fix non-x86 stdcall warnings.
341         
342         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
343         them everywhere.
344
345 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
346
347         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
348         type check on multi-dimensional arrays. Fixes #79000.
349
350 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
351
352         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
353         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
354         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
355         * class-internals.h: add is_com_object to class structure.
356         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
357         null checks to COM object marshalling. Fix .ctor call on RCW.
358         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
359         
360         All code is contributed under the MIT/X11 license.
361
362 2006-08-09  Dick Porter  <dick@ximian.com>
363
364         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
365         racing mono_monitor_allocator_lock() somewhere, so don't delete
366         the critical section for now.  Found by running and exiting
367         monodevelop.
368
369 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
370
371         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
372         (ves_icall_System_ComObject_FindInterface): Ditto.
373         (ves_icall_System_ComObject_CacheInterface): Ditto.
374
375         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
376         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
377
378 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
379
380         * threadpool.c: treat pipes from process asynchronous reads as sockets
381         when reading from them, so we get select/poll or epoll to wait for
382         data.
383
384 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
385
386         * loader.c: Fix a typo (CID #233) in the null check.
387
388 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
389
390         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
391         Hopefully fixes #78949.
392         
393         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
394         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
395         bytes. Fixes #78972.
396
397 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
398
399         * filewatcher.c: we need to set errno here.
400
401 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
402
403         * filewatcher.c: let Win32Exception get the error value.
404
405 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
406
407         * filewatcher.c: translate errno into win32 errors for Win32Exception
408         to know what happened.
409
410 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
411
412         * threadpool.c: Fix more warnings.
413
414         * assembly.c (search_loaded): Fix warnings.
415
416         * threadpool.c (mono_thread_pool_finish): Fix warnings.
417         (mono_async_invoke): Ditto.
418
419 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
420
421         * object.c (mono_remote_class_vtable): Need to create proxy vtable
422         entries for __ComObject type in addition to ComImport types.
423         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
424         about hash table.
425         
426         All code is contributed under the MIT/X11 license.
427
428 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
429
430         * image.c: avoid tentative loading of modulerefs that contain
431         no metadata (P/Invoke library names).
432
433 2006-07-28  Dick Porter  <dick@ximian.com>
434
435         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
436         mono_loader_lock() somewhere, so don't delete the critical section
437         for now.  Found by running and exiting monodevelop.
438
439 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
440
441         * filewatcher.c: define the inotify syscalls when we're building on
442         linux and have sys/syscall.h. The build system might not have support
443         for inotify but the target system might have it.
444
445 2006-07-26  Miguel de Icaza  <miguel@novell.com>
446
447         * domain.c: Documentation updates.
448
449         * loader.c (mono_free_method): Do not release the method
450         information if we are being profiled, as profilers will use this
451         information at shut down to present some data to the user.
452
453         This is needed so that the profiler does not crash, as the
454         profiler tends to keep MonoMethods around, and they might become
455         invalid if we free these.
456
457         (mono_get_method_constrained): Return the original CIL stream
458         method as well, so verification can be performed against it.
459
460 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
461
462         * filewatcher.[ch]: support for inotify file system watcher.
463         * icall.c: add new internal calls for the inotify file system watcher.
464
465 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
466
467         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
468         #78888.
469
470 2006-07-20  Dick Porter  <dick@ximian.com>
471
472         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
473         warning.
474
475 2006-07-20  Dick Porter  <dick@ximian.com>
476
477         * threads.c (start_wrapper): Do the thread cleanup while we still
478         hold a reference to its object.  Fixes bug 78123.
479
480 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
481
482         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
483         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
484           "managed-to-managed".
485         * icall.c: Redirect string constructors that take sbyte* to
486           ves_icall_System_String_ctor_RedirectToCreateString.
487         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
488           to CreateString () methods with matching signature.
489         * reflection.c: Use original security informations for
490           MONO_WRAPPER_MANAGED_TO_MANAGED.
491         * security-manager.c: Use original security informations for
492           MONO_WRAPPER_MANAGED_TO_MANAGED.
493         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
494           that is a placeholder and only its address should be used.
495         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
496           that is a placeholder and only its address should be used.
497
498 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
499
500         Begin implementing COM Interop.
501         * appdomain.c: Increment corlib version.
502         * class.c: Set ComImport classes' parent to __ComObject.
503         * loader.c: Mark cominterop methods as such.
504         * domain.c: Add __ComObject class to MonoDefaults structure.
505         * image.c: Add 2 hashtables to the image for COM Interop related methods
506         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
507         using the mempool allocator
508         
509         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
510         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
511         declaration for mono_metadata_type_dup_mp.
512         
513         * debug-helpers.c: Added strings for two additional wrapper types
514         * object.c: Create proxy objects for ComImport classes
515         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
516         and added __ComObject class to MonoDefaults structure.
517         
518         * object-internals.h: Finish MonoRealProxy definition, and add definition of
519         MonoComInteropProxy and MonoComObject.
520         
521         * marshal.c: Added support for COM Interop
522         (signature_cominterop): Converts managed signature to corresponding
523         unmanaged COM signature.
524         (cominterop_get_function_pointer): gets unmanaged function pointer via
525         COM object vtable
526         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
527         (cominterop_get_method_interface): returns interface type that method is defined on
528         (mono_mb_emit_cominterop_call): emits native call to function pointer
529         gotten from vtable
530         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
531         that matches signature of unmanaged function.
532         (cominterop_get_native_wrapper): wrapper around adjusted method call.
533         (cominterop_get_invoke): forwards call from proxy to __ComObject
534         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
535         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
536         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
537         
538         * marshal.h: Added Marshal icall declarations.
539         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
540         so we can access them in finalizer
541         
542 2006-07-14  Dick Porter  <dick@ximian.com>
543
544         * object.c (mono_type_initialization_cleanup): Fix a race
545         condition by temporarily commenting out the critical section
546         deletion.
547
548 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
549
550         * reflection.c (create_custom_attr): Fix some warnings.
551         (create_custom_attr_data): Ditto.
552         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
553         types. Fixes #78855.
554
555 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
556
557         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
558
559         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
560
561 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
562
563         * reflection.c (resolve_object): Add support for DynamicMethod.
564
565         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
566         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
567
568 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
569
570         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
571         don't leak GPtrArray's pdata has we have no use (nor free) for it.
572
573 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
574
575         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
576         Fixes #77888.
577
578 2006-06-30  Raja R Harinath  <rharinath@novell.com>
579
580         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
581         slightly: remove a shadow local variable.
582
583 2006-06-29  Raja R Harinath  <rharinath@novell.com>
584
585         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
586         definition that introduces the virtual function slot.
587         Also fix Coverity #105.
588
589 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
590
591         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
592         for dynamic assemblies. Fixes #78724.
593
594 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
595
596         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
597         Fixes #78722.
598
599 2006-06-21  Martin Baulig  <martin@ximian.com>
600
601         * reflection.c
602         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
603         fixes #76484.
604
605 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
606
607         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
608
609 2006-06-20  Raja R Harinath  <rharinath@novell.com>
610
611         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
612         nor TYPEREFs.
613         * class.c (mono_class_create_from_typespec): Add 'context' argument.
614         Inflate result if necessary.
615         (mono_class_get_full): Remove old version.  Rename from
616         'mono_class_get' and add 'context' argument.  Pass it to
617         ..._create_from_typespec.
618         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
619         (mono_ldtoken): Revert change below.
620
621 2006-06-20  Martin Baulig  <martin@ximian.com>
622
623         * class.c (mono_ldtoken): Don't pass the generic context to
624         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
625
626 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
627
628         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
629         and later freeing it. Fixes #78638.
630
631 2006-06-15  Miguel de Icaza  <miguel@novell.com>
632
633         * icall.c (mono_class_get_throw): Revert over-zealous error
634         throwing, the caller for mono_class_get_throw will cope with
635         errors when classes are not properly initialized already.
636
637         The code still copes with loader exceptions though.
638
639         Fixes the regression in reftype1 and reftype3 from the CAS tests.
640         
641 2006-06-14  Miguel de Icaza  <miguel@novell.com>
642
643         Fixes the `make run1' version of RuntimeAbort (to be commited,
644         source is in Bugzilla).
645         
646         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
647         FALSE on class loading failure instead of returning true.
648
649         * class.c (mono_class_create_from_typedef): It is possible for
650         mono_metadata_interfaces_from_typedef_full to fail if a class is
651         not found, cope with this.
652         
653
654 2006-06-14  Dick Porter  <dick@ximian.com>
655
656         * socket-io.c: 
657         * process.c: Fix a bunch of signed/unsigned warnings from gcc
658         4.1.1
659
660 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
661
662         * culture-info-table.h : oops, forgot to make it nsync with r61548.
663
664 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
665
666         * icall.c: Another fix for building mono in Visual Studio.
667
668 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
669
670         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
671         
672 2006-06-09  Martin Baulig  <martin@ximian.com>
673
674         * debug-mono-symfile.c: Put this back and really fix it this
675         time. Sorry for all the trouble.
676
677 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
678
679         * icall.c (mono_class_get_throw): Fix a warning.
680         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
681         ReflectionTypeLoadException if needed. Fixes #78606.
682
683         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
684         (mono_class_init): Ditto.
685
686         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
687         ref_only exceptions.
688         (mono_loader_clear_error): Make this work even if there is no error.
689
690 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
691
692         * object-internals.h marshal.c marshal.h icall.c: Implement method 
693         Marshal.GetComSlotForMethodInfo using internal call.
694
695 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
696
697         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
698         a function for signalling it.
699
700         * class.c (mono_class_from_typeref): Use the new kind of loader error when
701         a referenced assembly is not found.
702
703         * loader.c (mono_loader_error_prepare_exception): Add support for 
704         LOADER_ERROR_ASSEMBLY. Fix formatting.
705
706 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
707
708         * domain.c appdomain.c class-internals.h marshal.c: Add support 
709         for VARIANT marshalling on windows and increment corlib version
710         since Variant struct was added.
711
712 2006-06-03  Miguel de Icaza  <miguel@novell.com>
713
714         * debug-mono-symfile.c: Revert Martin's previous patch which broke
715         stack trace line information:
716
717         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
718         (Martin) when looking up B which is between A and C, return A not C.
719
720         Bug is #78573.
721
722         Thanks to Alexander Olk for tracking this down.
723
724 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
725
726         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
727         
728         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
729         avoid clobbering its value.
730         (mono_string_to_lpstr): Fix a warning on windows.
731
732 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
733
734         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
735
736         * reflection.c loader.c: Removed references to 'dummy' flag.
737
738         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
739
740         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
741         it gets GC tracking.
742
743         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
744         GC tracking.
745         
746         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
747
748         * marshal.c threadpool.c: Update callers of mono_async_result_new.
749
750         * appdomain.c: Bump corlib version.
751
752 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
753
754         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
755         CEE_STIND_REF when working with object references.
756
757 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
758
759         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
760         Fixes #78539.
761
762 2006-05-30  Miguel de Icaza  <miguel@novell.com>
763
764         * loader.c (method_from_memberref): Fix argument value for
765         mono_loader_set_error_method_load (I was passing the MonoClass
766         instead of the class name char *).
767
768 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
769
770         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
771         CEE_STIND_REF when working with object references.
772
773 2006-05-30  Martin Baulig  <martin@ximian.com>
774
775         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
776         mono_method_full_name() change and replace the ':' with a '.'
777         here.
778
779 2006-05-30  Martin Baulig  <martin@ximian.com>
780
781         * debug-mono-symfile.c
782         (mono_debug_symfile_lookup_location): Fix the algorithm:
783         when looking up B which is between A and C, return A not C.
784
785 2006-05-29  Martin Baulig  <martin@ximian.com>
786
787         * mono-debug.h
788         (MonoDebugMethodInfo): Make the typedef public.
789         (MonoDebugSourceLocation): New public struct.
790
791         * mono-debug.c
792         (mono_debug_source_location_from_address): Removed.
793         (mono_debug_source_location_from_il_offset): Removed.
794         (mono_debug_il_offset_from_address): Removed.
795         (mono_debug_address_from_il_offset): Removed.
796         (mono_debug_lookup_method): New public function.
797         (mono_debug_lookup_source_location): New public function; replaces
798         the old mono_debug_source_location_from_*() functions; see the
799         inline documentation.
800         (mono_debug_free_source_location): New public function.
801         (mono_debug_print_stack_frame): New public function; see the
802         inline documentation.
803
804         * debug-mono-symfile.c
805         (mono_debug_find_source_location): Renamed into
806         mono_debug_symfile_lookup_location(); only take a
807         `MonoDebugMethodInfo *' and an `offset' argument; added inline
808         documentation.
809         (mono_debug_find_method): Renamed into
810         mono_debug_symfile_lookup_method().
811
812 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
813
814         * assembly.c (mono_assembly_open_full): Dont overwrite the status
815         returned by mono_image_open_full ().
816
817         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
818         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
819         #78517.
820
821         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
822         #78518.
823
824 2006-05-27  Miguel de Icaza  <miguel@novell.com>
825
826         * class.c (mono_class_from_typeref): handle missing images
827         earlier, deals with bug #78418.   Refactor code; 
828
829         Fix a warning introduced in my previous commit (some stale code
830         from before I revisited my patch).
831
832         * class.c (mono_class_create_from_typedef): On failure, remove the
833         class from the MonoImage->class_cache as the class is not
834         initialized;   Fixes the leak pointed out by Paolo.
835
836 2006-05-25  Dick Porter  <dick@ximian.com>
837
838         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
839         DeleteCriticalSections until I figure out which one may still be
840         sometimes locked when mono_thread_cleanup is called.
841
842 2006-05-24  Dick Porter  <dick@ximian.com>
843
844         * threads.c (mono_thread_cleanup): Move the threading cleanup out
845         of mono_thread_manage and back into its own function, so it can be
846         called after the finalizer thread has finished.
847
848         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
849
850 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
851
852         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
853         Fixes #78495.
854
855         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
856         with non-blittable elements.
857         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
858
859 2006-05-24  Martin Baulig  <martin@ximian.com>
860
861         * mono-debug-debugger.h (MonoDebuggerEvent): Added
862         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
863
864         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
865         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
866         `mono_debugger_event_handler' to NULL.
867
868 2006-05-24  Martin Baulig  <martin@ximian.com>
869
870         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
871
872 2006-05-24  Martin Baulig  <martin@ximian.com>
873
874         * mono-debug-debugger.h
875         (mono_debugger_create_notification_function): Added
876         `MonoCodeManager *' argument.
877
878 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
879
880         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
881
882 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
883
884         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
885         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
886         implementation.
887
888 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
889
890         * icall.c: precise GC support: objects can't be stored in unmanaged
891         memory anymore, even if they are kept alive by other references: since
892         they can move the GC needs to be able to always find them.
893
894 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
895
896         * object.c: precise GC support for static fields. Support
897         for moving GCs: write barriers and pinned allocation for interned
898         strings.
899
900 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
901
902         * domain.c, domain-internals.h: precise GC support for the MonoDomain
903         structure.
904
905 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
906
907         * class.c, gc.c: sgen and precise GC updates.
908
909 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
910
911         * marshal.h, marshal.c: added write barrier wrapper and precise type
912         fixes.
913
914 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
915
916         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
917         support.
918
919 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
920
921         * reflection.c: precise and sgen GC updates.
922
923 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
924
925         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
926
927 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
928
929         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
930
931 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
932
933         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
934         MONO_TYPE_OBJECT. Fixes #78462.
935
936 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
937
938         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
939         and blittable types.
940
941 2006-05-17  Miguel de Icaza  <miguel@novell.com>
942
943         * class.c (mono_class_get_exception_for_failure): Implement parts
944         of a TODO: if the loader error is set (instead of the class
945         error), we return a Loader exception that can be properly thrown
946         elsewhere.
947
948         This was exposed by some Winforms 2.0 code that I tried to run
949         (Atsushi pointed me to it).
950
951 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
952
953         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
954         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
955         
956         * marshal.c (emit_marshal_vtype): Add limited support for 
957         UnmanagedType.LPStruct. Fixes #78427.
958
959         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
960         Applied a patch from kangaroo to fix #77523.
961
962 2006-05-17  Martin Baulig  <martin@ximian.com>
963
964         * threads.c
965         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
966         (debugger_thread_created): Removed.
967         (debugger_thread_exited): Removed.
968
969 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
970
971         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
972
973         * object-internals.h (MonoReflectionResource): Sync with managed version.
974
975 2006-05-12  Wade Berrier <wberrier@novell.com>
976
977         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
978
979 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
980
981         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
982         functions try to allocate from the image mempool.
983
984 2006-05-12  Dick Porter  <dick@ximian.com>
985
986         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
987
988 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
989
990         * object.c: The FieldGetter and FieldSetter methods require the full
991         name of the class, not only the name. Fixes bug #78277.
992
993 2006-05-11  Miguel de Icaza  <miguel@novell.com>
994
995         * loader.c (method_from_memberref): Do not pass the NULL klass to
996         mono_loader_set_error_() methods.  Pass the non-NULL value
997         (class). 
998
999 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
1000
1001         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
1002         (mono_assembly_close): Null out assembly->image->references after freeing it.
1003
1004         * image.c (mono_image_close): Free image->references.
1005         
1006         * reflection.c (mono_image_basic_init): Fix a small memory leak.
1007
1008 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
1009
1010         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
1011         before checking if it's NULL (g_assert).
1012
1013 2006-05-10  Martin Baulig  <martin@ximian.com>
1014
1015         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
1016         I thought I already killed that two months ago, but now it somehow reappeared.
1017
1018 2006-05-10  Martin Baulig  <martin@ximian.com>
1019
1020         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
1021
1022 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
1023
1024         * reflection.c: Allocate memory for dynamically created methods in the image
1025         mempools.
1026
1027 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
1028
1029         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
1030         don't use the ad pointer before checking if it's NULL (g_assert).
1031
1032 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
1033
1034         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
1035         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
1036
1037         * marshal.c: Allocate all signatures from mempools.
1038
1039         * marshal.c: Allocate some more signatures from mempools.
1040
1041 2006-05-09  Miguel de Icaza  <miguel@novell.com>
1042
1043         * object.c (mono_load_remote_field): The code used to provide a
1044         temporary variable for returning results if the user did not
1045         provide a result pointer.  But our temporary variable was allocted
1046         on the satck.
1047
1048         Fix calling code to always pass a result area.   Coverity ID 103.
1049
1050 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
1051
1052         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1053         value, not the old. Fixes #78312.
1054         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1055
1056         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
1057         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
1058         per-image cache.
1059
1060         * assembly.c (mono_assembly_close): Free image->references.
1061
1062         * assembly.c (mono_assembly_names_equal): Fix a warning.
1063         (mono_assemblies_cleanup): Cleanup more global data.
1064
1065         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1066
1067         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1068         ptr_cache and image->modules.
1069
1070         * image.c (mono_image_init): Allocate array_cache lazily.
1071         
1072 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1073
1074         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1075         behavior was changed recently and has bad side effects.
1076
1077 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
1078
1079         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1080         
1081         * assembly.c (mono_assembly_close): Remove a debug printf.
1082
1083         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1084
1085         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1086         to also allow for temporary references between mono_image_open ()/close ().
1087
1088         * domain.c (get_runtimes_from_exe): Add a FIXME.        
1089
1090 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
1091
1092         * marshal.c: Fix support for dynamic methods.
1093
1094         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1095
1096         * marshal.c (mono_marshal_cleanup): New cleanup function.
1097
1098         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
1099         image mempools.
1100
1101         * class.c (mono_class_init): Fix leaking class->nested_classes.
1102
1103         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1104
1105         * image.c (mono_image_init): Initialize the new cashes.
1106
1107         * image.c (mono_image_close): Destroy the new cashes.
1108
1109         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1110
1111         * mempool.c (mono_mempool_strdup): New helper function.
1112
1113         * class-internals.h: Add prototype for mono_loader_unlock ().
1114
1115         * domain.c (mono_jit_info_table_find): Fix a warning.
1116         (mono_debugger_check_runtime_version): Ditto.
1117
1118         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
1119         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1120         functions to these modules.
1121
1122         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1123         metadata modules.
1124         
1125         * marshal.c (mono_free_bstr): Fix a warning.
1126
1127         * assembly.c (mono_assembly_open_full): Fix another small leak.
1128
1129         * object.c: Fix some unload leaks in the remoting code.
1130
1131         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1132         function.
1133
1134         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1135
1136         * reflection.c: Fix some unload leaks in dynamic assemblies.
1137
1138 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
1139
1140         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1141         * marshal.h: Add BSTR support on Win32
1142         * icall.c: Add BSTR icalls
1143         * metadata.h: Add BSTR enums
1144
1145 2006-04-28  Miguel de Icaza  <miguel@novell.com>
1146
1147         Work to catch the crash from #76795 and turn it into an
1148         exception.   As I stubbed out pieces of the VisualBasic support,
1149         I found a number of places where the code was failing and I added
1150         checks to those places. 
1151         
1152         * metadata.c (do_mono_metadata_parse_generic_class): Make this
1153         function return a status code.  If we fail to parse the signature
1154         from mono_metadata_parse_generic_inst, return FALSE.
1155
1156         * loader.c (mono_get_method_from_token): If we fail to load the
1157         method (mono_class_get) return NULL.   
1158
1159         * (method_from_memberref): Return NULL if we are unable to parse
1160         the method signature
1161
1162         (mono_loader_error_prepare_exception): Since we now use the
1163         loader_error flag internally to stop processing, and obtaining
1164         exceptions that might be thrown will walk this code path the
1165         proper way of going from a MonoLoaderError into a
1166         MonoException was convoluted.   This new routine encapsulates the
1167         process of turning the error into an exception and *clearing* the
1168         error afterwards.
1169         
1170 2006-04-27  Miguel de Icaza  <miguel@novell.com>
1171
1172         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1173         with missing assemblies), and to cope with:
1174
1175                 * Missing fieldref from a non-existing assembly.
1176                 * Missing methodref from a non-existing assembly.
1177
1178         The first batch of work to address *some* of the issues from 76661.
1179         
1180         * object.c (mono_class_create_runtime_vtable): If we fail to
1181         initialize the class raise the exception here. 
1182
1183         * metadata.c (mono_class_get_overrides_full): If any methods fail
1184         to load return the failure to the caller.
1185
1186         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1187         flagging assemblies that failed to load.   
1188
1189         Do not crash if we are unable to load the assembly.
1190
1191         (mono_assembly_close): Do nothing with REFERENCE_MISSING
1192         assemblies. 
1193
1194         * loader.c (mono_loader_set_error_type_load): Change the
1195         convention to always pass unallocated strings, so we make our own
1196         copies (I know our own code had duplicated strings before, but
1197         this keeps the normal conventions).
1198         (method_from_memberref): Call mono_loader_set_error_method_load
1199         for all possible failures of loading the class. 
1200         Remove assert, turn into a loader error.
1201
1202         (mono_loader_error_to_exception): Move this routine from mini
1203         (mini_loader_error_to_exception) there was no need to have that in
1204         mini. 
1205
1206         * class.c (mono_class_from_typeref): If we were not able to load
1207         the assembly with mono_assembly_load_reference, call the
1208         mono_loader_set_error_type_load to register the problem.
1209
1210         (mono_class_setup_fields): If we fail to load the type from
1211         mono_metadata_parse_type_full, call mono_class_set_failure and
1212         break from the loop.
1213
1214         If class->exception_type is set, we do not layout the fields as
1215         that might crash the runtime, and instead return (from breaking
1216         from the previous loop).
1217
1218         (mono_class_setup_vtable): This now returns a boolean indicating
1219         whether the table was properly setup.   The decision is driven by
1220         mono_class_get_overrides_full which might run into non-existing
1221         methods. 
1222         
1223         (mono_class_init): Returns TRUE on success or FALSE if there was a
1224         problem in loading the type (incorrect assemblies, missing
1225         assemblies, methods, etc).
1226
1227         When we call mono_class_setup_fields we also check for a potential
1228         error inside this call (either a class exception or a general
1229         loader exception).
1230
1231         (mono_class_create_from_typedef): If the parent fails to load
1232         (calling mono_class_get_full) return NULL.
1233         
1234         ** Important **
1235
1236         calls to mono_metadata_parse_type_full should be checked
1237         everywhere and set the mono_class_set_failure
1238         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1239
1240         The current patch checks the places where my manually constructed
1241         tests show the errors are showing up, but we should do it
1242         everywhere. 
1243
1244         ** Important2 **
1245
1246         mono_class_init return values should be tested everywhere, like
1247         the previous case this is something that we should audit
1248         everywhere and not only on the cases exposed by the tests I
1249         created. 
1250
1251 2006-04-26  Miguel de Icaza  <miguel@novell.com>
1252
1253         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1254         boolean parameter and instead pass the information on `options'
1255         parameter (FileOptions).
1256
1257         * icall.c: Register the new signature for MonoIO.Open.
1258
1259         * debug-helpers.c (dis_one): Trying to understand how coverity
1260         works.  Fix Run 5, item 78.
1261
1262 2006-04-26  Dick Porter  <dick@ximian.com>
1263
1264         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1265         dereference.
1266
1267 2006-04-25  Martin Baulig  <martin@ximian.com>
1268
1269         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1270
1271         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1272         debugger_thread_created().
1273         (debugger_gc_push_all_stacks): Don't handle the main thread in any
1274         special way.
1275         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1276         (mono_debugger_finalize_threads): New function; undo the effects
1277         of mono_debugger_init_threads().
1278         (mono_debugger_create_all_threads): Removed.
1279
1280 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
1281
1282         * image.c (mono_image_close): Tidy up trace messages.
1283
1284         * assembly.c (mono_assembly_close): Ditto.
1285
1286         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1287         no longer references an already freed assembly. Fixes #78168.
1288
1289 2006-04-21  Dick Porter  <dick@ximian.com>
1290
1291         * threads.c (mono_thread_detach): Fix reference counting when
1292         detaching threads.
1293
1294 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
1295
1296         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1297         #78155.
1298
1299 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
1300
1301         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1302         (mono_type_to_stind): Ditto.
1303
1304         * marshal.c: Use the new helper functions to simplify code.
1305
1306         * image.c (mono_image_close): Add some code for help debug assembly unloading
1307         problems.
1308
1309         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1310         image mempool.
1311
1312         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1313         assembly was already loaded in another appdomain. Fixes #78083.
1314
1315 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
1316
1317         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1318         referenced assemblies.
1319         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1320
1321         * domain.c (mono_domain_free): Add a trace message.
1322
1323         * appdomain.c (add_assemblies_to_domain): Ditto.        
1324
1325         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1326         field.  
1327
1328 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1329
1330         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1331
1332 2006-04-12  Martin Baulig  <martin@ximian.com>
1333
1334         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1335         `USE_INCLUDED_LIBGC'.   
1336
1337 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1338
1339         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1340         the patch contains ../ and a small directory name later. Hopefully fixes
1341         #78035.
1342
1343 2006-04-10  Martin Baulig  <martin@ximian.com>
1344
1345         Clean up the debugger's thread-handling code.
1346
1347         The debugger's thread-handling code has been moved from
1348         ../mini/debug-debugger.c to threads.c.  We now iterate directly
1349         over the `threads' hash, keep track of exiting threads and also
1350         use proper locking.
1351
1352         We can now debug XSP and XSP based applications with the debugger.
1353
1354         * object-internals.h (MonoThread): Added `gpointer end_stack'.
1355
1356         * threads.h
1357         (MonoThreadCallbacks): Removed; this was only used by the debugger.
1358         (mono_install_thread_callbacks): Likewise.      
1359
1360         * threads.c (mono_thread_callbacks): Removed.
1361         (debugger_thread_created, debugger_thread_exited): New static functions.
1362         (start_wrapper): Call debugger_thread_created().
1363         (thread_cleanup): Call debugger_thread_exited().
1364         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1365         (mono_debugger_init_threads): New public function.
1366         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1367         iterate directly over the `threads' hash and also use proper locking.
1368
1369         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1370
1371         * mono-debug-debugger.h
1372         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1373
1374 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
1375
1376         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
1377         argument type=array. Fixes #78057.
1378
1379 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
1380
1381         * culture-info-table.h : regenerated. Fixed bug #69652.
1382
1383 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
1384
1385         * loader.c metadata.c: Reapply a variant r59116.
1386         
1387         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1388
1389         * class.c (mono_class_setup_interface_offsets): New internal function.
1390
1391         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1392         interfaces too. Fixes #77398.
1393
1394         * reflection.c (encode_cattr_value): Add support for 
1395         parameter type=object, argument type=array.
1396         (load_cattr_value): Ditto. Fixes #77916.
1397
1398         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1399         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1400
1401         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1402         a byval char array and CharSet is Ansi.
1403
1404         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1405
1406 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
1407
1408         * metadata.c: Add some locking comments.
1409         
1410         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1411         mempool.
1412         (mono_metadata_free_method_signature): Don't free the signature itself.
1413
1414         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
1415
1416         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1417         reference the same MonoImage.
1418         (mono_assembly_load_from_full): Add an assert.
1419
1420 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
1421
1422         * image.c (mono_image_close): Don't put the image we are about to free into the
1423         loaded_images_guid_hash.
1424
1425         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1426         to reduce code duplication.
1427
1428         * marshal.c: Register the native functions called by this module as icalls, to
1429         somewhat centralize the creation of MonoMethodSignature's.
1430
1431         * loader.c (mono_method_signature): Add a cache for method signatures.
1432
1433         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1434         the parameter attributes of a method.
1435         (mono_metadata_parse_method_signature_full): Refactored the computation of
1436         parameter attributes into a separate function. Also avoid one allocation in
1437         most cases.
1438
1439         * assembly.c (mono_assembly_close): Ditto.
1440
1441         * image.c (mono_image_close): Log trace messages with INFO level.
1442
1443         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1444
1445         * image.c reflection.c: Correct reference counting of image modules.
1446         
1447         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1448         of this function from the image mempool.
1449         
1450         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1451         to allow more cached types to be used.
1452
1453         * mono-debug.c (mono_debug_add_method): Appled patch from
1454         David S. Miller  <davem@sunset.davemloft.net>: Access 
1455         minfo->lexical_blocks[] entry elements using read32().
1456
1457 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
1458
1459         * loader.c (mono_free_method): No longer free the method header for non-dynamic
1460         methods as it is allocated from the mempool.
1461
1462         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1463         image mempool.
1464
1465         * metadata-internals.h: Add comments describing the reference counting scheme
1466         used for MonoImage and MonoAssembly.
1467
1468         * image.c assembly.c reflection.c: Rework reference counting of images and 
1469         assemblies so they are freed when the runtime is shut down. Free some 
1470         additional memory structures when an image is unloaded.
1471         
1472 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
1473
1474         * class.c loader.c reflection.c: Allocate more data structures in
1475         the image mempool.
1476
1477 2006-03-31  Miguel de Icaza  <miguel@novell.com>
1478
1479         * icall.c
1480         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1481         build on pre glib 2.4 systems.
1482
1483 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
1484
1485         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1486
1487         * icall.c: Fix some warnings.
1488
1489 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
1490
1491         * culture-info-table.h : regenerated.
1492
1493 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1494
1495         * threads.c, object-internals.h, verify.c: changed the culture caching
1496         code to use a normal MonoArray for storage so the GC can keep track of
1497         them easily. Fixed bits of the cache logic, too and simplified the
1498         code.
1499
1500 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1501
1502         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1503         thread for non-Boehm GCs.
1504
1505 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1506
1507         * domain.c, object.c, domain-internals.h: reduce the amount of memory
1508         needed to keep track of the data for static fields.
1509
1510 2006-03-29  Raja R Harinath  <rharinath@novell.com>
1511
1512         Fix #75172
1513         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1514         for interface classes.  Use 'num_methods' instead.
1515         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
1516         before using '->vtable_size' field.
1517
1518 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1519
1520         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1521         doesn't contain managed pointers, so use a normal hashtable.
1522
1523 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1524
1525         * reflection.c, class-internals.h, domain.c: fixed handling of types
1526         used as values for objects in custom attributes (bug #77915):
1527
1528 2006-03-24  Martin Baulig  <martin@ximian.com>
1529
1530         * class.c (mono_class_setup_fields): Added support for generic
1531         instances; fixes #77580.
1532
1533 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1534
1535         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1536
1537 2006-03-24  Dick Porter  <dick@ximian.com>
1538
1539         * file-io.c (get_file_attributes): More stat macro breakage.
1540         Fixes bug 77759.
1541
1542 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1543
1544         * profiler.c: added the file=filename option in the default profiler
1545         to output the profile data to filename.
1546
1547 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1548
1549         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1550         bug #77877.
1551
1552 2006-03-22  Martin Baulig  <martin@ximian.com>
1553
1554         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1555         allocated `MonoClassField *' in `fb->handle'.
1556
1557 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1558
1559         * class.c, image.c, metadata-internals.h: implemented new mechanism to
1560         allocate interface ID to save memory and allow better ID reuse on
1561         appdomain unload. setup_generic_vtable () removal from Martin.
1562
1563 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1564
1565         * object.h, appdomain.c, domain.c, exception.c, icall.c,
1566         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1567         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1568         write barriers for reference stores with managed objects accessed with
1569         C structures in the runtime and in embedding programs.
1570
1571 2006-03-20  Raja R Harinath  <rharinath@novell.com>
1572
1573         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1574         'interface_id' and 'max_interface_id' fields of MonoClasses
1575         representing open generic types.
1576
1577 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1578
1579         * object.h, object.c, icall.c: added functions to deal with
1580         storing valuetypes that contain references in managed objects.
1581         * reflection.c, string-icalls.c, threads.c, marshal.c: small
1582         fixes and comments around uses of mono_array_addr ().
1583
1584 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1585
1586         * object.h, icall.c, monitor.c: object.GetHashCode ()
1587         implementation that supports the moving garbage collector.
1588
1589 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1590
1591         * icall.c, threads-types.h, threads.c: implemented finalizer for
1592         LocalDataStoreSlot.
1593
1594 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
1595
1596         * metadata.c (mono_type_size): Add a fixme.
1597         (mono_type_stack_size): Ditto.
1598
1599         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
1600         'type_forwarders' field.
1601
1602         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1603         attribute from net 2.0.
1604
1605         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1606         from class.c.
1607
1608         * class.c (mono_class_setup_fields): Fix a warning.
1609         
1610         * class.c (mono_class_from_name): Add support for assemblyref entries
1611         in the EXPORTEDTYPE table.
1612
1613         * reflection.c: Add support for handling type forwarders under net 2.0.
1614
1615         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
1616         
1617 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
1618
1619         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1620         overwriting entries in ModuleBuild->types, also clean up the code
1621         a little. Fixes #77774.
1622
1623 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1624
1625         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1626         load friend assembly info when present.
1627
1628 2006-03-14  Raja R Harinath  <rharinath@novell.com>
1629
1630         Fix crasher on gtest-158.cs.
1631         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1632         the return value if the MonoClass we want is yet in an
1633         inconsistent state.
1634         * class.c (mono_class_create_from_typedef): Add an comment
1635         explaining an order dependency between mono_class_setup_parent and
1636         mono_class_setup_mono_type.
1637
1638 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1639
1640         * class.c: documentation updates and events bug fix.
1641
1642 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1643
1644         * class.c: some cleanup, locking fixes.
1645
1646 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1647
1648         * class.c: fix the generics code to setup nested
1649         type info to the instantiated type (bug #77770).
1650
1651 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1652
1653         * marshal.c: fixed a few type correctness issues.
1654
1655 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1656
1657         * loader.c: the Set/Get/Addrtess array methods should be public.
1658
1659 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
1660
1661         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1662         
1663         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1664         info->wrapper.
1665
1666 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
1667
1668         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1669
1670         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1671
1672         * mempool.c (mono_mempool_alloc): Speed this up a bit.
1673         (mono_mempool_alloc0): Ditto.
1674
1675 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1676
1677         * socket-io.c:
1678         (create_object_from_sockaddr): it was allocating 4 extra bytes
1679         for the AF_UNIX data. Fixes bug #77747.
1680
1681 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
1682
1683         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1684
1685 2006-03-09  Dick Porter  <dick@ximian.com>
1686
1687         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1688         Fixes bug 76966 again.
1689
1690 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
1691
1692         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1693         names from r57532
1694         * appdomain.c: Bumped corlib version to 48 (due to r57532)
1695
1696 2006-03-07  Martin Baulig  <martin@ximian.com>
1697
1698         * object.c
1699         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1700
1701 2006-03-07  Martin Baulig  <martin@ximian.com>
1702
1703         * class.c
1704         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1705         regression introduced in r56970; see gtest-252.cs.
1706
1707         * loader.c (mono_get_method_constrained): Correctly handle generic
1708         methods; see gtest-253.cs.
1709
1710 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
1711
1712         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1713
1714 2006-03-04  Martin Baulig  <martin@ximian.com>
1715
1716         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1717         compute the parent type at runtime, just like we're already doing
1718         it for interfaces.
1719
1720         * reflection.c
1721         (mono_reflection_bind_generic_parameters): Don't compute the
1722         parent type anymore.
1723
1724         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1725
1726 2006-03-04  Martin Baulig  <martin@ximian.com>
1727
1728         * mono-debug-debugger.h
1729         (mono_debugger_create_notification_function): Allocate memory at
1730         runtime and return a pointer to it.
1731
1732 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
1733
1734         * assembly.c: Fix windows build.
1735         
1736         * assembly.c: Fix build.
1737
1738         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
1739
1740         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1741         
1742 2006-03-03  Dick Porter  <dick@ximian.com>
1743
1744         * process.c
1745         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1746         Check parameters before dereferencing them.  Fixes Aaron's part of
1747         bug 77393.
1748
1749 2006-03-03  Raja R Harinath  <rharinath@novell.com>
1750
1751         Fix performance regression.
1752         * loader.c (find_method_in_class): Add 'from_class' argument.
1753         Rename 'klass' argument to 'in_class'.  The signature is compared
1754         against the method in 'in_class', and the corresponding method is
1755         returned from 'from_class'.
1756         (find_method): Walk both 'in_class' and 'from_class' in parallel.
1757         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1758         type definition and generic instantiation in parallel.
1759         (mono_get_method_constrained): Update to changes.
1760
1761 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1762
1763         * threads.c: make sure the domain is correct, too when doing
1764         mono_thread_attach ().
1765
1766 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
1767
1768         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1769         windows. Fixes #77683.
1770
1771 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1772
1773         * object.h, *: introduced specific way to set elements of an array
1774         of references to be used as write barrier. Still need to audit the
1775         uses of mono_array_addr.
1776
1777 2006-03-01  Miguel de Icaza  <miguel@novell.com>
1778
1779         * object-internals.h: New field to cache the assmebly name, patch
1780         from Tambet Ingo (tambet@ximian.com)
1781
1782 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1783
1784         * decimal.h, class-internals.h, metadata-internals.h,
1785         file-io.h: mark a few function declarations as internal, to
1786         reduce the number of PLT entries.
1787
1788 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1789
1790         * file-io.c: fix typo in warning message.
1791
1792 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1793
1794         * loader.c: on unix, lookup the "*A" version of a function
1795         if charset is auto as a second option before failing.
1796
1797 2006-02-28  Raja R Harinath  <rharinath@novell.com>
1798
1799         * class.h (mono_class_inflate_generic_method): Revert to two
1800         argument version.
1801         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1802         (mono_class_inflate_generic_method_full): Add.
1803         * class.c (mono_class_inflate_generic_method_full): Rename from
1804         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
1805         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
1806         * loader.c, reflection.c: Update to changes.
1807
1808 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1809
1810         * icall.c: const fixes and small improvements.
1811
1812 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1813
1814         * threadpool.c: for asynchronous connect(), enable the same workaround
1815         for BSD 6 as for the Mac. Fixes bug #77637.
1816
1817 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
1818
1819         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1820         formatted classes. Fixes #77524.
1821
1822 2006-02-24  Raja R Harinath  <rharinath@novell.com>
1823
1824         * class.c (inflate_generic_type): Add a couple more
1825         micro-optimizations.
1826         (inflate_generic_context): Don't use the 'gmethod' from
1827         'inflate_with'.
1828         (mono_class_inflate_generic_method): If the method has generic
1829         parameters, but the passed-in context doesn't have a 'gmethod',
1830         create one.  Use the possibly simplified generic instantiation
1831         from the declaring class instead of the one passed in.
1832
1833 2006-02-24  Raja R Harinath  <harinath@gmail.com>
1834
1835         Make generic method signature and method header handling lazy.
1836         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1837         (inflate_generic_header): Likewise.
1838         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
1839         parameter to avoid inflating types.
1840         (mono_get_inflated_method): Empty out.
1841         * class.h (mono_class_inflate_generic_method): Update to changes.
1842         * loader.c (mono_get_method_from_token): Don't parse signature for
1843         generic methods, nor methods of generic classes.
1844         (mono_method_signature): Rename from 'mono_method_signature'.
1845         Inflate signature on demand.
1846         (mono_method_get_header): Inflate method header on demand.
1847         * reflection.c: Update to changes.
1848
1849 2006-02-23  Raja R Harinath  <rharinath@novell.com>
1850
1851         * metadata.c (mono_metadata_inflate_generic_inst): If the
1852         instantiation is closed, don't bother expanding it in the new
1853         context.
1854         * class.c (inflate_generic_class): If the generic instantiation
1855         doesn't change after inflation, return the argument itself.
1856         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1857         Add bounds checks.
1858         (inflate_generic_context): If neither the generic class nor the
1859         generic method instantiations change, return the original context.
1860         * reflection.c (mono_method_get_object): Do
1861         'mono_get_inflated_method' before accessing the ->klass field.
1862         (inflate_mono_method): Don't create a MonoGenericMethod unless
1863         necessary.
1864         (inflate_method): Don't pass a constructed type as the declaring
1865         type of a methodbuilder.
1866
1867 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1868
1869         * object.c: fix memory overwrite.
1870
1871 2006-02-22  Dick Porter  <dick@ximian.com>
1872
1873         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1874         it doesn't work any more.
1875         (mono_threads_request_thread_dump): Fix unused variable warnings.
1876
1877 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1878
1879         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1880         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1881         the public header file.
1882
1883 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
1884
1885         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1886
1887 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1888
1889         * class-internals.h, object.c: reduce the size of MonoVTable
1890         and store the interface_offsets array at negative offsets.
1891
1892 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1893
1894         * metadata.c: tweak table descriptors data structures to reduce
1895         size and runtime relocations.
1896
1897 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1898
1899         * marshal.c: fix some types and opcodes to be type-safe
1900         in marshaling wrappers.
1901
1902 2006-02-21  Ankit Jain  <jankit@novell.com>
1903
1904         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1905
1906 2006-02-21  Raja R Harinath  <rharinath@novell.com>
1907
1908         * metadata.c (get_constraints): Relax debugging checks for monodis.
1909
1910 2006-02-21  Ankit Jain  <jankit@novell.com>
1911
1912         * metadata.c (mono_metadata_load_generic_params): Move the code
1913         checking for ambiguous generic params from here to mono/dis/get.c
1914         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1915
1916 2006-02-21  Raja R Harinath  <harinath@gmail.com>
1917
1918         Fix assertion triggered when compiling nemerle.
1919         * class.c (mono_get_shared_generic_inst): Rename from
1920         get_shared_inst and make non-static.
1921         * loader.c (mono_get_shared_generic_method): New.  Used to create
1922         the MonoGenericContext-equivalent of a MonoGenericContainer.
1923         (mono_get_method_from_token): Initialize the 'context' field of
1924         the created MonoGenericContainer.
1925         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1926         * metadata.c (get_constraints): Add sanity check.
1927         * class-internals.h: Add new internal methods.
1928
1929         * reflection.c (verify_safe_for_managed_space): New sanity check.
1930         Currently checks that owner-less generic parameters aren't allowed
1931         in managed space.
1932         (mono_type_get_object): Use it.
1933         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1934         that are now in mono_type_get_object.
1935         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1936
1937 2006-02-19  Raja R Harinath  <harinath@gmail.com>
1938
1939         * metadata.c (mono_type_create_from_typespec): Rename from
1940         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
1941         argument and caching of types in the generic container.
1942         (unwrap_arrays, find_generic_param): Remove.
1943         * metadata-internals.h: Update.
1944         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1945
1946 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
1947
1948         * class.c (mono_class_get_exception_for_failure): Fix a warning.
1949
1950         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1951         return values. Fixes #77581.
1952
1953         * class.c (mono_fnptr_class_get): Switch name and name_space.
1954
1955         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1956         classes and add support for [In, Out] attributes.
1957         (mono_marshal_free_asany): Ditto. Fixes #77524.
1958
1959 2006-02-18  Raja R Harinath  <harinath@gmail.com>
1960
1961         * class.c (mono_class_from_generic_parameter): Make more robust to
1962         incomplete MonoGenericContainers from monodis.
1963
1964 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1965
1966         * class-internals.h: added some more exception types.
1967         * class.c, metadata.c: added a few checks to handle missing
1968         types.
1969
1970 2006-02-17  Raja R Harinath  <rharinath@novell.com>
1971
1972         Use owner-less generic-params some more.
1973         * class.c (my_mono_class_from_generic_parameter): Remove.
1974         (mono_class_from_generic_parameter): Handle null image,
1975         param->name and param->owner.
1976         (mono_class_from_mono_type): Update.
1977         (mono_class_create_from_typespec): Remove 'container' parameter.
1978         If that parameter is non-null, the result is always inflated by
1979         'mono_class_get_full' anyway.
1980         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
1981         parameter.
1982         (mono_class_get_full): Update.
1983
1984         * class.c (inflate_generic_type) [GENERICINST]: If the generic
1985         instance is not open, don't bother inflating.
1986         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
1987         parse metadata for inflated classes.
1988         (_mono_class_get): Change GenericContext* parameter to
1989         GenericContainer*.
1990         (mono_class_create_from_typespec): Likewise.  Simplify, and
1991         implement trivially.  All the cases are handled in
1992         mono_class_from_mono_type.  Don't inflate returned class.
1993         (mono_class_get_full): Delegate GENERICINST optimization to
1994         inflate_generic_type.
1995         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1996
1997 2006-02-16  Dick Porter  <dick@ximian.com>
1998
1999         * socket-io.c (create_object_from_sockaddr): Fix typo.
2000         (create_sockaddr_from_object): Check array lengths before
2001         potentially accessing items off the end.
2002         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
2003         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
2004         (ves_icall_System_Net_Sockets_Socket_Send_internal)
2005         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
2006         length checks to avoid wraparound overflows.
2007         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
2008         contents of the array of sockets
2009         (hostent_to_IPHostEntry2)
2010         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
2011         Check return value of inet_ntop ().
2012         (addrinfo_to_IPHostEntry): Fix typo
2013
2014 2006-02-16  Raja R Harinath  <rharinath@novell.com>
2015
2016         Type metadata parsing doesn't use generic-instantiation information.
2017         * metadata.c (mono_metadata_parse_array_full): Change
2018         MonoGenericContext* parameter to MonoGenericContainer*.
2019         (mono_metadata_parse_type_full): Likewise.
2020         (mono_type_create_from_typespec_full): Likewise.
2021         (mono_metadata_parse_mh_full): Likewise.
2022         (mono_metadata_parse_generic_inst): Likewise.
2023         (do_mono_metadata_parse_generic_class): Likewise.
2024         (do_mono_metadata_parse_type): Likewise.
2025         * metadata-internals.h: Update to changes.
2026         * class.c (mono_class_find_enum_basetype): Likewise.
2027         (mono_class_setup_fields): Likewise.
2028         (mono_class_create_from_typespec): Likewise.
2029         * loader.c (method_from_methodspec): Likewise.
2030         (mono_get_method_from_token): Likewise.
2031         (mono_method_get_header): Likewise.
2032
2033 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2034
2035         * marshal.c: handle additional GENERICINST case (patch from
2036         Thong Nguyen <tum@veridicus.com>).
2037         Fix a few cases where LDIND_I/STIND_I was used for references.
2038
2039 2006-02-16  Raja R Harinath  <rharinath@novell.com>
2040
2041         * reflection.c (mono_reflection_get_token): Remove unused variable.
2042
2043 2006-02-16  Martin Baulig  <martin@ximian.com>
2044
2045         * reflection.c (mono_reflection_get_token): Add support for fields
2046         in instantiated generic types.
2047
2048         * icall.c
2049         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2050
2051 2006-02-15  Martin Baulig  <martin@ximian.com>
2052
2053         * icall.c
2054         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2055         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2056         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
2057         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
2058
2059 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2060
2061         * class.c, metadata.c, metadata.h, object.c, icall.c,
2062         marshal.c: changed mono_type_get_underlying_type () to do
2063         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2064         Fixed handling of instantiated generic valuetypes (bug #75479).
2065
2066 2006-02-15  Raja R Harinath  <rharinath@novell.com>
2067
2068         * metadata.c (mono_metadata_decode_signed_value): Simplify.
2069         Delegate to mono_metadata_decode_value, and work on the returned value.
2070
2071         * icall.c (ves_icall_MonoType_GetGenericArguments):
2072         Add consistency check here too.
2073         
2074 2006-02-15  Ankit Jain  <jankit@novell.com>
2075
2076         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2077         char/short etc.
2078
2079 2006-02-15  Ankit Jain  <jankit@novell.com>
2080
2081         * metadata.c (mono_metadata_decode_signed_value): New function to decode
2082         signed values, used only for representing lower bounds of arrays.
2083         (mono_metadata_parse_array_full): Use new
2084         mono_metadata_decode_signed_value to decode lower bounds.
2085
2086 2006-02-14  Martin Baulig  <martin@ximian.com>
2087
2088         * reflection.c
2089         (mono_reflection_get_token): Support "MonoGenericMethod" and
2090         "MonoGenericCMethod" and allow generic instances / methods.
2091
2092 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
2093
2094         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2095         to obtain the terminal size using an ioctl.
2096
2097         * object.c (mono_nullable_init): Revert this as nullable reference
2098         types are not valid.
2099         (mono_nullable_box): Ditto.
2100
2101 2006-02-09  Dick Porter  <dick@ximian.com>
2102
2103         * threads.c (mono_thread_detach): Drop a reference to the thread
2104         we're detaching.
2105
2106 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
2107
2108         * object.c (mono_nullable_init): Handle nullable reference types.
2109         (mono_nullable_box): Ditto. Fixes #77446.
2110
2111 2006-02-07  Martin Baulig  <martin@ximian.com>
2112
2113         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2114
2115 2006-02-07  Ankit Jain  <jankit@novell.com>
2116
2117         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2118         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2119         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2120         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2121         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2122         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2123
2124 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
2125
2126         * class.c (mono_class_create_generic): Set type_token as well.
2127
2128         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2129         compatible with MS.
2130
2131 2006-02-02  Martin Baulig  <martin@ximian.com>
2132
2133         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2134         has never been used so far.
2135
2136 2006-02-02  Martin Baulig  <martin@ximian.com>
2137
2138         * mono-debug-debugger.h: Changed comment at the top of this file;
2139         the header is not installed, but it's safe to #include it from
2140         within the JIT.
2141
2142         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2143         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2144
2145 2006-02-02  Martin Baulig  <martin@ximian.com>
2146
2147         * mono-debug.h
2148         (MonoSymbolTable): Removed the `metadata_info' field.
2149
2150         * mono-debug.c
2151         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2152
2153         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2154         (mono_debugger_add_builtin_types): Removed.
2155         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2156         (mono_debugger_create_notification_function): We now operate on a
2157         pre-allocated area; take a `gpointer' and return `void'.
2158
2159         * mono-debug-debugger.c
2160         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2161         (mono_debugger_add_builtin_types): Removed.
2162
2163 2006-02-02  Martin Baulig  <martin@ximian.com>
2164
2165         * threads.c (mono_debugger_create_all_threads): New public method.
2166
2167 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2168
2169         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2170         breaks on several platforms.
2171
2172 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
2173
2174         * assembly.c: the VS.NET build doesn't supply default values for
2175         MONO_ASSEMBLIES and MONO_CFG_DIR.
2176
2177 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
2178
2179         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2180         helper function.
2181
2182         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2183
2184         * loader.c (method_from_memberref): Fix a warning.
2185
2186         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2187
2188         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2189         with explicit layout. Fixes #77433.
2190
2191 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
2192
2193         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
2194         max_interface_id is initialized before using it. Fixes #77398.
2195         (ves_icall_Type_GetInterfaces): Ditto.
2196
2197 2006-01-30  Raja R Harinath  <rharinath@novell.com>
2198
2199         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2200         allocate memory for parameter attributes when parsing memberref
2201         signatures.
2202         * loader.c (mono_loader_set_error_method_load): Don't warn.
2203         (method_from_memberref): Ensure MissingMethodException gets thrown
2204         if method is not found.  Make warning more informative.
2205
2206 2006-01-29  Raja R Harinath  <harinath@gmail.com>
2207
2208         Fix #77397
2209         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2210         return true if is byref.
2211         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2212         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2213         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2214
2215 2006-01-27  Raja R Harinath  <rharinath@novell.com>
2216
2217         Fix tests/find-method.2.il
2218         * loader.c (find_method, find_method_in_class): Remove is_inflated
2219         argument.  Revert 2006-01-18 change.
2220         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2221         is generic, search for method in its generic definition.
2222         * class.c (mono_class_setup_vtable_general): Print generic
2223         arguments of generic types in debugging printf.
2224
2225 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
2226
2227         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2228
2229         * threads.c (mono_threads_request_thread_dump): New helper function.
2230
2231 2006-01-25  Raja R Harinath  <rharinath@novell.com>
2232
2233         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2234
2235 2006-01-25  Ankit Jain  <jankit@novell.com>
2236
2237         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2238         move definition to ..
2239         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2240         
2241 2006-01-25  Ankit Jain  <jankit@novell.com>
2242             Raja R Harinath  <rharinath@novell.com>
2243
2244         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2245         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2246         as necessary.
2247
2248 2006-01-25  Martin Baulig  <martin@ximian.com>
2249
2250         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2251         `MonoDebuggerThread' into debug-debugger.c.
2252
2253 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2254
2255         * profiler.c: fix printing of data.
2256
2257 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
2258
2259         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2260           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2261
2262 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2263
2264         * object.c: fix deadlock related to string interning.
2265
2266 2006-01-23  Martin Baulig  <martin@ximian.com>
2267
2268         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2269
2270         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2271
2272 2006-01-23  Martin Baulig  <martin@ximian.com>
2273
2274         * mono-debug.h: Moved the prototypes of some functions which are
2275         used by the JIT here from mono-debug-debugger.h.
2276
2277 2006-01-21  Martin Baulig  <martin@ximian.com>
2278
2279         * Makefile.am: Don't install mono-debug-debugger.h.
2280
2281 2006-01-21  Martin Baulig  <martin@ximian.com>
2282
2283         * mono-debug-debugger.h: Enforce the private status of this header
2284         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2285         Moved some stuff from mono-debugger-jit-wrapper.h here.
2286
2287 2006-01-20  Raja R Harinath  <rharinath@novell.com>
2288
2289         * class.c (mono_class_from_typeref): Add a sanity test to help
2290         catch lack of assembly load/search hooks.
2291
2292 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
2293
2294         * marshal.c (emit_struct_conv): Relax the fields with same offset
2295         check even more. Fixes #77230.
2296
2297 2006-01-18  Martin Baulig  <martin@ximian.com>
2298
2299         * loader.c (find_method_in_class): Added `gboolean is_inflated'
2300         argument; if false, we compare the uninstantiated signatures.
2301         (method_from_memberref): Compare the uninstantiated signatures;
2302         fixes #76417.
2303
2304 2006-01-18  Robert Jordan  <robertj@gmx.net>
2305
2306         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2307         Clear the weak link. Fixes bug #77170.
2308
2309         * gc.c (mono_gchandle_free):
2310         Reflect *-gc.c changes (tiny optimization).
2311
2312 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
2313
2314         * metadata.c (mono_metadata_signature_dup): Applied patch from
2315         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2316         Fixes #77288.
2317
2318 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
2319
2320         * marshal.c (emit_struct_conv): Allow fields with the same offset when
2321         marshalling from native to managed code. Fixes #77230.
2322
2323 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2324
2325         * threadpool.c: fix problem (Mac only) when more than one asynchronous
2326         connect. Fixes bug #77020.
2327
2328 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2329
2330         * class.c: fixed id assignement for nested interfaces (bug #77275).
2331         Added also better info for --print-vtable debugging.
2332
2333 2006-01-12  Martin Baulig  <martin@ximian.com>
2334
2335         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2336         interfaces on-the-fly; fixes #76625.
2337
2338         * class-internals.h
2339         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2340         don't need that anymore.
2341
2342 2006-01-12  Miguel de Icaza  <miguel@novell.com>
2343
2344         * socket-io.c
2345         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2346         To avoid initing the nested_classes when not needed I turned the
2347         PeerCredData as a toplevel internal class, as it has to be shared
2348         anyways. 
2349
2350         Fixes the CASA issue.
2351
2352 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
2353
2354         * domain.c: Accessors for MonoJitInfo
2355
2356         * profiler-private.h: Add jitinfo to the end jit hook
2357
2358         * profiler.[ch]: Define new hooks, called after jitting which give
2359         the MonoJitInfo that was compiled
2360
2361 2006-01-10  Martin Baulig  <martin@ximian.com>
2362
2363         * class.c (mono_class_setup_events): Add support for generic
2364         classes; fixes #76440.
2365
2366 2006-01-06  Raja R Harinath  <rharinath@novell.com>
2367
2368         Fix #77160.
2369         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2370         on passed-in method.
2371
2372 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2373
2374         * object.c (mono_runtime_invoke_array): Add Nullable support.
2375
2376         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2377
2378 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
2379
2380         * file-io.c: Don't consider sockets as directory and avoid an endless
2381         loop. Fix bug #76966.
2382
2383 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2384
2385         * object.c (mono_nullable_init): New helper function.
2386         (mono_nullable_box): Ditto.
2387
2388         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2389
2390         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2391
2392         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2393         
2394 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
2395
2396         * class.c (mono_class_is_assignable_from): Make T assignable to 
2397         Nullable<T>.
2398
2399 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
2400
2401         * appdomain.c: Bump corlib version to 46.
2402         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2403         serialization purpose) and changed ves_icall_System_Reflection_
2404         Assembly_get_code_base signature to accept a boolean (to escape, or 
2405         not, the assembly code base).
2406
2407 2005-12-23  Dick Porter  <dick@ximian.com>
2408
2409         * icall.c: 
2410         * threads-types.h: 
2411         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2412         CreateEvent icall now returns "created" boolean parameter.
2413
2414 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
2415
2416         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2417         #76967.
2418
2419         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
2420         when attr_klass is an interface. Fixes #77045.
2421
2422 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
2423
2424         * marshal.c (emit_struct_conv): Fix previous patch.
2425         
2426         * marshal.c (emit_struct_conv): Add a check for fields with the same
2427         offset.
2428
2429 2005-12-20  Raja R Harinath  <rharinath@novell.com>
2430
2431         Fix regression in Mono.C5.
2432         * class.c (mono_class_create_generic): If 'klass' is an interface
2433         set up the interface offsets.
2434         (mono_class_is_assignable_from): Don't throw away generic arguments.
2435
2436 2005-12-19  Raja R Harinath  <rharinath@novell.com>
2437
2438         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2439         type parameters.
2440
2441 2005-12-15  Raja R Harinath  <rharinath@novell.com>
2442
2443         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2444         dead store.
2445         (do_mono_metadata_parse_generic_class): Don't pass the current
2446         generic context when parsing the type being instantiated: it
2447         cannot use it, anyway.
2448
2449         * loader.c (method_from_memberref): Don't inflate a signature if
2450         it doesn't contain any type parameters.
2451
2452 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
2453
2454         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2455
2456 2005-12-14  Martin Baulig  <martin@ximian.com>
2457
2458         * class.c
2459         (mono_type_get_name_recurse): Don't return null for type
2460         parameters and open generic classes.
2461         (mono_class_setup_methods): Don't exclude generic instances.
2462         (mono_get_unique_iid): Use different IDs for different
2463         instantiations of the same generic type.
2464         (mono_class_setup_vtable): Only use setup_generic_vtable() for
2465         open generic instances; create a normal vtable for closed generic
2466         instances.
2467         (mono_class_setup_vtable_general): We're now also called for
2468         closed generic instances.
2469
2470         * reflection.c
2471         (mono_reflection_bind_generic_parameters): Correctly use
2472         mono_metadata_lookup_generic_inst() everywhere.
2473
2474 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
2475
2476         * object.c (mono_class_create_runtime_vtable): Call 
2477         mono_class_setup_vtable ().
2478
2479         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2480         function.
2481         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2482         #76959.
2483
2484         * loader.c (mono_loader_set_error_type_load): Print the type load
2485         warnings to the console so they are more visible to the user.
2486         (mono_loader_set_error_method_load): Ditto.
2487
2488         * reflection.c (ensure_runtime_vtable): Revert the last change as it
2489         is still broken.
2490         
2491         * reflection.c (ensure_runtime_vtable): Fix build.
2492
2493         * reflection.c (ensure_runtime_vtable): Disable an optimization which
2494         doesn't work in all cases.
2495
2496 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
2497
2498         * object.c (mono_array_new_full): Treat a single dimensional array
2499         with 0 lower bounds as an szarray. Fixes #76973.
2500
2501         * reflection.c (custom_attr_visible): Really fix this.
2502
2503 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
2504
2505         * reflection.c (custom_attr_visible): Allow nested public attributes
2506         as well.
2507
2508         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2509         interface check.
2510
2511 2005-12-12  Raja R Harinath  <harinath@gmail.com>
2512
2513         * class.c (set_generic_param_owner): Delete.
2514         (mono_class_create_from_typedef): Don't set ->owner field of
2515         generic parameters to "param containers" of enclosing classes.
2516         * reflection.c (mono_reflection_initialize_generic_parameter):
2517         Likewise.
2518
2519 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
2520
2521         * reflection.c (custom_attr_visible): Fix build.
2522
2523 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
2524
2525         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2526         private attributes.
2527         
2528         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2529         handling of null parameter defaults.
2530
2531 2005-12-09  Raja R Harinath  <rharinath@novell.com>
2532
2533         * class.c (mono_class_from_generic_parameter): Don't set
2534         klass->generic_container.
2535         (my_mono_class_from_generic_parameter): Likewise.
2536
2537 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
2538
2539         * reflection.c (load_public_key): Fix a warning.
2540         (method_encode_code): Fix unaligned accesses.
2541
2542 2005-12-07  Martin Baulig  <martin@ximian.com>
2543
2544         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2545
2546         * reflection.c
2547         (write_generic_param_entry): Encode our custom attrs.
2548
2549         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2550
2551 2005-12-07  Martin Baulig  <martin@ximian.com>
2552
2553         * reflection.c (encode_new_constraint): Removed; we don't use the
2554         `NewConstraintAttribute' anymore.
2555
2556 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
2557
2558         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2559         not fire a TypeResolve event when Assembly.GetType () is called.
2560
2561 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
2562
2563         Beginning of support for nullable types in the runtime. Parts of
2564         this patch are from Martin.
2565
2566         * appdomain.c (MONO_CORLIB_VERSION): Bump
2567
2568         * domain.c (mono_init_internal): get the nullable type
2569
2570         * class.c (mono_class_is_nullable): New method
2571         (mono_class_get_nullable_param): New mehod
2572         (mono_class_create_generic): In types T? set cast_class to T
2573
2574         * class-internals.h (MonoDefaults): new nullable default class
2575         (mono_class_get_nullable_param, mono_class_get_nullable_param):
2576         new methods.
2577
2578 2005-12-05  Raja R Harinath  <rharinath@novell.com>
2579
2580         * metadata.c (select_container): New.  Refactor code to select the
2581         appropriate GenericContainer given the type of generic parameter
2582         we are looking for.
2583         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2584         not a MonoGenericContext.  Use select_container.  Update parameters.
2585         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2586         and MONO_TYPE_MVAR.
2587         (unwrap_arrays): Remove duplicate tests.
2588         (find_generic_param): Rename from 'has_same_context'.  Now walks a
2589         generic instantiated class to find any arguments that are generic
2590         parameters.
2591         (mono_type_create_from_typespec_full): Use find_generic_param to
2592         avoid evicting some generic instantiations from the typespec
2593         cache.
2594
2595 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2596
2597         * reflection.c: fixed writing of doubles on ARM FPA.
2598
2599 2005-12-02  Robert Jordan  <robertj@gmx.net>
2600
2601         * icall.c: Fixed EventInfo.ReflectedType (#76829).
2602
2603 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2604
2605         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2606         least on SUSE 10 they are not the same (on debian, they are just the
2607         same thing).
2608
2609 2005-12-01  Raja R Harinath  <rharinath@novell.com>
2610
2611         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2612         DeclaringType for VARs and MVARs.
2613         * class.c (set_generic_param_owner): Fix initialization of owner
2614         fields.
2615
2616 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2617
2618         * icall.c: fixed Enum.ToObject() to correctly convert the values.
2619
2620 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2621
2622         * threadpool.c: workaround for a bug that shows up on the Mac:
2623         select()+connect() on a blocking socket is not like it should
2624         be, so we proceed to connect() in that case, wasting the I/O
2625         threadpool thread until connect succeedes. Fixes bug #75436.
2626
2627 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2628
2629         * threadpool.c: fix typo when setting file descriptor states.
2630
2631 2005-11-28  Raja R Harinath  <rharinath@novell.com>
2632
2633         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
2634         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2635         create a temporary signature container.
2636         (mono_metadata_parse_generic_param): Update to changes.
2637         (mono_type_create_from_typespec_full): Update to changes.
2638         * loader.c (method_from_memberref): Don't use a
2639         MonoGenericContainer while parsing a memberref signature.
2640         (method_from_methodspec): Remove dead-store of the 'container'
2641         variable.  It's overwritten before use.
2642
2643         * metadata.c (mono_type_create_from_typespec_full): Make debugging
2644         checks tighter.
2645         (mono_metadata_parse_generic_param): Likewise.
2646         * loader.c (find_method_in_class): Does not need a
2647         MonoGenericContainer.  Use 'mono_method_signature' rather than
2648         'mono_method_signature_full'.
2649         (find_method, mono_get_method_constrained, method_from_memberref):
2650         Update to changes.
2651
2652         * metadata.c (mono_type_create_from_typespec_full): Ensure that
2653         owner-less generic-parameters are never evicted from the typespec
2654         cache.
2655
2656         * loader.c (method_from_memberref): Don't use the current context
2657         when parsing signatures.
2658         (method_from_methodspec, mono_get_method_from_token): Update to changes.
2659
2660         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2661         side-effects in g_assert.
2662         * loader.c (mono_get_method_from_token): Resolve klass earlier so
2663         that we don't potentially lose information.
2664
2665 2005-11-26  Dick Porter  <dick@ximian.com>
2666
2667         * icall.c:
2668         * threads.c: icalls to implement basic (ie, not named)
2669         System.Threading.Semaphore.
2670
2671 2005-11-24  Dick Porter  <dick@ximian.com>
2672
2673         * process.c
2674         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2675         Use GetProcessId() if it's available.
2676
2677 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
2678
2679         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2680
2681 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2682             Ankit Jain  <jankit@novell.com>
2683
2684         * loader.c (mono_get_method_from_token): Initialize 'method' field
2685         of all generic parameters before parsing the signature.  Remove
2686         code that "fixed"-up MVAR references.
2687
2688 2005-11-23  Ankit Jain  <jankit@novell.com>
2689
2690         * metadata.c (mono_metadata_has_generic_params):
2691         (mono_metadata_load_generic_param_constraints):
2692         (mono_metadata_load_generic_params): Move duplicate code ...
2693         (mono_metadata_get_generic_param_row): ... here. Returns the
2694         first row-id in GenericParam table for a given owner (token).
2695         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2696         prototype.
2697
2698 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2699             Ankit Jain  <jankit@novell.com>
2700
2701         * metadata.c (mono_metadata_class_equal): Pass signature_only when
2702         comparing VARs too.
2703         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
2704         type->data.generic_param only if the type is an MVAR.
2705         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2706         leak owner-less VARs and MVARs into managed space.
2707
2708 2005-11-21  Martin Baulig  <martin@ximian.com>
2709
2710         * class-internals.h
2711         (MonoMethod): Moved the `generic_container' here from
2712         `MonoMethodNormal' since we now also need it for
2713         `MonoMethodPInvoke';
2714         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2715         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2716         an union containing both `MonoMethodNormal' and
2717         `MonoMethodPInvoke'.
2718
2719         * loader.c
2720         (mono_get_method_from_token): Allow implementing generic methods
2721         as interncalls.
2722
2723         * threads.c
2724         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2725         icall.
2726
2727 2005-11-17  Dick Porter  <dick@ximian.com>
2728
2729         * icall.c: 
2730         * process.h: 
2731         * process.c: Split the Process Start_internal icall into
2732         ShellExecuteEx_internal and CreateProcess_internal, which are
2733         called depending on whether UseShellExecute is true.  Fixes bug
2734         76670.
2735
2736         * appdomain.c (MONO_CORLIB_VERSION): Incremented
2737
2738 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
2739
2740         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2741         'msize' parameters, use the information in 'mspec' instead.
2742         (emit_object_to_ptr_conv): Ditto.
2743
2744         * marshal.c (emit_struct_conv): Handle explicit layout structs with
2745         fields out of order. Fixes #76733.
2746
2747 2005-11-17  Ankit Jain  <jankit@novell.com>
2748
2749         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2750
2751 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
2752
2753         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2754           bug #76575.
2755
2756 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2757
2758         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2759         for types with non-auto layout. Fixes #76717.
2760
2761 2005-11-16  Ankit Jain  <jankit@novell.com>
2762
2763         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2764         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
2765         if generic_context is null.
2766           (mono_metadata_generic_param_equal): param->owner can be null.
2767           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2768         null.
2769
2770 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2771
2772         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2773         the correct value.
2774
2775 2005-11-15  Martin Baulig  <martin@ximian.com>
2776
2777         * object.c (set_value): Use mono_class_from_mono_type() instead of
2778         the hack for generic instances; fixes #76136.
2779
2780 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
2781
2782         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2783         fields.
2784
2785         * image.c (load_metadata_ptrs): Initialize the new fields.
2786
2787         * reflection.c (create_dynamic_mono_image): Ditto.
2788
2789         * reflection.c (build_compressed_metadata): Use the new fields.
2790
2791         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2792         icall.
2793
2794         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2795         icall.
2796         
2797 2005-11-15  Ankit Jain  <jankit@novell.com>
2798             Raja R Harinath  <harinath@gmail.com>
2799
2800         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2801         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2802         new per-generic_container cache if the cached MonoType's context matches
2803         the current context.
2804           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2805         to the expected context.
2806           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2807
2808 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2809
2810         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2811         we changed the signature of an icall.
2812         * icall.c: Modify to mono_double_ParseImpl return true/false 
2813         depending on the success, instead of throwing the exception. This will
2814         help us in Double.TryParse methods.
2815         
2816 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
2817
2818         * marshal.c (emit_marshal_object): Throw an exception when
2819         marshalling 'object' instead of crashing. Fixes #76696.
2820
2821 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2822
2823         * class-internals.h: Add prototype for mono_type_get_full_name ().
2824
2825 2005-11-11  Dick Porter  <dick@ximian.com>
2826
2827         * threads.c (mono_thread_manage): Make sure the main thread has
2828         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
2829
2830 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2831
2832         * loader.c (mono_loader_set_error_type_load): Log a warning to the
2833         console about the missing type.
2834         (mono_loader_set_error_method_load): Ditto.
2835
2836 2005-11-09  Miguel de Icaza  <miguel@novell.com>
2837
2838         * mono-config.c (mono_get_config_dir): Set the system defaults if
2839         none is specified.
2840
2841         * assembly.c (mono_set_dirs): New API entry point to set the
2842         assembly and the config directory in one call
2843
2844 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
2845
2846         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2847         the ftnptr was created from a delegate in a domain other than the
2848         current domain. Fixes #75377.
2849
2850         * exception.h exception.c: Add mono_get_exception_not_supported ().
2851
2852 2005-11-08  Martin Baulig  <martin@ximian.com>
2853
2854         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2855
2856 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
2857
2858         * security-manager.h: Added definitions to deal with strongname key 
2859         pairs bigger (and smaller) than 1024 bits.
2860         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
2861         adjust wrt the public key length being used.
2862
2863 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
2864
2865         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2866           Windows build (r51396-51397).
2867
2868 2005-11-03  Martin Baulig  <martin@ximian.com>
2869
2870         * class.c (mono_class_setup_vtable_general): Also add generic
2871         methods to the vtable; fixes #76581.
2872
2873 2005-11-01  Miguel de Icaza  <miguel@novell.com>
2874
2875         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2876         sure that we lookup GetString method from the System.Text.Encoding
2877         class, not the derived class or we get an empty method.
2878
2879         Fixed class #76612.
2880
2881 2005-10-25  Miguel de Icaza  <miguel@novell.com>
2882
2883         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2884         if it has been previously set (embedders). 
2885
2886         Make mono_set_rootdir available also on Unix.
2887
2888 005-10-24  Robert Jordan  <robertj@gmx.net>
2889
2890         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2891
2892 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
2893
2894         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2895         only calls which are made to native code use this flag.
2896
2897         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2898
2899 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
2900
2901         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2902         Add support for FieldBuilders.
2903
2904 2005-10-29  Martin Baulig  <martin@ximian.com>
2905
2906         * mono-debug.c
2907         (mono_debug_using_mono_debugger): New public method; returns
2908         whether we're running inside the debugger.
2909
2910 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
2911
2912         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2913         for Method/Constructor/FieldBuilders.
2914
2915 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
2916
2917         * reflection.c (module_add_cattrs): Save custom attributes for global methods
2918         and fields as well.
2919
2920 2005-10-26  Martin Baulig  <martin@ximian.com>
2921
2922         * mono-debug-debugger.c
2923         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2924
2925 2005-10-24  Raja R Harinath  <harinath@gmail.com>
2926
2927         * icall.c (base64_to_byte_array): Don't pass an out-of-range
2928         integer to isspace.
2929
2930 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
2931
2932         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2933         when passing valuetypes byref. Fixes #76502.
2934
2935 2005-10-19  Jackson Harper  <jackson@ximian.com>
2936
2937         * profiler.c: Don't put a . in front of types that are not in a
2938         namespace.
2939
2940 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
2941
2942         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2943
2944 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
2945
2946         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2947         #76436.
2948         (mono_marshal_get_ldflda_wrapper): Fix a warning.
2949
2950 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2951
2952         * assembly.c metadata-internals.h icall.c: Define an additional
2953         parameter for mono_assembly_name_parse_full, so we can avoid creating
2954         S.R.AssemblyName.Version when no version info wasn't passed.
2955         
2956 2005-10-09  Miguel de Icaza  <miguel@novell.com>
2957
2958         * class.c (mono_type_get_full_name): Reimplement method that was
2959         removed. 
2960
2961         * image.c: Some docs
2962
2963 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
2964
2965         * profiler.c (output_newobj_profile): Fix printing of Total memory
2966         on x86.
2967
2968 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2969
2970         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2971
2972 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
2973
2974         * threads.c: remove debug output.
2975
2976 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2977
2978         * threads.c (mono_thread_manage): Fix crashes if more than 64
2979         threads need to be aborted. Hopefully fixes #75899.
2980
2981         * assembly.c (mono_stringify_assembly_name): New helper function.
2982
2983         * class.c: Use mono_stringify_assembly_name instead of the similar
2984         static function.
2985
2986         * assembly.h assembly.c: Add support for calling a postload search 
2987         hook if an assembly cannot be loaded.
2988
2989         * appdomain.c: Register new search hooks which call the AssemblyResolve
2990         events in AppDomain. Fixes #75231
2991
2992 2005-10-07  Martin Baulig  <martin@ximian.com>
2993
2994         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2995         methods without debug info.
2996
2997 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
2998
2999         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
3000         wrappers.
3001
3002 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3003
3004         * file-io.c: now that we return symlinks, use lstat and, when the file
3005         is a symbolic link, stat, to get the file attributes. Also avoid the
3006         conversion to/from utf16/external.
3007
3008 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
3009
3010         * class.c (mono_class_layout_fields): Compute klass->has_references
3011         correctly if an embedded valuetype is not yet initialized. Fixes
3012         #76331.
3013
3014 2005-10-04  Martin Baulig  <martin@ximian.com>
3015
3016         * metadata.c
3017         (mono_metadata_load_generic_param_constraints): New public
3018         function; splitted the constraints loading out from
3019         mono_metadata_load_generic_params().
3020
3021         * class.c (mono_class_create_from_typedef): Call
3022         mono_metadata_load_generic_param_constraints() after setting up
3023         the type and creating our parent; fixes #75329.
3024
3025 2005-10-04  Martin Baulig  <martin@ximian.com>
3026
3027         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
3028         non-dynamic parent classes.
3029
3030 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
3031
3032         * file-io.c : win32 build fix (ETXTBSY seems not found).
3033
3034 2005-10-04  Martin Baulig  <martin@ximian.com>
3035
3036         * reflection.c
3037         (mono_image_get_methodspec_token): Make the cache actually work;
3038         fixes #75974.
3039
3040 2005-10-04  Martin Baulig  <martin@ximian.com>
3041
3042         * class.c (mono_class_name_from_token): Removed the unneccessary
3043         `MonoGenericContext *' argument.
3044
3045 2005-10-04  Martin Baulig  <martin@ximian.com>
3046
3047         * loader.c
3048         (method_from_methodspec): Make the caching work again; fixes the
3049         performance regression from #76262.
3050
3051 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3052
3053         * file-io.c:
3054         * file-io.h:
3055         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3056         GetFileSystemEntries that performs the same work but without going
3057         into io-layer, locking, etc.
3058
3059 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
3060
3061         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
3062         ThreadState_Stopped as well. Fixes #76047.
3063
3064 2005-09-29  Martin Baulig  <martin@ximian.com>
3065
3066         * class.c
3067         (inflate_generic_context): If the new context has a `gmethod', set
3068         its `container' that that gmethod's `container'.
3069
3070         * metadata.c
3071         (mono_metadata_parse_generic_param): Simplify things;
3072         `generic_container = generic_context->container;' is just fine.
3073
3074         * loader.c (method_from_methodspec): Code cleanups.
3075
3076 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3077
3078         * decimal.c: fix warning (and let gcc generate correct
3079         code on ARM with optimizations).
3080
3081 2005-09-28  Martin Baulig  <martin@ximian.com>
3082
3083         * loader.c
3084         (method_from_memberref): Added `MonoGenericContext *class_context'
3085         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3086         (method_from_methodspec): If we're a memberref, use the enclosing
3087         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
3088
3089 2005-09-28  Martin Baulig  <martin@ximian.com>
3090
3091         * object.c (mono_runtime_invoke_array): Added support for
3092         MONO_TYPE_GENERICINST; fixes #75917.
3093
3094 2005-09-27  Martin Baulig  <martin@ximian.com>
3095
3096         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3097         `k->byval_arg.type' to determine the actual type.
3098
3099         * loader.c (method_from_methodspec): Removed some hacks.
3100
3101 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
3102
3103         * class-internals.h (mono_field_is_deleted): Do the test for
3104         rtspecialname before we check the actual name of the field. This
3105         prevents us from dereferencing a pointer into the string table,
3106         saving us from accessing a few pages
3107
3108         * *.c: Replace the use of {Enter,Leave}CriticalSection with
3109         macros. This will allow a deadlock debugger to easily be plugged
3110         in.
3111
3112 2005-09-27  Martin Baulig  <martin@ximian.com>
3113
3114         * loader.c (method_from_methodspec): Create a "signature"
3115         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
3116
3117 2005-09-27  Martin Baulig  <martin@ximian.com>
3118
3119         * class.c
3120         (inflate_generic_class): Correctly set the new context's
3121         container.
3122
3123         * loader.c
3124         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3125         instead of a `MonoGenericContext *'.
3126         (mono_method_signature_full): Take a `MonoGenericContainer *'
3127         instead of a `MonoGenericContext *'.
3128
3129         * metadata.c
3130         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3131         instead of a `MonoGenericContext *'.
3132         (mono_metadata_parse_method_signature_full): Likewise.
3133
3134 2005-09-26  Martin Baulig  <martin@ximian.com>
3135
3136         * class.c
3137         (mono_class_from_generic_parameter): Set `klass->generic_container'
3138         (mono_class_from_generic_parameter): Likewise.
3139         (mono_bounded_array_class_get): We inherit the generic container
3140         from the element class.
3141
3142         * loader.c
3143         (find_method, find_method_in_class): Take a `MonoGenericContext *'
3144         argument rather than computing it here.
3145         (method_from_memberref): Correctly set the generic context before
3146         parsing the signature.  Fixes #75681.
3147
3148 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
3149
3150         * object.c (mono_class_has_special_static_fields): Fix warnings.
3151
3152 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3153
3154         * assembly.c: Add parse_public_key function, to
3155         par the public keys. Also added mono_assembly_name_parse_full,
3156         to define it the parsed key should be freed or not.
3157         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3158         to parse a long format assembly name.
3159         * metadata-internals.h: Keep mono_assembly_name_parse_full as
3160         private, since calling it to preserve the key requires
3161         freeing it manually.
3162         
3163 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
3164
3165         * locales.c : removed HAVE_ICU part.
3166
3167 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3168
3169         * object.c (mono_class_create_runtime_vtable): Avoid calling 
3170         field_is_special_static if the klass has no special static fields.
3171
3172         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3173         (MonoCachedClassInfo): Likewise.
3174
3175         * object.c (mono_class_has_special_static_fields): New helper function.
3176
3177 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3178
3179         * class.c (mono_class_create_from_typedef): Don't call 
3180         interfaces_from_typedef_full for enums.
3181         (mono_class_create_from_typedef): Compute the base types of enums directly
3182         without calling mono_class_setup_fields ().
3183         (mono_class_find_enum_basetype): New helper function.
3184
3185         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3186         one place inside the string heap.
3187         
3188 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3189
3190         * class.c: locking fixes, code cleanups, some docs added.
3191         Allocate some data structures in the image mempool.
3192
3193 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3194
3195         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3196         the example code.
3197         
3198 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3199
3200         * class-internals.h, class.c, reflection.c: reduce memory taken by
3201         MonoClass.
3202
3203 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3204
3205         * metadata.c, metadata.h, loader.h: documentation updates, code and
3206         API cleanups.
3207
3208 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3209
3210         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3211         the example code.
3212
3213         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3214         page faults caused by the runtime while reading metadata.
3215
3216 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3217
3218         * socket-io.c: the field names were changed 3 months ago and no one
3219         realized until bug #76077 got filed!
3220
3221 2005-09-20  Martin Baulig  <martin@ximian.com>
3222
3223         * icall.c (assembly_icalls): Removed some unused debugger icalls.
3224
3225 2005-09-20  Martin Baulig  <martin@ximian.com>
3226
3227         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3228         write the rank into the class entry.
3229
3230 2005-09-20  Martin Baulig  <martin@ximian.com>
3231
3232         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3233
3234 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
3235
3236         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3237
3238         * icall.c (custom_attrs_defined_internal): New icall.
3239
3240         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3241         function.
3242         (mono_custom_attrs_construct_by_type): New helper function.
3243
3244 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
3245
3246         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3247         terminate the resulting string. Fixes #76123.
3248
3249 2005-09-16  Martin Baulig  <martin@ximian.com>
3250
3251         * mono-debug.c
3252         (mono_debug_add_method): Ignore inflated methods for the moment.
3253
3254 2005-09-14  Martin Baulig  <martin@ximian.com>
3255
3256         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3257
3258 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
3259
3260         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3261         return a success/failure indication.
3262         (mono_metadata_interfaces_from_typedef_full): Ditto.
3263         (get_constraints): Ditto.
3264
3265 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
3266
3267         * marshal.c (emit_marshal_array): Fix handling of null arrays.
3268         
3269         * marshal.c (emit_marshal_array): Add support for returning string
3270         arrays from delegates. Fixes #76063.
3271
3272         * marshal.c: Use the emit_ldloc/stloc macros where possible.
3273
3274 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
3275
3276         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3277         icall.
3278
3279 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
3280
3281         * reflection.c icall.c: Fix after mono_get_exception_type_load
3282         signature change.
3283
3284         * assembly.c (mono_assembly_get_assemblyref): New helper function.
3285         (mono_assembly_load_reference): Use the new helper.
3286
3287         * class-internals.h (MonoLoaderError): New structure containing 
3288         information about type loading errors.
3289
3290         * class-internals.h loader.c: Add APIs to store per-thread loader
3291         error information.
3292
3293         * loader.c class.c: Set the loader error if needed.
3294
3295         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3296
3297 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3298
3299         * decimal.c: fixed to handle the broken ARM fp format.
3300
3301 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3302
3303         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3304         broken.
3305
3306 2005-09-06  Martin Baulig  <martin@ximian.com>
3307
3308         * domain.c (supported_runtimes): Added v2.0.50727.
3309
3310 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3311
3312         * culture-info.h: reduce the size of some structures.
3313
3314 2005-09-05  Martin Baulig  <martin@ximian.com>
3315
3316         Reflect latest API changes in the August CTP.
3317
3318         * icall.c
3319         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3320         ("MonoType.HasGenericArguments"): Removed.
3321         ("MonoMethod.BindGenericParameters"): Renamed to
3322         "MakeGenericMethod".
3323         ("MethodBuilder.BindGenericParameters"): Renamed to
3324         "MakeGenericMethod".    
3325
3326 2005-09-05  Martin Baulig  <martin@ximian.com>
3327
3328         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3329
3330 2005-09-05  Martin Baulig  <martin@ximian.com>
3331
3332         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3333
3334         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3335         generic_container is non-NULL.
3336
3337 2005-09-05  Martin Baulig  <martin@ximian.com>
3338
3339         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3340
3341         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3342
3343 2005-08-29  Michal Moskal  <malekith@nemerle.org>
3344
3345         * reflection.c (encode_locals,
3346         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3347         for large generic types.
3348
3349 2005-09-05  Martin Baulig  <martin@ximian.com>
3350
3351         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3352
3353         * class.c (mono_dup_array_type): New public method.
3354         (mono_metadata_signature_deep_dup): New public method.
3355         (dup_type): Correctly duplicate array and function types.
3356
3357 2005-09-05  Martin Baulig  <martin@ximian.com>
3358
3359         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3360
3361         * reflection.c (get_default_param_value_blobs): Handle generic types
3362         and generic methods.
3363
3364 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
3365
3366         * class.c: Fixed error reporting (method/class were inversed) for 
3367         inheritance demands.
3368         * security-manager.c|h: Added the AppDomain when calling the managed
3369         System.Security.SecurityManager.InheritanceDemand method.
3370
3371 2005-09-01  Raja R Harinath  <rharinath@novell.com>
3372
3373         * reflection.c (encode_marshal_blob): 'marshaltype' and
3374         'marshaltyperef' are alternate sources for the custom marshaler
3375         name.
3376
3377 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3378
3379         * class.c: fix creation of array classes with rank == 1
3380         (patch by Ankit Jain <jankit@novell.com>).
3381
3382 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3383
3384         * object.c: fix check for creating the bound data for arrays vs
3385         szarrays.
3386
3387 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3388
3389         * object.c: configuration file name is now based on the executable name,
3390         not the image name. Fixes bug #75931.
3391
3392 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
3393
3394         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3395         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3396
3397 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
3398
3399         * rand.c: Use wincrypt.h instead of WinCrypt.h.
3400
3401 2005-08-24  Ankit Jain  <jankit@novell.com>
3402             Raja R Harinath  <rharinath@novell.com>
3403
3404         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3405           called by it recursively.
3406           (mono_class_init): Remove special case in pending_init handling, since it's
3407           superseded by the fix to mono_class_from_typeref.
3408
3409 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
3410
3411         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
3412         BROKEN_THREAD_START stuff.
3413
3414 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
3415
3416         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
3417         trampoline.
3418
3419         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3420         
3421         * object.c (mono_delegate_ctor): Replace the original function address with
3422         a delegate trampoline.
3423
3424 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3425
3426         * icall.c: add boolean argument to base64_to_byte_array and 
3427         InternalFromBase64String to control whether a whitespace-only string
3428         is allowed (or should casue a FormatException to be thrown). We need
3429         this as the behavior has changed between MS.NET 1.x and 2.0, and we
3430         to match the MS behaviour in both profiles.
3431         * appdomain.c: Bump corlib version.
3432
3433 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3434
3435         This patch implements a big portion of publisher policy
3436         support, used to bind assembly versions and redirect
3437         one assembly from version A to version B.
3438
3439         * assembly.c:
3440         New GSList loaded_assembly_bindings, for storing the cached
3441         assembly bindings.
3442         (assembly_binding_maps_name): New static function for checking if a 
3443         assembly binding information maps an assembly name.
3444         (mono_assembly_binding_info_free): New function for freeing
3445         assembly binding information resources.
3446         (get_publisher_policy_info): New static function for retrieving 
3447         assembly binding information from a MonoImage.
3448         (compare_versions): New static function for comparing an assembly
3449         binding information data and the version of an assembly name.
3450         (check_policy_versions): New static function for checking if an
3451         assembly binding info mapping an assembly name is valid for it.
3452         (mono_assembly_load_publisher_policy): New static function for
3453         loading the 'policy.major.minor.MyAssembly' image for an assembly
3454         with an assembly name 'aname'.
3455         (mono_assembly_bind_version): New static function for updating
3456         assembly redirection.
3457         (mono_assembly_apply_binding): New static function for applying
3458         assembly binding.
3459         (search_binding_loaded): New static function for searching 
3460         loaded assembly binding infos in the cache domain.
3461         (mono_assembly_load_full): Don't apply assembly binding for
3462         reflection only assemblies.
3463
3464         * metadata-internals.h: Add MonoAssemblyBindingInfo,
3465         which contains information about assembly binding. Also
3466         declare signature for mono_config_parse_publisher_policy ()
3467         function, used to retrieve pub policy info.
3468         
3469         * mono-config.c:
3470         (publisher_policy_start): New static function used to parse publisher 
3471         policy config files.
3472         (publisher_policy_parser): New static MonoParseHandler containing 
3473         the functions used when parsing config files.
3474         (mono_config_parse_publisher_policy): New function for parsing
3475         publisher policy files.
3476         
3477 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
3478
3479         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3480
3481         * marshal.c (mono_delegate_free_ftnptr): Ditto.
3482
3483         * object.c (mono_get_addr_from_ftnptr): New helper function.
3484
3485         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3486
3487         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3488
3489 2005-08-19  Dick Porter  <dick@ximian.com>
3490
3491         * threads.c, threads.h, appdomain.c, appdomain.h,
3492         profiler-private.h, monitor.c, object.c, object-internals.h,
3493         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3494         store the thread ID, so it can hold a 64 bit value if needed.
3495
3496 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
3497
3498         * reflection.c (mono_reflection_create_dynamic_method): Store the
3499         handle class into the method references as well so ldtoken works in
3500         dynamic methods.
3501
3502         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3503         types.
3504
3505 2005-08-19  Ankit Jain <jankit@novell.com>
3506
3507         Fix #75847.
3508         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
3509           here rather than using the method signature of a arbitrary function
3510           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
3511           two arguments.
3512           Hack done with Harinath.
3513
3514 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3515
3516         * threadpool.c: disable printing stack traces when we get a exception
3517         in a threadpool thread. I need to do more testing to figure out which
3518         cases actually print this. Fixes bug #75828.
3519
3520 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3521
3522         * icall.c: there might be ignored whitespace after the last '='. This
3523         fixes length computation and bug #75840.
3524
3525 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
3526
3527         * assembly.c (mono_assembly_load_full): Consider .exe extension as
3528         well. Fixes #75809.
3529
3530         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3531         #75784.
3532         
3533         * reflection.c (create_custom_attr_data): Ditto.
3534
3535 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
3536
3537         * locales.c, culture-info.h : removed RegionLCIDMap.
3538         * culture-info-tables.h : regenerated.
3539
3540 2005-08-16  Martin Baulig  <martin@ximian.com>
3541
3542         * class.c (mono_type_get_name_recurse): Small fix.
3543
3544 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
3545
3546         * locales.c : indentation fixie.
3547
3548 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
3549
3550         * object-internals.h,
3551           locales.h,
3552           locales.c,
3553           culture-info.h,
3554           icall.c : added RegionInfo table support.
3555         * culture-info-table.h : regenerated for region support.
3556
3557 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
3558
3559         * reflection.c (resolve_object): handle all kinds of MonoMethod
3560         including generic ones
3561
3562 2005-08-12  Ankit Jain <jankit@novell.com>
3563
3564         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3565           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
3566
3567 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
3568
3569         * process.c: Don't close a thread handle when it's NULL. This is a
3570         workaround for bug #75733.
3571
3572 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
3573
3574         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3575
3576 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
3577
3578         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3579
3580 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3581
3582         * threadpool.c: if a work item in the thread pool has a callback that
3583         catches a exception, don't propagate it after invoking the callback.
3584         Fixes bug #75336.
3585
3586 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
3587
3588         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3589
3590         * class-internals.h (MonoCachedClassInfo): Add some new fields.
3591
3592         * class.c (mono_class_init): Load field info lazily in the AOT case.    
3593
3594         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3595
3596 2005-08-03  Ankit Jain  <jankit@novell.com>
3597
3598         Fix #75683.
3599         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3600           PInvoke calling convention is 0.
3601
3602 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
3603
3604         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
3605         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3606
3607 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3608
3609         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3610         to handle threads not started by the GC (patch by Michael Meeks
3611         <michael.meeks@novell.com>).
3612
3613 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
3614
3615         * reflection.c: Make buffer used in emitting types larger for some
3616         big generic types (patch by Michal Moskal).
3617
3618 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
3619
3620         * mono-debug.c: Fix some (not all) alignment problems.
3621
3622 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3623
3624         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3625         Invoke mono_image_load_from_data_full passing the refonly
3626         parameter.
3627
3628         * assembly.c
3629         (mono_assembly_open_from_bundle): Add the refonly argument, 
3630         in order to pass it to other methods it calls to.
3631         (do_mono_assembly_open): Add the refonly argument, in order 
3632         to pass it to other methods it calls to.
3633         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3634         the refonly parameter to it.
3635
3636         * image.c: Add loaded_images_refonly_hash and
3637         loaded_images_refonly_guid_hash to cache the reflection
3638         only loaded images.
3639         (mono_images_init): Initialize the hash tables used for
3640         caching the reflection only images.
3641         (load_modules): Invoke mono_image_open_full passing the refonly
3642         parameter to load the modules the correct way.
3643         (build_guid_table): Add the refonly argument, to re-build the 
3644         correct hash table.
3645         (do_mono_image_open): Added the refonly argument, in order to
3646         define it for the loaded image.
3647         (mono_image_loaded_full): New function, which receives an
3648         additional parameter to look for the image in the refonly or
3649         non-refonly section.
3650         (mono_image_loaded): Updated, using mono_image_loaded_full.
3651         (mono_image_loaded_by_guid_full): The same case that happens
3652         with mono_image_loaded_full.
3653         (mono_image_loaded_by_guid): Likewise.
3654         (register_image): Use the ref_only variable inside MonoImage
3655         to decide in which hash table store the current image.
3656         (mono_image_open_from_data_full): Rename
3657         mono_image_open_from_data to mono_image_open_from_data_full,
3658         adding the refonly argument, to define the ref_only variable 
3659         inside MonoImage.
3660         (mono_image_open_from_data): Return 
3661         mono_image_open_from_data_full.
3662         (mono_image_open_full): Rename mono_image_open to
3663         mono_image_open_full, receiving the new refonly argument,
3664         to pass it to inner methods.
3665         (mono_pe_file_open): Update this function, to open
3666         a MonoImage as a non-refonly image.
3667         (mono_image_close): Use the refonly variable inside
3668         MonoImage to remove the image from the correct caches.
3669
3670         * image.h: Add the signatures of mono_image_open_full,
3671         mono_image_open_from_data_full, mono_image_loaded_full,
3672         mono_image_loaded_by_guid_full.
3673
3674         * metadata-internals.h: Add the ref_only field to 
3675         MonoImage.
3676         
3677 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3678
3679         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3680         Fix the last behavior, which used to load the assemblies and
3681         extract MonoReflectionAssemblyName information, instead of
3682         extract it from the metadata tables. Needed for Reflection
3683         Only assemblies.
3684         
3685 2005-07-29  Martin Baulig  <martin@ximian.com>
3686
3687         * mono-debug-debugger.c
3688         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3689         not initialized.
3690
3691         * mono-debug.c
3692         (mono_debug_address_from_il_offset): Check whether we have
3693         debugging support before attempting to take the lock.
3694         (mono_debug_source_location_from_address): Likewise.
3695         (mono_debug_source_location_from_il_offset): Likewise.
3696         (mono_debug_il_offset_from_address): Likewise.
3697         (mono_debug_address_from_il_offset): Likewise.
3698
3699 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
3700
3701         * class.c (mono_class_from_name_case): Add support for dynamic images.
3702         Fixes #75650.
3703
3704         * object.c (mono_class_compute_gc_descriptor): Add a workaround
3705         for #75479.
3706
3707 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3708         
3709         * reflection.c (mono_method_get_object): Fix warning.
3710
3711 2005-07-28  Martin Baulig  <martin@ximian.com>
3712
3713         * mono-debug.c
3714         (mono_debug_add_wrapper): Also write the wrapper type.
3715
3716 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3717
3718         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3719         
3720         * class.c (mono_class_init): Avoid reading nested classes if the AOT
3721         data indicates the class has none.
3722
3723 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
3724
3725         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3726         loader lock with the debugger lock. Prevents deadlocks for beagle.
3727
3728         Beagle can now run on an smp box for a weekend without any
3729         issues. Woohoo!
3730
3731 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
3732
3733         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3734         in a module. Fixes #75629.
3735
3736 2005-07-26  Martin Baulig  <martin@ximian.com>
3737
3738         * mono-debug.c (mono_debug_add_wrapper): New static method.
3739         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3740         interncall or a wrapper.
3741
3742         * mono-debug.h (MonoDebugWrapperData): New public typedef.
3743         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3744         (MONO_DEBUGGER_VERSION): Bump to 51.
3745
3746         * mono-debug-debugger.c
3747         (mono_debugger_add_type): Removed this empty function.
3748         (mono_debugger_add_method): Likewise.
3749
3750 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
3751
3752         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
3753         before accessing method->slot.
3754
3755 2005-07-21  Jb Evain  <jbevain@gmail.com>
3756
3757         * reflection.c (method_encode_clauses/class): Handle filters clauses.
3758         Fixes #75010.
3759
3760 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
3761
3762         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3763         #75587.
3764
3765 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3766
3767         * image.h image.c: Add mono_image_get_guid () API function.
3768
3769 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
3770
3771         There were issues when multiple threads tried to load
3772         assemblies. A deadlock was created between assemblies_mutex and
3773         mono_domain_assemblies_lock. This fixes the issue by making the
3774         assembly ref counting be lock free. See bug 75586.
3775         
3776         * image.c (mono_image_close): The add ref function here was using
3777         Interlocked operations while the unref was using a mutex and a
3778         --. I don't think this was ever a bug that would be exposed in a
3779         non-pendantic way (ie, by an embedder doing a ref on one thread
3780         and an unref on another), but for the sake of correctness, this is
3781         now Interlocked.
3782
3783         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3784         (mono_assembly_load_reference): Call mono_assembly_addref rather
3785         than touching the refcount ourselves.
3786         (mono_assembly_close): Use InterlockedDecrement to unref the
3787         assembly. Don't acquire the lock unless it is actually needed.
3788
3789 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3790
3791         * class.c (mono_class_layout_fields): Fix calculation of has_references
3792         for generic types.
3793
3794 2005-07-12  Martin Baulig  <martin@ximian.com>
3795
3796         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3797
3798         * metadata.c
3799         (mono_type_hash): Provide better hashing for generic instances.
3800         (mono_generic_inst_hash): Improve hashing.
3801         (mono_generic_class_hash): Likewise.
3802
3803         * reflection.c (mymono_metadata_type_hash): Improve hashing for
3804         generic instances.
3805
3806 2005-07-12  Martin Baulig  <martin@ximian.com>
3807
3808         * reflection.c (mono_reflection_create_runtime_class): Remove the
3809         hack for generic type definitions and non-`Run' assemblies.
3810         (mono_reflection_bind_generic_parameters): Also use
3811         `klass->wastypebuilder' to check for TypeBuilders.
3812
3813 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3814
3815         * class.c (mono_class_layout_fields): Fix calculation of has_references
3816         for generic types.
3817
3818         * class.c (inflate_generic_class): Fix a leak.
3819         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3820         for generic types.
3821
3822 2005-07-11  Martin Baulig  <martin@ximian.com>
3823
3824         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3825         on error.
3826
3827 2005-07-11  Martin Baulig  <martin@ximian.com>
3828
3829         * loader.c (find_method): Also lookup in
3830         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3831
3832 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3833
3834         * appdomain.c (mono_domain_unload): Don't free the error message
3835         before passing it to mono_get_exception_...
3836
3837         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3838         
3839 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3840
3841         * threads.c: try to better guess an available RT signal (bug #75387).
3842
3843 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3844
3845         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3846         and CACHE_OBJECT.
3847
3848 2005-07-07  Martin Baulig  <martin@ximian.com>
3849
3850         * class.c (mono_type_get_name_full): Return NULL for
3851         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3852         fixes #75408.
3853
3854 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3855
3856         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3857         exit the appdomain as well being aborted.
3858
3859         * threadpool.c: Create all threadpool threads inside the root appdomain, and
3860         change back to the root domain after calling managed code. This enables
3861         appdomains using threadpools to be unloaded.
3862
3863 2005-07-07  Martin Baulig  <martin@ximian.com>
3864
3865         * class-internals.h
3866         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3867         into `MonoDynamicGenericClass' since we only need it for dynamic
3868         types.
3869
3870         * reflection.c (mono_class_bind_generic_parameters): We don't need
3871         to compute the `parent' here.
3872
3873 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
3874
3875         * culture-info-table.h : regenerated.
3876
3877 2005-07-06  Martin Baulig  <martin@ximian.com>
3878
3879         * icall.c
3880         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3881
3882         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3883
3884 2005-07-06  Martin Baulig  <martin@ximian.com>
3885
3886         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3887         we're doing a signature-only comparision; fixes #74945.
3888
3889 2005-07-06  Martin Baulig  <martin@ximian.com>
3890
3891         * class-internals.h (MonoGenericClass): Moved some things out into
3892         a new `MonoInflatedGenericClass' type.  
3893         (MonoInflatedGenericClass): New type; the `klass' of a
3894         `MonoGenericClass' is now computed lazyly in
3895         mono_get_inflated_generic_class().      
3896
3897         * class.c (mono_get_inflated_generic_class): New public function.
3898         (mono_class_inflate_generic_method): Removed the unused
3899         `MonoClass *' argument.
3900         (setup_generic_vtable): Don't call mono_get_inflated_method() on
3901         all the methods.
3902         (mono_class_create_generic): Make this static and merge it with
3903         mono_class_create_generic_2(); we're now called automatically from
3904         mono_get_inflated_generic_class().
3905
3906         * loader.c (mono_method_signature): Call
3907         mono_get_inflated_method() here.
3908
3909 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
3910
3911         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3912         type of fields with RVA.
3913
3914         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3915         for this pseudo class.
3916         (my_mono_class_from_generic_parameter): Likewise.
3917         (mono_class_init): Allow interfaces to have cctors.
3918
3919 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3920
3921         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3922         lazily for AOT methods.
3923
3924 2005-07-05  Martin Baulig  <martin@ximian.com>
3925
3926         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3927         returns FALSE for a successful match, not TRUE.
3928
3929 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3930
3931         * loader.c (mono_method_get_index): Optimize this a bit.
3932
3933 2005-07-04  Martin Baulig  <martin@ximian.com>
3934
3935         * class.c
3936         (class_compute_field_layout): Move the check for generic type
3937         definitions into mono_class_layout_fields().  Fixes #74684.
3938         (mono_class_from_generic_parameter): Correctly compute
3939         `klass->parent'; fixes #75457.
3940
3941         * reflection.c (register_assembly, register_module): Make sure
3942         `domain->rejobject_hash' is already created.
3943
3944 2005-07-02  Martin Baulig  <martin@ximian.com>
3945
3946         * class-internals.h
3947         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3948         `MonoDynamicGenericClass'.      
3949
3950 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
3951
3952         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3953         returned by a field getter is null, since null is a valid value.
3954
3955 2005-07-01  Martin Baulig  <martin@ximian.com>
3956
3957         * reflection.c (mono_reflection_generic_class_initialize): Update
3958         the `dgclass->fields [i].parent' to the correct class.
3959         (mono_image_get_fieldref_token): Use the declaring type, not the
3960         reflected type.
3961
3962 2005-07-01  Martin Baulig  <martin@ximian.com>
3963
3964         * loader.c (find_method): Also look in the interfaces; fixes #75429.
3965
3966 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
3967
3968         * threads.c (thread_cleanup): assert that thread != NULL
3969         (wait_for_tids_or_state_change): We were using the wrong variable
3970         when accessing wait->threads. `i' was always out of the bounds of
3971         the array.
3972
3973 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3974
3975         * loader.c: map user32 and kernel32 to libMonoSupportW
3976
3977 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
3978
3979         * appdomain.c (unload_thread_main): Mark this as WINAPI.
3980
3981 2005-06-28  Martin Baulig  <martin@ximian.com>
3982
3983         * loader.c (method_from_methodspec): Fix #75334.
3984
3985 2005-06-28  Martin Baulig  <martin@ximian.com>
3986
3987         Fix #74953 - Arrays now implement the generic IList<T> interface
3988         on the 2.0 platform.
3989
3990         * class-internals.h (MonoDefaults): Added `generic_array_class'.
3991
3992         * reflection.c (mono_class_bind_generic_parameters): New public
3993         function; similar to mono_reflection_bind_generic_parameters(),
3994         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3995
3996         * domain.c (mono_init_internal): Try to initialize.
3997         `mono_defaults.generic_array_class' here; this'll only succeed if
3998         we're using the 2.0 corlib.
3999
4000         * icall.c
4001         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
4002         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
4003         (mono_lookup_internal_call): Added support for nested classes.
4004
4005         * loader.c
4006         (mono_get_method_from_token): Set `result->signature->pinvoke' if
4007         we're an interncall and have generic arguments.
4008
4009         * class.c
4010         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
4011         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
4012         instance of System.Array.InternalArray<T> for arrays, so they
4013         implement the generic IList<T> interface.
4014
4015 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
4016
4017         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
4018         (chastamar@yahoo.com). Fixes #75374.    
4019
4020 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
4021
4022         * culture-info-table.h: regenerated.
4023
4024 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4025
4026         * icall.c: handle spaces correctly for base64 strings.
4027
4028 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
4029
4030         * *.c: Kill some warnings.
4031
4032 2005-06-23  Duncan Mak  <duncan@novell.com>
4033
4034         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
4035         that this builds on Solaris 10 (x86).
4036
4037 2005-06-23  Martin Baulig  <martin@ximian.com>
4038
4039         * class.c
4040         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4041         generic type definitions.
4042
4043 2005-06-23  Martin Baulig  <martin@ximian.com>
4044
4045         Fix #75331.
4046
4047         * metadata.c (mono_class_get_overrides): Renamed to
4048         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4049         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4050         pass it to mono_get_method_full().
4051
4052 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
4053
4054         * reflection.c (mono_reflection_create_runtime_class): take the
4055         mono_domain_lock in this method. Prevents deadlocks
4056
4057 2005-06-22  Martin Baulig  <martin@ximian.com>
4058
4059         * loader.c (method_from_methodspec): Fix #75330.
4060
4061 2005-06-22  Martin Baulig  <martin@ximian.com>
4062
4063         * reflection.c (type_get_qualified_name): Use
4064         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4065         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4066         argument; use it if we don't have an assembly name.
4067
4068 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
4069
4070         * object.c: In mono_message_init, set "copy out" flag for in
4071         parameters with the [Out] flag.
4072
4073 2005-06-21  Martin Baulig  <martin@ximian.com>
4074
4075         * class.c
4076         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4077         and MONO_TYPE_PTR.
4078
4079 2005-06-21  Martin Baulig  <martin@ximian.com>
4080
4081         * class.c (mono_class_init): Don't initialize `class->fields' for
4082         generic instances since they're initialized again in
4083         compute_field_layout(). 
4084         (compute_field_layout): Set the field's `generic_info' here; fix
4085         #75320. 
4086
4087 2005-06-21  Martin Baulig  <martin@ximian.com>
4088
4089         * class-internals.h
4090         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4091
4092         * metadata.c (mono_metadata_generic_method_equal): Also
4093         distinguish the `generic_class'; fixes #75334.
4094
4095 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4096
4097         * domain.c:
4098         * appdomain.c:
4099         * domain-internals.h:
4100         * reflection.c: 'domain_assemblies' field is now protected by its own
4101         lock. Don't call into managed code to run the AssemblyLoad event if we
4102         now there are no registered delegates for it.
4103
4104 2005-06-20  Martin Baulig  <martin@ximian.com>
4105
4106         * class.c (mono_class_is_assignable_from): Use a custom version of
4107         mono_class_has_parent() to make things work for generic instances;
4108         fix #75300.
4109
4110 2005-06-20  Martin Baulig  <martin@ximian.com>
4111
4112         * loader.c (method_from_methodspec): Apply a patch from
4113         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4114
4115 2005-06-20  Martin Baulig  <martin@ximian.com>
4116
4117         * class.c (mono_class_init): Reverted Zoltan's last change; it
4118         breaks generics.
4119
4120 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
4121
4122         * threads.c (wait_for_tids_or_state_change): Add missing locking.
4123
4124 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4125
4126         * socket-io.c: fix the index in the socket array for writable/error
4127         sockets. Fixes bug #75306.
4128
4129 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
4130
4131         * class.c (mono_class_init): Allow interfaces to have static ctors.
4132
4133 2005-06-17  Martin Baulig  <martin@ximian.com>
4134
4135         * loader.c (method_from_methodspec): Use `context->container' when
4136         parsing the `gmethod->inst'.
4137
4138 2005-06-17  Martin Baulig  <martin@ximian.com>
4139
4140         * class.c (mono_type_get_name_recurse): Don't add the assembly
4141         name for type arguments.
4142
4143 2005-06-15  Martin Baulig  <martin@ximian.com>
4144
4145         * reflection.c (mono_image_get_inflated_method_token): Encode
4146         correct klass; fixes #75260.
4147
4148 2005-06-13 Michal Moskal <malekith@nemerle.org>
4149
4150         * icall.c: Make GetCorrespondingMethod/Constructor take
4151         MonoReflectionMethod method not MonoMethod. Removed
4152         MonoType.GetCorrespondingField, and make
4153         MonoGenericType.GetCorrespondingField take name not
4154         MonoClassField.
4155
4156 2005-06-13  Michal Moskal <malekith@nemerle.org>
4157
4158         * reflection.c (field_encode_signature, encode_locals):
4159          Make sizes of buffers for types larger (for big generic types).
4160          (create_generic_typespec,
4161          mono_reflection_sighelper_get_signature_local,
4162          mono_reflection_sighelper_get_signature_field):
4163          Add asserts for too small buffers.
4164
4165 2005-06-15  Martin Baulig  <martin@ximian.com>
4166
4167         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4168         if our parent is not a dynamic type.
4169
4170 2005-06-15  Martin Baulig  <martin@ximian.com>
4171
4172         * class-internals.h (MonoTypeNameFormat): New enum.
4173
4174         * class.c
4175         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4176         (mono_type_get_full_name): Removed.
4177         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4178         argument instead of the boolean's.
4179
4180         * icall.c (ves_icall_System_MonoType_getFullName):
4181         Added `gboolean assembly_qualified'.    
4182
4183         * reflection.h
4184         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4185
4186         * reflection.c (mono_reflection_parse_type): Parse the new type
4187         name format.
4188
4189 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4190
4191         * icall.c: no need to convert from utf16 to utf8 and then back again
4192         after the call to GetLogicalDrives.
4193
4194 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4195
4196         * icall.c: frombase64. Fix problems exposed by new tests.
4197
4198 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4199
4200         * icall.c: added internal calls for converting char [] and strings in
4201         base64 into byte [].
4202
4203 2005-06-10  Martin Baulig  <martin@ximian.com>
4204
4205         * class.c (mono_class_create_generic_2): Read the nested classes
4206         from the metadata rather than from `gklass->nested_classes' since
4207         `gklass' might not be initialized yet.
4208
4209 2005-06-09  Duncan Mak  <duncan@novell.com>
4210
4211         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4212         all public headers. Fixes #74919.
4213
4214 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
4215
4216         * domain.c: The key for proxy_vtable_hash is now a pointer
4217         array. Added new GHashFunc and GCompareFunc functions for this.
4218
4219         * class.h: The list of interfaces in MonoRemoteClass is known in
4220         advance and can't grow (we create a new MonoRemoteClass if needed),
4221         so now the interface array can be allocated together with
4222         MonoRemoteClass.
4223         
4224         * object.c: Added a new method create_remote_class_key.
4225         Fixed mono_remote_class so it does not depend on
4226         mono_upgrade_remote_class.
4227         Removed extend_interface_array.
4228         Added new method clone_remote_class(), which makes a copy of a remote
4229         class and adds a new interface or class to it.
4230         mono_upgrade_remote_class() now creates a new remote class (or gets
4231         it from the cache) if an vtable upgrade is needed. In this way
4232         we make sure that other objects sharing the same remote class
4233         don't get the new vtable with unwanted interfaces.
4234         
4235         * object-internals.h:
4236         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4237         
4238         * marshal.c: Track changes in mono_upgrade_remote_class().
4239
4240 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
4241         * icall.c: Add runtime methods for obtaining members of inflated
4242         class, which were created from supplied non-inflated members. It
4243         is used in internal Get{Method,Constructor,Field} methods in
4244         System.Type
4245
4246 2005-06-09  Martin Baulig  <martin@ximian.com>
4247
4248         * reflection.c
4249         (mono_reflection_bind_generic_method_parameters): Fix #75169.
4250
4251 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4252         * reflection.c (mono_image_basic_init): Define
4253         Version in MonoDynamicAssembly. 
4254         
4255 2005-06-08  Martin Baulig  <martin@ximian.com>
4256
4257         Fix #75136.
4258
4259         * loader.c
4260         (mono_method_signature_full): New public method; takes a
4261         `MonoGenericContext *'.
4262         (find_method): Use mono_method_signature_full() and pass the
4263         klass'es context to it.
4264
4265         * class.c (mono_class_is_inflated_method): Use
4266         mono_method_signature_full() and pass the context to it.
4267
4268 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4269
4270         * object.c: add proper locking in mono_remote_class_vtable(),
4271         fixes possible memory corruption.
4272
4273 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
4274
4275         * marshal.c (mono_remoting_marshal_init): set
4276         initialized after initialization.
4277
4278 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
4279
4280         * locales.c : hush.
4281
4282 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
4283
4284         * object.c (extend_interface_array): fix really silly
4285         memory corrupting / comparison bug.
4286
4287 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4288
4289         * reflection.c: Functions added to support the creation
4290         of CustomAttributeData, which includes Attribute data
4291         used by ReflectionOnly methods.
4292
4293         * reflection.h:  mono_reflection_get_custom_attrs_data and
4294          mono_custom_attrs_data_construct added (functions exposed).
4295
4296          * icall.c: Added mono_reflection_get_custom_attrs_data
4297          as icall.
4298         
4299 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
4300
4301         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4302         lupus's request.
4303
4304 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
4305
4306         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4307
4308         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4309         dynamic DllImportAttribute.
4310
4311         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
4312         dynamic DllImportAttribute.
4313
4314         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4315         Fixes #75162.
4316
4317 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4318
4319         * threads.c: avoid segfault when an unstarted thread is aborted.
4320
4321 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
4322
4323         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4324         Returns the name and version of the runtime for reporting.
4325
4326 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4327
4328         * appdomain.c: bump corlib version.
4329         * object-internals.h: new field in MonoReflectionAssembly.
4330
4331 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4332
4333         * object-internals.h: Carlos forgot to add this field.
4334
4335 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4336
4337         * icall.c: Added create_version to create instances
4338         of Version of MonoReflectionAssemblyName. This change helps
4339         the AssemblyName tests to keep running fine.
4340         
4341 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
4342   
4343         * object.c (mono_method_return_message_restore): A somehow less
4344         intrusive fix for #75138.
4345
4346 2005-06-03  Raja R Harinath  <rharinath@novell.com>
4347
4348         * object.c (mono_method_return_message_restore): Fix computation
4349         of expected number of out args.
4350
4351 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4352
4353         * reflection.c (mono_image_get_method_info): Fix the case when the
4354         charset is empty.
4355
4356 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
4357
4358         * object.c: Added missing null check in
4359           mono_method_return_message_restore.
4360
4361 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4362
4363         * reflection.c (mono_image_get_method_info): Handle the case when
4364         dllentry is empty.
4365
4366 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
4367
4368         * object.c: When creating the vtable for a proxy, take into account
4369         all inherited interfaces, not only the ones registered in
4370         iclass->interfaces. This fixs bug #74996.
4371         Also, in mono_method_return_message_restore, verify that the array
4372         of out args has the expected lengh.
4373
4374 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4375
4376         * socket-io.c: update the timeout in Poll when the call is interrupte.
4377
4378 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4379
4380         * socket-io.c: support abort/suspend in Select_internal after last
4381         change.
4382
4383 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4384
4385         * threadpool.c: remove warning.
4386
4387 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4388
4389         * icall.c:
4390         * socket-io.[ch]: Select_internal uses poll() now when available, thus
4391         removing the 1024 limit from select(). Runtime part of the fix for
4392         bug #71203.
4393
4394 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4395
4396         * socket-io.c: when resolving the addresses for the same
4397         host returned by gethostname(), get the local IPs from the interface
4398         list. Loopback addresses are discarded if the are interfaces up with
4399         non-loopback ones. Fixes bug #63265.
4400
4401 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
4402
4403         * appdomain.c, verify.c, object-internals.h, reflection.c:
4404         bumped corlib number to 36, and added new extra_flags field
4405         to ReflectionMethodBuilder and friends.  Fixes #75060.
4406
4407 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4408
4409         * gc.c: register a new weak link only if the object is non-null
4410         (fixes bug#75047).
4411
4412 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4413
4414         * culture-info.h : short time pattern too.
4415
4416 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4417
4418         * culture-info.h : expand long time pattern string length.
4419
4420 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4421
4422         * culture-info-table.h : update (more French date format; #72788).
4423
4424 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
4425
4426         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4427         the method is static. Fixes #75029.
4428
4429 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
4430
4431         * reflection.c: Update the table_idx field of method builders after
4432         saving the module, since it can change. This is a workaround for
4433         bug #74914. 
4434
4435 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4436
4437         * culture-info-table.h : update (additional French date format).
4438
4439 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
4440
4441         * icall.c (ves_icall_type_Equals): Revert last change.
4442         
4443         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4444
4445         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4446
4447 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
4448
4449         * class-internals.h: Added executioncontext_class field to 
4450         MonoDefaults structure.
4451         * domain.c: Cache System.Threading.ExecutionContext class in 
4452         mono_defaults.
4453         * object.c: Capture the ExecutionContext for asynchroneous calls in
4454          mono_async_result_new.
4455         * object-internals.h: Added execution_context and original_context 
4456         fields to MonoAsyncResult. Added execution_context to MonoThread.
4457         * security-manager.c|.h: Added mono_get_context_capture_method to 
4458         return the capture method (if required by the security manager or by
4459         the framework version used).
4460         * threadpool.c: Apply capture (if present) ExecutionContext in 
4461         mono_async_invoke and revert to original context after it completes.
4462
4463 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
4464
4465         * culture-info-table.h : updated (real hacky solution for zh-CHT).
4466
4467 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
4468
4469         * culture-info-table.h : zh-CHT related workaround.
4470
4471 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4472
4473         * marshal.c (emit_marshal_custom): Add some error checking and call the
4474         methods in the ICustomMarshaler interface. Fixes #74875.
4475         
4476         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4477         native->managed wrappers.
4478
4479 2005-05-12  Martin Baulig  <martin@ximian.com>
4480
4481         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4482         here and use the loader lock.
4483
4484         * mono-debug.c: Properly lock when the debugger is not attached.
4485         (mono_debug_init): Release the initial lock if we're not running
4486         in the debugger.
4487
4488 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4489
4490         * marshal.c (emit_marshal_custom): Pass through NULL values without
4491         calling the custom marshalling routines.
4492
4493         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4494         conversion in structures. Fixes #74882.
4495
4496 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
4497
4498         * culture-info-table.h : zh-* cultures were missing.
4499
4500 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
4501
4502         * threads.c: Added a new event background_change_event which is signaled
4503         when a thread changes its background mode.
4504         Moved here several checks previously done in managed code. The checks
4505         require the thread lock, and using the thread lock in managed code
4506         can result in deadlocks.
4507         Merged Start_internal and Thread_internal into a single method. Now 
4508         Thread_internal does all work of creating and starting a thread.
4509         Added icalls for setting and getting the state of the object. Moved from
4510         managed code to avoid locking there.
4511         Added wait_for_tids_or_state_change() which is called instad of
4512         wait_for_tids when waiting for non-backround threads to end. This method
4513         will return if one of the threads ends or the background_change_event
4514         is signaled.
4515         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4516         the background mode. This method signals the background_change_event
4517         event.
4518         * icall.c:
4519         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4520         removed Start_internal.
4521         
4522 2005-05-11  Martin Baulig  <martin@ximian.com>
4523
4524         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4525         to order of some fields to get proper alignment on 64-bit machines.
4526
4527 2005-05-11  Martin Baulig  <martin@ximian.com>
4528
4529         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4530         changes as they're broken and completely fuck up the debugger.
4531
4532         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4533
4534 2005-05-10  Martin Baulig  <martin@ximian.com>
4535
4536         * reflection.c (mono_reflection_generic_class_initialize): Don't
4537         call mono_class_setup_parent() here.
4538
4539 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4540
4541         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4542         send/receive timeout use an integer in milliseconds. We were using a
4543         struct timeval.
4544
4545 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4546
4547         * locales.c:
4548         (internal_get_cultures): reserve the first slot of the array for the
4549         InvariantCulture, which will be filled in managed code.
4550
4551 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
4552
4553         * reflection.c (mono_image_fill_module_table): Initialize the
4554         GENERATION field as well.
4555
4556 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4557
4558         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4559         Monitor.Enter on the object.
4560
4561 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
4562
4563         * threads.c: Enable the wait for running threads when exiting.
4564         * icall.c: Suspend all threads before exiting.
4565
4566 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
4567
4568         * assembly.c (mono_assembly_load_reference): Fix warning.
4569
4570 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4571
4572         * threadpool.c: changed the default number of threads per cpu. From now
4573         on, the default will be 20 + (5 * number of cpus) instead of 50.
4574
4575 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
4576
4577         * loader.c (mono_method_get_signature_full): Add locking here.
4578
4579 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
4580
4581         * appdomain.c: Moved methods for parsing and freeing assembly
4582         names to assembly.c.
4583         * assembly.c, domain-internals.h: Created public methods for parsing
4584         assembly names. Fixed mono_assembly_load_with_partial_name:
4585         it now finds the best match, taking into account the version,
4586         token and culture specified in the partial name. Also return
4587         the latest version if no version information is specified.
4588
4589 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4590
4591         * threadpool.c: replace check for SocketAsyncCall class.
4592
4593 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4594
4595         * threadpool-internals.h:
4596         * Makefile.am: added threadpool-internals.h
4597
4598         * threadpool.c: call mono_unhandled_exception on exceptions not handled
4599         that happen in threadpool threads (tested on MS).
4600         (mono_thread_pool_remove_socket): new function that dispatch any pending
4601         AIO call on a socket that is closing. By now only epoll really needs it,
4602         as select/poll wake up when the socket closes.
4603
4604
4605         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4606
4607 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
4608
4609         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4610
4611 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
4612
4613         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4614
4615 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
4616
4617         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4618         has an abort request, convert it into a suspend request.
4619
4620 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
4621
4622         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4623         warning for the usage of `UnmanagedFunctionPointerAttribute' which
4624         is not supported yet.
4625
4626 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4627
4628         * image.c: register assemblies loaded from data (bundles) in the loaded
4629         assemblies hash. Fixes bug #74772.
4630
4631 2005-04-29  Martin Baulig  <martin@ximian.com>
4632
4633         * class.c (mono_type_get_name_recurse): Update to the new naming
4634         schema from the latest .NET 2.x beta2.
4635         (mono_class_setup_vtable_general): If we're a generic instance,
4636         copy the vtable from our generic type definition and inflate all
4637         the methods in it.
4638
4639         * loader.c (find_method): Update to the new naming schema from the
4640         latest .NET 2.x beta2.
4641
4642 2005-04-29  Raja R Harinath  <harinath@gmail.com>
4643
4644         * class.c (mono_class_init): Add a mono_loader_unlock to the
4645         #74734 fix.
4646
4647 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4648
4649         * icall.c (ves_icall_System_Environment_Exit): Remove the 
4650         suspend_all_other_threads () call for the time being, since it can hang.
4651
4652         * threads.c (mono_thread_manage): Similarly, disable the waiting for
4653         the background threads to exit, since it can also hang.
4654
4655         * class.c (mono_class_init): Applied patch from Ankit Jain 
4656         (radical@gmail.com). Avoid pending init errors when a field refers
4657         to a nested class using a typeref. Fixes #74734.
4658
4659         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4660         this for dynamic modules.
4661
4662 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4663
4664         * threads.c: don't wait for threads that are in the process of aborting
4665         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4666         and waiting for background threads to finish. This makes xsp and
4667         mod-mono-server exit without random length delays and/or hangs.
4668
4669 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4670
4671         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4672
4673 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
4674
4675         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4676         dynamic types to prevent infinite loops. Fixes #74727.
4677
4678         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4679         ..._is_assignable_to.
4680
4681 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
4682
4683         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4684
4685 2005-04-25  Martin Baulig  <martin@ximian.com>
4686
4687         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4688
4689         * domain.c
4690         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4691
4692         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4693
4694         * reflection.c (build_compressed_metadata): Set metadata header
4695         version to 2.0.
4696
4697 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4698
4699         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4700         number into an integral and a decimal part. Fixes #70473.
4701
4702         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4703
4704 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
4705
4706         * culture-info-table.h : reflected the latest locale-builder output.
4707
4708 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4709
4710         * threadpool.c: check for SuspendRequested too when deciding if
4711         mono_thread_interruption_checkpoint should be called.
4712
4713 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4714
4715         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4716         * threads.c: remove interruption_mutex and use Interlocked instead. When
4717         suspending all the threads, wait for all the suspended events at once.
4718         If we're shutting down and get an APC that is going to be queued,
4719         call mono_thread_execute_interruption immediately, as the thread might
4720         be sleeping on a pthread condition or mutex.
4721
4722         * icall.c: call mono_runtime_set_shutting_down before suspending the
4723         threads.
4724
4725         Fixes bug #74693. And now xsp is happier when exiting.
4726
4727 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4728
4729         * loader.c (mono_stack_walk): Fix #74690.
4730
4731 2005-04-22  Martin Baulig  <martin@ximian.com>
4732
4733         * mono-debug.h (MonoDebugMethodJitInfo): Added
4734         `MonoDebugMethodJitInfo *jit'.
4735
4736         * mono-debug.c (mono_debug_read_method): Cache the
4737         MonoDebugMethodJitInfo in `address->jit'.
4738         (mono_debug_free_method_jit_info): New public method.
4739
4740 2005-04-22  Martin Baulig  <martin@ximian.com>
4741
4742         * class.c (mono_class_is_assignable_from): Disallow
4743         type parameter -> interface.
4744
4745 2005-04-21  Dick Porter  <dick@ximian.com>
4746
4747         * threads.c (mono_thread_create): Turn an assertion into an error.
4748
4749 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4750
4751         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4752         
4753         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
4754         Fix some gcc 4.0 warnings.
4755
4756 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4757
4758         * file-io.c: fix alt dir separator char on unix systems
4759         and cleanup (fixes bug #71214).
4760
4761 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
4762
4763         * marshal.c: Use CALLVIRT instead of CALL when dispatching
4764         a call to a remote domain, since the method may be an
4765         interface method in the client domain. This fixes bug #74192.
4766
4767 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4768
4769         * threadpool.c: recv/send are now performed before going back to managed
4770         code to save one transition.
4771
4772 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4773
4774         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4775
4776         * metadata/threadpool.c: removed hack to workaround the bug above.
4777
4778         Fixes bug #74618.
4779
4780 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4781
4782         * reflection.c reflection.h: Fix handling of parameter defaults in
4783         dynamic methods. Also fixes handling of parameter attributes.
4784         Fixes #74609.
4785
4786         * mono-debug.c (mono_debug_close_image): Fix warning.
4787
4788 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4789
4790         * socket-io.h: replaced old unused field with new 'blocking'.
4791         * threadpool.c: restore socket blocking state on windows(tm).
4792
4793 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
4794
4795         * icall.c: don't return the codebase in the AssemblyName[] returned by
4796         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4797         * object-internals.h: Removed FIXME (fields were presents) and fixed
4798         versioncompat declaration.
4799
4800 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4801
4802         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4803         not closed, so don't cleanup when it happens.
4804
4805 2005-04-13  Chris Toshok  <toshok@ximian.com>
4806
4807         * mono-debug-debugger.h: change prototype for
4808         mono_debugger_lookup_type.
4809
4810         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4811         this function, although it should probably be named
4812         mono_debugger_init_type.
4813
4814 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4815
4816         * threadpool.c: fix non-AIO case.
4817
4818 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4819
4820         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4821         the built-in profiler to measure just JIT compilation times.
4822
4823 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4824
4825         * threadpool.c: the epollfd might be closed by another thread at
4826         any time, so ignore EBADF at treat it as a "we're closing" sign.
4827
4828 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4829
4830         * threadpool.c: release the semaphores with a count equals to the number
4831         of working threads in both IO and regular pools. Fixed typo that messed
4832         up the count of IO pool threads. Don't initialize the pipe handles if
4833         we're using epoll.
4834
4835 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4836
4837         * threadpool.c: some systems don't like a NULL when deleting the socket
4838         from epoll.
4839
4840 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4841
4842         * threadpool.c: fix semaphore allocation.
4843
4844 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4845
4846         * threadpool.c: added epoll() based implementation for asynchronous IO
4847         that is used instead of the default poll() when available.
4848         It can be disabled by setting MONO_DISABLE_AIO.
4849
4850 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4851
4852         * threadpool.c: windows needs 'closesocket' and instead of returning
4853         0 when the stream is closed while in select, it returns -1. Fixes bug
4854         #74573.
4855
4856 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
4857
4858         * class.c (class_compute_field_layout): Fix the regression caused by
4859         the previous try.
4860
4861 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4862
4863         * threadpool.c: separate pool for socket async. IO.
4864         * threadpool.h: mono_max_worker_threads is not a global any more.
4865
4866 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
4867
4868         * class.c (class_compute_field_layout): Fix #74549.
4869
4870 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4871
4872         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4873         use 2 connected sockets instead.
4874
4875 2005-04-08  Miguel de Icaza  <miguel@novell.com>
4876
4877         * mono-config.c: Add new entry point for mkbundle
4878         mono_config_parse_memory. 
4879
4880 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4881
4882         * threadpool.c: removed another unused function.
4883
4884 2005-04-08  Ankit Jain  <radical@corewars.org>
4885
4886         * reflection.c (get_default_param_value_blobs): Add 'types'
4887         parameter to get the types encoded in the constant table.
4888         (mono_param_get_objects): Use the type from the constant table,
4889         not the type of the parameter, when creating default values.
4890         Handle null default values correctly.
4891
4892 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4893
4894         * file-io.c:
4895         * file-io.h:
4896         * threadpool.c:
4897         * threadpool.h:
4898         * icall.c:
4899         * socket-io.c: removed dead code for async IO.
4900
4901 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4902
4903         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4904
4905         * threadpool.c: intercept socket async. calls and pass them to a thread
4906         that is polling and dispatching the job items to the threadpool as
4907         socket become ready. Fixes bugs #71217, #71933.
4908
4909         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4910         between char and short/ushort arrays.
4911
4912         * socket-io.c: remove dead code.
4913
4914 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4915
4916         * locales.c,
4917           icall.c : removed InternalToUpper_Comp() and
4918           InternalToLower_Comp().
4919
4920 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4921
4922         * char-conversions.h : The tables were incorrectly generated. Should
4923           be generated against invariant culture.
4924
4925 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
4926
4927         * object.c (mono_runtime_invoke_array): Fix return value when 
4928         passing pre-created valuetype objects to ctors.
4929
4930         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
4931         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4932         Fixes #74338.
4933
4934 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
4935
4936         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
4937         only used with --security and hides the wrong corlib version error.
4938
4939 2005-03-30  Joshua Tauberer  <tauberer@for.net>
4940
4941         * class.c: Changed mono_class_name_from_token so that types
4942         outside of a namespace don't have an initial period.  Improved
4943         the g_warning message used in _mono_class_get when loading
4944         fails.
4945         * assembly.c: In mono_assembly_load_reference, when an assembly
4946         can't be found, "No such file or directory" is misleading and
4947         unhelpful because a few paths were checked for the presence of
4948         the assembly.  When that happens (ENOENT), display a nicer
4949         message indicating the directories that were searched.  In all
4950         cases, the warning is made easier to read for non-hackers.
4951
4952 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
4953
4954         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4955         project/solution.
4956         * appdomain.h|domain.c: Removed inline from functions.
4957         * appdomain.c: Reduced warnings when compiling on windows.
4958         * icall.c: Fixed output_debug declaration to gunichar2*.
4959         * mono-config.c: Reduced warnings when compiling on windows.
4960         * rand.c: Added missing "windows.h". Added missing return value.
4961         * rawbuffer.c: Added missing winsock2.h for windows.
4962         * sysmath.h: Added mono-compiler.h header to allow/ease 
4963         compilation with non-GCC compilers.
4964         * threads.c: Fixed declarations to compile with VS.NET C compiler.
4965         Removed cast warnings.
4966
4967         Adapted from the work of J Lothian (for VC6).
4968
4969 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
4970
4971         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4972         from default_path.
4973
4974 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
4975
4976         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4977         the 2.0 profile.
4978
4979 2005-03-27  Raja R Harinath  <harinath@gmail.com>
4980
4981         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
4982         has to be in $(exec_prefix).  $(prefix) is for arch-independent
4983         stuff, and it would probably use $(prefix)/share rather than
4984         $(prefix)/lib.
4985
4986 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4987
4988         * console-io.c: added 2 includes that might be missing.
4989
4990 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
4991
4992         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4993         profile.
4994
4995         * reflection.c (create_custom_attr): Allocate the params array using
4996         alloca so it gets GC tracking.
4997
4998 2005-03-23  Chris Toshok  <toshok@ximian.com>
4999
5000         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
5001         out some spew.
5002
5003 2005-03-24  Raja R Harinath  <rharinath@novell.com>
5004
5005         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
5006         changes to pick up any changes in prefix, etc.
5007
5008 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5009
5010         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
5011         
5012         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
5013         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
5014
5015 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5016
5017         * class-internals.h object-internals.h class.c reflection.c: Extend the
5018         mono_lookup_dynamic_token () function to return the class of the
5019         token as well. 
5020
5021         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
5022         well. Fixes #73848.
5023
5024 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
5025
5026         * security-manager.c: Skip inheritance checks for intra-corlib
5027         class inheritance and method overrides. This skips a lot of checks
5028         and (anyway) permissions cannot work until corlib is loaded.
5029
5030 2005-03-23  Martin Baulig  <martin@ximian.com>
5031
5032         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
5033         MONO_TYPE_GENERICINST.  
5034
5035 2005-03-23  Martin Baulig  <martin@ximian.com>
5036
5037         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
5038
5039 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5040
5041         * class.c: added locking comments to some functions.
5042         Cache the interface offsets arrays (saves about 20 KB
5043         of runtime memory in a typical app).
5044         Reduce the time overhead in mono_class_setup_supertypes ().
5045
5046 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5047
5048         * icall.c: speedup and fix leaks in GetMethodsByName and
5049         GetPropertiesByName.
5050
5051 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5052
5053         * reflection.c: some locking fixes.
5054
5055 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5056
5057         * metadata.c: added missing break in case statement.
5058
5059 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
5060
5061         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5062         typedbyref return values. Fixes #73941.
5063
5064 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5065
5066         * security-manager.c|h: Added demandunmanaged method and 
5067         suppressunmanagedcodesecurity class to MonoSecurityManager.
5068         Renamed aptc class to allowpartiallytrustedcallers.
5069
5070 2005-03-17  Martin Baulig  <martin@ximian.com>
5071
5072         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5073
5074 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5075
5076         * file-io.c: disabled file async. IO using aio_*. It uses the
5077         threadpool now. Workaround for bug #73718.
5078
5079 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5080
5081         * assembly.h, mono-config.c: added code to deal with bundled configs
5082         for bundled assemblies.
5083
5084 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5085
5086         * *.c, private.h: cleanup, removing old private.h header file.
5087
5088 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5089
5090         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5091         and throw_on_unmappable_char attributes.
5092
5093 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
5094
5095         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5096         _ProcessName_internal.
5097
5098 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
5099
5100         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5101         #73631.
5102
5103         * icall.c threads.c threads-types.h: Remove slothash icalls as they
5104         are no longer used.
5105
5106 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
5107
5108         * object.c (compute_class_bitmap): Add support for generics. Fixes
5109         #73527.
5110
5111 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5112
5113         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5114
5115 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5116
5117         * filewatcher.c: commented out the code for windows watcher, as we don't
5118         use it (we use the managed implementation instead).
5119
5120 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5121
5122         * object-internals.h (MonoThread): Remove 'unused1' field.
5123
5124         * appdomain.c: Bump corlib version.
5125
5126         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5127
5128         * reflection.c (mono_reflection_create_runtime_class): Remove the
5129         AssemblyBuilder.Save optimization since it causes too many problems.
5130
5131 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
5132
5133         * exception.c|h: Added mono_get_exception_reflection_type_load to
5134         create a ReflectionTypeLoadException object.
5135         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5136         to return NULL is a InheritanceDemand fails during reflection. Updated
5137         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
5138         ReflectionTypeLoadException if an InheritanceDemand fails during 
5139         reflection. Added icall mapping for GetLinkDemandSecurity.
5140         * security-manager.c|h: Added ves_icall_System_Security_
5141         SecurityManager_GetLinkDemandSecurity internal call to return the
5142         class and methods permissions set for a LinkDemand. Removed unused
5143         fields in MonoSecurityManager.
5144
5145 2005-03-10  Martin Baulig  <martin@ximian.com>
5146
5147         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5148         it's a generic instance.
5149
5150 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
5151
5152         * reflection.c (mono_get_object_from_blob): Applied patch from
5153         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5154
5155         * class.c (mono_class_is_assignable_from): Another try at fixing 
5156         #73469 without breaking anything.
5157
5158 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
5159
5160         * class.c: (mono_class_is_assignable_from): Revert the last changes
5161         since they don't work with generics.
5162         
5163         * class.c (mono_class_is_assignable_from): Fix build bustage.
5164
5165         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5166         the managed IsAssignableFrom method. Fixes #73469.
5167
5168         * reflection.c (mono_reflection_call_is_assignable_from): New helper
5169         function.
5170
5171 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
5172
5173         * object.c (mono_load_remote_field_new): Fix returning uninitialized
5174         memory when the remoting callback does not sets the out arguments.
5175         Fixes #73007.
5176
5177         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5178         by mistake.
5179
5180         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5181
5182         * object-internals.h (MonoStackFrame): Sync with managed object layout.
5183
5184         * appdomain.c: Bump corlib version.
5185
5186 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
5187
5188         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5189         function.
5190
5191         * threads.c (mono_thread_attach): Detect threads which are not started
5192         by the GC pthread wrappers.
5193
5194 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
5195
5196         * icall.c: Added new icall for RNG.
5197         * rand.c|h: Added new icall to open the RNG. This allows to share a 
5198         single handle on Linux to access /dev/urandom and fix #73183.
5199
5200 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5201
5202         * object.c: setting the new vtable in a transparent proxy object must
5203         not change the GC descriptor.
5204
5205 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5206
5207         * object.c: fixed compilation without GCJ support.
5208         * reflection.c: for runtime-created types ensure klass->has_references
5209         is correct (bug #73215).
5210
5211 2005-03-02  Martin Baulig  <martin@ximian.com>
5212
5213         * class.c (mono_class_is_assignable_from): Make this work if
5214         `oklass' is a generic instance; fixes #72831.
5215
5216 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5217
5218         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5219         with hasthis set.
5220         
5221         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5222
5223         * marshal.c: Reorganize native->managed marshalling code to also use
5224         the emit_marshal_... functions.
5225
5226 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5227
5228         * object.c: typed allocs have issues with bitmap sizes > 30,
5229         so check for max_set >= 30.
5230
5231 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5232
5233         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5234         managed code. Fixes #73012.
5235
5236         * metadata.h (MonoMarshalSpec): Add elem_mult field.
5237
5238         * metadata.c reflection.c: Load/Emit elem_mult as well.
5239         
5240         * metadata.h (MonoMarshalSpec): Add comment.
5241
5242         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5243
5244         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5245         num_elem to -1 if not given.
5246
5247         * object-internals.h (MonoReflectionMarshal): Add has_size field.
5248
5249         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5250         given values.
5251
5252 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
5253
5254         * null-gc.c (mono_gc_free_fixed): Was not compilable.
5255
5256 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
5257
5258         * reflection.c (encode_marshal_blob): Encode param_num field as well.
5259
5260         * object-internals.h (MonoReflectionMarshal): Add param_num field.
5261
5262 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5263
5264         * object.c: generalized the reference bitmap creation
5265         and added hooks for the new GC.
5266         * class-internals.c: removed the gc_bitmap field from MonoClass.
5267
5268 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5269
5270         * domain.c: help the compiler to produce better code
5271         in mono_jit_info_table_find ().
5272
5273 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5274
5275         * object.c: make all allocations look typed.
5276
5277 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5278
5279         * socket-io.c: load Mono.Posix if it's not loaded already
5280         (fixes bug#73033).
5281
5282 2005-02-24  Martin Baulig  <martin@ximian.com>
5283
5284         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5285         * reflection.c (dup_type): Likewise.
5286
5287 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
5288
5289         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5290         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5291
5292 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5293
5294         * domain.c, threads.c, object-internals.h: make the critical thread
5295         local vars use the fast access mode (even when we're compiled in
5296         a lib). Provide accessors to be used by the jit during codegen.
5297
5298 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5299
5300         * appdomain.c: Changed hook functios behavior to include
5301         support for the reflection only assemblies. Some icalls were changed
5302         to support the mentioned assemblies too. Signatures of static methods
5303         try_assembly_resolve and real_load now have an additional parameter:
5304         refonly.
5305
5306         * assembly.c: General changes to mono_assembly_ methods to support
5307         reflection only api. Functions mono_assembly_open, mono_assembly_load,
5308         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5309         suffix, to support an additional gbool parameter to specify whether
5310         the assembli is reflection only or not. Created some new hook functions 
5311         to add support for reflection only assemblies. Signatures of static 
5312         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
5313         have now an additional parameter: refonly.
5314
5315         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5316         indicating whether the assembly is reflection only or not.
5317
5318         * exception.c: Add mono_get_exception_invalid_operation.
5319
5320         * icall.c: Throw an InvalidOperationException when trying to invoke
5321         a property/method/event, or trying to set/get the value of a field.
5322         Also add an icall to retrieve the ref_only flag to the
5323         MonoReflectionAssembly.
5324
5325 2005-02-23  Chris Toshok  <toshok@ximian.com>
5326
5327         Part of fix for #72827.
5328         * mono-debug.c (mono_debug_add_method): add lexical block data to
5329         the info we write.  Kind of a hack at the moment - we copy the
5330         lexical block info from the MonoDebugMethodInfo to the
5331         MonoDebugMethodJitInfo here, before writing it.
5332         (mono_debug_read_method): read the lexical block info.
5333
5334         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5335
5336         * debug-mono-symfile.h: add lexical block support.
5337
5338         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5339         support.
5340
5341 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5342
5343         * loader.c (mono_lookup_pinvoke_call): Fix warning.
5344
5345         * object.c (mono_runtime_free_method): Call mono_free_method () and
5346         put the TODOs there.
5347
5348         * loader.c (mono_free_method): Free up most memory allocated for 
5349         dynamic methods.
5350
5351 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5352
5353         * reflection.c: properly flag a Type argument to a
5354         named custom attr value (bug #72248).
5355
5356 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5357
5358         * reflection.c: reduce code duplication in named custom
5359         attribute encoding.
5360
5361 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5362
5363         * reflection.c: properly encode custom attrs of type object
5364         (bug #72649).
5365
5366 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5367
5368         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5369
5370 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5371
5372         * socket-io.c: load System.dll if it's not loaded already
5373         (bug #72850 and #70477).
5374
5375 2005-02-21  Martin Baulig  <martin@ximian.com>
5376
5377         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5378         generic instances.
5379
5380 2005-02-21  Martin Baulig  <martin@ximian.com>
5381
5382         * reflection.c (mono_image_build_metadata): We also need to
5383         "fixup" the MethodImpl table after we computed the final method
5384         indices.  Call fixup_methodimpl() to do that.
5385         (fixup_methodimpl): New private method.
5386
5387 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5388
5389         * assembly.c: special case mscorlib.dll (bug#72536),
5390         patch from Carlos Alberto Cortez.
5391
5392 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
5393
5394         * threads-types.h threads.c: Fix build bustage.
5395
5396         * threads.c: Use a union for long<->double conversions.
5397
5398         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5399         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5400
5401         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
5402         containing the checkpoint call with NOT_TAKEN.
5403         
5404         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
5405         checkpoint before pushing the arguments, so they won't have to be
5406         spilled to stack.
5407
5408 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5409
5410         * domain.c, assembly.c, domain-internals.h: make some data
5411         const and relocation-free.
5412
5413 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5414
5415         * object.c, appdomain.c, class-internals.h: introduce the
5416         MonoClassRuntimeInfo structure to hold the info needed to
5417         use a class at runtime. Made mono_class_vtable() lock-free
5418         for all the appdomains.
5419
5420 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5421
5422         * metadata-internals.h, image.c: introduce a per-image mempool to
5423         be used for memory that has the same lifetime as the image.
5424
5425 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
5426
5427         * domain.c: In mono_init_internal(), instead of selecting the first
5428         runtime version supported by an executable, get a list of all
5429         supported versions and select the one for which an mscorlib exists
5430         (since even if the runtime supports a given version, it doesn't mean
5431         that the framework for that version is installed).
5432         Modified get_runtimes_from_exe to support this behavior.
5433         In supported_runtimes, added information about additional system
5434         assembly versions.
5435         
5436         * assembly.c: Added support for more than one system assembly version
5437         per runtime version. Updated the assembly list.
5438         In mono_assembly_remap_version, removed the initial version check,
5439         since we don't know to which version we need to compare until we
5440         get the version set on which the assembly is based.
5441         Moved the code for loading corlib into the new method
5442         mono_assembly_load_corlib(), so it can be used by the initialization
5443         code.
5444         
5445         * domain-internals.h: Updated data structures and added declaration
5446         for mono_assembly_load_corlib.
5447
5448 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5449
5450         * reflection.c (resolve_object): Fix the creation of the signature in 
5451         the SignatureHelper case.
5452
5453         * assembly.c (mono_assembly_remap_version): Fix binary search.
5454         
5455 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
5456  
5457         * class.c: Added inheritance check when a method is overloaded (from a
5458         virtual method or when implementing an interface) and when a class is
5459         inherited. Added functions to set a failure for a class and to 
5460         retreive the exception from a failure.
5461         * class-internals.h: Added fields to MonoClass to keep the exception
5462         information status for inheritance (or other exceptions) to be thrown
5463         later (i.e. not at load time).
5464         * object.c: Throw the inheritance SecurityException when a type is to 
5465         be created with either class or method inheritance violations.
5466         * reflection.c|h: Fix when getting declsec from a class. Removed 
5467         unrequired code for class. Improved sanity in parameter naming.
5468         * security-manager.c|h: Added functions to check for class and method
5469         inheritance.
5470
5471 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5472
5473         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5474         and has_finalize in dynamic types as well.
5475
5476 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
5477
5478         * culture-info-table.h : fixed currency format for en-GB (and so on).
5479
5480 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5481
5482         * gc.c: ensure the GC handles never have 0 as a value.
5483
5484 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5485
5486         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5487         a pointer to a struct to unmanaged code. Fixes #72625.
5488
5489 2005-02-16  Martin Baulig  <martin@ximian.com>
5490
5491         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5492
5493 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5494
5495         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5496
5497 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5498
5499         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5500
5501         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
5502         UnmanagedFunctionPointerAttribute, use it for determining calling convention
5503         etc. Fixes #71471.
5504
5505         * reflection.c (mono_custom_attrs_get_attr): New helper function.
5506
5507         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5508
5509 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5510
5511         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5512         changes to make the current context a field in MonoThread.
5513
5514 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5515
5516         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5517         the last change.
5518         
5519         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5520         extracted from mono_marshal_get_native_wrapper.
5521
5522         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5523         to create wrappers around native functions.
5524
5525         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
5526         delegates for arbitrary function pointers. Fixes #71472.
5527
5528 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5529
5530         * threads.c: cleaned up the code a little.
5531
5532 2005-02-15  Martin Baulig  <martin@ximian.com>
5533
5534         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5535         the data table.
5536
5537         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5538         allocate larger chunks if needed.
5539
5540 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5541
5542         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5543         in by mistake.
5544
5545 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5546
5547         * domain.c: keep the domains in an array and ensure the domain ids
5548         are kept small, so they can be used as indexes to domain-specific data
5549         with a small memory overhead.
5550
5551 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5552
5553         * icall.c: Handle byref types in Type icalls. Fixes #72544.
5554
5555 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5556
5557         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5558
5559 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
5560
5561         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5562
5563         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5564         values.
5565
5566         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5567         
5568 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
5569
5570         * domain-internals.h: add the hashtable here.
5571
5572         * class-internals.h: Remove `info' from MonoMethod
5573
5574         * domain.c: Add a new hashtable, jit_trampoline_hash
5575
5576 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5577
5578         * object.c: don't set the value of static fields
5579         (fixes bug#72494).
5580
5581 2005-02-11  Martin Baulig  <martin@ximian.com>
5582
5583         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5584         (mono_debug_add_method): Silently ignore the method if it's too big.
5585         (mono_debug_add_type): Likewise.
5586
5587 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5588
5589         * threads.c, appdomain.c: remove #ifdefs from the code.
5590
5591 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
5592
5593         * metadata-internals.h: Added flags to MonoAssembly to cache the most
5594         common security informations. This allows us to stay in unmanaged code
5595         when doing LinkDemand and it's special cases (except for the first 
5596         time for initialization). The flags a very much used with --security.
5597         * reflection.c|h: Added code to get declarative security attributes 
5598         for LinkDemand and InheritanceDemand. This required to refactor the
5599         existing code for Demand.
5600         * security-manager.c|h: Added new method fields for the special cases
5601         of LinkDemand.
5602
5603 2005-02-10  Martin Baulig  <martin@ximian.com>
5604
5605         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5606         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5607
5608 2005-02-10  Martin Baulig  <martin@ximian.com>
5609
5610         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5611         debugging code; this is almost a complete rewrite.
5612
5613         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5614
5615 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5616
5617         * domain.c, object.h: expose mono_string_equal () and 
5618         mono_string_hash ().
5619         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5620         it's implemented in managed code.
5621
5622 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5623
5624         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5625         lo leak objects between appdomains.
5626
5627 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5628
5629         * assembly.c: old compilers compilation fix from 
5630         robertj@gmx.net (Robert Jordan).
5631
5632 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
5633
5634         * class-internals.h: Little reminder for the future.
5635
5636         * debug-helpers.c: Fix up wrapper_type_names
5637
5638 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5639
5640         * image.c, metadata-internals.h: when loading an image from a file,
5641         mmap all of it and use the same codepaths as when using a
5642         in-memory image: the code is simpler and we use less memory
5643         (both writable and readonly).
5644
5645 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5646
5647         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5648         API to alloc runtime data structures that need to be tracked by the
5649         GC and contain pointers.
5650         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5651         make the code more readable and eventually use a different GC.
5652
5653 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
5654
5655         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5656         for out arguments.
5657         
5658 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
5659
5660         * object.c: In release_type_locks(), don't release the cctor lock
5661         if it has already been released. This fixes a crash in the
5662         thread5 test.
5663
5664 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5665
5666         * gc.c, marshal.c, icall.c: register a delegate for finalization
5667         only when the native function pointer has been allocated for it.
5668
5669 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5670
5671         * object.c: cleaned up some code, allocate objects that are
5672         pointer free with the atomic malloc variant. Allocate memory
5673         for static data from the mempool if it's pointer-free.
5674         Allocate the bounds array at the end of the array data, when needed.
5675         * object-internals.h, object.h: move a private function in a private
5676         header.
5677         * class.c: handle missing case in tracking references in fields.
5678
5679 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5680
5681         * class.c, class-internals.h: keep track if a type has
5682         reference fields in either the instance or static fields.
5683
5684 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
5685
5686         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5687         and renamed to MonoRuntimeInfo. Added fields to store the expected
5688         framework assembly version. Changed mono_get_framework_version and
5689         mono_get_runtime_version for a single mono_get_runtime_info method.
5690         
5691         * assembly.c: Added method to remap system assembly versions to the
5692         current executing runtime version. Removed old mapping code.
5693         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5694         
5695         * icall.c, reflection.c: Track api changes.
5696
5697 2005-02-06  Miguel de Icaza  <miguel@novell.com>
5698
5699         * loader.c (method_from_memberref): Improve error reporting,
5700         produce the class name instead of the typeref/typedef index. 
5701
5702 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
5703
5704         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5705
5706 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5707
5708         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5709         stdcall and charset name mangling.  Reorganize the code and add
5710         some tracing stuff.
5711
5712 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5713
5714         * monodiet.c: More iters!
5715
5716         * marshal.c: Iter usage.
5717
5718         * icall.c: Iter usage.
5719
5720         * object.c: Use iters.
5721
5722         * debug-helpers.c: More iters
5723
5724 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5725
5726         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5727         under win32.
5728
5729 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5730
5731         * mono-debug-debugger.c: use iters
5732
5733         * class.c, class-internals.h: mono_class_setup_events is static
5734         now
5735
5736         * All callers: use iters
5737
5738 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5739
5740         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5741         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5742
5743 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5744
5745         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5746
5747         * marshal.h: Add prototypes for ldfld/stfld_remote.
5748
5749         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5750         this is called during startup.
5751         
5752 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5753
5754         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5755         MonoThreadsSync struct private in monitor.c. Changed the way
5756         MonoThreadsSync is allocated so it's faster and there is no
5757         need to keep track of it with a finalizer and it uses less memory.
5758         This also finally allows us to allocate mono objects as ptrfree when
5759         there are no reference fields.
5760
5761 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5762
5763         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5764         disappearing link to the GC interface and use them to simplify
5765         the gchandles code.
5766
5767 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5768
5769         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5770         stfld_remote which call mono_load/store_field_new. This allows methods
5771         calling ldfld/stfld wrappers to be AOTed.
5772
5773         * console-io.c: Include sys/filio.h under solaris.
5774         
5775         * console-io.c: Include curses.h if needed correctly.
5776
5777 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5778         
5779         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5780         method->klass as well.
5781
5782         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5783
5784         * class.c (mono_class_init): Switch on lazy initialization of 
5785         methods.
5786
5787         * class.c (mono_class_get_finalizer): Handle the case when the 
5788         finalizer is inherited.
5789
5790 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5791
5792         * console-io.c: <curses.h> is needed by term.h on solaris.
5793
5794 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
5795
5796         * icall.c, class-internals.h, monodiet.c, class.c: Remove
5797         mono_class_setup_properties where possible. Remove this ftn from
5798         the header file, and make it static.
5799
5800 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5801
5802         * loader.c: Add missing setup_... call.
5803
5804         * class.c: Add missing setup_... calls.
5805
5806         * class.c (mono_class_init): Switch on lazy initialization of 
5807         the generic vtable.
5808         
5809         * class.c (mono_class_init): Fix generics broken by the recent changes.
5810
5811         * monodiet.c (handle_type): Add missing setup_... calls.
5812
5813         * class.c: Back out garbage in previous patch.
5814         
5815         * class.c: Add missing setup_... calls.
5816
5817         * class.c (mono_class_get_method_from_name_flags): Avoid calling
5818         mono_class_setup_methods () if possible.
5819
5820         * class-internals.h (MonoClass): Add 'has_cctor' flag.
5821
5822         * class-internals.h (MonoCachedClassInfo): New structure.
5823
5824         * class.c: Initialize properties and events fields of MonoClass lazily.
5825
5826         * class.c: Add infrastructure for lazily initializing the methods and
5827         vtable fields of MonoClass. Not yet used.
5828
5829         * class.c (mono_class_get_finalizer): New helper function.
5830
5831         * class.c: Add infrastructure for loading some class related data from
5832         an AOT file.
5833
5834         * object.c: Add infrastructure for initializing the vtable from data
5835         in the AOT file.
5836
5837         * gc.c (run_finalize): Use mono_class_get_finalizer ().
5838
5839         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5840         appropriate initialization function before accessing parts of the
5841         MonoClass structure.
5842
5843         * marshal.c: Fix warnings.
5844         
5845         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5846
5847         * mono-debug-debugger.c (get_exception_message): Use 
5848         mono_class_get_method_from_name_flags ().
5849
5850 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
5851
5852         * reflection.c, appdomain.c: Replace a few manual searches that
5853         Zoltan missed. (Paolo approved this part of my initial patch).
5854
5855 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5856
5857         * profiler.c: disable recording statistical events at report time.
5858
5859 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5860
5861         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5862         to byteswap arrays of enum values, too (bug #72080).
5863
5864 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
5865
5866         * appdomain.c (set_domain_search_path): Allow this to be called if
5867         domain->setup is not yet set.
5868
5869         * loader.c (mono_method_get_index): New helper function.
5870
5871         * loader.c reflection.c: Use mono_method_get_index ().
5872
5873         * class.c (mono_class_get_method_from_name_flags): New helper method.
5874
5875         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5876         this.
5877
5878         * class.c (mono_class_get_cctor): New helper method.
5879
5880         * string-icalls.c object.c class.c marshal.c reflection.c: Use
5881         mono_class_get_method () to look up methods.
5882
5883 2005-02-01  Miguel de Icaza  <miguel@novell.com>
5884
5885         * console-io.c: Fix the build, this should work on Windows.
5886
5887 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
5888
5889         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5890         be set to null to keep things valid
5891
5892 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5893
5894         * icall.c: added Console 2.0 icalls.
5895         * Makefile.am: added console-io.[ch]
5896         * console-io.[ch]: internal calls for Console 2.0 API.
5897
5898 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5899
5900         * class.c: make sure we consider all the interfaces
5901         when calculating max_interface_id (bug found by
5902         Jeroen Frijters running ikvm).
5903
5904 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
5905
5906         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5907         valuetype fields to null.
5908
5909         * object.c (set_value): Ditto. Fixes #71669.    
5910
5911 2005-01-31  Martin Baulig  <martin@ximian.com>
5912
5913         * metadata.c (mono_metadata_has_generic_params): New public
5914         function; checks whether something is a generic method.
5915
5916 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5917
5918         * appdomain.c: fix infinite recursion when adding assemblies.
5919
5920 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
5921
5922         * object.c: Fix small typo to return all items for Environment.
5923         GetCommandLineArgs.
5924
5925 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5926
5927         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5928         reflection.c: more domain and assembly-unload related fixes
5929         and memory leaks plugs.
5930
5931 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
5932
5933         * 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.
5934
5935 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
5936
5937         * loader.c (mono_method_signature): Make this method lazy
5938         (mono_get_method_from_token): Don't computate the signature here.
5939
5940         Doing this saves quite a bit of memory. I got 90 kb on starting up
5941         monodoc. It should also save some disk reads on startup.
5942
5943         * *: MonoMethod->signature might be NULL now. You *MUST* use
5944         mono_method_signature.
5945
5946 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
5947
5948         * object.c (mono_runtime_get_main_args): Return an array from the
5949         current domain here. Fixes #71938.
5950
5951 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5952
5953         * monitor.c: formatting changes to comply with the
5954         mono coding style and remove #ifdefs from the code.
5955
5956 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5957
5958         * metadata.c, private.h: remove some unneeded data
5959         and use a more compact representation for table schemas.
5960
5961 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5962
5963         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5964         to get a better distribution in hash tables.
5965         * *.c: use mono_aligned_addr_hash() where appropriate.
5966         * assembly.c: make var static.
5967
5968 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
5969
5970         * domain-internals.h: Put MonoJitInfo on a diet.
5971
5972         * domain.c: Fix a warning.
5973
5974 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5975
5976         * gc.c: rework the gc handles code to reuse handles
5977         when freed.
5978
5979 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5980
5981         * domain.c: fixed long standing bug in mono_string_equal() which
5982         was brought to light with the ldstr changes.
5983
5984 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
5985
5986         * reflection.c: Remove warning by adding missing include for marshal.h
5987
5988 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5989
5990         * domain.c, object.c: change the ldstr_table to hold
5991         MonoString* as keys: makes the runtime isinterned lookup
5992         faster and simplifies memory management.
5993
5994 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
5995  
5996         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5997         possible to add imperative security checks before calling the icall.
5998         * reflection.c: Return security attributes on the original MonoMethod
5999         (and not the wrapped one). This fix permissions on icalls.
6000
6001 2005-01-25  Dick Porter  <dick@ximian.com>
6002
6003         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
6004         the check for mktime() support actually test the mktime() return
6005         value.  "Fixes" bug 71682, though the output is still different to
6006         MS.
6007
6008 2005-01-25  Martin Baulig  <martin@ximian.com>
6009
6010         * class.c (mono_class_is_assignable_from): Make this work for
6011         generic instances.
6012
6013 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
6014
6015         * marshal.c (mono_string_utf8_to_builder)
6016         (mono_string_builder_to_utf16): We might not have ownership of the
6017         string. In thise case, we need to create a new buffer.
6018
6019         * object-internals.h (mono_stringbuilder_capacity): sb->str might
6020         be null, in which case, use the default capacity.
6021
6022 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6023
6024         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
6025         GC events to the profiler.
6026
6027 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6028
6029         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
6030         if you don't want the GC to run.
6031
6032 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
6033
6034         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
6035         start providing a GC API and keeping different implementations in
6036         their own file.
6037         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
6038
6039 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
6040
6041         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6042         mmap rather than allocating a huge buffer.
6043         (mono_debug_close_mono_symbol_file): Free the buffer allocated
6044         above.
6045
6046 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
6047
6048         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6049         and CheckExecutionRights.
6050         * reflection.c|h: Keep the index of the declarative security to be 
6051         used, instead of the pointer, when AOT compiler is used. Also add 
6052         class initialization when requesting demands.
6053         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6054         CheckExecutionRights. Both properties are now FALSE by default, and
6055         unmodifiable, unless the --security option is used.
6056
6057 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6058
6059         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
6060         reflection.c: properly refcount images and assemblies, many leaks fixed.
6061
6062 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6063
6064         * threadpool.c: increase the timeout for threads in the thread pool to
6065         10s.  Fixes bug #67159.
6066
6067 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
6068
6069         * class-internals.h: Sun's compiler insists on explicit
6070         signed on bit fields to handle then correctly.
6071
6072 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
6073
6074         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6075         Make the size of the array fit only the number of invalid path
6076         chars that we have.
6077
6078         * class.c (_mono_class_get): Improve the error reporting when a
6079         class referenced is not found, to assist debugging. 
6080
6081 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6082
6083         * threads.c: fix off-by-one error.
6084         * domain.c: free data allocated in the domain.
6085
6086 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6087
6088         * reflection.c (mono_method_body_get_object): Fill out exception info
6089         as well.
6090
6091         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
6092         structure.
6093         
6094 2005-01-19  Martin Baulig  <martin@ximian.com>
6095
6096         * loader.c (mono_get_method_constrained): Make this work again.
6097
6098 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6099
6100         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
6101         guint16 to match the managed side.
6102
6103         * reflection.c (mono_reflection_body_get_object): Fill out local
6104         variables array.
6105
6106         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6107         as well.
6108
6109         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6110         'local_var_sig_token'.
6111
6112 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
6113
6114         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
6115         System.Drawing.
6116
6117         * reflection.c (mono_method_body_get_object): Handle abstract and
6118         runtime methods.
6119
6120 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6121
6122         * marshal.c, loader.c, class-internals.h, reflection.c:
6123         store the emthod data for a wrapper in an array instead of a list.
6124
6125 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6126
6127         * marshal.c: change the code to allocate memory more
6128         conservatively for method wrappers.
6129
6130 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6131
6132         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6133         fields from MonoClass to the marshal info structure where they belong.
6134
6135 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6136
6137         * class.c, object.c, class-internals.h, marshal.c: rearrange
6138         some fields and tweak some types to lower memory usage.
6139
6140 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
6141
6142         * threads.c (signal_thread_state_change): Handle the case when the
6143         target thread is the current thread.
6144
6145         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6146
6147         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
6148         emit_ptr_to_object_conv. 
6149
6150         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6151         marshalling. Fixes #71352.
6152
6153 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6154
6155         * metadata.h, blob.h: move table enum to blob.h so it can be included
6156         in any header.
6157         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6158         cut the size of MonoImage/MonoDynamicImage.
6159
6160 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
6161
6162         * profiler.c (mono_profiler_install_simple): Fix default arguments.
6163
6164 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6165
6166         * reflection.c, reflection.h, icall.c: add a function to check
6167         if an attribute type is defined for a metadata object.
6168
6169 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
6170
6171         * object-internals.h: Added some needed fields from StringBuilder class.
6172         * marshal.c: Set the maxCapacity when creating a StringBuilder.
6173
6174 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
6175
6176         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6177         threads before shutting down the runtime.
6178
6179         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6180
6181 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6182
6183         * object-internal.h, threads.c: implement stacksize and 
6184         parameterized thread start functionality (requires
6185         matching corlib). Marked broken code for later removal.
6186
6187 2005-01-12  Martin Baulig  <martin@ximian.com>
6188
6189         * class-internals.h (MonoGenericClass): Moved the `initialized'
6190         flag to MonoDynamicGenericClass, removed `init_pending'.
6191         (MonoGenericInst): Added `is_reference' flag.
6192
6193 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
6194
6195         * reflection.c (mono_image_create_pefile): Only set the pe_offset
6196         inside the MSDOS header. Fixes #71201.
6197
6198         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6199         gc thread.
6200         (mono_domain_finalize): Ditto.
6201
6202 2005-01-12  Martin Baulig  <martin@ximian.com>
6203
6204         * class.c (mono_get_shared_generic_class): Use the cache for
6205         non-dynamic generic classes.
6206
6207         * class-internals.h (mono_class_create_generic_2): Removed
6208         function prototype, this function is now static inside class.c.
6209
6210         * class.c (mono_class_create_generic_2): Made this static, only
6211         call it from mono_class_init() and mono_class_setup_parent().
6212         (collect_implemented_interfaces_aux): Call mono_class_init() on
6213         the interfaces we collect.
6214         (mono_class_setup_vtable): Call mono_class_init (class->parent).
6215
6216 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6217
6218         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6219         it a real thread handle.
6220
6221         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
6222         MonoJitExceptionInfo, since each catch clause needs its own variable.
6223         
6224 2005-01-11  Dick Porter  <dick@ximian.com>
6225
6226         * image.c (mono_pe_file_open): New variant on mono_image_open()
6227         that does not set up the CLI metadata; used for FileVersionInfo so
6228         it can get the data for windows binaries too.
6229         
6230         * process.c (process_read_string_block): Don't read off the end of
6231         the StringTable block.
6232
6233         These both fix bug 70766.
6234
6235 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6236
6237         * gc.c: set some fields to NULL at GC cleanup time.
6238         * threads.c: if we quit the main thread, call exit ().
6239
6240 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6241
6242         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6243
6244 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6245
6246         * threads.h, threads.c, object.c: added accessor and settor for
6247         main_thread. Handle it specially when exiting from it: wait
6248         for other foreground threads to exit.
6249
6250 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6251
6252         * process.c, verify.c: remove some bloat.
6253
6254 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
6255
6256         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6257         the calling convention to cdecl under win32.
6258
6259 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
6260
6261         * object.c (mono_object_get_size): New function to get the size of
6262         an object instance.
6263
6264         * profiler.c (simple_allocation): Use above.
6265
6266 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
6267
6268         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6269         ves_icall_System_AppDomain_getRootDomain (as it's not required to
6270         get an appdomain by it's id and we can't assume the root's id is 0).
6271         * domain-internals.h: Change the function prototype to match.
6272         * icall.c: Change the icall table for AppDomain.
6273
6274 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
6275
6276         * locales.c (string_invariant_compare_char): Only compute
6277         GUnicodeTypes in the case where we need them.  Test for ordinality
6278         first and return if so.
6279
6280         From the commit:
6281
6282                 /*
6283                  * FIXME: here we must use the information from c1type and c2type
6284                  * to find out the proper collation, even on the InvariantCulture, the
6285                  * sorting is not done by computing the unicode values, but their
6286                  * actual sort order.
6287                  */
6288
6289 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6290
6291         * loader.c: for P/Invoke methods, allow the "Internal" shared
6292         library name to refer to the calling process symbol namespace.
6293
6294 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
6295
6296         * Makefile.am: Add the security manager to the build.
6297         * security-manager.c|h: New. Initialization of the security manager.
6298
6299 2005-01-07  Dick Porter  <dick@ximian.com>
6300
6301         * threads.c: 
6302         * monitor.c: Update thread state during Monitor and WaitHandle
6303         waits.  Fixes bug 71031.
6304
6305 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
6306
6307         * reflection.c (property_encode_signature): Correctly handle when the
6308         property has no methods.
6309
6310 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
6311
6312         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6313         
6314         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6315         fields from mb, not rmb. Fixes #71017.
6316
6317         * marshal.c (emit_ptr_to_str_conv): Add support for 
6318         ByValTStr -> string conversion. Fixes #71015.
6319
6320         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6321
6322         * mempool.c (mono_mempool_contains_addr): New helper function.
6323
6324 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6325
6326         * metadata.c (mono_metadata_compute_size): Fix size calculation of
6327         HasSematics encoded fields.
6328         
6329         * metadata.c (mono_type_to_unmanaged): Improve error message for 
6330         invalid string marshalling.
6331
6332         * metadata.c: Fix warnings.
6333         
6334 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6335
6336         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6337         profiler support.
6338
6339 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6340
6341         * domain.c object.c domain-internals.h: Revert part of r38077 since the
6342         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6343         tests.
6344
6345 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
6346
6347         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6348         so methods containing these can be AOTed.
6349
6350 2005-01-03  Martin Baulig  <martin@ximian.com>
6351
6352         * loader.c (find_method): Removed the hack for generic instances.
6353         (method_from_memberref): If our parent is a generic instance, pass
6354         its generic type definition to find_method() and then inflate the
6355         method.
6356         (mono_get_method_constrained): Pass the generic type definition to
6357         find_method() and inflate the method later.
6358
6359         * class-internals.h (MonoStats): Added `generic_class_count'.
6360
6361         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6362         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6363
6364         * reflection.c (mono_custom_attrs_from_params): Don't ignore
6365         generic type definitions.
6366
6367 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
6368
6369         * loader.c icall.c: Fix warnings.
6370
6371 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
6372
6373         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6374         blittable types. Fixes #70864.
6375
6376 2004-12-29  Martin Baulig  <martin@ximian.com>
6377
6378         * icall.c
6379         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6380
6381         * reflection.c (mono_method_get_object): Create a
6382         "System.Reflection.MonoGenericMethod" for inflated methods; don't
6383         call mono_get_inflated_method().
6384
6385         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6386
6387 2004-12-27  Martin Baulig  <martin@ximian.com>
6388
6389         * class-internals.h (MonoMethod): Added `is_inflated' flag.
6390         (MonoMethodInflated): Added `inflated' field.
6391
6392         * class.c (mono_class_inflate_generic_method): Don't really
6393         inflate the method here; just set the `is_inflated' flag in the
6394         MonoMethod.
6395         (mono_class_get_inflated_method): Actually inflate the method here
6396         if it's not already inflated; we use the MonoMethodInflated's new
6397         `inflated' field as a cache.
6398
6399 2004-12-26  Martin Baulig  <martin@ximian.com>
6400
6401         * class.c
6402         (inflate_generic_class): Moved some code out of inflate_generic_type().
6403         (mono_class_inflate_generic_method): If we're already inflated,
6404         inflate the context and use the declaring method; ie. make sure
6405         the declaring method of an inflated method is always the generic
6406         method definition.
6407         (mono_class_create_from_typedef): Create
6408         `class->generic_container->context->gclass'.
6409
6410 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
6411
6412         * metadata-internals.h, marshal.c, reflection.c: More
6413         MonoGHashTable->GHashTable.
6414
6415         * domain-internals.h, class.c: Change MonoGHashTable's into
6416         GHashTables for some cases where no gc stuff is used
6417
6418         All users: update apis
6419
6420 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
6421
6422         * metadata.c (builtin_types): Make this `const'. Makes this get
6423         put into the shareable section.
6424         (mono_metadata_init): Casts to make gcc happy.
6425
6426 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
6427
6428         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6429
6430 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
6431
6432         * icall.c: Added an internal call to retrieve the position and length
6433         of assembly-level declarative security attributes (RequestMinimum, 
6434         RequestOptional and RequestRefuse). This is used by the Assembly class
6435         to re-create the corresponding permission sets.
6436
6437 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6438
6439         * marshal.c: fix the stelemref wrapper to be type correct
6440         (and faster).
6441
6442 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6443
6444         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6445         to do key & 0x7fffffff. Hashtable already does this. It just
6446         results in longer code.
6447
6448 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
6449
6450         * appdomain.c: Bump corlib version.
6451         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6452         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6453         * reflection.c|h: Add functions to get declarative security infos
6454         (blob position and length) for assemblies, classes and methods.
6455
6456 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6457
6458         * reflection.c: sort the constant table (bug #70693).
6459
6460 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6461
6462         * object-internals.h, threads.c, domain.c: add accessors for
6463         the MonoThread and MonoDomain tls keys.
6464
6465 2004-12-18  Martin Baulig  <martin@ximian.com>
6466
6467         * class.c (inflate_generic_type): If we're inflating a generic
6468         instance, set `ngclass->context->container = context->container';
6469         ie. the container we inflated into.
6470
6471         * metadata.c (mono_metadata_parse_generic_param): Reflect above
6472         inflate_generic_type() changes.
6473
6474 2004-12-17  Martin Baulig  <martin@ximian.com>
6475
6476         * class-internals.h
6477         (MonoGenericClass): Replaced `MonoType *generic_type' with
6478         `MonoClass *generic_class'.  Removed `dynamic_info'; if
6479         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6480         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6481
6482 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
6483
6484         * exception.c (mono_exception_from_token): New helper function.
6485
6486 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
6487
6488         * assembly.c (mono_assembly_load_with_partial_name): Call 
6489         mono_assembly_loaded before invoking the preload hooks. Fixes
6490         #70564.
6491
6492         * object-internals.h (MonoThread): Change culture_info and 
6493         ui_culture_info into an array.
6494
6495         * threads.c: Cache culture info objects from more than one appdomain.
6496
6497         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
6498         current UI culture.
6499
6500 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
6501
6502         * threads.h threads.c appdomain.c: Clear the culture_info field of
6503         all threads during unloading if they point to an object in the dying
6504         appdomain.
6505
6506 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
6507
6508         * culture-info.h (TextInfoEntry): New struct
6509         * object-internals.h: sync with managed
6510         * locales.c: fill the `text_info_data' field
6511         * culture-info-tables.h: update
6512
6513 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6514
6515         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6516         collector.
6517
6518 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
6519
6520         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6521         (ves_icall_ModuleBuilder_getMethodToken): Ditto
6522
6523 2004-12-12  Martin Baulig  <martin@ximian.com>
6524
6525         * mono-debug-debugger.c (write_type): If we're an enum and the
6526         builtin types have already been initialized, call mono_class_init().
6527
6528 2004-12-11  Martin Baulig  <martin@ximian.com>
6529
6530         * metadata.c (mono_metadata_load_generic_params): Added
6531         `MonoGenericContainer *parent_container' argument; automatically
6532         compute `container->is_method'; pass the correct owner to
6533         get_constraints().      
6534
6535         * reflection.c (compare_genericparam): Sort the GenericParam table
6536         according to increasing owners. 
6537
6538 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6539
6540         * profiler.c: allow disabling the default profiler.
6541
6542 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6543
6544         * decimal.c, icall.c: allow disabling System.Decimal support.
6545
6546 2004-12-09  Marek Safar <marek.safar@seznam.cz>
6547
6548         * reflection.c: Add support for null attribute arguments.
6549
6550 2004-12-09  Martin Baulig  <martin@ximian.com>
6551
6552         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6553         names to get rid of compiler warnings.
6554
6555 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6556
6557         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
6558         mono_marshal_load_type_info (). Fixes #69625.
6559         (mono_marshal_get_ptr_to_struct): Likewise.
6560
6561 2004-12-08  Martin Baulig  <martin@ximian.com>
6562
6563         * mono-debug.h: Bumped version number to 47.
6564
6565         * mono-debug-debugger.c
6566         (mono_debugger_event_handler, mono_debugger_event): Take two
6567         guint64 arguments insteed of a gpointer and a guint32.  
6568
6569 2004-12-08  Martin Baulig  <martin@ximian.com>
6570
6571         * debug-mono-symfile.h
6572         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6573         `address' to `native_offset'.
6574
6575 2004-12-08  Martin Baulig  <martin@ximian.com>
6576
6577         * class.c (mono_class_create_from_typespec): Only inflate if we
6578         either have `context->gclass' or `context->gmethod'.
6579
6580 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6581
6582         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6583
6584         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6585
6586         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6587
6588         * reflection.c (mono_assembly_get_object): Remove the workaround put
6589         in for the release.
6590         
6591         * appdomain.c: Use the corlib_internal field from MonoAssembly.
6592
6593         * appdomain.c: Bump corlib version.
6594
6595         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6596         be visible in other appdomains.
6597
6598 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
6599
6600         * threads.c: Interlocked inc and dec for longs were messed up,
6601         use a KISS based impl for this. Fixes 70234
6602
6603 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
6604
6605         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6606
6607 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6608
6609         * icall.c: fix to follow policy not to allow struct
6610         arguments in icalls.
6611
6612 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6613
6614         * process.c: make the patch that handles spaces in file paths work
6615         on mono/windows too.
6616
6617 2004-12-06  Martin Baulig  <martin@ximian.com>
6618
6619         * class.c (mono_class_create_generic): Call
6620         mono_class_setup_supertypes() if we're dynamic.
6621         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6622
6623 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
6624
6625         * object-internals.h: Add new fields to MonoThread.
6626
6627         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6628
6629         * icall.c threads-types.h threads.c: Add new icalls.
6630
6631         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6632
6633         * object-internals.h (MonoReflectionAssembly): Sync object layout with
6634         managed side.
6635
6636         * appdomain.c: Bump corlib version.
6637
6638         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6639         internal assemblies. Fixes #69181.
6640
6641 2004-12-05  Martin Baulig  <martin@ximian.com>
6642
6643         * class.c (mono_class_inflate_generic_signature): Make this a
6644         no-op if `context' is NULL or we don't have any type parameters;
6645         also copy `sentinelpos'.        
6646
6647 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
6648
6649         * image.c: Add unbox_wrapper_cache.
6650
6651         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6652
6653         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6654         function generator.
6655         
6656         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6657         Fixes #70173.
6658
6659         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6660         
6661 2004-12-04  Martin Baulig  <martin@ximian.com>
6662
6663         * loader.c (mono_method_get_signature_full): New public function;
6664         like mono_method_get_signature(), but with an additional
6665         `MonoGenericContext *' argument.
6666
6667         * class.c (mono_class_inflate_generic_signature): Formerly known
6668         as inflate_generic_signature(); make this public.
6669
6670 2004-12-04  Martin Baulig  <martin@ximian.com>
6671
6672         * metadata.c
6673         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6674         instead of a `MonoGenericContainer *'.  
6675         (mono_metadata_parse_array_full): Likewise.
6676         (mono_metadata_parse_signature_full): Likewise.
6677         (mono_metadata_parse_method_signature_full): Likewise.
6678         (mono_metadata_parse_generic_inst): Likewise.
6679         (mono_metadata_parse_generic_param): Likewise.
6680         (mono_metadata_parse_mh_full): Likewise.
6681         (mono_type_create_from_typespec_full): Likewise.
6682
6683 2004-12-03  Martin Baulig  <martin@ximian.com>
6684
6685         * class-internals.h (MonoGenericContainer): Replaced the
6686         `MonoGenericContext * pointer with a `MonoGenericContext'
6687         structure and made it the first element.
6688
6689 2004-12-03  Martin Baulig  <martin@ximian.com>
6690
6691         * class.c
6692         (inflate_generic_type): Set the `context->container' when creating
6693         a new MonoGenericContext.
6694         (mono_class_inflate_generic_method): Likewise.
6695         (mono_class_create_from_typespec): Just use `context->container'
6696         to get the container.
6697
6698         * loader.c (method_from_methodspec): Set `context->parent' from
6699         `context->container' - and if that's a method container, use its
6700         parent.  Also set the `context->container' when creating a new
6701         MonoGenericContext.
6702         (mono_get_method_from_token): Use just `context->container' to get
6703         the container.
6704
6705         * metadata.c (do_mono_metadata_parse_generic_class): Also set
6706         `gclass->context->container'.
6707
6708         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6709         the `context->container' when creating a new MonoGenericContext.
6710
6711 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
6712
6713         * reflection.c (compare_genericparam): Sort params with identical
6714         owner by their number. Fixes gen-111 on sparc.
6715
6716 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6717
6718         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6719         around the domain changes.
6720
6721         * appdomain.c (mono_domain_unload): Handle the case when the thread
6722         calling Unload is itself being aborted during unloading. Fixes #70022.
6723
6724         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6725
6726         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
6727         checkpoint_func as an icall so it gets a wrapper.
6728         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6729         in the cross-appdomain wrappers too.
6730
6731         * threads.c (mono_thread_has_appdomain_ref): Make this public.
6732
6733         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6734
6735         * reflection.c: Fix some memory leaks.
6736         
6737 2004-12-02  Martin Baulig  <martin@ximian.com>
6738
6739         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6740
6741         * metadata.c (generic_class_cache): New static hashtable.
6742         (mono_metadata_lookup_generic_class): New public method.
6743
6744 2004-12-02  Martin Baulig  <martin@ximian.com>
6745
6746         * class.c (mono_class_create_from_typedef): Call
6747         mono_class_setup_parent() and mono_class_create_mono_type() before
6748         parsing the interfaces.
6749
6750 2004-12-02  Martin Baulig  <martin@ximian.com>
6751
6752         * metadata.c (generic_inst_cache): New static hashtable.
6753         (mono_metadata_lookup_generic_inst): New public function.
6754         (mono_metadata_inflate_generic_inst): New public function.
6755         (mono_metadata_parse_generic_inst): New public function.
6756         (do_mono_metadata_parse_generic_class): Use the new
6757         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6758         since this'll also use the cache.
6759
6760         * reflection.c (mono_reflection_bind_generic_method_parameters):
6761         Use mono_metadata_lookup_generic_inst() to use the new cache.
6762
6763         * class.c (inflate_mono_type): Use
6764         mono_metadata_inflate_generic_inst() to inflate a generic
6765         instance; this'll also use the new cache.
6766
6767         * loader.c (method_from_methodspec): Use
6768         mono_metadata_parse_generic_inst() and
6769         mono_metadata_inflate_generic_inst() rather than parsing it
6770         manually, so we can use the new cache.
6771
6772 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6773
6774         * threads.c (wait_for_tids): Do not incorrectly free threads when 
6775         the wait times out.
6776
6777 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6778
6779         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6780         iter->args based on whether parameters are passed in registers (i.e.
6781         MONO_ARCH_REGPARMS is defined)
6782
6783 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
6784
6785         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6786         the exception message. Fixes #70070.
6787         (method_from_methodspec): Fix warnings.
6788
6789 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6790
6791         * process.c: (complete_path) return the path quoted
6792
6793 2004-12-01  Martin Baulig  <martin@ximian.com>
6794
6795         * class-internals.h (MonoGenericInst): New structure.
6796         (MonoGenericClass): Replaced `type_argc', `type_argv' and
6797         `is_open' with `MonoGenericInst *inst'.
6798         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6799         `is_open' with `MonoGenericInst *inst'.
6800
6801 2004-11-30  Martin Baulig  <martin@ximian.com>
6802
6803         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6804
6805         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6806         to `generic_class_cache'.
6807
6808         * metadata.c
6809         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6810         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6811         (mono_generic_inst_is_valuetype): Renamed to
6812         mono_generic_class_is_valuetype().
6813
6814         * class-internals.h
6815         (MonoGenericInst): Renamed to MonoGenericClass.
6816         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6817         (MonoClass): Renamed `generic_inst' to `generic_class'.
6818         (MonoGenericContext): Renamed `ginst' to `gclass'.
6819
6820         * object-internals.h
6821         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6822
6823         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6824         mono_reflection_generic_class_initialize().
6825
6826         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6827         now known as "System.Reflection.MonoGenericClass".
6828         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6829
6830 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
6831
6832         * class-internals.h: Added a flag field to MonoClass to cache the
6833         declarative security attributes actions associated with the class.
6834         * domain-internals.h: Added booleans to MonoJitInfo to cache the
6835         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6836         applicable to the JITted method.
6837         * reflection.c|h: Added functions to extract (as flags) which security
6838         actions are available (declaratively) for a method, class or assembly.
6839         * metadata.c|h: Added functions to search the declarative security
6840         table in the metadata.
6841         
6842 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
6843
6844         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6845         EXPORTEDTYPES are already in the class name cache, so there is no
6846         need to add extra code here to look at them. Just removes a bit of
6847         cruft.
6848
6849         (ves_icall_System_Environment_get_TickCount): No need for #if
6850         WINDOWS. We already have the code in io-layer.
6851
6852 2004-11-28  Martin Baulig  <martin@ximian.com>
6853
6854         * loader.c
6855         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6856         Fixes gen-112.cs.
6857
6858 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
6859
6860         * assembly.c (do_mono_assembly_open): Instead of having a
6861         conditional WITH_BUNDLE, incorporate support for bundles here, by
6862         having a global `bundles' variable holding a pointer to the actual
6863         bundles. 
6864
6865         (mono_register_bundled_assemblies): New API call used by the
6866         bundle code. 
6867
6868         See mkbundle.1 for details.
6869         
6870 2004-11-27  Martin Baulig  <martin@ximian.com>
6871
6872         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6873         the vtable for generic methods.
6874
6875 2004-11-26  Martin Baulig  <martin@ximian.com>
6876
6877         * metadata.c
6878         (mono_metadata_generic_method_hash): New public function.
6879         (mono_metadata_generic_method_equal): Likewise.
6880
6881         * class-internals.h
6882         (MonoGenericContainer): Added `GHashTable *method_hash'.
6883
6884         * reflection.c (ReflectionMethodBuilder): Added
6885         `MonoGenericContainer *generic_container'.
6886         (reflection_methodbuilder_to_mono_method): Don't create a new
6887         MonoGenericContainer each time we're called.
6888         (mono_reflection_bind_generic_method_parameters): Use
6889         `container->method_hash' to cache the results so we don't create a
6890         different method if we're called several times with the same
6891         arguments.
6892
6893         * loader.c (method_from_methodspec): Use the new
6894         `container->method_hash' here, too.
6895
6896 2004-11-26  Martin Baulig  <martin@ximian.com>
6897
6898         * class.c (inflate_generic_signature): Correctly compute
6899         `res->has_type_parameters'.
6900         (mono_class_vtable): Use the `has_type_parameters' flag to
6901         determine whether we're a generic method.
6902
6903         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6904
6905 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
6906
6907         * object.c (mono_runtime_run_main): Fix a small memory leak.
6908
6909 2004-11-25  Martin Baulig  <martin@ximian.com>
6910
6911         * class.c (set_generic_param_owner): Fixed the loop.
6912
6913 2004-11-25  Martin Baulig  <martin@ximian.com>
6914
6915         * object.c (mono_class_vtable): Don't create any JIT wrappers for
6916         generic methods.
6917
6918 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
6919
6920         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6921         names. Fixes #69787.
6922
6923 2004-11-24  Martin Baulig  <martin@ximian.com>
6924
6925         * class.c (mono_class_create_generic_2): If we don't have a
6926         `ginst->parent', inflate `gklass->parent' to get our parent.
6927
6928 2004-11-24  Martin Baulig  <martin@ximian.com>
6929
6930         * reflection.c (compare_genericparam): Correctly sort the
6931         GenericParam table; fixes #69779.
6932
6933 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
6934
6935         * reflection.c: When writing a PE file, don't create a huge
6936         buffer in memory. Just write the arrays we have to the file.
6937         This reduces memory usage.
6938
6939         * metadata-internals.h: MonoDynamicStream pefile is no longer used
6940         globally.
6941
6942 2004-11-17  Martin Baulig  <martin@ximian.com>
6943
6944         * class.c (mono_class_init): Don't setup `class->parent' for
6945         dynamic instances; moved this to mono_class_generic_2().
6946         (mono_class_create_generic): Also set `klass->inited' for dynamic
6947         generic instances.
6948         (mono_class_create_generic_2): Don't do anything for dynamic
6949         generic instances.  Set `klass->parent' here and also call
6950         mono_class_setup_parent() here. 
6951
6952         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6953         `MonoType *parent' argument; set `ginst->parent' before calling
6954         mono_class_create_generic_2(), so we set the correct parent.
6955
6956 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6957
6958         * reflection.c: allow getting attributes from ModuleBuilder
6959         (used by ikvm).
6960
6961 2004-11-17  Martin Baulig  <martin@ximian.com>
6962
6963         * class.c (mono_class_create_from_typedef): If a type parameter is
6964         inherited from an outer class, set its owner to that class.
6965
6966 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
6967
6968         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6969           for (int*) written size. This fixes bug #69592.
6970
6971 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
6972
6973         * icall.c: Added IsAuthenticodePresnet internal call.
6974         * image.c|h: New function that check a MonoImage for an Authenticode
6975         signature in the certificate PE data directory.
6976         * security.c|h: New internal call to ask the runtime if an 
6977         Authenticode signature seems referenced in the PE header.
6978
6979 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
6980
6981         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6982
6983         * reflection.c (mono_image_create_pefile): Free the assembly streams
6984         after writing out the assembly file.
6985
6986         * object.c (mono_runtime_run_main): Fix small memory leak.
6987
6988         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6989         property access modifiers. Fixes #69389.
6990
6991 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6992
6993         * domain.c, object.c, object-internals.h, domain-internals.h,
6994         object.h, marshal.c: keep dynamic code info per domain.
6995
6996 2004-11-15  Martin Baulig  <martin@ximian.com>
6997
6998         * class.c (mono_type_get_name_recurse): Put type arguments in
6999         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
7000         see bug #68387.
7001
7002 2004-11-15  Martin Baulig  <martin@ximian.com>
7003
7004         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
7005         (mono_class_setup_vtable): When computing `the_cname' for a
7006         generic instance, don't include the namespace since we'd otherwise
7007         add it twice.
7008
7009 2004-11-15  Martin Baulig  <martin@ximian.com>
7010
7011         * class.c (mono_class_create_generic): Changed return type to void.
7012         (mono_class_create_generic_2): New public function; setup
7013         `class->method', `class->field' and `class->interfaces' here
7014         instead of in mono_class_init().
7015
7016         * class.h (mono_class_create_generic): Moved to class-internals.h.
7017
7018 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
7019
7020         * reflection.c (mono_image_create_pefile): take a file HANDLE.
7021         rather than writing to memory, write to this file. Right now,
7022         we are just writting into a buffer, and copying that. However
7023         we can avoid the buffer later.
7024
7025         (mono_dynamic_stream_reset): new function
7026
7027         * icall.c, object-internals.h: update for the above.
7028
7029 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
7030
7031         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
7032         have been using gc'd memory. First it is slower, unlikely
7033         the comment in the source code said, secondly, it increases
7034         our footprint to do it in the gc.
7035
7036         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
7037         the method so that it does not have to copy to managed code.
7038
7039 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
7040
7041         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7042
7043 2004-11-12  Martin Baulig  <martin@localhost>
7044
7045         * reflection.c (mono_image_create_token): Allow generic method
7046         definitions here, since they may appear in an `.override'; see
7047         gen-98/gen-99 for an example.
7048
7049 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
7050
7051         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7052         #69365.
7053
7054         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7055         descriptive.
7056
7057 2004-11-11  Martin Baulig  <martin@ximian.com>
7058
7059         * class.c (mono_class_setup_vtable): In an explicit interface
7060         implementation, the method name now includes the arity.
7061
7062 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
7063
7064         * object.c (mono_array_full_copy): Fix warning.
7065
7066 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
7067
7068         * appdomain.c: Removed look_for_method_by_name(). Use the new method
7069         mono_class_get_method_from_name() instead.
7070         
7071         * class-internals.h: Added two new types of wrappers. 
7072         Added MonoRemotingTarget enum. Added new trampoline function type, which
7073         takes an additional MonoRemotingTarget value as parameter, so it is
7074         possible to request a trampoline for a specific target.
7075         
7076         * class.c: Added new mono_class_get_method_from_name() method.
7077         
7078         * class.h: In MonoRemoteClass, we can have now to vtables, one for
7079         general remoting sinks and one specific for cross domain calls.
7080         
7081         * debug-helpers.c: Added new wrapper names.
7082         
7083         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7084         of a remote class.
7085         
7086         * image.c: Porperly delete value objects form the remoting invoke hashtable.
7087         
7088         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7089         with several other methods (mono_marshal_get_xappdomain_dispatch,
7090         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7091         and others) can generate a fast remoting wrapper for cross domain calls.
7092         More information can be found in docs/remoting.
7093         Other changes: Removed mono_find_method_by_name, and used
7094         mono_class_get_method_from_name instead.
7095         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7096         is stored in the remoting invoke hashtable.
7097         
7098         * marshal.h: published the new method for getting the xdomain wrapper,
7099         and also added a method for getting the adequate wrapper for a given
7100         method and target.
7101         
7102         * object-internals.h, object.c: Added a couple of methods for capying and
7103         cloning arrays.
7104         Modified mono_install_remoting_trampoline, which takes the new remoting
7105         trampoline that has a remoting target as parameter.
7106         mono_class_proxy_vtable now also takes a remoting target as parameter, and
7107         will return the most suitable vtable for the target.
7108         Added mono_remote_class_vtable, which returns the vtable of a remote class
7109         (which can be the normal remoting vtable or the xdomain vtable).
7110         
7111         * threads.c: the xdomain invoke and dispatch wrappers must also be
7112         protected against interruptions.
7113
7114 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7115
7116         * icall.c: use memmove in BlockCopyInternal when the source and
7117         destination arrays are the same.
7118
7119 2004-11-09  Martin Baulig  <martin@ximian.com>
7120
7121         * class-internals.h (MonoGenericContainer): Removed `method' and
7122         `signature', replaced them with `is_method' and `is_signature'
7123         flags.  Added `context'.
7124
7125         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7126         instead of a `MonoGenericContainer *'.
7127
7128         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7129         for dynamic type parameters.
7130         (mono_metadata_load_generic_params): Setup `container->context'.
7131
7132         * reflection.c (mono_reflection_setup_generic_class): Setup
7133         `tb->generic_container->context'.
7134         (do_mono_reflection_bind_generic_parameters): Use
7135         mono_class_inflate_generic_type() to correctly inflate types,
7136         rather than using our own hack just for MONO_TYPE_VAR.
7137
7138 2004-11-09  Martin Baulig  <martin@ximian.com>
7139
7140         * class.c (mono_class_inflate_generic_method): Small fix; don't
7141         crash here.
7142
7143         * icall.c
7144         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7145         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7146         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7147         (ves_icall_Type_BindGenericParameters): Likewise.
7148         (ves_icall_Type_get_IsGenericInstance): Likewise.
7149         (ves_icall_Type_GetGenericParameterPosition): Likewise.
7150         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7151         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7152         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7153
7154 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
7155
7156         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7157         assembly versions and public key tokens. Fixes #69113.
7158
7159 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7160
7161         * metadata.c: fix bug introduced with the type cache changes
7162         on 2004-11-06.
7163
7164 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7165
7166         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7167         the MonoClass pointer instead of the token in exception clauses.
7168         * reflection.c: updates for the above and make the code not depend
7169         on the structure of MonoExceptionClause.
7170
7171 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
7172
7173         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7174         Add support for dynamic assemblies. Fixes #69114.
7175
7176         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7177
7178 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
7179
7180         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7181         since most only those methods use it. the code member of
7182         MonoMethodPInvoke was dead, so that can be removed too. Also,
7183         remove inline_count (again, not used), and move slot so that it
7184         can share bits with some other flags. This saves 8 bytes in the
7185         structure and gives us about 50 kb back for mcs helloworld.cs
7186
7187         * *.[ch]: Do naming changes for the above.
7188
7189         * loader.c (mono_method_get_header): Lazily init the header
7190         on first access.
7191         (mono_get_method_from_token): don't init the header here
7192         (mono_free_method): the header may never be allocated
7193
7194         Overall, this saves 150 kb of unmanaged allocations
7195         for mcs helloworld.cs. That accounts for 10% of the unmanaged
7196         memory at runtime.
7197         
7198         * loader.c, loader.h (mono_method_get_header): new accessor.
7199
7200         * *.[ch]: use the above method. Prepares us to lazily load
7201         the header.
7202
7203         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7204         three warnings, which are actual bugs (see 69206).
7205
7206         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7207         unused. Saves a cool 4 bytes / method.
7208
7209 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
7210
7211         * metadata.c (builtin_types): Add types for System.Object here.
7212         (mono_metadata_parse_type_full): Cache MonoType*'s that are
7213         for a class or valuetype from klass->this_arg or klass->byval_arg.
7214
7215         On mcs for a hello world, this gets us down from 21836 MonoType's
7216         to 14560.
7217
7218         (mono_metadata_free_type): Account for the above change.
7219
7220 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
7221
7222         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
7223         exception instead of asserting if name is null.
7224         (ves_icall_System_AppDomain_GetData): Ditto.
7225
7226 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
7227
7228         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7229         EnumBuilder.
7230
7231         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
7232         Return NULL when the domain does not have entry_assembly set.
7233
7234         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
7235         Add a 'resource_modules' argument.
7236         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7237
7238         * reflection.c (mono_reflection_create_runtime_class): Move setting
7239         of wastypebuilder here, so mono_get_type_object () returns a MonoType
7240         for enums too.
7241
7242         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7243         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7244         Throw an ArgumentNullException if 'ptr' is null.
7245
7246         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7247         assemblies here. Fixes #69020.
7248
7249 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
7250
7251         * reflection.c (build_compressed_metadata): Fix the previous patch for
7252         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
7253         the stack.
7254
7255 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
7256
7257         * assembly.c (mono_assembly_names_equal): Allow a match if one of
7258         the cultures is false. Fixes #69090.
7259
7260         * reflection.c (build_compressed_metadata): Fix invalid memory read 
7261         detected by valgrind.
7262         
7263         * reflection.c (mono_reflection_get_type): Avoid triggering a 
7264         TypeResolve multiple times for the same type. Fixes #65577.
7265
7266 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
7267
7268         * marshal.c: Avoid using ldftn to call managed functions. It is
7269         much slower than just a call.
7270
7271         * reflection.c (mono_module_get_object): free the basename we
7272         allocate here from glib.
7273         
7274         * reflection.c (ensure_runtime_vtable): make sure to free
7275         overrides.  Also, we were allocating an array of MonoMethod not an
7276         array of MonoMethod*.
7277
7278         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7279
7280         * image.c (mono_image_close): free image->guid here.
7281
7282 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
7283
7284         * reflection.c: Fix some spec conformance issues with the PE file
7285         structures so mcs compiled apps run on the Net 2.0 beta.
7286
7287 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
7288
7289         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
7290         Implement this. Fixes #67264.
7291
7292         * debug-helpers.h debug-helpers.c marshal.c: Move 
7293         mono_find_method_by_name to debug-helpers.c.
7294
7295 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
7296
7297         * object.c (mono_release_type_locks): type_initialization_hash is
7298         a GHashTable.
7299
7300         * reflection.c object.c object-internals.h: Fix warnings.
7301
7302         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7303         without accessors. Fixes #61561.
7304
7305         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7306         application base from the root domain if not set. Fixes #65641.
7307         (mono_runtime_init): Fix warning.
7308
7309 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7310
7311         * appdomain.c: call mono_thread_pool_init.
7312         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7313         of worker threads based on the number of CPUs and the environment
7314         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7315         for non-windows (windows) systems.
7316
7317 2004-10-27  Chris Toshok  <toshok@ximian.com>
7318
7319         * mono-debug-debugger.c (write_class): don't call mono_class_init
7320         here, as even with the check for (!klass->init_pending), we get
7321         into a situation where we're hitting cycles in class
7322         initialization.  Fixes #68816.
7323
7324 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
7325
7326         * image.c: Avoid overwriting values in the loaded_images_hash when an
7327         assembly is loaded multiple times. Fixes #61152.
7328
7329         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7330         so multiple satellite assemblies for the same name can be loaded.
7331         Fixes #68259.
7332
7333         * mono_domain_assembly_preload: Actually return the loaded assembly, 
7334         not NULL.
7335
7336         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7337         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7338
7339         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7340         pending finalizers are not invoked after the appdomain has been 
7341         unloaded. Fixes #67862.
7342
7343 2004-10-22  Martin Baulig  <martin@ximian.com>
7344
7345         * mono-debug-debugger.c
7346         (mono_debugger_runtime_invoke): Don't box valuetypes.
7347
7348 2004-10-22  Chris Toshok  <toshok@ximian.com>
7349
7350         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7351         don't hide private methods.
7352
7353 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
7354
7355         * icall.c: Allows the runtime to "share" (when known) the public key
7356         token of an assembly. This avoid the need to recalculate the token 
7357         (from the public key) in managed code.
7358
7359 2004-10-21  Chris Toshok  <toshok@ximian.com>
7360
7361         * debug-helpers.c (append_class_name): argh, revert last patch.
7362         
7363 2004-10-21  Chris Toshok  <toshok@ximian.com>
7364
7365         * debug-helpers.c (append_class_name): use '+' as the delimiter,
7366         not '/', so that it matches what the debugger uses to look up
7367         methods.
7368
7369 2004-10-21  Martin Baulig  <martin@ximian.com>
7370
7371         * mono-debug-debugger.c (mono_debugger_throw_exception): New
7372         public method; this is called each time an exception is thrown and
7373         allows the debugger to use exception catch points.
7374
7375 2004-10-21  Martin Baulig  <martin@ximian.com>
7376
7377         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7378         the stack pointer and the exception object in some struct and pass
7379         that to the debugger.
7380
7381 2004-10-21  Chris Toshok  <toshok@ximian.com>
7382
7383         * mono-debug-debugger.c (do_write_class): add instance/static
7384         event support.  We don't expose "raise" or "other" yet.
7385         (event_is_static): new method.
7386
7387 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
7388
7389         * mono-debug-debugger.c
7390         (mono_debugger_handle_exception): Remove
7391         bogus return value for fussy compilers.
7392
7393 2004-10-20  Martin Baulig  <martin@ximian.com>
7394
7395         * mono-debug-debugger.c
7396         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7397         (mono_debugger_handled_exception): Likewise.
7398
7399 2004-10-20  Martin Baulig  <martin@ximian.com>
7400
7401         * mono-debug-debugger.h (MonoDebuggerEvent): Added
7402         MONO_DEBUGGER_EVENT_EXCEPTION.
7403
7404         * mono-debug-debugger.c (mono_debugger_handle_exception): New
7405         public function to send the debugger a notification for an
7406         exception and inform it about a catch/finally clause.
7407
7408 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
7409
7410         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7411         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7412         fix 2.95 build. 
7413
7414         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7415
7416 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
7417
7418         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7419         marshalled as [In,Out]. Fixes #58325.
7420
7421 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
7422
7423         * reflection.c (mono_method_body_get_object): Implement some fields.
7424
7425 2004-10-12  Martin Baulig  <martin@ximian.com>
7426
7427         * reflection.c (mono_reflection_bind_generic_parameters): Small
7428         fix, correctly retrieve our parent from a generic instance.
7429
7430 2004-10-12  Martin Baulig  <martin@ximian.com>
7431
7432         * metadata.c (mono_metadata_generic_param_equal): We always have
7433         an owner.
7434
7435         * class.c
7436         (mono_class_from_generic_parameter): We need to have an owner.
7437         (my_mono_class_from_generic_parameter): Likewise.
7438
7439         * reflection.c (mono_reflection_setup_generic_class): Renamed to
7440         mono_reflection_create_generic_class() and added a new
7441         mono_reflection_setup_generic_class().  
7442         (mono_reflection_initialize_generic_param): If we're a nested
7443         generic type and inherited from the containing class, set our
7444         owner to the outer class.
7445
7446 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
7447
7448         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7449
7450         * reflection.c (mono_method_body_get_object): New function to create
7451         a MethodBody object.
7452
7453         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7454
7455 2004-10-11  Martin Baulig  <martin@ximian.com>
7456
7457         * metadata.c (_mono_metadata_type_equal): Renamed to
7458         do_mono_metadata_type_equal() and made static.
7459
7460 2004-10-11  Martin Baulig  <martin@ximian.com>
7461
7462         * appdomain.c: Bump corlib version number to 28.
7463
7464 2004-10-10  Martin Baulig  <martin@ximian.com>
7465
7466         * class-internals.h
7467         (MonoGenericInst): Added `MonoGenericContainer *container'.
7468         (MonoGenericMethod): Likewise.
7469         (MonoGenericContext): Likewise.
7470         (MonoGenericParam): Added `MonoGenericContainer *owner'.
7471
7472         * metadata.c
7473         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7474         (do_mono_metadata_parse_generic_inst): Likewise.
7475         (mono_metadata_parse_type_full): New public method.  This is the actual
7476         mono_metadata_parse_type() implementation - with an additional
7477         `MonoGenericContainer *' argument.
7478         (mono_metadata_parse_array_full): Likewise.
7479         (mono_metadata_parse_signature_full): Likewise.
7480         (mono_metadata_parse_method_signature_full): Likewise.
7481         (mono_metadata_parse_mh_full): Likewise.
7482         (mono_type_create_from_typespec): Likewise.
7483         (mono_metadata_interfaces_from_typedef_full): New public method;
7484         this is similar to the other _full() methods, but we take a
7485         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7486         (mono_metadata_parse_generic_param): Take an additional
7487         `MonoGenericContainer *' argument and lookup the MonoGenericParam
7488         from that container.
7489         (mono_metadata_generic_param_equal): New static method to compare
7490         two type parameters.
7491         (_mono_metadata_type_equal): New static method; takes an
7492         additional `gboolean signature_only' argument - if true, we don't
7493         compare the owners of generic parameters.
7494         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7495         with a TRUE argument - do a signature-only comparision.
7496
7497         * loader.c: Use the new _full() methods and pass the
7498         MonoGenericContainer to them.
7499
7500         * object-internals.h (MonoReflectionTypeBuilder): Added
7501         `MonoGenericContainer *generic_container' field.
7502         (MonoReflectionMethodBuilder): Likewise.
7503
7504 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
7505
7506         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7507         case initial images of dynamic assemblies.
7508
7509         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7510
7511         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7512
7513         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7514         length of event->other array.
7515         (typebuilder_setup_events): Ditto.
7516
7517         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7518         'assembly_by_name' and add an 'assemblies' list.
7519
7520         * assembly.h assembly.c: Add a new search hook for determining whenever
7521         an assembly is already loaded. Use this instead of searching in the
7522         loaded_assemblies list.
7523
7524         * domain.c appdomain.c: Implement the new search hook so loaded 
7525         assemblies are now scoped by appdomain. Fixes #67727.
7526
7527 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
7528
7529         * threads.c (mono_thread_attach): Initialize synch_lock field so
7530         mono_thread_detach works again.
7531
7532         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7533         'lib' too. Fixes #63130.
7534
7535 2004-10-06  Jackson Harper  <jackson@ximian.com>
7536
7537         * culture-info-tables.h: regenerated.
7538
7539 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
7540
7541         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
7542         implemented by other interfaces in the result. Fixes #65764.
7543         
7544         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7545         Handle unloadable modules without crashing.
7546
7547         * image.c (load_modules): Revert the previous patch since modules must
7548         have a fixed index inside the array.
7549         
7550         * image.c (load_modules): Don't include native modules in the modules
7551         array.
7552
7553 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
7554
7555         * reflection.h: Add param_defaults field.
7556
7557         * reflection.c: Add support for parameter defaults in dynamic methods.
7558         Fixes #64595.
7559
7560         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7561         an empty string when a type has no namespace. Fixes #64230.
7562
7563 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
7564
7565         * tabledefs.h: Added "internal" security actions to support non-CAS
7566         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
7567         Note: they do not seems to be used anymore in 2.0 (new metadata format)
7568
7569 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
7570
7571         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7572         constructor of abstract class. Fixes #61689.
7573
7574 2004-10-04  Martin Baulig  <martin@ximian.com>
7575
7576         * class-internals.h (MonoGenericContainer): New type.
7577         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7578         `MonoGenericContainer *generic_container'.
7579         (MonoClass): Replaced `gen_params' and `num_gen_params' with
7580         `MonoGenericContainer *generic_container'.
7581
7582         * metadata.c (mono_metadata_load_generic_params): Return a
7583         `MonoGenericContainer *' instead of a `MonoGenericParam *';
7584         removed the `num' argument.
7585
7586 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
7587
7588         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7589         for dynamic images.
7590
7591         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7592         machine fields.
7593
7594         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7595
7596         * reflection.c: Save pe_kind and machine values into the generated
7597         image file.
7598
7599         * appdomain.c: Bump corlib version number.
7600
7601         * object-internals.h: Reorganize layout of LocalBuilder.
7602
7603         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
7604         New helper function.
7605
7606         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7607         created MonoType for dynamic types. Fixes #66180.
7608
7609 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
7610
7611         * threadpool.c: the ares hashtable needs a critical section around it.
7612         this prevents some nasty segfaults
7613
7614 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
7615
7616         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7617         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7618         bug 67324).
7619         
7620 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7621
7622         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7623         
7624 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
7625
7626         * image.c: Always canonicalize image file names, to avoid loading
7627         the same assembly twice when referenced using a relative path.
7628
7629 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7630
7631         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7632
7633         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7634
7635         * marshal.c: Fix warnings.
7636
7637 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
7638
7639         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7640         attempting to marshal the delegate_trampoline as the method_addr.
7641         This patch has a static hashtable of marshalled delegates so that 
7642         we can map delegate_trampoline addresses back to delegates.  This
7643         allows a delegate passed to managed code to be passed back into native
7644         code.  Fixes #67039
7645
7646 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7647
7648         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7649
7650         * reflection.c (method_encode_code): Align method headers properly.
7651         Fixes #66025.
7652
7653 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7654
7655         * marshal.c: In the runtime invoke wrapper, reset the abort
7656         exception if it is cached. This avoids the automatic rethrowal of 
7657         the exception after the catch of the wrapper. Also check for pending
7658         interruptions before calling the managed method. This is done using
7659         the new method emit_thread_force_interrupt_checkpoint, since the
7660         normal checkpoint method is ignored when running the invoke wrapper.
7661         * object.c: If the abort exception is rethrown, set the abort_exc
7662         field of the thread, so it will be rethrown aftere every catch.
7663         * threadpool.c: Only run an interruption checkpoint if what has been
7664         requested is a stop of the thread (aborts will be ignored).
7665         * threads.c: By default, a thread will now never be interrumped while
7666         running the runtime invoke wrapper (this ensures that runtime_invoke
7667         will always return to the caller if an exception pointer is provided).
7668         There is a new special method mono_thread_force_interruption_checkpoint()
7669         to force an interruption checkpoint even if running a protected
7670         wrapper, which is used by the same runtime invoke wrapper to do a check
7671         at a safe point.
7672
7673 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7674
7675         * object.c, object-internals.h: Implemented mono_release_type_locks,
7676         which releases the cctor locks held by a thread.
7677         * threads.c, threads.h: In thread_cleanup, release cctor locks held
7678         by a thread. Added mono_thread_exit() method to be used to safely stop
7679         a thread.
7680
7681 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7682
7683         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7684         Move null check before dereference.  Avoid indexing beyond the end
7685         of the 'modules' array.
7686
7687 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7688
7689         * metadata-internals.h (MonoImage): Add module_count field.
7690         * image.c (load_modules): Set image->module_count.
7691         (mono_image_load_file_for_image): Use image->module_count.
7692         * reflection.c (mono_image_load_module): Append to image->modules array 
7693         of dynamic assembly.
7694         (mono_module_get_object): Fix loop to actually increment index.
7695         Use image->module_count.
7696         * assembly.c (mono_assembly_load_references): Use image->module_count.
7697         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7698         Likewise.
7699
7700 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7701
7702         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
7703         Avoid assert on generic types.
7704
7705 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
7706
7707         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7708
7709         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7710
7711         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
7712         function to convert a MarshalSpec structure to its managed counterpart.
7713
7714         * reflection.c: Fix warnings.
7715         
7716         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7717         field.
7718
7719         * icall.c (mono_create_icall_signature): Fix build.
7720
7721 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
7722
7723         * icall.c: Add MakePointType icall.
7724
7725         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7726         warnings.
7727
7728 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7729
7730         * threadpool.c: reuse allocated slots in the queue.
7731
7732 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
7733
7734         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7735
7736         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7737
7738         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7739         previous change.
7740
7741         * tabledefs.h: Add constants for pinvoke attributes BestFit and
7742         ThrowOnUnmappableChar.
7743
7744         * icall.c (ves_icall_Type_GetPacking): New icall.
7745
7746 2004-09-24  Martin Baulig  <martin@ximian.com>
7747
7748         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7749
7750 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7751
7752         * appdomain.c:
7753         (mono_domain_set): allow setting a domain that is being unloaded.
7754         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7755         being unloaded.
7756
7757 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7758
7759         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7760         the GetCustomAttributes icall.
7761
7762 2004-09-23  Martin Baulig  <martin@ximian.com>
7763
7764         * object-internals.h (MonoReflectionGenericParam): Replaced
7765         'has_ctor_constraint', `has_reference_type' and `has_value_type'
7766         with `guint32 attrs'.
7767
7768 2004-09-23  Martin Baulig  <martin@ximian.com>
7769
7770         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7771
7772 2004-09-23  Martin Baulig  <martin@ximian.com>
7773
7774         * object-internals.h (GenericParameterAttributes): New enum.
7775
7776 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7777
7778         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7779         
7780         * class.c (init_events): Fill out event->other field.
7781
7782         * class.c: Fix warnings.
7783
7784         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7785
7786 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7787
7788         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7789         walk which doesn't supply the IL offset.
7790
7791 2004-09-22  Martin Baulig  <martin@ximian.com>
7792
7793         * reflection.c (mono_reflection_setup_internal_class): If we're
7794         System.ValueType, System.Object or System.Enum, set
7795         `klass->instance_size' and create the vtable.
7796         (mono_reflection_create_internal_class): If we're an enum type,
7797         get the base class from our current corlib.
7798
7799 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
7800
7801         * reflection.h (MonoResolveTokenError): New type.
7802
7803         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7804         icall.
7805
7806         * icall.c: Add an 'error' argument to the ResolveToken icalls.
7807
7808 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
7809
7810         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7811         Support also calling constructors, but only for already allocated objects.
7812
7813 2004-09-17  Geoff Norton <gnorton@customerdna.com>
7814
7815         * reflection.c (type_get_qualified_name): If the klass is null
7816         return the typename to avoid a NullRefEx.
7817         (encode_cattr_value): Get the qualified name of the boxed type,
7818         not the underlying enumtype.  Fixes #62984.
7819
7820 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
7821
7822         * marshal.c: Fix problems with previous checkin.
7823
7824 2004-09-21    <vargaz@freemail.hu>
7825
7826         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7827         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7828
7829         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7830
7831 2004-09-21  Geoff Norton <gnorton@customerdna.com>
7832
7833         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7834         should only return a type for pointers, arrays, and passbyref types.
7835         Fixes bug #63841.
7836
7837 2004-09-21  Martin Baulig  <martin@ximian.com>
7838
7839         * domain.c (mono_debugger_check_runtime_version): New public
7840         function.
7841
7842         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
7843
7844 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
7845
7846         * reflection.c: Added missing sort to the declarative security 
7847         attributes table. MS implementation stops seeing the attributes if the
7848         token number regress in the table (as shown by ildasm and permview).
7849
7850 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
7851
7852         * object-internals.h (MonoReflectionModule): Add 'token' field.
7853         
7854         * reflection.c (mono_reflection_get_token): Add support for Module
7855         and Assembly.
7856         (mono_module_get_object): Set 'token' field.
7857         (mono_module_file_get_object): Set 'token' field.
7858
7859         * icall.c: Add new Assembly and Module icalls.
7860
7861         * appdomain.c: Bump corlib version.
7862
7863 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
7864
7865         * loader.h loader.c class.h class.c: Add helper functions for obtaining
7866         tokens of metadata objects.
7867
7868         * reflection.h reflection.c (mono_reflection_get_token): New function
7869         to obtain the token of a metadata object.
7870
7871         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7872
7873 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
7874
7875         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7876         
7877         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7878
7879 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
7880
7881         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7882         * object-internals.h: Added 3 MonoArray* members to MonoReflection
7883         AssemblyBuilder to access the permissions set in the class lib.
7884         * reflection.c: Added security attributes encoding step in 
7885         mono_image_build_metadata.
7886         * tabledefs.h: Added new security actions defined in 2.0:
7887         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7888
7889 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7890
7891         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7892         macro parameter.
7893
7894 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7895  
7896         * locales.c: nullify the ICU_collator member of CompareInfo when it is
7897           finalized. There where random SIGSEVs at program termination, when
7898           an object being finalized was trying to do a string comparison and
7899           the current culture was already finalized.
7900  
7901 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7902
7903         * threads.c: call thread_cleanup before finishing the thread if we get
7904         there.
7905
7906 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
7907
7908         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7909         assemblies from the parent. Fixes #65665.
7910
7911 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
7912
7913         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7914         modifiers.
7915
7916 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
7917
7918         * reflection.h: add prototype for mono_get_dbnull_object
7919         * reflection.c: add prototypes for get_default_param_value_blobs 
7920         and mono_get_object_from_blob for fussier compilers
7921
7922 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
7923  
7924         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7925         false deadlock checks in class initialization.
7926  
7927 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
7928
7929         * image.c (mono_image_addref): Fix comment.
7930
7931         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7932         possible.
7933
7934 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
7935
7936         * reflection.c (mono_param_get_objects): Modified to return
7937         ParameterInfo.DefaultValue object.
7938
7939         (get_default_param_value_blobs):
7940         (mono_get_object_from_blob):
7941         (mono_get_dbnull_object): New helper routines. 
7942
7943         * object.c (mono_get_constant_value_from_blob): New helper routine
7944         carved out from get_default_field_value ()
7945
7946         * object-internals.h (mono_get_constant_value_from_blob): Added
7947         function declaration.
7948
7949 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7950
7951         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
7952         referenced assemblies. Fixes #62135.
7953
7954         * exception.h exception.c (mono_get_exception_file_not_found2): New
7955         helper function.
7956
7957 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
7958
7959         * class.h class.c: Add mono_type_get_underlying_type ().
7960
7961 2004-09-09  Geoff Norton <gnorton@customerndna.com>
7962
7963         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7964         Fix GetTypes() to support dynamically created assemblies.
7965
7966 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
7967
7968         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7969         
7970         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7971         previous patch.
7972
7973         * reflection.h reflection.c loader.c: Allow dynamic construction of
7974         pinvoke methods. Fixes #65571.
7975         
7976         * reflection.c (mono_reflection_get_type): Revert previous change since
7977         it causes regressions.
7978
7979 2004-09-08  Martin Baulig  <martin@ximian.com>
7980
7981         * class.c (class_compute_field_layout): Don't call
7982         mono_class_layout_fields() for open generic instances.
7983
7984 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7985         * threads.c appdomain.c: fix typo in GC macro
7986
7987 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7988
7989         * threads.c: don't call mono_thread_detach() in start_wrapper(),
7990         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7991
7992 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
7993
7994         * image.c (mono_image_close): Applied patch from 
7995         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7996         assembly is loaded multiple times from data.
7997         
7998         * image.c (mono_image_open): Fix warning.
7999
8000 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8001
8002         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
8003         once. Fixes #58334.
8004         
8005         * reflection.c (mono_reflection_create_runtime_class): Initialize
8006         klass->nested_classes. Fixes #61224.
8007
8008 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8009
8010         * threads.c: sched_yield() on exit, to allow threads to quit.
8011
8012 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8013
8014         * object.c (mono_unhandled_exception): Remove leftover debug code.
8015
8016 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
8017
8018         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
8019
8020 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8021
8022         * marshal.c (emit_marshal_array): Really null terminate string arrays.
8023         
8024         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
8025
8026 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8027
8028         * marshal.c (emit_marshal_array): Null terminate string arrays.
8029         
8030         * marshal.c (raise_auto_layout_exception): Fix warning.
8031
8032         * reflection.c (mono_param_get_objects): Initialize the default value
8033         with DBNull.Value, not null. Fixes #62123.
8034
8035 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
8036
8037         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
8038         throw an exception with a cute explanation.
8039
8040 2004-09-06  Dick Porter  <dick@ximian.com>
8041
8042         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8043         Close the new process's thread handle, as we don't use it.  The
8044         handle stays around forever otherwise.
8045
8046 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8047
8048         * object.c (arith_overflow): Fix warning.
8049
8050         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8051         calling conventions in method refs. Fixes #65352.
8052
8053         * reflection.c: Fix warnings.
8054
8055 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8056
8057         * icall.c: Add a new icall for Array.Clear
8058
8059 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8060
8061         * object.c: When allocating an array, we have to throw
8062         an overflow exception if any of the lengths are < 0.
8063
8064 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8065
8066         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8067         properly. Also move implementation of string array marshalling to 
8068         managed code. Fixes #42316.
8069
8070 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8071
8072         * assembly.c: provide more information when loading an assembly fails.
8073
8074 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8075
8076         * filewatcher.c: don't expect the development fam package to be
8077         installed.
8078
8079 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
8080
8081         * marshal.c: Make a copy of the signature cookie since it will be
8082         freed by the caller.
8083         
8084         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8085
8086         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8087
8088         * metadata.c (mono_metadata_free_marshal_spec): New function to free
8089         marshal specs.
8090
8091         * marshal.c: More refactoring.
8092         
8093         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8094         smaller functions.
8095
8096 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
8097
8098         * object.c: In mono_message_invoke, fill the output parameter array after
8099           calling the managed method (it was done before the call). This fixes
8100           bug #59299.
8101
8102 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8103
8104         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8105         as well.
8106
8107 2004-09-02  Martin Baulig  <martin@ximian.com>
8108
8109         * class.c (mono_class_instance_size): Don't allow generic type
8110         definitions or open generic instances.
8111         (mono_class_array_element_size): If we're a value type, call
8112         mono_class_instance_size() on the original class.
8113
8114         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8115         handle generic instances.
8116
8117         * mono-debug-debugger.c (write_type): Handle generic instances
8118         like classes.
8119
8120 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8121
8122         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8123         the allocation request fails. Fixes #65089.
8124
8125         * object.c (mono_runtime_free_method): Do not call mono_free_method.
8126         
8127         * object.c (mono_runtime_free_method): New function to free a dynamic
8128         method.
8129
8130         * marshal.c (mono_delegate_free_ftnptr): New function to free the
8131         delegate trampoline.
8132
8133         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8134         with hasthis as dynamic,
8135
8136         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8137
8138         * domain.c (mono_jit_info_table_remove): New function to remove an
8139         entry from the jit info table.
8140
8141         * class-internals.h (MonoMethod): Add 'dynamic' field.
8142
8143         * loader.c: Fix warnings.
8144
8145 2004-09-01  Martin Baulig  <martin@ximian.com>
8146
8147         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8148         instead of mono_debugger_lock() because the latter one is a no-op
8149         unless running in the debugger.
8150
8151 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8152
8153         * class.c (class_compute_field_layout): Classes with auto-layout or
8154         reference fields are not blittable.
8155         
8156 2004-09-01  Dick Porter  <dick@ximian.com>
8157
8158         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8159         mono_image_get_filename() to get the assembly location.
8160
8161         * icall.c:
8162         * metadata.h: Fix compile warnings
8163
8164 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8165
8166         * class.c (class_compute_field_layout): System.Object is blittable.
8167
8168         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8169         as in/out. Fixes #59909.
8170
8171 2004-09-01  Martin Baulig  <martin@ximian.com>
8172
8173         * metadata.h (MONO_TYPE_ISREFERENCE): Call
8174         mono_metadata_generic_inst_is_valuetype() if we're a generic
8175         instance to check whether our underlying type is a reference type.
8176
8177 2004-09-01  Martin Baulig  <martin@ximian.com>
8178
8179         * metadata.c (mono_type_size): If we're a generic instance, call
8180         mono_class_value_size() for value types.
8181
8182 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
8183
8184         * marshal.c: Implement more custom marshalling functionality. Fixes
8185         #64915.
8186
8187 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8188
8189         * mono-debug.c, debug-mono-symfile.c: add some locking love.
8190
8191 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
8192
8193         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8194
8195         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8196
8197         * icall.c: Fix some warnings.
8198
8199         * threads.c (abort_appdomain_thread): Fix unref errors.
8200         (mono_thread_current): Fix THREAD_DEBUG define.
8201
8202 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
8203
8204         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8205
8206         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8207
8208 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
8209
8210         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
8211         string arrays.
8212
8213 2004-08-28  Martin Baulig  <martin@ximian.com>
8214
8215         * metadata.c
8216         (mono_metadata_generic_inst_is_valuetype): New public function.
8217
8218         * metadata.h (MONO_TYPE_ISSTRUCT): Call
8219         mono_metadata_generic_inst_is_valuetype() if we're a generic
8220         instance to check whether our underlying type is a valuetype.
8221
8222 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
8223
8224         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8225         #63768.
8226
8227 2004-08-25  Martin Baulig  <martin@ximian.com>
8228
8229         * loader.c (mono_get_method_from_token): Abstract methods can also
8230         be generic and thus have type parameters.
8231
8232         * metadata-internals.h
8233         (MonoDynamicImage): Added `GPtrArray *gen_params'.
8234
8235         * reflection.c (mono_image_get_generic_param_info): Don't create a
8236         metadata row, just add an entry to the `gen_params' array.
8237         (build_compressed_metadata): Sort the `gen_params' array and then
8238         actually create the metadata.
8239
8240 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8241
8242         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8243
8244 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
8245
8246         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8247
8248 2004-08-24  Martin Baulig  <martin@ximian.com>
8249
8250         * class.cs (mono_class_is_subclass_of): Like an interface, a
8251         generic instance also derives from System.Object.
8252
8253 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
8254
8255         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8256         custom modifiers to be in any order. Fixes #61990.
8257
8258 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
8259
8260         * object.c: Register mono_object_new_fast icall.
8261         
8262         * object.c (mono_class_get_allocation_ftn): Return to calling
8263         mono_object_new_fast, since it seems faster to compute the object 
8264         size in unmanaged code than passing it as a parameter.
8265
8266         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8267
8268         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8269         this function with Boehm as the oom handler, so we don't have to check
8270         the result of GC_malloc.
8271
8272         * object.c: Remove checks for oom.
8273
8274         * object.h object.c (mono_class_get_allocation_ftn): New function to
8275         return the icall which can be used to allocate an instance of a given
8276         class. 
8277
8278         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8279
8280         * class-internals.h: Add 'enabled' field.
8281
8282 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
8283
8284         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8285
8286 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
8287         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8288         value 0x0010.
8289
8290 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
8291
8292         * appdomain.c: use the Tls function for appdomain too,
8293         at Zoltan's request. Actually return in mono_context_get
8294
8295         * appdomain.c, profiler.c, threads.c: use __thread
8296
8297 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
8298
8299         * appdomain.c threads.c: Call GC_CreateThread on windows.
8300
8301         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8302         multiple libraries since this don't work on windows.
8303
8304 2004-08-18  Martin Baulig  <martin@ximian.com>
8305
8306         * class-internals.h
8307         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8308         MonoMethodHeader.
8309
8310         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8311         MonoMethodNormal since we also need it for abstract and interface
8312         methods.
8313
8314         * reflection.c
8315         (build_compressed_metadata): Sort the GenericParam table.
8316         (mono_image_create_token): Added `gboolean create_methodspec'
8317         argument; this is false when generating a MethodImpl token.
8318         (reflection_methodbuilder_to_mono_method): Abstract and interface
8319         methods may also have generic parameters.
8320
8321 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8322
8323         * appdomain.c: thread local alloc
8324
8325 2004-08-17  Martin Baulig  <martin@ximian.com>
8326
8327         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8328
8329         * icall.c
8330         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8331         argument.
8332
8333         * class.c (mono_type_get_full_name): New public function.
8334         (mono_type_get_name): Don't include the type arguments.
8335
8336 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
8337
8338         * Makefile.am: Build static versions of libmetadata and libmonoruntime
8339         for inclusion into the mono executable.
8340
8341 2004-08-16  Martin Baulig  <martin@ximian.com>
8342
8343         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8344         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8345
8346 2004-08-14  Martin Baulig  <martin@ximian.com>
8347
8348         * class.c (dup_type): Also copy the `byref' field.
8349
8350 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
8351
8352         * reflection.c (create_dynamic_mono_image): Revert the last change 
8353         since it breaks bootstrap.
8354
8355 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
8356
8357         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8358
8359         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8360         not free them with g_free.
8361
8362 2004-08-11  Martin Baulig  <martin@ximian.com>
8363
8364         * reflection.c (mono_reflection_setup_internal_class): Also call
8365         mono_class_setup_mono_type() if we already have a `tb->type.type'.
8366
8367 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
8368
8369         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
8370         called during default (first) AppDomain creation. Keep track of
8371         Evidence when loading assemblies.
8372
8373 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8374
8375         * opcodes.c, opcodes.h: reduce runtime relocations.
8376
8377 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8378
8379         * culture-info.h, locales.c: fixes and chages to sue the new
8380         optimized format of the locale data.
8381         * culture-info-tables.h: regenerated.
8382
8383 2004-08-06  Geoff Norton <gnorton@customerdna.com>
8384         
8385         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8386
8387 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
8388
8389         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8390         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8391         * domain-internals.h: icall declaration.
8392         * icall.c: icall registration.
8393         * object-internals.h: New fields in MonoAssembly for CAS.
8394
8395 2004-08-05  Duncan Mak  <duncan@ximian.com>
8396
8397         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8398         CEE_LDELEM_ANY.
8399
8400 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8401
8402         * reflection.c: fix to deal with object[] arrays in custom ctors
8403         (bug #62550).
8404
8405 2004-08-05  Martin Baulig  <martin@ximian.com>
8406
8407         * class.c (mono_class_array_element_size): Added support for
8408         generic instances and correctly handle "recursive" types.
8409
8410 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
8411
8412         * assembly.c: Fix warnings.
8413
8414 2004-08-04  Martin Baulig  <martin@ximian.com>
8415
8416         * class.c
8417         (mono_type_get_name_recurse): Added `gboolean include_arity'
8418         argument specifying whether or not we should include the generic
8419         arity in the type name.
8420         (_mono_type_get_name): New static function.
8421         (mono_class_setup_vtable): If we're a generic instance, don't
8422         include the generic arity in the names of explicit method
8423         implementations.        
8424
8425 2004-08-03  Martin Baulig  <martin@ximian.com>
8426
8427         * class.c (mono_type_get_name_recurse): Enclose the generic type
8428         arguments in `<', '>'.
8429
8430 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8431
8432         * gc.c: make GC warning messages use the trace API, they are just
8433         noise to most of the users.
8434
8435 2004-08-03  Martin Baulig  <martin@ximian.com>
8436
8437         * debug-mono-symfile.c (read_string): Correctly read the string.
8438
8439 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
8440
8441         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8442         
8443         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8444         icalls.
8445         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8446
8447 2004-07-30  Martin Baulig  <martin@ximian.com>
8448
8449         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8450         Reflect latest symbol writer changes.   
8451
8452 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8453
8454         * object.c: always create an object if null is passed
8455         to Invoke() where a valuetype is expected.
8456
8457 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
8458
8459         * marshal.c (mono_marshal_init): make managed
8460         signatures match native ones better for 64bits.
8461
8462 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8463
8464         * appdomain.c: hack to build correctly the private bin path on windows.
8465         Fixes bug #61991.
8466
8467 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
8468
8469         * assembly.c: Load mscorlib from the correct framework directory
8470           (mono/<version>/mscorlib.dll).
8471         * appdomain.h: Added prototypes for new functions.
8472         * internals.h: Added some prototypes.
8473         * domain.c: When initializing the runtime, get from the executable and
8474           the configuration files the runtime version that the app supports.
8475           Added support methods for reading app.exe.config. Added list of versions
8476           supported by the JIT. Added two new methods: mono_init_from_assembly,
8477           which initializes the runtime and determines the required version from
8478           the provided exe file, and mono_init_version, which initializes
8479           the runtime using the provided version.
8480         * icall.c: Get machine.config from version-specific directory.
8481         * reflection.c: When generating an image, embed the version number
8482           of the current runtime.
8483
8484 2004-07-28  Dick Porter  <dick@ximian.com>
8485
8486         * socket-io.c
8487         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8488         returned sockaddr size before creating the remote address object.
8489         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8490         61608.
8491
8492 2004-07-28  Dick Porter  <dick@ximian.com>
8493
8494         * locales.c (string_invariant_compare_char): Fix invariant char
8495         compares between upper and lower cases.  Fixes bug 61458.
8496
8497 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
8498         
8499         * marshal.c: actually cache stelem.ref wrappers.
8500         
8501 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8502
8503         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
8504         sections and remove the mono_cli_rva_map () function.
8505
8506 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8507
8508         * debug-mono-symfile.c: fix one more endianess issue, from a patch
8509         by Geoff Norton (<gnorton@customerdna.com>).
8510
8511 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8512
8513         * class.c: fix class loads for pointer types (typeof(int) !=
8514         typeof(int*)).
8515
8516 2004-07-27  Martin Baulig  <martin@ximian.com>
8517
8518         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8519         reading the debugging information from an external ".mdb" file.
8520
8521 2004-07-24  Martin Baulig  <martin@ximian.com>
8522
8523         * reflection.c (mono_image_get_type_info): Only write a class
8524         layout entry if we actually have a size or a packing size.
8525
8526 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8527
8528         * reflection.c (type_get_fully_qualified_name): 
8529         insert cast to get type checking of ?: with non-gcc compilers
8530
8531 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8532
8533         * rand.c: use g_getenv for both lookups of
8534         MONO_EGD_SOCKET
8535
8536 2004-07-17  Martin Baulig  <martin@ximian.com>
8537
8538         * reflection.c (mono_reflection_bind_generic_method_parameters):
8539         Set `gmethod->reflection_info'.
8540
8541 2004-07-17  Martin Baulig  <martin@ximian.com>
8542
8543         * class.c (mono_class_create_from_typedef): Insert the newly
8544         created class into the hash table before computing the interfaces
8545         since we could be called recursively.
8546
8547 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
8548
8549         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8550         function to implement stelem.ref in managed code
8551         * class-internals.h, debug-helpers.c: a new wrapper type
8552         for the above.
8553
8554 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8555
8556         * gc.c: allow GC handles to work even when no GC is compiled in.
8557         Fix part of bug #61134 (GetAddrOfPinnedObject).
8558
8559 2004-07-13  Peter Williams  <peter@newton.cx>
8560  
8561         * process.c (complete_path): Make sure we don't attempt to execute
8562         directories.
8563  
8564 2004-07-12  Geoff Norton <gnorton@customerdna.com>
8565
8566         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
8567           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
8568           and will add/subtract the hour if needed
8569
8570 2004-07-12  Martin Baulig  <martin@ximian.com>
8571
8572         * reflection.c (mono_field_get_object): If we have
8573         `field->generic_info', take the attributes from
8574         `field->generic_info->generic_type'.    
8575
8576 2004-07-12  Martin Baulig  <martin@ximian.com>
8577
8578         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8579         This function must be called before initializing the runtime.
8580         (mono_debug_init_1): New function; call this after initializing
8581         the runtime, but before loading the assembly.  It tells the
8582         debugger to load corlib and the builtin types.
8583
8584         * mono-debug-debugger.c: Did some larger changes in the debugging
8585         code; support recursive class declarations, make sure we actually
8586         add all classes.
8587
8588 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8589
8590         * debug-helpers.c: undo my previous patch and fixed the real issue in
8591         ../mini/exceptions-x86.c
8592
8593 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8594
8595         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8596         when no HOME env. variable was set and a NullRef was thrown in a .cctor
8597         called from other .cctors.
8598
8599 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
8600
8601         * loader.c: Removed the mono_loader_wine_init hack now that we are
8602         doing a managed version of Windows.Forms.
8603
8604 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
8605
8606         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8607         threadpool.c, threads.c: remove static data from rootset.
8608
8609 2004-07-09  Dick Porter  <dick@ximian.com>
8610
8611         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8612         Don't do any more processing if the matched length was 0.  It was
8613         increasing the size of the string before.  Fixes bug 61167.
8614
8615 2004-07-09  Dick Porter  <dick@ximian.com>
8616
8617         * socket-io.h:
8618         * socket-io.c
8619         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8620         Add support for SO_PEERCRED if its available.
8621
8622 2004-07-09  Peter Bartok <pbartok@novell.com>
8623         * loader.c: winelib.exe.so error message is now only displayed if
8624         MONO_DEBUG is set. To help us avoid questions when people are trying
8625         out the new Managed.Windows.Forms.
8626
8627 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
8628
8629         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
8630         for isinst and castclass wrappers.
8631
8632         * class-internals.h icall.c: Move registration and lookup of JIT icalls
8633         to libmetadata from the JIT, so they could be used by the marshalling
8634         code and the interpreter.
8635
8636         * marshal.c: Register marshalling related JIT icalls here instead of
8637         in mini.c. Use CEE_MONO_ICALL instead of the family of 
8638         CEE_MONO_PROC<x> opcodes to call marshalling functions.
8639
8640         * metadata.h: Remove unneeded marshalling conversions.
8641
8642         * opcodes.c: Update for new opcodes.
8643         
8644 2004-07-08  Martin Baulig  <martin@ximian.com>
8645
8646         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8647         (mono_debug_get_domain_data): Make this function static.
8648
8649 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8650
8651         * gc.c, object.h: add nice GC handle API for embedders.
8652
8653 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
8654
8655         * reflection.c: more changes for the new api
8656
8657         * object.c: When we reflect on a field w/ a constant value, it
8658         will not have a memory location, so we must access metadata. Also,
8659         allow easier reading of strings so that we can read them from
8660         the constant data.
8661
8662         * class.c (mono_class_layout_fields): no need for literal fields here.
8663
8664         * class-internals.h: api changes for const fields
8665
8666         * icall.c (ves_icall_get_enum_info): use new apis for const fields
8667
8668 2004-07-06  Martin Baulig  <martin@ximian.com>
8669
8670         * mono-debug.h: Increment version number to 44.
8671
8672         * mono-debug.c (mono_debug_add_wrapper): The second argument is
8673         now a gpointer, rewrote this whole method.
8674
8675         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8676         function.  Add information about the wrapper in a new "misc table".
8677
8678         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8679         for the new misc table.
8680
8681 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
8682
8683         * metadata-internals.h image.c: Add a cache for helper signatures.
8684
8685         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8686
8687 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
8688
8689         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8690         delegates from a delegate. Fixes #61033.
8691         
8692         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8693         marshalling of stringbuilder arrays. Fixes #59900.
8694
8695 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8696
8697         * icall.c: Add EnumBuilder:setup_enum_type icall.
8698
8699 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
8700
8701         * icall.c: Added a new icall for the property version of
8702         OffsetOfStringData.
8703
8704 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8705
8706         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8707         it has a constant size across platforms.
8708
8709         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8710         stack trace.
8711
8712 2004-06-29  Martin Baulig  <martin@ximian.com>
8713
8714         * mono-debug.c (mono_debug_add_method): Protect the whole function
8715         in mono_debugger_lock(), not just parts of it.
8716
8717 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8718
8719         * reflection.c: make sure padding bytes in heaps are zeroed.
8720
8721 2004-06-24  David Waite  <mass@akuma.org>
8722
8723         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8724         image.c, loader.c, locales.c, marshal.c, metadata.c,
8725         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8726         string-icalls.c, threads.c: change to C90-style comments from C99 /
8727         C++ -style
8728
8729 2004-06-24  Dick Porter  <dick@ximian.com>
8730
8731         * threads.c
8732         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8733         return createdNew.  Fixes bug 60412.
8734
8735         * threads-types.h: 
8736         * icall.c: Add createdNew parameter to CreateMutex icall
8737
8738 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8739
8740         * reflection.c, object-internals.h: save default value in params.
8741
8742 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8743
8744         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8745         no need to build a new path combining that with the application base.
8746         Fixes bug #60442.
8747
8748 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8749
8750         * reflection.c: fixed minor standard compliance issues.
8751
8752 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8753
8754         * reflection.c: fixed issue with encoding some custom attributes
8755         (arrays in properties and fields, bug #60411).
8756
8757 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8758
8759         * reflection.c: fix start address when copying the public key token.
8760
8761 2004-06-23  Martin Baulig  <martin@ximian.com>
8762
8763         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8764         the `exc' object in a static object to put it into the GC's root set.
8765
8766 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8767
8768         * reflection.c: make mono_reflection_setup_internal_class ()
8769         callable a second time to setup a new parent class.
8770
8771 2004-06-23  Dick Porter  <dick@ximian.com>
8772
8773         * threads.c: Check for WAIT_IO_COMPLETION return values.
8774
8775 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
8776
8777         * appdomain.c: Removed the g_free on the public key token. Now copy 
8778         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8779         * assembly.c: Added public key token string value when loading 
8780         assemblies. Fix bug #60439.
8781         * icall.c: Added missing informations (like public key) in 
8782         GetReferencedAssemblies. Fix #60519.
8783         * image.h: Changed definition for public key token from const char*
8784         public_tok_value to guchar public_key_token [17];
8785         * reflection.c: Updated for changes to public key token.
8786
8787 2004-06-22  Lluis Sanchez Gual
8788
8789         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
8790         for the field in base classes.
8791
8792 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8793
8794         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8795         mark headers as not supported, they are installed only for use by the
8796         debugger.
8797
8798 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8799
8800         * *.c, *.h: avoid namespace pollution in public headers.
8801
8802 2004-06-21  Martin Baulig  <martin@ximian.com>
8803
8804         * exception.c (mono_get_exception_security): It's in
8805         "System.Security", not in "System".
8806
8807         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8808         the exception classes.
8809
8810 2004-06-21  Martin Baulig  <martin@ximian.com>
8811
8812         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8813         Protect the exception object from being finalized.
8814
8815 2004-06-21  Martin Baulig  <martin@ximian.com>
8816
8817         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8818         public function.
8819
8820 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
8821
8822         * reflection.c: Load the assembly in mono_reflection_type_from_name,
8823         if it was not loaded before. Fix parts of #60439.
8824
8825 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8826
8827         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8828         code that was broken since Ben's change: wrappers are now
8829         dependent on the method signature only again.
8830
8831 2004-06-21  Martin Baulig  <martin@ximian.com>
8832
8833         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8834         added interface support.
8835
8836 2004-06-21  Martin Baulig  <martin@ximian.com>
8837
8838         * class.c (mono_vtable_get_static_field_data): New public method.
8839
8840 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
8841
8842         * filewatcher.c : Windows build fix to be compliant with API changes.
8843
8844 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8845
8846         * class.h, class.c: more accessors.
8847         * metadata.h, metadata.c: prepare for hiding MonoType and
8848         MonoMethodSignature: people should use the accessors from now on
8849         outside of the tree.
8850
8851 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8852
8853         * *.c, *.h: more API cleanups.
8854
8855 2004-06-18  Jackson Harper  <jackson@ximian.com>
8856
8857         * assembly.c: Trace loading assemblies.
8858         * loader.c: Trace loading native libraries.
8859         * mono-config.c: Trace loading config files.
8860         
8861 2004-06-18  Dick Porter  <dick@ximian.com>
8862
8863         * locales.c: Tell ICU the lengths of strings, it can cope with
8864         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
8865
8866 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8867
8868         * image.c: swapped name/filename;
8869
8870 2004-06-18  Martin Baulig  <martin@ximian.com>
8871
8872         * mono-debug-debugger.c (write_class): Write the parent class at
8873         the end of the header.
8874
8875 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8876
8877         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8878
8879 2004-06-17  Raja R Harinath  <rharinath@novell.com>
8880
8881         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
8882         (bundle_obj): New conditional define.
8883         (BUILT_SOURCES): Remove.
8884         ($(bundle_srcs)): Make parallel-make safe.
8885         (libmonoruntime_la_LIBADD): Make unconditional.
8886         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
8887         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8888
8889 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
8890
8891         * culture-info-tables.h: It was inconsistent with the latest
8892           supp info files.
8893
8894 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
8895
8896         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8897         be loaded.
8898
8899         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8900         with gcc 2.95.
8901
8902 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8903
8904         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8905         cleaned up public header threads.h.
8906
8907 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8908
8909         * Makefile.am, *.c, *.h: more API cleanups.
8910
8911 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8912
8913         * Makefile.am: removed monosn from compilation.
8914         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8915         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8916         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8917         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8918         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8919         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8920
8921 2004-06-15  Jackson Harper  <jackson@ximian.com>
8922
8923         * assembly.c: Make locales lower case when searching the GAC for
8924         assemblies. gacutil will always make locales lowercase when
8925         installing so this effectively makes them case insensitive.
8926         
8927 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
8928
8929         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8930         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8931           parameter which allows to choose whether the wait can be interrupted or 
8932           not. Also added the method mono_monitor_enter(), which locks the monitor
8933           using an infinite wait and without allowing interruption.
8934           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8935           interrupted.
8936         * object.h: Added new fields in MonoThread. suspend_event holds the event
8937           used to susped/resume the thread. synch_lock is the lock object to use for
8938           modifying the thread state.
8939         * threads.c: Use the new synch_lock object for locking, instead of "this",
8940           which can generate deadlocks.
8941           Moved thread state change in Thread.Sleep and Thread.Join from managed
8942           to unmanaged code. This avoids a deadlock when the thread was suspended
8943           just after acquiring the thread lock.
8944           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8945           Implemented Thread.Suspend using an event instead of ThreadSuspend,
8946           which is not fully implemented in the io-layer.
8947         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8948
8949 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8950
8951         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8952         threads-types.h: more API cleanups.
8953
8954 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8955
8956         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8957         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8958         threadpool.c, threads.c: first pass at the exported API cleanup.
8959
8960 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8961
8962         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8963
8964 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8965
8966         * icall.c: added internalGetHome.
8967
8968 2004-06-14  Dick Porter  <dick@ximian.com>
8969
8970         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8971         possible to return successfully when '.' or '..' were the only
8972         entries in a directory, but were skipped.  The MonoIOStat was not
8973         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
8974         Fixes bug 59574.
8975
8976 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8977
8978         * reflection.c: make binaries run on .Net 1.1 by default.
8979
8980 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8981
8982         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8983
8984 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8985
8986         * marshal.c: keep track of struct size with explicit layout
8987         (bug #59979).
8988
8989 2004-06-12  Martin Baulig  <martin@ximian.com>
8990
8991         * mono-debug-debugger.c: Comment out a debugging g_message().
8992
8993 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8994
8995         * reflection.c, reflection.h: do not free custom attrs that are cached.
8996         * icall.c: use braces to make code clearer.
8997
8998 2004-06-11  Martin Baulig  <martin@ximian.com>
8999
9000         * class.h (MonoInflatedField): New type.
9001         (MonoClassField): Replaced `MonoType *generic_type' with
9002         `MonoInflatedField *generic_info'.
9003
9004         * icall.c
9005         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
9006
9007 2004-06-11  Martin Baulig  <martin@ximian.com>
9008
9009         * reflection.c (mono_image_create_method_token): Correctly encode
9010         varargs methods.
9011
9012 2004-06-11  Martin Baulig  <martin@ximian.com>
9013
9014         * metadata.c (mono_metadata_parse_method_signature): When parsing
9015         a MethodDef which has VarArgs, also set sentinelpos if we don't
9016         have any parameters.
9017
9018 2004-06-11  Martin Baulig  <martin@ximian.com>
9019
9020         * verify.c (mono_method_verify): In CEE_CALL, use
9021         mono_method_get_signature() to get the method's signature, unless
9022         we're a PInvoke method.
9023
9024 2004-06-10  Jackson Harper  <jackson@ximian.com>
9025
9026         * assembly.c: Use <path>/lib/mono/gac for the extra paths
9027         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
9028         logical name as the supplied path is just a prefix to the gac not
9029         the direct path to it.
9030         
9031 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
9032
9033         * reflection.c: make the token for a created method match
9034         the token of the MethodBuilder it was created from
9035         (IKVM requires this behaviour now).
9036
9037 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
9038
9039         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
9040         reflection.c, socket-io.c: leak fixes.
9041
9042 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9043
9044         * icall.c: handle sentinel pos in vararg methods in position different
9045         from 0.
9046
9047 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9048
9049         * culture-info-tables.h: freshly generated.
9050
9051 2004-06-09  Martin Baulig  <martin@ximian.com>
9052
9053         * loader.c (mono_get_method_constrained): Call `mono_class_init
9054         (constrained_class)'.   
9055
9056 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
9057
9058         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
9059         any methods. Fixes #59629.
9060
9061 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9062
9063         * culture-info-tables.h: reflecting locale-builder updates.
9064
9065 2004-06-08  Dick Porter  <dick@ximian.com>
9066
9067         * object.h:
9068         * locales.c: Fixed compile warnings, including a real bug in
9069         CompareInfo_internal_compare.
9070         
9071 2004-06-08  Dick Porter  <dick@ximian.com>
9072
9073         * locales.c
9074         (ves_icall_System_Globalization_CompareInfo_internal_index):
9075         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9076         Double-check the resuls of usearches, because ICU currently
9077         ignores most of the collator settings here.  Fixes bug 59720.
9078         
9079 2004-06-08  Dick Porter  <dick@ximian.com>
9080
9081         * locales.c
9082         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9083         Fix memory leak and segfault-causing typo.  No idea how this one
9084         lasted so long without being noticed.
9085
9086 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
9087
9088         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9089         any methods. Fixes #59629.
9090
9091 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9092
9093         * assembly.c:
9094         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9095         own the critical section before). Removed dead code (that's done
9096         in the preload hook).
9097
9098         (mono_assembly_load_with_partial_name): call the preload hook.
9099
9100 2004-06-08  Martin Baulig  <martin@ximian.com>
9101
9102         * metadata.c (mono_metadata_signature_alloc): Default
9103         `sentinelpos' to -1.
9104
9105         * reflection.c (mono_image_get_array_token): Likewise.
9106
9107 2004-06-08  Martin Baulig  <martin@ximian.com>
9108
9109         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9110
9111         * metadata.c (mono_metadata_parse_method_signature): When parsing
9112         a MethodDef which has VarArgs, set sentinelpos.
9113
9114         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9115         `gint16' since we're using -1 for non-varargs methods.
9116
9117         * reflection.c
9118         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9119         (method_encode_signature): Added varargs support.
9120         (method_builder_encode_signature): Likewise.
9121         (mono_image_get_varargs_method_token): New static method.
9122         (mono_image_create_method_token): New public method; this is
9123         called via an icall instead of mono_image_create_token() when
9124         calling a varargs method.       
9125
9126 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
9127
9128         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9129
9130 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9131
9132         * culture-info-tables.h : Reflecting the latest locale-builder that
9133           fixed empty array representation ({} to {0}).
9134
9135 2004-06-07  Jackson Harper  <jackson@ximian.com>
9136
9137         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9138         looking up extra gac paths. This allows MONO_GAC_PATH to act
9139         exactly like a prefix.
9140         
9141 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9142
9143         * reflection.c (mono_reflection_type_from_name): Make a copy of the
9144         type name before modifying it. Fixes #59405.
9145
9146 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9147
9148         * culture-info.h: added fields for "all datetime patterns".
9149         * locales.c: (  ves_icall_System_Globalization_CultureInfo
9150           _construct_datetime_format ()): fill xxx_patterns fields.
9151         * object.h: added fields for "all datetime patterns" to
9152           MonoDateTimeFormatInfo.
9153         * culture-info-tables.h: reflecting locale-builder updates.
9154
9155 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9156
9157         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9158         the event has no add and remove methods. Fixes #59629.
9159
9160 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
9161
9162         * object.c: Fixed possible integer overflow when allocating large
9163         strings.
9164
9165 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9166
9167         * culture-info-tables.h: reflecting locale-builder updates.
9168
9169 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9170
9171         * culture-info-tables.h: reflecting locale-builder updates.
9172
9173 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
9174
9175         * culture-info-tables.h: reflecting locale-builder updates.
9176
9177 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
9178
9179         * threads.c: Made Thread.Sleep abortable.
9180
9181 2004-06-02  Martin Baulig  <martin@ximian.com>
9182
9183         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9184
9185         * debug-mono-symfile.h: Bumped symbol file version number to 37.
9186
9187 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
9188
9189         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9190
9191 2004-05-30  Jackson Harper  <jackson@ximian.com>
9192
9193         * reflection.c: Do not hardcode assembly versions or public key
9194         tokens anymore. All of this except the corlib section was dead
9195         code anyways.
9196         
9197 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
9198
9199         * object.c (mono_runtime_invoke_array): Automatically create boxed
9200         objects for byref valuetypes if needed. Fixes #59300.
9201         
9202         * object.c (mono_method_return_message_restore): Handle 
9203         MONO_TYPE_OBJECT as well.
9204
9205 2004-05-28  Jackson Harper  <jackson@ximian.com>
9206
9207         * reflection.c: The modified type encoding was causing build
9208         problems. Reverted for now.
9209         
9210 2004-05-28  Jackson Harper  <jackson@ximian.com>
9211
9212         * reflection.c/h: Take an assembly ref so that we dont create
9213         fully qualified names when encoding types in the same assembly as
9214         the custom attribute being emitted.
9215         * appdomain.c: Increment version number.
9216         
9217 2004-05-26  Duncan Mak  <duncan@ximian.com>
9218
9219         * icall.c
9220         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9221         Set the full version number (major, minor, build, revision).
9222
9223 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
9224
9225         * marshal.c (emit_struct_conv): increment src/dst after blit
9226         (mono_marshal_get_managed_wrapper,
9227         mono_marshal_get_native_wrapper): make sure we have marshalling
9228         info before marshalling params (info computation affects
9229         blittable)
9230
9231         * class.c (class_compute_field_layout): correctly deal with
9232         blittable
9233         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9234         value types (as per what windows dows by default)
9235         (mono_class_setup_mono_type): System.ValueType is blittable
9236         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9237         blittable
9238
9239         * marshal.c (mono_marshal_load_type_info): flag types  as
9240         non-blittable if the native layout doesn't match the managed
9241         layout
9242
9243 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9244
9245         * appdomain.c: don't add stuff in the private search path that is
9246         above the application base. If application base is not set, there's
9247         no private search path.
9248
9249 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
9250
9251         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9252         byref struct arguments in native->managed marshalling.
9253
9254 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
9255
9256         * marshal.c (mono_marshal_get_runtime_invoke): correctly
9257         cache methods using signature (special case for methods
9258         that are value type or string class)
9259         
9260         * image.c (mono_image_close): clean up allocated GSList's
9261         in runtime_invoke_cache.
9262
9263 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9264
9265         * mono-config.c: set the correct path for mono_cfg_dir on windows when
9266         there's no MONO_CFG_DIR environment variable defined.
9267
9268 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9269
9270         * threads.c: windows version must be >= 0x0500 to include OpenThread.
9271
9272 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
9273
9274         * threadpool.c: Really wait for 500ms after the async call, even if the wait
9275           is interrumped.
9276         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9277           before waiting for it, and call CloseHandle after the wait to unref it.
9278           This will make sure that handles are not disposed too early.
9279
9280 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9281
9282         * appdomain.c:
9283         * appdomain.h:
9284         * icall.c: removed
9285         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9286         needed now.
9287
9288         * object.c: se the application_base only for the domain that runs
9289         Main. Fixes bug #59216,
9290
9291 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9292
9293         * appdomain.c:
9294         * object.c: only the domain in which Main is run have
9295         SetupInformation.ConfigurationFile set, so moved a few lines from
9296         appdomain.c to object.c.
9297
9298 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9299
9300         * appdomain.c: we tried to load [name].(dll|exe), but according
9301         to bug #57710, we must also try [culture]/[name].(dll|exe) and
9302         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9303         There's a test case attached to bug #58922.
9304
9305 2004-05-27  Dick Porter  <dick@ximian.com>
9306
9307         * icall.c:
9308         * file-io.c: Implemented icalls for locking and unlocking regions
9309         in a file.
9310         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9311         FALSE on error (fixes both compiler warning and real bug.)
9312
9313 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
9314
9315         * culture-info-tables.h: reflecting locale-builder updates.
9316
9317           (Added missing ChangeLog entry for 05/26)
9318
9319 2004-05-27  Jackson Harper  <jackson@ximian.com>
9320
9321         * locales.c: Fix some cut and paste errors.
9322         
9323 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9324
9325         * mono-config.c: set the correct path for config. directory on windows.
9326
9327 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9328
9329         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9330           on win32.
9331
9332 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9333
9334         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9335         from pinvoke functions.
9336         
9337         * marshal.c (mono_ftnptr_to_delegate): Implement this.
9338
9339 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9340
9341         * culture-info-tables.h: reflecting locale-builder updates.
9342
9343 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9344
9345         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9346         #59086.
9347
9348 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
9349
9350         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9351         * icall.c: Modified icalls for RNG.
9352         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
9353         Windows (CryptoAPI).
9354
9355 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9356
9357         * locales.c: Fix build.
9358
9359 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9360
9361         * culture-info-tables.h: reflecting locale-builder updates.
9362
9363 2004-05-25  Jackson Harper  <jackson@ximian.com>
9364
9365         * locales.c: When creating the current culture use the $LANGs
9366         specific culture. So DateTimeFormat and NumberFormat entries are created.
9367         
9368 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9369
9370         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9371         a char array as parameter.
9372
9373 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
9374
9375         * image.c: In mono_image_open(), always use an absolute path name to
9376           look for already loaded images.
9377
9378 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
9379
9380         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9381         missing in the windows build (like older cygwin include files).
9382
9383 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
9384
9385         * icall.c: Fixed check for possible integer overflow in Buffer_
9386         BlockCopy icall. Replaced comments style // by /* */.
9387
9388 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
9389
9390         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9391         
9392         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9393         check after MONO_VTADDR. Fixes pinvoke2.exe.
9394
9395         * marshal.h marshal.c metadata.h: Add beginnings of support for
9396         ftnptr -> delegate marshalling.
9397
9398 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
9399
9400         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9401         * threads.c: Fix warnings.
9402
9403 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
9404
9405         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9406         * icall.c: Registered icalls for Suspend and Resume.
9407         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9408           Thread.Abort.
9409         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9410         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9411         * process.c: Use WaitForSingleObjectEx.
9412         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
9413           checkpoints.
9414         * threads.c, threads.h: Make use of new Ex wait methods. Improved
9415           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9416           for Suspend and Resume. Added new mono_thread_stop, used for stoping
9417           background threads. Added basic support for Abort in Windows.
9418           Start new threads using a managed delegate invoke wrapper. This wrapper
9419           has an interruption checkpoint that is needed since an interruption
9420           can be requested before the thread leaves the unmanaged code that starts 
9421           the thread.
9422         * marshal.c: Added interruption checkpoint after every native call, and
9423           also before managed calls for wrappers called from unmanaged code to
9424           go into managed code.
9425         * object.h: Added new field in MonoThread to keep track of interruption
9426           requests.
9427
9428 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
9429
9430         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9431         calls.
9432
9433 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9434
9435         * appdomain.c:
9436         * assembly.c:
9437         * gc.c:
9438         * locales.c:
9439         * mono-config.c:
9440         * rand.c: getenv -> g_getenv (windows!)
9441
9442         * process.c: complete_path is also used on non-windows platforms.
9443
9444 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9445
9446         * icall.c: new signature for Process_Start.
9447
9448         * process.[ch]: new signature for Process_Start. If we're on windows
9449         and UseShellExecute is false, we have to search for the program by
9450         ourselves if we don't get a full path.
9451
9452 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9453
9454         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
9455         marshalling and call CleanUpNativeData if needed. Fixes #58646.
9456
9457 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9458
9459         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9460         Fixes bug #58373.
9461
9462 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9463
9464         * process.c: use double quotes to quote program name and arguments on
9465         windows. Fixes bug #58575.
9466
9467 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9468
9469         * file-io.c: don't return "." and ".." when using windows Find*File.
9470
9471 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
9472
9473         * marshal.c: Don't pass wrappers to message init because method 
9474         addressed used to lookup metadata. part of remoting[2|3] fix.
9475
9476 2004-05-15  Jackson Harper  <jackson@ximian.com>
9477
9478         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9479         path is essentially the same as MONO_PATH except that it points to
9480         GACs instead of lib directories.
9481         * loader.h: The user gac is gone so we dont need function to
9482         enable/disable it.
9483         * mono-config.c: user gac option is now gone.
9484         
9485 2004-05-15  Jackson Harper  <jackson@ximian.com>
9486
9487         * culture-info.h: Make defines more consistent, add calendar data
9488         to the culture info table.
9489         * culture-info-tables.h: Add basic calendar data. Basically
9490         everyone gets default gregorian until all the data is
9491         updated.
9492         * locales.c: Use the new consistent defines. Set calendar data for
9493         culture info objects.
9494         * object.h: add a field for calendar data to CultureInfo
9495         
9496 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
9497
9498         * image.c: image->runtime_invoke_cache is keyed on signatures now.
9499         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9500         a signature.
9501         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9502         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9503         an extra param that is the pointer of the method to invoke. The IL for
9504         the invoke method is no longer specific to the method, but to the
9505         signature of the method. Thus, we can share the same code for multiple
9506         methods. This reduces the number of methods that have to be compiled.
9507
9508 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
9509
9510         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9511
9512         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9513
9514         * icall.c: Optimize Buffer.BlockCopy.
9515
9516 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9517
9518         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9519         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9520         quote). Changed them to "MMMM yyyy".
9521
9522 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
9523
9524         * rand.c
9525         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
9526
9527 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
9528
9529         * reflection.h: Updated after changes to managed structures.
9530
9531         * appdomain.c: Bump corlib version.
9532
9533 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9534
9535         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9536         windows.
9537
9538 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9539
9540         * Makefile.am: link to ../os/libmonoos.la on windows.
9541
9542         * assembly.c:
9543                 -If MONO_DEBUG, warn about non-existing directories in
9544                 MONO_PATH.
9545                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9546                 compile time variable.
9547                 -Removed init_default_path and call mono_set_rootdir from
9548                 libmonoos.a instead (windows only).
9549
9550         * assembly.h: declare mono_assembly_getrootdir().
9551
9552         * domain.c:
9553         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9554
9555         * loader.c: s/getenv/g_getenv/
9556
9557 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
9558
9559         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9560
9561         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9562
9563         * metadata.h: Add new marshalling conversions.
9564
9565         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9566         function.
9567
9568         * reflection.c (mono_reflection_get_type): Lookup the type in all
9569         modules of a multi-module assembly. Fixes #58291.
9570
9571 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
9572
9573         * threads.c: Before aborting a background, set the StopRequested
9574         state.  This avoids throwing the Abort exception.
9575         In mono_thread_manage, don't continue with the shutdown until all
9576         aborted threads have actually stopped.
9577
9578 2004-05-10  Jackson Harper  <jackson@ximian.com>
9579
9580         * locales.c: Remove the modifier from culture names.
9581         
9582 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9583
9584         * Makefile.am: monosn is not installed any more. It has been deprecated
9585         in favor of sn.
9586
9587 2004-05-07  Jackson Harper  <jackson@ximian.com>
9588
9589         * locales.c
9590         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9591         Fix array construction, add bailout if the length is 0.
9592
9593 2004-05-07  Dick Porter  <dick@ximian.com>
9594
9595         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9596         machine doesn't have a DNS entry.  Patch by Urs Muff
9597         (umuff@quark.com), fixes bug 57928.
9598
9599 2004-05-06  Jackson Harper  <jackson@ximian.com>
9600
9601         * reflection.c: Handle null PublicTokens properly. alloc mem for
9602         assembly names culture so we dont crash when freeing it.
9603         
9604 2004-05-06  Jackson Harper  <jackson@ximian.com>
9605
9606         * assembly.c: Check the usergac when loading with partial names.
9607         
9608 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9609
9610         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
9611         does nothing for now (not required for Linux/Windows) but the class
9612         library can call it (and a newer or modified runtime could need it).
9613         * icall.c: Registred icall.
9614
9615 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9616
9617         * loader.c: prints a message on module loading error we set MONO_DEBUG
9618         environment variable.
9619
9620 2004-05-05  Jackson Harper  <jackson@ximian.com>
9621
9622         * appdomain.c: Handle PublicKeyToken=null properly.
9623         
9624 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9625
9626         * environment.c|h: Added icall ves_icall_System_Environment_
9627         GetOSVersionString to get the current OS version as a string.
9628         * icall.c: Registred icall.
9629
9630 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
9631
9632         * object.c: in mono_object_get_virtual_method(), take into account that
9633         non-virtual methods don't have a slot in the vtable. Check needed when
9634         the object is a proxy.
9635
9636 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
9637
9638         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9639         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9640
9641         * object.c (mono_class_compute_gc_descriptor): Fix warning.
9642
9643         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9644         passed when a valuetype is expected.
9645
9646         * object.c (mono_unhandled_exception): Only set the exit code if the
9647         exception happens in the main thread. Fixes thread5.exe.
9648
9649         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9650         invalid names. Fixes #58047.
9651
9652 2004-05-03  Jackson Harper  <jackson@ximian.com>
9653
9654         * assembly.c: This line was committed accidently and is unneeded.
9655         
9656 2004-05-03  Jackson Harper  <jackson@ximian.com>
9657
9658         * icall.c: Add new icall for Assembly::LoadWithPartialName
9659         * assembly.c/.h: new function that probes the GAC to load partial
9660         assembly names by Paolo Molaro.
9661         
9662 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9663
9664         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9665         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9666         (type_get_fully_qualified_name): Added PublicKeyToken when building a
9667         full type name.
9668
9669 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9670
9671         * appdomain.c: fixed check for 'neutral' culture and removed warning.
9672         * reflection.c: fix bug when parsing a full type name and Version is not
9673         the last thing in the string.
9674
9675 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
9676
9677         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9678         crashes when it is freed.
9679
9680 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9681
9682         * assembly.c: print the compat warning to stderr.
9683
9684 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
9685
9686         * assembly.c (mono_assembly_load_references): Add a compatibility
9687         hack to run old applications that might be still referencing the
9688         3300-based assemblies, only do this for System.xxx.
9689
9690 2004-05-01  Jackson Harper  <jackson@ximian.com>
9691
9692         * appdomain.c: If the culture is neutral we set it to "".
9693         
9694 2004-04-29  Jackson Harper  <jackson@ximian.com>
9695
9696         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9697
9698 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9699  
9700         * string-icalls.c: added low overhead function for copying chars
9701         * icall.c: added needed icall for the above function
9702  
9703 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9704
9705         * icall.c: fix return value of get_global_assembly_cache.  Implemented
9706         Environment.GetLogicalDrives.
9707
9708 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
9709
9710         * rand.c: try and talk to egd or prngd
9711         for random bytes if opening devices fail.
9712
9713 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
9714
9715         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9716         alignment for the type using the native alignment of its members 
9717         instead of using klass->min_align.
9718
9719         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9720
9721 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9722
9723         * file-io.c:
9724         * socket-io.c: added check for sys/aio.h.
9725
9726 2004-04-28  Dick Porter  <dick@ximian.com>
9727
9728         * threads.c: Don't abort a thread thats already aborting, when
9729         terminating everything.
9730
9731 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9732
9733         * icall.c: added 2 new async calls for Socket.
9734
9735         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9736         IO on *nix systems.
9737
9738         * threadpool.c: removed unused variable.
9739
9740 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
9741
9742         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9743
9744 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9745
9746         * locales.c: put back string_invariant_tolower () and
9747         string_invariant_toupper ().
9748
9749 2004-04-26 David Waite <mass@akuma.org>
9750
9751         * file-io.h:
9752         * socket-io.h:
9753         * threads.h:
9754         * unicode.h: remove comma from end of enumeration declarations
9755
9756 2004-04-26 David Waite <mass@akuma.org>
9757
9758         * debug-mono-symfile.h:
9759         * decimal.c:
9760         * mono_debug.h:
9761         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9762
9763
9764 2004-04-26  Jackson Harper  <jackson@ximian.com>
9765
9766         * appdomain.c: Increment version number.
9767         
9768 2004-04-26  Jackson Harper  <jackson@ximian.com>
9769
9770         * appdomain.c: Set assembly references public token value when
9771         PublicKeyToken is specified, not the hash_value. Free public token
9772         values when free assembly name data. Previously the public key
9773         token was hex decoded, however we are using hex encoded public key
9774         tokens, so this is not neccasary.
9775         * assembly.c: Lookup assemblies in the gac if their public token
9776         value is set. Add function to allow enabling user gac
9777         lookups. Specify whether or not the assembly was loaded from the
9778         GAC. Compare full assembly names when checking the cache for
9779         assemblies (Temporarily disabled see comment in code). Remove
9780         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9781         specifies trace-loader they get extra info to stdout on the
9782         loading of assemblies.
9783         * image.h: Add a field for an assembly references public token
9784         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9785         whether an assembly has been loaded from the GAC.
9786         * image.c: Remove a corlib -> mscorlib name mapping.
9787         * loader.h: Add function to enable/disable the user gac.
9788         * mono-config.c: Check if the usergac is enabled in the config
9789         file.
9790         * icall.c: New icall to determine whether or not an assembly has
9791         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9792         * tabldefs.h: Add constant for assemblyref flag that specifies a
9793         full public key is used instead of a public token.
9794         * reflection.c: Remove mscorlib -> corlib mappings. Set
9795         PublicTokenValue instead of hash value. This value is a hex
9796         string so it does not need to be expanded.
9797
9798 2004-04-26  Martin Baulig  <martin@ximian.com>
9799
9800         * mono-debug-debugger.c (mono_debugger_initialize): Set
9801         `mono_debugger_initialized' before calling mono_debug_lock().
9802
9803 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
9804
9805         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9806           InternalToUpper/InternalToLower.
9807         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9808           removed invariant culture shortcut.  This is now done in managed code.
9809         * locales.c: (string_invariant_toupper/tolower) removed.
9810
9811 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9812
9813         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9814         Added Poll internal call.
9815
9816         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9817         call for Poll. Select was too heavy for polling a single socket.
9818
9819         * threadpool.[ch]: added mono_threadpool_cleanup.
9820         * threads.c: use it. Don't use Thread_Abort on windows.
9821
9822 2004-04-23  Martin Baulig  <martin@ximian.com>
9823
9824         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9825
9826 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
9827
9828         * icall.c: Registred new icalls for key pair protection and added an
9829         icall for Environment.GetFolderPath on Windows.
9830         * security.c|h: Added new icalls for key pair protection.
9831
9832 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9833
9834         * socket-io.c: don't display the non-supported family warning for known
9835         families. Now this is not displayed on windows when checking support
9836         for IPv4/IPv6.
9837
9838 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9839
9840         * class.c: don't display the layout warning for static fields.
9841
9842 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
9843
9844         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9845         * locales.c, locales.h: Added new icalls for culture-specific
9846         Char.ToLower and Char.ToUpper.
9847
9848 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9849
9850         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9851         by David Waite.
9852
9853 2004-04-20  Martin Baulig  <martin@ximian.com>
9854
9855         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9856         of the type name before passing it to mono_reflection_type_from_name().
9857
9858 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9859
9860         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9861         encodings here. Fixes #56965.
9862
9863 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
9864
9865         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9866         fix test on strstr result not that I can see anything that
9867         relies on the result.
9868
9869 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
9870
9871         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9872         Fixes #57081.
9873
9874         * marshal.c (mono_marshal_get_string_encoding): New helper function.
9875
9876         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9877         function to determine which marshalling to use for strings. Fixes
9878         #56965.
9879
9880         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9881
9882         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9883
9884 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
9885
9886         * icall.c: #include mono-config.h
9887
9888 2004-04-15  Jackson Harper  <jackson@ximian.com>
9889
9890         * culture-info-tables.h: Fix date formats for en-US culture.
9891         
9892 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
9893
9894         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
9895         ThreadPool.SetMinThreads.
9896         * threadpool.c: Implemented ThreadPool.GetMinThreads and
9897         ThreadPool.SetMinThreads.
9898
9899 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9900
9901         * mono-config.c: also load the .config file in the directory
9902         where the assembly was found.
9903
9904 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9905
9906         * assembly.c: load per-assembly config files.
9907         * icall.c: decrapified code to get the config dir and moved to
9908         mono-config.c.
9909         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9910         per-assembly config files. When doing a dll map lookup give precedence
9911         to the per-assembly data.
9912
9913 2004-04-14  Martin Baulig  <martin@ximian.com>
9914
9915         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9916         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9917         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9918
9919         * mono-debugger-debugger.c: While the debugger is locked, remember
9920         whether the symbol tables have changes and send one single
9921         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9922
9923 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
9924
9925         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9926
9927         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
9928         function.
9929
9930         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9931         account when marshalling string arrays. Fixes #56965.
9932
9933 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
9934
9935         * icall.c: Add new icalls mapping for security.
9936         * security.c|h: Add internal calls for WindowsIdentity,
9937         WindowsImpersonationContext and WindowsPrincipal.
9938
9939 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
9940
9941         * class.c: Added comment to ensure the System.MonoDummy class
9942         is removed when no longer necessary
9943
9944 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
9945
9946         * appdomain.c: Pass arguments to the bootstraping exceptions to
9947         minimize JITed methods at boot
9948
9949         * metadata.c (mono_exception_from_name_two_strings): Allow for the
9950         second string to be null.
9951
9952         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9953         Change the protocol to minimize the JIT methods at startup.  Now
9954         it Returns the internal codepage, if the value of "int_code_page"
9955         is 1 at entry, and we can not compute a suitable code page
9956         number, returns the code page as a string.
9957
9958 2004-04-13  Jackson Harper  <jackson@ximian.com>
9959
9960         * culture-info-tables.h: Fix number of decimal digits for all
9961         english locales.
9962
9963 2004-04-13  Jackson Harper  <jackson@ximian.com>
9964
9965         * icall.c: Clairfy out of sync error message. It is not always
9966         your corlib that is out of sync.
9967
9968 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
9969
9970         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9971         properties when only the set accessor is overriden. Fixes #55874.
9972
9973 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
9974
9975         * assembly.c (mono_assembly_load_references): Make this thread safe.
9976         Fixes #56327.
9977
9978 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
9979
9980         * monosn.c: Add missing initialization calls.
9981
9982 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
9983
9984         * locales.c:
9985         ves_icall_System_Globalization_CultureInfo_construct_number_format
9986         Fix g_assert so it compiles on fussier compilers re int/ptr
9987         mismatch
9988
9989 2004-04-08  Dick Porter  <dick@ximian.com>
9990
9991         * socket-io.h:
9992         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
9993         53992.  Also rearrange the code so that the internal calls return
9994         an error value and exceptions are thrown from managed code.
9995
9996         * icall.c: Add type info to the socket icalls.
9997
9998 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9999
10000         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
10001         owes me a beer.
10002
10003 2004-04-07  Martin Baulig  <martin@ximian.com>
10004
10005         * class.c (mono_class_from_generic_parameter): Don't default
10006         `klass->parent' to `mono_defaults.object_type'.
10007
10008 2004-04-07  Martin Baulig  <martin@ximian.com>
10009
10010         * reflection.c (mono_reflection_initialize_generic_parameter): Set
10011         `param->pklass->reflection_info'.       
10012
10013 2004-04-07  Jackson Harper  <jackson@ximian.com>
10014
10015         * culture-info-tables.h: Fix date separator symbol.
10016         
10017 2004-04-07  Martin Baulig  <martin@ximian.com>
10018
10019         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
10020         from System.Type to System.MonoType.
10021
10022 2004-04-07  Martin Baulig  <martin@ximian.com>
10023
10024         * reflection.h
10025         (MonoReflectionGenericParam): Added `has_reference_type' and
10026         `has_value_type' fields.
10027
10028         * reflection.c (mono_image_get_generic_param_info): Encode the
10029         correct flags if we have the `class' or `struct' constraint.
10030
10031 2004-04-07  Martin Baulig  <martin@ximian.com>
10032
10033         * reflection.h
10034         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
10035
10036 2004-04-07  Jackson Harper  <jackson@ximian.com>
10037
10038         * appdomain.c: Revert extra patches, just wanted to bump the
10039         version number.
10040         
10041 2004-04-07  Jackson Harper  <jackson@ximian.com>
10042
10043         * Makefile.am: Add culture-info private headers.
10044         * icall.c: Add new icalls for contructing locales.
10045         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10046         * locales.h: Declare new culture info construction methods.
10047         * object.h: Add new fields used to avoid the CultureMap to
10048         MonoCultureInfo.
10049         * culture-info.h: Definition of structs used in the culture info
10050         tables.
10051         * culture-info-tables.h: Autogenerated tables that contain culture
10052         info data. This file was generated with the locale-builder tool.
10053         * appdomain.c: Incement corlib version number.
10054         
10055 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
10056
10057         * appdomain.c: (mono_runtime_init) move mono_thread_init
10058         to before mono_object_new calls so critical sections
10059         are initialized before use.
10060
10061 2004-04-07  Martin Baulig  <martin@ximian.com>
10062
10063         * icall.c
10064         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10065         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10066         (ves_icall_MonoGenericParam_initialize): Removed.
10067         (monogenericparam_icalls): Removed.
10068         (generictypeparambuilder_icalls): Added new table for
10069         System.Reflection.Emit.GenericTypeParameterBuilder.
10070
10071         * reflection.c
10072         (mono_reflection_define_generic_parameter): Removed.
10073         (mono_reflection_initialize_generic_parameter): This is now called
10074         from GenericTypeParameterBuilder's .ctor.
10075
10076 2004-04-06  Martin Baulig  <martin@ximian.com>
10077
10078         * class.c (mono_class_init): Don't inflate nested classes in a
10079         generic instance.
10080         (mono_type_get_name_recurse): Include the generic arguments for
10081         generic instances and generic type declarations.
10082         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10083         (_mono_class_get_instantiation_name): Removed.
10084         (mono_class_create_generic): Always use `gklass->name' as our name.
10085
10086         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10087
10088         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10089         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10090         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10091         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10092         closed generic methods here.
10093
10094         * reflection.c
10095         (mono_reflection_generic_inst_get_nested_types): Removed.
10096         (inflate_mono_method): Copy the generic parameters from the
10097         MonoMethodHeader into out MonoGenericMethod.
10098
10099 2004-04-06  Martin Baulig  <martin@ximian.com>
10100
10101         * row-indexes.h
10102         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10103
10104         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10105
10106         * reflection.c (build_compressed_metadata): If we have any entries
10107         in the GenericParam, MethodSpec or GenericParamConstraint tables,
10108         set the header version to 1.1.
10109
10110 2004-04-06  Martin Baulig  <martin@ximian.com>
10111
10112         * class.c (mono_class_init): If we're a generic instance,
10113         initialize our nested classes, too.
10114         (_mono_class_get_instantiation_name): Deal with the new `!%d'
10115         suffix. 
10116
10117 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10118
10119         * process.c: quote the argument passed to the shell on windows.
10120
10121 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10122
10123         * threads.c (mono_alloc_special_static_data): Allow this to be
10124         called during startup.
10125
10126 2004-04-02  Martin Baulig  <martin@ximian.com>
10127
10128         * icall.c
10129         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10130
10131 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
10132
10133         * icall.c: Fix build.
10134
10135 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
10136
10137         * Makefile.am: Added security.c|h.
10138         * icall.c: Added icall for get_UserName;
10139         * security.c: New file for security related icalls. Added function
10140         get_UserName for System.Environment (fix #56144).
10141         * security.h: New. Header file for security.c
10142
10143 2004-04-02  Dick Porter  <dick@ximian.com>
10144
10145         * icall.c: Deleted the icalls that were obsoleted some time ago
10146         by the ICU string code, and which were mixed into the icall
10147         rearranging.  Fixes bug 55969.
10148
10149         * string-icalls.h: 
10150         * string-icalls.c: Deleted the code that those icalls reference.
10151
10152 2004-04-01  Martin Baulig  <martin@ximian.com>
10153
10154         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10155
10156         * class.c (mono_class_from_generic_parameter): Don't set 
10157         TYPE_ATTRIBUTE_INTERFACE.
10158         (my_mono_class_from_generic_parameter): Likewise.
10159
10160 2004-04-01  Martin Baulig  <martin@ximian.com>
10161
10162         * loader.c (find_method): Added an optional `MonoClass *ic'
10163         argument to search in a specific interface.
10164         (mono_get_method_constrained): New public function.
10165
10166 2004-04-01  Martin Baulig  <martin@ximian.com>
10167
10168         * reflection.c (mono_image_get_generic_field_token): Use the
10169         `handleref' cache here.
10170
10171 2004-04-01  Martin Baulig  <martin@ximian.com>
10172
10173         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10174
10175         * reflection.c (create_generic_typespec): Use the `typespec' hash
10176         here, not the `typeref' one.    
10177
10178 2004-04-01  Martin Baulig  <martin@ximian.com>
10179
10180         * class.c (mono_class_inflate_generic_type): Moved the
10181         functionality into a new static inflate_generic_type() which
10182         returns NULL if it didn't do anything.  Only increment the
10183         `mono_stats.inflated_type_count' if we actually inflated
10184         something.
10185         (mono_class_get_full): Check the classes type to see whether we
10186         need to inflate it; also inflate MONO_TYPE_(M)VAR.
10187
10188 2004-04-01  Jackson Harper  <jackson@ximian.com>
10189
10190         * reflection.c: Set culture for assembly references.
10191         
10192 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
10193
10194         * reflection.[ch], icall.[ch], Fix support for pinning variables.
10195
10196 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10197
10198         * assembly.c:
10199         (do_mono_assembly_open): the critical section also covers
10200         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10201
10202 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10203
10204         * threads.c:
10205         (mono_manage_threads): abort the background threads when finishing.
10206         Fixes bug #47232.
10207
10208 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10209
10210         * gc.c: only close the done_event handle if there was no timeout.
10211         C-ified comments.
10212
10213 2004-03-30  Martin Baulig  <martin@ximian.com>
10214
10215         * icall.c (icall_entries): It's called "System.Activator", not
10216         "System.Activation".    
10217
10218 2004-03-30  Martin Baulig  <martin@ximian.com>
10219
10220         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10221         (mono_class_create_from_typespec): Likewise.
10222
10223 2004-03-30  Martin Baulig  <martin@ximian.com>
10224
10225         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10226         `has_ctor_constraint' and `initialized'.
10227
10228 2004-03-30  Martin Baulig  <martin@ximian.com>
10229
10230         * reflection.c (encode_new_constraint): New static function to add
10231         the constructor constraint attribute to a type parameter.
10232         (encode_constraints): Call encode_new_constraint() if necessary.
10233
10234         * reflection.h
10235         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10236
10237         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10238         
10239 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
10240
10241         * reflection.c, icall.c: add support for pinning variables. 
10242
10243 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
10244
10245         * marshal.c (mono_marshal_get_managed_wrapper):
10246         init bool local with zero rather than null.
10247
10248 2004-03-29  Martin Baulig  <martin@ximian.com>
10249
10250         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10251         the "official" behavior here.
10252         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10253
10254 2004-03-29  Martin Baulig  <martin@ximian.com>
10255
10256         * icall.c: Reflect latest API changes.
10257
10258 2004-03-29  Martin Baulig  <martin@ximian.com>
10259
10260         * loader.c (mono_get_method_from_token): Also call
10261         mono_metadata_load_generic_params () for abstract and interface
10262         methods; replace the type arguments in the method signature with
10263         the ones which are loaded from the metadata.
10264
10265 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
10266
10267         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10268         of the lock is not the current thread. MS.NET don't do it, in spite of
10269         what the documentation says. See bug #56157.
10270
10271 2004-03-28  Martin Baulig  <martin@ximian.com>
10272
10273         * class.c (mono_class_init): Don't call init_properties() and
10274         init_events() for generic instances; set `prop->parent' when
10275         inflating properties.
10276
10277         * reflection.c (mono_generic_inst_get_object): Call
10278         `mono_class_init (ginst->klass)'.
10279         (mono_type_get_object): Only create a MonoGenericInst if your
10280         generic type is a TypeBuilder.
10281         (do_mono_reflection_bind_generic_parameters): Only set
10282         `ginst->is_dynamic' if our generic type is a TypeBuilder.
10283
10284 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
10285
10286         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10287         Fixes #56091.
10288
10289 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10290
10291         * icall.c: added Kill_internal icall.
10292         * process.[ch]: added Kill_internal icall.
10293
10294 2004-03-25  Martin Baulig  <martin@ximian.com>
10295
10296         * class.h (MonoStats): Added `generic_instance_count',
10297         `inflated_method_count', `inflated_type_count' and
10298         `generics_metadata_size'.       
10299
10300 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10301
10302         * reflection.c: no warnings now.
10303
10304 2004-03-25  Martin Baulig  <martin@ximian.com>
10305
10306         * class.c (mono_class_get_full): New public function; does a
10307         mono_class_get(), but also takes a `MonoGenericContext *'.
10308
10309         * loader.c (mono_field_from_memberref): Renamed to
10310         `field_from_memberref', made static and added `MonoGenericContext *'
10311         argument.
10312         (mono_field_from_token): Added `MonoGenericInst *' argument.
10313         (method_from_memberef): Likewise.
10314         (mono_get_method_from_token): Likewise.
10315         (mono_get_method_full): New public function; does a
10316         mono_get_method(), but also takes a `MonoGenericContext *'.
10317
10318         * verify.c (mono_method_verify): Get the method's generic context
10319         and pass it to mono_field_from_token(), mono_get_method_full() and
10320         mono_class_get_full().
10321
10322 2004-03-25  Martin Baulig  <martin@ximian.com>
10323
10324         * class.c (mono_class_inflate_generic_type): Take a
10325         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10326         `MonoGenericMethod *'.
10327
10328 2004-03-25  Martin Baulig  <martin@ximian.com>
10329
10330         * loader.h (MonoMethodInflated): Store the MonoGenericContext
10331         instead of the MonoGenericMethod here.
10332
10333 2004-03-25  Martin Baulig  <martin@ximian.com>
10334
10335         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10336         each time we create a new MonoGenericInst, we also create a new
10337         context which points back to us.
10338
10339         * class.c (inflate_method): Use `ginst->context' instead of
10340         creating a new context.
10341
10342         * loader.c (method_from_memberref): Use
10343         `klass->generic_inst->context' instead of creating a new context.
10344
10345 2004-03-25  Martin Baulig  <martin@ximian.com>
10346
10347         * class.h (MonoGenericContext): New struct.
10348         (MonoGenericMethod): Removed `generic_inst'.
10349
10350         * class.c (mono_class_inflate_generic_method): Take a
10351         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10352
10353 2004-03-25  Martin Baulig  <martin@ximian.com>
10354
10355         * loader.h (MonoMethodInflated): New typedef.
10356
10357         * metadata.h (MonoMethodSignature): Removed `gen_method', make
10358         `generic_param_count' consume just 30 bits, added `is_inflated'
10359         and `has_type_parameters' flags (one bit each).
10360
10361         * class.c (mono_class_inflate_generic_method): Create a
10362         MonoMethodInflated instead of a MonoMethodNormal and set
10363         `is_inflated' in the method signature.
10364
10365         * class.h (MonoGenericMethod): Removed `generic_method'.
10366
10367 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
10368
10369         * image.c: Make sure the name of a MonoImage is always an absolute path.
10370           This fixes bug #54415.
10371
10372 2004-03-24  Martin Baulig  <martin@ximian.com>
10373
10374         * class.c (mono_class_setup_vtable): If we're a generic instance,
10375         use our generic type's vtable size.
10376
10377 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
10378
10379         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10380         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
10381         problems.
10382
10383 2004-03-23  Martin Baulig  <martin@ximian.com>
10384
10385         * class.h (MonoDynamicGenericInst): Added `int count_events' and
10386         `MonoEvent *events'.
10387
10388         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10389         (typebuilder_icalls): Added "get_event_info"; calls
10390         mono_reflection_event_builder_get_event_info(). 
10391
10392         * reflection.c (mono_reflection_generic_inst_initialize): Added
10393         `MonoArray *events'.
10394         (mono_reflection_event_builder_get_event_info): New function.
10395
10396 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
10397
10398         * object.h: add mono_type_initialization_init
10399
10400         * object.c (mono_runtime_class_init): 
10401         implement class constructor synchronization rules
10402         to cope with threading issues.  
10403         add mono_type_initialization_init
10404
10405         * appdomain.c (mono_runtime_init): call 
10406         mono_type_initialization_init
10407
10408         * class.h: removing initializing field from MonoVTable
10409
10410 2004-03-23  Martin Baulig  <martin@ximian.com>
10411
10412         * class.c (my_mono_class_from_generic_parameter): Use
10413         `param->name' if it's not NULL. 
10414
10415 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
10416
10417         * class.c: do not insert non-virtual methods in the vtable.
10418         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10419         that means the method is non-virtual. This never would have
10420         happened before.
10421
10422 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
10423
10424         * profiler.c: Added lock for accessing coverage_hash.
10425
10426 2004-03-22  Martin Baulig  <martin@ximian.com>
10427
10428         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10429         `method->method->signature->generic_param_count != 0' to make it
10430         work for interface methods.
10431
10432 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10433
10434         * process.c: quote the string passed to the shell using g_shell_quote.
10435
10436 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10437
10438         * threads.c:
10439         (mono_threads_manage): don't remove the finalizer thread and self
10440         from the threads hash table so that mono_thread_manage can be called
10441         more than once.
10442
10443 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10444
10445         * process.c: quote the arguments when UseShellExecute is true. Fixes
10446         bug #55790.
10447
10448 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10449
10450         * threads.c: set mono_thread_detach as a cleanup routine for every
10451         thread. This way it's always executed upon thread termination, either
10452         aborted or finished normally. No more xsp hangs!
10453
10454 2004-03-17  Martin Baulig  <martin@ximian.com>
10455
10456         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10457         `int count_nested' and a `MonoType **nested'.
10458
10459         * reflection.c (mono_reflection_bind_generic_parameters): Moved
10460         most of the functionality into a new static
10461         do_mono_reflection_bind_generic_parameters() and don't take a
10462         `MonoType *nested_in' argument any more.  Don't compute nested
10463         types here.
10464         (mono_reflection_generic_inst_get_nested_types): New public method
10465         to get nested types.
10466
10467         * class.c (mono_class_create_generic): Set `klass->nested_in' if
10468         we're a nested class.
10469
10470         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10471         mono_reflection_generic_inst_get_nested_types() to compute the
10472         nested types.
10473
10474 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10475
10476         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10477         descriptive error message under windows.
10478         
10479 2004-03-17  Martin Baulig  <martin@ximian.com>
10480
10481         * class.c (dup_type): Added `const MonoType *original' argument;
10482         copy the attrs from the original type.
10483
10484 2004-03-17  Martin Baulig  <martin@ximian.com>
10485
10486         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10487         `m->generic_inst_cache' here.
10488
10489 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10490
10491         * exception.h exception.c: Add stack_overflow_exception.
10492
10493 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10494
10495         * threadpool.c:
10496         (overlapped_callback): call SetEvent *after* invoking the callback.
10497         No need to call CloseHandle.
10498
10499 2004-03-16  Martin Baulig  <martin@ximian.com>
10500
10501         * reflection.c (mono_image_get_fieldref_token): Take a
10502         `MonoReflectionField *' instead of a `MonoClassField *' and a
10503         `MonoClass *'; store the `MonoReflectionField *' in the hash.
10504
10505 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10506
10507         * appdomain.c: don't add the culture to the filename we're looking for
10508         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10509
10510 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10511
10512         * locales.c: don't ignore symbols when doing case insensitive compares.
10513         Thanks Dick! Fixes bug #54046.
10514
10515         * threads.c: surround 'threads' usage with enter/leave in
10516         mono_thread_manage.
10517
10518 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
10519
10520         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
10521         implicitly marshalled as [Out]. Fixes #55450.
10522
10523         (mono_marshal_get_runtime_invoke): Zero out the result if there is
10524         an exception.
10525
10526 2004-03-16  Martin Baulig  <martin@ximian.com>
10527
10528         * class.c (mono_class_from_generic_parameter): Use the actual
10529         parameter name. 
10530
10531 2004-03-16  Martin Baulig  <martin@ximian.com>
10532
10533         * reflection.c (type_get_signature_size): New static function.
10534         Compues the size of the type in a method signature.
10535         (method_get_signature_size): New static function; calls
10536         type_get_signature_size() to compute the actual size of the
10537         method's signature.
10538         (method_encode_signature): Use method_get_signature_size() to get
10539         the signature's size rather than using `nparams * 10'.
10540
10541 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10542
10543         * file-io.h: define here WapiOverlapped on windows. I don't want the
10544         regular OVERLAPPED one.
10545
10546         * file-io.c:
10547         * threadpool.c: somehow, BindIoCompletionCallback is not found.
10548         Disabling AIO on windows.
10549
10550 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10551
10552         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10553         bug #55385.
10554
10555 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10556
10557         * appdomain.c: upgraded corlib version.
10558
10559         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10560         and BeginWrite. Allow opening files for asynchrnous operations.
10561
10562         * file-io.h: new struct that maps FileStreamAsyncResult.
10563         * icall.c: added new icalls.
10564         * process.[ch]: support setting child process environment variables
10565         and use the SHELL or COMSPEC when UseShellExecute is true.
10566
10567         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10568         callback for async. IO is here and also BindHandle.
10569
10570         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10571         from here.
10572
10573 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
10574
10575         * reflection.c (create_custom_attr): Allow len == 0.
10576
10577         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10578         computation on big-endian machines.
10579
10580 2004-03-13  Martin Baulig  <martin@ximian.com>
10581
10582         * class.h (MonoGenericInst): Added `int count_ifaces'.
10583
10584         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10585         `ginst->count_ifaces' instead `klass->interface_count' since we
10586         may get called before the vtable is created.
10587
10588         * loader.c (mono_method_get_param_names): If we're a generic
10589         instance, return and don't initialize the class.
10590
10591         * reflection.c (mono_reflection_setup_generic_class): Don't call
10592         ensure_runtime_vtable().
10593         (mono_reflection_bind_generic_parameters): Set
10594         `ginst->count_ifaces'.
10595
10596 2004-03-11  Jackson Harper <jackson@ximian.com>
10597
10598         * icall.c:
10599         * unicode.c:
10600         * unicode.h: Remove unused System.Char icalls.
10601         
10602 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
10603
10604         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10605         code when we P/Invoke the first library in Windows.Forms, instead
10606         of when we first open the assembly.
10607
10608         * assembly.c: Drop the lookup from here.
10609
10610 2004-03-10  Martin Baulig  <martin@ximian.com>
10611
10612         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10613         class for properties, fields and events.  Finally fixes #54945.
10614
10615 2004-03-10  Martin Baulig  <martin@ximian.com>
10616
10617         * metadata.c (mono_metadata_class_equal): New static function;
10618         checks whether two generic instances or two generic parameters are
10619         equal.
10620         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10621         compare classes.        
10622
10623 2004-03-10  Martin Baulig  <martin@ximian.com>
10624
10625         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10626
10627         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10628         argument and write it into the `reflection_info' field.
10629
10630         * icall.c
10631         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10632         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10633
10634 2004-03-09  Jackson Harper  <jackson@ximian.com>
10635
10636         * char-conversions.h: use 8 bits for numeric data its all we need
10637         * icall.c: numeric data is only 8 bits now.
10638
10639 2004-03-09  Martin Baulig  <martin@ximian.com>
10640
10641         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10642
10643         * class.c (init_properties, init_events): Initialize the new
10644         `parent' field.
10645
10646         * reflection.c (typebuilder_setup_properties): Likewise.
10647         (typebuilder_setup_events): Likewise.
10648
10649         * reflection.h (MonoEventInfo): Replaced `parent with
10650         `declaring_type' and `reflected_type'.
10651
10652         * icall.c (ves_icall_get_property_info): Distinguish between
10653         declaring and reflected type.
10654         (ves_icall_get_event_info): Likewise.
10655
10656 2004-03-09  Martin Baulig  <martin@ximian.com>
10657
10658         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10659         (ves_icall_Type_GetField): Correctly set field->klass.
10660
10661 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10662
10663         * loader.h: Fix warning.
10664
10665 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
10666
10667         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10668         library routine if present.  Notice that it will still continue
10669         executing even if its missing, for those working on the Gtk#
10670         edition of Windows.Forms.
10671
10672         * assembly.c (do_mono_assembly_open): If loading the
10673         System.Windows.Forms call mono_loader_wini_init.
10674
10675 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10676
10677         * class.h: Added MonoRemoteClass struct.
10678         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10679         function for MonoStrings.
10680         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10681         Added internal call for getting the proxy type.
10682         * marshal.c: Get the type of transparent proxies from its remote_class.
10683         Added methods that generate the IL for type checks and casts:
10684         mono_marshal_get_isinst, mono_marshal_get_castclass, 
10685         mono_marshal_get_proxy_cancast.
10686         * marshal.h: Declaration of the previous new methods.
10687         * object.c: Added new moethods for creating and updating MonoRemoteClass
10688         instances: mono_remote_class, mono_upgrade_remote_class, 
10689         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10690         * verify.c: FIx transparent_proxy_fields layout.
10691         * appdomain.c: Bump corlib version.
10692
10693 2004-03-04  Jackson Harper  <jackson@ximian.com>
10694
10695         * icall.c: Add icall to access char conversion tables.
10696         * char-conversions.h: Character conversion tables.
10697         * Makefile.am: Add char-conversions.h private header file.
10698         
10699 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
10700
10701         * appdomain.c (unload_thread_main): Increase unloading timeout to
10702         10 sec as a temporary workaround for Nant problems.
10703
10704 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
10705
10706         * gc.c: Add checks for GC_enable and GC_disable.
10707
10708         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10709         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
10710         (bug #54988).
10711         
10712 2004-02-27  Martin Baulig  <martin@ximian.com>
10713
10714         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10715         `MonoReflectionType *' instead of a `MonoType *'.
10716
10717 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10718
10719         * gc.c (run_finalize): Avoid finalizing the object representing the
10720         finalizer thread.
10721         (finalizer_thread): Fix warning.
10722
10723 2004-02-25  Martin Baulig  <martin@ximian.com>
10724
10725         * class.c (_mono_class_get_instantiation_name): Added `int offset'
10726         argument for nested types.
10727         (mono_class_create_generic): Added support for nested generictypes.
10728
10729         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10730         `GList *nested'.
10731
10732         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10733
10734         * reflection.c (method_encode_signature): Increase the minimum
10735         value of `size' from 10 to 11.
10736         (mono_reflection_bind_generic_parameters): Take `int type_argc'
10737         and `MonoType **types' arguments instead of the `MonoArray
10738         *types'; added `MonoType *nested_in'.  Recursively instantiate
10739         nested classes. 
10740
10741 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10742
10743         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
10744         stack_overflow_ex members which are used by exception handling.
10745
10746         * appdomain.c (mono_runtime_init): Initialize the new members.
10747
10748         * gc.c (mono_gc_enable): New helper function.
10749         * gc.c (mono_gc_disable): New helper function.
10750
10751 2004-02-23  Martin Baulig  <martin@ximian.com>
10752
10753         * icall.c: I must have been really stupid - make it actually work
10754         this time ;-)
10755
10756 2004-02-23  Martin Baulig  <martin@ximian.com>
10757
10758         * loader.c (method_from_memberref): Only inflate the method if
10759         it's in another klass.
10760
10761 2004-02-23  Martin Baulig  <martin@ximian.com>
10762
10763         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10764         (mono_class_init): If we're a generic instance and an interface,
10765         compute `class->interface_id'; also create `class->interfaces'
10766         here and inflate them.
10767
10768         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10769         `ginst->is_open'.
10770         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10771
10772         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10773
10774 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
10775
10776         * reflection.c (method_encode_code): Improved the error message
10777         generated by the exception.
10778
10779 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10780
10781         * icall.c: Martin did not do what he said in the ChangeLog for
10782         2004-02-18, but put back the changes for properties and events.
10783         Commenting those changes out again and adding comment to bug #54518.
10784         
10785         * process.c: removed warning.
10786
10787 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
10788
10789         * marshal.c (emit_struct_conv): Print an error message instead of
10790         asserting when a type does not have the StructLayout attribute.
10791
10792 2004-02-20  Martin Baulig  <martin@ximian.com>
10793
10794         * reflection.c (mono_type_get_object): Also use the cache for
10795         generic instances.
10796         (mono_reflection_bind_generic_parameters): Always compute
10797         `ginst->ifaces'.        
10798
10799 2004-02-20  Martin Baulig  <martin@ximian.com>
10800
10801         * class.h (MonoGenericMethod): Removed `klass'.
10802
10803         * class.c (mono_class_inflate_generic_method): Added `MonoClass
10804         *klass' argument.
10805
10806 2004-02-20  Martin Baulig  <martin@ximian.com>
10807
10808         * reflection.c (method_encode_methodspec): Actually use the
10809         uninflated signature for the memberref.
10810
10811 2004-02-20  Martin Baulig  <martin@ximian.com>
10812
10813         * class.h (MonoGenericMethod): Removed `declaring'.
10814
10815         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10816         is NULL, compute it here.
10817
10818 2004-02-20  Martin Baulig  <martin@ximian.com>
10819
10820         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10821
10822         * metadata.c (mono_metadata_generic_inst_hash): New method.
10823         (mono_metadata_generic_inst_equal): New method.
10824
10825         * reflection.c (mono_reflection_bind_generic_parameters): Use the
10826         `klass->image->generic_inst_cache' cache to avoid creating
10827         duplicate MonoGenericInst's.
10828
10829         * class.c (mono_class_inflate_generic_type): Use the cache.
10830
10831 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10832
10833         * object.c: fixed gc descriptor calculation for embedded valuetypes.
10834
10835 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10836
10837         * icall.c: added Socket.WSAIoctl icall.
10838
10839         * socket-io.[ch]: implemented
10840         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10841
10842 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
10843
10844         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10845
10846 2004-02-18  Urs C Muff  <umuff@quark.com>
10847
10848         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10849         this work on PPC and other big-endian architectures.
10850
10851         * debug-mono-symfile.h: Prepended the names of all the `guint32'
10852         fields with an underscore to make sure they're only accessed by
10853         the read32() macro.
10854
10855 2004-02-18  Martin Baulig  <martin@ximian.com>
10856
10857         * icall.c: Put the klass->refclass changes back for methods and
10858         fields, but not for properties and events.  We're currently not
10859         distinguishing between DeclaringType and ReflectedType for
10860         properties and events, that's what caused the regressions.
10861
10862 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10863
10864         * object.c:
10865         (mono_async_result_new): the handle can be NULL.
10866
10867         * threadpool.c: Use an event instead of a semaphore, don't initialize
10868         it until needed. This saves quite a few semaphores from being created
10869         when using the threadpool.
10870
10871 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
10872
10873         * object.c (mono_string_is_interned_lookup): Fix interning of long
10874         strings. Fixes #54473.
10875
10876         * domain.c (ldstr_equal): Optimize if the two strings are equal.
10877
10878         * icall.c: Revert the klass->refclass changes since they introduce
10879         regressions (bug #54518).
10880
10881 2004-02-18  Martin Baulig  <martin@ximian.com>
10882
10883         * class.c (mono_class_init): If we're a generic instance and don't
10884         come from a TypeBuilder, inflate our members here.
10885         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10886         (mono_class_create_generic): New public method.
10887         (mono_class_initialize_generic): Removed.
10888         (get_instantiation_name): Renamed to
10889         _mono_class_get_instantiation_name() and made it public.
10890
10891 2004-02-18  Martin Baulig  <martin@ximian.com>
10892
10893         * class.c (mono_class_inflate_generic_type): Clear the new
10894         instance's `nginst->klass' when inflating a generic instance.
10895         (mono_class_is_subclass_of): Added (basic) support for generic
10896         instances.
10897
10898 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10899
10900         * appdomain.h, domain.c: use a MonoCodeManager instead of a
10901         MonoMempool to hold compiled native code.
10902
10903 2004-02-17  Martin Baulig  <martin@ximian.com>
10904
10905         * class.h (MonoDynamicGenericInst): Added `count_properties' and
10906         `properties'.
10907
10908         * reflection.c (mono_reflection_generic_inst_initialize): Added
10909         `MonoArray *properties' argument.
10910
10911         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
10912
10913 2004-02-17  Martin Baulig  <martin@ximian.com>
10914
10915         * icall.c (ves_icall_Type_GetFields): Renamed to
10916         ves_icall_Type_GetFields_internal() and added a
10917         `MonoReflectionType *rtype' argument; pass it to
10918         mono_field_get_object() to set the field's "reflected" type.
10919         (ves_icall_Type_GetConstructors): Likewise.
10920         (ves_icall_Type_GetEvents): Likewise.
10921         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10922         argument; pass it to mono_method_get_object() to set the method's
10923         "reflected" type.       
10924
10925 2004-02-17  Martin Baulig  <martin@ximian.com>
10926
10927         * class.h (MonoDynamicGenericInst): New type.
10928         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10929
10930         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10931         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10932         (ves_icall_MonoGenericInst_GetFields): New interncall.
10933
10934         * class.c (mono_class_from_generic): Don't call
10935         mono_class_initialize_generic() if this is a dynamic instance;
10936         ie. it's being created from a TypeBuilder.
10937         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10938         `class->byval_arg.type'.
10939
10940         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10941         to `inflate_method' and made static.
10942         (mono_reflection_inflate_field): Removed.
10943         (mono_reflection_generic_inst_initialize): New public method.
10944
10945         * reflection.h (MonoReflectionGenericInst): Removed `methods',
10946         `ctors' and `fields'; added `initialized'.
10947
10948 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
10949
10950         * debug-helpers.c (mono_method_full_name): Fix output for empty
10951         namespaces.
10952
10953 2004-02-12  Martin Baulig  <martin@ximian.com>
10954
10955         * class.h (MonoClassField): Added `MonoType *generic_type'.
10956
10957         * reflection.c (mono_image_get_fieldref_token): Added support for
10958         instantiated generic types.
10959         (field_encode_inflated_field): Removed.
10960         (mono_image_get_inflated_field_token): Removed.
10961         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10962
10963         * reflection.h (MonoReflectionInflatedField): Removed.
10964
10965 2004-02-12  Martin Baulig  <martin@ximian.com>
10966
10967         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10968         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10969
10970         * reflection.c (mono_image_get_methodspec_token): Take a
10971         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10972         (mono_image_create_token): Check whether we have a
10973         `method->signature->gen_method' and call
10974         mono_image_get_methodspec_token() if appropriate.
10975         (inflated_method_get_object): Removed.
10976         (mono_reflection_bind_generic_method_parameters): Return a
10977         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10978         (mono_reflection_inflate_method_or_ctor): Likewise.
10979
10980         * reflection.h (MonoReflectionInflatedMethod): Removed.
10981
10982 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
10983
10984         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10985         for custom valuetype marshalling.
10986
10987         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10988
10989 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10990
10991         * icall.c: fixed WSAGetLastError_internal name.
10992
10993 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
10994
10995         * threads.c (mono_thread_attach): Allow this to be called multiple
10996         times for a thread.
10997         
10998         * threads.c (build_wait_tids): Do not wait for ourselves.
10999
11000         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
11001         appdomain list is empty.
11002
11003         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
11004         memory returned by mono_string_builder_to_utf16, since it points into
11005         managed memory. Thanks to Bernie Solomon for noticing this.
11006
11007         * icall.c: Add AppDomainSetup icalls.
11008
11009         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
11010
11011         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
11012         types.
11013
11014         * reflection.c (reflection_methodbuilder_to_mono_method): Save
11015         custom attributes to the method_aux struct. Also fix array indexes etc.
11016
11017         * loader.c (mono_method_get_param_names): Make dynamic case work again.
11018         
11019 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
11020
11021         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
11022         (both static and runtime) and reduce startup time.
11023
11024 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11025
11026         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
11027         AsAny marshalling conversion instead of crashing.
11028
11029         * marshal.c: Fix warnings.
11030
11031 2004-02-09  Martin Baulig  <martin@ximian.com>
11032
11033         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
11034
11035         * reflection.h (MonoReflectionInflatedMethod): Removed the
11036         `declaring' field, it's now in the unmanaged MonoGenericMethod.
11037
11038         * reflection.c (method_encode_methodspec): Removed the `method'
11039         argument; we get it from `gmethod->declaring'.
11040         (inflated_method_get_object): Removed the `declaring' argument.
11041
11042 2004-02-09  Martin Baulig  <martin@ximian.com>
11043
11044         * class.h (MonoGenericMethod): New type.
11045         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11046         `generic_method'.
11047
11048         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11049         a `MonoGenericMethod *gen_method' one.
11050
11051         * class.c (mono_class_inflate_generic_type): Take an additional
11052         `MonoGenericMethod * argument.  This is only non-NULL if we're
11053         inflating types for a generic method.   
11054         (mono_class_inflate_generic_signature): Renamed to
11055         inflate_generic_signature() and made static; take a
11056         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11057         (inflate_generic_header): Take a `MonoGenericMethod *' argument
11058         instead of a `MonoGenericInst *' one.
11059         (mono_class_inflate_generic_method): Likewise.
11060
11061         * reflection.c (encode_generic_method_sig): Take a
11062         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11063         (method_encode_methodspec): Likewise.
11064         (inflated_method_get_object): Likewise. 
11065
11066         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11067         field with a `MonoGenericMethod *gmethod' one.  
11068
11069 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
11070
11071         * class.h (mono_class_has_parent): add parens to expansion
11072         so you can ! this.
11073
11074 2004-02-08  Martin Baulig  <martin@ximian.com>
11075
11076         * image.h (MonoImage): Removed `generics_cache'.
11077
11078         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11079         instead of a `MonoType *' argument; removed the `inflate_methods'
11080         argument.  Don't inflate methods here.
11081
11082         * loader.c (find_method): If it's a generic instance, call
11083         mono_class_init() on the `sclass->generic_inst->generic_type'.
11084
11085         * metadata.c (mono_type_size): Make this work on uninitialized
11086         generic instances; call it on the `ginst->generic_type's class.
11087
11088         * reflection.c (mono_reflection_bind_generic_parameters): Call
11089         mono_class_from_generic() to create the `ginst->klass'.
11090
11091 2004-02-08  Martin Baulig  <martin@ximian.com>
11092
11093         * class.h (MonoClass): Changed type of `generic_inst' from
11094         `MonoType *' to `MonoGenericInst *'.
11095
11096 2004-02-08  Martin Baulig  <martin@ximian.com>
11097
11098         * icall.c (ves_icall_Type_BindGenericParameters): Just call
11099         mono_type_get_object(), this is now creating a `MonoGenericInst'
11100         for MONO_TYPE_GENERICINST.
11101         (ves_icall_MonoGenericInst_GetParentType): Likewise.
11102         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11103
11104         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11105         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11106         (inflated_method_get_object): Added `MonoClass *refclass' argument.
11107         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11108         and reflected type.
11109
11110         * reflection.h (MonoReflectionInflatedMethod): Removed
11111         `declaring_type' and `reflected_type'.
11112
11113 2004-02-08  Martin Baulig  <martin@ximian.com>
11114
11115         * class.h (MonoGenericInst): Added `MonoType *parent' and
11116         `MonoType **ifaces'.
11117
11118         * reflection.h (MonoReflectionGenericInst): Removed `klass',
11119         `parent' and `interfaces'.
11120
11121         * reflection.c (mono_reflection_bind_generic_parameters): Take a
11122         `MonoType *' argument and return a `MonoType *'.
11123
11124         * icall.c
11125         (ves_icall_MonoGenericInst_GetParentType): New interncall.
11126         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
11127
11128 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11129
11130         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11131         valuetype marshalling.
11132
11133 2004-02-06  Martin Baulig  <martin@ximian.com>
11134
11135         * class.c
11136         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11137         (my_mono_class_from_generic_parameter): Likewise.
11138
11139 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11140
11141         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11142         contents of the symbol files lazily.
11143
11144         * object.h (MonoThread): Add 'name' and 'name_len' fields.
11145
11146         * threads.h threads.c icall.c: New icalls for getting and setting the
11147         threads name.
11148
11149 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
11150
11151         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
11152         Raise an exception when the domain is not found.
11153
11154 2004-02-03  Martin Baulig  <martin@ximian.com>
11155
11156         * reflection.c (mono_image_get_methodspec_token): Use the
11157         uninflated signature; fixes gen-33.
11158
11159 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11160
11161         * gc.c threads.c: Make the finalizer thread a normal managed thread so
11162         the finalizer code can use thread functionality.
11163
11164         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
11165         the finalizer thread.
11166
11167         * threads.c: Make some functions more robust.
11168
11169         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11170
11171         * metadata.h: Add new marshalling conventions.
11172
11173         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11174         stringbuilder marshalling. Fixes #53700.
11175
11176         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11177
11178         * reflection.c (mono_image_get_type_info): Save declarative security
11179         info.
11180
11181         * reflection.c (mono_image_get_field_info): Handle uninitialized 
11182         unmanaged fields as well.
11183
11184         * appdomain.c: Bump corlib version.
11185
11186 2004-02-01  Martin Baulig  <martin@ximian.com>
11187
11188         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11189         method type arguments.  
11190
11191 2004-01-30  Duncan Mak  <duncan@ximian.com>
11192
11193         * marshal.h: Add prototype for
11194         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11195         and
11196         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11197         fix the build.
11198
11199 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
11200
11201         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11202         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11203
11204 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11205
11206         * marshal.c (mono_marshal_get_native_wrapper): Add support for
11207         custom marshalling of valuetypes.
11208
11209         * marshal.c: Fix some warnings.
11210
11211 2004-01-29  Martin Baulig  <martin@ximian.com>
11212
11213         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11214         for generic method parameters.
11215
11216         * reflection.c (method_encode_methodspec): Write the uninflated
11217         signature into the methodspec table.
11218         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11219         is always the uninflated method.
11220         (reflection_methodbuilder_to_mono_method): Copy the generic
11221         parameters from the MethodBuilder into `header->gen_params'.
11222
11223 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11224
11225         * class.c (mono_class_from_generic_parameter): Fix warning.
11226
11227 2004-01-27  Martin Baulig  <martin@ximian.com>
11228
11229         * class.c (mono_class_from_generic_parameter): Don't create
11230         `klass->methods' here.  
11231
11232 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
11233
11234         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11235         extension since it does not work with libraries named lib<FOO>.dll.so.
11236
11237 2004-01-25  Martin Baulig  <martin@ximian.com>
11238
11239         * class.c (mono_class_inflate_generic_type): Added support for
11240         MONO_TYPE_GENERICINST.
11241
11242         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11243         inflate methods on open constructed types.      
11244
11245 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11246
11247         * object.c: fire ProcessExit event in the root AppDomain after running
11248         Main. Fixes bug #53299.
11249
11250 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11251
11252         * socket-io.c: include the new socket-wrappers.h header.
11253         Use the wrappers instead of the unix socket functions to make the code
11254         more clear.
11255
11256 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11257
11258         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11259
11260         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11261         Fixes #22532.
11262
11263 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
11264
11265         * reflection.c (mono_image_create_pefile): Handle the case when the
11266         entry point is not a MethodBuilder.
11267
11268         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11269         field to ReflectionMethod since it is not allways a builder.
11270
11271         * reflection.c (type_get_fully_qualified_name): New helper function to
11272         return the fully qualified name of a type.
11273
11274         * reflection.c (encode_marshal_blob): Always emit the fully qualified
11275         type name for custom marshallers.
11276
11277         * reflection.c (mono_marshal_spec_from_builder): Ditto.
11278
11279         * class.c (mono_class_setup_vtable): If a parent class already 
11280         implements an interface, use the implementing methods from that class.
11281         Fixes #53148.
11282
11283 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11284
11285         * threadpool.c: just return instead of ExitThread to allow for thread
11286         clean up earlier.
11287
11288 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
11289
11290         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11291         when closing resource modules.
11292
11293         * reflection.c (mono_image_create_pefile): Handle the case when the
11294         entry point is not a MethodBuilder.
11295
11296         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11297         field to ReflectionMethod since it is not allways a builder.
11298
11299 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
11300
11301         * marshal.c (mono_marshal_get_managed_wrapper): 
11302         mono_marshal_alloc takes native int so CONV_I
11303         the arg for 64bits.
11304
11305 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
11306
11307         * reflection.c (fixup_cattrs): New function to fixup the methoddef
11308         tokens in the cattr table. Fixes #53108.
11309
11310 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11311
11312         * loader.c: don't trim ".dll" before looking up in the config file.
11313         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11314
11315 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11316
11317         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
11318         Return the module which contains the resource as well.
11319         (ves_icall_System_Reflection_Module_Close): New icall.
11320
11321         * appdomain.c: Bump corlib version number.
11322
11323         * image.c (mono_image_addref): New public function.
11324
11325         * assembly.c: Call mono_image_addref.
11326
11327         * reflection.c (mono_module_get_object): Increase reference count of 
11328         the image.
11329
11330         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11331         Fixes #22532.
11332
11333         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11334         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
11335         proper exceptions on DllImport problems.
11336
11337 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11338
11339         * class.c, metadata.c: eliminate CSIZE macro.
11340
11341 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
11342
11343         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11344         * object.h: Added async_callback field in MonoAsyncResult.
11345         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11346         * verify.c: Added async_callback in MonoAsyncResult layout.
11347
11348 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
11349
11350         * reflection.c (mono_reflection_get_custom_attrs): Add support
11351         for Modules.
11352
11353 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11354
11355         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
11356         marshalling.
11357         (mono_marshal_method_from_wrapper): Add null pointer check.
11358
11359 2004-01-16  Martin Baulig  <martin@ximian.com>
11360
11361         * debug-mono-symfile.h: Set version number to 36 and reflect
11362         latest symbol writer changes.
11363
11364 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11365
11366         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11367         multi-dimensional arrays.
11368         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11369         (mono_class_from_mono_type): Use bounded_array_class_get.
11370         
11371         * class.c (mono_bounded_array_class_get): New function which takes
11372         a 'bounded' bool argument to distinguish vectors from one dimensional
11373         arrays.
11374
11375         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
11376         bounded_array_class_get if the array has bounds.
11377
11378         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11379         Search modules loaded using AssemblyBuilder:AddModule as well.
11380
11381 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11382
11383         * appdomain.c: increased corlib version.
11384         * filewatcher.c: removed g_print.
11385         * icall.c:
11386         (get_property_info): only allocate what is actually requested.
11387         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11388
11389 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11390
11391         * Makefile.am: added filewatcher.[ch]
11392         * filewatcher.[ch]: FileSystemWatcher runtime support.
11393         * icall.c: added new FSW icalls.
11394
11395 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11396
11397         * string-icalls.c: fix stringbuilder regression as suggested by
11398         Iain McCoy <iain@mccoy.id.au>.
11399
11400 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11401
11402         * process.c (process_read_stringtable_block): Recognize '007f' as
11403         a language neutral stringtable block.
11404
11405 2004-01-12  Patrik Torstensson
11406
11407         * object.h (MonoStringBuilder) : Changed layout to support our
11408         new stringbuilder class.
11409         * marshal.c: Change marshalling to support the new layout of 
11410         string builder.
11411         * appdomain.c: increased version number because new layout of
11412         string builder.
11413
11414 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
11415
11416         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11417         assembly name as an string instead of an AssemblyName, since it is
11418         easier to extract info from it.
11419
11420         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11421         the culture subdirectories too. Fixes #52231.
11422
11423 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11424
11425         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11426         It takes 2 new parameters with an optional name for the method to look
11427         for and case ignoring info.
11428
11429         * threadpool.c: removed unused variable.
11430
11431 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11432
11433         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11434         It takes 2 new parameters with an optional name for the property to look
11435         for and case ignoring info.
11436         Fixes bug #52753.
11437
11438 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11439
11440         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11441         Fix #52451.
11442
11443 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11444
11445         * appdomain.c:
11446         * assembly.c: escape the uri before passing it to g_filename_from_uri.
11447         Fixes bug #52630.
11448
11449 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
11450
11451         * reflection.c: Add support for more than one unmanaged resource.
11452
11453         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11454         in field->def_value, as done in all other cases.
11455
11456         * reflection.c (mono_reflection_get_custom_attrs): Add support for
11457         TypeBuilders.
11458
11459         * reflection.c (mono_reflection_create_runtime_class): Remove 
11460         errorneous assignment to klass->element_class, since it is already
11461         done in mono_reflection_setup_internal_class.
11462
11463 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11464
11465         * gc.c: added missing LeaveCriticalSection.
11466         * icall.c: indented a couple of lines.
11467         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11468         if we call EndInvoke inside a callback. Fixes bug #52601.
11469
11470 2004-01-07  Martin Baulig  <martin@ximian.com>
11471
11472         * mono-debug-debugger.h
11473         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11474
11475 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
11476
11477         * appdomain.c: Use messages in NotImplementedException.
11478
11479         * exception.c (mono_get_exception_not_implemented): Now this takes
11480         a message argument.
11481
11482         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11483         exception instead of g_asserting an aborting when something is not
11484         implemented.
11485
11486         Add some inline docs.
11487
11488 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
11489
11490         * reflection.h: Update after changes to object layout.
11491
11492         * reflection.c: Implement saving of unmanaged aka win32 resources.
11493
11494         * appdomain.c: Bump version number.
11495
11496         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
11497         Handle missing domains gracefully.
11498
11499 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
11500
11501         * file-io.c : On Windows, there are much more invalid_path_chars.
11502
11503 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11504
11505         * class.h, object.c: prepare for GetType () speedup.
11506
11507 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
11508
11509         * profiler.c: workaround for --profile null reference exception on
11510           cygwin. Patch by Patrik Torstensson.
11511
11512 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
11513
11514         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11515         make work for unaligned access.
11516
11517 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11518
11519         * class.c: small cleanup (class->fields [i] -> field).
11520         * image.c: check address of metadata is valid.
11521
11522 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
11523
11524         * assembly.h assembly.c (mono_assembly_loaded): New public function to
11525         search the list of loaded assemblies.
11526
11527         * reflection.c (mono_reflection_type_from_name): Use 
11528         mono_assembly_loaded instead of mono_image_loaded.
11529
11530         * reflection.c: Fix warnings.
11531
11532 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
11533
11534         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
11535         is dynamic. This is needed since an assembly can contain both dynamic and
11536         non-dynamic images.
11537
11538         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
11539         assembly->dynamic.
11540
11541         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11542
11543         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11544         to store modules loaded using AddModule.
11545
11546         * reflection.c (mono_image_fill_file_table): Generalize this so it works
11547         on Modules.
11548
11549         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11550
11551         * reflection.c (mono_image_fill_export_table_from_module): New function to
11552         fill out the EXPORTEDTYPES table from a module.
11553
11554         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11555         into a separate function. Also handle loaded non-dynamic modules.
11556
11557         * reflection.c (mono_image_basic_init): Fix memory allocation.
11558
11559         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11560
11561         * assembly.c (mono_assembly_load_references): Make this public.
11562
11563 2003-12-19  Martin Baulig  <martin@ximian.com>
11564
11565         * class.c (mono_class_initialize_generic): Made this static, take
11566         a `MonoGenericInst *' instead of a `MonoClass *'.
11567         (mono_class_from_generic): Call mono_class_initialize_generic()
11568         unless we're already initialized or being called from
11569         do_mono_metadata_parse_generic_inst().
11570
11571         * class.h (MonoGenericInst): Added `initialized' and
11572         `init_pending' flags.
11573
11574         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11575         `mono_class_init (gklass)' or mono_class_initialize_generic()
11576         here; set `generic_inst->init_pending' while parsing the
11577         `type_argv'.
11578
11579 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
11580
11581         * locales.c: include string.h for memxxx prototypes
11582
11583 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11584
11585         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11586         constructor when accessing literal fields.
11587
11588 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
11589
11590         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11591
11592         * reflection.c (assembly_add_resource_manifest): New function to fill
11593         the MANIFESTRESOURCE table.
11594
11595         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11596
11597         * reflection.h: Update to changes in class layout.
11598
11599         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
11600         Reenable call to mono_runtime_is_shutting_down ().
11601
11602         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11603         determine if the runtime is shutting down.
11604
11605 2003-12-16  Jackson Harper <jackson@ximian.com>
11606
11607         * icall.c: comment out call to mono_runtime_is_shutting_down to
11608         fix build.
11609         
11610 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
11611
11612         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11613         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11614
11615 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
11616
11617         * reflection.c: move definition of swap_with_size
11618         to before its first call
11619
11620 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
11621
11622         * appdomain.c (mono_runtime_is_shutting_down): New public function.
11623
11624         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11625         icall.
11626
11627         * object.c: Fix warnings.
11628
11629         * icall.c (ves_icall_Type_Get...): Only consider inherited static
11630         members if FlattenHierarchy is set.
11631
11632         * reflection.c (mono_image_add_decl_security): New function to emit
11633         declarative security.
11634
11635         * reflection.h reflection.c: Add support for declarative security.
11636
11637         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11638         
11639 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11640
11641         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11642         
11643         * appdomain.c verify.c: Moved corlib version checking into its own
11644         function in appdomain.c since it needs to create vtables etc.
11645
11646 2003-12-13  Patrik Torstensson <p@rxc.se>
11647
11648         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
11649         instead of unwrapped server.
11650
11651 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
11652
11653         * verify.c (check_corlib): Fix field index.
11654
11655 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
11656
11657         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11658         GetGacPath icall.
11659
11660 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
11661
11662         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11663         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11664         cope with sizeof(size_t) != sizeof(guint32).
11665
11666 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11667
11668         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11669         in case of failure.
11670
11671 2003-12-10  Mark Crichton <crichton@gimp.org>
11672
11673         * icall.c: removed the GetNonZeroBytes.  We now handle this case
11674         in managed code.
11675
11676         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
11677
11678 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11679
11680         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11681         marked as deleted.
11682
11683 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11684
11685         * verify.c (check_corlib): Handle the case when the version field is 
11686         initialized by a static constructor.
11687
11688 2003-12-08  Patrik Torstensson  <p@rxc.se>
11689
11690     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11691
11692 2003-12-08  Martin Baulig  <martin@ximian.com>
11693
11694         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11695         a MonoReflectionGenericParameter, also take the parameter index
11696         and name as arguments.
11697         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11698         (ves_icall_MonoGenericParam_initialize): New interncall.
11699         (ves_icall_Type_make_byref_type): New interncall.
11700
11701         * reflection.h (MonoReflectionGenericParam): Derive from
11702         MonoReflectionType, not just from MonoObject.  Added `refobj' and
11703         `index' fields.
11704
11705         * reflection.c (mono_reflection_define_generic_parameter): Create
11706         and return a new MonoReflectionGenericParam; don't initialize the
11707         constraints here.
11708         (mono_reflection_initialize_generic_parameter): New public method;
11709         initializes the constraints and creates the `param->pklass'.
11710
11711 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11712
11713         * reflection.h reflection.c: Use the new fields 'num_types', 
11714         'num_fields' and 'num_methods' to track the number of types etc.
11715
11716         * verify.c (check_corlib): Check corlib version number.
11717
11718 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
11719
11720         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11721         function works on all methods.
11722
11723 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11724
11725         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11726         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11727         the custom_type_info flag of the transparent proxy.
11728         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11729         objects that supports IRemotingTypeInfo.
11730         * object.h: Added custom_type_info field in transparent proxy.
11731
11732 2003-12-06  Martin Baulig  <martin@ximian.com>
11733
11734         * class.c (mono_class_create_from_generic): Removed.
11735         (mono_class_from_generic): Check `ginst->klass' before doing
11736         anything else.  This is important to fully support "recursive"
11737         generic types.
11738
11739         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11740         empty `generic_inst->klass' before doing anything else.
11741
11742 2003-12-06  Dick Porter  <dick@ximian.com>
11743
11744         * verify.c: 
11745         * object.h:
11746         * icall.c:
11747         * locales.c: Use C structs to access class fields.  Don't do a
11748         conversion between MonoString and UChar because both are
11749         platform-endian UTF-16.  Compare now takes startindex and count
11750         parameters.  Add a char overload for IndexOf.  Speed up the
11751         invariant string IndexOf.
11752
11753 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
11754
11755         * Makefile.am (monosn_LDADD): Fix parallel build.
11756
11757 2003-12-04  Martin Baulig  <martin@ximian.com>
11758
11759         * icall.c
11760         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11761         (ves_icall_Type_make_array_type): New interncall.       
11762
11763 2003-12-04  Martin Baulig  <martin@ximian.com>
11764
11765         * locales.c: also change it in the !HAVE_ICU case.
11766
11767 2003-12-04  Dick Porter  <dick@ximian.com>
11768
11769         * icall.c:
11770         * locales.c: construct_compareinfo is now in CompareInfo, not
11771         CultureInfo.
11772
11773 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11774
11775         * image.c (mono_image_load_file_for_image): Cache loaded images in the
11776         image->files array.
11777
11778         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11779         table as well.
11780
11781         * assembly.c (mono_assembly_load_references): Only load references
11782         once.
11783
11784         * class.c (mono_class_from_name): Avoid linear search of the 
11785         EXPORTEDTYPE table.
11786
11787         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11788
11789 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11790
11791         * image.h (MonoImage): Add 'field_cache' field.
11792
11793         * loader.c (mono_field_from_token): Cache field lookups.
11794         
11795         * reflection.c (mono_module_get_object): Fix name property.
11796
11797         * icall.c (ves_icall_get_enum_info): Update after changes to 
11798         mono_metadata_get_constant_index ().
11799
11800         * icall.c: Get rid of get_type_info icall, use a separate icall for
11801         each type property to avoid needless memory allocations. Fixes #51514.
11802
11803         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11804         to avoid needless binary searches.
11805
11806         * class.c (class_compute_field_layout): Move the initialization of
11807         field->def_value to mono_class_vtable ().
11808
11809         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11810         non-corlib types.
11811
11812         * object.c (mono_object_allocate): Make it inline.
11813
11814         * object.c (mono_object_allocate_spec): Make it inline.
11815         
11816 2003-12-02  Dick Porter  <dick@ximian.com>
11817
11818         * locales.c (create_NumberFormat): NumberFormatInfo construction.
11819         Patch by Mohammad DAMT (mdamt@cdl2000.com).
11820
11821 2003-12-01  Dick Porter  <dick@ximian.com>
11822
11823         * threads.c: Fix signature and call in CreateMutex and
11824         CreateEvent.
11825
11826 2003-12-01  Dick Porter  <dick@ximian.com>
11827
11828         * icall.c: 
11829         * locales.c: Implement string compares and searching
11830
11831         * object.h: Add extra Thread field
11832
11833 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
11834
11835         * reflection.c (fixup_method): Add support for MonoCMethod.
11836
11837 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
11838
11839         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11840
11841         * reflection.c (assembly_name_to_aname): Allow extra characters in
11842         assembly names. Fixes #51468.
11843
11844 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11845
11846         * exception.c (mono_exception_from_name_domain): New helper function.
11847
11848         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11849         exception object in the correct domain.
11850
11851         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
11852         formatting + make a copy a the input data.
11853
11854         * loader.c (mono_get_method_from_token): Methods which contain
11855         native code do not have entries in the ImplMap.
11856
11857         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11858         Thanks to Gonzalo for spotting this.
11859         
11860         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11861         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11862
11863         * assembly.h (mono_assembly_load_from): Split the second part of 
11864         assembly loading into a new public function.
11865
11866         * exception.h (mono_get_exception_bad_image_format): New function.
11867
11868 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
11869
11870         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11871         Enumerate all modules inside a dynamic assembly. Fixes #51293.
11872         
11873         * icall.c: Add new icall for creating dynamic methods.
11874
11875         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11876
11877         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11878
11879         * reflection.c (mono_reflection_create_dynamic_method): New icall to
11880         create a dynamic method.
11881
11882         * reflection.c (resolve_object): New helper function.
11883
11884         * reflection.c: Generalize ReflectionMethodBuilder and the functions
11885         which manipulate it so they can also work on dynamic methods.
11886
11887         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
11888         creating the MonoReflectionMethodAux structure if it is not needed.
11889         
11890         * reflection.h verify.c: Update after changes to object layout.
11891
11892         * reflection.c (method_builder_encode_signature): Fix compilation on
11893         gcc 2.95.x.
11894
11895 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
11896
11897         * appdomain.h: Added support for context static fields. Added static_data
11898           field to MonoAppContext and renamed thread_static_fields to a more
11899           generic special_static_fields in MonoAppDomain, since it can now contain
11900           context static fields.
11901         * domain.c: Updated hashtable name.
11902         * object.c: Replaced field_is_thread_static() for a more generic
11903           field_is_special_static() which also checks for context static attribute.
11904           In mono_class_vtable(), added support for static context fields.
11905         * threads.c: Changed methods that manage thread static fields to more
11906           generic methods so they can be reused both for thread and context static
11907           data.
11908         * threads.h: Declared some new methods.
11909
11910 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
11911
11912         * reflection.h: Update after changes to the managed types.
11913
11914         * reflection.c (encode_custom_modifiers): New helper function.
11915
11916         * reflection.c (method_encode_signature): Emit custom modifiers.
11917
11918         * reflection.c (field_encode_signature): Emit custom modifiers.
11919
11920 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11921
11922         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11923
11924         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
11925         implementation.
11926
11927         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
11928         icall.
11929
11930         * object.c (mono_field_get_value_object): New function.
11931
11932         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11933         specific.
11934
11935 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
11936
11937         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11938         return a preallocated out-of-memory exception instance.
11939
11940         * object.c (out_of_memory): Use the new function.
11941
11942         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11943         flag is before the custom modifiers. Fixes #49802.
11944
11945 2003-11-16  Martin Baulig  <martin@ximian.com>
11946
11947         * class.c (mono_class_is_open_constructed_type): Implemented the
11948         MONO_TYPE_GENERICINST case.
11949
11950 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
11951
11952         * assembly.c (mono_assembly_fill_assembly_name): New function to
11953         fill out the MonoAssemblyName structure.
11954         (mono_assembly_open): Use the new function.
11955
11956         * icall.c (fill_reflection_assembly_name): New helper function.
11957
11958         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11959         new function.
11960
11961         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11962
11963 2003-11-15  Martin Baulig  <martin@ximian.com>
11964
11965         * class.c (mono_class_is_open_constructed_type): New public
11966         function; checks whether a type is an open constructed type,
11967         ie. whether it still contains type parameters.
11968         (mono_class_inflate_generic_type): If we're a type parameter and
11969         the inflated type is also a MONO_TYPE_(M)VAR, return the original
11970         type.
11971
11972         * class.h (MonoGenericInst): Added `guint32 is_open'.
11973
11974         * loader.c (method_from_methodspec): Check whether we're an open
11975         or closed constructed type and set `ginst->is_open'.
11976
11977         * reflection.c (mono_reflection_bind_generic_parameters): Check
11978         whether we're an open or closed constructed type and set
11979         `ginst->is_open'.
11980         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11981         from open constructed types.
11982
11983 2003-11-15  Martin Baulig  <martin@ximian.com>
11984
11985         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11986         a generic instance (instead of a generic type declaration) with
11987         unbound generic parameters, bind them to our actual types.
11988
11989 2003-11-14  Martin Baulig  <martin@ximian.com>
11990
11991         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11992
11993         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11994         an interface type, populate `res->interfaces' with instantiated
11995         versions of all the interfaces we inherit.
11996
11997 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
11998
11999         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
12000         when MONO_PATH is set but doesn't contain the install dir.
12001
12002 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12003
12004         * icall.c:
12005         (ves_icall_Type_GetInterfaces): don't return an interface twice when
12006         it's also implemented in base classes. Fixes bug #50927.
12007
12008 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
12009
12010         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
12011         if this method is called from a finalizer. Fixes #50913.
12012
12013 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
12014
12015         * threads.c: Implement VolatileRead/VolatileWrite
12016
12017         * icall.c: Add new icalls for VolatileRead/VolatileWrite
12018
12019 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12020
12021         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
12022         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
12023         2.95.3.
12024
12025         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
12026         from Peter Ross (pro@missioncriticalit.com).
12027         
12028 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
12029
12030         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
12031
12032 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12033
12034         * assembly.c (mono_assembly_load_references): Disable check because it
12035         triggers on older corlibs which lots of people have.
12036
12037 2003-11-12  Jackson Harper  <jackson@ximian.com>
12038
12039         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
12040         load corlib.dll if mscorlib.dll is not found.
12041         * assembly.h: Remove corlib name define.
12042         * class.c:
12043         * domain.c:
12044         * image.c: Change corlib name to mscorlib.
12045         
12046 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12047
12048         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12049
12050 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
12051
12052         * appdomain.h: Added loader_optimization here to sync with the C#
12053         code, and add disallow_binding_redirects field.
12054
12055 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12056
12057         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
12058
12059         * reflection.c (mono_image_build_metadata): Fix crash on modules
12060         with no types.
12061
12062         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12063
12064         * icall.c (ves_icall_get_method_info): Return callingConvention as
12065         well.
12066
12067         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
12068         namespaces from the EXPORTEDTYPE table as well.
12069
12070         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12071         from all modules inside the assembly.
12072         
12073 2003-11-11  Martin Baulig  <martin@ximian.com>
12074
12075         * reflection.c (mono_reflection_bind_generic_parameters): Make
12076         this work for interfaces.
12077
12078 2003-11-11  Martin Baulig  <martin@ximian.com>
12079
12080         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12081
12082 2003-11-11  Martin Baulig  <martin@ximian.com>
12083
12084         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12085         "MonoInflatedMethod" and "MonoInflatedCtor".
12086
12087 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12088
12089         * reflection.c (resolution_scope_from_image): Use the assembly table
12090         from the manifest module, since other modules don't have it.
12091
12092         * debug-helpers.c (mono_type_full_name): New helper function.
12093
12094         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12095
12096         * image.c (mono_image_load_file_for_image): New public function which
12097         is a replacement for the load_file_for_image in class.c.
12098
12099         * assembly.c (mono_assembly_load_module): A wrapper for the function
12100         above which does assembly association and reference loading too.
12101
12102         * class.c (mono_class_from_name): Call mono_assembly_load_module.
12103
12104 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12105
12106         * appdomain.c: not all of the attributes for the full assembly name
12107         are required and the order doesn't matter. Fixes bug #50787.
12108
12109 2003-11-10  Dick Porter  <dick@ximian.com>
12110
12111         * locales.c: Use platform-endian UTF16
12112
12113 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12114
12115         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12116         
12117 2003-11-10  Martin Baulig  <martin@ximian.com>
12118
12119         * metadata.c
12120         (mono_metadata_load_generic_params): Make this actually work.
12121
12122         * reflection.c (mono_reflection_bind_generic_parameters): If our
12123         parent is a generic instance, pass all the `types' to it, no
12124         matter whether it has the same number of type parameters or not.
12125
12126 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12127
12128         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12129
12130         * assembly.c (mono_assembly_load_references): Move the image<->assembly
12131         assignment code to this function so it gets called recursively for all
12132         modules.
12133
12134         * image.c (load_modules): Remove the assembly assignment since it is
12135         now done by mono_assembly_load_references.
12136         
12137         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12138         Add 'module' argument.
12139         (mono_module_get_types): New helper function.
12140         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12141
12142 2003-11-08  Martin Baulig  <martin@ximian.com>
12143
12144         * class.c (mono_class_inflate_generic_method): Interface method
12145         don't have a header.
12146
12147         * reflection.c (mono_image_get_methodspec_token): Take an
12148         additional `MonoGenericInst *' argument instead of reading it from
12149         the header; this is necessary to support interfaces.
12150         (mono_image_create_token): Pass the `MonoGenericInst *' from the
12151         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12152         (inflated_method_get_object): Take an additional `MonoGenericInst *'
12153         argument.
12154
12155         * reflection.h (MonoReflectionInflatedMethod): Added
12156         `MonoGenericInst *ginst'.
12157
12158 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
12159
12160         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12161
12162 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
12163
12164         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12165
12166 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12167
12168         * reflection.c 
12169         (reflection_methodbuilder_from_method_builder):
12170         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
12171         initialize a ReflectionMethodBuilder structure.
12172         (mono_image_get_methodbuilder_token):
12173         (mono_image_get_ctorbuilder_token): New functions to emit memberref
12174         tokens which point to types in another module inside the same assembly.
12175
12176         * reflection.c: Use the new helper functions.
12177         
12178         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12179
12180         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
12181         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12182
12183         * reflection.c (resolution_scope_from_image): Emit a moduleref if
12184         neccesary.
12185
12186         * reflection.c (mono_image_build_metadata): Emit metadata only for the
12187         current module. Emit the manifest only for the main module.
12188
12189         * reflection.c (mono_image_create_token): Add assertion when a 
12190         memberref needs to be created.
12191
12192         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12193
12194         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
12195         larger buffer for the custom attribute blob. Fixes #50637.
12196         
12197 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12198
12199         * threadpool.c: notify listener on async processing handles after
12200         invoking the async callback. Thanks to Zoltan.
12201
12202 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12203
12204         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
12205         avoid code duplication.
12206
12207         * reflection.h (MonoDynamicImage): New type which is currently unused,
12208         but will be used through the ref.emit code in place of 
12209         MonoDynamicAssembly.
12210
12211         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12212         object layout.
12213
12214         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12215         a MonoDynamicImage instead of just a MonoImage.
12216         
12217         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12218         icalls to ModuleBuilder but keep their semantics, so they will work
12219         with moduleb->assemblyb. This will change later.
12220         
12221 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12222
12223         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12224         object layout.
12225
12226         * reflection.c (mono_image_build_metadata): Avoid creation of a default
12227         main module, since it is now done by the managed code.
12228
12229 2003-11-03  Martin Baulig  <martin@ximian.com>
12230
12231         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12232         `ginst->klass' here.
12233         (method_encode_methodspec): Don't use the `ginst->generic_method's
12234         klass if it's a generic instance, use `ginst->klass' in this case.
12235
12236 2003-11-03  Martin Baulig  <martin@ximian.com>
12237
12238         * reflection.c (mono_image_get_generic_method_param_info):
12239         Removed, use mono_image_get_generic_param_info() instead.
12240         (mono_image_get_type_info): Write the GenericParam table before
12241         the Method table.  This is neccessary because in the GenericParam
12242         table, type parameters of the class (ie. '!0' etc.) must come
12243         before the ones from its generic methods (ie. '!!0' etc).
12244
12245 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12246
12247         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12248
12249 2003-11-02  Martin Baulig  <martin@ximian.com>
12250
12251         * reflection.c (create_generic_typespec): Take a
12252         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12253         the generic parameters from it.
12254
12255 2003-11-02  Martin Baulig  <martin@ximian.com>
12256
12257         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12258         instead of a `MonoClassField *' since we just need the type.
12259         (create_generic_typespec): New static function.  Creates a
12260         TypeSpec token for a generic type declaration.
12261         (mono_image_get_generic_field_token): New static function.
12262         (mono_image_create_token): If we're a FieldBuilder in a generic
12263         type declaration, call mono_image_get_generic_field_token() to get
12264         the token.
12265
12266 2003-11-02  Martin Baulig  <martin@ximian.com>
12267
12268         * reflection.h
12269         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12270         `MonoReflectionGenericInst *declaring_type' and
12271         `MonoReflectionGenericInst *reflected_type' fields.
12272
12273         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12274         `MonoReflectionGenericInst *declaring_type' and a
12275         `MonoReflectionGenericInst *reflected_type' argument instead of a
12276         single `MonoReflectionGenericInst *type' one.  Set
12277         `res->declaring_type' and `res->reflected_type' from them.
12278         (mono_reflection_inflate_field): Likewise.      
12279
12280 2003-11-02  Martin Baulig  <martin@ximian.com>
12281
12282         * class.c (mono_class_setup_vtable): Don't store generic methods
12283         in the vtable.  
12284
12285 2003-11-02  Martin Baulig  <martin@ximian.com>
12286
12287         * reflection.h (MonoReflectionGenericInst): Added
12288         `MonoReflectionType *declaring_type'.
12289
12290         * reflection.c (mono_reflection_bind_generic_parameters): Use
12291         `if (tb->parent)' instead of `klass->parent'.
12292
12293 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
12294
12295         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12296         with an empty ASSEMBLY table.
12297
12298         * reflection.c (mono_image_build_metadata): Avoid using the same loop
12299         variable in the inner and outer loops.
12300
12301 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12302
12303         * metadata.h (mono_metadata_make_token): Put parentheses around macro
12304         argument.
12305
12306         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12307         
12308         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
12309         icalls. Instead, do everything in managed code. This is needed since
12310         it is hard to restore the original domain etc. in unmanaged code in the
12311         presence of undeniable exceptions.
12312
12313         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
12314         New icalls to push and pop appdomain refs.
12315
12316 2003-10-31  Martin Baulig  <martin@ximian.com>
12317
12318         * class.c (inflate_generic_type): Renamed to
12319         mono_class_inflate_generic_type() and made it public.
12320
12321         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12322         New interncall.
12323
12324         * loader.c (mono_field_from_memberref): Also set the retklass for
12325         typespecs.
12326
12327         * fielder.c (mono_image_get_inflated_field_token): New static
12328         method; creates a metadata token for an inflated field.
12329         (mono_image_create_token, fixup_method): Added support for
12330         "MonoInflatedField".
12331         (fieldbuilder_to_mono_class_field): New static function.
12332         (mono_reflection_inflate_field): New public function.
12333
12334         * reflection.h
12335         (MonoReflectionGenericInst): Added `MonoArray *fields'.
12336         (MonoReflectionInflatedField): New typedef.     
12337
12338 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
12339
12340         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12341         for Solaris and other platforms without s6_addr16
12342
12343 2003-10-30  Martin Baulig  <martin@ximian.com>
12344
12345         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12346         argument instead of two.
12347         (mono_class_inflate_generic_signature): Likewise.
12348         (inflate_generic_header): Likewise.
12349         (mono_class_inflate_generic_method): Likewise.  In addition, if
12350         `ginst->klass' is set, it becomes the new `method->klass'.
12351
12352         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12353         field.
12354
12355         * reflection.c (encode_generic_method_sig): Write a 0xa as the
12356         first byte. [FIXME]
12357         (method_encode_methodspec): If we have generic parameters, create
12358         a MethodSpec instead of a MethodRef.
12359         (fixup_method): Added support for "MonoInflatedMethod" and
12360         "MonoInflatedCtor".
12361         (mono_image_create_token): Added support for "MonoInflatedMethod"
12362         and "MonoInflatedCtor".
12363         (inflated_method_get_object): New static function; returns a
12364         managed "System.Reflection.MonoInflatedMethod" object.
12365         (mono_reflection_bind_generic_method_parameters): Return a
12366         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12367         (mono_reflection_inflate_method_or_ctor): Likewise.
12368         (mono_image_get_generic_method_param_info): Initialize unused
12369         fields to zero.
12370         (mono_image_get_generic_param_info): Likewise.
12371
12372         * reflection.h (MonoReflectionInflatedMethod): New public
12373         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
12374         "S.R.MonoInflatedCtor" classes.
12375
12376         * loader.c (method_from_memberref): If we're a TypeSpec and it
12377         resolves to a generic instance, inflate the method.
12378
12379 2003-10-28  Dick Porter  <dick@ximian.com>
12380
12381         * object.c (mono_runtime_run_main): Convert command-line arguments
12382         into utf8, falling back to the user's locale encoding to do so.
12383
12384 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12385
12386         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12387         at this time.
12388
12389         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12390
12391         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12392         up icalls at method definition time. Partially fixes #33569.
12393
12394 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
12395
12396         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12397         marshalling of arrays. Fixes #50116.
12398
12399         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12400
12401         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12402         points to a vtable in the dying appdomain.
12403
12404         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12405         listeners into unmanaged code inside the lock.
12406
12407         * object.c (mono_class_vtable): Turn off typed allocation in non-root
12408         domains and add some comments.
12409
12410 2003-10-25  Martin Baulig  <martin@ximian.com>
12411
12412         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12413
12414         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12415
12416         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12417         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12418         currently parsing.  Create the generic class and store it in
12419         `generic_inst->klass' before parsing the type arguments.  This is
12420         required to support "recursive" definitions; see mcs/tests/gen-23.cs
12421         for an example.
12422         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12423         to support recursive typespec entries.
12424
12425         * class.c (mono_class_setup_parent): If our parent is a generic
12426         instance, we may get called before it has its name set.
12427         (mono_class_from_generic): Splitted into
12428         mono_class_create_from_generic() and mono_class_initialize_generic().
12429
12430 2003-10-25  Martin Baulig  <martin@ximian.com>
12431
12432         * icall.c (ves_icall_Type_BindGenericParameters): Return a
12433         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12434         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12435         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12436
12437         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12438         (create_typespec): Likewise.
12439         (mono_reflection_bind_generic_parameters): Return a
12440         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12441         (mono_reflection_inflate_method_or_ctor): New public function.
12442
12443         * reflection.h (MonoReflectionGenericInst): New typedef.        
12444
12445 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12446
12447         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12448         inside the domain lock. Fixes #49993.
12449         
12450         * object.c (mono_class_vtable): When typed allocation is used, 
12451         allocate vtables in the GC heap instead of in the mempool, since the
12452         vtables contain GC descriptors which are used by the collector even
12453         after the domain owning the mempool is unloaded.
12454
12455         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12456
12457         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12458         reflect what it does. Also invalidate mempools instead of freeing
12459         them if a define is set.
12460
12461         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12462         of the appdomain.
12463         
12464         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12465         hold the finalizable objects in this domain.
12466
12467         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12468         appdomain.
12469
12470         * appdomain.c (mono_domain_set): New function to set the current
12471         appdomain, but only if it is not being unloaded.
12472
12473         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12474         appdomain which is being unloaded.
12475         
12476         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12477         unloading of the root appdomain.
12478
12479         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12480         icall to execute a method in another appdomain. Intended as a 
12481         replacement for InternalSetDomain, which can confuse the code 
12482         generation in the JIT.
12483
12484         * appdomain.c (mono_domain_is_unloading): New function to determine
12485         whenever an appdomain is unloading.
12486
12487         * appdomain.c (mono_domain_unload): New function to correctly unload
12488         an appdomain.
12489
12490         * assembly.c (mono_assembly_load_references): Check that an assembly
12491         does not references itself.
12492
12493         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12494         domain manually, it asks the finalizer thread to do it, then waits for
12495         the result. Also added a timeout.
12496
12497         * icall.c: Register the new icalls.
12498
12499         * threads.h threads.c: Export the mono_gc_stop_world and 
12500         mono_gc_start_world functions.
12501         
12502         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
12503         function to fill out the mempool with 0x2a.
12504
12505 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
12506
12507         * reflection.h (MonoReflectionMethodAux): New structure to store
12508         information which is rarely used, thus is not in the MonoMethod
12509         structure.
12510
12511         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12512         store the aux info.
12513
12514         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12515         and marshalling info into the aux structure.
12516
12517         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12518         from the aux structure.
12519
12520         * loader.c (mono_method_get_param_names): Retrieve the param names from
12521         the aux structure.
12522         
12523 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
12524
12525         * exception.h exception.c: Add AppDomainUnloadedException && fix 
12526         warning.
12527
12528 2003-10-21  Dick Porter  <dick@ximian.com>
12529
12530         * socket-io.c
12531         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12532         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12533
12534 2003-10-21  Martin Baulig  <martin@ximian.com>
12535
12536         * reflection.c (mono_reflection_bind_generic_parameters):
12537         `klass->parent' is NULL for interfaces.
12538
12539 2003-10-21  Martin Baulig  <martin@ximian.com>
12540
12541         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12542
12543 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
12544
12545         * exception.c (mono_exception_from_name_msg): New helper function for
12546         creating exceptions and initializing their message field.
12547
12548         * exception.c: Simplify functions using the new helper.
12549
12550         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12551         New function.
12552
12553         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12554         mono_raise_exception, since otherwise gcc doesn't generate the function
12555         epilog for raise_exception, confusing the stack unwinding in the JIT.
12556         Fixes #45043.
12557
12558         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12559         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12560         Fixes #49499.
12561
12562 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12563
12564         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12565         utf8.
12566
12567 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
12568
12569         * icall.c: Removed GetUninitializedObject method because
12570           AllocateUninitializedClassInstance does the same.
12571
12572 2003-10-18  Martin Baulig  <martin@ximian.com>
12573
12574         * class.c (inflate_generic_signature): Renamed to
12575         mono_class_inflate_generic_signature() and made it public.
12576         (my_mono_class_from_generic_parameter): New static function; if we
12577         don't already have the generic parameter's MonoClass, create a
12578         very simple one which is just used internally in the runtime and
12579         not passed back to managed code.
12580
12581         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12582
12583         * metadata.h (MonoMethodSignature): Moved the
12584         `MonoGenericParam *gen_params' to the MonoMethodHeader.
12585         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12586
12587         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12588         ves_icall_MonoMethod_GetGenericArguments(); this is now an
12589         interncall on the MonoMethod class, not on MethodInfo.
12590         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12591         calling mono_reflection_bind_generic_method_parameters() directly.
12592
12593         * loader.c (mono_method_get_signature): If this is a MethodSpec;
12594         return the already computed `method->signature'.
12595         (method_from_methodspec): New static function to load a method
12596         from a MethodSpec entry.
12597         (mono_get_method_from_token): Call the new method_from_methodspec()
12598         for MethodSpec tokens.  
12599         (mono_get_method_from_token): If we're a generic method, load the
12600         type parameters.
12601
12602         * reflection.c (mono_image_get_memberref_token): Allow
12603         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12604         table.
12605         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12606         (mono_image_create_token): First check whether it's a generic
12607         method (so we'd need to create a MethodSpec), then do the other
12608         two alternatives.
12609         (mono_reflection_bind_generic_method_parameters): Return a
12610         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12611         called directly from the interncall.
12612
12613 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
12614
12615         * reflection.c (load_public_key): Move loading of the public key
12616         into managed code.
12617
12618         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12619
12620         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12621         fields.
12622
12623         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12624         culture, hash_alg and public_key. Fixes #49555.
12625
12626 2003-10-17  Martin Baulig  <martin@ximian.com>
12627
12628         * class.h (MonoGenericInst): Moved this declaration here and added
12629         `MonoMethod *generic_method'.
12630
12631         * icall.c
12632         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12633         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12634
12635         * metadata.c (mono_metadata_type_equal): Two types of
12636         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12637         index; ie. don't compare the address of the `MonoGenericParam'
12638         structure.
12639         (mono_metadata_load_generic_params): Removed the `MonoMethod
12640         *method' argument.
12641
12642         * metadata.h (MonoGenericInst): Moved declaration to class.h.
12643         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12644
12645         * reflection.c (method_encode_signature): Encode the number of
12646         generic parameters.
12647         (encode_generic_method_sig): New static function.
12648         (method_encode_methodspec): New static function; creates an entry
12649         in the MethodSpec table for a generic method.
12650         (mono_image_get_methodspec_token): New static function.
12651         (mono_image_create_token): Call mono_image_get_methodspec_token()
12652         for generic methods.
12653         (mono_reflection_bind_generic_method_parameters): New public
12654         function.  Instantiates a generic method.
12655
12656 2003-10-16  Martin Baulig  <martin@ximian.com>
12657
12658         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12659         *gen_params' here from MonoMethodHeader.
12660
12661         * metadata.c (mono_metadata_parse_method_signature): If we have
12662         generic parameters, initialize `method->gen_params' and then set
12663         the correct `type->data.generic_param' in all the parameters.
12664
12665 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12666
12667         * threads.c (mono_threads_get_default_stacksize): New function to 
12668         return the default stacksize.
12669
12670         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12671         termination of the finalizer thread, since the previous method had
12672         race conditions. Fixes #49628.
12673
12674         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12675         as for the other managed threads.
12676
12677 2003-10-16  Martin Baulig  <martin@ximian.com>
12678
12679         * class.c (inflate_generic_signature): Copy `generic_param_count'
12680         and `gen_params'.
12681
12682         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12683         New interncall.
12684
12685         * metadata.c (mono_metadata_parse_method_signature): Actually set
12686         the `method->generic_param_count' here.
12687         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12688
12689 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12690
12691         * object.h: Add a new field to TypedRef to simplify the implementation
12692         of the REFANY opcodes in the JIT.
12693
12694         * icall.c: Make use of the new field.
12695
12696         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12697         dynamically.
12698
12699 2003-10-15  Martin Baulig  <martin@ximian.com>
12700
12701         * class.c (mono_class_from_gen_param): Renamed to
12702         mono_class_from_generic_parameter() and moved most of the
12703         functionality from mono_reflection_define_generic_parameter()
12704         here; ie. we create a "real" class here.
12705         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12706         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12707         previously been called.
12708
12709         * class.h (MonoGenericParam): Moved the declaration of this struct
12710         here from metadata.h and added `MonoMethod *method'.
12711
12712         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12713         interncall.
12714
12715         * loader.c (mono_get_method_from_token): If we have any generic
12716         parameters, call mono_metadata_load_generic_params() to read them
12717         from the MONO_TABLE_GENERICPAR.
12718
12719         * metadata.c (mono_metadata_load_generic_params): Added
12720         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12721
12722         * metadata.h (MonoMethodSignature): Replaced
12723         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12724         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12725
12726         * reflection.c (mono_reflection_define_generic_parameter): Moved
12727         most of the functionality into the new
12728         mono_class_from_generic_parameter(); set the `method' field if
12729         we're a method parameter.       
12730
12731 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
12732
12733         * marshal.c (emit_struct_conv): if native size is 0
12734         emit no code.
12735
12736 2003-10-14  Martin Baulig  <martin@ximian.com>
12737
12738         * icall.c: The generics API has changed in the spec since it was
12739         added to System.Type; these modifications make it match the spec
12740         again.
12741         (ves_icall_Type_GetGenericParameters): Renamed to
12742         `ves_icall_Type_GetGenericArguments'.
12743         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12744         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12745         `ves_icall_MonoType_get_HasGenericArguments'.
12746         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12747         `ves_icall_MonoType_get_IsGenericParameter'.
12748         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12749         this is no interncall anymore.
12750         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12751         `ves_icall_TypeBuilder_get_IsGenericParameter'.
12752
12753 2003-10-14  Martin Baulig  <martin@ximian.com>
12754
12755         * reflection.c (mono_reflection_bind_generic_parameters): Also
12756         inflate generic methods if we're reading the class from IL.
12757
12758 2003-10-13  Martin Baulig  <martin@ximian.com>
12759
12760         * reflection.c (mono_reflection_define_generic_parameter): This
12761         method isn't called directly from the icall anymore; take a
12762         `MonoReflectionAssemblyBuilder *' so we can use this for type and
12763         method generic parameters.
12764         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12765         (method_builder_encode_signature): Encode generic parameters.
12766         (mono_image_get_method_info): Write generic params to the
12767         MONO_TABLE_GENERICPARAM table.
12768
12769         * reflection.h (MonoReflectionMethodBuilder): Added
12770         `MonoArray *generic_params'.
12771
12772         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12773
12774         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12775         wrapper for mono_reflection_define_generic_parameter().
12776         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
12777
12778 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
12779
12780         * marshal.h: Add missing function to fix build.
12781
12782         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
12783         the SetLastError pinvoke attribute.
12784
12785         * marshal.c (mono_marshal_set_last_error): New helper function called
12786         by the generated code.
12787         
12788         * marshal.c (mono_mb_emit_branch): New helper function.
12789
12790         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12791
12792         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12793         classes as parameters and return values of delegates. Fixes #29256. 
12794
12795 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
12796
12797         * locales.c: use gint32 in non HAVE_ICU case
12798
12799 2003-10-11  Martin Baulig  <martin@ximian.com>
12800
12801         * mono-debug.c (mono_debug_add_method): Added a workaround for
12802         bug #48591.
12803
12804 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12805
12806         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12807         delegates passed to native code must use the STDCALL calling 
12808         convention. Fixes #35987.
12809
12810 2003-10-10  Martin Baulig  <martin@ximian.com>
12811
12812         * class.c (inflate_generic_type): If we're inflating for a generic
12813         type instance (and not for a generic method), return
12814         MONO_TYPE_MVAR unchanged.
12815
12816 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12817
12818         * string-icalls.c: Join ignores null strings in the source array.
12819         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12820         * threads.c: GetAvailableTheads is slightly more accurate.
12821
12822 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
12823
12824         * threads.h threads.c : add mono_threads_set_default_stacksize
12825         and pass default to CreateThread calls.
12826
12827 2003-10-09  Dick Porter  <dick@ximian.com>
12828
12829         * icall.c:
12830         * locales.h:
12831         * locales.c: Internal calls for constructing CultureInfo and
12832         related objects from libicu (if its available.)
12833
12834 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12835
12836         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12837
12838 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12839
12840         * threadpool.c: added an argument to async_invoke_thread that is the
12841         item to process, pass the MonoAsyncResult to the thread start function
12842         when creating a new thread. This way we don't need to acquire any lock
12843         when we're creating a new thread. Readded a semaphore for faster
12844         response times (instead of that Sleep i added).
12845
12846 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
12847
12848         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12849         get daylight change dates better on Windows, fix handling
12850         of platforms without tm_gmtoff.
12851
12852 2003-10-06  Martin Baulig  <martin@ximian.com>
12853
12854         * class.c (inflate_generic_method): Renamed to
12855         mono_class_inflate_generic_method() and made public.
12856         (mono_class_init): Don't inflate the generic methods here.
12857         (mono_class_from_generic): Added `gboolean inflate_methods'
12858         argument.  Inflate the methods here.
12859
12860         * loader.c (mono_method_get_param_names): Ignore instances of
12861         generic types for the moment.
12862
12863         * reflection.c (fixup_method): Added support for inflated methods.
12864         (mono_image_create_token): Use mono_image_get_methodref_token()
12865         for inflated methods.
12866         (mono_custom_attrs_from_param): Ignore instances of generic types
12867         for the moment.
12868         (mono_reflection_bind_generic_parameters): New public function.
12869         Moved all the functionality from
12870         ves_icall_Type_BindGenericParameters() here and added support for
12871         dynamic types.
12872         (mono_reflection_define_generic_parameter): Initialize
12873         `klass->methods' here.
12874
12875         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12876         functionality into mono_reflection_define_generic_parameter().
12877         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12878         TypeBuilder, return that TypeBuilder.
12879
12880 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12881
12882         * appdomain.c: removed mono_delegate_semaphore.
12883
12884         * threadpool.c:
12885         (mono_thread_pool_add): moved hash table creation inside and the thread 
12886         creation outside of the critical region.
12887         (mono_thread_pool_finish): removed obsolete code.
12888         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12889         continue or exit the thread depending on the queue.
12890
12891 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
12892
12893         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12894         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12895         handle more bool marshalling options
12896
12897 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
12898
12899         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12900         arrays of structs. Also add a more descriptive error message when
12901         a structure member is marshalled as LPArray.
12902
12903 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12904
12905         * marshal.c (mono_marshal_get_native_wrapper): Add support for
12906         marshalling arrays of complex types. Fixes #29098. Also remove an
12907         usused and incomplete function.
12908
12909 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12910
12911         * gc.c: report heap_size - free_bytes as total memory allocated
12912         (bug#49362).
12913
12914 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12915
12916         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
12917         fix timezone handling problems on Windows.
12918         
12919         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12920         asserts when the year is outside the range handled by ms the functions.
12921
12922         * class.c (setup_interface_offsets): If the class is an interface,
12923         fill out its interface_offsets slot.
12924
12925 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12926
12927         * threadpool.c: mark threadpool threads as background.
12928
12929 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
12930
12931         * decimal.c - define DECINLINE to nothing if not using GCC
12932
12933 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12934
12935         * assembly.c: More refcount fixes.
12936
12937 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12938
12939         * string-icalls.c: if we're not trimming, return the same string.
12940         When not splitting, don't create a new string.
12941
12942 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12943
12944         * image.c:
12945         (mono_image_open): increment the ref_count inside the critical section.
12946
12947 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
12948
12949         * image.c (mono_image_open): Fix reference counting bug.
12950
12951 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
12952
12953         * marshal.c (mono_marshal_type_size) struct alignment changed for 
12954         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
12955         64bits. Avoid leak in mono_marshal_get_native_wrapper when
12956         mono_lookup_pinvoke_call throws.        
12957
12958 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12959
12960         * reflection.c (mono_reflection_parse_type): Fix #49114.
12961
12962         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12963         temporary workaround for cygwin header problem.
12964
12965         * object.c (mono_object_isinst): Synchronize this with the code
12966         generated by the JIT for casts.
12967
12968 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12969
12970         * reflection.c (encode_type): Fix #38332.
12971
12972 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12973
12974         * marshal.c (mono_marshal_method_from_wrapper): New function to return
12975         the original method from the wrapper method.
12976
12977 2003-09-25  Martin Baulig  <martin@ximian.com>
12978
12979         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12980         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12981         (ves_icall_Type_get_IsGenericInstance): New interncall.
12982
12983 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12984
12985         * object.c: fix cast warning in big endian code.
12986
12987 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12988
12989         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12990         
12991 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12992
12993         * assembly.c: don't call check_env from mono_assembly_load. It's
12994         already done once in mono_assemblies_init and may cause headaches when
12995         multiple threads are loading assemblies.
12996
12997 2003-09-19  Martin Baulig  <martin@ximian.com>
12998
12999         * reflection.c (mono_reflection_define_generic_parameter): Don't
13000         allocate `klass->methods', set `klass->flags' to
13001         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
13002
13003 2003-09-18  Martin Baulig  <martin@ximian.com>
13004
13005         * class.c (mono_class_init): Don't create `class->methods' if it's
13006         already initialized.
13007
13008         * metadata.c (mono_metadata_load_generic_params): Make this
13009         actually work.
13010
13011         * reflection.c (mono_reflection_define_generic_parameter): Set
13012         parent class and interfaces from the constraints.
13013
13014         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
13015         to keep this struct in sync with the declaration in TypeBuilder.cs.
13016
13017 2003-09-17  Martin Baulig  <martin@ximian.com>
13018
13019         * metadata.h (MonoType): Replaced the data's `int type_param'
13020         field with `MonoGenericParam *generic_param'.
13021         (MonoGenericParam): Added `MonoClass *klass'.
13022
13023         * class.c (mono_class_from_gen_param): Removed the
13024         `MonoImage *image' and `int type_num' arguments.
13025
13026         * metadata.c (mono_metadata_parse_generic_param): New static
13027         method; creates a MonoGenericParam which just contains the index.
13028         (do_mono_metadata_parse_type): Call
13029         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
13030         MONO_TYPE_MVAR.
13031
13032         * reflection.c (mono_image_typedef_or_ref): Generic type
13033         parameters may be in the same assembly, but never use a typedef
13034         for them.
13035         (mono_reflection_define_generic_parameter): We're now creating a
13036         "real" class for the type parameter; it's now safe to call
13037         mono_class_from_mono_type() on the class'es type, it'll do the
13038         right thing.
13039
13040 2003-09-16  Martin Baulig  <martin@ximian.com>
13041
13042         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13043         `symfile->range_entry_size' and `symfile->class_entry_size' here;
13044         the `symfile' data structure must be fully initialized before it
13045         gets added to the table.
13046
13047 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13048
13049         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13050
13051         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13052         class init trampolines.
13053
13054 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13055
13056         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
13057         to the built-in profiler to turn off time and allocation profiling
13058         respectively.
13059
13060 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
13061
13062         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13063         g_direct_equal.
13064
13065         * debug-helpers.c (mono_method_full_name): Print the wrapper type
13066         in human readable form.
13067
13068 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13069
13070         * reflection.c icall.c: Fixed warnings.
13071
13072         * image.c (load_class_names): Use a temporary hash table to hold the
13073         namespaces in order to avoid doing many string comparisons.
13074
13075         * image.h: Fix typo.
13076
13077         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13078         Pass NULL instead of g_direct_equal to the GHashTable constructor 
13079         since the NULL case is short-circuited inside g_hash_table_lookup, 
13080         leading to better performance.  
13081
13082         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13083         obtain the first custom attribute for a given index. Depends on the
13084         CustomAttribute table being sorted by the parent field.
13085
13086         * reflection.c (mono_custom_attrs_from_index): Use the new function 
13087         for better performance.
13088
13089 2003-09-07  Martin Baulig  <martin@ximian.com>
13090
13091         * class.c (mono_class_init): If we're a generic instance, inflate
13092         all our methods instead of loading them from the image.
13093         (mono_class_from_generic): Set `class->methods = gklass->methods'.
13094
13095 2003-09-07  Martin Baulig  <martin@ximian.com>
13096
13097         * mono-debug-debugger.c: Added support for constructors.
13098
13099 2003-09-06  Martin Baulig  <martin@ximian.com>
13100
13101         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13102         New interncall.
13103
13104         * reflection.c (mono_reflection_setup_generic_class): Call
13105         ensure_runtime_vtable() to create the vtable.
13106
13107 2003-09-05  Martin Baulig  <martin@ximian.com>
13108
13109         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13110         MONO_TYPE_MVAR.
13111
13112 2003-09-04  Martin Baulig  <martin@ximian.com>
13113
13114         * reflection.c (mono_reflection_define_generic_parameter): Generic
13115         parameters start with zero.
13116
13117 2003-09-04  Martin Baulig  <martin@ximian.com>
13118
13119         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13120
13121         * reflection.h (MonoReflectionGenericParam): New typedef.
13122         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13123         the generic parameters from the managed TypeBuilder.
13124
13125         * reflection.c (mono_reflection_define_generic_parameter): New function.
13126         (mono_reflection_create_runtime_class): Encode generic parameters.
13127         (mono_reflection_setup_generic_class): New function; this is
13128         called after adding adding all generic params to the TypeBuilder.
13129         (encode_type): Added MONO_TYPE_VAR.
13130
13131 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13132
13133         * class.h class.c (mono_class_needs_cctor_run): Moved this method
13134         here from the JIT.
13135
13136         * assembly.h assembly.c: Moved the AOT loading code into an assembly
13137         load hook.
13138
13139 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
13140
13141         * reflection.h reflection.c class.h class.c: Delete duplicate 
13142         definition of mono_type_get_name () from reflection.c and export the
13143         one in class.c.
13144
13145         * class.c: Class loading fixes from Bernie Solomon 
13146         (bernard@ugsolutions.com).
13147
13148         * reflection.c: Endianness fixes from Bernie Solomon 
13149         (bernard@ugsolutions.com).
13150         
13151 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
13152
13153         * assembly.h assembly.c: Define a file format version for AOT
13154         libraries.
13155         
13156         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13157
13158         * appdomain.h (MonoJitInfo): New field to determine whenever the
13159         code is domain neutral.
13160         
13161 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
13162
13163         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13164
13165 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
13166
13167         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
13168         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13169         Avoid caching the result since strings must be domain specific. Fixes
13170         #48050.
13171
13172 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
13173
13174         * marshal.c (mono_marshal_init): Make this callable multiple times
13175         since it is hard to find a correct place to call it.
13176
13177         * object.c (mono_runtime_class_init): Execute static constructors in
13178         the correct appdomain.
13179
13180         * image.c (build_guid_table): Handle the case when multiple images have
13181         the same GUID.
13182
13183 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13184
13185         * icall.c: added a couple of icalls for System.Web.
13186
13187 2003-08-28  Martin Baulig  <martin@ximian.com>
13188
13189         * icall.c (ves_icall_Type_BindGenericParameters): Use
13190         `klass->generic_inst' instead of `&klass->byval_arg' in the
13191         mono_type_get_object() call.  The returned type must be
13192         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13193
13194 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
13195
13196         * NOTES: New file.
13197
13198         * object.c (mono_class_proxy_vtable): Make it thread safe.
13199
13200         * pedump.c: Fix warning.
13201
13202         * object.c appdomain.h: Get rid of metadata_section. 
13203         It is no longer needed and it was causing deadlocks with domain->lock.
13204
13205         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13206
13207 2003-08-26  Martin Baulig  <martin@ximian.com>
13208
13209         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13210
13211 2003-08-26  Martin Baulig  <martin@ximian.com>
13212
13213         * pedump.c (main): Call mono_metadata_init(),
13214         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13215         and mono_loader_init().
13216
13217 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
13218
13219         * loader.h: Add missing include to fix build.
13220
13221         * image.h: mono_image_load_references is no more.
13222
13223         * assembly.c: Reworked assembly loading to make it really thread safe.
13224         After these changes, the assembly returned by mono_assembly_open is
13225         fully initialized, i.e. all its references assemblies are loaded.
13226
13227         * assembly.c (mono_image_load_references): Renamed to 
13228         mono_assembly_load_references, and made private, since clients no
13229         longer need to call it.
13230
13231         * class.c: Removed calls to mono_assembly_load_references, since it was
13232         a source of deadlocks.
13233
13234         * loader.h loader.c class.h class.c: Protect data structures using a 
13235         new lock, the loader lock.
13236
13237         * class.c (mono_class_setup_vtable): Create temporary hash tables and
13238         GPtrArrays only when needed.
13239
13240         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
13241         into empty structures by mcs. Fixes pinvoke7.cs.
13242         
13243         * domain.c (mono_init): Call a new initialization function.
13244
13245         * appdomain.c (mono_runtime_init): Call the new initializer function
13246         of the marshal module.
13247
13248         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13249         inserted into empty structures by mcs. Fixes pinvoke7.cs.
13250
13251         * marshal.h marshal.c: Added locks around the wrapper caches to make
13252         this module thread safe.
13253
13254         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13255         this argument. Fixes pinvoke1.exe.
13256
13257 2003-08-25  Lluis Sanchez <lluis@ximian.com>
13258
13259         * object.h: Added call_type field to MonoMethodMessage and the corresponding
13260         enumeration of values. Removed fields to store remote call output values in
13261         MonoAsyncResult. Not needed any more.
13262         * object.c: Initialize call_type and async_result fields in mono_message_init.
13263         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13264         dispatching the message.
13265         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13266         async call to finish. To do it use a message with EndInvoke call type.
13267
13268 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
13269
13270         * loader.h loader.c (mono_method_hash_marhal_info): New function which
13271         determines whenever a method has marshalling info.
13272
13273 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13274
13275         * assembly.c: fix the build on windows.
13276
13277 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13278
13279         * object.cs: Fixed bug #47785.
13280
13281 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13282
13283         * string-icalls.c (StringReplace): If their are no occurances of
13284         the old string found return a reference to the supplied
13285         string. This saves some memory and matches MS behavoir.
13286         
13287 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13288
13289         * socket-io.c: fixed compilation for systems that define AF_INET6
13290         and don't define SOL_IP/SOL_IPV6.
13291
13292 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
13293
13294         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13295         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13296
13297         * rawbuffer.c rawbuffer.h: Make this module thread safe.
13298
13299         * domain.c: Make this module thread safe.
13300
13301         * domain.c (mono_init): Call new initialization function.
13302
13303         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13304         reference types too. Fixes #38812.
13305
13306         * image.c (mono_image_init): Fixed warnings.
13307
13308         * class.c (mono_class_from_typeref): Handle assembly load failure
13309         correctly.
13310
13311         * appdomain.c (add_assemblies_to_domain): Handle the case when
13312         the references of an assembly are not yet loaded.
13313
13314         * metadata.c image.c assembly.c: Moved initialization of global
13315         variables to a separate function called at startup since lazy 
13316         initialization of these variables is not thread safe.
13317         
13318         * image.c assembly.c: Made this module thread safe by adding locks in 
13319         the appropriate places.
13320
13321         * domain.c (mono_init): Call the new initialization functions of the
13322         three modules.
13323
13324 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
13325
13326         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13327           make a direct call. It is proxy's work to make the call asynchronous.
13328           mono_delegate_end_invoke(): If the targe is a proxy, just collect
13329           the return values.
13330         * object.cs: mono_method_call_message_new(): read AsyncResult and
13331           state object from parameters list, if this info is requested.
13332         * object.h: Added fields to store remote call output values in
13333           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13334
13335 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13336
13337         * object.h: add needed fields to MonoThread.
13338         * threads.c, threads.h: allow registering a function to cleanup data
13339         allocated per thread by the JIT.
13340
13341 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13342
13343         * loader.h: portability fix by Bernie Solomon
13344         * <bernard@ugsolutions.com>.
13345
13346 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
13347
13348         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
13349         return a MonoArray. This simplifies the code and also ensures that
13350         the cache allways contains an object reference as a value.
13351
13352         * icall.c (ves_icall_get_parameter_info): Simplified using the new
13353         function.
13354
13355 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13356
13357         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13358         fixes a problem with byte ordering when getting the address family for
13359         a socket.
13360
13361 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
13362
13363         * .cvsignore: Added monosn.
13364
13365         * reflection.h reflection.c loader.c: Added support for parameter
13366         marshalling to dynamically created types. Fixes #47295.
13367
13368 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13369
13370         * rand.c: remove useless warnings.
13371
13372 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13373
13374         * class.c: implemented ldtoken for methods and fieldrefs.
13375
13376 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13377
13378         * threadpool.c: when mono_async_invoke was called, no one took care of
13379         monitoring the queue. So if the method invoked took some time and we
13380         got new async invoke requests after 500 ms (the thread created waited
13381         that long in WaitForSingleObject), the new async invoke was not called
13382         until the previous one finished.
13383
13384         This is fixed now. Thanks to Totte for helping with it.
13385
13386 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13387
13388         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13389
13390 2003-08-11  Martin Baulig  <martin@ximian.com>
13391
13392         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13393
13394 2003-08-06  Martin Baulig  <martin@ximian.com>
13395
13396         * mono-debug-debugger.c: Added support for static fields,
13397         properties and methods.
13398
13399 2003-08-06  Martin Baulig  <martin@ximian.com>
13400
13401         * mono-debug-debugger.c: Don't store the MonoString's vtable to
13402         make this work for applications with multiple application domains.
13403
13404 2003-08-04  Martin Baulig  <martin@ximian.com>
13405
13406         * mono-debug-debugger.c: Completely reworked the type support; the
13407         most important thing is that we're now just using one single
13408         `MonoType' instance per type.
13409
13410 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13411
13412         * mono-endian.h, mono-endian.c, icall.c: Added icall
13413         ves_icall_System_Double_AssertEndianity to assert double word endianity
13414         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13415
13416 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13417
13418         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13419         support, icalls and fixes.
13420
13421 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
13422
13423         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13424         classes that are a punctuation character in .NET is not the same a
13425         g_unichar_ispunct.
13426
13427 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13428
13429         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13430
13431 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
13432
13433         * icall.c: Add new MemCopy internalcall.
13434         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13435         Simplified code; It is not necessary to handle all the cases here,
13436         as the C# code takes care of it.  Only handle the case of the name
13437         resource embedded into the assembly.
13438
13439         Changed signature to return the data pointer and the size of the
13440         data. 
13441
13442 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
13443
13444         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13445         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13446
13447 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13448
13449         * socket-io.c: ignore EINTR error in select.
13450
13451 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13452
13453         * class.h, class.c: removed unused subclasses field in MonoClass.
13454
13455 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13456
13457         * icall.c: improve fix of get_base_definition(). If the parent class
13458           doesn't have the mehod, look at the parent of the parent.
13459         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13460           to check if a parameter is an in or out parameter
13461           (PARAM_ATTRIBUTE_IN is not set by default).
13462           mono_method_return_message_restore(): Use mono_class_value_size to
13463           get the size of a value type. mono_type_stack_size (parameterType)
13464           does not return the correct value if parameterType is byRef.
13465           mono_load_remote_field(), mono_load_remote_field_new(),
13466           mono_store_remote_field(), mono_store_remote_field_new():
13467           raise exception if the remote call returns an exception.
13468
13469 2003-07-28  Martin Baulig  <martin@ximian.com>
13470
13471         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13472         method.  This is a wrapper around mono_runtime_invoke() which
13473         boxes the instance object if neccessary.
13474
13475 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13476
13477         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13478         metadata.h, row-indexes.h, verify.c: first cut of generics support.
13479
13480 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13481
13482         * icall.c: disable mcs bug workaround.
13483
13484 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13485
13486         * object.c (mono_runtime_class_init): Take the metadata_section
13487         mutex before obtaining the domain mutex.
13488
13489         * appdomain.h: Added definition of metadata_section mutex here. 
13490
13491         * object.c: define metadata_mutex here.
13492
13493 2003-07-24  Ravi Pratap  <ravi@ximian.com>
13494
13495         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13496         fixed.
13497
13498 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
13499
13500         * reflection.c: Fix bug #46669
13501
13502 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13503
13504         * exception.c:
13505         * exception.h:
13506         * icall.c:
13507         * object.h: fill in the type name for TypeLoadException.
13508
13509 2003-07-23  Ravi Pratap  <ravi@ximian.com>
13510
13511         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13512         relationship between TypeBuilders while compiling corlib) and bug
13513         45993 (Array types returned from the runtime while compiling
13514         corlib were from the loaded corlib).
13515
13516 2003-07-22  Martin Baulig  <martin@ximian.com>
13517
13518         * mono-debug-debugger.c: Reworked the type support a bit more;
13519         distinguish between types and classes.
13520
13521 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13522
13523         * icall.c: add IsArrayImpl icall.
13524
13525 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
13526
13527         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13528         initializing real_size only once. Also fix bug #46602.
13529
13530 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
13531
13532         * object.c: Renamed mono_metadata_section to metadata_section.
13533
13534 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
13535
13536         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13537           empty array if the type is an array. Fixed.
13538           ves_icall_MonoMethod_get_base_definition: if the base method
13539           is abstract, get the MethodInfo from the list of methods of
13540           the class.
13541         * reflection.c: ParameterInfo.PositionImpl should be zero-based
13542           and it was 1-based. Fixed in mono_param_get_objects.
13543
13544 2003-07-20  Martin Baulig  <martin@ximian.com>
13545
13546         * mono-debug.h: Set version number to 31.
13547         (mono_debug_init): Added `MonoDomain *' argument.
13548
13549         * mono-debug-debugger.c: Reworked the type support; explicitly
13550         tell the debugger about builtin types; pass the `klass' address to
13551         the debugger.
13552
13553 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13554
13555         * image.c: Allow new metadata tables to be loaded without a
13556         warning. Also update the warning message to give the new constant value.
13557                 
13558 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13559
13560         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13561         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
13562         array type representation changes.
13563
13564 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13565
13566         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13567         on Environment.Exit () call.
13568
13569 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13570
13571         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13572         requires a matching corlib.
13573
13574 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13575
13576         * Changelog: My editor decided to add a CR to each line. Sorry about that.
13577           Committed again without the CRs.
13578         
13579 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13580
13581         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13582           getting it from the "this" socket instance. Did not work
13583           if the socket is a subclass of Socket.
13584           Also fixed bug #35371.
13585
13586 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13587
13588         * metadata.c: fixed size for TypedByRef.
13589         * loader.c: when searching for a method, consider the vararg amrker.
13590         * unicode.c, decimal.c: constify some arrays.
13591
13592 2003-07-15  Dick Porter  <dick@ximian.com>
13593
13594         * socket-io.c: Fixed compilation for gcc < 3.2.
13595
13596         Fixed compilation for machines that don't have AF_INET6 (thanks to
13597         Bernie Solomon <bernard@ugsolutions.com> for that part.)
13598
13599         Fixed compile warnings.
13600         
13601         Fixed formatting and line endings.
13602
13603 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
13604
13605         * socket-io.h:
13606         * socket-io.c: Added IPv6 support.
13607
13608 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
13609
13610         * class.c (mono_class_is_assignable_from): New function to implement
13611         the is_assignable_from logic. Used by mono_object_isinst, 
13612         Type::IsAssignableFrom () and the interpreter.
13613
13614         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13615         Object, even interfaces.
13616         
13617         * object.c (mono_object_isinst): Implement in terms of 
13618         is_assignable_from.
13619
13620         * icall.c (ves_icall_type_is_assignable_from): New icall.
13621
13622 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
13623
13624         * domain.c (foreach_domain): fix compiler warning.
13625
13626 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
13627
13628         * image.c (load_metadata_ptrs): use g_strndup because strndup is
13629         not available on all plattforms
13630
13631 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
13632
13633         * image.h image.c: Store the metadata version string in MonoImage.
13634         * icall.c: New icall to retrieve the image version.
13635         * reflection.c (create_dynamic_image): Fill in the image version field
13636         * reflection.c (build_compressed_metadata): Use the image version
13637         from the image structure.
13638
13639 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13640
13641         * appdomain.c: modified comment.
13642         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13643         That will be its last iteration when mono_gc_cleanup is called from
13644         mono_runtime_cleanup and before the domain is unloaded.
13645
13646         Fixes bug #45962.
13647
13648 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
13649
13650         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13651         attributes.
13652
13653 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13654
13655         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13656         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13657         Bernie Solomon <bernard@ugsolutions.com>.
13658
13659 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13660
13661         * object.c, object.h: provide mono_object_new_fast() for faster
13662         allocation in some special cases.
13663
13664 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13665
13666         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13667         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13668
13669 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13670
13671         * threadpool.c: fix leaks.
13672
13673 2003-07-01  Dick Porter  <dick@ximian.com>
13674
13675         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13676         using MonoGHashTables.  Fixes threadpool bug posted to list.
13677
13678 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13679
13680         * image.h, image.c: added support to load an assembly from a byte array.
13681         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
13682         assembly bundle support.
13683
13684 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
13685
13686         * threadpool.c (mono_thread_pool_add): keep a reference to the
13687         AsyncResult to prevent GC
13688
13689 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13690
13691         * class.c: leak fix.
13692
13693 2003-06-25  Dick Porter  <dick@ximian.com>
13694
13695         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13696         for the async object, the WaitHandle object will close the handle.
13697         Fixes bug 45321.
13698
13699 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13700
13701         * class.c: in mono_array_class_get (), lookup from the hash with the
13702         same type we insert: this works around a bug in
13703         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13704         lluis. The real fix will have to wait for after the release.
13705
13706 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13707
13708         * icall.c: fix memory leak when getting type members.
13709
13710 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13711
13712         * reflection.c: added more pubtoken special cases.
13713
13714 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13715
13716         * class.c: handle field offset correctly when class size
13717         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13718
13719 2003-06-20  Martin Baulig  <martin@ximian.com>
13720
13721         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13722         *image' field.
13723
13724 2003-06-20  Martin Baulig  <martin@ximian.com>
13725
13726         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13727
13728 2003-06-20  Martin Baulig  <martin@ximian.com>
13729
13730         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
13731         just distinguish between variables in registers and variables at
13732         an offset relative to a register.
13733
13734 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13735
13736         * icall.c: #ifdef out latest changes until mcs is fixed.
13737
13738 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13739
13740         * icall.c: return members in metadata order.
13741
13742 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13743
13744         * icall.c: avoid infinite loop in GetTimeZoneData.
13745
13746 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13747
13748         * icall.c: added Marshal.Prelink/All icalls.
13749
13750 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13751
13752         * object.c, object.h: fix warnings and do some overflow checking
13753         when creating arrays.
13754
13755 2003-06-17  Dick Porter  <dick@ximian.com>
13756
13757         * file-io.h:
13758         * file-io.c: File attributes need to be tweaked slightly when
13759         passed from the managed to the w32 world.
13760
13761 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13762         * profiler.h profiler-private.h profiler.c: Rework last patch
13763         based on suggestion by Paolo.
13764         
13765 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13766
13767         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
13768         instruction level coverage data collection.
13769         * profiler.h profiler.c (: Added new callback function which can be
13770         used by the profiler to limit which functions should have coverage
13771         instrumentation.
13772         * profiler.c (mono_profiler_load): Call g_module_build_path to
13773         generate the file name of the profiler library.
13774
13775 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13776
13777         * profiler.c, profiler.h, profiler-private.h: added basic block 
13778         coverage profiling API.
13779
13780 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
13781
13782         * reflection.c (mono_reflection_create_runtime_class): Add support
13783         for events in dynamically generated code.
13784
13785         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13786         not allocated.
13787
13788 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13789
13790         * icall.c: when getting timezone info, return reasonable values if we
13791         can't get the actual data.
13792
13793 2003-06-14  Dick Porter  <dick@ximian.com>
13794
13795         * threads.c (start_wrapper): Remove the reference to the thread
13796         object in the TLS data, so the thread object can be finalized.
13797         This won't be reached if the thread threw an uncaught exception,
13798         so those thread handles will stay referenced :-( (This is due to
13799         missing support for scanning thread-specific data in the Boehm GC
13800         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13801
13802 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13803
13804         * reflection.c: ensure streams and tables are first allocated with
13805         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13806
13807 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13808
13809         * icall.c: fixed GetElementType for byrefs (bug# 44792).
13810
13811 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
13812
13813         * reflection.c (mono_reflection_create_runtime_class): Add support for
13814         properties to dynamically created classes.
13815         * reflection.c: Fix a few places where non-MonoObjects were inserted
13816         into the tokens hashtable.
13817
13818 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13819
13820         * object.c: some support to handle out of memory exceptions.
13821
13822 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
13823
13824         * marshal.c (mono_marshal_get_native_wrapper): support reference
13825         return types
13826
13827 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13828
13829         * object.h, object.c: more portability stuff from Bernie Solomon.
13830         Unexport mono_object_allocate(). Added mono_object_unbox ().
13831         Set exitcode when an unhandled exception is thrown.
13832
13833 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
13834
13835         * marshal.c (mono_marshal_get_native_wrapper): use custom
13836         marshaler for return types.
13837
13838 2003-06-10  Dick Porter  <dick@ximian.com>
13839
13840         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13841         ip_mreq is available
13842
13843 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13844
13845         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13846         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13847         by Bernie Solomon <bernard@ugsolutions.com>.
13848
13849 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
13850
13851         * gc.c (mono_gc_init): Avoid error message on shutdown when
13852         GC_DONT_GC=1 is used.
13853
13854         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
13855         New icall to return the GUID of a module.
13856
13857 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13858
13859         * class.c: ensure instance size always includes the parent's size
13860         even whem class size is set explicitly (fixes bug#44294).
13861
13862 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13863
13864         * profiler.h, profiler.c: made the simple profiler thread-safe,
13865         get more accurate timing info. Allow the loading of an
13866         externally-developed profiler module.
13867
13868 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
13869
13870         * marshal.c (mono_marshal_get_native_wrapper): improved
13871         class/byref arguments.
13872         (mono_marshal_get_native_wrapper): better string marshaling support.
13873
13874 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13875
13876         * class.c: ensure .pack and .size are handled correctly and
13877         simplified layout of static fields.
13878
13879 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13880
13881         * appdomain.c
13882         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13883
13884         * loader.c (mono_lookup_pinvoke_call): look for modules in the
13885         current directory (fix bug 44008)
13886
13887 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
13888
13889         * marshal.c (mono_marshal_get_native_wrapper): started support for
13890         custom marshalers.
13891         (mono_delegate_to_ftnptr): consider marshalling specifications
13892
13893 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13894
13895         * reflection.c, reflection.h: emit custom marshal info.
13896
13897 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13898
13899         * object.c: free the GError.
13900         * icall.c: added CloseEvent_internal.
13901         * threads.[ch]:
13902         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13903         call.
13904
13905 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
13906
13907         * loader.c (mono_method_get_signature): Add support for dynamic
13908         assemblies.
13909
13910 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13911
13912         * reflection.c: fixed bug #43905.
13913
13914 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13915
13916         * class.c, domain.c, icall.c, metadata.h, object.h: support for
13917         handling TypedReference and ArgIterator.
13918         * loader.c, loader.h: added function to get signature at call site.
13919
13920 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13921
13922         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
13923         data readonly. Buglets and warning fixes. Some MethodSpec support.
13924
13925 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13926
13927         * class.h, class.c, object.c: remove relative numbering support.
13928
13929 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
13930
13931         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13932         free the string, until we get a chance to fix Gtk#
13933
13934 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13935
13936         * marshal.c: revert last patch.
13937
13938 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13939
13940         * icall.c: updates for new mono_class_vtable() not calling
13941         the type constructor anymore.
13942
13943 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13944
13945         * object.h, object.c: separate vtable creation from type
13946         initialization. Make running the .cctor thread safe.
13947
13948 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13949
13950         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13951
13952 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13953
13954         * loader.c (mono_get_method): consider calling convention
13955
13956 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
13957
13958         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13959         to return the invisible global type for a module.
13960
13961         * reflection.c (mono_image_build_metadata): Emit global fields too.
13962
13963 2003-05-20  Peter Williams  <peterw@ximian.com>
13964
13965         * loader.c (mono_lookup_internal_call): Add a few newlines.
13966
13967 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
13968
13969         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13970         literal strings.
13971
13972         * appdomain.c (set_domain_search_path): Recalculate search path when
13973         AppDomainSetup.PrivateBinPath changes.
13974
13975         * object.c (mono_class_compute_gc_descriptor): It turns out some
13976         parts of the class libs (like System.Thread) holds pointers to
13977         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13978         to treat native int a pointer type here.
13979         
13980 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13981
13982         * appdomain.h, domain.c: add hashtable for jump target resolution.
13983
13984 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
13985
13986         * reflection.h reflection.c icall.c: Added new icalls 
13987         GetManifestResourceInfoInternal, GetModulesInternal and support
13988         infrastructure.
13989
13990 2003-05-16  Dick Porter  <dick@ximian.com>
13991
13992         * icall.c:
13993         * file-io.h:
13994         * file-io.c: Implement System.IO.MonoIO::GetTempPath
13995
13996 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
13997
13998         * object.c: mono_store_remote_field: little fix to previous patch.
13999
14000 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14001
14002         * class.c: add constructors to array classes.
14003         * icall.c: special case array construction for InternalInvoke (),
14004
14005 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
14006
14007         * class.h class.c reflection.c object.c: Added support for field
14008         defaults in dynamically generated classes.
14009
14010 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14011
14012         * reflection.c: properly encode charset for ddlimport.
14013
14014 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14015
14016         * threads.c: allow compiling without GC.
14017
14018 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14019
14020         * appdomain.h, object.c, object.h, threads.c, threads.h: added
14021         handling of thread static data.
14022
14023 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14024
14025         * reflection.h, reflection.c: added mono_custom_attrs_free ().
14026
14027 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
14028
14029         * class.c (mono_array_class_get): always set the serializable flags
14030         (mono_array_class_get): always set the SEALED attribute for array types
14031
14032 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
14033
14034         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
14035         attributes (fix for bug 42021).
14036
14037 2003-05-12  Dick Porter  <dick@ximian.com>
14038
14039         * gc.c: Don't run finalizers when the finalizer thread is
14040         finishing up, because the default domain has already been
14041         destroyed.
14042
14043 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
14044
14045         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14046         value is null, we should throw an exception.   This is slightly
14047         different than the other conventions used for the constructor.
14048
14049 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14050
14051         * socket-io.c: fixed windows build.
14052
14053 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14054
14055         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14056
14057 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
14058
14059         * object.c (mono_string_new_wrapper): Compatibility fix for MS
14060         compilers.
14061
14062 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
14063
14064         * class.c (mono_class_layout_fields): Add experimental GC aware
14065         auto layout facility. Requires class library changes to work correctly.
14066
14067         (mono_class_setup_vtable): Avoid overriding explicit interface
14068         method implementations. Fixes iface3.exe test.
14069
14070         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14071         object reference.
14072         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14073         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14074
14075         * metadata.h: Add new type classification macro which determines
14076         whenever the type holds an object reference.
14077
14078 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14079
14080         * marshal.c (mono_marshal_get_native_wrapper): cleanups
14081
14082 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
14083
14084         * gc.c (finalizer_thread): Work around a GC bug.
14085
14086 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
14087
14088         * marshal.c (emit_struct_conv): allow unions
14089
14090         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14091
14092 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
14093
14094         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14095
14096 2003-05-06  Martin Baulig  <martin@ximian.com>
14097
14098         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14099
14100 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14101
14102         * socket-io.c:
14103         (Select_internal): allow NULLs, don't create arrays if not needed.
14104         Coupled with Socket.cs changes.
14105
14106         * threadpool.c:
14107         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14108         register a finalizer for it that will close the semaphore handle. This
14109         fixes the leak and make Lupus' test run with > 4080 loops.
14110
14111 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14112
14113         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14114         Jerome Laban (bug #42287)
14115
14116 2003-05-02  Martin Baulig  <martin@ximian.com>
14117
14118         * debug-mono-symfile.h
14119         (MonoSymbolFile): Moved declaration into mono-debug.h.
14120         (MonoDebugMethodJitInfo): Likewise.
14121         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14122         argument.
14123         (_mono_debug_address_from_il_offset): Take a
14124         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14125
14126         * mono-debug.h
14127         (MonoDebugDomainData): New struct.
14128         (mono_debug_get_domain_data): New function.
14129         (mono_debug_add_method): Take an additional `MonoDomain *'
14130         argument.
14131         (mono_debug_source_location_from_address): Likewise.
14132         (mono_debug_il_offset_from_address): Likewise.
14133         (mono_debug_address_from_il_offset): Likewise.
14134
14135 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14136
14137         * reflection.c: one more check for null type in custom attrs.
14138
14139 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14140
14141         * reflection.c: avoid warning (comparison is always false due to limited
14142         range of data type).
14143
14144 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14145
14146         * icall.c: throw an exception in Type.GetField if the argument 'name'
14147         is NULL.
14148
14149 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14150
14151         * reflection.c: fixed handling of enums in named arguments to custom
14152         attributes (bug #42123).
14153
14154 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14155
14156         * reflection.c: use the right array element type and handle
14157         a null for a Type argument, too.
14158
14159 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14160
14161         * reflection.c: handle arrays as arguments to custom attributes.
14162
14163 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14164
14165         * reflection.c: handle a string value in a custom attr
14166         ctor that takes an object.
14167
14168 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14169
14170         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14171         (fix bug #42063)
14172
14173 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14174
14175         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14176
14177 2003-04-27  Martin Baulig  <martin@ximian.com>
14178
14179         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14180         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14181         MONO_DEBUGGER_EVENT_BREAKPOINT.
14182         (mono_breakpoint_trampoline_code): Removed.
14183         (mono_debugger_event_handler): The last argument is now a
14184         `guint32'.
14185         (mono_debugger_insert_breakpoint_full): Removed the
14186         `use_trampoline' argument.
14187         (mono_debugger_method_has_breakpoint): Likewise.
14188         (mono_debugger_trampoline_breakpoint_callback): Renamed to
14189         mono_debugger_breakpoint_callback(); take the method and
14190         breakpoint number as arguments.
14191
14192 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14193
14194         * metadata.c: fix off by one when loading parameters attributes.
14195
14196 2003-04-24  Martin Baulig  <martin@ximian.com>
14197
14198         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14199
14200 2003-04-24  Martin Baulig  <martin@ximian.com>
14201
14202         * mono-debug-debugger.c: Moved all code which interacts with the
14203         Mono Debugger here.
14204
14205         * debug-mono-symfile.c: This code now just deals with the symbol
14206         file itself, the debugger code is now in mono-debug-debugger.c.
14207
14208 2003-04-23  Martin Baulig  <martin@ximian.com>
14209
14210         * mono-debug.c (mono_debug_source_location_from_il_offset):
14211         New method; like mono_debug_source_location_from_address(), but
14212         takes an IL offset instead of a machine address.
14213
14214 2003-04-23  Martin Baulig  <martin@ximian.com>
14215
14216         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14217         `line' field; this is now computed by the debugger.
14218
14219 2003-04-23  Martin Baulig  <martin@ximian.com>
14220
14221         * mono-debug.[ch]: New files.  This is the new debugging interface.
14222
14223         * mono-debug-debugger.[ch]: New files.  Moved all code which
14224         interacts with the Mono Debugger here.
14225
14226 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14227
14228         * domain.c (mono_init): initialize mono_defaults.monitor_class
14229
14230 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
14231
14232         * reflection.c (method_encode_code): Add a spicy exception to help
14233         future compiler authors.
14234
14235 2003-04-21  Martin Baulig  <martin@ximian.com>
14236
14237         * icall.c
14238         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14239         Make this work with relative pathnames; g_filename_to_uri() needs
14240         an absolute filename.
14241
14242 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
14243
14244         * icall.c: Track name changes in Object and ValueType.
14245
14246 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
14247
14248         * metadata.c (mono_type_stack_size): size should be a multiple of
14249         sizeof (gpointer)
14250
14251 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14252
14253         * gc.c:
14254         (internal_domain_finalize): moved into mono_domain_finalize. No need
14255         to create another thread because the finalizers will be run in the
14256         finalizer thread.
14257         
14258         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14259         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14260         to be run (MS does this too).
14261
14262 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14263
14264         * object.c (mono_class_compute_gc_descriptor): Update comment.
14265
14266         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14267
14268         * image.h: Add synchronized wrapper cache.
14269
14270         * image.c (do_mono_image_open): Initialize cache.
14271
14272         * reflection.c (create_dynamic_mono_image): Initialize cache.
14273
14274 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14275
14276         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14277         ves_icall_System_Buffer_ByteLengthInternal.
14278
14279 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14280
14281         * reflection.c: setup klass->nested_in earlier. Allow
14282         a dash in the assembly name.
14283
14284 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
14285
14286         * metadata.c (mono_type_to_unmanaged): dont access
14287         type->data.klass for MONO_TYPE_OBJECT
14288         (mono_type_to_unmanaged): consider System.Delegate class
14289
14290 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14291
14292         * class.c: just setup supertypes in the proper place instead of
14293         initializing the full element class for arrays.
14294
14295 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14296
14297         * class.c: ensure the element class of arrays is initialized.
14298         Setup the supertype info for array classes, too.
14299
14300 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
14301
14302         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14303
14304 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14305
14306         * Makefile.am: re-added -m option when running cygpath. This way,
14307         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14308         separator.
14309         * mono-config.c: same codepath for locating mono config file for WIN32
14310         and the rest.
14311         * assembly.c: if mono_assembly_setrootdir is called, don't override
14312         the value set.
14313
14314 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14315
14316         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14317         MONO_ASSEMBLIES variable.
14318
14319 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14320
14321         * icall.c: added Assembly::GetNamespaces() icall.
14322
14323 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14324
14325         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14326
14327 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
14328
14329         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14330         * object.c: fixed bug in the construction of vtable for proxies
14331
14332 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14333
14334         * object.c (mono_array_new): Mark mono_array_new as an icall.
14335
14336 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14337
14338         * class.c: fixed test for public method when overriding interfaces.
14339         Closes bug #40970.
14340
14341 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14342
14343         * appdomain.h, domain.c: added mono_domain_foreach() to
14344         be able to access the currently loaded appdomains.
14345         * object.c: make string interning work across sppdomains.
14346         Mark some functions for use as icalls.
14347
14348 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14349
14350         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14351
14352         * reflection.h reflection.c: Allocate long living data using 
14353         GC_MALLOC_ATOMIC so the collector does not need to scan it.
14354
14355         * reflection.c: Double the allocation size in streams instead of
14356         increasing it, to prevent unneccesary copying on large assemblies.
14357         
14358         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14359         creation if the assembly does not have the Run flag set.
14360
14361 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14362
14363         * class.h: avoid the C++ keywords in header files (Jerome Laban
14364         spotted and fixed this).
14365
14366 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14367
14368         * object.c:
14369         (mono_unhandled_exception): fill in the arguments for the
14370         UnhandledException event. Only trigger that event for the default
14371         domain (as MS does).
14372
14373 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
14374
14375         * object.c: Improve typed allocation stuff based on suggestions from
14376         Paolo. Also turn it on if the GC library supports it.
14377
14378 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14379
14380         * object.c object.h class.h: Added experimental typed allocation
14381         facility using the interfaces in gc_gcj.h.
14382
14383         * os/gc_wrapper.h: Added new include files.
14384         
14385 2003-04-03  Martin Baulig  <martin@ximian.com>
14386
14387         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14388         which is not yet enabled by default.
14389
14390         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14391         functions.
14392         (mono_gc_lock, mono_gc_unlock): New static functions.
14393
14394         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14395         functions; stop/start the world for the garbage collector.  This
14396         is using the windows API; we need to complete the SuspendThread()/
14397         ResumeThread() implementation in the io-layer to make this work on Unix.
14398         (mono_gc_push_all_stacks): New public function; tells the garbage
14399         collector about the stack pointers from all managed threads.
14400
14401 2003-04-03  Martin Baulig  <martin@ximian.com>
14402
14403         * object.h (MonoThread): Added `gpointer stack_ptr'.
14404
14405         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14406
14407 2003-04-03  Martin Baulig  <martin@ximian.com>
14408
14409         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14410
14411 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14412
14413         * reflection.c (typebuilder_setup_fields): Initialize field.first and
14414         field.last.
14415
14416 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
14417
14418         * loader.c (mono_lookup_internal_call): Report the corlib that is
14419         out of sync.
14420
14421 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
14422
14423         * icall.c (ves_icall_type_GetTypeCode): fixed check for
14424         System.DBNull (it's class not valuetype).
14425
14426 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14427
14428         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
14429         if the array method was already assigned a token (fixes bug#40646).
14430
14431 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
14432
14433         * reflection.c (mono_reflection_get_type): Attempt type resolve even
14434         if no assembly is given.
14435
14436 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
14437
14438         * metadata.h: Added the new tables.
14439
14440         * row-indexes.h: Added definitions for new tables.
14441
14442         * metadata.c: Add schemas for new tables, and add support for
14443         computing the sizes of them.
14444
14445         * class.c: Update for handling the new type cases.
14446
14447 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
14448
14449         * metadata.h (MONO_TYPE_IS_VOID): new macro
14450
14451 2003-03-31  Martin Baulig  <martin@ximian.com>
14452
14453         * threads.h (MonoThreadCallbacks): Added `thread_created'.
14454
14455         * threads.c (mono_thread_new_init): Call `thread_created' in the
14456         mono_thread_callbacks.
14457
14458 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
14459
14460         * loader.h: added marshalbyrefobject_class to mono_defaults
14461         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
14462         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14463           generation of output parameters.
14464           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14465         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14466           contextbound and the target object belongs to the context of the caller.
14467         * object.h: added context and unwrapped_server variables in MonoRealProxy.
14468         * object.c: Implemented support for interfaces and abstract classes
14469           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14470           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14471
14472 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
14473
14474         * class.h class.c (mono_class_is_subclass_of): New function.
14475         
14476         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14477         routines for most common case (calls from ArrayList::ToArray).
14478
14479         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
14480         routine so programs which call Environment::Exit() can be profiled.
14481
14482         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
14483         Added MONO_ARCH_SAVE_REGS.
14484
14485         * icall.c (ves_icall_type_is_subtype_of): Use new function.
14486
14487 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
14488
14489         * blob.h: Add a couple of new MonoType types definitions.
14490
14491         * tabledefs.h: Add a couple of new call convs.
14492
14493 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
14494
14495         * reflection.h (MonoReflectionDynamicAssembly): track changes in
14496         the layout of the class.
14497
14498         * reflection.c (alloc_table): double the size on overflow to avoid
14499         unnecessary copying.
14500
14501         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14502         avoid filling out metadata tables and blobs. Also set mb->ilgen to
14503         null so it can be garbage collected.
14504         
14505 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
14506
14507         * reflection.c (mono_reflection_get_type): Return the resolved type
14508         only if it is in the assembly we searched.
14509
14510         * reflection.c (ensure_runtime_vtable): Initialize method slots.
14511
14512         * class.c (mono_class_setup_vtable): Set the slot of the overriding
14513         method.
14514
14515 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14516
14517         * appdomain.c:
14518         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14519         the right one is 'file:///blah', but MS allows it.
14520         * assembly.c:
14521         (mono_assembly_open): allow 'file://blah'
14522
14523         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14524
14525 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
14526
14527         * socket-io.c: fixes bug #40310.
14528
14529 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
14530
14531         * reflection.c (mono_reflection_parse_type): handle deeply nested
14532         types correctly.
14533
14534         * reflection.c (mono_image_create_token): Use unique token values
14535         since they will be put into a hash table.
14536
14537         * class.c (mono_class_setup_vtable): If a method occurs in more than
14538         one place in the vtable, and it gets overriden, then change the
14539         other occurances too.
14540
14541         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14542         object as return type.
14543
14544 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14545
14546         * icall.c: Deleted "ToString" implementation for double and float
14547         because they are full implemented in managed code.
14548
14549 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14550
14551         * reflection.c, reflection.h: implemented and exported functions
14552         to retrieve info about custom attributes.
14553
14554 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14555
14556         * appdomain.c: moved Uri handling to assembly.c
14557         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14558         work when using a file Uri in *nix and windows.
14559
14560         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14561         GetReferencedAssemblies.
14562
14563 2003-03-18  Dick Porter  <dick@ximian.com>
14564
14565         * icall.c: Rename a couple of internal calls
14566
14567         * threads.c: Set the thread state to Stopped when a thread exits.
14568         Fixes bug 39377.
14569
14570 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
14571
14572         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14573         New icall.
14574
14575         * object.c (mono_class_vtable): fix warning.
14576
14577 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
14578
14579         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14580
14581         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14582         memory.
14583         (method_encode_clauses): Create exception info structures in the right
14584         order.
14585         (mono_reflection_setup_internal_class): Initialize supertypes field.
14586
14587         * class.c object.c: Handle interfaces which implement other interfaces 
14588         correctly.
14589
14590         * class.h class.c: Move the supertypes array initialization code into 
14591         a separate function so it can be used for dynamic types too. Also call
14592         it earlier, in mono_class_init(), since it can be used before the
14593         type is initialized.
14594
14595 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14596
14597         * Makefile.am:
14598         * assembly.c:
14599         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14600
14601         * appdomain.c:
14602         * appdomain.h:
14603         * marshal.c:
14604         * object.c: remove warnings.
14605
14606 2003-03-13  Martin Baulig  <martin@ximian.com>
14607
14608         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14609         (MonoDebugLexicalBlockEntry): New types.
14610
14611         * debug-mono-symfile.c
14612         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14613
14614 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14615
14616         * process.c: ret can be any non-zero value accroding to MS doc.
14617
14618 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
14619
14620         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
14621         fixing a warning for a miss-used prototype, would have cause
14622         random memory corruption.
14623
14624 2003-03-07  Martin Baulig  <martin@ximian.com>
14625
14626         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14627         getting really annoying ....
14628
14629 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
14630
14631         * reflection.c (fixup_method): added support for array methods.
14632
14633 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14634
14635         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
14636         (pointed out by Michael Adams).
14637
14638 2003-03-04  Dick Porter  <dick@ximian.com>
14639
14640         * icall.c: Temporarily reverted the Double and Single ToString()
14641         change, because it broke nunit.
14642
14643 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14644
14645         * object.h, threads.h: make include files compatible with C++
14646         (patch by Jerome Laban <jlaban@wanadoo.fr>).
14647
14648 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14649
14650         * icall.c: Erased ToString helper functions for Double and Single.
14651         Now, that implementations ar all in managed code (Double and Single
14652         Formatters).
14653
14654 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
14655
14656         * appdomain.c: Added method for initializing the default context of
14657         a domain. Added internal call for getting the default context.
14658         * appdomain.h: Added context variable in MonoDomain struct.
14659         * domain.c: mono_domain_set also sets the default context of the domain
14660         * icall.c: Mapped internal method InternalGetDefaultContext.
14661         * object.c: mono_object_get_virtual_method returns always a remoting
14662         wrapper if the object is a transparent proxy.
14663         mono_runtime_invoke_array: when creating an object by calling the
14664         constructor, if the created object is a proxy, then the constructor should
14665         be called using the a remoting wrapper.
14666
14667 2003-03-03  Dick Porter  <dick@ximian.com>
14668
14669         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14670         variable so it compiles on solaris.  Problem spotted by
14671         Christopher Taylor <ct@cs.clemson.edu>
14672
14673 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14674
14675         * appdomain.c:
14676         (get_info_from_assembly_name): don't leak value.
14677
14678         * icall.c:
14679         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14680         result.
14681
14682 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14683
14684         * assembly.c: export mono_image_load_references ().
14685         * class.c: handle function pointers. mono_class_from_name() now
14686         supports nested type names directly.
14687
14688 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
14689
14690         * reflection.h reflection.c: Encode already created dynamic methods 
14691         and fields correctly as a DEF instead of a REF.
14692
14693         * reflection.c: Get rid of the force_ref argument to 
14694         mono_image_typedef_or_ref since it was wrong in the first place.
14695
14696         * string-icalls.c: add error checking to string constructors according
14697         to the MSDN docs.
14698
14699         * reflection.c: Emit types in the order their TypeBuilders were 
14700         created. Previously, a new table index was assigned to each type before
14701         the tables were emitted. This was wrong because the signature blob
14702         might already refer to a type by its original table index.
14703
14704 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
14705
14706         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14707         change.
14708         
14709 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14710
14711         * Makefile.am: make assemblies dir have \ instead of / on windows.
14712
14713 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
14714
14715         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14716         iterate over the NESTEDCLASS table using a linear search since the
14717         table is not guaranteed to be sorted by the secondary key.
14718
14719         * class.c (mono_class_create_from_typedef): fixed up call to
14720         mono_metadata_nesting_typedef.
14721         
14722 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
14723
14724         * marshal.c (mono_string_to_byvalstr): clear the memory as
14725         suggested by Jerome Laban <jlaban@wanadoo.fr>
14726
14727 2003-02-26  Dick Porter  <dick@ximian.com>
14728
14729         * process.c: Cope with padding in .rsrc blocks
14730
14731 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14732
14733         * metadata.h: reverted the filter_len change, it breaks reflection
14734         
14735 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14736
14737         * metadata.h: added a new field to store the filter_len
14738         
14739
14740 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14741
14742         * reflection.c: handle custom attributes for types and members
14743         created with Reflection.Emit (bug#38422).
14744
14745 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
14746
14747         * reflection.c: define RTSpecialName automatically for constructors for
14748         compatibility with MS.NET.
14749
14750         * reflection.c (mono_reflection_create_runtime_class): initialize
14751         nested_in field of dynamically created classes.
14752
14753 2003-02-22  Martin Baulig  <martin@ximian.com>
14754
14755         * debug-mono-symfile.h: Incremented version number.
14756
14757 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14758
14759         * object.h icall.c process.c: fix warnings.
14760
14761 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14762
14763         * appdomain.h appdomain.c:
14764         (mono_domain_try_type_resolve): split the 
14765         name_or_tb argument into a name and a tb argument.
14766         (mono_domain_has_type_resolve): new function to check whenever the
14767         application has registered a TypeResolve event handler.
14768         
14769         * icall.c reflection.h reflection.c: move the type resolve logic into
14770         mono_reflection_get_type () so it will be invoked when 
14771         Assembly::GetType () is called.
14772
14773         * reflection.c:
14774         (mono_reflection_get_type): renamed to get_type_internal.
14775         (mono_reflection_get_type): fixed type name generation so it works 
14776         for nested types too.
14777         (mono_reflection_get_type): call has_type_resolve () to avoid the 
14778         costly type name generation if there is no resolve event handler.
14779
14780 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14781
14782         * class.c, image.c: load exported types from file references.
14783
14784 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
14785
14786         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14787           used to cache the managed methods used to create proxies and make 
14788           remote invocation of methods.
14789         * class.h: Added in MonoVTable a flag to indicate that a class needs 
14790           to be remotely created.
14791         * object.c: Modified the method mono_class_vtable(). It now initializes 
14792           the remote flag of the vtable. Modified mono_object_new_specific(), 
14793           so now it checks the remote flag.
14794         * icall.c: Added a couple of internal methods, one for enabling instance 
14795           creation interception for a type, and one for creating objects bypassing
14796           the remote check.
14797
14798 2003-02-18  Martin Baulig  <martin@ximian.com>
14799
14800         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14801         New interncall to get a method's metadata token.
14802
14803         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14804         New interncall for the debugger.
14805
14806 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
14807
14808         * class.c (mono_class_setup_vtable): allocate supertype array
14809
14810 2003-02-18  Martin Baulig  <martin@ximian.com>
14811
14812         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14813
14814 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14815
14816         * reflection.c:
14817         (assembly_name_to_aname): jump over unknown properties (i've found
14818         something like: 'type, assembly, version=xxx, custom=null, public...',
14819         so now will ignore custom=null and still get the rest of the values).
14820
14821 2003-02-17  Dick Porter  <dick@ximian.com>
14822
14823         * threads.c: Have Thread.Start() wait for a semaphore to signal
14824         that the thread has set up all its local data.  This fixes bug
14825         34323, where Abort() raced the new thread's TLS data.
14826
14827         Also removes the handle_store() call from start_wrapper, because
14828         threads are now always created suspended and there is no longer a
14829         race between the parent and child threads to store the info.
14830
14831 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14832
14833         * image.c: explain the #- heap issue in a message, hopefully
14834         avoiding FAQs on mono-list.
14835
14836 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14837
14838         * icall.c:
14839         (GetEntryAssembly): if the domain has not invoked
14840         AppDomain.ExecuteAssembly yet, return the assembly of the default
14841         AppDomain.
14842
14843 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
14844
14845         * class.c (mono_ldtoken): make it work in dynamic assemblies.
14846
14847 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14848
14849         * metadata.c, reflection.c: simple speedup to type hash
14850         and equals code.
14851
14852 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14853
14854         * image.c, image.h, class.c, assembly.c: move module loading
14855         to MonoImage. When loading metadata, consider alignemnet from
14856         the start of metadata, not from the metadata address in memory.
14857
14858 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
14859
14860         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
14861         AssemblyBuilder objects. Factored out custom attribute creation into
14862         a separate function.
14863         (create_custom_attr): new function to create custom attributes.
14864
14865 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
14866
14867         * Makefile.am: Got tired of typing the full pathname to pedump.
14868         Until there is another option, am installing this.
14869
14870 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
14871
14872         * class.c (class_compute_field_layout): always set field->parent 
14873         (mono_ldtoken): use mono_defaults.fieldhandle_class;
14874
14875 2003-02-11  Dick Porter  <dick@ximian.com>
14876
14877         * threads-types.h:
14878         * monitor.c: Rewrote Monitor, making lock much faster and
14879         Pulse/Wait work as specified.  Also uses much fewer handles, and only
14880         creates them as needed.
14881
14882         * exception.c: Added SynchronizationLockException
14883
14884         * threads.c: Deleted old Monitor implementation.  The new one is
14885         in a new file.
14886
14887 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14888
14889         * class.c: handled TypedReference type code. Set the correct size for
14890         class data. Setup interface_offsets for interface classes, too.
14891
14892 2003-02-09  Martin Baulig  <martin@ximian.com>
14893
14894         * debug-mono-symfile.h: Reflect latest symbol writer changes.
14895
14896 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14897
14898         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14899         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14900         * object.c: fixed mono_object_get_virtual_method () for interfaces.
14901         * verify.c: check for code that runs after the end of the method.
14902
14903 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14904
14905         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14906         "System.Math::Round2".
14907         * sysmath.h: Added Floor, Round and Round2 definitions.
14908         * sysmath.c: Modified certain functions that were not 100% compliant
14909         with MS.NET (math precision) and added the implementation of Floor,
14910         Round and Round2.
14911
14912 2003-02-07  Martin Baulig  <martin@ximian.com>
14913
14914         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14915
14916 2003-02-07  Martin Baulig  <martin@ximian.com>
14917
14918         * debug-mono-symfile.c: Reflected latest symwriter changes.
14919         (mono_debug_create_mono_symbol_file): Removed.
14920         (mono_debug_open_mono_symbol_file): Take an argument which
14921         specifies whether to create a dynamic symbol file.
14922
14923 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
14924
14925         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14926
14927 2003-02-05  Martin Baulig  <martin@ximian.com>
14928
14929         * reflection.c (mono_image_build_metadata): Make this public,
14930         protect it against being called multiple times, don't create
14931         resources and don't build the compressed metadata here.
14932         (mono_image_create_pefile): Do this here.
14933
14934         * icall.c
14935         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14936
14937 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14938
14939         * socket-io.c: fixed bug #36322.
14940
14941 2003-02-06  Piers Haken <piersh@friskit.com>
14942
14943         * appdomain.[ch]:
14944         * class.h:
14945         * debug-mono-symfile.c:
14946         * icall.c:
14947         * loader.c:
14948         * mono-config.c:
14949         * monosn.c:
14950         * reflection.c:
14951         * socket-io.c: warning cleanups
14952
14953 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
14954
14955         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14956         function. works like remoting invoke, but does a check for the Proxy first.
14957
14958 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
14959
14960         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14961
14962 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
14963
14964         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14965         array of pointers.
14966         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14967         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14968
14969         * object.c (mono_store_remote_field_new): used by the new jit
14970         instead of mono_store_remote_field
14971         (mono_load_remote_field_new): used by the new jit
14972         instead of mono_load_remote_field
14973
14974 2003-02-05  Patrik Torstensson
14975
14976         * appdomain.c: changed unload to take the domain id instead
14977         of domain
14978         
14979         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14980
14981
14982 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14983
14984         * appdomain.c: don't look for assemblies in ApplicationBase if
14985         PrivateBinPathProbe is set.
14986
14987 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14988
14989         * object.c: make the first argument in main_args contain the absolute
14990         path to the assembly. Fixes bug #37511.
14991
14992 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14993
14994         * icall.c: get correct UTC offset for countries not using daylight
14995         time saving. Fixes bug #30030.
14996
14997 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14998
14999         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
15000         and 1 are the family).
15001
15002 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
15003
15004         * icall.c (ves_icall_InternalExecute): removed wrong assertion
15005
15006         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
15007
15008 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
15009
15010         * reflection.c: added support for SignatureHelper tokens, which is
15011         needed by the Calli opcode.
15012
15013         * reflection.h: track changes to SignatureHelper class.
15014
15015         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
15016
15017 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15018
15019         * appdomain.c: fixed loading assemblies from PrivateBinPath.
15020
15021 2003-02-03  Patrik Torstensson
15022         * appdomain.[c|h], domain.c : 
15023          - Added support for getting a domain via domain id
15024          - Support for setting and getting domain from System.AppDomain 
15025            (used in cross appdomain channel)
15026          - Added support for get/set for a MonoAppContext on a thread 
15027            (Context class in System.Runtime.Remoting.Contexts),
15028          - Removed hack in Get/SetData and ExecuteAssembly.
15029         
15030         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
15031         the managed world to get control when a proxy is created.
15032
15033         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
15034         
15035 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
15036
15037         * icall.c
15038         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15039         Populate the codebase field as well.
15040
15041 2003-02-02  Martin Baulig  <martin@ximian.com>
15042
15043         * debug-mono-symfile.c
15044         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15045         (mono_debug_symfile_add_method): Allow interncalls.
15046
15047 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15048
15049         * icall.c: throw parse exception if strtod fails or the string is empty.
15050
15051 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15052
15053         * marshal.c: handle object type separately from defined
15054         class types.
15055
15056 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
15057
15058         * marshal.c: handle NATIVE_LPSTR for strings when it's
15059         explicitly specified.
15060
15061 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15062
15063         * reflection.c, reflection.h, icall.c: setup the reflection
15064         handle cache for ModuleBuilders and AssemblyBuilders.
15065
15066 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
15067
15068         * reflection.c (reflection_methodbuilder_to_mono_method): set
15069         pinvoke flag
15070
15071 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15072
15073         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15074
15075 2003-01-29  Dick Porter  <dick@ximian.com>
15076
15077         * threads.c: No need for the fake_thread kludge now that Thread
15078         doesn't run a class constructor
15079         
15080 2003-01-29  Dick Porter  <dick@ximian.com>
15081
15082         * threads.c: Use g_direct_hash instead of the rather bogus
15083         g_int_hash
15084
15085 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
15086
15087         * marshal.c (mono_marshal_get_native_wrapper): add check for null
15088         (fix pinvoke12.exe)
15089         (mono_marshal_get_struct_to_ptr): generate valid IL code
15090         (mono_marshal_get_ptr_to_struct): generate valid IL code
15091         (*): correctly set sig->pinvoke, we need to memdup the signature
15092         to do that
15093
15094 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15095
15096         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15097         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15098
15099 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15100
15101         * profiler.c: provide more callers information.
15102
15103 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
15104
15105         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15106
15107         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15108
15109         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15110
15111 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15112
15113         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15114         exception instead of going into an infinite loop on dates which it 
15115         can't yet handle.
15116
15117         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
15118         out-of-range exception if needed.
15119
15120         * class.c (mono_class_setup_vtable): allow a virtual method to provide
15121         an implementation for an interface method and to override an inherited
15122         method at the same time. 
15123         Imagine a scenario when a virtual method is used to override a
15124         virtual abstract method in a parent class, and this same method 
15125         provides an implementation for an method inherited from an interface. 
15126         In this case, the interface resolution code will set im->slot, which 
15127         means that the virtual method override pass will skip this method 
15128         which means a pointer to the abstract method inherited from the parent
15129         will remain in the vtable of this non-abstract class.
15130
15131         * class.c: (mono_class_setup_vtable): continue search for a real 
15132         method if only an abstract method is found.     
15133
15134 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15135
15136         * reflection.c: add size to encoding for ByValStr and ByValArray
15137         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15138
15139 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15140
15141         * class.c (mono_class_setup_vtable): pass the override info as an
15142         argument.
15143
15144         * class.c (mono_class_setup_vtable): set the slot of overriding methods
15145         correctly.
15146         
15147         * reflection.c (ensure_runtime_vtable); add support for method 
15148         overrides.
15149         
15150 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15151
15152         * reflection.c (resolution_scope_from_image): Hack to work to work with
15153         dynamic assemblies.
15154
15155         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
15156         added a 'force_ref' argument to force this function to allways return 
15157         a TypeRef. This is needed by mono_image_get_memberref_token ().
15158         
15159 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15160
15161         * reflection.c (mono_image_get_type_info): interfaces really don't have
15162         a parent.
15163
15164         * reflection.c (mono_image_basic_init): fill out missing fields of
15165         image structure.
15166
15167         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
15168         dynamic assemblies. This is required so dynamic assemblies show up in
15169         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15170         Type::GetType() etc. This is consistent with MS behaviour.
15171
15172         * image.c image.h reflection.c: add newly created classes to the name 
15173         cache so mono_class_get () will find them.      
15174
15175 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15176
15177         First part of changes to get IKVM.NET running under mono.
15178         
15179         * appdomain.h, appdomain.c: added new function 
15180         mono_domain_try_type_resolve() which will emit TypeResolve events. 
15181         This function will call AppDomain::DoTypeResolve to do the actual work.
15182
15183         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
15184         moved existing code dealing with dynamic tokens to a new function 
15185         called mono_reflection_lookup_dynamic_token (). This function will 
15186         raise TypeResolve events when appropriate. Since reflection.c is not 
15187         part of libmetadata, a new hook function called 
15188         mono_lookup_dynamic_token() is added to class.c which will call this.
15189
15190         * assembly.h assembly.c: make the invoke_load_hook function public,
15191         so it can be called for dynamic assemblies.
15192
15193         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15194
15195         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
15196         type isn't found.
15197
15198         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
15199         MonoGHashTable, since it contains pointers to objects which the GC 
15200         needs to track.
15201
15202         * assembly.c (search_loaded): remove unused variable.
15203         
15204 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15205
15206         * object.c: fixed issue exposed by gcc-generated IL programs
15207         that use RVA data for pointers.
15208
15209 2003-01-25  Martin Baulig  <martin@ximian.com>
15210
15211         * threads.c (start_wrapper): Moved the initialization of
15212         `start_func' above the mono_new_thread_init() call to which we
15213         pass it as argument.
15214
15215 2003-01-24  Martin Baulig  <martin@ximian.com>
15216
15217         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15218         the MonoThread pointer.
15219
15220 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
15221
15222         * icall.c: Rename `PowImpl' to Pow.
15223
15224 2003-01-23  Dick Porter  <dick@ximian.com>
15225
15226         * threads.c (start_wrapper): Create a Thread object if needed, so
15227         the Main() thread can do the class initialisation in a subthread
15228         that has been set up to allow managed code execution.
15229
15230         Pass the thread ID instead of the MonoThread pointer to the thread
15231         start and attach callbacks.  This change is required, because the
15232         jit thread start callback must be called _before_ the Thread
15233         object can be created.
15234         
15235         (mono_thread_init): Removed much object creation code that is no
15236         longer needed.  No managed code is called from here now.
15237
15238         * object.c (mono_runtime_exec_managed_code): Create a subthread
15239         for Main, and call back to the runtime to use it.
15240         Set the exit code when Main exits.
15241
15242         * gc.c: Make sure domain finalisation happens in a subthread.
15243         Re-enable threaded GC, fixing bug 31333 (again).
15244
15245         * environment.c: System.Environment internall calls (so far just
15246         ExitCode is here, the others are still in icall.c)
15247
15248         * appdomain.c (mono_runtime_cleanup): All threads running managed
15249         code should have finished before mono_runtime_cleanup() is
15250         reached, so no need to clean up threads.
15251
15252 2003-01-22  Martin Baulig  <martin@ximian.com>
15253
15254         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15255         `gpointer func' arguments.      
15256         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15257         but added `MonoThread *thread' argument.
15258         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15259
15260         * threads.c (mono_new_thread_init): Added `gpointer func' argument
15261         and pass it to the mono_thread_start_cb callback.
15262         (mono_install_thread_callbacks): New public function to install a
15263         set of callbacks which are set by the debugger.
15264         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15265
15266 2003-01-22  Martin Baulig  <martin@ximian.com>
15267
15268         * Makefile.am: Install debug-mono-symfile.h.
15269
15270 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
15271
15272         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15273
15274 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
15275
15276         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15277         * class.c (mono_ptr_class_get): correctly set access levels of pointers
15278         (mono_array_class_get): correctly set access levels of arrays
15279
15280 2003-01-20      Patrik Torstensson
15281         * image.h (MonoAssemblyName): changed major, minor, build, revision
15282         from signed to unsigned.
15283
15284 2003-01-20  sean kasun <skasun@azstarnet.com>
15285
15286         * reflection.c (load_cattr_value): Now this handles
15287         MONO_TYPE_SZARRAY.  Fixes bug #35629
15288
15289 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
15290
15291         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15292         integer value
15293
15294 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15295
15296         * decimal.c: fixed bug #26056.
15297
15298 2003-01-17  Martin Baulig  <martin@ximian.com>
15299
15300         * gc.c: Raise an ExecutionEngineException instead of using g_error().
15301
15302 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15303
15304         * exception.[ch]:
15305         (mono_get_exception_type_initialization): new function.
15306
15307         * object.c: throw a TypeInitializationException when an exception is
15308         thrown invoking the class constructor.
15309
15310 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15311
15312         * reflection.c: fixed attribute reading.
15313
15314 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15315
15316         * icall.c:
15317         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15318         provided, look for the type in the calling assembly and then in
15319         mscorlib; if the assembly name is provided, only try that one.
15320
15321 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15322
15323         * object.c: register the vtable before there is a chance it's
15324         queried again recursively.
15325
15326 2003-01-13  Duncan Mak  <duncan@ximian.com>
15327
15328         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15329         gc-internal.h. 
15330         
15331 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
15332
15333         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15334
15335 2003-01-11  Martin Baulig  <martin@ximian.com>
15336
15337         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15338         this to 20 for the release.
15339
15340 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
15341
15342         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15343
15344         * loader.c (mono_method_get_marshal_info): bug fix
15345
15346         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15347         structures with explicit layout
15348
15349 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15350
15351         * profiler.c: made the output more readable (and sorted). 
15352         Added caller information for the allocation profiler.
15353
15354 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
15355
15356         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15357
15358 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15359
15360         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15361         to get value types.
15362         
15363 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15364
15365         * object.c, profiler.h, profiler.c, profiler-private.h:
15366         Added object allocation profiler.
15367
15368 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15369
15370         * reflection.h, reflection.c: handle global methods.
15371         Compress blob entries.
15372
15373 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15374
15375         * marshal.c: fix compilation.
15376
15377 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
15378
15379         * loader.c (mono_method_get_marshal_info): impl.
15380
15381         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15382
15383 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15384
15385         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15386         for reference types.
15387
15388 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15389
15390         * loader.c: fixed off by one error in loaded parameter names.
15391
15392 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
15393
15394         * marshal.c (mono_marshal_get_icall_wrapper): like
15395         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15396         instead of a MonoMethod.
15397
15398 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15399
15400         * decimal.c: fixed bug #36537.
15401
15402 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15403
15404         * marshal.c: throw a missing method exception if a
15405         P/Invoke method is not found.
15406
15407 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15408
15409         * icall.c: allow a null this for constructors.
15410
15411 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15412
15413         * icall.c: raise the proper exceptions if the arguments to the
15414         internal Invoke are incorrect.
15415
15416 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
15417
15418         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15419
15420 2003-01-03  Martin Baulig  <martin@ximian.com>
15421
15422         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15423
15424 2002-12-31  Martin Baulig  <martin@ximian.com>
15425
15426         * debug-mono-symfile.c: Completely rewrote the type section.
15427         Instead of using individual malloc()ed fields, we use one big
15428         continuous memory area and offsets into this area.
15429         See the comments in the source code for details.
15430
15431 2002-12-30  Martin Baulig  <martin@ximian.com>
15432
15433         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15434
15435 2002-12-30  Martin Baulig  <martin@ximian.com>
15436
15437         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15438         line number table in this data blob instead of using an external
15439         pointer.
15440
15441 2002-12-28  Martin Baulig  <martin@ximian.com>
15442
15443         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15444
15445 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
15446
15447         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15448         as a boxed return type.
15449
15450 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
15451
15452         * appdomain.c
15453         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15454         g_build_filename to properly get separators on the filename created.
15455
15456         * object.h: Small change, introduce MonoMarshalByRefObject to
15457         track the layout of that structure in the C# universe as we make
15458         changes there.
15459
15460 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15461
15462         * object.c: removed assert to allow static fields on interfaces.
15463         * loader.c: a TypeSpec may be used for any type, not just arrays.
15464
15465 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15466
15467         * class.c, class.h: added mono_class_array_element_size ().
15468         Ignore static methods in interfaces.
15469
15470 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15471
15472         * threads.c: fixed the build under cygwin.
15473
15474 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15475
15476         * reflection.c: handle nullref constants. Allocate keys for
15477         reflection handles with the GC.
15478
15479 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15480
15481         * threads.c, threads.h: added mono_thread_get_abort_signal()
15482         to get a suitable signal for thread abort.
15483
15484 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15485
15486         * metadata.c: fix handling of ExportedType table.
15487
15488 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15489
15490         * icall.c: added WriteWindowsDebugString internal call.
15491
15492 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15493
15494         * reflection.h: added fields to match C# implementation.
15495
15496 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15497
15498         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15499
15500 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
15501
15502         * gc.h, gc-internal.h: Rename header for GC internal calls to
15503         gc-internal.h from gc.h as to not clash with Boehm GC having its
15504         header installed as <gc.h> in outside include paths.
15505         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15506         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15507
15508 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15509
15510         * icall.c: assign minor, build and revision in FillName.
15511
15512 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
15513
15514         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15515         Added support for running code generated by Reflection.Emit.
15516
15517 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15518
15519         * appdomain.c: check for NULL argument in LoadFrom.
15520
15521 2002-12-10  Dick Porter  <dick@ximian.com>
15522
15523         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15524
15525 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15526
15527         * appdomain.c: fix buglet when building exe file name.  Handle full
15528         assembly name (needed after latest changes to AssemblyName).
15529         * image.c:
15530         (mono_image_close): free some hashtables.
15531
15532 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
15533
15534         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
15535         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
15536         on some systems (redhat 7.3) 
15537
15538 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
15539
15540         * threads.c: delete the critical section of a sync block,
15541         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15542
15543 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15544
15545         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15546
15547 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15548
15549         * appdomain.[ch]: handle the assembly preload event to try loading the
15550         assemblies using the paths we have in the current domain.
15551
15552         * assembly.[ch]: created an assembly preload hook that is called to try
15553         loading the assembly by other means that the ones provided here.
15554
15555         * domain.c: initialize the domain search path.
15556
15557         From now on, assemblies (TODO: except corlib and System) are loaded
15558         according to these rules when using mono_assembly_load ():
15559
15560                 1. It tries to load the assembly from the ApplicationBase
15561                 of the current domain appending .dll and .exe (TODO: have to
15562                 try loading from name/name.dll and name/name.exe).
15563
15564                 2. It tries the search path specified in PrivateBinPath for the
15565                 current domain (if any).
15566
15567                 3. Previous behavior.
15568
15569 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15570
15571         * icall.c: implemented GetInterfaceMap() related icall.
15572         * domain.c, loader.h: load MethodInfo in mono_defaults.
15573
15574 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15575
15576         * gc.c: disable the finalizer thread for now, untill all the issues
15577         with it are resolved.
15578
15579 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15580
15581         * string-icalls.c: handle embedded nulls in string ctor when the
15582         length is specified.
15583
15584 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15585
15586         * class.c: look for explicit interface implementation in parent
15587         classes, too.
15588
15589 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
15590
15591         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
15592
15593 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15594
15595         * gc.c: protect handles with a critical section.
15596
15597 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15598
15599         * icall.c:
15600         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15601         parameters. If no assembly specified, try getting the type from all
15602         the assemblies in the current domain, else, load the assembly and get
15603         the type from it.
15604
15605 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15606
15607         * marshal.c: applied patch from Aleksey Demakov that fixes
15608         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15609
15610 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15611
15612         * icall.c: fixed get_location.
15613
15614 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
15615
15616         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15617         declarations to make it work with older gcc. 
15618
15619         * loader.c (mono_get_method): set signature->pinvoke for native calls
15620
15621 2002-11-20  Dick Porter  <dick@ximian.com>
15622
15623         * threads.c (mono_thread_init): Set the main thread's handle
15624
15625 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15626
15627         * gc.c: allow compilation without GC support. Changed to match the
15628         mono coding style.
15629
15630 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15631
15632         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15633
15634 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15635
15636         * reflection.c: set a public key token on the core assemblies.
15637
15638 2002-11-18  Dick Porter  <dick@ximian.com>
15639
15640         * threads.c: Split out some thread initialisation so that other
15641         files can set the start callback function.
15642
15643         * gc.c: Run finalisers in a separate thread, to avoid stack
15644         overflow.  Fixes bug 31333.
15645
15646         * appdomain.c: Set up GC finalisation thread.
15647
15648         * reflection.c: 
15649         * object.c: 
15650         * domain.c: Use gc.h macros for GC_malloc
15651         
15652 2002-11-15  Dick Porter  <dick@ximian.com>
15653
15654         * threadpool.c: 
15655         * threads.c:
15656         * appdomain.c: Removed mono_runtime_init_with_attach(),
15657         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15658         merging the extra parameter with the existing function.  Removed
15659         unneeded code in mono_thread_attach().
15660
15661 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
15662
15663         * image.c (mono_image_loaded_by_guid): a method to get loaded
15664         images by guid. 
15665         (load_metadata_ptrs): we store the guid as string.
15666
15667 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
15668
15669         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15670
15671         * metadata.c (mono_guid_to_string): imported method form Zoltan
15672         Varga (slightly modified)
15673
15674         * assembly.c (mono_assembly_open): load precompiled code
15675
15676         * loader.h (MonoMethod): we store the method token for use in the
15677         aot compiler. 
15678
15679 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15680
15681         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15682         the hook function called when an assembly is loaded.
15683         
15684         * domain.c: Modified file.
15685         (mono_domain_assembly_load): removed hash table insertion of assemblies.
15686
15687         Fixes bug #33196.
15688
15689 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
15690
15691         * reflection.c: Map PEFileKind to the value expected by the WinNT
15692         image loader. 
15693
15694 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15695
15696         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15697         Read until the buffer is filled completely.
15698
15699 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15700
15701         * icall.c: implemented MonoType.InternalGetEvent ().
15702
15703 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15704
15705         * appdomain.c: implemented InitAppDomainSetup. Delayed
15706         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15707         the entry_assembly.
15708
15709         * assembly.c: base_dir is now an absolute path ending with
15710         G_DIR_SEPARATOR.
15711
15712         * icall.c: modified get_location according to the above changes.
15713
15714         * object.c: init AppDomain.SetupInformation for the default domain after
15715         we have the entry assembly.
15716
15717         * domain.c: when unloading a domain, setup = NULL.
15718
15719 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
15720
15721         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15722
15723 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15724
15725         * object.h, object.c: introduced mono_object_get_virtual_method ()
15726         to lookup the method invoked on an object when a callvirt is done on
15727         a method.
15728         * icall.c: make MethodInfo::Invoke() always do a virtual call.
15729
15730 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15731
15732         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15733         current domain when loaded an assembly and failed to load it.
15734
15735         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15736
15737 2002-10-31  Dick Porter  <dick@ximian.com>
15738
15739         * icall.c: 
15740         * file-io.h: 
15741         * file-io.c: Return the error status in a parameter, as the
15742         GetLastError() value has long since been blown away if we try and
15743         look it up in a subsequent internal call invocation.  Delete the
15744         GetLastError() internal call, because it's useless.
15745
15746 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
15747
15748         * class.[ch]: added cast_class to fix bug 29517
15749
15750 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15751
15752         * marshal.c: create valid IL code in the filter clause:
15753         the new JIT is less forgiving:-)
15754
15755 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15756
15757         * icall.c: removed get_property internal call.
15758
15759 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
15760
15761         * appdomain.h domain.c: Added an ID to appdomains.
15762         
15763         * threads.c threads.h icall.c: Implement icall
15764         Thread:GetDomainID(), and remove unused icall 
15765         CurrentThreadDomain_internal.
15766
15767 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15768
15769         * icall.c: Don't recurse through the base types in GetConstructor.
15770         Fixes bug #32063. 
15771
15772 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15773
15774         * mempool.h, mempool.c: added mono_mempool_empty() and
15775         mono_mempool_stats().
15776
15777 2002-10-23  Dick Porter  <dick@ximian.com>
15778
15779         * file-io.c: 
15780         * file-io.h: 
15781         * icall.c: Added MonoIO.GetFileType internal call
15782
15783 2002-10-17  Dick Porter  <dick@ximian.com>
15784
15785         * appdomain.c (mono_runtime_cleanup): Don't signal the async
15786         delegate semaphore before waiting for all threads to finish,
15787         because new threads can also call async delegates.  Fixes bug
15788         32004.
15789
15790         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15791         of 3 seconds, in case another async job is queued.  (This part is
15792         needed because the bug fix reintroduced the 3s exit lag.)  This
15793         makes the mono_runtime_shutdown flag superfluous.
15794
15795 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15796
15797         * reflection.c: include ehader size in method section headers.
15798         Really check for suplicated modules entries.
15799
15800 2002-10-17  Martin Baulig  <martin@gnome.org>
15801
15802         * debug-mono-symfile.c: Added back support for locals.
15803
15804 2002-10-14  Martin Baulig  <martin@gnome.org>
15805
15806         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15807         MONO_TYPE_VOID.
15808
15809 2002-10-14  Martin Baulig  <martin@gnome.org>
15810
15811         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15812         mono_class_get() instead of looking in the class cache. 
15813
15814 2002-10-13  Martin Baulig  <martin@gnome.org>
15815
15816         * debug-mono-symfile.c: Set version number to 28, include the
15817         signature in method names.
15818
15819 2002-10-13  Martin Baulig  <martin@gnome.org>
15820
15821         * debug-mono-symfile.h: Set version number to 27.
15822
15823 2002-10-11  Martin Baulig  <martin@gnome.org>
15824
15825         * gc.c: Don't register/unregister NULL pointers as disappearing links.
15826
15827 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15828
15829         * metadata.c, metadata.h: added helper function to allocate signatures.
15830
15831 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15832
15833         * icall.c: added internal call to get the location of machine.config.
15834
15835 2002-10-08  Martin Baulig  <martin@gnome.org>
15836
15837         * debug-mono-symfile.c: Ignore classes with a pending init for the
15838         moment.
15839
15840 2002-10-03  Dick Porter  <dick@ximian.com>
15841
15842         * threads.c: Freebsd pthread_t is a pointer
15843
15844 2002-10-03  Dick Porter  <dick@ximian.com>
15845
15846         * socket-io.c: Implemented GetHostName_internal
15847
15848 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15849
15850         * mono-config.c:
15851         (mono_config_parse_file): don't leak the text.
15852
15853 2002-10-02  Martin Baulig  <martin@gnome.org>
15854
15855         * debug-mono-symfile.c: Added support for methods.
15856
15857 2002-10-01  Martin Baulig  <martin@gnome.org>
15858
15859         * debug-mono-symfile.c: Don't emit methods and line numbers for
15860         the dynamic symbol file, just write the type table.  We can easily
15861         have an external helper program which creates a symbol file for an
15862         IL file.        
15863
15864 2002-10-01  Dick Porter  <dick@ximian.com>
15865
15866         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15867         Only add the handle to the cleanup array when we're about to
15868         launch the thread.  Bug 31425 deadlocked when the test was run on
15869         mono under w32.
15870
15871 2002-10-01  Martin Baulig  <martin@gnome.org>
15872
15873         * debug-mono-symfile.c: Added support for properties.
15874
15875 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15876
15877         * reflection.c: unaligned store fix from Mark Crichton
15878         <crichton@gimp.org>.
15879
15880 2002-09-27  Martin Baulig  <martin@gnome.org>
15881
15882         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15883         New interncall.
15884
15885 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15886
15887         * assembly.h, assembly.c: use a sane API to hook into the assembly
15888         loading process instead of a useless special-purpouse hack
15889         (ngen needs a hook, too, for example).
15890
15891 2002-09-27  Dick Porter  <dick@ximian.com>
15892
15893         * threads.c (mono_thread_init): Call GetCurrentProcess() so
15894         io-layer can set up some process handle info.  Not needed on w32,
15895         but doesn't hurt either.
15896
15897         * process.c: Pass the program name in the second parameter to
15898         CreateProcess, so the path is searched.  Include the working
15899         directory. Implemented process name, process enumeration, and some
15900         process detail internal calls.
15901         
15902         * icall.c: Added internal calls for process lookup, and some
15903         process details
15904
15905 2002-09-26  Martin Baulig  <martin@gnome.org>
15906
15907         * assembly.c (mono_install_open_assembly_hook): New global
15908         function to install a function to be invoked each time a new
15909         assembly is loaded.
15910         (mono_assembly_open): Run this callback function if set.
15911
15912         * debug-mono-symfile.c: Put back line numbers for the dynamic
15913         symbol file and also record the .il file as source file.  This
15914         allows us to install the temporary symbol file as `file.dbg' just
15915         like a compiler-generated one.
15916
15917 2002-09-26  Nick Zigarovich <nick@chemlab.org>
15918
15919         * Corrected typo in gc.c (BOHEM vs BOEHM).
15920
15921 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15922
15923         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15924         GetProperties. Also avoid calling g_slist_length in GetProperties and
15925         GetMethods.
15926
15927 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15928
15929         * reflection.c: avoid unaligned stores (bug spotted by
15930         Mark Crichton  <crichton@gimp.org>).
15931
15932 2002-09-25  Martin Baulig  <martin@gnome.org>
15933
15934         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15935         instead of guint64 for addresses and added prologue/epilogue info.
15936
15937 2002-09-25  Martin Baulig  <martin@gnome.org>
15938
15939         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15940         store line number info.  For the dynamic symbol file, we only need
15941         to provide the JIT generated dynamic line number info for the dynamic
15942         symbol file.
15943
15944 2002-09-25  Martin Baulig  <martin@gnome.org>
15945
15946         * debug-mono-symfile.h: Incremented version number.
15947
15948 2002-09-24  Martin Baulig  <martin@gnome.org>
15949
15950         * class.c (mono_debugger_class_init_func): New global function
15951         pointer variable.
15952         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15953         call it.
15954
15955         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15956         function.  This is called via the mono_debugger_class_init_func
15957         hook to add all types to the dynamic type table.
15958         (ves_icall_MonoDebugger_GetType): New interncall to get a class
15959         from its metadata token.
15960
15961         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15962         New interncall for the debugger.
15963
15964 2002-09-24  Nick Drochak <ndrochak@gol.com>
15965
15966         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15967         before using it in case it is null.
15968         
15969 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15970
15971         * metadata.c: allow custom modifiers in local var signatures
15972         (bug spotted by Zoltan Varga).
15973
15974 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15975
15976         * class.c: deal with the <Module> class that may have a NULL vtable.
15977         Eliminate warnings.
15978
15979 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15980
15981         * image.c, image.h: more strong name helpers.
15982         * monosn.c: more work: convert pem keys to cryptoapi format.
15983
15984 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15985
15986         * string-icalls.c: speedup IndexOf.
15987
15988 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15989
15990         * icall.c: updates from Zoltan.2.Varga@nokia.com.
15991
15992 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15993
15994         * icall.c: cleanup: use mono_object_domain ().
15995
15996 2002-09-23  Martin Baulig  <martin@gnome.org>
15997
15998         * debug-mono-symfile.c: Improved type support.
15999
16000 2002-09-22  Martin Baulig  <martin@gnome.org>
16001
16002         * debug-mono-symfile.c: Added support for reference types and strings.
16003
16004 2002-09-22  Martin Baulig  <martin@gnome.org>
16005
16006         * debug-mono-symfile.c: Started to work on the type table.
16007
16008 2002-09-21  Martin Baulig  <martin@gnome.org>
16009
16010         * debug-mono-symfile.c: Largely reworked the symbol table format.
16011         The symbol table is now incrementally updated each time a new
16012         method is added.  We're now also using our own magic and version
16013         so that you don't need to recompile all your classes if the
16014         dynamic table changes.
16015         (mono_debug_update_mono_symbol_file): Removed.
16016         (mono_debug_symfile_add_method): New function to add a method.
16017
16018 2002-09-21  Martin Baulig  <martin@gnome.org>
16019
16020         * icall.c
16021         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
16022         New interncall.
16023
16024         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
16025         New interncall to get a method from its metadata token.
16026
16027 2002-09-21  Martin Baulig  <martin@gnome.org>
16028
16029         * debug-mono-symfile.c: Create type table.
16030
16031 2002-09-20  Martin Baulig  <martin@gnome.org>
16032
16033         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
16034
16035 2002-09-20  Martin Baulig  <martin@gnome.org>
16036
16037         * debug-mono-symfile.c: Provide information about params and locals.
16038
16039 2002-09-20  Martin Baulig  <martin@gnome.org>
16040
16041         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16042         New interncall.
16043
16044         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16045         interncall to get a method from its metadata token.
16046
16047 2002-09-20  Martin Baulig  <martin@gnome.org>
16048
16049         * debug-mono-symfile.c: Added a few checks for method->header
16050         being non-NULL.  This should never happen, but for the moment
16051         let's use a g_warning() rather than a g_assert().
16052
16053 2002-09-19  Mark Crichton  <crichton@gimp.org>
16054
16055         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16056         even if support for it isn't present.  Added an #ifdef to fix this.
16057
16058         * socket-io.c: Added checks back for Solaris support.
16059
16060 2002-09-19  Martin Baulig  <martin@gnome.org>
16061
16062         * debug-mono-symfile.c (read_string, write_string): Reflect latest
16063         changes in the symbol file format.
16064
16065 2002-09-18  Martin Baulig  <martin@gnome.org>
16066
16067         * debug-mono-symfile.c: Set version number to 21.
16068
16069 2002-09-18  Dick Porter  <dick@ximian.com>
16070
16071         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16072         on netbsd.  Fixes bug 30051.
16073
16074 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16075
16076         * reflection.c:
16077         (set_version_from_string): little fix.
16078
16079 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16080
16081         * monosn.c, Makefile.am: added strong name utility.
16082         * reflection.h, reflection.c: implemented delayed signing,
16083         locale, version and hash id assembly attributes.
16084
16085 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16086
16087         * loader.c, metadata.c: load param attributes in signatures.
16088
16089 2002-09-16  Martin Baulig  <martin@gnome.org>
16090
16091         * debug-mono-symfile.c: Added string table with all method names.
16092
16093 2002-09-14  Martin Baulig  <martin@gnome.org>
16094
16095         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16096         fast method lookup.
16097
16098 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16099
16100         * reflection.c: record the public key token of referenced assemblies.
16101
16102 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16103
16104         * image.c, image.h: added functions to get the strong name and the
16105         public key of an assembly.
16106         * pedump.c: use them.
16107
16108 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
16109
16110         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16111
16112 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
16113
16114         * marshal.c (mono_marshal_get_managed_wrapper): Added
16115         MONO_TYPE_BOOLEAN 
16116
16117 2002-09-11  Martin Baulig  <martin@gnome.org>
16118
16119         * gc.c: Call GC_unregister_disappearing_link() on all links when
16120         finalizing them, this is necessary to aviod a crash in boehm's
16121         finalize handler.
16122
16123 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16124
16125         * gc.c: handle GetTarget for finalized objects spotted and fixed by
16126         nick@chemlab.org.
16127
16128 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16129
16130         * icall.c: implemented MonoType::Module.
16131         * reflection.c, reflection.h: mono_module_get_object () from
16132         Tomi Pakarinen <tomi.pakarinen@welho.com>.
16133
16134 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16135
16136         * icall.c: ignore overridden methods in GetMethods ().
16137         Fix for FieldInfo::SetValue().
16138         * object.c: handle float/double in runtime invoke.
16139
16140 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16141
16142         * object.c: allow a constructor to be called again on an object.
16143
16144 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16145
16146         * class.h, class.c: move field layout code to it's own function and
16147         export it. Get an interface id earlier. Move fields in MonoClass
16148         so they are more cache friendly and align the bitfields.
16149         * loader.c: temporary handle get_param_names() for a runtime method.
16150         * reflection.c, reflection.h: more code to handle runtime creation of
16151         types.
16152
16153 2002-09-09  Martin Baulig  <martin@gnome.org>
16154
16155         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16156         signature with the pinvoke field being set for the actual call.
16157
16158 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16159
16160         * icall.c: removed some unused icalls. Start of map of glib charsets
16161         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16162
16163 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16164
16165         * debug-helpers.c: break infinite loop (found and fixed by
16166         Holger Arnold <harnold@gmx.de>).
16167
16168 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16169
16170         * icall.c: target may be null in create_delegate.
16171
16172 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16173
16174         * marshal.c: handle a boolean return type.
16175
16176 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16177
16178         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16179
16180 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16181
16182         * gc.c: fix weakreferences.
16183
16184 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16185
16186         * icall.c: added icall to get default codepage.
16187
16188 2002-09-03  Dick Porter  <dick@ximian.com>
16189
16190         * threads.h: 
16191         * threads.c: Use MonoThread instead of MonoObject where
16192         apropriate.
16193
16194         Store running thread objects in a hash table, so that we have all
16195         the info to hand when waiting for them to finish
16196         (means we don't need OpenThread() any more, so mingw builds should
16197         be fully functional again.)
16198
16199         * verify.c:
16200         * object.h: Added thread ID to MonoThread
16201
16202 2002-09-03  Martin Baulig  <martin@gnome.org>
16203
16204         * icall.c (System.Reflection.Assembly::get_location): New interncall.
16205
16206 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16207
16208         * icall.c: fixed leak in get_temp_path. Thanks lupus.
16209
16210 2002-09-03  Martin Baulig  <martin@gnome.org>
16211
16212         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16213         argument to store the end address of the disassembled instruction.
16214
16215         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16216         here from debug-symfile.h.
16217         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16218         JIT into this struct.
16219         (MonoSymbolFile): Added `char *image_file' field.
16220         (MonoDebugGetMethodFunc): Removed.
16221         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16222         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16223         (mono_debug_find_method): New method.
16224
16225         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16226         create a full symbol file.
16227         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16228         and static symbol files.
16229         (mono_debug_find_method): The symbol file keeps an internal method hash,
16230         call this to get a MonoDebugMethodInfo from a MonoMethod.
16231
16232         * debug-symfile.[ch]: Removed.
16233
16234 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
16235
16236         * image.c (do_mono_image_open): Remove linker version check.
16237
16238 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
16239
16240         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16241         wrappers for instance methods.
16242         
16243 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16244
16245         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16246
16247 2002-08-28  Dick Porter  <dick@ximian.com>
16248
16249         * Makefile.am: Export HOST_CC for w32 builds
16250
16251 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16252
16253         * file-io.c process.c: MonoString are null terminated, no
16254         need for mono_string_to_utf16() anymore.
16255
16256 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16257
16258         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16259
16260 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16261
16262         * icall.c, reflection.h: speedup System.MonoType.
16263
16264 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16265
16266         * reflection.c: allow null as the value of a string argument in
16267         custom attributes constructors.
16268
16269 2002-08-27  Martin Baulig  <martin@gnome.org>
16270
16271         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16272         `trampoline_address' field.
16273
16274 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
16275
16276         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16277         check (fixes bug #29486) 
16278
16279 2002-08-27  Martin Baulig  <martin@gnome.org>
16280
16281         * debug-mono-symfile.c: Changed the file format in a way that allows us
16282         open it read-only and to use a specially malloced area for all the
16283         dynamic data.  We can now also generate a symbol file on-the-fly if we're
16284         debugging IL code and there is no MCS generated symbol file for it.
16285
16286 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16287
16288         * object.c: added a define for a good string and array
16289         creation speedup (not enabled by default because we need to deal with
16290         the synch stuff).
16291
16292 2002-08-26  Martin Baulig  <martin@gnome.org>
16293
16294         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16295         function to create a dynamic symbol file.  This is used by the
16296         debugger to create a symbol file for IL code on-the-fly.
16297
16298 2002-08-26  Martin Baulig  <martin@gnome.org>
16299
16300         * loader.c (mono_lookup_pinvoke_call): Include the error message
16301         from g_module_error() in the error message.
16302
16303 2002-08-24  Martin Baulig  <martin@gnome.org>
16304
16305         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16306         function to update the symbol file.  The symbol file is mmap()ed
16307         writable, but private.  This allows us to install the symbol file
16308         together with the assembly.
16309
16310 2002-08-24  Martin Baulig  <martin@gnome.org>
16311
16312         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
16313         but they can read the new symbol file format which mcs is now creating.
16314
16315         * debug-symfile.c (mono_debug_find_source_location): Moved to
16316         debug-mono-symfile.c; this is now operating on the new symbol file.
16317
16318 2002-08-23  Martin Baulig  <martin@gnome.org>
16319
16320         * debug-helpers.c (mono_method_desc_from_method): New function to get
16321         a MonoMethodDesc from a MonoMethod.
16322
16323 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16324
16325         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16326         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16327
16328 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16329
16330         * string-icalls.[ch]: make helper methods static.
16331
16332 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16333
16334         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16335         types to it and to SetValueInternal.
16336
16337         * object.c: Moved handle_enum label to its proper place. This was the
16338         f... bug! ;-)
16339
16340         This time i compiled mcs and gtk-sharp and they both work.
16341
16342 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16343
16344         * icall.c: reverted partially my previous patch until 
16345         object.c:set_value handles enums correcly.
16346
16347 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16348
16349         * icall.c:
16350         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16351         (ves_icall_System_Environment_get_MachineName): removed warning when
16352         compiling under cygwin.
16353
16354 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16355
16356         * object.c: fixed field_get_value() for reference types.
16357
16358 2002-08-22  Dick Porter  <dick@ximian.com>
16359
16360         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16361         Don't free a buffer while it's still needed.  Patch from Jonathan
16362         Liger <Jonathan.liger@wanadoo.fr>
16363
16364 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
16365
16366         * icall.c (ves_icall_System_Environment_get_Platform): Add new
16367         internal call.
16368
16369 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
16370
16371         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16372         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16373
16374         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16375         we call unmanaged code which throws exceptions.
16376
16377 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16378
16379         * appdomain.h: added per-domain entry_assembly.
16380         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16381         arguments.
16382         * icall.c: Assembly::GetEntryAssembly icall.
16383         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16384         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16385
16386 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16387
16388         * appdomain.h, gc.c: added mono_domain_finalize ().
16389
16390 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16391
16392         * object.c:
16393         (mono_print_unhandled_exception): changed g_warning by g_printerr
16394         because g_log has a 1024 characters limit (yeah, i got a big stack
16395         trace). Don't print exception name, that should be in ToString 
16396         returned string.
16397
16398 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16399
16400         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16401         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16402
16403 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16404
16405         * object.c:
16406         (mono_print_unhandled_exception): after previous commit, i realized
16407         that MS calls ToString on the exception. I changed this function to
16408         do that. This way we get stack_trace for free.
16409
16410 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16411
16412         * object.c:
16413         (mono_print_unhandled_exception): invoke Message property instead of
16414         getting 'message' field from Exception. Don't allocate memory for
16415         'trace' and 'message' if not needed.
16416
16417 2002-08-18  Dick Porter  <dick@ximian.com>
16418
16419         * unicode.c: Fix asserts to match Encoder.cs checks
16420
16421 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16422
16423         * marshal.c: fix unaligned store issue and a few wrong
16424         opcode argument types.
16425
16426 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16427
16428         * icall.c: added GetUninitializedObjectInternal internal call.
16429
16430 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
16431
16432         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16433         to the right domain.
16434
16435 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
16436
16437         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16438
16439         * class.c (class_compute_field_layout): set blittable to false for Strings
16440
16441         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16442
16443 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16444
16445         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16446         first chunk of code to create types at runtime. Code to
16447         handle ReflectedType/DeclaringType. Make reflection handles
16448         domain specific.
16449
16450 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16451
16452         * class.c: set correct name in arrays.
16453
16454 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
16455
16456         * appdomain.c (mono_domain_transfer_object): make it work with
16457         valuetypes. bug fixes.
16458
16459 2002-08-12  Dick Porter  <dick@ximian.com>
16460
16461         * object.h: Rename some parameters to avoid c++ keywords (Patch
16462         from Joseph Wenninger <kde@jowenn.at>)
16463
16464 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16465
16466         * icall.c: added icall to implement Assembly.GetFile*.
16467
16468 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16469
16470         * reflection.h, reflection.c: code to embed managed resources.
16471
16472 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16473
16474         * class.c: move all the type size stuff into
16475         class_compute_field_layout().
16476
16477 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16478
16479         * class.c: ensure enums have always the correct instance size.
16480         * unicode.c: remove wrong assert.
16481
16482 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16483
16484         * assembly.c: fix mem corruption issue.
16485         * image.h, image.c: added mono_image_get_resource () to access
16486         managed resources.
16487         * icall.c: implemented Assembly.EntryPoint property and some
16488         Managed Resources related internalcalls.
16489
16490
16491 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16492
16493         * image.c, image.h: impemented mono_image_get_entry_point ().
16494         * appdomain.c: use mono_image_get_entry_point.
16495
16496 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16497
16498         * reflection.c: support the object type argument when loading
16499         custom attributes.
16500
16501 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
16502
16503         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16504         String as return type.
16505
16506 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16507
16508         * reflection.c: fix encoding of named args for custom attrs to match
16509         the ms implementation. Read them back when instantiating custom
16510         attributes.
16511
16512 2002-08-02  Radek Doulik  <rodo@ximian.com>
16513
16514         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16515         by Dietmar as quick fix
16516         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16517         16 as stack size, used on more places as quick fix before Dietmar
16518         will fix it properly
16519
16520 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16521
16522         * object.h, object.c: added accessors for fields and properties.
16523
16524 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16525
16526         * class.c, class.h: made mono_class_get_field_from_name ()
16527         loop on parent types.
16528         Added mono_class_get_property_from_name ().
16529
16530 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16531
16532         * class.c, class.h: move the code to setup the type vtable in its own
16533         function so that it can be reused also for types created at runtime.
16534         Eliminate the "class" identifier from the header file.
16535         * reflection.c: setup the vtable for enums so that we can create
16536         objects for use in SetConstant ().
16537
16538 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
16539
16540         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16541         instead of the delegate itself as this pointer (bug #28383)
16542
16543 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
16544
16545         * marshal.c (mono_marshal_get_managed_wrapper): added return type
16546         conversions.
16547
16548 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16549
16550         * loader.c: don't set the pinvoke bit on icalls.
16551
16552 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
16553
16554         * debug-helpers.c (mono_method_full_name): only print a number to
16555         indicate wrapper type (so that the output is more readable in traces).
16556
16557 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
16558
16559         * class.c (mono_class_init): include method override patch from Paolo
16560
16561 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16562
16563         * icall.c: fixed GetTypeCode().
16564
16565 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
16566
16567         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16568         use real delegate invoke function to make it work with multicast
16569         delegates (fix bug# 28291).
16570
16571 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16572
16573         * object.c: load constant strings.
16574
16575 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16576
16577         * reflection.c: no magic numbers.
16578         * tabledefs.h: security action enum.
16579
16580 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16581
16582         * assembly.c: fix possible memory corruption.
16583
16584 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16585
16586         * reflection.h, reflection.c: added support for linking resources.
16587         * verify.c: check we have an updated corlib.
16588
16589 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
16590
16591         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16592         string arrays.
16593         (mono_marshal_string_array): null terminate unmanaged string arrays.
16594         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16595
16596 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16597
16598         * icall.c: Type.GetType () can now return also types from the
16599         calling assembly.
16600
16601 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16602
16603         * loader.h, loader.c: stack walking support.
16604         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16605         GetCallingAssembly.
16606
16607 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
16608
16609         * marshal.c: added optimisations for blittable types 
16610
16611         * class.c (mono_array_class_get): do not set blittable attribute on arrays
16612         (mono_class_setup_mono_type): set blittable attribute for single
16613         and double.
16614
16615         * marshal.c (mono_string_utf8_to_builder): impl.
16616         (mono_string_builder_to_utf8): impl.
16617         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16618
16619 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
16620
16621         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16622         (mono_marshal_get_managed_wrapper): impl. byref types
16623
16624 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16625
16626         * icall.c:
16627         (search_method): don't display debug message. 
16628
16629 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16630
16631         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16632
16633 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16634
16635         * appdomain.c: set the missing filename when throwing exception.
16636
16637 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16638
16639         * metadata.c (mono_type_size): code cleanup
16640         (mono_type_stack_size): removed some test code
16641
16642 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
16643
16644         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16645         mono_get_exception_file_not_found now.
16646
16647         * exception.c (mono_exception_from_name_two_strings): New version
16648         that will call a constructor with two string arguments. 
16649         (mono_get_exception_file_not_found): New helper routine, used to
16650         report file-not-found errors.
16651
16652 2002-07-20  Dick Porter  <dick@ximian.com>
16653
16654         * process.h:
16655         * process.c: Pass file handles to CreateProcess
16656         
16657         * icall.c:
16658         * file-io.h:
16659         * file-io.c: Implemented CreatePipe
16660
16661 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16662
16663         * metadata.c (mono_get_param_info): set alignment for value types
16664
16665 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16666
16667         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16668         Constify mono_domain_assembly_open().
16669         * loader.c: handle null namespace in icalls.
16670
16671 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16672
16673         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16674         (emit_str_to_ptr_conv): marshal object as structs
16675
16676         * metadata.c (mono_type_to_unmanaged): marshal object as structs
16677
16678         * marshal.c (mono_marshal_get_runtime_invoke): support value types
16679
16680 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
16681
16682         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16683         (mono_marshal_get_native_wrapper): we an now return value types
16684
16685 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16686
16687         * verify.c: more checks implemented.
16688
16689 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
16690
16691         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16692         (fix bug #27695)
16693         (mono_marshal_get_native_wrapper): allow byref arguments
16694         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16695         impl. PtrToStringXXX methods
16696         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16697         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16698         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16699         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16700         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16701
16702 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16703
16704         * reflection.c: fix buglet in parsing an assembly name.
16705
16706 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16707
16708         * marshal.c (emit_ptr_to_str_conv): first impl.
16709
16710 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16711
16712         * object.c, class.h: cache the vtable in the class as suggested by
16713         vargaz@freemail.hu (Zoltan Varga).
16714
16715 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16716
16717         * class.h, loader.c: added mono_field_from_token().
16718         * verify.c: first cut of type checking code.
16719
16720 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16721
16722         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16723
16724 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
16725
16726         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16727         (fix bug #27782)
16728         (mono_marshal_get_remoting_invoke): impl.
16729         (mono_delegate_begin_invoke): impl.
16730         (mono_mb_emit_save_args): impl.
16731         (mono_delegate_end_invoke): impl.
16732         (mono_marshal_get_delegate_begin_invoke):
16733         (mono_marshal_get_delegate_end_invoke):
16734         (mono_marshal_get_delegate_invoke): generate a special name for
16735         those methods (including the signature) and associate them whith
16736         the delegate class. 
16737
16738 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16739
16740         * reflection.[ch]: 
16741         (mono_reflection_type_from_name): now it has a MonoImage parameter
16742         which is used as the default image to search the type in. If the image
16743         is NULL or getting the type from it fails, it defaults to corlib.
16744
16745         * icall.c: changed 1 call to mono_reflection_type_from_name to match
16746         new parameter.
16747
16748 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16749
16750         * reflection.c: update the parameter table index.
16751
16752 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16753
16754         * domain.c: don't include the mark byte in the string hash.
16755
16756 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16757
16758         * icall.cs: icall for Type.GetTypeCode ().
16759         * verify: a couple of fixes and disabled local initialization checks.
16760
16761 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
16762
16763         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16764
16765         * debug-helpers.c (mono_method_full_name): print the type of the
16766         runtime wrapper
16767
16768         * metadata.c (mono_signature_hash): a hash function for signatures
16769         (mono_signature_hash): better hash algorithm
16770
16771         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16772
16773         * debug-helpers.c (mono_method_full_name): this can now generate
16774         method names with signatures
16775
16776         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16777         method dont have this pointers.
16778
16779 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16780
16781         * reflection.c: fixup typebuilder tokens.
16782         * image.c: fix buglet.
16783         * marshal.h: remove whitespace.
16784         * metadata.h, metadata.c: reinstate code that was removed.
16785         * verify.c: handle catch directives and fix another couple of bugs.
16786
16787 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
16788
16789         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16790         (mono_marshal_get_native_wrapper): make it comp. with the old code
16791         (mono_marshal_get_native_wrapper): support boolean
16792         (mono_marshal_get_managed_wrapper): support more types
16793
16794 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
16795
16796         * class.c (class_compute_field_layout): compute class->blittable attribute.
16797
16798 2002-07-09  Dick Porter  <dick@ximian.com>
16799
16800         * threads.c: Make the thread cleaning up cope with threads that
16801         call ExitThread()
16802
16803 2002-07-08  Radek Doulik  <rodo@ximian.com>
16804
16805         * reflection.c (method_encode_code): use non-translated values to
16806         compute finally_start, this fixes exception handling on ppc, yay!
16807
16808         * decimal.h (struct signscale): fix endianess
16809
16810 2002-07-07  Radek Doulik  <rodo@ximian.com>
16811
16812         * reflection.c: swap box_val and not val
16813
16814 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16815
16816         * reflection.c, reflection.h: handle full assembly info in type name.
16817         Handle Type arguments when loading custom attributes.
16818         * icall.c: updated to use new mono_reflection_type_from_name () method.
16819
16820 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16821
16822         * loader.c:
16823         (method_from_memberref): also print assembly name when method not found.
16824
16825 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16826
16827         * icall.c:
16828         (ves_icall_TypeGetProperties): fixed bug #27473. 
16829
16830 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16831
16832         * reflection.c: display image name and token when cannot find the
16833         .ctor for an attribute.
16834
16835 2002-07-05  Martin Baulig  <martin@gnome.org>
16836
16837         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16838
16839 2002-07-04  Dick Porter  <dick@ximian.com>
16840
16841         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16842         compile on mingw.  This will cause mingw builds to not wait for
16843         subthreads to terminate after the main thread does.  I've lodged a
16844         bug with the mingw developers for them to wrap OpenThread().
16845
16846 2002-07-03  Dick Porter  <dick@ximian.com>
16847
16848         * threads.c: Store thread IDs instead of handles, because
16849         GetCurrentThread() returns a pseudohandle and therefore stores
16850         useless values.  mono_thread_cleanup() continues checking the
16851         array of threads until it is empty, to cope with subthreads
16852         spawning new threads after the main thread has finished.
16853
16854         * profiler.h:
16855         * profiler.c:
16856         * profiler-private.h: Pass the thread ID to thread profiler
16857         functions, instead of a handle
16858
16859 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16860
16861         * verify.c: fixes to make it more usable.
16862         * pedump.c: added --verify code to verify IL code in an assembly.
16863
16864 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16865
16866         * reflection.c: turn errors into warnings to allow compiling corlib.
16867
16868 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16869
16870         * reflection.c: add special cases to compile corlib.
16871
16872 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16873
16874         * reflection.c: handle properties with only a set method.
16875
16876 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16877
16878         * opcodes.h: add enum with opcodes in opval order.
16879
16880 2002-07-01  Dick Porter  <dick@ximian.com>
16881         
16882         * object.h:
16883         * object.c (mono_runtime_run_main): Removed unneeded argument
16884
16885 2002-06-28  Martin Baulig  <martin@gnome.org>
16886
16887         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16888
16889 2002-06-27  Dick Porter  <dick@ximian.com>
16890
16891         * threads.c: Store the handle in both the parent thread and in the
16892         subthread, to minimise the time between starting a new thread and
16893         storing its ID.
16894
16895 2002-06-26  Dick Porter  <dick@ximian.com>
16896
16897         * appdomain.c (mono_runtime_cleanup): Close the socket library
16898         after all the threads have finished, not before
16899
16900 2002-06-26  Martin Baulig  <martin@gnome.org>
16901
16902         * debug-symfile.c (mono_debug_find_source_location): Added
16903         `guint32 *line_number' argument.  If it's not NULL, store the line number
16904         there and return the file name without the line number.
16905
16906 2002-06-25  Dick Porter  <dick@ximian.com>
16907
16908         * icall.c:
16909         * process.h:
16910         * process.c: Process forking and other support functions
16911
16912 2002-06-25  Dick Porter  <dick@ximian.com>
16913
16914         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16915         things dont happen when the image is closed.
16916         (mono_image_lookup_resource): Walk the resource section looking
16917         for a particular entry
16918
16919         * cil-coff.h: PE resource section decoding
16920
16921 2002-06-25  Dick Porter  <dick@ximian.com>
16922         
16923         * assembly.h:
16924         * assembly.c: 
16925         (mono_assembly_foreach): Accessor functions to walk the list of
16926         loaded assemblies
16927         (mono_assembly_set_main):
16928         (mono_assembly_get_main): Process methods need to know which
16929         assembly is the "main" one
16930
16931         * object.c (mono_runtime_run_main): Record the main assembly
16932
16933         * debug-helpers.c: Fix typo
16934
16935 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
16936
16937         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16938         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16939
16940 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16941
16942         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16943
16944 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
16945
16946         * image.c (do_mono_image_open): Initialize reference count,
16947         otherwise we leak the MonoImage.
16948
16949 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16950
16951         * reflection.c: small tweak to handle self-hosting.
16952
16953 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16954
16955         * reflection.c: fix type name parse code.
16956
16957 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16958
16959         * reflection.c: break out of the loop.
16960         * image.c: special case corlib.
16961
16962 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16963
16964         * reflection.c: add all the custom attrs at the end to ensure the
16965         ctors have been properly initialized when the attributes are defined
16966         in the current assembly.
16967
16968 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16969
16970         * reflection.c: handle correctly multiple-nested types.
16971
16972 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16973
16974         * row-indexes.h: fix typos.
16975         * reflection.c: adjust for typos and fix method_def_or_ref
16976         encoding in MethodImpl table.
16977
16978 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16979
16980         * reflection.c: fix entry point patching (thanks Serge!).
16981
16982 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
16983
16984         * verify.c: add check for System.Exception
16985
16986 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16987
16988         * image.c, class.c: minifix for code just c&p'ed.
16989         * reflection.c: warning fix.
16990         * object.h, loader.h, domain.c: load also StringBuilder.
16991
16992 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16993
16994         * marshal.h, marshal.c: some support code to handle complex marshaling.
16995
16996 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16997
16998         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16999         Better signatures with vtable error dump.
17000
17001 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
17002
17003         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
17004
17005 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
17006
17007         * icall.c (ves_icall_Type_GetField): impl.
17008
17009 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17010
17011         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
17012         to retrieve a marshal description blob for a field or param.
17013
17014 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17015
17016         * reflection.h, reflection.c: change order of nested type emission
17017         to avoid table corruption. The NestedTypes table is sorted.
17018         * icall.c: change order of GetConstructor results to workaround mcs bug.
17019
17020 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17021
17022         * reflection.h, reflection.c: handle field and param marshal
17023         information.
17024
17025 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17026
17027         * icall.c, marshal.c marshal.h: more Marshal class implementation.
17028
17029 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17030
17031         * reflection.c: fix call convention.
17032
17033 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17034
17035         * reflection.h, reflection.c: mono_image_get_memberref_token()
17036         takes a type instead of a class, now. Added
17037         mono_image_get_array_token() to create tokens for the special
17038         multi-dim array methods.
17039
17040 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17041
17042         * assembly.c: handle modules (no assembly table). Split
17043         loading references in its own function.
17044         * class.c: handle moduleref resolution scope.
17045         * image.c, image.h: cache module name in image.
17046
17047 2002-06-07  Martin Baulig  <martin@gnome.org>
17048
17049         * reflection.c (mono_image_get_type_info): Only add a class layout entry
17050         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17051
17052 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17053
17054         * icall.c: more signature fixes that used uint instead of int.
17055
17056 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17057
17058         * reflection.c: fixed signature of field refs.
17059
17060 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17061
17062         * class.c, reflection.c: handle typerefs of nested types
17063         (both on read and when writing files).
17064
17065 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17066
17067         * icall.c: fix method signatures that tried to workaround the previous
17068         typo, d'oh!
17069
17070 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17071
17072         * debug-helpers.c: fix typo.
17073
17074 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17075
17076         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17077         rewrote the PE/COFF writing code (our programs are understood by the
17078         ms runtime, now).
17079
17080 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17081
17082         * gc.c, gc.h, icall.c: weakreference support.
17083
17084 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17085
17086         * Makefile.am, mono-config.c: use $(sysconfdir).
17087
17088 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17089
17090         * icall.c: changed default precision of Double.ToString() to 15.
17091         Fixed memory leak. Unified with Single.ToString.
17092
17093 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17094
17095         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17096
17097 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17098
17099         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17100         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17101         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17102         and myself.
17103
17104 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17105
17106         * debug-symfile.c, sysmath.c: yet more compilation fixes.
17107
17108 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17109
17110         * reflection.c, socket-io.c: more compilation fixes.
17111
17112 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17113
17114         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17115         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17116         unicode.c: warning and compiler compatibility fixes.
17117
17118 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17119
17120         * class.h, metadata.c: fixed warnings/compilation errors.
17121
17122 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17123
17124         * Makefile.am, mono-config.c, mono-config.h: configuration file
17125         support routines.
17126         * loader.c, loader.h: make Dll mapping configurable at runtime in the
17127         config file. Export methods to insert and lookup mappings.
17128
17129 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17130
17131         * reflection.c: handle types and boxed objects in custom attr
17132         constructors.
17133
17134 2002-05-30  Martin Baulig  <martin@gnome.org>
17135
17136         * debug-symfile.c
17137         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17138
17139 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17140
17141         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17142         to lookup the implmap row for a P/Invoke method.
17143         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17144         P/Invoke method from the runtime on an as needed basis.
17145
17146 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
17147
17148         * metadata.c (mono_metadata_parse_signature): impl.
17149
17150 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17151
17152         * class.c: handle .pack directive.
17153
17154 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17155
17156         * object.c: initialize static fields with RVA data.
17157
17158 2002-05-25  Martin Baulig  <martin@gnome.org>
17159
17160         * debug-symfile.c
17161         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17162
17163 2002-05-24  Martin Baulig  <martin@gnome.org>
17164
17165         * debug-symfile.c
17166         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17167         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17168         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17169
17170 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17171
17172         * object.c: special case string ctros in invoke.
17173         * gc.c: silly whitespace changes.
17174
17175 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
17176
17177         * threadpool.[ch]: impl. a threadpool that can
17178         be used by mint and mono.
17179
17180 2002-05-22  Martin Baulig  <martin@gnome.org>
17181
17182         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17183         The first argument is now a `MonoReflectionModuleBuilder *', the return
17184         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
17185         `methods' field to get the method builder.  The `token' argument is the
17186         unfixed token.
17187
17188         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17189         invalid characters instead of g_assert_not_reached()ing.  This seems
17190         to be the behaviour of mscorlib.
17191
17192 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
17193
17194         * object.c (mono_runtime_invoke_array): applied patch from Rachel
17195         Hestilow to fix bug #25104
17196
17197 2002-05-21  Martin Baulig  <martin@gnome.org>
17198
17199         * debug-symfile.c (mono_debug_find_source_location): New function.
17200         Looks up an IL offset in the line number table and returns the source
17201         location as a string.
17202
17203 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17204
17205         * icall.c:
17206         (mono_double_ToStringImpl): changed %f by %g until we have something
17207         better.
17208
17209 2002-05-21  Nick Drochak  <ndrochak@gol.com>
17210
17211         * icall.c : Use different name for Math.Pow's icall.  Needed to check
17212         parameters first in C#.
17213
17214 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17215
17216         * icall.c, reflection.h: added icall to get info about an event.
17217
17218 2002-05-20  Radek Doulik  <rodo@ximian.com>
17219
17220         * object.c (mono_value_box): don't use memcpy for boxing on BIG
17221         endian
17222         (mono_value_box): don't use memcpy for small sizes on
17223         architectures with unaligned access
17224
17225 2002-05-20  Martin Baulig  <martin@gnome.org>
17226
17227         * reflection.c (mono_reflection_setup_internal_class): Don't crash
17228         if `tb->parent == NULL'.
17229         (mono_reflection_create_internal_class): New function.  This is
17230         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17231         for enum types.
17232
17233         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17234         New interncall.
17235
17236 2002-05-19  Martin Baulig  <martin@gnome.org>
17237
17238         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17239         argument to get the length, don't default to the array length.
17240
17241 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
17242
17243         * assembly.c (mono_assembly_setrootdir): New function used to
17244         override the MONO_ASSEMBLIES directory.
17245
17246 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17247
17248         * icall.c: ValueType_GetHashCode() initialize local var.
17249
17250 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17251
17252         * reflection.c: sort custom attributes table.
17253
17254 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17255
17256         * reflection.c: support named args in custom attributes (write support).
17257
17258 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17259
17260         * reflection.c: fix finally position calculation.
17261
17262 2002-05-15  Radek Doulik  <rodo@ximian.com>
17263
17264         * reflection.c: fixed endianess at many places
17265
17266         * icall.c (ves_icall_InitializeArray): comment out debug msg
17267
17268 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
17269
17270         * object.c (mono_unhandled_exception): new function to handle
17271         unhandled exceptions.
17272         (mono_unhandled_exception): call the UnhandledException event.
17273         (mono_runtime_delegate_invoke): impl.
17274
17275 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17276
17277         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17278         returns the RVA, not the direct pointer to the data. Handle the case
17279         when the class size is fixed.
17280
17281 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17282
17283         * reflection.c: fix some endianess issues.
17284
17285 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
17286
17287         * object.c (mono_runtime_invoke): is now able to catch exceptions.
17288
17289         * threads.c (mono_thread_init): added a callback which is invoked
17290         at thread start.
17291
17292 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17293         
17294         * icall.c: make GetHashCode return non-negative values.
17295
17296 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17297
17298         * object.c, icall.c, gc.c: revert to address-based hashcode.
17299
17300 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
17301
17302         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17303
17304 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17305
17306         * icall.c, class.c: special case <Module>.
17307
17308 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
17309
17310         * icall.c: fix bug in GetNow().
17311
17312 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
17313
17314         * object.c (mono_runtime_class_init): make sure that we call all
17315         static class constructors.
17316
17317 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17318
17319         * reflection.c: sort methodsemantics table.
17320
17321 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17322
17323         * reflection.h, reflection.c: honour init locals setting.
17324
17325 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17326
17327         * icall.c: copied Double ToStringImpl for Single ToStringImpl
17328
17329 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17330
17331         * reflection.c: support ContructorBuilders in attribute blob creation.
17332
17333 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17334
17335         * reflection.c: some changes to build a binary that can be run
17336         directly in windows.
17337
17338 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17339
17340         * loader.c: print a big message when an icall can't be found.
17341
17342 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17343
17344         * string-icalls.c: fix bug 24248.
17345
17346 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17347
17348         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17349         icall.c, reflection.h: separate assembly loading by pathname and by
17350         assembly name. Use the MONO_PATH env var to search for assemblies.
17351
17352 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17353
17354         * assembly.c, image.h: add some support for assemblies
17355         with multiple modules.
17356         * class.c, class.h: export mono_class_from_typeref().
17357         * loader.c: remove duplicated code and use mono_class_from_typeref(),
17358         instead.
17359
17360 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17361
17362         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17363         documentation says (the ECMA one is correct).
17364
17365 2002-05-02  Dick Porter  <dick@ximian.com>
17366
17367         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17368         Don't name the synchronisation mutex.
17369
17370 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
17371
17372         * rand.c
17373         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17374         Make the prototypes match.
17375         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17376         Same.
17377
17378         * icall.c
17379         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17380         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17381         all systems have tm.tm_zone, so use strftime() with %Z to print
17382         the timezone abreviation into a temp string.
17383
17384         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17385         rather than mono_array_addr() on a MonoString on Big Endian
17386         machines.
17387
17388 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
17389
17390         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17391         fix bug 24041
17392
17393 2002-04-30  Dick Porter  <dick@ximian.com>
17394
17395         * socket-io.c: Cope with SOCKET being an integer rather than a
17396         pointer now.
17397
17398         * threads.c: Added Thread_free_internal, to deal with thread
17399         handle cleanup.  Moved calls to handle_store() and handle_remove()
17400         to start_wrapper(), so each can only be called once.  Allocate
17401         synchronisation blocks with GC_malloc(), and use GC finalisation
17402         to close the handles.
17403
17404         * icall.c: added System.Threading.Thread::Thread_free_internal
17405
17406 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17407
17408         * icall.c: support Environment.Exit, CommandLineArgs().
17409
17410 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17411
17412         * object.c, object.h: added mono_runtime_run_main () and
17413         mono_runtime_get_main_args () for use in System.Environment.
17414
17415 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17416
17417         * gc.c: fix thinko, enable actual finalization since the jit is now
17418         fixed.
17419
17420 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17421
17422         * gc.c, object.c: take into account that an object may be offset wrt the address
17423         returned by GC_malloc().
17424
17425 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17426
17427         * image.c: handle files without entries in the assembly table (modules).
17428
17429 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17430
17431         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
17432         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17433         allowed to be null when it's System.Object class setup.
17434
17435 2002-04-27  Martin Baulig  <martin@gnome.org>
17436
17437         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17438         if `tb->parent == NULL' rather than crashing.
17439
17440 2002-04-28  Nick Drochak  <ndrochak@gol.com>
17441
17442         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
17443         calling acos() where asin() should have been called.
17444
17445 2002-04-26  Martin Baulig  <martin@gnome.org>
17446
17447         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17448         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17449         there's a subdirectory called `System', but we don't want to read that
17450         subdirectory as an assembly.
17451
17452 2002-04-25  Martin Baulig  <martin@gnome.org>
17453
17454         * debug-symfile.c: Reflect latest MonoString changes.
17455
17456 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17457
17458         * rand.c, rand.h: instance method icalls need to have an explicit
17459         this pointer as first argument in the C implementation.
17460
17461 2002-04-25  Nick Drochak <ndrochak@gol.com>
17462
17463         * icall.c: Fix typo in map for GetNonZeroBytes
17464
17465 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17466
17467         * string-icalls.c : String does now passes unit tests without any 
17468         errors, the following changes has been made:
17469         
17470         Implemented replace methods.
17471         Renaming of methods to (try) follow the standard.
17472         Fixed compare ordinal
17473         Made all memory allocated directly to function instead of via icall function.
17474         Small performance fix in is_in_array function
17475                         
17476  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17477
17478         c (mono_string_Internal_ctor_charp_int_int):
17479         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
17480         sindex < 0, throw ArgumentOutOfRangeException instead of
17481         ArgumentNullException.
17482
17483         Added new check for length == 0, however
17484         I need to make it return String.Empty from the C code.
17485         
17486         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17487         that calculate the length for us here.
17488         
17489         (mono_string_Internal_ctor_sbytep_int_int): Replaced
17490         mono_string_new_utf16 with mono_string_new, since value is utf8.
17491
17492 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17493
17494         * object.c: register the object for finalization if needed.
17495         Allocate one more char in the string for the terminating 0 char.
17496
17497 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17498
17499         * class.c, class.h, image.c: check if a type implemenst a destructor.
17500         Use the proper key for array class lookups.
17501         * icall.c: register the icalls in the System.GC class.
17502         * gc.c, gc.h: GC-related functions and icalls.
17503
17504 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17505
17506         * icall.c:
17507         * socket-io.c:
17508         * unicode.c: free some strings gotten from mono_string_to_utf8 and
17509         changed a couple of free () by g_free ().
17510
17511         * decimal.c: one-liner in the comments for decimal2string ().
17512
17513 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17514
17515         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17516
17517 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17518
17519         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17520         * object.c (mono_runtime_invoke_array) : handle null in params
17521
17522 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17523
17524         * string-icalls.c: fixed bug in split (one off bug)
17525
17526 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17527
17528         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17529         * icalls.c: added String::Equals as internal method
17530
17531 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17532
17533         * threads.c: fixed bug in the double interlocked functions
17534
17535 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
17536
17537         * threads.c: implemented all of the new interlocked icalls.
17538         * string-icalls.c: fix a bug in insert.
17539         * icalls.c: added the icalls for interlocked, removed old string functions.
17540         
17541 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17542
17543         * loader.c: fix off-by-one error when reading argument names.
17544
17545 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17546
17547         * profiler.c: win32 counter implementation (untested).
17548         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17549         (the latter needs testing and more complete impl. from win32 folks).
17550
17551 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
17552
17553         * object.c: mono_array_new_full workaround mono_array_class_get
17554         problem.
17555
17556 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17557
17558         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17559         * object.h (mono_string_chars): Changed casting type.
17560
17561 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17562
17563         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17564                            method signatures to use gunichar2 instead of gint16.
17565
17566 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
17567
17568         * object.h, object.c: domain-specific versions of mono_object_new and
17569         mono_array_new.
17570
17571 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
17572
17573         * object.c: changed String layout
17574
17575         * string-icalls.c (mono_string_Internal_ctor_chara): added
17576         internal string constructors.
17577
17578 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17579
17580         * threads.c: pass 'this' to the thread start routine.
17581
17582 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17583
17584         * string-icalls.c: fix IndexOf and LastIndexOf. Now
17585         InternalCompareStr don't call twice mono_string_cmp_char for the last
17586         character. Improved performance in mono_string_cmp_char.
17587
17588 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17589
17590         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17591         code into its own library: libmonoruntime.
17592
17593 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
17594
17595         * object.h, object.c: changed array format so that szarrays do not
17596         require a bounds structure.
17597         * icall.c, appdomain.c: support for new szarray format.
17598
17599 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17600
17601         * metadata.c: compare also the retuns type when comparing signatures:
17602         we didn't do this as an optimization since really overloaded methods
17603         must differ also in the arguments, but this doesn't work with
17604         low-level IL code (or when using explicit conversion operators: see
17605         bug#23498 for an example).
17606
17607 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17608
17609         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17610
17611 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17612
17613         * icall.c: make MonoType::GetElementType its own icall.
17614
17615 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17616
17617         * icall.c: remove MonoMethod_get_Name().
17618         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17619         object.
17620
17621 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17622
17623         * string-icalls.c: optimized a few methods.
17624
17625 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17626
17627         * icall.c: added all new string internal calls
17628         * string-icalls.c: added, new string internal call implementation.
17629         * object.c: added mono_string_new_size for allocating a string a size
17630
17631 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
17632
17633         * object.c (mono_object_isinst): use the same code as in the
17634         optimized x86 version.
17635
17636 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17637
17638         * profiler.c: TSC-based timer code (faster and more accurate).
17639         Not hooked up in configure, yet (set USE_X86TSC to 1).
17640
17641 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17642
17643         * profiler.c, profiler.h: track time spent compiling methods.
17644         * threads.c: track thread creation/destruction.
17645
17646 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17647
17648         * profiler.c, profiler.h, profiler-private.h: profiling interface
17649         and sample implementation. Moved here so that it can be used also by
17650         the jit.
17651
17652 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17653
17654         * reflection.c, reflection.h: keep types and other handles separate in
17655         the hash tables for referred tokens. Add guid for modules.
17656
17657 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17658
17659         * assembly.c: fix bugs found with valgrind.
17660         * metadata.h, metadata.c: added mono_metadata_guid_heap().
17661
17662 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
17663
17664         * threads: added icall support for getting current domain for
17665                    the thread.
17666  
17667 2002-04-13  Martin Baulig  <martin@gnome.org>
17668
17669         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17670         (MonoDebugVarInfo): Added `index' field for register based addresses.
17671         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17672         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17673         `MonoDebugVarInfo *params' and `guint32 this_offset' with
17674         `MonoDebugVarInfo *this_var'.
17675
17676         * debug-symfile.c (relocate_variable): New static function to write
17677         a location description for a local variable or method parameter.
17678
17679 2002-04-12  Martin Baulig  <martin@gnome.org>
17680
17681         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17682         stack offset and begin/end scope address of a local variable.
17683         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17684         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17685         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17686
17687         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17688         Added new relocation types for start/end scope of a local variable.
17689
17690 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17691
17692         * object.h: add mono_object_domain() macro.
17693         * reflection.c: handle typespecs.
17694         * icall.c: MonoMethod::get_Name() implementation.
17695
17696 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17697
17698         * icall.c: String::GetHashCode() icall implementation.
17699
17700 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17701
17702         * icall.c: String::IndexOfAny icall.
17703         * object.c, object.h: make array->max_length more useful.
17704         Intrduced mono_object_class() and mono_string_length() macros.
17705
17706 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17707
17708         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17709         instead of g_unichar_isdigit.
17710
17711 2002-04-11  Nick Drochak  <ndrochak@gol.com>
17712
17713         * icall.c: Implement a simple Double.ToString().
17714
17715 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17716
17717         * appdomain.h: only io-layer.h is supposed to be included.
17718         * icall.c: explicitly import environ. Fix warning.
17719
17720 2002-04-10  Nick Drochak  <ndrochak@gol.com>
17721
17722         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17723                 return true even if it's not Daylight Savings time.
17724                 Only return false for the case where the function isn't
17725                 implemented for a plaform (read Windows).
17726
17727 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17728
17729         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17730         data with a mutex.
17731
17732 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
17733
17734         * mempool.c (mono_mempool_alloc): only use g_malloc when
17735         absolutely necessary.
17736
17737 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17738
17739         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17740
17741         * class.c (mono_class_vtable): use domain mempool to allocate vtable
17742         (mono_class_proxy_vtable): use domain mempool
17743
17744 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17745
17746         * appdomain.h, appdomain.c: split initialization that requires the
17747         execution engine support into mono_runtime_init().
17748
17749 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17750
17751         * class.c (mono_class_init): don't include vtable inside MonoClass
17752         to save some memory, gather some statistics.
17753         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17754
17755 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17756
17757         * icall.c: internalcall implementation for ValueType.Equals().
17758
17759 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
17760
17761         * object.c (mono_message_init): moved 
17762         (mono_runtime_exec_main): new arch. independent impl.
17763         (mono_runtime_invoke_array): new method - like
17764         mono_runtime_invoke, but you can pass an array of objects.
17765         (mono_remoting_invoke): new arch. independent impl.
17766         (mono_message_invoke): new arch. independent impl.
17767         (mono_runtime_class_init): new arch. independent impl.
17768         (mono_runtime_object_init): new arch. independent impl.
17769
17770 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17771
17772         * metadata.c, object.c, reflection.c: documented the exported
17773         functions.
17774
17775 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17776
17777         * icall.c: simpler code to pass the assembly builder data to corlib.
17778         Implement GetNestedTypes() internalcall.
17779
17780 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17781
17782         * class.c: warn if a type can't be loaded.
17783
17784 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
17785
17786         * image.h: typedef MonoImageOpenStatus
17787         * types.h: removed unused file
17788         
17789 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
17790
17791         * icall.c: Enum_ToObject accepts enum value arguments.
17792
17793 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17794
17795         * class.c: move initialization of properties, events and nested
17796         classes, so that they happen for interfaces, too.
17797
17798 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17799
17800         * icall.c: cleanup some ugly casts in Array_SetValue*.
17801
17802 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17803
17804         * icall.c: the values array fro enums is of the correct type, now.
17805         Implement (correctly) getFullName instead of assQualifiedName for
17806         MonoType.
17807         * reflection.h, reflection.c: added mono_type_get_name ().
17808
17809 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17810
17811         * assembly.c, image.h: for each MonoImage, record from wich assembly
17812         it was loaded.
17813         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17814         Make Type.Assembly work.
17815
17816 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
17817
17818         * debug-symfile.h: use char* instead of gpointer to avoid
17819         unnecessary casts.
17820
17821         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17822
17823         * icall.c (ves_icall_InternalExecute): impl. FielSetter
17824         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17825
17826 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
17827
17828         * icall.c (mono_message_init): impl. (code cleanup)
17829         (ves_icall_InternalExecute): impl. FieldGetter
17830
17831         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17832         defined we call all (non-static)methods through the vtable. 
17833
17834 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17835
17836         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17837         finalizer even though the memory is still referenced (and the chunk of
17838         memory is not freed).
17839
17840 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17841
17842         * assembly.c: fix brokeness.
17843
17844 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17845
17846         * class.c: kill some warnings. Check explicit interface method
17847         implementation also without considering the namespace.
17848         Load also literal strings in static class data.
17849
17850 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
17851
17852         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
17853         (default_assembly_name_resolver): Make the resolver take the
17854         "base" directory where the assembly was originally defined, so we
17855         can load DLLs that are in the same directory as the assembly that
17856         is being referenced.
17857
17858 2002-03-28  Dick Porter  <dick@ximian.com>
17859
17860         * file-io.h: 
17861         * file-io.c:
17862         * socket-io.c: 
17863         * unicode.h: 
17864         * unicode.c: Warning cleanups
17865
17866 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17867
17868         * object.h, reflection.h: use the correct type instead of MonoObject.
17869
17870 2002-03-28  Martin Baulig  <martin@gnome.org>
17871
17872         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17873         (mono_debug_update_symbol_file): Initialize classes if necessary.
17874
17875 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17876
17877         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17878         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17879
17880 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17881
17882         * assembly.h: fix function prototype.
17883         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17884         * mono-endian.h: use const cast.
17885
17886 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17887
17888         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17889
17890 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17891
17892         * loader.c: don't assert when a typeref can't be loaded, give
17893         a chance to the runtime to trow an exception instead.
17894         * loader.h: fix warning.
17895
17896 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17897
17898         * class.c (mono_class_proxy_vtable): added proxy support
17899
17900 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
17901
17902         * icall.c: removed last of PAL calls, added System.Environment
17903         * file-io.h, file-io.c: MonoIO implementation
17904         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17905
17906 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17907
17908         * appdomain.c: do not use the byte marker in ldstr table lookup.
17909         * debug-helpers.c: allow two ':' to separate class and method name.
17910         * object.c: allocate arrays bounds with the GC, too.
17911         * verify: add a few more checks.
17912
17913 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17914
17915         * reflection.c: output also literal strings. Allocate parameter data
17916         with GC_malloc() (thanks, Martin, for catching this!).
17917
17918 2002-03-26  Martin Baulig  <martin@gnome.org>
17919
17920         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17921         include the `this' offset in the `param_offsets'.
17922
17923 2002-03-25  Martin Baulig  <martin@gnome.org>
17924
17925         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17926         mono_debug_get_class() function to get the classes. Added new
17927         relocation types for arrays and strings.
17928         (mono_debug_get_class): New static function to search in all
17929         referenced assemblies for a metadata token.
17930
17931         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17932
17933 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17934
17935         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17936         hold gc-allocated objects. Make the string heap a stream like the
17937         others. Removed duplicated code when writing stream info.
17938         Added asserts to catch possible buffer overflows. Set the sorted map
17939         for tables that need sorting. Added some documentation.
17940
17941 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17942
17943         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
17944         for interned strings and vtables.
17945
17946 2002-03-24  Martin Baulig  <martin@gnome.org>
17947
17948         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17949         it in the array since it was created with g_slist_prepend().
17950
17951 2002-03-24  Martin Baulig  <martin@gnome.org>
17952
17953         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17954         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17955         (mono_debug_method_from_token): Renamed to
17956         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17957         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17958
17959         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17960         relocation types.
17961
17962         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17963
17964 2002-03-24  Martin Baulig  <martin@gnome.org>
17965
17966         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17967         (mono_debug_method_from_token): New func.
17968
17969         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17970         New interncall, calls mono_debug_local_type_from_signature().
17971         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17972         calls mono_debug_method_from_token().
17973
17974 2002-03-23  Martin Baulig  <martin@gnome.org>
17975
17976         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17977         specifies the number of bytes to be converted, not the array size.
17978         Return the number of chars, not the number of bytes.
17979         (ves_icall_iconv_get_chars): The `byteCount' argument
17980         specifies the number of bytes to be converted, not the array size.
17981
17982 2002-03-23  Martin Baulig  <martin@gnome.org>
17983
17984         * reflection.h (MonoReflectionSigHelper): New type.
17985
17986         * reflection.c (mono_reflection_sighelper_get_signature_local),
17987         (mono_reflection_sighelper_get_signature_local): New functions.
17988
17989         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17990         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17991         interncalls.
17992
17993 2002-03-23  Martin Baulig  <martin@gnome.org>
17994
17995         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17996         is_writeable is set.
17997         (mono_raw_buffer_update): New function to write the modified map
17998         back to disk.
17999
18000         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
18001
18002         * debug-symfile.c (mono_debug_update_symbol_file): Call
18003         mono_raw_buffer_update() when done writing.
18004
18005 2002-03-23  Martin Baulig  <martin@gnome.org>
18006
18007         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
18008
18009         * debug-symfile.c: Added support for arguments and local variables.
18010
18011 2002-03-23  Dick Porter  <dick@ximian.com>
18012
18013         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
18014         protected by ifdefs, hence breaking the w32 build.
18015
18016 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18017
18018         * object.c: implement is_interned() the right way.
18019
18020 2002-03-21  Martin Baulig  <martin@gnome.org>
18021
18022         * debug-symfile.[ch]: New files to handle debugging information
18023         files. There's also support to dynamically update these symbol
18024         files to include machine dependent information.
18025
18026 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
18027
18028         * threads.c (mono_thread_create): new function to create thread
18029         from C
18030
18031 2002-03-20  Martin Baulig  <martin@gnome.org>
18032
18033         * icall.c (ves_icall_InternalInvoke): Create a new object if the
18034         method is a constructor.
18035         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
18036         points to ves_icall_InternalInvoke().
18037
18038 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
18039
18040         * file-io.c: Flush shouldn't throw exceptions.
18041
18042 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
18043
18044         * file-io.c: FileStream flush support; FileSetLength now
18045         restores file pointer.
18046
18047 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18048
18049         * class.c: set image for pointer classes.
18050
18051 2002/03/19  Nick Drochak <ndrochak@gol.com>
18052
18053         * sysmath.c: Forgot one.
18054
18055 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
18056
18057         * sysmath.c: Avoid redefining existing names.
18058
18059 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
18060
18061         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18062         handled by runtime as icall rather than dllimport from libm.so
18063         * file-io.c, file-io.h: fixed handle argument type.
18064
18065 2002-03-18  Dick Porter  <dick@ximian.com>
18066
18067         * reflection.c (mono_image_get_type_info): rename interface to
18068         iface, because of "#define interface struct" on windows.
18069
18070 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18071
18072         * class.c, class.h: rename and export mono_ptr_class_get().
18073         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18074         * reflection.c, reflection.h, icall.c: better/saner type name
18075         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18076         method signatures.
18077
18078 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
18079
18080         * class.c (mono_class_init): removed hardcoded GHC_SLOT
18081
18082         * icall.c (ves_icall_InternalInvoke): impl.
18083
18084 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18085
18086         * reflection.c: output the interface map table, too.
18087
18088 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18089
18090         * class.c (class_compute_field_layout): separate computation of 
18091         static field layout
18092
18093 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
18094
18095         * icall.c: added System.Buffer support.
18096         * file-io.c: moved file icalls from PAL to FileStream.
18097
18098 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18099
18100         * icall.c (ves_icall_System_Object_GetHashCode): impl.
18101
18102 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
18103
18104         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18105
18106 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18107
18108         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18109
18110 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18111
18112         * debug-helpers.{c,h}: moved here from monograph some useful functions
18113         to locate a method by name/signature in a class or image. Included
18114         also a small and flexible IL disassembler.
18115
18116 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18117
18118         * reflection.c: fixup tokens in methods with small header size, too.
18119
18120 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
18121
18122         * object.c (mono_string_to_utf8): remove assert(!error), instead
18123         print a warning. 
18124
18125 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18126
18127         * icall.c: update to the new mono_Array_class_get interface.
18128
18129 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18130
18131         * appdomain.c, object.c: Boehm-GC enable.
18132         * icall.c: make get_data_chunk() support split data requests.
18133         Ensure a class is initialized in more cases. Return only the first
18134         property found in GetProperties() or the compiler gets confused. 
18135         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18136         * reflection.h, reflection.c: add fixup mechanism for field and method
18137         tokens. Initialize assembly->typeref in a single place. Output
18138         properties after events. Support custom attributes for events, too.
18139         Typo fix for paramter custom attrs.
18140
18141 2002-03-07  Martin Baulig  <martin@gnome.org>
18142
18143         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18144
18145 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
18146
18147         * class.c (mono_array_class_get): fix. for multi. dim. arrays
18148
18149 2002-03-06  Martin Baulig  <martin@gnome.org>
18150
18151         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18152         non-zero lower bounds. See testcases #F10-#F13.
18153
18154 2002-03-05  Martin Baulig  <martin@gnome.org>
18155
18156         * exception.c (mono_get_exception_argument_out_of_range): New exception.
18157
18158         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18159         ves_icall_System_Array_GetValue(), only calculate the absolute array position
18160         here.
18161         (ves_icall_System_Array_SetValue): Likewise.
18162         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18163         as argument and does the actual work. This function is used when copying a
18164         multi-dimensional array.
18165         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18166         now do all the widening conversions of value types.
18167         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18168
18169 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18170
18171         * class.c: remove some magic numbers and use the smbolic names,
18172         instead. Added init_events() to load event info at class init time.
18173         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18174         and mono_metadata_methods_from_event().
18175         * reflection.h, reflection.c: added support for writing out the evnets
18176         related information.
18177
18178 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18179
18180         * reflection.h, icall.c: use a different method (GetInterfaces)
18181         to gather interface info and add isbyref, isprimitive and
18182         ispointer to the ves_icall_get_type_info() return value.
18183
18184 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18185
18186         * class.h: stared adding support for events.
18187         * icall.c: split find_members implementation. Added debug icall to get
18188         the address of an object.
18189         * reflection.c: handle TypeBuilders in mono_type_get_object().
18190
18191 2002-03-01  Martin Baulig  <martin@gnome.org>
18192
18193         * icall.c (ves_icall_System_Array_GetLength): This must throw an
18194         ArgumentOutOfRangeException(), not an ArgumentException().
18195         (ves_icall_System_Array_GetLowerBound): Likewise.
18196         (ves_icall_System_Array_GetValue): Improved argument checking.
18197         (ves_icall_System_Array_SetValue): Improved argument checking.
18198
18199 2002-03-01  Martin Baulig  <martin@gnome.org>
18200
18201         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18202         called with invalid arguments rather than just dying with g_assert().
18203         (ves_icall_System_Array_SetValue): Likewise.
18204         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18205         raise a NotImplementedException instead.
18206         (ves_icall_System_Array_GetLength): Added argument checking.
18207         (ves_icall_System_Array_GetLowerBound): Added argument checking.
18208
18209 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
18210
18211         * object.h (mono_assert): new macros mono_assert and
18212         mono_assert_not_reached
18213
18214 2002-02-28  Martin Baulig  <martin@gnome.org>
18215
18216         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18217         and "System::String::IsInterned" to "System::String::_IsInterned".
18218
18219 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18220
18221         * icall.c: remove hacks for typebuilder. Added icall to create a
18222         modified type from a tybebuilder.
18223         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18224         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18225         to create a backing MonoClass for a TypeBuilder.
18226
18227 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18228
18229         * class.c, class.h: more refactoring of class init.
18230         Export mono_class_setup_mono_type() and mono_class_setup_parent().
18231
18232 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18233
18234         * marshal.c, marshal.h: start of marshaling interface.
18235
18236 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18237
18238         * icall.c: fix order in assembly qualified name icall.
18239
18240 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18241
18242         * class.c: do not free str, since we store it in the hash table.
18243         * reflection.h: add label field to MonoILExceptionInfo.
18244         * reflection.c: handle references to more than one assembly. Handle
18245         case when there isn't a module created in the assembly.
18246
18247 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18248
18249         * class.c: Fix typo. Start refactoring of class init code.
18250
18251 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18252
18253         * appdomain.c: exit with 1 on error.
18254         * class.c: we already have the name in MonoClassField.
18255         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18256         MonoStreamHeader instead of an offset of image->raw_metadata.
18257
18258 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
18259
18260         * appdomain.c (mono_init): Be even more descriptive about the error.
18261
18262 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18263
18264         * appdomain.c: give the user an informative message when corlib can't
18265         be loaded.
18266
18267 2002-02-26  Martin Baulig  <martin@gnome.org>
18268
18269         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18270         New icall to get the time zone data.
18271
18272 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18273
18274         * reflection.c: set virtual and raw size of section correctly.
18275         * threads.c: transfer domain information to newly created threads.
18276
18277 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18278
18279         * class.c: when instancing a class in a domain, load the default
18280         vaules for static fields from the constant table. Fix System.Enum to
18281         not be an enum.
18282         * icall.c: implement Object::GetType() internalcall. Implemented
18283         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18284         Fixed checking of binding flags in find_members().
18285         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18286         * reflection.c: handle enumerations when writing to the constant
18287         table. Use a different object cache for types.
18288
18289
18290 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
18291
18292         * object.c (mono_object_isinst): fix for arrays
18293
18294         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18295
18296 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18297
18298         * object.c: don't use mprotect ()  and fix intern pool hash table
18299         lookup for big endian systems.
18300
18301 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18302
18303         * icall.c: change type_is_subtype_of () signature.
18304
18305 2002-02-21  Mark Crichton  <crichton@gimp.org>
18306
18307         * rand.c, rand.h: Added random number generator for
18308         System.Security.Cryptography classes.
18309
18310         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18311
18312         * icall.c: Added System.Security.Cryptography calls.
18313
18314 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18315
18316         * class.c, icall.c, metadata.c: better support for pointer types.
18317         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18318         * reflection.c: Add support for getting custom attrs for properties
18319         and simplify some code.
18320
18321 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18322
18323         * icall.c: change getToken () and add custom attribute GetBlob()helper
18324         method.
18325         * reflection.h: add custom attrs array to the reflection builder structures.
18326         * reflection.c: encode and emit custom attributes for all the relevant
18327         reflection objects. Cache fieldref and methodref tokens. Change
18328         mono_image_create_token() interface to take a MonoDynamicAssembly.
18329         More complete custom attributes decoder. Load custom attributes for
18330         Assembly, Field, Method and Constructor objects, too. Make the
18331         returned array an Attribute[] one, not object[]. Added
18332         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18333         custom attribute constructor.
18334
18335 2002-02-20  Dick Porter  <dick@ximian.com>
18336
18337         * icall.c:
18338         * rawbuffer.c:
18339         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18340         problem code out for now).
18341
18342 2002-02-19  Radek Doulik  <rodo@ximian.com>
18343
18344         * object.c (mono_ldstr): use hash table to avoid multiple swapping
18345
18346 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18347
18348         * icall.c: register the GetCustomAttributes method.
18349         * object.c, object.h: add mono_string_new_len ().
18350         * reflection.h, reflection.c: added mono_runtime_invoke(),
18351         mono_install_runtime_invoke(). Added
18352         mono_reflection_get_custom_attrs () to load custom attributes and
18353         create the attribute objects.
18354
18355 2002-02-19  Dick Porter  <dick@ximian.com>
18356         * threads-dummy-types.c:
18357         * threads-dummy-types.h:
18358         * threads-dummy.c:
18359         * threads-dummy.h:
18360         * threads-pthread-types.c:
18361         * threads-pthread-types.h:
18362         * threads-pthread.c:
18363         * threads-pthread.h:  Deleted obsolete files
18364
18365 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
18366
18367         * class.c (mono_class_vtable): runtime init the class when we
18368         allocate static class data.
18369
18370         * icall.c (ves_icall_System_Array_SetValue): check for null values.
18371
18372         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18373         and String - but we will need generic marshalling support in the
18374         future. 
18375         (mono_init): set the domain name in a ms compatible way
18376
18377         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18378         String[].
18379
18380 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
18381
18382         * object.c (mono_array_clone): use alloca() instead of g_malloc  
18383         for sizes
18384
18385         * appdomain.c (mono_domain_unload): impl.
18386
18387 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18388
18389         * appdomain.c, object.c: fix intern pool implementation.
18390         * class.c: fix alignment code.
18391
18392 2002-02-16  Radek Doulik  <rodo@ximian.com>
18393
18394         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18395         and s2 > s1, just copy lower bytes to be compatible with little
18396         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18397         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18398
18399         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18400         force big_endian to be 1 for big endian machines 
18401         (ves_icall_iconv_new_decoder): ditto
18402
18403 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
18404
18405         * socket-io.c (convert_sockopt_level_and_name): If the system
18406         doesn't define SOL_IP or SOL_TCP, get them by hand using
18407         getprotobyname() and caching the values (because this could be a
18408         slow operation).
18409         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18410         Use the appropriate struct when the system does support it. Ie,
18411         not all systems have struct ip_mreqn so use struct ip_mreq when
18412         appropriate.
18413
18414 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18415
18416         * reflection.c: handle finally clauses.
18417
18418 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18419
18420         * socket-io.c: use g_snprintf() instead of snprintf.
18421
18422 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18423
18424         * reflection.c (mono_param_get_objects): Cast second argument to
18425         mono_method_get_param_names to a const char** to silence the
18426         compiler warning.
18427
18428         * appdomain.c (mono_domain_assembly_open): Put parens around the
18429         truth statement in the for-loop.
18430
18431         * unicode.c (iconv_convert): Got rid of a compiler warning about
18432         int i being unused when the system has a new iconv.
18433         (iconv_get_length): Same.
18434
18435         * image.c (load_class_names): Cast the second argument to
18436         g_hash_table_insert() to char* to hush compiler warnings about the
18437         arg being a const.
18438         (mono_image_open): Same here.
18439
18440         * socket-io.c: Don't conditionally include sys/filio.h or
18441         sys/sockio.h here anymore since we now get them from
18442         io-layer/io-layer.h
18443         (inet_pton): If the system doesn't support inet_aton, implement
18444         using inet_addr and also #define INADDR_NONE if it isn't defined
18445         by the system.
18446
18447 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18448
18449         * metadata.c, metadata.h: added function to get packing and size info
18450         of a typedef.
18451         * reflection.h, reflection.c: handle field RVA data. Save info about
18452         the table layout if needed. Assign typedef indexes to all the types
18453         before dumping the info about them to avoid forward reference problems.
18454
18455 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
18456
18457         * socket-io.c (convert_sockopt_level_and_name): ifdef
18458         SO_ACCEPTCONN because it is not defined on my system (old debian)
18459
18460 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18461
18462         * opcode.c: use stddef.h to get NULL.
18463
18464 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18465
18466         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18467         for FIONBIO, FIONREAD and SIOCATMARK.
18468         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18469         define INADDR_NONE and besides, inet_addr() is deprecated and
18470         should not be used. Use inet_pton() instead - it also has the
18471         added bonus that it can easily handle IPv6 addresses as well.
18472         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18473
18474 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18475
18476         * decimal.c: remove _MSC_VER conditional.
18477
18478 2002-02-13  Dick Porter  <dick@ximian.com>
18479
18480         * socket-io.c: 
18481         * icall.c: Internal calls for Blocking, Select, Shutdown,
18482         GetSocketOption and SetSocketOption
18483
18484 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18485
18486         * assembly.cs: better resolver: use it instead of some kludgy
18487         code.
18488
18489 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18490
18491         * reflection.c: the best way to speed-up the compiler is to avoid
18492         infinite loops.
18493
18494 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
18495
18496         * class.c (mono_class_vtable): changed the object layout
18497         (obj->vtable->class). 
18498         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18499
18500 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18501
18502         * assembly.c: look for assemblies in the assembly dir, too.
18503
18504 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18505
18506         * class.c: fix thinko in mono_class_from_type().
18507
18508 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18509
18510         * exception.h, exception.c: added TypeLoadException.
18511         * object.h, object.c: added mono_array_clone ().
18512         * icall.c: handle throwOnError in AssemblyGetType().
18513         Added Array.Clone().
18514         * opcode.h, opcode.c: use a single value for the opcode val.
18515         Compile fix for non-gcc compilers.
18516
18517 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18518
18519         * opcodes.c, opcodes.h: export interesting info about opcodes.
18520
18521 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
18522
18523         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18524         icalls. 
18525
18526         * class.c (class_compute_field_layout): set element_class for enums
18527         (mono_class_create_from_typedef): set element_class for normal classes
18528
18529         * icall.c (ves_icall_System_Enum_get_value): impl.
18530
18531         * class.c (mono_class_create_from_typedef): do not set valuetype
18532         flag for System.ValueType and System.Enum
18533
18534 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
18535
18536         * unicode.c (iconv_convert): fix big endian problem.
18537
18538 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18539
18540         * class.c: add asserts if we are ever going to scribble over memory.
18541         * socket-io.c: not all systems have AF_IRDA defined.
18542
18543 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
18544
18545         * class.c (class_compute_field_layout): do not consider static
18546         fields to compute alignment
18547
18548 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
18549
18550         * appdomain.c (mono_appdomain_get): impl.
18551         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18552
18553 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18554
18555         * icall.c: ignore "file://" prefix when loading an assembly.
18556
18557 2002-01-23  Dick Porter  <dick@ximian.com>
18558
18559         * socket-io.c:
18560         * icall.c:
18561         * Makefile.am: Added socket support
18562
18563 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18564
18565         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18566         code back.  This should return the assemblies that are loaded by
18567         the runtime on behalf of an application domain. 
18568
18569         The current implementation is still broken, it just returns every
18570         assembly loaded, but until we get real applications domain this
18571         will do.
18572
18573 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
18574
18575         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18576         AppDomain object.
18577
18578 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18579
18580         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18581         the mono_class_from_name lookup.
18582         (ves_icall_get_parameter_info): ditto.
18583         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18584         method.
18585         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18586
18587 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18588
18589         * class.c: load also nested classes on class init.
18590         System.ValueType instance methods gets passed boxed
18591         values, unless methods in derived classed that get a pointer to the
18592         data.
18593         * icall.c: use better name parsing code in GetType().
18594         * image.c, image.h: add mono_image_loaded ().
18595         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18596         * reflection.c, reflection.h: added mono_reflection_parse_type().
18597
18598 2002-01-22  Veronica De Santis <veron78@interfree.it>
18599
18600         * icall.c : Added mapping of internal calls for Manual and Auto reset events
18601         * threads.c : Added the implementation of internal calls for events
18602         * threads.h : Added prototypes of internal calls for events
18603         
18604 2002-01-21  Radek Doulik  <rodo@ximian.com>
18605
18606         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18607
18608 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
18609
18610         * class.c (mono_class_init): set min_align to 1 (instead of 0)
18611         (mono_class_value_size): use min_align
18612
18613 2002-01-20  Dick Porter  <dick@ximian.com>
18614
18615         * threads.h:
18616         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18617         so it compiles on w32.
18618
18619 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
18620
18621         * metadata.c (mono_type_stack_size): impl.
18622
18623         * class.c (mono_class_get_field): impl. memberref token
18624
18625 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18626
18627         * icall.h : Added the internal calls mapping for CreateMutex_internal
18628                     and ReleaseMutex_internal.
18629         * threads.h : Added the prototype of mutexes internal calls.
18630         * threads.c : Added the implementations of mutexes internal calls.
18631
18632 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18633
18634         * metaparse.h: removed unused file.
18635         * reflection.c, reflection.h: added stream_data_align () function 
18636         to align data in streams and keep stream aligned. Add support for
18637         exception support in method headers.
18638
18639 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18640
18641         * unicode.c: make iconv_convert () return the number of bytess written
18642         in the output buffer.
18643
18644 2002-01-15  Dick Porter  <dick@ximian.com>
18645         * threads.c: Make the runtime's idea of infinite timeouts coincide
18646         with the class library's
18647
18648         Fix a particularly egregious bug in mono_thread_cleanup(). That
18649         code was so utterly bogus it must have been written on a Monday.
18650
18651 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18652
18653         * reflection.h: add subtypes field to TypeBuilder.
18654         * reflection.c: encode constants for literal fields.
18655         Handle subtypes. Fix user string token (and add a zero byte)
18656         at the end.
18657         
18658 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
18659
18660         * class.c (mono_class_init): bug fix: assign slot numbers for
18661         abstract methods.
18662
18663 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18664
18665         * reflection.c: don't try to output a code RVA for abstract methods.
18666         Small fixes for method header format. Output parameter info to the
18667         ParamDef table. Save method overriding info to MethodImpl table.
18668         Fix property support. Allow typedef.extends to be a type in the
18669         building assembly.
18670         * verify.c: fix off-by-one error.
18671
18672 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18673
18674         * class.c: fix mono_class_from_mono_type () for szarray types.
18675         Remove unused cache check in mono_class_from_type_spec().
18676         * icall.c: *type_from_name () functions handle simple arrays and byref.
18677         * reflection.c: handle byref and szarray types. Handle methods without
18678         body (gets P/Invoke compilation working). Handle types and fields in
18679         get_token ().
18680         * reflection.h: add rank to MonoTypeInfo.
18681
18682 2002-01-10  Dick Porter  <dick@ximian.com>
18683
18684         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18685         internal calls
18686
18687 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18688
18689         * icall.c: initialize class in type_from_handle ().
18690         Loop also in parent classes for get_method ().
18691         * reflection.c: properly encode class and valuetype types.
18692         Start on encoding TypeBuilder types. Handle fieldrefs.
18693         Use correct length when registering a user string.
18694         Handle ConstructorBuilder and MonoMethod in get_token ().
18695         Make mono_type_get_object () aware of cached types.
18696         * object.c: back out change to mono_string_new ().
18697
18698 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18699         * object.c: mono_string_new should return a NULL when the string 
18700         passed in is NULL -- not try to deference it.
18701         
18702 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18703
18704         * icall.c: hack to make IsSubType work for TypeBuilders.
18705         * reflection.c: emit constructors before methods.
18706         Retrieve param names in mono_param_get_objects().
18707
18708 2002/01/05  Nick Drochak  <ndrochak@gol.com>
18709
18710         * Makefile.am: fix list of headers and sources so automake 1.5
18711         doesn't complain. Removed \# at end of list.
18712
18713 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18714
18715         * reflection.c: get token for a method ref. Set return type of
18716         constructor to void.
18717         * loader.c: debug message.
18718         * class.c: typo fix.
18719
18720 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18721
18722         * icall.c: fix array init with rank > 1. FindMembers
18723         loops in parent class as well.
18724         * image.c: do not insert nested types in name cache.
18725         * reflection.c: warning fix.
18726         * reflection.h: add override method (for interface impl).
18727
18728 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18729
18730         * metadata.c: fix customattr decoding.
18731
18732 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
18733
18734         * rawbuffer.cs: Added native Win32 implementation, avoids using
18735         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18736
18737 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18738
18739         * class.c: make the low-level routines handle the cache.
18740
18741 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18742
18743         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18744
18745 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18746
18747         * class.c: fix mono_array_element_size() for objects.
18748         * class.h, class.c: add properties to MonoClass and load them
18749         at init time.
18750         * icall.c: check with isinst() when assigning a value to an array
18751         instead of requiring the classes to match exactly.
18752         Implemented icall for System.Type::GetType().
18753         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18754         enums. Handle bindingflags when looking for methods and fields.
18755         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18756         and mono_metadata_methods_from_property().
18757         * reflection.h, reflection.c: added structures for propreties,
18758         parameters and enums. Implemented mono_property_get_object() and
18759         mono_param_get_objects().
18760
18761 2001-12-18  Dick Porter  <dick@ximian.com>
18762
18763         * file-io.c: Use mono_string_to_utf16() instead of
18764         mono_string_chars()
18765
18766         * object.c: Added mono_string_to_utf16(), which copies the non
18767         NULL-terminated MonoString into a new double-null-terminated
18768         buffer.
18769
18770 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
18771
18772         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18773
18774 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
18775
18776         * file-io.c: raise exceptions if handle is invalid.
18777
18778 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18779
18780         * assembly.c: yet another check for mscorlib.
18781         * class.c, class.h: load nesting info for classes.
18782         * icall.c: many new functions to support the Reflection classes.
18783         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18784         * reflection.h, reflection.c: mono_image_create_token(),
18785         mono_assembly_get_object(), mono_type_get_object(),
18786         mono_method_get_object(), mono_field_get_object(): methods to return
18787         objects that parallel the C representation of assemblies, types,
18788         methods, fields.
18789
18790 2001-12-11  Dick Porter  <dick@ximian.com>
18791
18792         * icall.c:
18793         * file-io.c: Internal calls for file IO.
18794
18795 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18796
18797         * tabledefs.h: missing FileAttributes.
18798         * verify.h, verify.c: use is_valid_string () to simplify and check for
18799         valid strings more correctly. Fix warnings and speeling.
18800         Check more tables: Filed, File, ModuleRef, StandAloneSig.
18801         Check code: branches, maxstack, method calls.
18802
18803 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
18804
18805         * object.c (mono_object_allocate): removed static, so that the jit
18806         can allocate value types.
18807
18808         * icall.c (ves_icall_System_DateTime_GetNow): impl.
18809
18810 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18811
18812         * class.c: init enum types right away and register the
18813         token->MonoClass map in mono_class_create_from_typedef ().
18814         * verify.h, verify.c: first cut of the verifier.
18815         * pedump.c: add --verify switch to verify metadata tables.
18816         * tabledefs.h: add some missing enums.
18817
18818 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
18819
18820         * class.c (mono_install_runtime_class_init): impl.
18821         (mono_class_init): renamed mono_class_metadata_init to
18822         mono_class_init, also removed the metadata_inited flag
18823
18824         * object.c (mono_object_isinst): use faster algorithm
18825
18826 2001-11-30  Radek Doulik  <rodo@ximian.com>
18827
18828         * mono-endian.h: reverted last change
18829         added function prototypes
18830
18831         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18832         add mono-endian.c back
18833
18834         * mono-endian.c: returned back, as Paolo pointed out, it's needed
18835         for unaligned access, I've mistaked it with endianess. I am
18836         sorry.
18837         (mono_read16): fix reverted endianess
18838         (mono_read64): ditto
18839         (mono_read32): ditto
18840
18841 2001-11-30  Dick Porter  <dick@ximian.com>
18842
18843         * exception.c: Implement mono_exception_from_name()
18844
18845 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18846
18847         * metadata.h, metadata.c: remove params_size and locals_size and their
18848         calculation from the metadata code: they are only usefult to the
18849         interp.
18850
18851 2001-11-29  Radek Doulik  <rodo@ximian.com>
18852
18853         * object.c (mono_ldstr): swap bytes here, it's probably not the
18854         best place, but works for me now, I'll redo it once I know mono
18855         better, also note that I add PROT_WRITE and don't reset back, also
18856         note that it's only affects big endians, so x86 should be OK
18857
18858         * mono-endian.h (read16): use just glib macros for both endians
18859
18860         * mono-endian.c: removed as glib macros are used in in
18861         mono-endian.h so we don't need to care about endianess for read
18862         macros as glib does that for us already
18863
18864 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18865
18866         * class.h, class.h: take minimum alignment into consideration so
18867         that the fields of a class remain aligned also when in an array.
18868
18869 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18870
18871         * loader.h, loader.c: add mono_method_get_param_names().
18872         * class.c: 0-init class fields.
18873
18874 2001-11-26  Dick Porter  <dick@ximian.com>
18875
18876         * icall.c:
18877         * threads-types.h:
18878         * threads.c: New file that handles System.Threading on all platforms
18879
18880         * object.c: 
18881         * object.h: Remove the synchronisation struct from MonoObject,
18882         replace it with a pointer that gets initialised on demand
18883
18884         * Makefile.am: Replace all the system-specific threading code with
18885         a single file that uses the new wrapper library
18886
18887 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18888
18889         * class.c, class.h: add mono_install_trampoline() so that the runtime
18890         can register a function to create a trampoline: removes the ugly
18891         requirement that a runtime needed to export arch_create_jit_trampoline.
18892         * object.h, object.c: added mono_install_handler() so that the runtime
18893         can install an handler for exceptions generated in C code (with
18894         mono_raise_exception()). Added C struct for System.Delegate.
18895         * pedump.c: removed arch_create_jit_trampoline.
18896         * reflection.c: some cleanups to allow registering user strings and
18897         later getting a token for methodrefs and fieldrefs before the assembly
18898         is built.
18899         * row-indexes.h: updates and fixes from the new ECMA specs.
18900
18901 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18902
18903         * class.h, class.c: add enum_basetype field to MonoClass.
18904         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18905         to get index in the constant table reated to a field, param or
18906         property.
18907         * reflection.h, reflection.c: handle constructors. Set public-key and
18908         version number of the built assembly to 0.
18909         * row-indexes.h: update from new ECMA spec.
18910
18911 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18912
18913         * class.h, class.c: add a max_interface_id to MonoClass.
18914         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18915         since it's used to do that. Added mono_type_type_from_obj().
18916         Make GetType() return NULL instead of segfaulting if the type was not
18917         found. Handle simple arrays in assQualifiedName.
18918         * object.h: add a struct to represent an Exception.
18919         * reflection.c: output call convention in method signature.
18920         Add code to support P/Invoke methods and fixed offsets for fields.
18921
18922 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18923
18924         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18925         the value.
18926         * icall.c: use mono_array_addr instead of array->vector: fixes the
18927         reflection image writing.
18928         * reflection.c: init call convention byte to 0 in method signature.
18929         Encode the property signature. Don't output property-related methods
18930         twice. Really process the properties for a type (don't cast a field to
18931         a property, my mom always told me that).
18932         Fix 64 bit issues in pointer alignment in a different and more
18933         readable way.
18934
18935 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
18936
18937         * loader.h: Removed type class from MonoDefaults, added monotype
18938
18939         * loader.c: Loaded MonoType, removed loading of Type
18940
18941         * icall.c (my_mono_new_object): Now returns a System.MonoType,
18942         and fills in System.Type._impl with a RuntimeTypeHandle rather
18943         than the actual MonoClass *
18944
18945         (ves_icall_type_from_handle): change from type_class to
18946         monotype_class
18947
18948         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18949         implemented
18950
18951         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18952         implemented
18953
18954         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18955
18956         (ves_icall_System_Reflection_Assembly_GetType): implemented
18957
18958         (ves_icall_System_MonoType_assQualifiedName): implemented
18959
18960         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18961
18962 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
18963
18964         * assembly.c (mono_assembly_open): Implement a cache for the
18965         assemblies. 
18966
18967         (mono_assembly_close): only destroy the assembly when the last
18968         reference is gone.
18969         
18970 2001-11-09  Dick Porter  <dick@ximian.com>
18971
18972         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18973
18974 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
18975
18976         * class.c (mono_class_metadata_init): bug fix: compute the right slot
18977
18978 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18979
18980         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18981         from Martin Weindel.
18982         * object.h: add mono_string_chars ().
18983
18984 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
18985
18986         * reflection.c (build_compressed_metadata): Eliminates warnings
18987         and uses 64-bit clean code.
18988
18989         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18990         (mono_type_equal): Change signature to eliminate warnings.
18991
18992 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18993
18994         * icall.c, loader.c: remove the internalcall array constructors.
18995         Changes to match the new MonoArray structure.
18996         * object.h, object.c: an array object doesn't allocate an extra
18997         vector. Add mono_array_new_full () to create jagged arrays easily.
18998
18999 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19000
19001         * metadata.h, metadata.c: add mono_metadata_field_info () to
19002         retreive all the info about a field from vairous tables.
19003         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
19004         * class.h, class.c: augment MonoClassField with more info.
19005         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
19006         policy and load a field's RVA if needed.
19007
19008 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
19009
19010         * class.c (mono_class_metadata_init): create a trampoline for all
19011         virtual functions instead of actually compiling them.
19012
19013 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
19014
19015         * class.h, class.c: include name in MonoClassField.
19016         * class.c: fix fundamental type of System.Object and System.String.
19017         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
19018         tokens in ldtoken.
19019         * icall.c: remove internalcalls for the Reflection stuff that is now
19020         done in C# code.
19021         * loader.c: mono_field_from_memberref () implementation.
19022         * mono-endian.c: thinko (s/struct/union/g).
19023         * object.c, object.h: make the mono_string_* prototypes actually use
19024         MonoString instead of MonoObject.
19025         * reflection.c, reflection.h: updates for changes in the reflection
19026         code in corlib: we use C structures that map to the actual C# classes.
19027         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
19028         fat method header if needed and use the info from the ILGenerator for
19029         methods. Handle fields in types. Misc fixes.
19030
19031 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
19032
19033         * class.c (mono_class_metadata_init): bug fix: always allocate
19034         space for static class data
19035
19036 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
19037
19038         * class.c (mono_compute_relative_numbering): use relative
19039         numbering to support fast runtime type checks.
19040
19041 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
19042
19043         * class.c (mono_class_create_from_typeref): added debugging output
19044         to print class name when MonoDummy is returned instead of real class
19045
19046 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
19047
19048         * class.c (mono_class_metadata_init): interface offset table now
19049         contains pointers into the vtable - this is more efficient for the jit
19050
19051 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
19052
19053         * class.c (mono_class_metadata_init): use a temporary vtable (the
19054         old algorithm only worked for the interpreter, but not for the jit)
19055
19056 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
19057
19058         * loader.c (method_from_memberref): use mono_class_get to get the
19059         class of an array instead of using System.Array directly.
19060         (mono_get_method): also add MEMBERREF methods to the method cache
19061         which usefull for arrays.
19062
19063 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
19064
19065         * pedump.c (arch_compile_method): added to compute vtable entry
19066
19067         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19068         number of interfaces.
19069         
19070         * class.h: merged MonoArrayClass into MonoClass
19071
19072         * class.c (mono_class_create_from_typedef): compute the vtable size and
19073         allocate space to include the vtable inside MonoClass
19074         (mono_class_metadata_init): initialize the vtable
19075
19076 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19077
19078         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19079         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19080         * image.c: endian fixes by Laurent Rioux.
19081         * object.h, object.c: rename MonoStringObject to MonoString and
19082         MonoArrayObject to MonoArray. Change some function names to conform to
19083         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19084         guint16* as first argument, so don't use char*.
19085         Provide macros to do the interesting things on arrays in a portable way.
19086         * threads-pthread.c: updates for the API changes and #include <sched.h>
19087         (required for sched_yield()).
19088         * icall.c: updates for the API changes above.
19089         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19090         platforms that need them.
19091
19092 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19093
19094         * class.c: set the correct type for all the fundamental
19095         type when loading the class.
19096
19097 2001-10-05  Dick Porter  <dick@ximian.com>
19098
19099         * threads-pthread.c (pthread_mutex_timedlock): Simple
19100         compatibility version for C libraries that lack this call.
19101
19102 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19103
19104         * class.c: MonoTypes stored in MonoClass are stored as
19105         fundamental MonoTypes when the class represents a
19106         fundamental type (System.Int32, ...).
19107         The TypeHandle return by ldtoken is a MonoType*.
19108         * icall.c: ves_icall_get_data_chunk () write out all the
19109         PE/COFF stuff. Implement ves_icall_define_method (),
19110         ves_icall_set_method_body (), ves_icall_type_from_handle ().
19111         * image.c: properly skip unknown streams.
19112         * loader.h, loader.c: add type_class to mono_defaults.
19113         * metadata.c, metadata.h: export compute_size () as
19114         mono_metadata_compute_size () with a better interface.
19115         Typo and C&P fixes.
19116         * pedump.c: don't try to print the entry point RVA if there is no entry point.
19117         * reflection.c, reflection.h: many cleanups, fixes, output method
19118         signatures and headers, typedef and typeref info, compress the metadata
19119         tables, output all the heap streams, cli header etc.
19120         * row-indexes.h: typo fixes.
19121
19122 2001-10-04  Dick Porter  <dick@ximian.com>
19123
19124         * object.h: Add a synchronisation mutex struct to MonoObject
19125
19126         * object.c (mono_new_object): Initialise the object
19127         synchronisation mutexes
19128
19129         * icall.c: System.Threading.Monitor internal calls
19130         
19131         * threads-pthread.h:
19132         * threads-pthread.c: System.Threading.Monitor internal calls
19133
19134         * threads-types.h: New file, includes the system-specific thread
19135         structures
19136         
19137         * threads-pthread-types.h:
19138         * threads-pthread-types.c: New files, handle pthread-specific
19139         synchronisation types
19140
19141         * threads-dummy-types.h: 
19142         * threads-dummy-types.c: New files of dummy support for
19143         thread-specific types
19144
19145         * metadata.c:
19146         * image.c:
19147         * pedump.c: include mono-endian.h not endian.h
19148         
19149         * Makefile.am: More threads files.
19150         Name mono-endian.h not endian.h
19151
19152 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19153
19154         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
19155         stuff and implement a few more bits.
19156         * icall.c: a field needs to be dereferenced twice. Do not use the same
19157         name for two variables in the same scope.
19158         * image.c, image.h: cleanups.
19159
19160 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
19161
19162         * class.c (mono_class_metadata_init): bug fix: compute the right size
19163
19164 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19165
19166         * icall.c: implemented some of the Reflection internalcalls.
19167         * image.c, image.h: start writing out the PE/COFF image.
19168         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19169         that does the reverse than decode_blob_size ().
19170         * object.c: use mono_metadata_encode_value (). Move here
19171         temporary implementation of mono_string_to_utf8 ().
19172         * rawbuffer.c: make malloc_map static.
19173
19174 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19175
19176         * metadata.c: fix type comparison for arrays.
19177         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19178         Added a couple of new classes to monodefaults.
19179         * icall.c: added a couple of Reflection-related internalcalls.
19180         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19181         Added a byval_arg MonoType to MonoClass.
19182
19183 2001-09-28  Dick Porter  <dick@ximian.com>
19184
19185         * icall.c:
19186         * threads-pthread.h: 
19187         * threads-pthread.c: Implemented internal calls for
19188         LocalDataStoreSlot operations.  Applied mutexes around all shared
19189         data.  Reworked the thread creation and Start() operations to
19190         avoid a race condition.
19191         
19192         * threads-dummy.h:
19193         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19194
19195 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19196
19197         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19198
19199 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19200
19201         * class.c, loader.c: warn and return NULL instead of erroring out.
19202         * icall.c: added System.AppDomain::getCurDomain().
19203         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19204
19205 2001-09-25  Dick Porter  <dick@ximian.com>
19206
19207         * threads-pthread.h:
19208         * threads-pthread.c: Implemented timed thread joining and added
19209         System.Threading.Thread::Join_internal internal call
19210
19211         * icall.c: Added System.Threading.Thread::Join_internal internal call
19212
19213         * threads-dummy.h:
19214         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19215
19216 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19217
19218         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19219         mono_string_intern () to implement the semantics of the ldstr opcode
19220         and the interning of System.Strings.
19221         * icall.c: provide hooks to make String::IsIntern and String::Intern
19222         internalcalls.
19223
19224 2001-09-23  Dick Porter  <dick@ximian.com>
19225
19226         * threads-dummy.c: 
19227         * threads-dummy.h: New files of dummy threading routines
19228
19229         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19230         support code based on system specifics
19231
19232         Rename PTHREAD_LIBS to THREAD_LIBS
19233         
19234 2001-09-23  Dick Porter  <dick@ximian.com>
19235
19236         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19237         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19238         internal calls.
19239         (mono_thread_init): Set up a Thread object instance to return when
19240         the main thread calls Thread.CurrentThread
19241         (mono_thread_cleanup): Wait for all subthreads to exit
19242
19243         * icall.c: New internal calls for System.Threading.Thread::Sleep
19244         (including Schedule) and CurrentThread
19245
19246         * threads.h: New file, to insulate thread-specific stuff from the
19247         rest of the code
19248
19249 2001-09-21  Dick Porter  <dick@ximian.com>
19250
19251         * threads-pthread.h: 
19252         * threads-pthread.c: New file, for handling pthreads-style
19253         threading support.  Start() now starts a new thread and executes
19254         the ThreadStart delegate instance.
19255
19256         * icall.c: Added the internalcall for
19257         System.Threading.Thread::Start_internal
19258
19259         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19260
19261 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19262
19263         * loader.c: work around the different signatures for delegates
19264         constructors csc generates in compiled code vs the ones compiled in mscorlib.
19265
19266 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19267
19268         * class.h, class.c: add mono_class_get_field_from_name ().
19269         * *: Fix C comments and other ANSI C issues.
19270
19271 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19272
19273         * endian.h, assembly.c: fix some endianness issues.
19274
19275 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19276
19277         * loader.h, load.c: add delegate_class to mono_defaults.
19278         Handle runtime provided methods in mono_get_method ().
19279
19280 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
19281
19282         * loader.c (mono_get_method): use pinvoke for internal call
19283
19284         * icall.c: use pinvoke for internal call
19285
19286         * loader.c (method_from_memberref): set the method name
19287
19288 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19289
19290         * metadata.c: help the compiler generate better code for
19291         mono_class_from_mono_type ().
19292
19293 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
19294
19295         * class.c (mono_class_metadata_init): delayed computing of the
19296         class size to mono_class_metadata_init ()
19297
19298 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19299
19300         * class.c, class.h: add an interfaces member to MonoClass.
19301         * image.c, image.h: add assembly_name field to MonoImage
19302         from the assembly table.
19303         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19304
19305 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19306
19307         * class.c: Handle Array in mono_class_from_mono_type ().
19308         * metadata.c, pedump.c: some endian fixes.
19309
19310 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19311
19312         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19313         * metadata.c: fix small problem introduced with the latest commit.
19314
19315 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19316
19317         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19318         We don't need a MonoMetadata pointer anymore to compare signatures in
19319         mono_metadata_signature_equal (), update callers.
19320         Reduced memory usage an number of allocations for MonoMethodHeader and
19321         MonoMethodSignature.
19322
19323 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19324
19325         * metadata.c: added compare for szarray.
19326
19327 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19328
19329         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19330         and add a couple more types to it and mono_defaults. Give an hint on
19331         classes that need implementing in our corlib and are referenced
19332         in mscorlib.
19333
19334 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19335
19336         * class.h, class.c: keep track if a class is also an Enum.
19337         * loader.c: Implement a couple more types for use in libffi
19338         marshalling. Gives better diagnostics when failing to dlopen
19339         a library. Set method->klass for P/Invoke methods, too.
19340
19341 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19342
19343         * class.c, class.h: add a MonoType this_arg to MonoClass that
19344         represents a pointer to an object of the class' type that
19345         can be used by the interpreter and later the type cache.
19346         Add best guess alignment info for valuetype objects.
19347
19348 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19349
19350         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19351         into MonoType: one less level of indirection and allocation and
19352         simplifies quite a bit of code. Added cache for MonoTypes that are
19353         used frequently, so that we don't need to allocate them all the time.
19354
19355 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
19356
19357         * class.c (mono_class_create_from_typedef): System.Enum is also a
19358         value type, although it does not derive from System.ValueType
19359         (maybe a bug in the ms compiler?)
19360
19361         * metadata.c (mono_type_size): return the right size for value types
19362
19363         * loader.c (mono_get_method): only initialize method header if not abstract
19364
19365         * class.c (mono_class_from_mono_type): use mono_default values. 
19366
19367 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
19368
19369         * *: use MonoClass pointers instead of <type_tokens>
19370         
19371         * class.h: new flag: metadata_inited.
19372
19373         * class.c (mono_class_metadata_init): impl.
19374         (mono_class_instance_size): impl.
19375         (mono_class_data_size): impl.
19376
19377 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19378
19379         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19380         MonoClass now has the name and name_space fields. 
19381         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19382         mono_get_method () takes and optional MonoClass as argument.
19383         Removed mono_typedef_from_name() and added mono_class_token_from_name()
19384         instead that takes advantage of a map from class names to typedef
19385         tokens in MonoImage.
19386
19387 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19388
19389         * metadata.c: zero is not a valid alignment boundary.
19390         Merge MONO_TYPE_VOID in default decoding code.
19391
19392 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
19393
19394         * image.h: merged MonoMetadata into MonoImage
19395
19396         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19397         identify the type of elements.
19398
19399 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19400
19401         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19402         * cil-coff.h: split MonoMSDOSHeader and add size info.
19403         * image.c: add some consistency checks.
19404         * metadata.c: fix row size computation: one programmer
19405         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19406         add explanation for the locator routine.
19407         Fix decoding of size in method header.
19408         
19409 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
19410
19411         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
19412         (g_concat_dir_and_file): Bring g_concat_dir_and_file
19413         function from gnome-libs.  This uses the right path separator
19414         based on the OS, and also works around a bug in some systems where
19415         a double slash is not allowed. 
19416         (default_assembly_name_resolver): Use g_concat_dir_and_file
19417         (mono_assembly_open): ditto.
19418
19419 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
19420
19421         * metadata.c (mono_metadata_signature_equal): impl.
19422
19423         * *: void is now a realy MonoType (instead of using NULL)
19424         
19425         * metadata.c (do_mono_metadata_parse_type): use
19426         mono_metadata_parse_type to parse void value.
19427
19428 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19429
19430         * metadata.c, metadata.h: in the signature and method header store
19431         only the space required for holding the loca vars and incoming arguments.
19432
19433 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
19434
19435         * metadata.c (do_mono_metadata_parse_type): treat void like any
19436         other type (instead of assigning NULL);
19437
19438 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
19439
19440         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19441
19442 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
19443
19444         * image.c (do_mono_image_open): added a cache for arrays.
19445
19446 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19447
19448         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19449         decode a single column from a row in a metadata table and changes
19450         to take advantage of it in the typedef locator (gives a nice speed up).
19451         Store offset info for function params.
19452
19453 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
19454
19455         * image.h (MONO_IMAGE_IS_CORLIB): removed 
19456
19457 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19458
19459         * assembly.c: how could mono_assembly_close () had ever worked?
19460         * metadata.c, metadata.h: provide offset info for local vars.
19461         Implement mono_type_size () to take care of alignment as well
19462         as size (it was mono_field_type_size in cli/class.c before).
19463
19464 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
19465
19466         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19467
19468         * assembly.h (CORLIB_NAME): set to corlib.dll
19469
19470         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19471
19472 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19473
19474         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19475         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19476         tokentype.h: massive namespace cleanup.
19477
19478 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19479
19480         * metadata.h, metadata.c: decode exception clauses when parsing method header.
19481
19482 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
19483
19484         * metadata.c (mono_metadata_free_type): added check for type !=
19485         NULL (void) before calling mono_metadata_free_type()
19486
19487 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19488
19489         * metadata.h, row_indexes.h: added header with enumerations to use
19490         to index in the columns from tables in metadata and to decode coded
19491         tokens: we should start using this instead of embedding magic numbers
19492         all over the code.
19493
19494 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19495
19496         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19497         Move metadata_t info from cli_image_info_t to MonoImage, where
19498         it's easily accessible. Changed all the uses accordingly.
19499         Added the method and class caches to MonoImage.
19500         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19501         and mono_metadata_decode_value () signature to be more consistent
19502         with the other parse functions (and simplify code). Taken advantage
19503         of zero-length array allocation with GCC. Removed reduntant (and
19504         wrong) MonoFieldType struct and use MonoParam instead. Changed
19505         mono_metadata_parse_field_type () to use common code for parsing.
19506         Added mono_metadata_typedef_from_field () and
19507         mono_metadata_typedef_from_method () to lookup a typedef index from a
19508         field or method token.
19509         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19510
19511 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
19512
19513         * metadata.c (mono_metadata_parse_field_type): Implement. 
19514         (do_mono_metadata_parse_type): Split engine from
19515         mono_metadata_parse_type, so that we can create smaller structures
19516         for things that just have one pointer to the MonoType (look at
19517         the MonoFieldType)
19518
19519 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
19520
19521         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19522         as Jan Gray found out, it is incorrect. 
19523
19524 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
19525
19526         * assembly.c: Implement asssembly loading.  This loads an image
19527         and loads all the referenced assemblies.  Come to think of it, we
19528         could always do lazy loading of the assemblies. 
19529
19530         * image.c (mono_image_open): Keep loaded images in a hashtable.
19531
19532         * image.h (MonoImage): Add reference count.
19533
19534 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
19535
19536         * assembly.c (mono_assembly_open): Keep track of the file name in
19537         case the assembly has no ASSEMBLY table.
19538
19539         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
19540         from get.c here.
19541
19542 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19543
19544         * metadata.c, metadata.h: decode local vars in method header
19545         parse function. Change callers accordingly.
19546
19547 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19548
19549         * metadata.h, cil-coff.h: protect against multiple inclusion.
19550         Added some new structures to hold information decoded from metadata:
19551         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19552         and relevant decoding/free functions.
19553         * metadata.c: implement decoding functions. Add warning for out of bounds
19554         index in mono_metadata_locate(). Implement mono_get_method () to retreive
19555         all the info about a method signature and invocation. Remove check on
19556         uninitialized local var in parse_mh() and fix memory leak.
19557
19558 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
19559
19560         * metadata.h: More macros.
19561
19562         * tokentype.h: New file.
19563
19564 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19565
19566         * assembly.c: added a consistency check and initialize
19567         some structures with g_new0().
19568         * metadata.c: fixed a couple more bugs in table size computation
19569         and add other checks for out-of bound access to metadata.
19570
19571 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19572
19573         * metatada.c: fix bugs computing table sizes. Spew a
19574         warning when index in string heap is out of bounds.
19575
19576 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
19577
19578         * metadata.h: Add a couple of macros to manipulate tokens. 
19579
19580 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19581
19582         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19583         cli_section_tables).
19584
19585 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
19586
19587         * metadata.c (mono_metadata_user_string): New function, provides
19588         access to the UserString heap. 
19589
19590 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
19591
19592         * metadata.c: Add inline documentation.
19593
19594 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
19595
19596         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19597         files. 
19598
19599 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
19600
19601         * typeattr.h: New file, TypeAttribute flags. 
19602
19603 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
19604
19605         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19606         mono_assembly_ensure_section): Section loading code.
19607         (load_section_tables): Load the sections.
19608
19609         * mono/metadata/metadata.c (mono_metadata_locate_token,
19610         mono_metadata_locate): Functions to locate the information
19611         definition given a token or a table and an index.
19612         (mono_metadata_compute_table_bases): New.
19613         (compute_size): New function to compute the sizes of the various
19614         tables.
19615
19616         * mono/metadata/metadata.h: Finish listing the different index
19617         types. 
19618
19619         * mono/metadata/pedump.c: Improve to dump new information.
19620
19621 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
19622
19623         * mono/metadata/metadata.c: Entered all the tables matching
19624         Beta2. 
19625
19626         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
19627
19628
19629